Increment/Decrement Instructions; Bcd Increment -- Inc; Bcd Decrement -- Dec - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

7-24 Increment/Decrement Instructions

7-24-1 BCD INCREMENT - - INC(38)
Limitations
Description
Precautions
Flags
7-24-2 BCD DECREMENT - - DEC(39)
Limitations
Description
Precautions
Flags
Ladder Symbols
INC(38)
@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.
ER:
Wd is not BCD
Indirectly addressed DM word is non-existent. (Content of
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the incremented result is 0.
Ladder Symbols
DEC(39)
@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.
ER:
Wd is not BCD.
Indirectly addressed DM word is non-existent. (Content of
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the decremented result is 0.
Operand Data Areas
Wd: Increment word (BCD)
IR, SR, AR, DM, HR, LR
Wd
Operand Data Areas
Wd: Decrement word (BCD)
IR, SR, AR, DM, HR, LR
Wd
Section
7-24

DM word is

DM word is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Srm-v2Cpm1aCpm2aSrm1Cpm2c

Table of Contents