cmp
The compare instructions perform works like sub but does not update the accumulator.
It only updates all flags accordingly.
| Instruction | Encoding | Semantics | Cycles |
|---|---|---|---|
cmp acc, reg8 | 01 111 rrr | set flags corresponding to | 3/41/52 |
cmp acc, imm8 | 00 111 011 imm8 | set flags corresponding to | 3 |
- 4 cycles for unprefixed
cmp acc, [pi] - 5 cycles for
cmp acc, [pi]withprefix_a16(the sequenceprefix_a16; cmp acc, [pi]takes 6 cycles)