Binary Calculation Instructions
Flags
7-22 Binary Calculation Instructions
7-22-1 BINARY ADD – ADB(50)
Limitations
Description
Flags
ER:
Dr and Dr+1 contain 0.
Dd, Dd+1, Dr, or Dr+1 is not BCD.
Indirectly addressed DM word is non-existent. (Content of *DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is 0.
Ladder Symbols
ADB(50)
@ADB(50)
Au
Ad
R
DM 6144 to DM 6655 cannot be used for R.
When the execution condition is OFF, ADB(50) is not executed. When the
execution condition is ON, ADB(50) adds the contents of Au, Ad, and CY, and
places the result in R. CY will be set if the result is greater than FFFF.
Au + Ad + CY
ADB(50) can also be used to add signed binary data. With the CPM1A, CPM2A,
CPM2C, and SRM1(-V2), the underflow and overflow flags (SR 25404 and
SR 25405) indicate whether the result has exceeded the lower or upper limits of
the 16-bit signed binary data range.
Indirectly addressed DM word is non-existent. (Content of *DM word is
ER:
not BCD, or the DM area boundary has been exceeded.)
CY:
ON when the result is greater than FFFF.
EQ:
ON when the result is 0.
OF:
ON when the result exceeds +32,767 (7FFF).
UF:
ON when the result is below –32,768 (8000).
Operand Data Areas
Au: Augend word (binary)
IR, SR, AR, DM, HR, TC, LR, #
Ad: Addend word (binary)
Au
IR, SR, AR, DM, HR, TC, LR, #
Ad
R
IR, SR, AR, DM, HR, LR
CY
Section
7-22
R: Result word
R
467
Need help?
Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?