
Chapter 5. Application instructions
5-26
5.4.2
DEC, DECP, DDEC, DDECP
DEC
(Decrement)
FUN(24) DEC
FUN(26) DDEC
FUN(25) DECP
FUN(27) DDECP
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)
DEC(P)
DDEC(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
-
DEC(P) : Performs the subtraction of 1 to the device (16-bits data) specified at [ D ].
-
DDEC(P) : Performs the subtraction of 1 to the device (32-bits data) [ D+1, D].
-
If the DEC(P) or DDEC(P) is executed when the content of device is 0, the content of device will be
hFFFF or hFFFFFFFF and the carry flag (F112) is set.
-
The zero flag will be set when the content of device is 0.
-
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
DEC
DECP
DDEC
DDECP
D
D
The device to be increased
by DEC 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
0
1
0
– 1
D
D
h38D3
h38D2