192
D+, D+P, D-, D-P
(4) The following will happen when an underflow or overflow is generated in an operation result:
The carry flag in this case does not go ON.
Operation Error
(1) There is no operation error in the D+(P) or D-(P) instruction.
When three data are set (( +1, )+( +1, ) ( +1, ), ( +1, )-( +1, ) ( +1, ))
: Data to be added to/subtracted from or head number of the devices where the data to be added to/subtracted from is stored (BIN 32 bits)
:
Data for additing/subtracting or head number of the devices where the data for additing/subtracting is stored (BIN 32 bits)
:
Head number of the devices where the addition/subtraction operation result will be stored (BIN 32 bits)
Function
D+
(1) Adds 32-bit BIN data designated by to 32-bit BIN data designated by , and stores the result of the addition at the
device designated by .
(2) The values for , and can be designated at between -2147483648 and 2147483647 (BIN 32 bits).
(3) Judgment of whether the data is positive or negative is made on the basis of the most significant bit (b31).
• 0: Positive
• 1: Negative
(4) The following will happen when an underflow or overflow is generated in an operation result:
The carry flag in this case does not go ON.
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
––
––
–– ––
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)
S1 S1
S2 S2
D D
S1 S1
S2 S2
D D
Command
Command
P
S1
S2
D
S1
S2
D
D
+/ D
D+, D
D+P, D P
indicates an instruction symbol of .
S1
S2
D
S1
S2
D
S1
S2
D
+1
123456 (BIN)
b0b16 b15
+1
567890 (BIN)
b31
+1
691346 (BIN)
D
b0b16 b15b31 b0b16 b15b31
S1 S1
S2 S2
D
S1
S2
D
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
(7FFFFFFFH)
K 2147483648
(80000000H)
+K2
(00000002
H)
+K 2
(FFFFFFFEH)
K 2
147483647
K2
147483646
(7FFFFFFEH)
(80000001
H)