8051 Instruction Set Manual

SUBB

The SUBB instruction subtracts the specified byte variable and the carry flag from the accumulator. The result is stored in the accumulator. This instruction sets the carry flag if a borrow is required for bit 7 of the result. If no borrow is required, the carry flag is cleared.

See Also: ADD, ADDC

SUBB A, #immediate
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
10010100immediate
Operation
SUBB
A = A - C - immediate
Example
SUBB A, #01h
SUBB A, @Ri
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
1001011i
Operation
SUBB
A = A - C - (Ri)
Example
SUBB A, @R1
SUBB A, direct
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
10010101direct
Operation
SUBB
A = A - C - (direct)
Example
SUBB A, 44h
SUBB A, Rn
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
10011nnn
Operation
SUBB
A = A - C - Rn
Example
SUBB A, R5