ind

Input and decrement

Reads a byte from the port addressed by BC into (HL), then decrements HL and B.

2 bytes · 16 cycles

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

Forms

  • ind

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

        .org 0x8000
        ld hl, 0x9000
        ld b, 2
        ld c, 0xF0
        ind
        halt