r <- r'
LD
r,r'
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 |
---|---|---|---|---|---|---|---|
0 | 1 | r | r' |
The contents of any register r' are loaded to any other register r. r, r' identifies any of the registers A, B, C, D, E, H, or L, assembled as follows in the object code:
Register | r |
---|---|
A | 111 |
B | 000 |
C | 001 |
D | 010 |
E | 011 |
H | 100 |
L | 101 |
Note:Complete list of opcodes below
None
If the H Register contains the number $8A, and the E register contains $10, the instruction
LD H,E
results in both registers containing $10.
Mnemonic | Hex | Mnemonic | Hex | Mnemonic | Hex | Mnemonic | Hex | Mnemonic | Hex | Mnemonic | Hex | Mnemonic | Hex |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LD A,A | $7F | LD B,A | $47 | LD C,A | $4F | LD D,A | $57 | LD E,A | $5F | LD H,A | $67 | LD L,A | $6F |
LD A,B | $78 | LD B,B | $40 | LD C,B | $48 | LD D,B | $50 | LD E,B | $58 | LD H,B | $60 | LD L,B | $68 |
LD A,C | $79 | LD B,C | $41 | LD C,C | $49 | LD D,C | $51 | LD E,C | $59 | LD H,C | $61 | LD L,C | $69 |
LD A,D | $7A | LD B,D | $42 | LD C,D | $4A | LD D,D | $52 | LD E,D | $5A | LD H,D | $62 | LD L,D | $6A |
LD A,E | $7B | LD B,E | $43 | LD C,E | $4B | LD D,E | $53 | LD E,E | $5B | LD H,E | $63 | LD L,E | $6B |
LD A,H | $7C | LD B,H | $44 | LD C,H | $4C | LD D,H | $54 | LD E,H | $5C | LD H,H | $64 | LD L,H | $6C |
LD A,L | $7D | LD B,L | $45 | LD C,L | $4D | LD D,L | $55 | LD E,L | $5D | LD H,L | $65 | LD L,L | $6D |