outd

Output and decrement

Decrements B, writes the byte at (HL) to the port addressed by BC, then decrements HL.

2 bytes16 cycles

SZHP/VNC ?●????
  • ● depends on the result
  • ? undefined (do not rely on it)

Forms

  • outd

    Decrements B and writes the value pointed to by HL to the port whose 16-bit address is in BC. Then decrements HL. Sets the zero flag if B becomes zero, and resets it otherwise.

        .org 0x8000
        ld hl, source + 1
        ld b, 2
        ld c, 1
        outd
        halt
source: .byte 42, 7