LDD

Operation

(DE) <- (HL), DE <- DE-1, HL <- HL-1, BC <- BC-1

Mnemonic

LDD

Operands

None

b7b6b5b4b3b2b1b0
1 1 1 0 1 1 0 1$ED
1 0 1 0 1 0 0 0$A8

Description

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 including the Byte Counter (BC) register pair are decremented.

Condition Bits Affected

Sis not affected.
Zis not affected.
His reset.
P/Vis set if BC-1 != 0; otherwise, it is reset.
Nis reset.
Cis not affected.

Example

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

	LDD

results in the following contents in register pairs and memory addresses:

HLcontains$1110
($1111)contains$88
DEcontains$2221
($2222)contains$88
BCcontains$06