program interruption. The decimal operand occupies
eightbytes in storage. The low-order four bits of the
field represent the sign. The remaining60 bits con
tain 15 binary-coded-decimal digits in true notation.
The packed decimal data format is described under
"Decimall Instructions."
The result of the conversion is placed in the gen
eral register specified by Rt. The maximum number
that can be converted and still be contained in a
32-bit register is 2,147,483,647; the minimum num
ber is -2,147,483,648. For any decimal number out
side this range, the operation is completed by placing
the 32 low-order binary bits in the register; a fixed
point divide exception exists, and a program inter
ruption follows. In the case of a negative second
operand, the low-order part is in two's-complement
notation.
Conditioll' Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2)
Data
Fixed-Point Divide
Converlr to DecimalCVD o 8 12 16
[RX]20 31
The radix of the first operand is changed from bina
ry to decimal, and the result is stored in the second
operand location. The number is treated as a right
aligned signed integer both before and after conver
sion.
The result is placed in the storage location desig
nated by the second operand and has the packed
decimal format, as described in "Decimal Instruc
tions." The result occupies eight bytes in storage.
The low-order four bits of the field represent the
sign. A positive sign is encoded as1100; a negative
sign iseneoded as 1101. The remaining 60 bits con
tain 15 binary-coded-decimal digits in true notation.
The number to be converted is obtained as a 32-
bit signed integer from a general register.Since 15
decimaldigits are available for the decimal equiva
lent of 31 bits, an overflow cannot occur.
Condition Code:
The code remains unchanged.
128System/370 Principles of Operation Program Exceptions: ,Access (store, operand 2)
Divide
DRRt,R2 [RR]
10 R1I R2 I 0 8 12 15
D R t ,D2(X2,B2) [RX]
50I R, I X
2I B2 0 8 12 16 I O
2I 20 31
The dividend (first operand) is divided by the divisor
(second operand) and replaced by the remainder and
the quotient.
The dividend is a 64-bit signed integer and occu
pies the even-odd pair of registers specified by the
Rt field of the instruction. A specification exception
occurs when Rt is odd. A 32-bit signed remainder
and a 32-bit signed quotient replace the dividend in
the even-numbered and odd-numbered registers,
respectively. The divisor is a 32-bit signed integer.
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 relative mag
nitude of dividend and divisor is such that the quo
tient cannot be expressed by a 32-bit signed integer,
a fixed-point divide exception is recognized (a pro
gram interruption occurs, no division takes place,
and the dividend remains unchanged in the general
registers).
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2 of D only)
Specification
Fixed-Point Divide
ExclusiveOR XR [RR]
17
o 8 12 15
eight
field represent the sign. The remaining
tain 15 binary-coded-decimal digits in true notation.
The packed decimal data format is described under
"Decimall Instructions."
The result of the conversion is placed in the gen
eral register specified by Rt. The maximum number
that can be converted and still be contained in a
32-bit register is 2,147,483,647; the minimum num
ber is -2,147,483,648. For any decimal number out
side this range, the operation is completed by placing
the 32 low-order binary bits in the register; a fixed
point divide exception exists, and a program inter
ruption follows. In the case of a negative second
operand, the low-order part is in two's-complement
notation.
Conditioll' Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2)
Data
Fixed-Point Divide
Converlr to Decimal
[RX]
The radix of the first operand is changed from bina
ry to decimal, and the result is stored in the second
operand location. The number is treated as a right
aligned signed integer both before and after conver
sion.
The result is placed in the storage location desig
nated by the second operand and has the packed
decimal format, as described in "Decimal Instruc
tions." The result occupies eight bytes in storage.
The low-order four bits of the field represent the
sign. A positive sign is encoded as
sign is
tain 15 binary-coded-decimal digits in true notation.
The number to be converted is obtained as a 32-
bit signed integer from a general register.
decimal
lent of 31 bits, an overflow cannot occur.
Condition Code:
The code remains unchanged.
128
Divide
DR
10 R1
D R t ,D2(X2,B2) [RX]
50
2
2
The dividend (first operand) is divided by the divisor
(second operand) and replaced by the remainder and
the quotient.
The dividend is a 64-bit signed integer and occu
pies the even-odd pair of registers specified by the
Rt field of the instruction. A specification exception
occurs when Rt is odd. A 32-bit signed remainder
and a 32-bit signed quotient replace the dividend in
the even-numbered and odd-numbered registers,
respectively. The divisor is a 32-bit signed integer.
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 relative mag
nitude of dividend and divisor is such that the quo
tient cannot be expressed by a 32-bit signed integer,
a fixed-point divide exception is recognized (a pro
gram interruption occurs, no division takes place,
and the dividend remains unchanged in the general
registers).
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2 of D only)
Specification
Fixed-Point Divide
Exclusive
17
o 8 12 15