ADD (BCD)
BADD, DBADD, BADDP, DBADDP (BCD code)
ADD instruction adds two BCD values (S1 and S2) and save the result in Destination (assigned device address).
DBADD is Double word / BADDP and DBADDP are pulse.
Format : BADD value(S1) value(S2) Destination
| |
S1, S2 | Source 1 and 2 |
D | Destination |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
BADD(P) DBADD(P) | S1 | o | o | o | o | o | o | o | o | - | o | o | o | o | 4 | o | - | - |
S2 | o | o | o | o | o | o | o | o | - | o | o | o | o | |||||
D | o | - | o | o | o | - | o | o | - | o | o | o | - |
Example)
If X02 is ON, add D0 and D1 and then send the result to Y60.