By preceding the following instructions with .DB $DD, the operation will use the MSB of the IX register instead of H.
ADD A,H
AND H
CP H
DEC H
INC H
LD reg8,H
LD H,reg8
LD H,imm8
OR H
SBC A,H
SUB H
XOR H
By preceding the following instructions with .DB $DD, the operation will use the LSB of the IX register instead of L.
ADD A,L
AND L
CP L
DEC L
INC L
LD reg8,L
LD L,reg8
LD L,imm8
OR L
SBC A,L
SUB L
XOR L
By preceding the following instructions with .DB $FD, the operation will use the MSB of the IY register instead of H.
ADD A,H
AND H
CP H
DEC H
INC H
LD reg8,H
LD H,reg8
LD H,imm8
OR H
SBC A,H
SUB H
XOR H
By preceding the following instructions with .DB $FD, the operation will use the LSB of the IY register instead of L.
ADD A,L
AND L
CP L
DEC L
INC L
LD reg8,L
LD L,reg8
LD L,imm8
OR L
SBC A,L
SUB L
XOR L
IN (C)
Operation | Inputs a byte from port C and affects flags only. |
---|---|
Op Code | 11101101 : 01110000 |
Flags | S Z are affected as defined H N are reset P/V is parity C is not affected |
T States | 12 |
OUT (C),0
Operation | Outputs a zero to port C. |
---|---|
Op Code | 11101101 : 01110001 |
T States | 12 |
SLL reg8
Operation | The contents of reg8 are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Op Code | 11001011 : 00110[reg8]
|
||||||||||||||||||
Flags | S Z are affected as defined H N are reset P/V is parity See instruction for C |
||||||||||||||||||
T States | 8 or 15 (HL) |
SLL (regindex + ofs8)
Operation | The contents of the memory location pointed to by regindex plus ofs8 are shifted left one bit position. The contents of bit 7 are put into the carry and a one is put into bit 0. | ||||||
---|---|---|---|---|---|---|---|
Op Code | [regindex] : 11001011 : [ofs8] : 00110110
|
||||||
Flags | S Z are affected as defined H N are reset P/V is parity See instruction for C |
||||||
T States | 23 |
Each autocopy instruction performs an operation on a byte in memory referenced by an index register. After this operation is done, the result is then copied to an 8-bit register. Even if the byte is read-only, the register still holds the modified result.
RL reg8,(regindex + ofs8) RLC reg8,(regindex + ofs8) RR reg8,(regindex + ofs8) RRC reg8,(regindex + ofs8) SLA reg8,(regindex + ofs8) SLL reg8,(regindex + ofs8) SRA reg8,(regindex + ofs8) SRL reg8,(regindex + ofs8) RES reg8,imm3,(regindex + ofs8) SET reg8,imm3,(regindex + ofs8)The opcodes for the autocopy instruction are built as follows:
Register | Bit Field |
---|---|
A | 111 |
B | 000 |
C | 001 |
D | 010 |
E | 011 |
H | 100 |
L | 101 |
(regindex) (no autocopy) |
110 |
The following opcodes mimic certain instructions. There could be some SMC potential
here.
I really should point out, that some of these opcodes might be labelled wrong. My
advice would be to stay the hell away from all of these.
This opcode mimics LD HL,(imm16)
11101101 : 01100011 : [immLSB] : [immMSB]This opcode mimics LD (imm16),HL
11101101 : 01101011 : [immLSB] : [immMSB]These opcodes mimic NEG (first opcode byte is always $ED).
$4C $54 $5C $64 $6C $74 $7CThese opcodes mimic RETN (first opcode byte is always $ED).
$55 $5D $65 $6D $75 $7DThese opcodes mimic NOP (first opcode byte is always $ED):
$00-$3F $80-$9F $A4-$A7 $AC-$AF $B4-$B7 $BC-$BF $C0-$FF $4E $66 $6E $76 $77 $7E $7F