221
BK+, BK+P, BK-, BK-P
1
2
3
4
6
7
8
6.2
A
rithmetic Opera
tion In
str
uctions
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
(
B
IN)
(
B
IN)
(
B
IN)
b15
b0
123
4
5678
9876
(
B
IN)
4
321
(
B
IN)
4
000
(
B
IN)
(
B
IN)
(
B
IN)
b15
b0
7531
3210
551
(
B
IN)
679
(
B
IN)
352
(
B
IN)
(
B
IN)
(
B
IN)
b15
b0
8765
8888
9325
(
B
IN)
5000
(
B
IN)
4
352
+
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
)
K
32767
(
7
FFF
H
)
K
2
K
2
K
32766
32767
(
0002
H
)
(
8001
H
)
(FFFE
H
)
(
7
FFE
H
)
S1
S2
D
S1
D
S1
D
S2
D
S2
D