Program Exceptions: Operation (if the decimal feature is not installed)
Access (fetch, operand2; fetch and store, oper
and 1)
Data
DecimalOverflow Programming Note
The operands of SUBTRACT DECIMAL may over
lap when their low-order bytes coincide, even when
their lengths are unequal. This property may be used
to set to zero an entire field or the low-order part of
a field.
Zero and Add
ZAP
[
o
The second operand is placed in the first-operand
location.
The operation is equivalent to an addition to zero.
A zero result is positive. When high-order digits are
lost because of overflow, a zero result has the sign of
the second operand.Only the second operand is checked for valid sign
and digit codes. Extra high-order zeros are supplied
if needed. When the first-operand field is too short
to contain all significant digits of the second oper
and, a decimal overflow occurs and results in a pro
gram interruption, provided that the decimal over
flow mask bit is one.
The first-operand and second-operand fields may
overlap :when the rightmost byte of the first-operand
field is coincident with or to the right of the right
most byte of the second operand. In this case the
result is obtained as if the operands were processed
right to left.
Resulting Condition Code:
o Result is zero
1 Result is less than zero
2 Result is greater than zero
3Overflow Program Exceptions: Operation (if the decimal feature is not installed)
Access (fetch, operand2; store, operand 1)
Data
DecimalOverflow Decimal Instructions 155
Access (fetch, operand
and 1)
Data
Decimal
The operands of SUBTRACT DECIMAL may over
lap when their low-order bytes coincide, even when
their lengths are unequal. This property may be used
to set to zero an entire field or the low-order part of
a field.
Zero and Add
ZAP
[
o
The second operand is placed in the first-operand
location.
The operation is equivalent to an addition to zero.
A zero result is positive. When high-order digits are
lost because of overflow, a zero result has the sign of
the second operand.
and digit codes. Extra high-order zeros are supplied
if needed. When the first-operand field is too short
to contain all significant digits of the second oper
and, a decimal overflow occurs and results in a pro
gram interruption, provided that the decimal over
flow mask bit is one.
The first-operand and second-operand fields may
overlap :when the rightmost byte of the first-operand
field is coincident with or to the right of the right
most byte of the second operand. In this case the
result is obtained as if the operands were processed
right to left.
Resulting Condition Code:
o Result is zero
1 Result is less than zero
2 Result is greater than zero
3
Access (fetch, operand
Data
Decimal