CP A, r
Compare with Accumulator
Operation
A – r
Description
The r operand is any of the 8-bit CPU registers A, B, C, D, E, H, or L. The CPU compares
the r operand to the contents of the accumulator, A, and outputs the difference. The execu-
tion of this instruction does not affect the contents of the accumulator or the r operand.
Condition Bits Affected
S
Z
H
P/V
N
C
Attributes
Mnemonic
CP
identifies the A, B, C, D, E, H, or L register and is assembled into one of the opcodes
jj
indicated in
UM007714-0908
Set if result is negative; reset otherwise.
Set if A = r; reset otherwise.
Set if borrow from bit 4; reset otherwise.
Set if overflow: reset otherwise.
Set.
Set if borrow; reset otherwise.
Operand
ADL Mode
A,r
X
Table
50.
Cycle
Opcode (hex)
1
jj
®
eZ80
CPU
User Manual
122
CPU Instruction Set
Need help?
Do you have a question about the eZ80 and is the answer not in the manual?
Questions and answers