221
BK+, BK+P, BK-, BK-P
1
2
3
4
6
7
8
6.2 Arithmetic Operation Instructions
6.2.13 BK+, BK+P, BK-, BK-P
BK-
(1) Subtracts n points of BIN data from the device designated by and n-points of BIN data from the device designated by
and stores the result from the device designated by onward.
(2) Block subtraction is performed in 16-bit units.
(3) The constant designated by can be between 32768 and 32767 (BIN 16-bit data).
(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) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Error
code
Error details
Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4101
The points specified in n exceed those of the corresponding device
specified in , , or .
The ranges of devices starting from the one specified in and
overlap by n points (except when the same device is specified in and
).
The ranges of devices starting from the one specified in and
overlap by n points (except when the same device is specified in and
).
S1
S2
D
(BIN)
(BIN)
(BIN)
b15 b0
1234
5678
9876
(BIN)4321
(BIN)4000
(BIN)
(BIN)
(BIN)
b15 b0
7531
3210
551
(BIN)679
(BIN)352
(BIN)
(BIN)
(BIN)
b15 b0
8765
8888
9325
(BIN)5000
(BIN)4352
+1
+2
+(n 2)
+(n 1)
n
S1
S2
D
S1
S1
S1
S1
+1
+2
+(n 2)
+(n 1)
S2
S2
S2
S2
n
+1
+2
+(n 2)
+(n 1)
n
D
D
D
D
S2
(BIN)
b15 b0
8880
(BIN)
(BIN)
(BIN)
b15 b0
8
445
(BIN)
(BIN)
(BIN)
(BIN)
(BIN)
b15 b0
8765
8888
9325
(BIN)5000
(BIN)
4352
+1
+2
+(n 2)
+(n 1)
n
S1
S2
D
S1
S1
S1
S1
+1
+2
+(n 2)
+(n 1)
n
D
D
D
D
115
4528
3880
K 32768
(8000
H
)
K32767
(7FFF
H
)
K
2
K2
K32766
32767
(0002
H
)
(8001
H
)(FFFE
H
)
(7FFE
H
)
S1 S2
D
S1
D
S1
D
S2
D
S2
D