
Chapter 5. Application instructions
5-24
5.4
Increment/decrement operations
5.4.1
INC, INCP, DINC, DINCP
INC
(Increment)
FUN(20) INC
FUN(22) DINC
FUN(21) INCP
FUN(23) DINCP
Applicable
CPU
All CPUs
Available Device
Flag
Instructions
M
P
K
L
F
T
C
S
D
#D Integer
Steps
Error
(F110)
Zero
(F111)
Carry
(F112)
INC(P)
DINC(P)
O O O O*
O O
O O
3
O
O
O
* Available only when do not use computer link module or data link module
1) Functions
-
INC(P) : Performs the addition of 1 to the device (16-bits data) specified at [ D ].
-
DINC(P) : Performs the addition of 1 to the device (32-bits data) [ D+1, D].
-
If the INC(P) or DINC(P) is executed when the content of device is hFFFF or hFFFFFFFF, the
content of device will be 0. At the same time, the zero flag (F111) and the carry flag (F112) are set.
-
If the device specified by #D is out of the range, the operation error occurs and the error flag (F110)
will be set.
Operand setting
INC
INCP
DINC
DINCP
D
D
The device to be increased
by INC instruction.
D
D
16 bits
0
0
1
1
1
0
0
0
1
1
0
1
0
0
1
1
0
0
1
1
1
0
0
0
1
1
0
1
0
1
0
0
+1
D
D
h38D3
h38D4