Processing details
• These instructions add the (n) points of 16-bit binary data from the device specified by (s1) and the (n) points of 16-bit
binary data from the device specified by (s2) or the constant, and store the operation result in the device specified by (d)
and later.
• Specify data in units of 16 bits.
Ex.
When a device is specified by (s2) (signed value specification)
b15
∙∙∙
b0
(s1)
1234
(BIN)
(s1)+1
4567
(BIN)
(s1)+2
-2000
(BIN)
(n)
(s1)+(n)-2
-1234
(BIN)
(s1)+(n)-1
4000
(BIN)
When a constant is specified by (s2) (signed value specification)
b15
∙∙∙
b0
(s1)
1234
(BIN)
(s1)+1
4567
(BIN)
(s1)+2
-2000
(BIN)
(n)
(s1)+(n)-2
-1234
(BIN)
(s1)+(n)-1
4000
(BIN)
• If an overflow occurs, the result will be as follows. In this case, SM700 does not turn on.
When a signed value is specified
K32767
K2
+
(H7FFF)
(H0002)
K-32767
K-2
+
(H8001)
(HFFFE)
Operation error
Error code
Description
(SD0)
2821H
The device ranges starting from the ones specified by (s1) and (d) are overlapping (except when the same device is specified for (s1) and
(d)).
The device ranges starting from the ones specified by (s2) and (d) are overlapping (except when the same device is specified for (s2) and
(d)).
b15
∙∙∙
b0
(s2)
4000
(BIN)
(s2)+1
1234
(BIN)
(s2)+2
-1234
(BIN)
(n)
+
(s2)+(n)-2
5000
(BIN)
(s2)+(n)-1
4321
(BIN)
b15
∙∙∙
b0
(s2)
4321
(BIN)
+
K-32767
(H8001)
K32767
(H7FFF)
b15
∙∙∙
b0
(d)
5234
(BIN)
(d)+1
5801
(BIN)
(d)+2
-3234
(BIN)
(d)+(n)-2
3766
(BIN)
(d)+(n)-1
8321
(BIN)
b15
∙∙∙
b0
(d)
5555
(BIN)
(d)+1
8888
(BIN)
(d)+2
2321
(BIN)
(d)+(n)-2
3087
(BIN)
(d)+(n)-1
8321
(BIN)
When an unsigned value is specified
K65535
K1
+
(HFFFF)
(H0001)
6.2 Arithmetic Operation Instructions
(n)
(n)
K0
(H0000)
6 BASIC INSTRUCTIONS
6
283