The following two instructions work on the same principle in the addition or subtraction processing.
3.
Every time the input condition turns on, the value in the device specified in (s) is subtracted from the value in the device
specified in (d), and the result is stored in the device specified in (d).
(Input condition)
4.
When the input condition turns on, the value in the device specified in (S2) is subtracted from the value in the device
specified in (S1), and the result is stored in the device specified in (d).
(Input condition)
ON
Operand
Bit
X, Y, M, L,
SM, F, B,
SB, FX,
FY
(s1)
(s2)
(d)
*1 The number of basic steps is four for
5 BASIC INSTRUCTIONS -PART 2-
5 - 28
5.4 Arithmetic Operation Instructions
(Addition)
(Subtraction)
X104
0
X105
4
X106
9
14
D102
First: ON
Second: ON
Third: ON
(s1)
D102
970 (example) -
Word
J\
T, ST, C, D,
U\G,
W, SD,SW,
J\,
FD, R, ZR,
U3E\(H)G
RD
+P
K1 D100
-P
K1
D102
MOVP
K1000
(s)
-P
K10
(s1)
(s2)
-P
D102
K50
(d)
-
1000 (example)
-
990
-
980
-
The value in D102 changes.
(s2)
-
(50)
50
The value in D102 is not changed by the subtraction.
Double
word
Z
LT,
LZ
LST,
LC
(s1) (s2) (d)
.
INCP D100
DECP D102
Project name
Program name
D102
(d)
3.
D102
(d)
4.
D103
END
(s)
(10)
→ D102
10
→
990
10
→
980
10
→
970
(d)
→ D103
→
920
Indirect
Constant
specification
K,
E
H
RB-17
MAIN
(d)
Others
Number of
basic
steps
$
*1
3 or 4