Block Search // CPI (ComPare and Increment)
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.
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.
cp b 0xB8,
1 bytes, 4Tcp c 0xB9,
1 bytes, 4Tcp d 0xBA,
1 bytes, 4Tcp e 0xBB,
1 bytes, 4Tcp h 0xBC,
1 bytes, 4Tcp l 0xBD,
1 bytes, 4Tcp (hl) 0xBE,
1 bytes, 7Tcp a 0xBF,
1 bytes, 4Tcp * 0xFE,
2 bytes, 7Tcp ixh 0xDDBC,
2 bytes, 8Tcp ixl 0xDDBD,
2 bytes, 8Tcp (ix+*) 0xDDBE,
3 bytes, 19Tcp iyh 0xFDBC,
2 bytes, 8Tcp iyl 0xFDBD,
2 bytes, 8Tcp (iy+*) 0xFDBE,
3 bytes, 19T