Increment/Decrement Instructions; Bcd Increment - Inc(38); Bcd Decrement - Dec(39) - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

Increment/Decrement Instructions

Description
Flags

5-24 Increment/Decrement Instructions

5-24-1 BCD INCREMENT – INC(38)
Limitations
Description
Precautions
Flags
5-24-2 BCD DECREMENT – DEC(39)
Limitations
Description
When the execution condition is OFF, XNRW(37) is not executed. When the
execution condition is ON, XNRW(37) exclusively NOR's the contents of I1
and I2 bit-by-bit and places the result in R.
15
I1
1
0
15
I2
0
1
15
0
0
R
Indirectly addressed DM word is non-existent. (Content of *DM word
ER:
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is 0.
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 exe-
cution 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 *DM word
is 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.
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
0
1
1
0
Wd
Wd
Section 5-24
00
0
0
1
1
0
0
1
00
1
0
1
0
1
0
1
00
0
1
1
0
0
1
1
Operand Data Areas
Wd: Increment word (BCD)
IR, SR, AR, DM, HR, LR
Operand Data Areas
Wd: Decrement word (BCD)
IR, SR, AR, DM, HR, LR
319

Advertisement

Table of Contents
loading

Table of Contents