6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
225
6
■D-
• Subtracts 32-bit BIN data designated by (D) from 32-bit BIN data designated by (S) and stores the result of the subtraction
at the device designated by (D).
• The values for (S) and (D) can be designated at between -2147483648 and 2147483647 (BIN 32 bits).
• Judgment of whether the data is positive or negative is made on the basis of the most significant bit (b31).
• The following will happen when an underflow or overflow is generated in an operation result: The carry flag (SM700) in this
case does not turn ON.
• There is no operation error in the D+(P) or D-(P) instruction.
•0 Positive
•1 Negative
+1
123456 (BIN)
b0b16 b15
567890 (BIN)
b31
444434 (BIN)
D
S
+1
D
S
D
+1
D
b0b16 b15b31 b0b16 b15b31
Since bit 31 value is "0",
result of operation takes a positive value.
Since bit 31 value is "1",
result of operation takes a negative value.
K2147483647
K 2147483648
K2
K
2
K
(7FFFFFFE
H)
K214748364
6
(80000001H)
2147483647
(80000000
H)
(80000000
H)
(00000002
H)
(FFFFFFFE
H)