Mitsubishi Electronics C64 Home Safety Product User Manual


 
8. Function Commands
B+, B+P
- 178 -
{ B+, B+P ... BCD 16-bit addition
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
Addition command
B+P S2
S1
D
B+
B+P
B+
S2S1 D
Setting data
S2
S1
No. of device to store addition
results.
D
Addition data or No. of device
where addition data is stored.
Addition data or No. of device
where addition data is stored.
Function
(1) The BCD data designated with S1 and the BCD data designated with S2 are added, and the
addition results are stored in the device designated with D.
5678 (BCD) 1234 (BCD) 6912 (BCD)
B15
…………………B0 B15…………………B0 B15…………………B0
+
S1
S2 D
(2) 0 to 9999 (BCD 16-bit) can be designated in S1 and S2.
(3) If the result of the addition exceeds 9999, the higher bits are ignored. The carry flag in this case is
not turned ON.
(Note 1) An error occurs if the S1, S2, or D BCD data is outside the range 0 to 9999 (BCD).