# `ldd`

[Z80 Documentation](https://asm-editor.specy.app/documentation/z80.md) › [Instructions](https://asm-editor.specy.app/documentation/z80/instruction.md)

Web page: https://asm-editor.specy.app/documentation/z80/instruction/ldd

**Load and decrement**

Category: Block and string

Copies the byte at (HL) to (DE), then decrements HL, DE and BC, setting P/V while BC is not zero.

2 bytes · 16 cycles

## Flags

| Flag | Effect |
| --- | --- |
| S | not changed |
| Z | not changed |
| H | always 0 |
| P/V | changed as the description says |
| N | always 0 |
| C | not changed |

## Forms

- `ldd` · Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then decrements HL, DE, and BC. Resets the parity/overflow flag if BC becomes zero, and sets it otherwise.

## Example

```z80
        .org 0x8000
        ld hl, source + 3
        ld de, 0x9000 + 3
        ld bc, 4
        ldd
        halt
source: .byte 1, 2, 3, 4
```
