CMP

Compare Memory and Accumulator

Operation:  A - M

N V - B D I Z C
/ . . . . . / /
Addressing ModeAssembly Language FormOP CODENo. BytesNo. Cycles
ImmediateCMP #$FF$C922
ZeroPageCMP $FF$C523
ZeroPage,XCMP $FF,X$D524
AbsoluteCMP $FFFF$CD34
Absolute,XCMP $FFFF,X$DD34*
Absolute,YCMP $FFFF,Y$D934*
(Indirect,X)CMP ($FF,X)$C126
(Indirect),YCMP ($FF),Y$D125*

* Add 1 if page boundary is crossed.

For penalty cycles on the 65816, check the desired addressing mode.