Skip to main content

cmp

The compare instructions perform works like sub but does not update the accumulator. It only updates all flags accordingly.

InstructionEncodingSemanticsCycles
cmp acc, reg801 111 rrrset flags corresponding to accreg8\mathit{acc} - \mathit{reg8}3/41/52
cmp acc, imm800 111 011 imm8set flags corresponding to accimm8\mathit{acc} - \mathit{imm8}3
  1. 4 cycles for unprefixed cmp acc, [pi]
  2. 5 cycles for cmp acc, [pi] with prefix_a16 (the sequence prefix_a16; cmp acc, [pi] takes 6 cycles)