LDD¶
- LDD
- Load and Decrement
- Description
- Copies one byte from
(HL)
to(DE)
, then decrementsHL
,DE
, andBC
.ld (de),(hl) ; Not normally a valid instruction dec hl dec de dec bc
- Uses
- This instruction is not very useful on its own, but more often used is the repeating version of
LDD
:LDDR
- This instruction is not very useful on its own, but more often used is the repeating version of
- Results
Register/Flag 16-bit (non-ADL) 24-bit (ADL) S
flagNot affected Z
flagNot affected H
flagReset P/V
flagSet if BC
≠ 0 after the operation; else resetN
flagReset C
flagNot affected - Allowed Instructions
Instruction Opcode CC (ADL/non-ADL) CC (.S) CC (.L) ldi $ED, $A8 2F + 1R + 1W + 1 3F + 1R + 1W + 1 3F + 1R + 1W + 1 - Notes
- If all you want to accomplish is
ld (de),(hl)
, considerld a,(hl) \ ld (de),a
. It is the same size but is one clock cycle less and doesn’t modify any of the registers exceptA
.
- If all you want to accomplish is
- See Also
- CPD, LD, LDI, LDDR, LDIR