There are a few undocumented instructions that performs an action and then copies the result into a register.
For example the official SET 0,(IY+nn)
instruction sets bit 0 on a specific memory address,
however the undocumented SET 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 | 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,(IY+nn)
FDCBnnC7 |
SET A,1,(IY+nn)
FDCBnnCF |
SET A,2,(IY+nn)
FDCBnnD7 |
SET A,3,(IY+nn)
FDCBnnDF |
SET A,4,(IY+nn)
FDCBnnE7 |
SET A,5,(IY+nn)
FDCBnnEF |
SET A,6,(IY+nn)
FDCBnnF7 |
SET A,7,(IY+nn)
FDCBnnFF |
B |
SET B,0,(IY+nn)
FDCBnnC0 |
SET B,1,(IY+nn)
FDCBnnC8 |
SET B,2,(IY+nn)
FDCBnnD0 |
SET B,3,(IY+nn)
FDCBnnD8 |
SET B,4,(IY+nn)
FDCBnnE0 |
SET B,5,(IY+nn)
FDCBnnE8 |
SET B,6,(IY+nn)
FDCBnnF0 |
SET B,7,(IY+nn)
FDCBnnF8 |
C |
SET C,0,(IY+nn)
FDCBnnC1 |
SET C,1,(IY+nn)
FDCBnnC9 |
SET C,2,(IY+nn)
FDCBnnD1 |
SET C,3,(IY+nn)
FDCBnnD9 |
SET C,4,(IY+nn)
FDCBnnE1 |
SET C,5,(IY+nn)
FDCBnnE9 |
SET C,6,(IY+nn)
FDCBnnF1 |
SET C,7,(IY+nn)
FDCBnnF9 |
D |
SET D,0,(IY+nn)
FDCBnnC2 |
SET D,1,(IY+nn)
FDCBnnCA |
SET D,2,(IY+nn)
FDCBnnD2 |
SET D,3,(IY+nn)
FDCBnnDA |
SET D,4,(IY+nn)
FDCBnnE2 |
SET D,5,(IY+nn)
FDCBnnEA |
SET D,6,(IY+nn)
FDCBnnF2 |
SET D,7,(IY+nn)
FDCBnnFA |
E |
SET E,0,(IY+nn)
FDCBnnC3 |
SET E,1,(IY+nn)
FDCBnnCB |
SET E,2,(IY+nn)
FDCBnnD3 |
SET E,3,(IY+nn)
FDCBnnDB |
SET E,4,(IY+nn)
FDCBnnE3 |
SET E,5,(IY+nn)
FDCBnnEB |
SET E,6,(IY+nn)
FDCBnnF3 |
SET E,7,(IY+nn)
FDCBnnFB |
H |
SET H,0,(IY+nn)
FDCBnnC4 |
SET H,1,(IY+nn)
FDCBnnCC |
SET H,2,(IY+nn)
FDCBnnD4 |
SET H,3,(IY+nn)
FDCBnnDC |
SET H,4,(IY+nn)
FDCBnnE4 |
SET H,5,(IY+nn)
FDCBnnEC |
SET H,6,(IY+nn)
FDCBnnF4 |
SET H,7,(IY+nn)
FDCBnnFC |
L |
SET L,0,(IY+nn)
FDCBnnC5 |
SET L,1,(IY+nn)
FDCBnnCD |
SET L,2,(IY+nn)
FDCBnnD5 |
SET L,3,(IY+nn)
FDCBnnDD |
SET L,4,(IY+nn)
FDCBnnE5 |
SET L,5,(IY+nn)
FDCBnnED |
SET L,6,(IY+nn)
FDCBnnF5 |
SET L,7,(IY+nn)
FDCBnnFD |
Instruction
Opcode hex
| Undocumented |