There are a few undocumented instructions that performs an action and then copies the result into a register.
For example the official RES 0,(IY+nn)
instruction resets bit 0 on a specific memory address,
however the undocumented RES B,0,(IY+nn)
0xFDCBnn00 instruction does the same thing but then
copies the result into the B register.
\((IY+d)_b \longleftarrow 0 \\ r \longleftarrow (IY+d)\)
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | FD |
1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | CB |
d | ||||||||
1 | 0 | b | r |
Register | r |
---|---|
B | 000 |
C | 001 |
D | 010 |
E | 011 |
H | 100 |
L | 101 |
A | 111 |
Value | b | |
---|---|---|
0 | 000 | |
1 | 001 | |
2 | 010 | |
3 | 011 | |
4 | 100 | |
5 | 101 | |
6 | 110 | |
7 | 111 |
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 0 | BIT 1 | BIT 2 | BIT 3 | BIT 4 | BIT 5 | BIT 6 | BIT 7 | |
---|---|---|---|---|---|---|---|---|
A |
RES A,0,(IY+nn)
FDCBnn87 |
RES A,1,(IY+nn)
FDCBnn8F |
RES A,2,(IY+nn)
FDCBnn97 |
RES A,3,(IY+nn)
FDCBnn9F |
RES A,4,(IY+nn)
FDCBnnA7 |
RES A,5,(IY+nn)
FDCBnnAF |
RES A,6,(IY+nn)
FDCBnnB7 |
RES A,7,(IY+nn)
FDCBnnBF |
B |
RES B,0,(IY+nn)
FDCBnn80 |
RES B,1,(IY+nn)
FDCBnn88 |
RES B,2,(IY+nn)
FDCBnn90 |
RES B,3,(IY+nn)
FDCBnn98 |
RES B,4,(IY+nn)
FDCBnnA0 |
RES B,5,(IY+nn)
FDCBnnA8 |
RES B,6,(IY+nn)
FDCBnnB0 |
RES B,7,(IY+nn)
FDCBnnB8 |
C |
RES C,0,(IY+nn)
FDCBnn81 |
RES C,1,(IY+nn)
FDCBnn89 |
RES C,2,(IY+nn)
FDCBnn91 |
RES C,3,(IY+nn)
FDCBnn99 |
RES C,4,(IY+nn)
FDCBnnA1 |
RES C,5,(IY+nn)
FDCBnnA9 |
RES C,6,(IY+nn)
FDCBnnB1 |
RES C,7,(IY+nn)
FDCBnnB9 |
D |
RES D,0,(IY+nn)
FDCBnn82 |
RES D,1,(IY+nn)
FDCBnn8A |
RES D,2,(IY+nn)
FDCBnn92 |
RES D,3,(IY+nn)
FDCBnn9A |
RES D,4,(IY+nn)
FDCBnnA2 |
RES D,5,(IY+nn)
FDCBnnAA |
RES D,6,(IY+nn)
FDCBnnB2 |
RES D,7,(IY+nn)
FDCBnnBA |
E |
RES E,0,(IY+nn)
FDCBnn83 |
RES E,1,(IY+nn)
FDCBnn8B |
RES E,2,(IY+nn)
FDCBnn93 |
RES E,3,(IY+nn)
FDCBnn9B |
RES E,4,(IY+nn)
FDCBnnA3 |
RES E,5,(IY+nn)
FDCBnnAB |
RES E,6,(IY+nn)
FDCBnnB3 |
RES E,7,(IY+nn)
FDCBnnBB |
H |
RES H,0,(IY+nn)
FDCBnn84 |
RES H,1,(IY+nn)
FDCBnn8C |
RES H,2,(IY+nn)
FDCBnn94 |
RES H,3,(IY+nn)
FDCBnn9C |
RES H,4,(IY+nn)
FDCBnnA4 |
RES H,5,(IY+nn)
FDCBnnAC |
RES H,6,(IY+nn)
FDCBnnB4 |
RES H,7,(IY+nn)
FDCBnnBC |
L |
RES L,0,(IY+nn)
FDCBnn85 |
RES L,1,(IY+nn)
FDCBnn8D |
RES L,2,(IY+nn)
FDCBnn95 |
RES L,3,(IY+nn)
FDCBnn9D |
RES L,4,(IY+nn)
FDCBnnA5 |
RES L,5,(IY+nn)
FDCBnnAD |
RES L,6,(IY+nn)
FDCBnnB5 |
RES L,7,(IY+nn)
FDCBnnBD |
Instruction
Opcode hex
| Undocumented |