/opcodes/cp

Block Search // CPI (ComPare and Increment)

Description

The contents of the s operand are compared with the contents of the Accumulator. If there is a true compare, the Z flag is set. The execution of this instruction does not affect the contents of the Accumulator.

Example

If the Accumulator contains 63h, the HL register pair contains 6000h, and memory location 6000h contains 60h, the instruction CP (HL) results in the PN flag in the F Register resetting.

Opcodes