LD r,(IY+d)

Operation

r <- (IY+d)

Mnemonic

LD

Operands

r,(IY+d)

b7b6b5b4b3b2b1b0
1 1 1 1 1 1 0 1$FD
0 1 r 1 1 0
d

Description

The operand (IY+d) loads the contents of Index Register IY summed with two’s-complement displacement integer, d, to register r, in which r identifies registers A, B, C, D, E, H, or L, assembled as follows in the object code:

RegisterrHex
A111$7E
B000$46
C001$4E
D010$56
E011$5E
H100$66
L101$6E

Condition Bits Affected

None

Example

If Index Register IY contains the number $25AF, the instruction

	LD	B,(IY+$19)

allows the calculation of the sum $25AF+$19, which points to memory location $25C8. If this address contains byte $39, the unstruction results in Register B also containing $39.