Download Print this page

Convert To Decimal; Divide; Exclusive Or - IBM 4300 Manual

Processors principles of operation for ecps: vse mode
Hide thumbs Also See for 4300:

Advertisement

CONVERT TO DECIMAL
cvo
R 1 ,02 eX 2 , B 2 )
[RX]
'4E'
I
R1
I
X2
I
B2
02
0
8
12
16
20
31
The radix of the first operand is changed from
binary to decimal, and the result is stored at the
second-operand location. The first operand is
treated as a 32-bit signed binary integer.
The result occupies eight bytes in storage and is
in the format for packed decimal data, as described
in Chapter 8, "Decimal Instructions." The
low-order four bits of the result represent the sign.
A positive sign is encoded as 1100; a negative sign
is encoded as 1101.
Condition Code: The code remains unchanged.
Program Exceptions:
Access (store, operand 2)
Programming Notes
1. An example of the use of CONVERT TO
DECIMAL is given in Appendix A.
2. The number to be converted is a 32-bit signed
binary integer obtained from a general register.
Since 15 decimal digits are available for the
result, and the decimal equivalent of 31 bits
requires at most 10 decimal digits, an overflow
cannot occur.
DIVIDE
DR
o
8
12
15
, 50 '
I
R
1
I
X2
I
B2
o
8
12
16
20
31
The doubleword first operand (the dividend) is
divided by the second operand (the divisor), and
the remainder and the quotient are placed in the
first-operand location.
7-16
IBM 4300 Processors Principles of Operation
The R
1
field of the instruction specifies an
even-odd .pair of general registers and must
designate an even-numbered register. When Rl is
odd, a specification exception is recognized.
The dividend is treated as a 64-bit signed binary
integer. The divisor, the remainder, and the
quotient are treated as 32-bit signed binary
integers. The remainder and quotient replace the
dividend in the pair of registers specified by the R
1
field. The remainder is placed in the
even-numbered register, and the quotient is placed
in the odd-numbered register.
The sign of the quotient is determined by the
rules of algebra. The remainder has the same sign
as the dividend, except that a zero quotient or a
zero remainder is always positive. When the
magnitUdes of the dividend and divisor are such
that the quotient cannot be expressed by a 32-bit
signed binary integer, a fixed-point-divide
exception is recognized, and the operation is
suppressed.
Condition Code: The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2 of D only)
Fixed-Point Divide
Specification
EXCLUSIVE OR
XR
o
8
12
15
x
[RX]
o
8
12
16
20
XI
[S I]
'97'
o
8
16
20
31
31

Advertisement

loading