236
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
BCD 8-digit addition and subtraction operations
DB+(P), DB-(P) [When two data are set]
■DB+
• Adds the BCD 8-digit data designated by (D) and the BCD 8-digit data designated by (S), and stores the result of the
addition at the device designated by (D).
• 0 to 99999999 (BCD 8 digits) can be assigned to (S) and (D).
• If the result of the addition operation exceeds 99999999, the upper bits will be ignored. The carry flag (SM700) in this case
does not turn ON.
■DB-
• Subtracts the BCD 8-digit data designated by (D) and the BCD 8-digit data designated by (S), and stores the result of the
subtraction at the device designated by (D).
• 0 to 99999999 (BCD 8 digits) can be assigned to (S) and (D).
• The following will result if an underflow is generated by the subtraction operation: The carry flag (SM700) in this case does
not turn ON.
(S): Data for adding/subtracting or head number of the devices where the data for adding/subtracting is stored (BCD 8 digits)
(D): Head number of the devices where the data to be added to/subtracted from is stored (BCD 8 digits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S)
(D)
Basic
Process
High
performance
Redundant
Universal
LCPU
Command
Command
P
S D
S D
DB+, DB-
DB+P, DB-P
DB+/DB-
indicates an instruction symbol of .
003234 56
(Upper 4 digits) (Lower 4 digits)
90871068
(Upper 4 digits)
(Lower 4 digits)
01194 524
(Upper 4 digits)(Lower 4 digits)
Digits exceeding the designated number
of digits are assumed to be 0.
D SD S D D
10654 32199 000000 00654 321
00 3234
5
6
(Upper 4 digits) (Lower 4 digits)
908
7
1068
(Upper 4 digits) (Lower 4 digits)
9 5 4 7
6
12
(Upper 4 digits) (Lower 4 digits)
+1+1 +1
Digits exceeding the designated number
of digits are assumed to be 0.
D SD S D D
0
2134 56792134 5678 99 999999