Keil Logo

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
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
10010100 immediate
Operation
SUBB
A = A - C - immediate
Example
SUBB A, #01h
SUBB A, @Ri
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
1001011i
Operation
SUBB
A = A - C - (Ri)
Example
SUBB A, @R1
SUBB A, direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
10010101 direct
Operation
SUBB
A = A - C - (direct)
Example
SUBB A, 44h
SUBB A, Rn
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
10011nnn
Operation
SUBB
A = A - C - Rn
Example
SUBB A, R5
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.