/
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.

 

 

Related content