
163
The addition and subtraction instructions include CY in the calculation as well
as in the result. Be sure to clear CY if its previous status is not required in the
calculation, and to use the result placed in CY, if required, before it is
changed by execution of any other instruction.
5-17-1 INCREMENT – INC(38)
Wd: Increment word (BCD)
IR, AR, DM, HR, LR
Ladder Symbols Operand Data Areas
INC(38)
Wd
@INC(38)
Wd
When the execution condition is OFF, INC(38) is not executed. When the
execution condition is ON, INC(38) increments Wd, without affecting Carry
(CY).
Flags ER: Wd 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 incremented result is 0.
5-17-2 DECREMENT – DEC(39)
Wd: Decrement word (BCD)
IR, AR, DM, HR, LR
Ladder Symbols Operand Data Areas
DEC(39)
Wd
@DEC(39)
Wd
When the execution condition is OFF, DEC(39) is not executed. When the
execution condition is ON, DEC(39) decrements Wd, without affecting CY.
DEC(39) works the same way as INC(38) except that it decrements the value
instead of incrementing it.
Flags ER: Wd 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 decremented result is 0.
5-17-3 SET CARRY – STC(40)
Ladder Symbols
STC(40) @STC(40)
When the execution condition is OFF, STC(40) is not executed.When the ex-
ecution condition is ON, STC(40) turns ON CY (SR 25504).
Description
Description
BCD Calculations Section 5-17
Comentários a estes Manuais