If the first operand field is too short to contain all
bytes of the second operand, the remaining informa
tion is ignored.Overlapping fields may occur and are
processed by storing a result byte as soon as the neces
sary operand bytes are fetched.
Condition Code: The code remains unchanged.Program Interruptions: Protection Addressing
Programming Note
The instruction set for decimal arithmetic includes no
shift instructions since the equivalent of a shift can be
obtained by programming.Programs for right or left
shift and for an even or odd shift amount may be writ
ten withMOVE WITn OFFSET and the logical move in
structions.
Decimal Arithmetic Exceptions
Exceptional instructions, data, or results cause a pro
gram interruption. When the interruption occurs, the
current psw is stored as an oldPSW, and a new psw is
obtained. The interruption code in the old psw identi
fies the cause of the interruption. The following ex
ceptions cause a program interruption in decimal
arithmetic.
Operation: The decimal feature is not installed and
the instruction is ADD DECIMAL,SUBTRACT DECIMAL, ZERO AND ADD, COMPARE DECIMAL, MULTIPLY DECIMAL,
orDIVIDE DECIMAL. The instruction is suppressed.
Therefore, the condition code and data in storage and
registers remain unchanged.Protection: The storage key of a result location does
not match the protection key in the psw.
Addressing: An address designates a location out
side the available storage for the installed system.
In the two preceding exceptions, the operation is
terminated. The result data and the condition code
are unpredictable and should not be used for further
computation.
These address exceptions do not apply to the com
ponents from which an address is generated -the
contents of the Dl and D2 fields and the contents of
the registers specified by Bl andB 2 • Specifications: A multiplier or a divisor size ex
ceeds 15 digits and sign or exceeds the multiplicand
or dividend size. The instruction is suppressed;
therefore, the condition code and data in storage and
registers remain unchanged.
Data: A sign or digit code of an operand in ADD
DECIMAL,SUBTRACT DECIMAL, ZERO AND ADD, COMPARE DECIMAL, MULTIPLY DECIMAL, or DIVIDE DECIMAL is in
correct, a multiplicand has insufficient high-order
zeros, or the operand fields in these operations overlap
incorrectly. The operation is terminated. The result
data and the condition code are unpredictable and
should not be used for further computation.
Decimal Overflow: The result of ADD DECIMAL,SUB TRACT DECIMAL, or ZERO AND ADD overflows. The pro
gram interruption occurs only when the decimal-overflow mask bit is one. The operation is completed by
placing the truncated low-order result in the result
field and setting the condition code to 3. The sign and
low-order digits contained in the result field are the
same as they would have been for an infinitely long
result field.
Decimal Divide Check: The quotient exceeds the
specified data field, including division by zero. Di
vision is suppressed. Therefore, the dividend and
divisor remain unchanged in storage.
Decimal Arithmetic 39
bytes of the second operand, the remaining informa
tion is ignored.
processed by storing a result byte as soon as the neces
sary operand bytes are fetched.
Condition Code: The code remains unchanged.
Programming Note
The instruction set for decimal arithmetic includes no
shift instructions since the equivalent of a shift can be
obtained by programming.
shift and for an even or odd shift amount may be writ
ten with
structions.
Decimal Arithmetic Exceptions
Exceptional instructions, data, or results cause a pro
gram interruption. When the interruption occurs, the
current psw is stored as an old
obtained. The interruption code in the old psw identi
fies the cause of the interruption. The following ex
ceptions cause a program interruption in decimal
arithmetic.
Operation: The decimal feature is not installed and
the instruction is ADD DECIMAL,
or
Therefore, the condition code and data in storage and
registers remain unchanged.
not match the protection key in the psw.
Addressing: An address designates a location out
side the available storage for the installed system.
In the two preceding exceptions, the operation is
terminated. The result data and the condition code
are unpredictable and should not be used for further
computation.
These address exceptions do not apply to the com
ponents from which an address is generated -the
contents of the Dl and D2 fields and the contents of
the registers specified by Bl and
ceeds 15 digits and sign or exceeds the multiplicand
or dividend size. The instruction is suppressed;
therefore, the condition code and data in storage and
registers remain unchanged.
Data: A sign or digit code of an operand in ADD
DECIMAL,
correct, a multiplicand has insufficient high-order
zeros, or the operand fields in these operations overlap
incorrectly. The operation is terminated. The result
data and the condition code are unpredictable and
should not be used for further computation.
Decimal Overflow: The result of ADD DECIMAL,
gram interruption occurs only when the decimal-over
placing the truncated low-order result in the result
field and setting the condition code to 3. The sign and
low-order digits contained in the result field are the
same as they would have been for an infinitely long
result field.
Decimal Divide Check: The quotient exceeds the
specified data field, including division by zero. Di
vision is suppressed. Therefore, the dividend and
divisor remain unchanged in storage.
Decimal Arithmetic 39