7-25
Section
Increment/Decrement Instructions
483
7-25 Increment/Decrement Instructions
7-25-1
BCD INCREMENT – INC(38)
Wd
: Increment word (BCD)
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
INC(38)
Wd
@INC(38)
Wd
DM 6144 to DM 6655 cannot be used for Wd.
When the execution condition is OFF, INC(38) is not executed. When the execu-
tion condition is ON, INC(38) increments Wd, without affecting Carry (CY).
The content of Wd will be incremented every cycle if the undifferentiated form of
INC(38) is used. Use the differentiated form (@INC(38)) or combine INC(38)
with DIFU(13) or DIFD(14) to increment Wd just once.
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.
7-25-2
BCD DECREMENT – DEC(39)
Wd
: Decrement word (BCD)
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
DEC(39)
Wd
@DEC(39)
Wd
DM 6144 to DM 6655 cannot be used for 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.
The content of Wd will be decremented every cycle if the undifferentiated form of
DEC(39) is used. Use the differentiated form (@DEC(39)) or combine DEC(39)
with DIFU(13) or DIFD(14) to decrement Wd just once.
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.
Limitations
Description
Precautions
Limitations
Description
Precautions