This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

RES Reset bit in (IX+d) and copy into register r

Undocumented Reset bit in (IX+d) and copy into register r

Table of Contents

There are a few undocumented instructions that performs an action and then copies the result into a register.

For example the official RES 0,(IX+nn) instruction resets bit 0 on a specific memory address, however the undocumented RES B,0,(IX+nn)0xDDCBnn00 instruction does the same thing but then copies the result into the B register.

\((IX+d)_b \longleftarrow 0 \\ r \longleftarrow (IX+d)\)

76543210
11011101DD
11001011CB
d
10br
Registers
Registerr
B000
C001
D010
E011
H100
L101
A111
Bits
Valueb
0000
1001
2010
3011
4100
5101
6110
7111

Z is set if the specified bit in the source is 0, otherwise it is cleared.

The result is stored both in memory and the specified register.

r=%110 does exist, it is the official documented operation with no auto-copy to a register.

Opcode Matrix
BIT 0BIT 1BIT 2BIT 3BIT 4BIT 5BIT 6BIT 7
A
RES A,0,(IX+nn)
DDCBnn87
RES A,1,(IX+nn)
DDCBnn8F
RES A,2,(IX+nn)
DDCBnn97
RES A,3,(IX+nn)
DDCBnn9F
RES A,4,(IX+nn)
DDCBnnA7
RES A,5,(IX+nn)
DDCBnnAF
RES A,6,(IX+nn)
DDCBnnB7
RES A,7,(IX+nn)
DDCBnnBF
B
RES B,0,(IX+nn)
DDCBnn80
RES B,1,(IX+nn)
DDCBnn88
RES B,2,(IX+nn)
DDCBnn90
RES B,3,(IX+nn)
DDCBnn98
RES B,4,(IX+nn)
DDCBnnA0
RES B,5,(IX+nn)
DDCBnnA8
RES B,6,(IX+nn)
DDCBnnB0
RES B,7,(IX+nn)
DDCBnnB8
C
RES C,0,(IX+nn)
DDCBnn81
RES C,1,(IX+nn)
DDCBnn89
RES C,2,(IX+nn)
DDCBnn91
RES C,3,(IX+nn)
DDCBnn99
RES C,4,(IX+nn)
DDCBnnA1
RES C,5,(IX+nn)
DDCBnnA9
RES C,6,(IX+nn)
DDCBnnB1
RES C,7,(IX+nn)
DDCBnnB9
D
RES D,0,(IX+nn)
DDCBnn82
RES D,1,(IX+nn)
DDCBnn8A
RES D,2,(IX+nn)
DDCBnn92
RES D,3,(IX+nn)
DDCBnn9A
RES D,4,(IX+nn)
DDCBnnA2
RES D,5,(IX+nn)
DDCBnnAA
RES D,6,(IX+nn)
DDCBnnB2
RES D,7,(IX+nn)
DDCBnnBA
E
RES E,0,(IX+nn)
DDCBnn83
RES E,1,(IX+nn)
DDCBnn8B
RES E,2,(IX+nn)
DDCBnn93
RES E,3,(IX+nn)
DDCBnn9B
RES E,4,(IX+nn)
DDCBnnA3
RES E,5,(IX+nn)
DDCBnnAB
RES E,6,(IX+nn)
DDCBnnB3
RES E,7,(IX+nn)
DDCBnnBB
H
RES H,0,(IX+nn)
DDCBnn84
RES H,1,(IX+nn)
DDCBnn8C
RES H,2,(IX+nn)
DDCBnn94
RES H,3,(IX+nn)
DDCBnn9C
RES H,4,(IX+nn)
DDCBnnA4
RES H,5,(IX+nn)
DDCBnnAC
RES H,6,(IX+nn)
DDCBnnB4
RES H,7,(IX+nn)
DDCBnnBC
L
RES L,0,(IX+nn)
DDCBnn85
RES L,1,(IX+nn)
DDCBnn8D
RES L,2,(IX+nn)
DDCBnn95
RES L,3,(IX+nn)
DDCBnn9D
RES L,4,(IX+nn)
DDCBnnA5
RES L,5,(IX+nn)
DDCBnnAD
RES L,6,(IX+nn)
DDCBnnB5
RES L,7,(IX+nn)
DDCBnnBD
Opcode Matrix Legend
Instruction Opcode hex
 Undocumented