res

Reset bit

Clears one bit of a register or memory byte to zero, leaving the other bits unchanged.

SZHP/VNC ––––––
  • Changes no flag

Forms

  • Resets bit b of r.

  • Resets bit b of (HL).

  • Resets bit b of the memory location pointed to by IX plus dd.

Undocumented 1 row

Left out of Zilog's manual, but the Z80 runs them, and so does this emulator.

  • Resets bit b of the memory location pointed to by IX plus dd. The result is then stored in r.

Operands

b
A bit number from 0 to 7, where bit 0 is the least significant bit.
r
An 8-bit register: a, b, c, d, e, h or l.
(hl)
The byte in memory at the address stored in hl. More
(ix+dd)
The byte in memory at ix + dd, where dd is a signed displacement from -128 to 127, for example (ix+5) or (ix-3). (iy+dd) works the same way. More
        .org 0x8000
        ld b, 3
        res 0, b
        halt