Divide Decimal (Dp) - RCA 70/46 Reference Manual

Table of Contents

Advertisement

Divide Decimal
CDP)
General Description
Format
(55)
Condition Code
Interrupt Action
Notes
Decimal Arithmetic
Instructions
The operand specified by the first address (the dividend) is divided by
the operand specified by the second address (the divisor) and the result
(quotient plus remainder) replaces the first operand. The quotient is placed
leftmost in the first operand field. The remainder, which has a size equal
to the divisor size, is placed rightmost in the first operand field.
The operands may be variable in length and must be in packed format.
Overlapping is allowed if the rightmost byte locations are identical. The
second operand (the divisor) must be shorter than the first operand
(the dividend) and must not exceed eight bytes in length (15 digits plus
sign). If either rule is not observed, an address error (specification) occurs.
The dividend must have at least one high-order zero. Otherwise, a data
error occurs.
Together, the quotient and remainder occupy the entire dividend field
after division. Therefore, the address of the quotient field is the address of
the dividend field and its size in bytes is Ll - L
2 •
The quotient and
remainder are signed integers which are right-aligned in the first operand.
No overflow can occur. A quotient that is larger than the number of
digits allowed causes a decimal divide error.
0
FD
I
Ll
I
L2
I
Bl
I
Dl
B2
D2
7
8 11
12 15 16 19 20
31 32 35 36
47
Unchanged.
Address error:
Addressing.
Protection.
Specification.
Data error.
Decimal divide error.
1.
All signs and digits are checked for validity .
2. The second operand is unaltered.
3.
Th~
sign of the quotient is determined by the rules of algebra from
dividend and divisor signs. The sign of the remainder has the same
value as the dividend sign.
4. The first address plus (L
1 -
L
2 )
specifies the address of the remainder.
The length of the remainder is specified by L
2
!+
1.
163

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Spectra 70

Table of Contents