/
SUB (BCD)
SUB (BCD)
BSUB, BSUBP, DBSUB, DBSUBP (BCD code)
SUB instruction subtracts S2 from S1 and save the result in the Destination (assigned device address).
| |
S1, S2 | BDC value Source |
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 | ||
BSUB(P) DBSUB(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 X01 is ON, subtract D2 from D1 and then send the result to Y20.
, multiple selections available,
Related content
BCD 사칙연산(뺄셈) : BSUB, BSUBP, DBSUB, DBSUBP
BCD 사칙연산(뺄셈) : BSUB, BSUBP, DBSUB, DBSUBP
More like this
BCD 사칙연산(나눗셈) : BDIV, BDIVP, DBDIV, DBDIVP
BCD 사칙연산(나눗셈) : BDIV, BDIVP, DBDIV, DBDIVP
More like this
워드 Exclusive OR : WXOR, WXORP, DXOR, DXORP
워드 Exclusive OR : WXOR, WXORP, DXOR, DXORP
More like this
BIN 사칙연산(덧셈) : ADD, DADD, ADDP, DADDP
BIN 사칙연산(덧셈) : ADD, DADD, ADDP, DADDP
More like this
RECV
RECV
More like this
Device & Address (CM3 SPLUS)
Device & Address (CM3 SPLUS)
More like this