CP A, (IX/Y+d)
Compare with Accumulator
Operation
A–(IX/Y+d)
Description
The (IX/Y+d) operand is the 8-bit value stored in the memory location specified by the
contents of the Index Register, IX or IY, added to the two's-complement displacement d.
This 8-bit value is compared with (subtracted from) the contents of the accumulator, A.
The execution of this instruction does not affect the contents of the accumulator or the
(IX/Y+d) operand.
Condition Bits Affected
S
Z
H
P/V
N
C
Attributes
Mnemonic
CP
CP.S
CP.L
CP
CP.S
CP.L
UM007714-0908
Set if result is negative; reset otherwise.
Set if A = (IX/Y+d); 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,(IX+d)
X
A,(IX+d)
1
A,(IX+d)
0
A,(IY+d)
X
A,(IY+d)
1
A,(IY+d)
0
Cycle
Opcode (hex)
4
DD, BE, dd
5
52, DD, BE, dd
5
49, DD, BE, dd
4
FD, BE, dd
5
52, FD, BE, dd
5
49, FD, BE, dd
®
eZ80
CPU
User Manual
120
CPU Instruction Set
Need help?
Do you have a question about the eZ80 and is the answer not in the manual?
Questions and answers