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

Return to the regular view of this page.

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

Undocumented SET 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 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)\)

76543210
11111101DD
11001011CB
d
11br
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
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
Opcode Matrix Legend
Instruction Opcode hex
 Undocumented