334
Binary Calculation Instructions Section 5-22
Flags ER: Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
CY: ON when the result is negative, i.e., when Mi is less than Su plus CY.
EQ: ON when the result is 0.
OF: ON when the result exceeds +2,147,483,647 (7FFF FFFF).
UF: ON when the result is below –2,147,483,648 (8000 0000).
Example The following example shows an eight-digit subtraction with CY (SR 25504)
used to indicate a negative result (with unsigned data). The status of the UF
and OF flags indicate whether the result has exceeded the signed binary data
range (–2,147,483,648 (8000 0000) to +2,147,483,647 (7FFF FFFF)).
Note 1. For unsigned binary data, CY indicates that the result is negative. Take the
2’s complement using NEGL(––) to obtain the absolute value of the true
result. (UF and OF can be ignored.)
2. For signed binary data, the OF flag indicates that the result exceeds
+2,147,483,647 (7FFF FFFF). (CY can be ignored.)
5-22-7 SIGNED BINARY MULTIPLY – MBS(––)
Limitations DM 6143 to DM 6655 cannot be used for R.
CLC(41)
00101
SBBL(−−)
LR 02
DM 0012
DM 0022
Address Instruction Operands
00000 LD 00101
00001 CLC(41)
00002 SBBL(−−)
LR 22
DM 0012
DM 0022
Mi + 1 : LR 03 Mi : LR 02
Su + 1 : DM 0023 Su : DM 0022
FFFF
FFF0
0
R + 1 : LR 03 R : LR 02
0
CY (Cleared with CLC(41))
UF (SR 25405)
1
OF (SR 25404)
1
CY
FFF07FFF
8000 0000
Md: Multiplicand word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Mr: Multiplier word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Ladder Symbols
Operand Data Areas
R: First result word
IR, SR, AR, DM, EM, HR, LR
MBS(−− )
Md
Mr
R
@MBS(−− )
Md
Mr
R