CMP
(compare data and accumulator) Tags: NZC
Description:
Compares the data with the accumulator by performing a subtraction (A - data). Sets the N, Z, and C tags without saving the result of the subtraction anywhere. Z is set when the result equals zero, otherwise zeroed. N takes on the value of the highest bit of the result. C is set for A>=data, erased for A<data.
Example:
|