Instruction Reference Manual 133
Description
Subtracts the C flag and the data in ss (any of BC, DE, HL, or SP) from the data in HL. The difference is
stored in HL.
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 HL,ss
Opcode Instruction Clocks Operation
——
ED 42
ED 52
ED 62
ED 72
SBC HL,ss
SBC HL,BC
SBC HL,DE
SBC HL,HL
SBC HL,SP
4 (2,2)
4 (2,2)
4 (2,2)
4 (2,2)
4 (2,2)
HL = HL - ss -CF
HL = HL - BC - CF
HL = HL - DE - CF
HL = HL - HL - CF
HL = HL - SP - CF
Flags ALTD I/O
S Z L/V C F R SP S D
• • V • • •