203
DB+, DB+P, DB-, DB-P
1
2
3
4
6
7
8
6.2
A
rithmetic Opera
tion In
str
uctions
6.2.6
D
B+, DB+P, DB-, D
B
-P
When three data are set (( +1, )+( +1, ) ( +1, ), ( +1, )-( +1, ) ( +1, ))
: Data to be added to/subtracted from or head number of the devices where the data to be added to/subtracted from is stored (BCD 8 digits)
:
Data for adding/subtracting or head number of the devices where the data for adding/subtracting is stored (BCD 8 digits)
:
Head number of the devices where the addition/subtraction operation result is stored (BCD 8 digits)
Function
DB+
(1) Adds the BCD 8-digit data designated by and the BCD 8-digit data designated by , and stores the result of the
addition at the device designated by .
(2) 0 to 99999999 (BCD 8 digits) can be assigned to , and .
(3) If the result of the addition operation exceeds 99999999, the upper bits will be ignored.
The carry flag in this case does not go ON.
DB-
(1) Subtracts the BCD 8-digit data designated by and the BCD 8-digit data designated by , and stores the result of the
subtraction at the device designated by .
(2) 0 to 99999999 (BCD 8 digits) can be assigned to , and .
(3) The following will result if an underflow is generated by the subtraction operation:
The carry flag in this case does not go ON.
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
S1
S1
S2
S2
D
D
S1
S1
S2
S2
D
D
Command
Command
P
S1
S2
D
S1
S2
D
DB+, DB-
DB+P, DB-P
DB+/ DB
indicates an instruction s
y
mbol of .
S1
S2
D
S1
S2
D
S1
S2
D
+
1
0
2 3 4 5 6 7
(U
pper 4 digits
) (
Lower 4 digits
)
6
5
7 8 9 1 2 3
(U
pper 4 digits
) (
Lower 4 digits
)
8
5
0 2 3 6 9 0
(U
pper 4 digits
) (
Lower 4 digits
)
+1
+1
+1
Digits exceeding the designated number
of digits are assumed to be 0.
S1
S1
S2
D
D
S2
S1
S2
D
1
0
6 5 4 3 2 1
9
9
0 0 0 0 0 0
0
0
6 5 4 3 2 1
S1
S2
D
1
0
2 3 4 5 6 7
(U
pper 4 digits
) (
Lower 4 digits
)
6
5
7 8 9 1 2 3
(U
pper 4 digits
) (
Lower 4 digits
)
5
4
6
(U
pper 4 digits
) (
Lower 4 digits
)
+1
+1
+1
Digits exceeding the designated
number of digits are assumed to be 0.
S1
S1
S2
D
D
S2
5 5 5
5 5
S1
S2
D
2
1
3 4 5 6 7 9
2
1
3 4 5 6 7 8
9
9
9 9 9 9 9 9