<< Previous | Next >>

> SBC HL,ss Subtract with Carry Rabbit 2000/3000/4000 Instruction

> Opcode | Instruction | Clocks | Operation
> ---- | SBC HL,ss | 4 (2,2) | HL = HL - ss - CF
> ED 42 | SBC HL,BC | 4 (2,2) | HL = HL - BC - CF
> ED 52 | SBC HL,DE | 4 (2,2) | HL = HL - DE - CF
> ED 62 | SBC HL,HL | 4 (2,2) | HL = HL - HL - CF
> ED 72 | SBC HL,SP | 4 (2,2) | HL = HL - SP - CF

> Flags | ALTD | IOI/IOE
> S | Z | L/V | C | F | R | SP | S | D
> · | · | V | · | · | · |  |  |

> #### Description

> Subtracts the C flag and the data in ss (any of BC, DE, HL, or SP) from HL. The result is stored in HL. These operations output an inverted carry:

> - The C flag is set if HL is less than the data being subtracted from it.

> - The C flag is cleared if HL is greater than the data being subtracted from it.

> - The C flag is unchanged if HL is equal to the data being subtracted from it.

<< Previous | Next >>