There are a few undocumented instructions that performs an action and then copies the result into a register.
For example the official SET 0,(IX+nn)
instruction sets bit 0 on a specific memory address,
however the undocumented SET 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)\)
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | DD |
1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | CB |
d | ||||||||
1 | 1 | 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 |
SET A,0,(IX+nn)
DDCBnnC7 |
SET A,1,(IX+nn)
DDCBnnCF |
SET A,2,(IX+nn)
DDCBnnD7 |
SET A,3,(IX+nn)
DDCBnnDF |
SET A,4,(IX+nn)
DDCBnnE7 |
SET A,5,(IX+nn)
DDCBnnEF |
SET A,6,(IX+nn)
DDCBnnF7 |
SET A,7,(IX+nn)
DDCBnnFF |
B |
SET B,0,(IX+nn)
DDCBnnC0 |
SET B,1,(IX+nn)
DDCBnnC8 |
SET B,2,(IX+nn)
DDCBnnD0 |
SET B,3,(IX+nn)
DDCBnnD8 |
SET B,4,(IX+nn)
DDCBnnE0 |
SET B,5,(IX+nn)
DDCBnnE8 |
SET B,6,(IX+nn)
DDCBnnF0 |
SET B,7,(IX+nn)
DDCBnnF8 |
C |
SET C,0,(IX+nn)
DDCBnnC1 |
SET C,1,(IX+nn)
DDCBnnC9 |
SET C,2,(IX+nn)
DDCBnnD1 |
SET C,3,(IX+nn)
DDCBnnD9 |
SET C,4,(IX+nn)
DDCBnnE1 |
SET C,5,(IX+nn)
DDCBnnE9 |
SET C,6,(IX+nn)
DDCBnnF1 |
SET C,7,(IX+nn)
DDCBnnF9 |
D |
SET D,0,(IX+nn)
DDCBnnC2 |
SET D,1,(IX+nn)
DDCBnnCA |
SET D,2,(IX+nn)
DDCBnnD2 |
SET D,3,(IX+nn)
DDCBnnDA |
SET D,4,(IX+nn)
DDCBnnE2 |
SET D,5,(IX+nn)
DDCBnnEA |
SET D,6,(IX+nn)
DDCBnnF2 |
SET D,7,(IX+nn)
DDCBnnFA |
E |
SET E,0,(IX+nn)
DDCBnnC3 |
SET E,1,(IX+nn)
DDCBnnCB |
SET E,2,(IX+nn)
DDCBnnD3 |
SET E,3,(IX+nn)
DDCBnnDB |
SET E,4,(IX+nn)
DDCBnnE3 |
SET E,5,(IX+nn)
DDCBnnEB |
SET E,6,(IX+nn)
DDCBnnF3 |
SET E,7,(IX+nn)
DDCBnnFB |
H |
SET H,0,(IX+nn)
DDCBnnC4 |
SET H,1,(IX+nn)
DDCBnnCC |
SET H,2,(IX+nn)
DDCBnnD4 |
SET H,3,(IX+nn)
DDCBnnDC |
SET H,4,(IX+nn)
DDCBnnE4 |
SET H,5,(IX+nn)
DDCBnnEC |
SET H,6,(IX+nn)
DDCBnnF4 |
SET H,7,(IX+nn)
DDCBnnFC |
L |
SET L,0,(IX+nn)
DDCBnnC5 |
SET L,1,(IX+nn)
DDCBnnCD |
SET L,2,(IX+nn)
DDCBnnD5 |
SET L,3,(IX+nn)
DDCBnnDD |
SET L,4,(IX+nn)
DDCBnnE5 |
SET L,5,(IX+nn)
DDCBnnED |
SET L,6,(IX+nn)
DDCBnnF5 |
SET L,7,(IX+nn)
DDCBnnFD |
Instruction
Opcode hex
| Undocumented |