290
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
• These instructions subtract the (n) points of 32-bit binary data from the device specified by (s2) or the constant from the (n)
points of 32-bit binary data from the device specified by (s1), and store the operation result in the device specified by (d)
and later.
• Specify data in units of 32 bits.
When a device is specified by (s2) (signed value specification)
When a constant is specified by (s2) (signed value specification)
• Operation is possible when the same device is specified by (s1) or (s2) and (d). However, if the device range of (n) points
from (s1) or (s2) and the device range of (n) points from (d) are partly overlapped, an error results.
When the four points of device from that specified by (s2) and (d) exactly match
When four points of device from that specified by (s2) and (d) are partly overlapped
• If (n) is 0, no processing is performed.
• If an overflow occurs, the result will be as follows. In this case, SM700 does not turn on.
(1) Operation is possible because they exactly match.
(1) An operation error results because they partly match.
When a signed value is specified When an unsigned value is specified
-
-1000000
30000
54444
1234
(n)
-55555 (BIN)
33333 (BIN)
44444 (BIN)
13579 (BIN)
(n)
b31 b0
44445 (BIN)
3333 (BIN)
-10000 (BIN)
12345 (BIN)
(BIN)
(BIN)
(BIN)
(BIN)
(n)
b31 b0
(s1)
(s1)+1,
(s1)+2
(s1)+2(n)-2
(s1)+2(n)-1,
(s1)+4
(s1)+3,
(s1)+5,
(s2)
(s2)+1,
(s2)+2
(s2)+2(n)-2
(s2)+2(n)-1,
(s2)+4
(s2)+3,
(s2)+5,
(d)
(d)+2
(d)+2(n)-2
(d)+4
(d)+1,
(d)+3,
(d)+5,
(d)+2(n)-1,
b31 b0
-
-109998
90000
69998
70000
(n)
-99999 (BIN)
99999 (BIN)
-59999 (BIN)
79999 (BIN)
(n)
b31 b0
(BIN)
(BIN)
(BIN)
(BIN)
(s1)
(s1)+1,
(s1)+2
(s1)+2(n)-2
(s1)+2(n)-1,
(s1)+4
(s1)+3,
(s1)+5,
(s2)+1, (s2)
(d)
(d)+2
(d)+2(n)-2
(d)+4
(d)+1,
(d)+3,
(d)+5,
(d)+2(n)-1,
b31 b0
b31 b0
9999 (BIN)
W1, W0
b31 b0
W3, W2
W5, W4
W7, W6
D1, D0
b31 b0
D3, D2
D5, D4
D7, D6
b31
(1)
b0
W1, W0
b31 b0
W3, W2
W5, W4
W7, W6
D1, D0
b31
b0
D3, D2
D5, D4
D7, D6
D9, D8
b31
(1)
b0
K2147483647
(H7FFFFFFF)
K2
(H00000002)
K-2147483647
(H80000001)
K-2147483647
(H80000001)
-
-
K2147483647
(H7FFFFFFF)
K-2
(HFFFFFFFE)
K4294967295
(HFFFFFFFF)
K1
(H00000001)
-
K0
(H00000000)