6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
203
6
• These instructions add (n) point(s) of 16-bit binary data from the device specified by (s1) and the (n) point(s) of 16-bit binary
data from the device specified by (s2), and store the results of addition in the device specified by (d).
• Block addition is performed in units of 16-bits.
If device is specified for (s2) (signed)
If constant is specified for (s2) (signed)
• If an underflow or overflow occurs for operation result, the result will be as follows. In this case, the carry flag (SM700) does
not turn ON.
If signed is specified If unsigned is specified
Error code
(SD0/SD8067)
Description
2820 The range of (n) point(s) of data starting from the device specified by (s1), (s2), or (d) exceed the corresponding device range.
2821 The device range for (n) point(s) beginning from (s1) overlaps with that of (n) point(s) starting from (d).
(Does not apply when same device has been specified for (s1) and (d).)
The device range for (n) point(s) beginning from (s2) overlaps with that of (n) point(s) starting from (d).
(Does not apply when same device has been specified for (s2) and (d).)
···
+
1234 (BIN)
4567 (BIN)
-2000 (BIN)
-1234 (BIN)
4000 (BIN)
(n)
(n) (n)
4000 (BIN)
1234 (BIN)
-1234 (BIN)
5000 (BIN)
4321 (BIN)
5234 (BIN)
5801 (BIN)
-3234 (BIN)
3766 (BIN)
8321 (BIN)
(s1)
(s1)+1
(s1)+(n-2)
(s1)+(n-1)
(s1)+2
···
(s2)
(s2)+1
(s2)+(n-2)
(s2)+(n-1)
(s2)+2
···
(d)
(d)+1
(d)+(n-2)
(d)+(n-1)
(d)+2
···b15 b0 ···b15 b0 b15 b0···
···
1234 (BIN)
4567 (BIN)
-2000 (BIN)
-1234 (BIN)
4000 (BIN)
(n)
(n)
5555 (BIN)
8888 (BIN)
2321 (BIN)
3087 (BIN)
8321 (BIN)
(s1)
(s1)+1
(s1)+(n-2)
(s1)+(n-1)
(s1)+2
···
(d)
(d)+1
(d)+(n-2)
(d)+(n-1)
(d)+2
···b15 b0
···b15 b0
b15 b0···
4321 (BIN)(s2)
+
K32767
(7FFFH)
K2
(0002H)
K-32767
(8001H)
K-32767
(8001H)
K-2
(FFFEH)
+
+
K32767
(7FFFH)
K65535
(FFFFH)
K1
(0001H)
K0
(0000H)
+