sub/sbc
The sub and sub with carry instructions perform the subtractions as shown in the table below. All flags are updated accordingly.
Instruction | Encoding | Semantics | Cycles |
---|---|---|---|
sub acc, reg8 | 01 000 rrr | 3/41/52 | |
sbc acc, reg8 | 01 001 rrr | 3/41/52 | |
sub acc, imm8 | 00 000 011 imm8 | 3 | |
sbc acc, imm8 | 00 001 011 imm8 | 3 | |
sub ab, reg16 | 11 10 00 ww | 7 |
- 4 cycles for unprefixed
sub acc, [pi]
/sbc acc, [pi]
- 5 cycles for
sub acc, [pi]
/sbc acc, [pi]
withprefix_a16
(the sequenceprefix_a16; sub acc, [pi]
takes 6 cycles)