(DE) <- (HL), DE <- DE+1, HL <- HL+1, BC <- BC-1
LDI
None
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | $ED |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | $A0 |
A byte of data is transferred from the memory location addressed, by the contents of the HL register pair to the memory location addressed by the contents of the DE register pair. Then both these register pairs are incremented and the Byte Counter (BC) Register pair is decremented.
S | is not affected. |
Z | is not affected. |
H | is reset. |
P/V | is set if BC-1 != 0; otherwise, it is reset. |
N | is reset. |
C | is not affected. |
If the HL register pair contains $1111, memory location $1111 contains byte $88, the DE register pair contains $2222, the memory location $2222 contains byte $66, and the BC register pair contains $07, then the instruction
LDI
results in the following contents in register pairs and memory addresses:
HL | contains | $1112 |
($1111) | contains | $88 |
DE | contains | $2223 |
($2222) | contains | $88 |
BC | contains | $06 |