132 Rabbit 2000/3000 Microprocessor
Description
• SBC A,n: Subtracts the C flag and the 8-bit constant n from the data in A.
• SBC A,r: Subtracts the C flag and the data in r (any of the registers A, B, C, D, E, H, or L)
fromthedatainA.
The difference is stored in A.
These operations output an inverted carry:
• The C flag is set if A is less than the data being subtracted from it.
• The C flag is cleared if A is greater than the data being subtracted from it.
• The C flag is unchaged if A is equal to the data being subracted from it.
SBC A,n
SBC A,r
Opcode Instruction Clocks Operation
DE n SBC A,n 4 (2,2) A=A-n -CF
——
9F
98
99
9A
9B
9C
9D
SBC A,r
SBC A,A
SBC A,B
SBC A,C
SBC A,D
SBC A,E
SBC A,H
SBC A,L
2
2
2
2
2
2
2
2
A=A-r -CF
A=A-A-CF
A=A-B-CF
A=A-C-CF
A=A-D-CF
A=A-E-CF
A=A-H-CF
A=A-L-CF
Flags ALTD I/O
S Z L/V C F R SP S D
• • V • • •