This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

LD r, s

8-bit register instructions

Table of Contents

76543210
 
\(r \longleftarrow r'\)
LD r, r'
01rr'
 
\(r \longleftarrow n\)
LD r, n
00r110
n
 
\(A \longleftarrow (BC)\)
LD A, (BC)
000010100A
 
\(A \longleftarrow (DE)\)
LD A, (DE)
000110101A
 
\(r \longleftarrow (HL)\)
LD r, (HL)
01r110
 
\(r \longleftarrow (IX+d)\)
LD r, (IX+d)
11011101DD
01r110
d
 
\(r \longleftarrow (IY+d)\)
LD r, (IY+d)
11111101FD
01r110
d
 
\(I \longleftarrow A\)
 
LD I,A
11101101ED
0100011147
 
\(R \longleftarrow A\)
LD R, A
11101101ED
010011114F
Registers
Registerr
B000
C001
D010
E011
H100
L101
A111
Flags Affected
None.
Opcode Matrix
ABCDEHL(HL)(BC)(DE)(IX+d)(IY+d)n
A
LD A, A
7F14
LD A, B
7814
LD A, C
7914
LD A, D
7A14
LD A, E
7B14
LD A, H
7C14
LD A, L
7D14
LD A, (HL)
7E17
LD A, (BC)
0A17
LD A, (DE)
1A17
LD A, (IX+d)
DD7Enn319
LD A, (IY+d)
FD7Enn319
LD A, n
3Enn27
B
LD B, A
4714
LD B, B
4014
LD B, C
4114
LD B, D
4214
LD B, E
4314
LD B, H
4414
LD B, L
4514
LD B, (HL)
4617


LD B, (IX+d)
DD46nn319
LD B, (IY+d)
FD46nn319
LD B, n
06nn27
C
LD C, A
4F14
LD C, B
4814
LD C, C
4914
LD C, D
4A14
LD C, E
4B14
LD C, H
4C14
LD C, L
4D14
LD C, (HL)
4E17


LD C, (IX+d)
DD4Enn319
LD C, (IY+d)
FD4Enn319
LD C, n
0Enn27
D
LD D, A
5714
LD D, B
5014
LD D, C
5114
LD D, D
5214
LD D, E
5314
LD D, H
5414
LD D, L
5514
LD D, (HL)
5617


LD D, (IX+d)
DD56nn319
LD D, (IY+d)
FD56nn319
LD D, n
16nn27
E
LD E, A
5F14
LD E, B
5814
LD E, C
5914
LD E, D
5A14
LD E, E
5B14
LD E, H
5C14
LD E, L
5D14
LD E, (HL)
5E17


LD E, (IX+d)
DD5Enn319
LD E, (IY+d)
FD5Enn319
LD E, n
1Enn27
H
LD H, A
6714
LD H, B
6014
LD H, C
6114
LD H, D
6214
LD H, E
6314
LD H, H
6414
LD H, L
6514
LD H, (HL)
6617


LD H, (IX+d)
DD66nn319
LD H, (IY+d)
FD66nn319
LD H, n
26nn27
L
LD L, A
6F14
LD L, B
6814
LD L, C
6914
LD L, D
6A14
LD L, E
6B14
LD L, H
6C14
LD L, L
6D14
LD L, (HL)
6E17


LD L, (IX+d)
DD6Enn319
LD L, (IY+d)
FD6Enn319
LD L, n
2Enn27
I
LD I, A
ED4724












R
LD R, A
ED4F24












Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Register Memory Implicit Special