This instruction compares the contents of the X register with another memory held value and sets the zero and carry flags as appropriate.

C 	Carry Flag 	  Set if X >= M
Z 	Zero Flag 	  Set if X = M
I 	Interrupt Disable Not affected
D 	Decimal Mode Flag Not affected
B 	Break Command 	  Not affected
V 	Overflow Flag 	  Not affected
N 	Negative Flag 	  Set if bit 7 of the result is set

Cpx is referenced in 1 repository