Machine Format Op Code FA 2 3 C 000 I D 0001 Assembler Format
AP0(3,12),0(4,13) is executed, the storage 2000-2002 contain 73 88 5Ci code 2 is set to indicate
result isgreater than zero.
locations
condition
that theNote that:
1.Because the two numbers had differ
ent signs, they were in effect
subtracted.
2. Although the second operand is
longer thanthe first operand, no
overflow interruption occursbecause the result can be entirely contained within the first operand. COMPARE DECIMAL (CP) Assume that the signed, packed-decimal
contents of storage locations700-703 are to be algebraically compared with
the signed, packed-decimal contents of
locations500-502. Also assume:
Register 12 contains00 00 06 00. Register 13 contains 00 00 03 00. Storage locations 700-703 contain 17 25 35 6D.
Storage locations500-502 contain 72 14
2D.
After the instruction:
Machine FormatOp Code F9 3 2 C 100 I D
Assembler Format
is executed, condition code 1 is set,
indicating that the first operand (the
contents of locations700-703) is less
than the second.
DIVIDEDECIMAL (DP)
Assume that the signed, packed-decimal
number at storage locations2000-2004 (the dividend) is to be divided by the
signed, packed-decimal number at
locations3000-3001 (the divisor). Also
assume:
Register 12 contains00 00 20 00. Register 13 contains 00 00 30 00. Storage locations 2000-2004 contain 01 23 45 67 8C. Storage locations 3000-3001 contain 32 10. After the instruction:
Machine FormatOp Code L t
FD 4 1C 000 I 0 0001 Assembler Format
DP0(5,12),0(2,13) is executed, the dividend is entirely
replaced by the signed quotient and
remainder, as follows:2000 2004 Locations 2000-2004 13814610DI0118Cl quotient I remainder
Notes:
1. Because the dividend and divisor
have different signs, the quotient
receivesa negative sign.
2. The remainder receives the sign of
the dividend and the length of the
divisor.
3. If an attempt were made to divide
the dividend by the one-byte field
at location3001, the quotient
would be too long to fit within the
four bytes allotted to it. A
decimal-divide exception wouldexist, causing a program inter
ruption.
EDIT (ED)
Before decimalcan be used in
and signs must
characters.
marks, such
data in the packed format
a printed report, digits
be converted to printable
Moreover, punctuation
as commas and decimal
Appendix A. Number Representation and Instruction-Use Examples A-31
AP
result is
locations
condition
that the
1.
ent signs, they were in effect
subtracted.
2. Although the second operand is
longer than
overflow interruption occurs
contents of storage locations
the signed, packed-decimal contents of
locations
Register 12 contains
Storage locations
2D.
After the instruction:
Machine Format
Assembler Format
is executed, condition code 1 is set,
indicating that the first operand (the
contents of locations
than the second.
DIVIDE
Assume that the signed, packed-decimal
number at storage locations
signed, packed-decimal number at
locations
assume:
Register 12 contains
Machine Format
FD 4 1
DP
replaced by the signed quotient and
remainder, as follows:
Notes:
1. Because the dividend and divisor
have different signs, the quotient
receives
2. The remainder receives the sign of
the dividend and the length of the
divisor.
3. If an attempt were made to divide
the dividend by the one-byte field
at location
would be too long to fit within the
four bytes allotted to it. A
decimal-divide exception would
ruption.
EDIT (ED)
Before decimal
and signs must
characters.
marks, such
data in the packed format
a printed report, digits
be converted to printable
Moreover, punctuation
as commas and decimal
Appendix A. Number Representation and Instruction-Use Examples A-31