The significance starter forces the significance indicator to
the on state and hence causes the decimal point to be pre
served. Because the minus-sign code has no effect on the
significance indicator, theCR symbol is also preserved.
Edit and Mark (EDMK)
After an EDIT AND MARK operation, a symbol (such as a
dollar sign) can be inserted at the appropriate position in the
edited result. Usually a currency symbol is inserted to the
immediate left of the first significant digit in the amount;
however, if a decimal point appears in an amount less than
one, the currency symbol must be inserted to the immediate
left of the decimal point. A typical operation would leave no
blank between the currency symbol and the amount, thus
protecting against one form of alteration when the result is
printed on a check.
If significance is not forced by the significance starter, the
EDIT AND MARK operation inserts into general register 1
an address one more than the address at which a currency
symbol would normally be inserted. After one is subtracted
from the value in general register 1 (for example, by using aBRANCH ON COUNT instruction with R 1 set to one and
R2 set to zero), aMOVE instruction (MV!) may be used to
position the symbol in main storage.
Machine FormatOp Code
92 5BI 000 Assembler Format Op Code 01 (B1), 12 MVI O(1),C'$'
If significance is forced, general register 1 remains un
changed. Therefore, the address of the character following
the Significance starter should be placed in the register be
fore the EDIT AND MARK instruction is performed.Multiply Decimal (MP)
Assume that the signed, packed-decimal field in storage lo
cations1202-1204 (the multiplicand) is to be multiplied by
the signed, packed-decimal field in locations500-501 (the
multiplier).1202 1204 Multiplicand 138 146 I 00 I 500 501 Multiplier Because there is a total of eight significant digits in the
multiplier and multiplicand, a field at least five bytes in
length must be reserved for the signed result. As indicated in
the programming note forMULTIPLY DECIMAL, a ZERO AND ADD into a larger field can provide the required space.
If it is assumed
Register 4 contains00 00 12 00 Register 6 contains 00 00 05 00 then execution of the assembler instruction ZAP X'100'(5,4),2(3,4)
sets up a new multiplicand in storage locations1300-1304 as follows. 1300 1304 Multiplicand (new) I 00 I 00 I 38 1 46 1 00 I Now, after the instruction
Machine FormatOp Code L1 L2 B1
FCI 4 11 I 4 100 6 000 Assembler Format Op Code 01 (L
1
, B
1
), 02 (L2' B
2
)MP X'1 00'(5,4) ,0(2,6)
is executed, storage locations1300-1304 contain the prod
uct01 2345 66 OC. Shift and Round Decimal (SRP) The SRP instruction can be used for shifting decimal fields
in main storage. When the field is shifted right, rounding can
also be done.
Decimal Left Shift
In this example, the contents of storage location FIELD 1
are shifted three places to the left, effectively multiplying
the contents of FIELD 1 by1000. FIELD! is six bytes long,
and its contents are shown in"FIELDI (before)" below.
The following SRP instruction performs the above operation:
Machine FormatOp Code
L113 S1 B2
°2FO 5 I 0 **** 0 003 Assembler Format Op Code S1 S2' 13 SRP FIELOH6),3,0 Appendix I. Number Representation and Instruction-Use Examples 307
the on state and hence causes the decimal point to be pre
served. Because the minus-sign code has no effect on the
significance indicator, the
Edit and Mark (EDMK)
After an EDIT AND MARK operation, a symbol (such as a
dollar sign) can be inserted at the appropriate position in the
edited result. Usually a currency symbol is inserted to the
immediate left of the first significant digit in the amount;
however, if a decimal point appears in an amount less than
one, the currency symbol must be inserted to the immediate
left of the decimal point. A typical operation would leave no
blank between the currency symbol and the amount, thus
protecting against one form of alteration when the result is
printed on a check.
If significance is not forced by the significance starter, the
EDIT AND MARK operation inserts into general register 1
an address one more than the address at which a currency
symbol would normally be inserted. After one is subtracted
from the value in general register 1 (for example, by using a
R2 set to zero), a
position the symbol in main storage.
Machine Format
92 5B
If significance is forced, general register 1 remains un
changed. Therefore, the address of the character following
the Significance starter should be placed in the register be
fore the EDIT AND MARK instruction is performed.
Assume that the signed, packed-decimal field in storage lo
cations
the signed, packed-decimal field in locations
multiplier).
multiplier and multiplicand, a field at least five bytes in
length must be reserved for the signed result. As indicated in
the programming note for
If it is assumed
Register 4 contains
sets up a new multiplicand in storage locations
Machine Format
FC
1
, B
1
), 02 (L2' B
2
)
is executed, storage locations
uct
in main storage. When the field is shifted right, rounding can
also be done.
Decimal Left Shift
In this example, the contents of storage location FIELD 1
are shifted three places to the left, effectively multiplying
the contents of FIELD 1 by
and its contents are shown in
The following SRP instruction performs the above operation:
Machine Format
L1
°2








































































































































































































































































































































