CP is a subtraction from A that doesn't update A, only the flags it would have set/reset if it really was subtracted.
op8 is any one of the allowed inputs.
cp a cp b cp c cp d cp e cp h cp l cp ixh cp ixl cp iyh cp iyl cp (ix+n) cp (iy+n) cp n ;8 bit constant
C, S, and Z flags modified by definition P/V detects overflow
Here are some general rules on using CP
If A == N, then Z flag is set. If A != N, then Z flag is reset. If A < N, then C flag is set. If A >= N, then C flag is reset.
If A == N, then Z flag is set. If A != N, then Z flag is reset. If A < N, then S and P/V are different. A >= N, then S and P/V are the same.
r denotes 8-bit register.