outi

Output and increment

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

2 bytes · 16 cycles

SZHP/VNC ?●??1?
  • ● set from the result
  • 1 always 1
  • ? undefined afterwards

Forms

  • outi

    B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is incremented. Note that the carry flag may be affected, contrary to documentation. Read More

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