Mitsubishi Electronics C64 Home Safety Product User Manual


 
8. Function Commands
B–, B–P
- 180 -
{ B–, B–P ... BCD 16-bit subtraction
Usable device
Bit device Word device
Con-
stant
Pointer
X Y M L F BSB T SM VTCDRWSWZSDKH P
Digit
desig-
nation
Index
No. of
steps
S1
{ { { { { { { { {
S2
{ { { { { { { { {
D
{ { { { { { {
{
5/6
B-P S2S1 D
B- S2S1 D
B-
B-P
Subtraction command
Setting data
S2
S1
No. of device to store subtraction
results.
D
Subtraction data or No. of device
where subtraction data is stored.
Subtraction data or No. of device
where subtraction data is stored.
Function
(1) The device designated with S1 and the device designated with S2 are subtracted, and the
subtracted results are stored in the device designated with D.
5678 (BCD) 1234 (BCD) 4444 (BCD)
B15…………………B0
B15…………………B0
S1
B15…………………B0
S2
D
(2) 0 to 9999 (BCD 16-bit) can be designated in S1 and S2.
(3) The following will result if an underflow is generated by the subtraction. The carry flag in this case
is not turned ON.
0 0 0 1 - 0 0 0 3
9998
(Note 1) An error occurs if the S1, S2, or D BCD data is outside the range 0 to 9999 (BCD).
Execution conditions
The execution conditions for B-, B-P are as shown below.
Addition command OFF
B-
ON
B-P
Executed per scan
Executed per scan