;TODO: hier kommt die Interruptbehandlung rein
- cpse intstat,_0 ;fast path if no trace, int, break, ...
+ cpse intstat,_0 ;Fast path if no trace, int, break, ...
rjmp int_test
int_instr:
mov z_pch,_0
int_nobreak:
- rjmp int_instr ;continue with normal instruction interpretation
+ rjmp int_instr ;Continue with normal instruction interpretation
;--------------------------------------------------
;
do_op_ina: ; in a,(opl)
.if PORT_DEBUG
+ push opl
+ cp opl,_0 ; don't debug port 0 (con stat)
+ breq dbg_op_ina_1
printnewline
printstring "Port read: ("
mov temp,opl
lcall printhex
printstring ") -> "
+dbg_op_ina_1:
.endif
mov temp2,opl
mov z_a,temp
.if PORT_DEBUG
+ pop temp
+ cp temp,_0
+ breq dbg_op_ina_2
lcall printhex
printstring " "
+dbg_op_ina_2:
.endif
ret
#if EM_Z80
-op_da_sub: ;else (sub-op)
+op_da_sub: ;Else (sub-op)
ldi temp2,(1<<ZFL_N) ; new C, H and N flag
sbrc z_flags,ZFL_H ; |
rjmp op_da_s01 ; if (H flag ...
#if EM_Z80
-op_da_sub: ;else (sub-op)
+op_da_sub: ;Else (sub-op)
ldi temp2,(1<<ZFL_N) ; new C, H and N flag
mov temp,opl ; |
andi temp,0x0f ; |
sub opl,oph
ldpmx z_flags, sz53p_tab, opl ; get S,Z,P flag
or z_flags,temp2 ; merge new C and H flag
- ret ;endif
+ ret ;Endif
#endif /* EM_Z80 */
#endif /* alternatives */
instr fetch_nop, op_nop, store_MBC ;02 ;LD (BC),A
instr fetch_BC, op_INC16, store_BC ;03 ;INC BC
instr fetch_B, op_INC, store_B ;04 ;INC B
-instr fetch_B, op_DEC, store_B ;05 ;DEC B
+instr fetch_B, op_DEC, store_B ;05 ;DEC B
instr fetch_DIR8, op_nop, store_B ;06 ;LD B,n
instr fetch_nop, op_RLCA, store_nop ;07 ;RLCA
-instr fetch_nop, op_EXAF, store_nop ;08 ;EX AF,AF'
+instr fetch_nop, op_EXAF, store_nop ;08 ;EX AF,AF'
instr fetch_BC, op_ADDHL, store_nop ;09 ;ADD HL,BC
instr fetch_MBC, op_nop, store_nop ;0A ;LD A,(BC)
instr fetch_BC, op_DEC16, store_BC ;0B ;DEC BC
instr fetch_nop, op_nop, store_MDE ;12 ;LD (DE),A
instr fetch_DE, op_INC16, store_DE ;13 ;INC DE
instr fetch_D, op_INC, store_D ;14 ;INC D
-instr fetch_D, op_DEC, store_D ;15 ;DEC D
+instr fetch_D, op_DEC, store_D ;15 ;DEC D
instr fetch_DIR8, op_nop, store_D ;16 nn ;LD D,n
instr fetch_nop, op_RLA, store_nop ;17 ;RLA
instr fetch_DIR8, op_nop, store_pcrel ;18 oo ;JR o
instr fetch_DE, op_ADDHL, store_nop ;19 ;ADD HL,DE
instr fetch_MDE, op_nop, store_nop ;1A ;LD A,(DE)
-instr fetch_DE, op_DEC16, store_DE ;1B ;DEC DE
+instr fetch_DE, op_DEC16, store_DE ;1B ;DEC DE
instr fetch_E, op_INC, store_E ;1C ;INC E
-instr fetch_E, op_DEC, store_E ;1D ;DEC E
+instr fetch_E, op_DEC, store_E ;1D ;DEC E
instr fetch_DIR8, op_nop, store_E ;1E nn ;LD E,n
instr fetch_nop, op_RRA, store_nop ;1F ;RRA
instr fetch_DIR8, op_IFNZ, store_pcrel ;20 oo ;JR NZ,o
instr fetch_DIR16, op_nop, store_HL ;21 nn nn ;LD HL,nn
instr fetch_DIR16, op_STHL, store_nop ;22 nn nn ;LD (nn),HL
instr fetch_HL, op_INC16, store_HL ;23 ;INC HL
-instr fetch_H, op_INC, store_H ;24 ;INC H
-instr fetch_H, op_DEC, store_H ;25 ;DEC H
-instr fetch_DIR8, op_nop, store_H ;26 nn ;LD H,n
-instr fetch_A, op_DAA, store_A ;27 ;DAA
+instr fetch_H, op_INC, store_H ;24 ;INC H
+instr fetch_H, op_DEC, store_H ;25 ;DEC H
+instr fetch_DIR8, op_nop, store_H ;26 nn ;LD H,n
+instr fetch_A, op_DAA, store_A ;27 ;DAA
instr fetch_DIR8, op_IFZ, store_pcrel ;28 oo ;JR Z,o
instr fetch_HL, op_ADDHL, store_nop ;29 ;ADD HL,HL
instr fetch_DIR16, op_RMEM16, store_HL ;2A nn nn ;LD HL,(nn)
-instr fetch_HL, op_DEC16, store_HL ;2B ;DEC HL
-instr fetch_L, op_INC, store_L ;2C ;INC L
-instr fetch_L, op_DEC, store_L ;2D ;DEC L
-instr fetch_DIR8, op_nop, store_L ;2E nn ;LD L,n
-instr fetch_nop, op_CPL, store_nop ;2F ;CPL
+instr fetch_HL, op_DEC16, store_HL ;2B ;DEC HL
+instr fetch_L, op_INC, store_L ;2C ;INC L
+instr fetch_L, op_DEC, store_L ;2D ;DEC L
+instr fetch_DIR8, op_nop, store_L ;2E nn ;LD L,n
+instr fetch_nop, op_CPL, store_nop ;2F ;CPL
instr fetch_DIR8, op_IFNC, store_pcrel ;30 oo ;JR NC,o
instr fetch_DIR16, op_nop, store_SP ;31 nn nn ;LD SP,nn
instr fetch_DIR16, op_nop, store_AM ;32 nn nn ;LD (nn),A
instr fetch_SP, op_INC16, store_SP ;33 ;INC SP
instr fetch_MHL, op_INC, store_MHL ;34 ;INC (HL)
-instr fetch_MHL, op_DEC, store_MHL ;35 ;DEC (HL)
+instr fetch_MHL, op_DEC, store_MHL ;35 ;DEC (HL)
instr fetch_DIR8, op_nop, store_MHL ;36 nn ;LD (HL),n
instr fetch_nop, op_SCF, store_nop ;37 ;SCF
instr fetch_DIR8, op_IFC, store_pcrel ;38 oo ;JR C,o
instr fetch_SP, op_ADDHL, store_nop ;39 ;ADD HL,SP
-instr fetch_DIR16, op_RMEM8, store_A ;3A nn nn ;LD A,(nn)
-instr fetch_SP, op_DEC16, store_SP ;3B ;DEC SP
+instr fetch_DIR16, op_RMEM8, store_A ;3A nn nn ;LD A,(nn)
+instr fetch_SP, op_DEC16, store_SP ;3B ;DEC SP
instr fetch_nop, op_INCA, store_nop ;3C ;INC A
-instr fetch_nop, op_DECA, store_nop ;3D ;DEC A
-instr fetch_DIR8, op_nop, store_A ;3E nn ;LD A,n
-instr fetch_nop, op_CCF, store_nop ;3F ;CCF (Complement Carry Flag, gvd)
+instr fetch_nop, op_DECA, store_nop ;3D ;DEC A
+instr fetch_DIR8, op_nop, store_A ;3E nn ;LD A,n
+instr fetch_nop, op_CCF, store_nop ;3F ;CCF (Complement Carry Flag, gvd)
instr fetch_nop, op_nop, store_nop ;40 ;LD B,B
instr fetch_C, op_nop, store_B ;41 ;LD B,C
instr fetch_D, op_nop, store_B ;42 ;LD B,D
instr fetch_L, op_ORA, store_nop ;B5 ;OR A,L
instr fetch_MHL, op_ORA, store_nop ;B6 ;OR A,(HL)
instr fetch_A, op_ORA, store_nop ;B7 ;OR A,A
-instr fetch_B, op_CPFA, store_nop ;B8 ;CP A,B
-instr fetch_C, op_CPFA, store_nop ;B9 ;CP A,C
-instr fetch_D, op_CPFA, store_nop ;BA ;CP A,D
-instr fetch_E, op_CPFA, store_nop ;BB ;CP A,E
-instr fetch_H, op_CPFA, store_nop ;BC ;CP A,H
-instr fetch_L, op_CPFA, store_nop ;BD ;CP A,L
-instr fetch_MHL, op_CPFA, store_nop ;BE ;CP A,(HL)
-instr fetch_A, op_CPFA, store_nop ;BF ;CP A,A
+instr fetch_B, op_CPFA, store_nop ;B8 ;CP A,B
+instr fetch_C, op_CPFA, store_nop ;B9 ;CP A,C
+instr fetch_D, op_CPFA, store_nop ;BA ;CP A,D
+instr fetch_E, op_CPFA, store_nop ;BB ;CP A,E
+instr fetch_H, op_CPFA, store_nop ;BC ;CP A,H
+instr fetch_L, op_CPFA, store_nop ;BD ;CP A,L
+instr fetch_MHL, op_CPFA, store_nop ;BE ;CP A,(HL)
+instr fetch_A, op_CPFA, store_nop ;BF ;CP A,A
instr fetch_nop, op_IFNZ, store_RET ;C0 ;RET NZ
instr fetch_nop, op_POP16, store_BC ;C1 ;POP BC
instr fetch_DIR16, op_IFNZ, store_PC ;C2 nn nn ;JP NZ,nn
instr fetch_DIR8, op_SUBFA, store_nop ;D6 nn ;SUB n
instr fetch_RST, op_nop, store_CALL ;D7 ;RST 10H
instr fetch_nop, op_IFC, store_RET ;D8 ;RET C
-instr fetch_nop, op_EXX, store_nop ;D9 ;EXX
+instr fetch_nop, op_EXX, store_nop ;D9 ;EXX
instr fetch_DIR16, op_IFC, store_PC ;DA nn nn ;JP C,nn
instr fetch_DIR8, op_INA, store_nop ;DB nn ;IN A,(n)
instr fetch_DIR16, op_IFC, store_CALL ;DC nn nn ;CALL C,nn
instr fetch_nop, op_IFPO, store_RET ;E0 ;RET PO
instr fetch_nop, op_POP16, store_HL ;E1 ;POP HL
instr fetch_DIR16, op_IFPO, store_PC ;E2 nn nn ;JP PO,nn
-instr fetch_MSP, op_EXHL, store_MSP ;E3 ;EX (SP),HL
+instr fetch_MSP, op_EXHL, store_MSP ;E3 ;EX (SP),HL
instr fetch_DIR16, op_IFPO, store_CALL ;E4 nn nn ;CALL PO,nn
instr fetch_HL, op_PUSH16, store_nop ;E5 ;PUSH HL
instr fetch_DIR8, op_ANDA, store_nop ;E6 nn ;AND n
instr fetch_nop, op_IFPE, store_RET ;E8 ;RET PE
instr fetch_HL, op_nop, store_PC ;E9 ;JP HL
instr fetch_DIR16, op_IFPE, store_PC ;EA nn nn ;JP PE,nn
-instr fetch_DE, op_EXHL, store_DE ;EB ;EX DE,HL
+instr fetch_DE, op_EXHL, store_DE ;EB ;EX DE,HL
instr fetch_DIR16, op_IFPE, store_CALL ;EC nn nn ;CALL PE,nn
instr fetch_nop, op_prefixED, store_nop ;ED ;(ED opcode prefix)
instr fetch_DIR8, op_XORA, store_nop ;EE nn ;XOR n
instr fetch_nop, op_IFP, store_RET ;F0 ;RET P
instr fetch_nop, op_POP16, store_AF ;F1 ;POP AF
instr fetch_DIR16, op_IFP, store_PC ;F2 nn nn ;JP P,nn
-instr fetch_nop, op_DI, store_nop ;F3 ;DI
+instr fetch_nop, op_DI, store_nop ;F3 ;DI
instr fetch_DIR16, op_IFP, store_CALL ;F4 nn nn ;CALL P,nn
instr fetch_AF, op_PUSH16, store_nop ;F5 ;PUSH AF
instr fetch_DIR8, op_ORA, store_nop ;F6 nn ;OR n
instr fetch_nop, op_IFM, store_RET ;F8 ;RET M
instr fetch_HL, op_nop, store_SP ;F9 ;LD SP,HL
instr fetch_DIR16, op_IFM, store_PC ;FA nn nn ;JP M,nn
-instr fetch_nop, op_EI, store_nop ;FB ;EI
+instr fetch_nop, op_EI, store_nop ;FB ;EI
instr fetch_DIR16, op_IFM, store_CALL ;FC nn nn ;CALL M,nn
instr fetch_nop, op_prefixFD, store_nop ;FD ;(FD opcode prefix)
-instr fetch_DIR8, op_CPFA, store_nop ;FE nn ;CP n
+instr fetch_DIR8, op_CPFA, store_nop ;FE nn ;CP n
instr fetch_RST, op_nop, store_CALL ;FF ;RST 38H
do_op_in: ; in opl,(opl)
.if PORT_DEBUG
+ push opl
+ cp opl,_0 ; don't debug port 0 (con stat)
+ breq dbg_op_in_1
printnewline
printstring "Port read: ("
mov temp,opl
- rcall printhex
+ lcall printhex
printstring ") -> "
+dbg_op_in_1:
.endif
mov temp2,opl
bld z_flags,ZFL_C
.if PORT_DEBUG
- rcall printhex
+ pop temp
+ cp temp,_0
+ breq dbg_op_in_2
+ lcall printhex
printstring " "
+dbg_op_in_2:
.endif
ret
op_LDxx_common:
ldd zh,y+oz_h ;H
ldd zl,y+oz_l ;L
- ldd xh,y+oz_d ;D
- ldd xl,y+oz_e ;E
- ldd oph,y+oz_b ;B
- ldd opl,y+oz_c ;C
+ ldd xh,y+oz_d ;D
+ ldd xl,y+oz_e ;E
+ ldd oph,y+oz_b ;B
+ ldd opl,y+oz_c ;C
mem_read_ds temp, z
mem_write_ds x, temp
cbr z_flags,(1<<ZFL_H) | (1<<ZFL_P) | (1<<ZFL_N)
sbci oph,0
breq PC+2
sbr z_flags,(1<<ZFL_P)
- std y+oz_c,opl ;C
- std y+oz_b,oph ;B
+ std y+oz_c,opl ;C
+ std y+oz_b,oph ;B
ret
do_op_LDI:
rcall op_LDxx_common
adiw z,1
adiw x,1
- std y+oz_e,xl ;E
- std y+oz_d,xh ;D
+ std y+oz_e,xl ;E
+ std y+oz_d,xh ;D
std y+oz_l,zl ;L
std y+oz_h,zh ;H
ret
rcall op_LDxx_common
sbiw z,1
sbiw x,1
- std y+oz_e,xl ;E
- std y+oz_d,xh ;D
+ std y+oz_e,xl ;E
+ std y+oz_d,xh ;D
std y+oz_l,zl ;L
std y+oz_h,zh ;H
ret
op_INxx_common:
cbr z_flags,(1<<ZFL_Z)
sbr z_flags,(1<<ZFL_N)
- ldd temp2,y+oz_c ;C
+ ldd temp2,y+oz_c ;C
lcall portRead
ldd xh,y+oz_h ;H
ldd xl,y+oz_l ;L
lcall dram_write
- ldd temp,y+oz_b ;B
+ ldd temp,y+oz_b ;B
dec temp
- std y+oz_b,temp ;B
+ std y+oz_b,temp ;B
brne PC+2
sbr z_flags,(1<<ZFL_Z)
ret
cbr z_flags,(1<<ZFL_Z)
sbr z_flags,(1<<ZFL_N)
lcall dram_read ;temp = (z)
- ldd temp2,y+oz_c ;C
+ ldd temp2,y+oz_c ;C
lcall portWrite
- ldd temp,y+oz_b ;B
+ ldd temp,y+oz_b ;B
dec temp
- std y+oz_b,temp ;B
+ std y+oz_b,temp ;B
brne PC+2
sbr z_flags,(1<<ZFL_Z)
ret
ret
-;----------------------------------------------------------------
-;|Mnemonic |SZHPNC|Description |Notes |
-;----------------------------------------------------------------
-;|RLC m |**0P0*|Rotate Left Circular |m=m<- |
-;|RRC m |**0P0*|Rotate Right Circular|m=->m |
-;|RL m |**0P0*|Rotate Left |m={CY,m}<- |
-;|RR m |**0P0*|Rotate Right |m=->{CY,m} |
-;|SLA m |**0P0*|Shift Left Arithmetic|m=m*2 |
-;|SRA m |**0P0*|Shift Right Arith. |m=m/2 |
-;|SLL m |**0P0*|Shift Right Logical |
-;|SRL m |**0P0*|Shift Right Logical |m=->{0,m,CY} |
-
-
-do_op_rlc:
- ;Rotate Left Cyclical. All bits move 1 to the
- ;left, the msb becomes c and lsb.
- clr temp
- lsl opl
- adc temp,_0
- or opl,temp
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- or z_flags,temp
- ret
-
-do_op_rrc:
- ;Rotate Right Cyclical. All bits move 1 to the
- ;right, the lsb becomes c and msb.
- lsr opl
- brcc PC+2
- ori opl,0x80
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- bmov z_flags,ZFL_C, opl,7
- ret
-
-
-do_op_rl:
- ;Rotate Left. All bits move 1 to the left, the msb
- ;becomes c, c becomes lsb.
- clc
- sbrc z_flags,ZFL_C
- sec
- rol opl
- in temp,sreg
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- bmov z_flags,ZFL_C, temp,AVR_C
- ret
-
-
-do_op_rr:
- ;Rotate Right. All bits move 1 to the right, the lsb
- ;becomes c, c becomes msb.
-
- ror opl
- in temp,sreg ;CY
- bmov opl,7, z_flags,ZFL_C ;old CY --> Bit 7
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- bmov z_flags,ZFL_C, temp,AVR_C ;
- ret
-
-do_op_sla:
- lsl opl
- in temp,sreg
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- bmov z_flags,ZFL_C, temp,AVR_C ;
- ret
-
-do_op_sra:
- lsr opl
- in temp,sreg
- bmov opl,7, opl,6 ;old CY --> Bit 7
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- bmov z_flags,ZFL_C, temp,AVR_C ;
- ret
-
-do_op_sll:
- sec
- rol opl
- in temp,sreg
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- bmov z_flags,ZFL_C, temp,AVR_C ;
- ret
-
-do_op_srl:
- lsr opl
- in temp,sreg
- ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
- bmov z_flags,ZFL_C, temp,AVR_C ;
- ret
-
-;----------------------------------------------------------------
-;|Mnemonic |SZHPNC|Description |Notes |
-;----------------------------------------------------------------
-;|BIT b,m |?*1?0-|Test Bit |m&{2^b} |
-;|RES b,m |------|Reset bit |m=m&{~2^b} |
-;|SET b,m |------|Set bit |m=mv{2^b} |
-
-
-do_op_BIT7:
- ldi temp,0x80
- rjmp opbit
-do_op_BIT6:
- ldi temp,0x40
- rjmp opbit
-do_op_BIT5:
- ldi temp,0x20
- rjmp opbit
-do_op_BIT4:
- ldi temp,0x10
- rjmp opbit
-do_op_BIT3:
- ldi temp,0x08
- rjmp opbit
-do_op_BIT2:
- ldi temp,0x04
- rjmp opbit
-do_op_BIT1:
- ldi temp,0x02
- rjmp opbit
-do_op_BIT0:
- ldi temp,0x01
-opbit:
- and temp,opl
- in temp,sreg
- ori z_flags,(1<<ZFL_H)
- andi z_flags,~(1<<ZFL_N)
- bmov z_flags,ZFL_Z, temp,AVR_Z
- ret
-
-
-.macro m_do_op_RES7
- andi opl,~0x80
-.endm
-.equ do_op_RES7 = 0
-; andi opl,~0x80
-; ret
-
-.macro m_do_op_RES6
- andi opl,~0x40
-.endm
-.equ do_op_RES6 = 0
-; andi opl,~0x40
-; ret
-
-.macro m_do_op_RES5
- andi opl,~0x20
-.endm
-.equ do_op_RES5 = 0
-; andi opl,~0x20
-; ret
-
-.macro m_do_op_RES4
- andi opl,~0x10
-.endm
-.equ do_op_RES4 = 0
-; andi opl,~0x10
-; ret
-
-.macro m_do_op_RES3
- andi opl,~0x08
-.endm
-.equ do_op_RES3 = 0
-; andi opl,~0x08
-; ret
-
-.macro m_do_op_RES2
- andi opl,~0x04
-.endm
-.equ do_op_RES2 = 0
-; andi opl,~0x04
-; ret
-
-.macro m_do_op_RES1
- andi opl,~0x02
-.endm
-.equ do_op_RES1 = 0
-; andi opl,~0x02
-; ret
-
-.macro m_do_op_RES0
- andi opl,~0x01
-.endm
-.equ do_op_RES0 = 0
-; andi opl,~0x01
-; ret
-
-.macro m_do_op_SET7
- ori opl,0x80
-.endm
-.equ do_op_SET7 = 0
-; ori opl,0x80
-; ret
-
-.macro m_do_op_SET6
- ori opl,0x40
-.endm
-.equ do_op_SET6 = 0
-; ori opl,0x40
-; ret
-
-.macro m_do_op_SET5
- ori opl,0x20
-.endm
-.equ do_op_SET5 = 0
-; ori opl,0x20
-; ret
-
-.macro m_do_op_SET4
- ori opl,0x10
-.endm
-.equ do_op_SET4 = 0
-; ori opl,0x10
-; ret
-
-.macro m_do_op_SET3
- ori opl,0x08
-.endm
-.equ do_op_SET3 = 0
-; ori opl,0x08
-; ret
-
-.macro m_do_op_SET2
- ori opl,0x04
-.endm
-.equ do_op_SET2 = 0
-; ori opl,0x04
-; ret
-
-.macro m_do_op_SET1
- ori opl,0x02
-.endm
-.equ do_op_SET1 = 0
-; ori opl,0x02
-; ret
-
-.macro m_do_op_SET0
- ori opl,0x01
-.endm
-.equ do_op_SET0 = 0
-; ori opl,0x01
-; ret
-
-
opctable EDjmp
instr fetch_nop, op_nop, store_nop ;00 ;NOP
instr fetch_nop, op_nop, store_nop ;9E ;NOP
instr fetch_nop, op_nop, store_nop ;9F ;NOP
instr fetch_nop, op_LDI, store_nop ;A0 ;LDI
-instr fetch_nop, op_CPI, store_nop ;A1 ;CPI
+instr fetch_nop, op_CPI, store_nop ;A1 ;CPI
instr fetch_nop, op_INI, store_nop ;A2 ;INI
instr fetch_nop, op_OUTI, store_nop ;A3 ;OUTI
instr fetch_nop, op_nop, store_nop ;A4 ;NOP
instr fetch_nop, op_nop, store_nop ;A6 ;NOP
instr fetch_nop, op_nop, store_nop ;A7 ;NOP
instr fetch_nop, op_LDD, store_nop ;A8 ;LDD
-instr fetch_nop, op_CPD, store_nop ;A9 ;CPD
+instr fetch_nop, op_CPD, store_nop ;A9 ;CPD
instr fetch_nop, op_IND, store_nop ;AA ;IND
instr fetch_nop, op_OUTD, store_nop ;AB ;OUTD
instr fetch_nop, op_nop, store_nop ;AC ;NOP
instr fetch_nop, op_nop, store_nop ;AE ;NOP
instr fetch_nop, op_nop, store_nop ;AF ;NOP
instr fetch_nop, op_LDIR, store_nop ;B0 ;LDIR
-instr fetch_nop, op_CPIR, store_nop ;B1 ;CPIR
+instr fetch_nop, op_CPIR, store_nop ;B1 ;CPIR
instr fetch_nop, op_INIR, store_nop ;B2 ;INIR
instr fetch_nop, op_OTIR, store_nop ;B3 ;OTIR
instr fetch_nop, op_nop, store_nop ;B4 ;NOP
instr fetch_nop, op_nop, store_nop ;B6 ;NOP
instr fetch_nop, op_nop, store_nop ;B7 ;NOP
instr fetch_nop, op_LDDR, store_nop ;B8 ;LDDR
-instr fetch_nop, op_CPDR, store_nop ;B9 ;CPDR
+instr fetch_nop, op_CPDR, store_nop ;B9 ;CPDR
instr fetch_nop, op_INDR, store_nop ;BA ;INDR
instr fetch_nop, op_OTDR, store_nop ;BB ;OTDR
instr fetch_nop, op_nop, store_nop ;BC ;NOP
instr fetch_DIR16, op_STxx, store_nop ;22 ;LD (nn),xx
instr fetch_xx, op_INC16, store_xx ;23 ;INC xx
instr fetch_xH, op_INC, store_xH ;24 ;INC xh
-instr fetch_xH, op_DEC, store_xH ;25 ;DEC xh
+instr fetch_xH, op_DEC, store_xH ;25 ;DEC xh
instr fetch_DIR8, op_nop, store_xH ;26 ;LD xh,n
instr fetch_nop, op_noni, store_nop ;27 ;
instr fetch_nop, op_noni, store_nop ;28 ;
instr fetch_xx, op_ADDxx, store_nop ;29 ;ADD xx,xx
instr fetch_DIR16, op_RMEM16, store_xx ;2A ;LD xx,(nn)
-instr fetch_xx, op_DEC16, store_xx ;2B ;DEC xx
+instr fetch_xx, op_DEC16, store_xx ;2B ;DEC xx
instr fetch_xL, op_INC, store_xL ;2C ;INC xl
-instr fetch_xL, op_DEC, store_xL ;2D ;DEC xl
+instr fetch_xL, op_DEC, store_xL ;2D ;DEC xl
instr fetch_DIR8, op_nop, store_xL ;2E ;LD xl,n
instr fetch_nop, op_noni, store_nop ;2F ;
instr fetch_nop, op_noni, store_nop ;30 ;
instr fetch_nop, op_noni, store_nop ;32 ;
instr fetch_nop, op_noni, store_nop ;33 ;
instr fetch_MXX, op_INC, store_MXX_0 ;34 ;INC (xx+d)
-instr fetch_MXX, op_DEC, store_MXX_0 ;35 ;DEC (xx+d)
+instr fetch_MXX, op_DEC, store_MXX_0 ;35 ;DEC (xx+d)
instr fetch_DIR8_2, op_nop, store_MXX_2 ;36 ;LD (xx+d),n
instr fetch_nop, op_noni, store_nop ;37 ;
instr fetch_nop, op_noni, store_nop ;38 ;
instr fetch_nop, op_noni, store_nop ;B9 ;
instr fetch_nop, op_noni, store_nop ;BA ;
instr fetch_nop, op_noni, store_nop ;BB ;
-instr fetch_xH, op_CPFA, store_nop ;BC ;CP A,xh
-instr fetch_xL, op_CPFA, store_nop ;BD ;CP A,xl
-instr fetch_MXX, op_CPFA, store_nop ;BE ;CP A,(xx)
+instr fetch_xH, op_CPFA, store_nop ;BC ;CP A,xh
+instr fetch_xL, op_CPFA, store_nop ;BD ;CP A,xl
+instr fetch_MXX, op_CPFA, store_nop ;BE ;CP A,(xx)
instr fetch_nop, op_noni, store_nop ;BF ;
instr fetch_nop, op_noni, store_nop ;C0 ;
instr fetch_nop, op_noni, store_nop ;C1 ;
instr fetch_nop, op_noni, store_nop ;E0 ;
instr fetch_nop, op_POP16, store_xx ;E1 ;POP xx
instr fetch_nop, op_noni, store_nop ;E2 ;
-instr fetch_MSP, op_EXxx, store_MSP ;E3 ;EX (SP),xx
+instr fetch_MSP, op_EXxx, store_MSP ;E3 ;EX (SP),xx
instr fetch_nop, op_noni, store_nop ;E4 ;
instr fetch_xx, op_PUSH16, store_nop ;E5 ;PUSH xx
instr fetch_nop, op_noni, store_nop ;E6 ;
instr fetch_nop, op_noni, store_nop ;FF ;
+
+;----------------------------------------------------------------
+;|Mnemonic |SZHPNC|Description |Notes |
+;----------------------------------------------------------------
+;|RLC m |**0P0*|Rotate Left Circular |m=m<- |
+;|RRC m |**0P0*|Rotate Right Circular|m=->m |
+;|RL m |**0P0*|Rotate Left |m={CY,m}<- |
+;|RR m |**0P0*|Rotate Right |m=->{CY,m} |
+;|SLA m |**0P0*|Shift Left Arithmetic|m=m*2 |
+;|SRA m |**0P0*|Shift Right Arith. |m=m/2 |
+;|SLL m |**0P0*|Shift Right Logical |
+;|SRL m |**0P0*|Shift Right Logical |m=->{0,m,CY} |
+
+
+do_op_rlc:
+ ;Rotate Left Cyclical. All bits move 1 to the
+ ;left, the msb becomes c and lsb.
+ clr temp
+ lsl opl
+ adc temp,_0
+ or opl,temp
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ or z_flags,temp
+ ret
+
+do_op_rrc:
+ ;Rotate Right Cyclical. All bits move 1 to the
+ ;right, the lsb becomes c and msb.
+ lsr opl
+ brcc PC+2
+ ori opl,0x80
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ bmov z_flags,ZFL_C, opl,7
+ ret
+
+
+do_op_rl:
+ ;Rotate Left. All bits move 1 to the left, the msb
+ ;becomes c, c becomes lsb.
+ clc
+ sbrc z_flags,ZFL_C
+ sec
+ rol opl
+ in temp,sreg
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ bmov z_flags,ZFL_C, temp,AVR_C
+ ret
+
+
+do_op_rr:
+ ;Rotate Right. All bits move 1 to the right, the lsb
+ ;becomes c, c becomes msb.
+
+ ror opl
+ in temp,sreg ;CY
+ bmov opl,7, z_flags,ZFL_C ;old CY --> Bit 7
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ bmov z_flags,ZFL_C, temp,AVR_C ;
+ ret
+
+do_op_sla:
+ lsl opl
+ in temp,sreg
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ bmov z_flags,ZFL_C, temp,AVR_C ;
+ ret
+
+do_op_sra:
+ lsr opl
+ in temp,sreg
+ bmov opl,7, opl,6 ;old CY --> Bit 7
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ bmov z_flags,ZFL_C, temp,AVR_C ;
+ ret
+
+do_op_sll:
+ sec
+ rol opl
+ in temp,sreg
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ bmov z_flags,ZFL_C, temp,AVR_C ;
+ ret
+
+do_op_srl:
+ lsr opl
+ in temp,sreg
+ ldpmx z_flags,sz53p_tab,opl ;S,Z,H,P,N
+ bmov z_flags,ZFL_C, temp,AVR_C ;
+ ret
+
+;----------------------------------------------------------------
+;|Mnemonic |SZHPNC|Description |Notes |
+;----------------------------------------------------------------
+;|BIT b,m |?*1?0-|Test Bit |m&{2^b} |
+;|RES b,m |------|Reset bit |m=m&{~2^b} |
+;|SET b,m |------|Set bit |m=mv{2^b} |
+
+
+do_op_BIT7:
+ ldi temp,0x80
+ rjmp opbit
+do_op_BIT6:
+ ldi temp,0x40
+ rjmp opbit
+do_op_BIT5:
+ ldi temp,0x20
+ rjmp opbit
+do_op_BIT4:
+ ldi temp,0x10
+ rjmp opbit
+do_op_BIT3:
+ ldi temp,0x08
+ rjmp opbit
+do_op_BIT2:
+ ldi temp,0x04
+ rjmp opbit
+do_op_BIT1:
+ ldi temp,0x02
+ rjmp opbit
+do_op_BIT0:
+ ldi temp,0x01
+opbit:
+ and temp,opl
+ in temp,sreg
+ ori z_flags,(1<<ZFL_H)
+ andi z_flags,~(1<<ZFL_N)
+ bmov z_flags,ZFL_Z, temp,AVR_Z
+ ret
+
+
+.macro m_do_op_RES7
+ andi opl,~0x80
+.endm
+.equ do_op_RES7 = 0
+; andi opl,~0x80
+; ret
+
+.macro m_do_op_RES6
+ andi opl,~0x40
+.endm
+.equ do_op_RES6 = 0
+; andi opl,~0x40
+; ret
+
+.macro m_do_op_RES5
+ andi opl,~0x20
+.endm
+.equ do_op_RES5 = 0
+; andi opl,~0x20
+; ret
+
+.macro m_do_op_RES4
+ andi opl,~0x10
+.endm
+.equ do_op_RES4 = 0
+; andi opl,~0x10
+; ret
+
+.macro m_do_op_RES3
+ andi opl,~0x08
+.endm
+.equ do_op_RES3 = 0
+; andi opl,~0x08
+; ret
+
+.macro m_do_op_RES2
+ andi opl,~0x04
+.endm
+.equ do_op_RES2 = 0
+; andi opl,~0x04
+; ret
+
+.macro m_do_op_RES1
+ andi opl,~0x02
+.endm
+.equ do_op_RES1 = 0
+; andi opl,~0x02
+; ret
+
+.macro m_do_op_RES0
+ andi opl,~0x01
+.endm
+.equ do_op_RES0 = 0
+; andi opl,~0x01
+; ret
+
+.macro m_do_op_SET7
+ ori opl,0x80
+.endm
+.equ do_op_SET7 = 0
+; ori opl,0x80
+; ret
+
+.macro m_do_op_SET6
+ ori opl,0x40
+.endm
+.equ do_op_SET6 = 0
+; ori opl,0x40
+; ret
+
+.macro m_do_op_SET5
+ ori opl,0x20
+.endm
+.equ do_op_SET5 = 0
+; ori opl,0x20
+; ret
+
+.macro m_do_op_SET4
+ ori opl,0x10
+.endm
+.equ do_op_SET4 = 0
+; ori opl,0x10
+; ret
+
+.macro m_do_op_SET3
+ ori opl,0x08
+.endm
+.equ do_op_SET3 = 0
+; ori opl,0x08
+; ret
+
+.macro m_do_op_SET2
+ ori opl,0x04
+.endm
+.equ do_op_SET2 = 0
+; ori opl,0x04
+; ret
+
+.macro m_do_op_SET1
+ ori opl,0x02
+.endm
+.equ do_op_SET1 = 0
+; ori opl,0x02
+; ret
+
+.macro m_do_op_SET0
+ ori opl,0x01
+.endm
+.equ do_op_SET0 = 0
+; ori opl,0x01
+; ret
+
+
+;.macro m_do_store_b
+; std y+oz_b,opl
+;.endm
+;.equ do_store_b = 0
+do_store2_b:
+ std y+oz_b,opl
+ ret
+
+do_store2_c:
+ std y+oz_c,opl
+ ret
+
+do_store2_d:
+ std y+oz_d,opl
+ ret
+
+do_store2_e:
+ std y+oz_e,opl
+ ret
+
+do_store2_h:
+ std y+oz_h,opl
+ ret
+
+do_store2_l:
+ std y+oz_l,opl
+ ret
+
+do_store2_a:
+ mov z_a,opl
+ ret
+
+do_fetch2_mhl:
+ ldd xh,y+oz_h
+ ldd xl,y+oz_l
+ mem_read_d opl
+ ret
+
opctable CBjmp
-instr fetch_B, op_RLC, store_B ;00 ;RLC B
-instr fetch_C, op_RLC, store_C ;01 ;RLC C
-instr fetch_D, op_RLC, store_D ;02 ;RLC D
-instr fetch_E, op_RLC, store_E ;03 ;RLC E
-instr fetch_H, op_RLC, store_H ;04 ;RLC H
-instr fetch_L, op_RLC, store_L ;05 ;RLC L
-instr fetch_MHL, op_RLC, store_MHL ;06 ;RLC (HL)
-instr fetch_A, op_RLC, store_A ;07 ;RLC A
-instr fetch_B, op_RRC, store_B ;08 ;RRC B
-instr fetch_C, op_RRC, store_C ;09 ;RRC C
-instr fetch_D, op_RRC, store_D ;0A ;RRC D
-instr fetch_E, op_RRC, store_E ;0B ;RRC E
-instr fetch_H, op_RRC, store_H ;0C ;RRC H
-instr fetch_L, op_RRC, store_L ;0D ;RRC L
-instr fetch_MHL, op_RRC, store_MHL ;0E ;RRC (HL)
-instr fetch_A, op_RRC, store_A ;0F ;RRC A
-instr fetch_B, op_RL, store_B ;10 ;RL B
-instr fetch_C, op_RL, store_C ;11 ;RL C
-instr fetch_D, op_RL, store_D ;12 ;RL D
-instr fetch_E, op_RL, store_E ;13 ;RL E
-instr fetch_H, op_RL, store_H ;14 ;RL H
-instr fetch_L, op_RL, store_L ;15 ;RL L
-instr fetch_MHL, op_RL, store_MHL ;16 ;RL (HL)
-instr fetch_A, op_RL, store_A ;17 ;RL A
-instr fetch_B, op_RR, store_B ;18 ;RR B
-instr fetch_C, op_RR, store_C ;19 ;RR C
-instr fetch_D, op_RR, store_D ;1A ;RR D
-instr fetch_E, op_RR, store_E ;1B ;RR E
-instr fetch_H, op_RR, store_H ;1C ;RR H
-instr fetch_L, op_RR, store_L ;1D ;RR L
-instr fetch_MHL, op_RR, store_MHL ;1E ;RR (HL)
-instr fetch_A, op_RR, store_A ;1F ;RR A
-instr fetch_B, op_SLA, store_B ;20 ;SLA B
-instr fetch_C, op_SLA, store_C ;21 ;SLA C
-instr fetch_D, op_SLA, store_D ;22 ;SLA D
-instr fetch_E, op_SLA, store_E ;23 ;SLA E
-instr fetch_H, op_SLA, store_H ;24 ;SLA H
-instr fetch_L, op_SLA, store_L ;25 ;SLA L
-instr fetch_MHL, op_SLA, store_MHL ;26 ;SLA (HL)
-instr fetch_A, op_SLA, store_A ;27 ;SLA A
-instr fetch_B, op_SRA, store_B ;28 ;SRA B
-instr fetch_C, op_SRA, store_C ;29 ;SRA C
-instr fetch_D, op_SRA, store_D ;2A ;SRA D
-instr fetch_E, op_SRA, store_E ;2B ;SRA E
-instr fetch_H, op_SRA, store_H ;2C ;SRA H
-instr fetch_L, op_SRA, store_L ;2D ;SRA L
-instr fetch_MHL, op_SRA, store_MHL ;2E ;SRA (HL)
-instr fetch_A, op_SRA, store_A ;2F ;SRA A
-instr fetch_B, op_SLL, store_B ;30 ;SLL B
-instr fetch_C, op_SLL, store_C ;31 ;SLL C
-instr fetch_D, op_SLL, store_D ;32 ;SLL D
-instr fetch_E, op_SLL, store_E ;33 ;SLL E
-instr fetch_H, op_SLL, store_H ;34 ;SLL H
-instr fetch_L, op_SLL, store_L ;35 ;SLL L
-instr fetch_MHL, op_SLL, store_MHL ;36 ;SLL (HL)
-instr fetch_A, op_SLL, store_A ;37 ;SLL A
-instr fetch_B, op_SRL, store_B ;38 ;SRL B
-instr fetch_C, op_SRL, store_C ;39 ;SRL C
-instr fetch_D, op_SRL, store_D ;3A ;SRL D
-instr fetch_E, op_SRL, store_E ;3B ;SRL E
-instr fetch_H, op_SRL, store_H ;3C ;SRL H
-instr fetch_L, op_SRL, store_L ;3D ;SRL L
-instr fetch_MHL, op_SRL, store_MHL ;3E ;SRL (HL)
-instr fetch_A, op_SRL, store_A ;3F ;SRL A
+instr fetch_B, op_RLC, store2_B ;00 ;RLC B
+instr fetch_C, op_RLC, store2_C ;01 ;RLC C
+instr fetch_D, op_RLC, store2_D ;02 ;RLC D
+instr fetch_E, op_RLC, store2_E ;03 ;RLC E
+instr fetch_H, op_RLC, store2_H ;04 ;RLC H
+instr fetch_L, op_RLC, store2_L ;05 ;RLC L
+instr fetch2_mhl, op_RLC, store_MHL ;06 ;RLC (HL)
+instr fetch_A, op_RLC, store2_A ;07 ;RLC A
+instr fetch_B, op_RRC, store2_B ;08 ;RRC B
+instr fetch_C, op_RRC, store2_C ;09 ;RRC C
+instr fetch_D, op_RRC, store2_D ;0A ;RRC D
+instr fetch_E, op_RRC, store2_E ;0B ;RRC E
+instr fetch_H, op_RRC, store2_H ;0C ;RRC H
+instr fetch_L, op_RRC, store2_L ;0D ;RRC L
+instr fetch2_mhl, op_RRC, store_MHL ;0E ;RRC (HL)
+instr fetch_A, op_RRC, store2_A ;0F ;RRC A
+instr fetch_B, op_RL, store2_B ;10 ;RL B
+instr fetch_C, op_RL, store2_C ;11 ;RL C
+instr fetch_D, op_RL, store2_D ;12 ;RL D
+instr fetch_E, op_RL, store2_E ;13 ;RL E
+instr fetch_H, op_RL, store2_H ;14 ;RL H
+instr fetch_L, op_RL, store2_L ;15 ;RL L
+instr fetch2_mhl, op_RL, store_MHL ;16 ;RL (HL)
+instr fetch_A, op_RL, store2_A ;17 ;RL A
+instr fetch_B, op_RR, store2_B ;18 ;RR B
+instr fetch_C, op_RR, store2_C ;19 ;RR C
+instr fetch_D, op_RR, store2_D ;1A ;RR D
+instr fetch_E, op_RR, store2_E ;1B ;RR E
+instr fetch_H, op_RR, store2_H ;1C ;RR H
+instr fetch_L, op_RR, store2_L ;1D ;RR L
+instr fetch2_mhl, op_RR, store_MHL ;1E ;RR (HL)
+instr fetch_A, op_RR, store2_A ;1F ;RR A
+instr fetch_B, op_SLA, store2_B ;20 ;SLA B
+instr fetch_C, op_SLA, store2_C ;21 ;SLA C
+instr fetch_D, op_SLA, store2_D ;22 ;SLA D
+instr fetch_E, op_SLA, store2_E ;23 ;SLA E
+instr fetch_H, op_SLA, store2_H ;24 ;SLA H
+instr fetch_L, op_SLA, store2_L ;25 ;SLA L
+instr fetch2_mhl, op_SLA, store_MHL ;26 ;SLA (HL)
+instr fetch_A, op_SLA, store2_A ;27 ;SLA A
+instr fetch_B, op_SRA, store2_B ;28 ;SRA B
+instr fetch_C, op_SRA, store2_C ;29 ;SRA C
+instr fetch_D, op_SRA, store2_D ;2A ;SRA D
+instr fetch_E, op_SRA, store2_E ;2B ;SRA E
+instr fetch_H, op_SRA, store2_H ;2C ;SRA H
+instr fetch_L, op_SRA, store2_L ;2D ;SRA L
+instr fetch2_mhl, op_SRA, store_MHL ;2E ;SRA (HL)
+instr fetch_A, op_SRA, store2_A ;2F ;SRA A
+instr fetch_B, op_SLL, store2_B ;30 ;SLL B
+instr fetch_C, op_SLL, store2_C ;31 ;SLL C
+instr fetch_D, op_SLL, store2_D ;32 ;SLL D
+instr fetch_E, op_SLL, store2_E ;33 ;SLL E
+instr fetch_H, op_SLL, store2_H ;34 ;SLL H
+instr fetch_L, op_SLL, store2_L ;35 ;SLL L
+instr fetch2_mhl, op_SLL, store_MHL ;36 ;SLL (HL)
+instr fetch_A, op_SLL, store2_A ;37 ;SLL A
+instr fetch_B, op_SRL, store2_B ;38 ;SRL B
+instr fetch_C, op_SRL, store2_C ;39 ;SRL C
+instr fetch_D, op_SRL, store2_D ;3A ;SRL D
+instr fetch_E, op_SRL, store2_E ;3B ;SRL E
+instr fetch_H, op_SRL, store2_H ;3C ;SRL H
+instr fetch_L, op_SRL, store2_L ;3D ;SRL L
+instr fetch2_mhl, op_SRL, store_MHL ;3E ;SRL (HL)
+instr fetch_A, op_SRL, store2_A ;3F ;SRL A
instr fetch_B, op_BIT0, store_nop ;40 ;BIT 0,B
instr fetch_C, op_BIT0, store_nop ;41 ;BIT 0,C
instr fetch_D, op_BIT0, store_nop ;42 ;BIT 0,D
instr fetch_E, op_BIT0, store_nop ;43 ;BIT 0,E
instr fetch_H, op_BIT0, store_nop ;44 ;BIT 0,H
instr fetch_L, op_BIT0, store_nop ;45 ;BIT 0,L
-instr fetch_MHL, op_BIT0, store_nop ;46 ;BIT 0,(HL)
+instr fetch2_mhl, op_BIT0, store_nop ;46 ;BIT 0,(HL)
instr fetch_A, op_BIT0, store_nop ;47 ;BIT 0,A
instr fetch_B, op_BIT1, store_nop ;48 ;BIT 1,B
instr fetch_C, op_BIT1, store_nop ;49 ;BIT 1,C
instr fetch_E, op_BIT1, store_nop ;4B ;BIT 1,E
instr fetch_H, op_BIT1, store_nop ;4C ;BIT 1,H
instr fetch_L, op_BIT1, store_nop ;4D ;BIT 1,L
-instr fetch_MHL, op_BIT1, store_nop ;4E ;BIT 1,(HL)
+instr fetch2_mhl, op_BIT1, store_nop ;4E ;BIT 1,(HL)
instr fetch_A, op_BIT1, store_nop ;4F ;BIT 1,A
instr fetch_B, op_BIT2, store_nop ;50 ;BIT 2,B
instr fetch_C, op_BIT2, store_nop ;51 ;BIT 2,C
instr fetch_E, op_BIT2, store_nop ;53 ;BIT 2,E
instr fetch_H, op_BIT2, store_nop ;54 ;BIT 2,H
instr fetch_L, op_BIT2, store_nop ;55 ;BIT 2,L
-instr fetch_MHL, op_BIT2, store_nop ;56 ;BIT 2,(HL)
+instr fetch2_mhl, op_BIT2, store_nop ;56 ;BIT 2,(HL)
instr fetch_A, op_BIT2, store_nop ;57 ;BIT 2,A
instr fetch_B, op_BIT3, store_nop ;58 ;BIT 3,B
instr fetch_C, op_BIT3, store_nop ;59 ;BIT 3,C
instr fetch_E, op_BIT3, store_nop ;5B ;BIT 3,E
instr fetch_H, op_BIT3, store_nop ;5C ;BIT 3,H
instr fetch_L, op_BIT3, store_nop ;5D ;BIT 3,L
-instr fetch_MHL, op_BIT3, store_nop ;5E ;BIT 3,(HL)
+instr fetch2_mhl, op_BIT3, store_nop ;5E ;BIT 3,(HL)
instr fetch_A, op_BIT3, store_nop ;5F ;BIT 3,A
instr fetch_B, op_BIT4, store_nop ;60 ;BIT 4,B
instr fetch_C, op_BIT4, store_nop ;61 ;BIT 4,C
instr fetch_E, op_BIT4, store_nop ;63 ;BIT 4,E
instr fetch_H, op_BIT4, store_nop ;64 ;BIT 4,H
instr fetch_L, op_BIT4, store_nop ;65 ;BIT 4,L
-instr fetch_MHL, op_BIT4, store_nop ;66 ;BIT 4,(HL)
+instr fetch2_mhl, op_BIT4, store_nop ;66 ;BIT 4,(HL)
instr fetch_A, op_BIT4, store_nop ;67 ;BIT 4,A
instr fetch_B, op_BIT5, store_nop ;68 ;BIT 5,B
instr fetch_C, op_BIT5, store_nop ;69 ;BIT 5,C
instr fetch_E, op_BIT5, store_nop ;6B ;BIT 5,E
instr fetch_H, op_BIT5, store_nop ;6C ;BIT 5,H
instr fetch_L, op_BIT5, store_nop ;6D ;BIT 5,L
-instr fetch_MHL, op_BIT5, store_nop ;6E ;BIT 5,(HL)
+instr fetch2_mhl, op_BIT5, store_nop ;6E ;BIT 5,(HL)
instr fetch_A, op_BIT5, store_nop ;6F ;BIT 5,A
instr fetch_B, op_BIT6, store_nop ;70 ;BIT 6,B
instr fetch_C, op_BIT6, store_nop ;71 ;BIT 6,C
instr fetch_E, op_BIT6, store_nop ;73 ;BIT 6,E
instr fetch_H, op_BIT6, store_nop ;74 ;BIT 6,H
instr fetch_L, op_BIT6, store_nop ;75 ;BIT 6,L
-instr fetch_MHL, op_BIT6, store_nop ;76 ;BIT 6,(HL)
+instr fetch2_mhl, op_BIT6, store_nop ;76 ;BIT 6,(HL)
instr fetch_A, op_BIT6, store_nop ;77 ;BIT 6,A
instr fetch_B, op_BIT7, store_nop ;78 ;BIT 7,B
instr fetch_C, op_BIT7, store_nop ;79 ;BIT 7,C
instr fetch_E, op_BIT7, store_nop ;7B ;BIT 7,E
instr fetch_H, op_BIT7, store_nop ;7C ;BIT 7,H
instr fetch_L, op_BIT7, store_nop ;7D ;BIT 7,L
-instr fetch_MHL, op_BIT7, store_nop ;7E ;BIT 7,(HL)
+instr fetch2_mhl, op_BIT7, store_nop ;7E ;BIT 7,(HL)
instr fetch_A, op_BIT7, store_nop ;7F ;BIT 7,A
-instr fetch_B, op_RES0, store_B ;80 ;RES 0,B
-instr fetch_C, op_RES0, store_C ;81 ;RES 0,C
-instr fetch_D, op_RES0, store_D ;82 ;RES 0,D
-instr fetch_E, op_RES0, store_E ;83 ;RES 0,E
-instr fetch_H, op_RES0, store_H ;84 ;RES 0,H
-instr fetch_L, op_RES0, store_L ;85 ;RES 0,L
-instr fetch_MHL, op_RES0, store_MHL ;86 ;RES 0,(HL)
-instr fetch_A, op_RES0, store_A ;87 ;RES 0,A
-instr fetch_B, op_RES1, store_B ;88 ;RES 1,B
-instr fetch_C, op_RES1, store_C ;89 ;RES 1,C
-instr fetch_D, op_RES1, store_D ;8A ;RES 1,D
-instr fetch_E, op_RES1, store_E ;8B ;RES 1,E
-instr fetch_H, op_RES1, store_H ;8C ;RES 1,H
-instr fetch_L, op_RES1, store_L ;8D ;RES 1,L
-instr fetch_MHL, op_RES1, store_MHL ;8E ;RES 1,(HL)
-instr fetch_A, op_RES1, store_A ;8F ;RES 1,A
-instr fetch_B, op_RES2, store_B ;90 ;RES 2,B
-instr fetch_C, op_RES2, store_C ;91 ;RES 2,C
-instr fetch_D, op_RES2, store_D ;92 ;RES 2,D
-instr fetch_E, op_RES2, store_E ;93 ;RES 2,E
-instr fetch_H, op_RES2, store_H ;94 ;RES 2,H
-instr fetch_L, op_RES2, store_L ;95 ;RES 2,L
-instr fetch_MHL, op_RES2, store_MHL ;96 ;RES 2,(HL)
-instr fetch_A, op_RES2, store_A ;97 ;RES 2,A
-instr fetch_B, op_RES3, store_B ;98 ;RES 3,B
-instr fetch_C, op_RES3, store_C ;99 ;RES 3,C
-instr fetch_D, op_RES3, store_D ;9A ;RES 3,D
-instr fetch_E, op_RES3, store_E ;9B ;RES 3,E
-instr fetch_H, op_RES3, store_H ;9C ;RES 3,H
-instr fetch_L, op_RES3, store_L ;9D ;RES 3,L
-instr fetch_MHL, op_RES3, store_MHL ;9E ;RES 3,(HL)
-instr fetch_A, op_RES3, store_A ;9F ;RES 3,A
-instr fetch_B, op_RES4, store_B ;A0 ;RES 4,B
-instr fetch_C, op_RES4, store_C ;A1 ;RES 4,C
-instr fetch_D, op_RES4, store_D ;A2 ;RES 4,D
-instr fetch_E, op_RES4, store_E ;A3 ;RES 4,E
-instr fetch_H, op_RES4, store_H ;A4 ;RES 4,H
-instr fetch_L, op_RES4, store_L ;A5 ;RES 4,L
-instr fetch_MHL, op_RES4, store_MHL ;A6 ;RES 4,(HL)
-instr fetch_A, op_RES4, store_A ;A7 ;RES 4,A
-instr fetch_B, op_RES5, store_B ;A8 ;RES 5,B
-instr fetch_C, op_RES5, store_C ;A9 ;RES 5,C
-instr fetch_D, op_RES5, store_D ;AA ;RES 5,D
-instr fetch_E, op_RES5, store_E ;AB ;RES 5,E
-instr fetch_H, op_RES5, store_H ;AC ;RES 5,H
-instr fetch_L, op_RES5, store_L ;AD ;RES 5,L
-instr fetch_MHL, op_RES5, store_MHL ;AE ;RES 5,(HL)
-instr fetch_A, op_RES5, store_A ;AF ;RES 5,A
-instr fetch_B, op_RES6, store_B ;B0 ;RES 6,B
-instr fetch_C, op_RES6, store_C ;B1 ;RES 6,C
-instr fetch_D, op_RES6, store_D ;B2 ;RES 6,D
-instr fetch_E, op_RES6, store_E ;B3 ;RES 6,E
-instr fetch_H, op_RES6, store_H ;B4 ;RES 6,H
-instr fetch_L, op_RES6, store_L ;B5 ;RES 6,L
-instr fetch_MHL, op_RES6, store_MHL ;B6 ;RES 6,(HL)
-instr fetch_A, op_RES6, store_A ;B7 ;RES 6,A
-instr fetch_B, op_RES7, store_B ;B8 ;RES 7,B
-instr fetch_C, op_RES7, store_C ;B9 ;RES 7,C
-instr fetch_D, op_RES7, store_D ;BA ;RES 7,D
-instr fetch_E, op_RES7, store_E ;BB ;RES 7,E
-instr fetch_H, op_RES7, store_H ;BC ;RES 7,H
-instr fetch_L, op_RES7, store_L ;BD ;RES 7,L
-instr fetch_MHL, op_RES7, store_MHL ;BE ;RES 7,(HL)
-instr fetch_A, op_RES7, store_A ;BF ;RES 7,A
-instr fetch_B, op_SET0, store_B ;C0 ;SET 0,B
-instr fetch_C, op_SET0, store_C ;C1 ;SET 0,C
-instr fetch_D, op_SET0, store_D ;C2 ;SET 0,D
-instr fetch_E, op_SET0, store_E ;C3 ;SET 0,E
-instr fetch_H, op_SET0, store_H ;C4 ;SET 0,H
-instr fetch_L, op_SET0, store_L ;C5 ;SET 0,L
-instr fetch_MHL, op_SET0, store_MHL ;C6 ;SET 0,(HL)
-instr fetch_A, op_SET0, store_A ;C7 ;SET 0,A
-instr fetch_B, op_SET1, store_B ;C8 ;SET 1,B
-instr fetch_C, op_SET1, store_C ;C9 ;SET 1,C
-instr fetch_D, op_SET1, store_D ;CA ;SET 1,D
-instr fetch_E, op_SET1, store_E ;CB ;SET 1,E
-instr fetch_H, op_SET1, store_H ;CC ;SET 1,H
-instr fetch_L, op_SET1, store_L ;CD ;SET 1,L
-instr fetch_MHL, op_SET1, store_MHL ;CE ;SET 1,(HL)
-instr fetch_A, op_SET1, store_A ;CF ;SET 1,A
-instr fetch_B, op_SET2, store_B ;D0 ;SET 2,B
-instr fetch_C, op_SET2, store_C ;D1 ;SET 2,C
-instr fetch_D, op_SET2, store_D ;D2 ;SET 2,D
-instr fetch_E, op_SET2, store_E ;D3 ;SET 2,E
-instr fetch_H, op_SET2, store_H ;D4 ;SET 2,H
-instr fetch_L, op_SET2, store_L ;D5 ;SET 2,L
-instr fetch_MHL, op_SET2, store_MHL ;D6 ;SET 2,(HL)
-instr fetch_A, op_SET2, store_A ;D7 ;SET 2,A
-instr fetch_B, op_SET3, store_B ;D8 ;SET 3,B
-instr fetch_C, op_SET3, store_C ;D9 ;SET 3,C
-instr fetch_D, op_SET3, store_D ;DA ;SET 3,D
-instr fetch_E, op_SET3, store_E ;DB ;SET 3,E
-instr fetch_H, op_SET3, store_H ;DC ;SET 3,H
-instr fetch_L, op_SET3, store_L ;DD ;SET 3,L
-instr fetch_MHL, op_SET3, store_MHL ;DE ;SET 3,(HL)
-instr fetch_A, op_SET3, store_A ;DF ;SET 3,A
-instr fetch_B, op_SET4, store_B ;E0 ;SET 4,B
-instr fetch_C, op_SET4, store_C ;E1 ;SET 4,C
-instr fetch_D, op_SET4, store_D ;E2 ;SET 4,D
-instr fetch_E, op_SET4, store_E ;E3 ;SET 4,E
-instr fetch_H, op_SET4, store_H ;E4 ;SET 4,H
-instr fetch_L, op_SET4, store_L ;E5 ;SET 4,L
-instr fetch_MHL, op_SET4, store_MHL ;E6 ;SET 4,(HL)
-instr fetch_A, op_SET4, store_A ;E7 ;SET 4,A
-instr fetch_B, op_SET5, store_B ;E8 ;SET 5,B
-instr fetch_C, op_SET5, store_C ;E9 ;SET 5,C
-instr fetch_D, op_SET5, store_D ;EA ;SET 5,D
-instr fetch_E, op_SET5, store_E ;EB ;SET 5,E
-instr fetch_H, op_SET5, store_H ;EC ;SET 5,H
-instr fetch_L, op_SET5, store_L ;ED ;SET 5,L
-instr fetch_MHL, op_SET5, store_MHL ;EE ;SET 5,(HL)
-instr fetch_A, op_SET5, store_A ;EF ;SET 5,A
-instr fetch_B, op_SET6, store_B ;F0 ;SET 6,B
-instr fetch_C, op_SET6, store_C ;F1 ;SET 6,C
-instr fetch_D, op_SET6, store_D ;F2 ;SET 6,D
-instr fetch_E, op_SET6, store_E ;F3 ;SET 6,E
-instr fetch_H, op_SET6, store_H ;F4 ;SET 6,H
-instr fetch_L, op_SET6, store_L ;F5 ;SET 6,L
-instr fetch_MHL, op_SET6, store_MHL ;F6 ;SET 6,(HL)
-instr fetch_A, op_SET6, store_A ;F7 ;SET 6,A
-instr fetch_B, op_SET7, store_B ;F8 ;SET 7,B
-instr fetch_C, op_SET7, store_C ;F9 ;SET 7,C
-instr fetch_D, op_SET7, store_D ;FA ;SET 7,D
-instr fetch_E, op_SET7, store_E ;FB ;SET 7,E
-instr fetch_H, op_SET7, store_H ;FC ;SET 7,H
-instr fetch_L, op_SET7, store_L ;FD ;SET 7,L
-instr fetch_MHL, op_SET7, store_MHL ;FE ;SET 7,(HL)
-instr fetch_A, op_SET7, store_A ;FF ;SET 7,A
+instr fetch_B, op_RES0, store2_B ;80 ;RES 0,B
+instr fetch_C, op_RES0, store2_C ;81 ;RES 0,C
+instr fetch_D, op_RES0, store2_D ;82 ;RES 0,D
+instr fetch_E, op_RES0, store2_E ;83 ;RES 0,E
+instr fetch_H, op_RES0, store2_H ;84 ;RES 0,H
+instr fetch_L, op_RES0, store2_L ;85 ;RES 0,L
+instr fetch2_mhl, op_RES0, store_MHL ;86 ;RES 0,(HL)
+instr fetch_A, op_RES0, store2_A ;87 ;RES 0,A
+instr fetch_B, op_RES1, store2_B ;88 ;RES 1,B
+instr fetch_C, op_RES1, store2_C ;89 ;RES 1,C
+instr fetch_D, op_RES1, store2_D ;8A ;RES 1,D
+instr fetch_E, op_RES1, store2_E ;8B ;RES 1,E
+instr fetch_H, op_RES1, store2_H ;8C ;RES 1,H
+instr fetch_L, op_RES1, store2_L ;8D ;RES 1,L
+instr fetch2_mhl, op_RES1, store_MHL ;8E ;RES 1,(HL)
+instr fetch_A, op_RES1, store2_A ;8F ;RES 1,A
+instr fetch_B, op_RES2, store2_B ;90 ;RES 2,B
+instr fetch_C, op_RES2, store2_C ;91 ;RES 2,C
+instr fetch_D, op_RES2, store2_D ;92 ;RES 2,D
+instr fetch_E, op_RES2, store2_E ;93 ;RES 2,E
+instr fetch_H, op_RES2, store2_H ;94 ;RES 2,H
+instr fetch_L, op_RES2, store2_L ;95 ;RES 2,L
+instr fetch2_mhl, op_RES2, store_MHL ;96 ;RES 2,(HL)
+instr fetch_A, op_RES2, store2_A ;97 ;RES 2,A
+instr fetch_B, op_RES3, store2_B ;98 ;RES 3,B
+instr fetch_C, op_RES3, store2_C ;99 ;RES 3,C
+instr fetch_D, op_RES3, store2_D ;9A ;RES 3,D
+instr fetch_E, op_RES3, store2_E ;9B ;RES 3,E
+instr fetch_H, op_RES3, store2_H ;9C ;RES 3,H
+instr fetch_L, op_RES3, store2_L ;9D ;RES 3,L
+instr fetch2_mhl, op_RES3, store_MHL ;9E ;RES 3,(HL)
+instr fetch_A, op_RES3, store2_A ;9F ;RES 3,A
+instr fetch_B, op_RES4, store2_B ;A0 ;RES 4,B
+instr fetch_C, op_RES4, store2_C ;A1 ;RES 4,C
+instr fetch_D, op_RES4, store2_D ;A2 ;RES 4,D
+instr fetch_E, op_RES4, store2_E ;A3 ;RES 4,E
+instr fetch_H, op_RES4, store2_H ;A4 ;RES 4,H
+instr fetch_L, op_RES4, store2_L ;A5 ;RES 4,L
+instr fetch2_mhl, op_RES4, store_MHL ;A6 ;RES 4,(HL)
+instr fetch_A, op_RES4, store2_A ;A7 ;RES 4,A
+instr fetch_B, op_RES5, store2_B ;A8 ;RES 5,B
+instr fetch_C, op_RES5, store2_C ;A9 ;RES 5,C
+instr fetch_D, op_RES5, store2_D ;AA ;RES 5,D
+instr fetch_E, op_RES5, store2_E ;AB ;RES 5,E
+instr fetch_H, op_RES5, store2_H ;AC ;RES 5,H
+instr fetch_L, op_RES5, store2_L ;AD ;RES 5,L
+instr fetch2_mhl, op_RES5, store_MHL ;AE ;RES 5,(HL)
+instr fetch_A, op_RES5, store2_A ;AF ;RES 5,A
+instr fetch_B, op_RES6, store2_B ;B0 ;RES 6,B
+instr fetch_C, op_RES6, store2_C ;B1 ;RES 6,C
+instr fetch_D, op_RES6, store2_D ;B2 ;RES 6,D
+instr fetch_E, op_RES6, store2_E ;B3 ;RES 6,E
+instr fetch_H, op_RES6, store2_H ;B4 ;RES 6,H
+instr fetch_L, op_RES6, store2_L ;B5 ;RES 6,L
+instr fetch2_mhl, op_RES6, store_MHL ;B6 ;RES 6,(HL)
+instr fetch_A, op_RES6, store2_A ;B7 ;RES 6,A
+instr fetch_B, op_RES7, store2_B ;B8 ;RES 7,B
+instr fetch_C, op_RES7, store2_C ;B9 ;RES 7,C
+instr fetch_D, op_RES7, store2_D ;BA ;RES 7,D
+instr fetch_E, op_RES7, store2_E ;BB ;RES 7,E
+instr fetch_H, op_RES7, store2_H ;BC ;RES 7,H
+instr fetch_L, op_RES7, store2_L ;BD ;RES 7,L
+instr fetch2_mhl, op_RES7, store_MHL ;BE ;RES 7,(HL)
+instr fetch_A, op_RES7, store2_A ;BF ;RES 7,A
+instr fetch_B, op_SET0, store2_B ;C0 ;SET 0,B
+instr fetch_C, op_SET0, store2_C ;C1 ;SET 0,C
+instr fetch_D, op_SET0, store2_D ;C2 ;SET 0,D
+instr fetch_E, op_SET0, store2_E ;C3 ;SET 0,E
+instr fetch_H, op_SET0, store2_H ;C4 ;SET 0,H
+instr fetch_L, op_SET0, store2_L ;C5 ;SET 0,L
+instr fetch2_mhl, op_SET0, store_MHL ;C6 ;SET 0,(HL)
+instr fetch_A, op_SET0, store2_A ;C7 ;SET 0,A
+instr fetch_B, op_SET1, store2_B ;C8 ;SET 1,B
+instr fetch_C, op_SET1, store2_C ;C9 ;SET 1,C
+instr fetch_D, op_SET1, store2_D ;CA ;SET 1,D
+instr fetch_E, op_SET1, store2_E ;CB ;SET 1,E
+instr fetch_H, op_SET1, store2_H ;CC ;SET 1,H
+instr fetch_L, op_SET1, store2_L ;CD ;SET 1,L
+instr fetch2_mhl, op_SET1, store_MHL ;CE ;SET 1,(HL)
+instr fetch_A, op_SET1, store2_A ;CF ;SET 1,A
+instr fetch_B, op_SET2, store2_B ;D0 ;SET 2,B
+instr fetch_C, op_SET2, store2_C ;D1 ;SET 2,C
+instr fetch_D, op_SET2, store2_D ;D2 ;SET 2,D
+instr fetch_E, op_SET2, store2_E ;D3 ;SET 2,E
+instr fetch_H, op_SET2, store2_H ;D4 ;SET 2,H
+instr fetch_L, op_SET2, store2_L ;D5 ;SET 2,L
+instr fetch2_mhl, op_SET2, store_MHL ;D6 ;SET 2,(HL)
+instr fetch_A, op_SET2, store2_A ;D7 ;SET 2,A
+instr fetch_B, op_SET3, store2_B ;D8 ;SET 3,B
+instr fetch_C, op_SET3, store2_C ;D9 ;SET 3,C
+instr fetch_D, op_SET3, store2_D ;DA ;SET 3,D
+instr fetch_E, op_SET3, store2_E ;DB ;SET 3,E
+instr fetch_H, op_SET3, store2_H ;DC ;SET 3,H
+instr fetch_L, op_SET3, store2_L ;DD ;SET 3,L
+instr fetch2_mhl, op_SET3, store_MHL ;DE ;SET 3,(HL)
+instr fetch_A, op_SET3, store2_A ;DF ;SET 3,A
+instr fetch_B, op_SET4, store2_B ;E0 ;SET 4,B
+instr fetch_C, op_SET4, store2_C ;E1 ;SET 4,C
+instr fetch_D, op_SET4, store2_D ;E2 ;SET 4,D
+instr fetch_E, op_SET4, store2_E ;E3 ;SET 4,E
+instr fetch_H, op_SET4, store2_H ;E4 ;SET 4,H
+instr fetch_L, op_SET4, store2_L ;E5 ;SET 4,L
+instr fetch2_mhl, op_SET4, store_MHL ;E6 ;SET 4,(HL)
+instr fetch_A, op_SET4, store2_A ;E7 ;SET 4,A
+instr fetch_B, op_SET5, store2_B ;E8 ;SET 5,B
+instr fetch_C, op_SET5, store2_C ;E9 ;SET 5,C
+instr fetch_D, op_SET5, store2_D ;EA ;SET 5,D
+instr fetch_E, op_SET5, store2_E ;EB ;SET 5,E
+instr fetch_H, op_SET5, store2_H ;EC ;SET 5,H
+instr fetch_L, op_SET5, store2_L ;ED ;SET 5,L
+instr fetch2_mhl, op_SET5, store_MHL ;EE ;SET 5,(HL)
+instr fetch_A, op_SET5, store2_A ;EF ;SET 5,A
+instr fetch_B, op_SET6, store2_B ;F0 ;SET 6,B
+instr fetch_C, op_SET6, store2_C ;F1 ;SET 6,C
+instr fetch_D, op_SET6, store2_D ;F2 ;SET 6,D
+instr fetch_E, op_SET6, store2_E ;F3 ;SET 6,E
+instr fetch_H, op_SET6, store2_H ;F4 ;SET 6,H
+instr fetch_L, op_SET6, store2_L ;F5 ;SET 6,L
+instr fetch2_mhl, op_SET6, store_MHL ;F6 ;SET 6,(HL)
+instr fetch_A, op_SET6, store2_A ;F7 ;SET 6,A
+instr fetch_B, op_SET7, store2_B ;F8 ;SET 7,B
+instr fetch_C, op_SET7, store2_C ;F9 ;SET 7,C
+instr fetch_D, op_SET7, store2_D ;FA ;SET 7,D
+instr fetch_E, op_SET7, store2_E ;FB ;SET 7,E
+instr fetch_H, op_SET7, store2_H ;FC ;SET 7,H
+instr fetch_L, op_SET7, store2_L ;FD ;SET 7,L
+instr fetch2_mhl, op_SET7, store_MHL ;FE ;SET 7,(HL)
+instr fetch_A, op_SET7, store2_A ;FF ;SET 7,A
opctable DDFDCBjmp
-instr fetch_nop, op_RLC, store_B ;00 ;RLC (Ix+d),B
-instr fetch_nop, op_RLC, store_C ;01 ;RLC (Ix+d),C
-instr fetch_nop, op_RLC, store_D ;02 ;RLC (Ix+d),D
-instr fetch_nop, op_RLC, store_E ;03 ;RLC (Ix+d),E
-instr fetch_nop, op_RLC, store_H ;04 ;RLC (Ix+d),H
-instr fetch_nop, op_RLC, store_L ;05 ;RLC (Ix+d),L
+instr fetch_nop, op_RLC, store2_B ;00 ;RLC (Ix+d),B
+instr fetch_nop, op_RLC, store2_C ;01 ;RLC (Ix+d),C
+instr fetch_nop, op_RLC, store2_D ;02 ;RLC (Ix+d),D
+instr fetch_nop, op_RLC, store2_E ;03 ;RLC (Ix+d),E
+instr fetch_nop, op_RLC, store2_H ;04 ;RLC (Ix+d),H
+instr fetch_nop, op_RLC, store2_L ;05 ;RLC (Ix+d),L
instr fetch_nop, op_RLC, store_nop ;06 ;RLC (Ix+d)
-instr fetch_nop, op_RLC, store_A ;07 ;RLC (Ix+d),A
-instr fetch_nop, op_RRC, store_B ;08 ;RRC (Ix+d),B
-instr fetch_nop, op_RRC, store_C ;09 ;RRC (Ix+d),C
-instr fetch_nop, op_RRC, store_D ;0A ;RRC (Ix+d),D
-instr fetch_nop, op_RRC, store_E ;0B ;RRC (Ix+d),E
-instr fetch_nop, op_RRC, store_H ;0C ;RRC (Ix+d),H
-instr fetch_nop, op_RRC, store_L ;0D ;RRC (Ix+d),L
+instr fetch_nop, op_RLC, store2_A ;07 ;RLC (Ix+d),A
+instr fetch_nop, op_RRC, store2_B ;08 ;RRC (Ix+d),B
+instr fetch_nop, op_RRC, store2_C ;09 ;RRC (Ix+d),C
+instr fetch_nop, op_RRC, store2_D ;0A ;RRC (Ix+d),D
+instr fetch_nop, op_RRC, store2_E ;0B ;RRC (Ix+d),E
+instr fetch_nop, op_RRC, store2_H ;0C ;RRC (Ix+d),H
+instr fetch_nop, op_RRC, store2_L ;0D ;RRC (Ix+d),L
instr fetch_nop, op_RRC, store_nop ;0E ;RRC (Ix+d)
-instr fetch_nop, op_RRC, store_A ;0F ;RRC (Ix+d),A
-instr fetch_nop, op_RL, store_B ;10 ;RL (Ix+d),B
-instr fetch_nop, op_RL, store_C ;11 ;RL (Ix+d),C
-instr fetch_nop, op_RL, store_D ;12 ;RL (Ix+d),D
-instr fetch_nop, op_RL, store_E ;13 ;RL (Ix+d),E
-instr fetch_nop, op_RL, store_H ;14 ;RL (Ix+d),H
-instr fetch_nop, op_RL, store_L ;15 ;RL (Ix+d),L
+instr fetch_nop, op_RRC, store2_A ;0F ;RRC (Ix+d),A
+instr fetch_nop, op_RL, store2_B ;10 ;RL (Ix+d),B
+instr fetch_nop, op_RL, store2_C ;11 ;RL (Ix+d),C
+instr fetch_nop, op_RL, store2_D ;12 ;RL (Ix+d),D
+instr fetch_nop, op_RL, store2_E ;13 ;RL (Ix+d),E
+instr fetch_nop, op_RL, store2_H ;14 ;RL (Ix+d),H
+instr fetch_nop, op_RL, store2_L ;15 ;RL (Ix+d),L
instr fetch_nop, op_RL, store_nop ;16 ;RL (Ix+d)
-instr fetch_nop, op_RL, store_A ;17 ;RL (Ix+d),A
-instr fetch_nop, op_RR, store_B ;18 ;RR (Ix+d),B
-instr fetch_nop, op_RR, store_C ;19 ;RR (Ix+d),C
-instr fetch_nop, op_RR, store_D ;1A ;RR (Ix+d),D
-instr fetch_nop, op_RR, store_E ;1B ;RR (Ix+d),E
-instr fetch_nop, op_RR, store_H ;1C ;RR (Ix+d),H
-instr fetch_nop, op_RR, store_L ;1D ;RR (Ix+d),L
+instr fetch_nop, op_RL, store2_A ;17 ;RL (Ix+d),A
+instr fetch_nop, op_RR, store2_B ;18 ;RR (Ix+d),B
+instr fetch_nop, op_RR, store2_C ;19 ;RR (Ix+d),C
+instr fetch_nop, op_RR, store2_D ;1A ;RR (Ix+d),D
+instr fetch_nop, op_RR, store2_E ;1B ;RR (Ix+d),E
+instr fetch_nop, op_RR, store2_H ;1C ;RR (Ix+d),H
+instr fetch_nop, op_RR, store2_L ;1D ;RR (Ix+d),L
instr fetch_nop, op_RR, store_nop ;1E ;RR (Ix+d)
-instr fetch_nop, op_RR, store_A ;1F ;RR (Ix+d),A
-instr fetch_nop, op_SLA, store_B ;20 ;SLA (Ix+d),B
-instr fetch_nop, op_SLA, store_C ;21 ;SLA (Ix+d),C
-instr fetch_nop, op_SLA, store_D ;22 ;SLA (Ix+d),D
-instr fetch_nop, op_SLA, store_E ;23 ;SLA (Ix+d),E
-instr fetch_nop, op_SLA, store_H ;24 ;SLA (Ix+d),H
-instr fetch_nop, op_SLA, store_L ;25 ;SLA (Ix+d),L
+instr fetch_nop, op_RR, store2_A ;1F ;RR (Ix+d),A
+instr fetch_nop, op_SLA, store2_B ;20 ;SLA (Ix+d),B
+instr fetch_nop, op_SLA, store2_C ;21 ;SLA (Ix+d),C
+instr fetch_nop, op_SLA, store2_D ;22 ;SLA (Ix+d),D
+instr fetch_nop, op_SLA, store2_E ;23 ;SLA (Ix+d),E
+instr fetch_nop, op_SLA, store2_H ;24 ;SLA (Ix+d),H
+instr fetch_nop, op_SLA, store2_L ;25 ;SLA (Ix+d),L
instr fetch_nop, op_SLA, store_nop ;26 ;SLA (Ix+d)
-instr fetch_nop, op_SLA, store_A ;27 ;SLA (Ix+d),A
-instr fetch_nop, op_SRA, store_B ;28 ;SRA (Ix+d),B
-instr fetch_nop, op_SRA, store_C ;29 ;SRA (Ix+d),C
-instr fetch_nop, op_SRA, store_D ;2A ;SRA (Ix+d),D
-instr fetch_nop, op_SRA, store_E ;2B ;SRA (Ix+d),E
-instr fetch_nop, op_SRA, store_H ;2C ;SRA (Ix+d),H
-instr fetch_nop, op_SRA, store_L ;2D ;SRA (Ix+d),L
+instr fetch_nop, op_SLA, store2_A ;27 ;SLA (Ix+d),A
+instr fetch_nop, op_SRA, store2_B ;28 ;SRA (Ix+d),B
+instr fetch_nop, op_SRA, store2_C ;29 ;SRA (Ix+d),C
+instr fetch_nop, op_SRA, store2_D ;2A ;SRA (Ix+d),D
+instr fetch_nop, op_SRA, store2_E ;2B ;SRA (Ix+d),E
+instr fetch_nop, op_SRA, store2_H ;2C ;SRA (Ix+d),H
+instr fetch_nop, op_SRA, store2_L ;2D ;SRA (Ix+d),L
instr fetch_nop, op_SRA, store_nop ;2E ;SRA (Ix+d)
-instr fetch_nop, op_SRA, store_A ;2F ;SRA (Ix+d),A
-instr fetch_nop, op_SLL, store_B ;30 ;SLL (Ix+d),B
-instr fetch_nop, op_SLL, store_C ;31 ;SLL (Ix+d),C
-instr fetch_nop, op_SLL, store_D ;32 ;SLL (Ix+d),D
-instr fetch_nop, op_SLL, store_E ;33 ;SLL (Ix+d),E
-instr fetch_nop, op_SLL, store_H ;34 ;SLL (Ix+d),H
-instr fetch_nop, op_SLL, store_L ;35 ;SLL (Ix+d),L
+instr fetch_nop, op_SRA, store2_A ;2F ;SRA (Ix+d),A
+instr fetch_nop, op_SLL, store2_B ;30 ;SLL (Ix+d),B
+instr fetch_nop, op_SLL, store2_C ;31 ;SLL (Ix+d),C
+instr fetch_nop, op_SLL, store2_D ;32 ;SLL (Ix+d),D
+instr fetch_nop, op_SLL, store2_E ;33 ;SLL (Ix+d),E
+instr fetch_nop, op_SLL, store2_H ;34 ;SLL (Ix+d),H
+instr fetch_nop, op_SLL, store2_L ;35 ;SLL (Ix+d),L
instr fetch_nop, op_SLL, store_nop ;36 ;SLL (Ix+d)
-instr fetch_nop, op_SLL, store_A ;37 ;SLL (Ix+d),A
-instr fetch_nop, op_SRL, store_B ;38 ;SRL (Ix+d),B
-instr fetch_nop, op_SRL, store_C ;39 ;SRL (Ix+d),C
-instr fetch_nop, op_SRL, store_D ;3A ;SRL (Ix+d),D
-instr fetch_nop, op_SRL, store_E ;3B ;SRL (Ix+d),E
-instr fetch_nop, op_SRL, store_H ;3C ;SRL (Ix+d),H
-instr fetch_nop, op_SRL, store_L ;3D ;SRL (Ix+d),L
+instr fetch_nop, op_SLL, store2_A ;37 ;SLL (Ix+d),A
+instr fetch_nop, op_SRL, store2_B ;38 ;SRL (Ix+d),B
+instr fetch_nop, op_SRL, store2_C ;39 ;SRL (Ix+d),C
+instr fetch_nop, op_SRL, store2_D ;3A ;SRL (Ix+d),D
+instr fetch_nop, op_SRL, store2_E ;3B ;SRL (Ix+d),E
+instr fetch_nop, op_SRL, store2_H ;3C ;SRL (Ix+d),H
+instr fetch_nop, op_SRL, store2_L ;3D ;SRL (Ix+d),L
instr fetch_nop, op_SRL, store_nop ;3E ;SRL (Ix+d)
-instr fetch_nop, op_SRL, store_A ;3F ;SRL (Ix+d),A
+instr fetch_nop, op_SRL, store2_A ;3F ;SRL (Ix+d),A
instr fetch_nop, op_BIT0, store_nop ;40 ;BIT 0,(Ix+d),B
instr fetch_nop, op_BIT0, store_nop ;41 ;BIT 0,(Ix+d),C
instr fetch_nop, op_BIT0, store_nop ;42 ;BIT 0,(Ix+d),D
instr fetch_nop, op_BIT7, store_nop ;7D ;BIT 7,(Ix+d),L
instr fetch_nop, op_BIT7, store_nop ;7E ;BIT 7,(Ix+d)
instr fetch_nop, op_BIT7, store_nop ;7F ;BIT 7,(Ix+d),A
-instr fetch_nop, op_RES0, store_B ;80 ;RES 0,(Ix+d),B
-instr fetch_nop, op_RES0, store_C ;81 ;RES 0,(Ix+d),C
-instr fetch_nop, op_RES0, store_D ;82 ;RES 0,(Ix+d),D
-instr fetch_nop, op_RES0, store_E ;83 ;RES 0,(Ix+d),E
-instr fetch_nop, op_RES0, store_H ;84 ;RES 0,(Ix+d),H
-instr fetch_nop, op_RES0, store_L ;85 ;RES 0,(Ix+d),L
+instr fetch_nop, op_RES0, store2_B ;80 ;RES 0,(Ix+d),B
+instr fetch_nop, op_RES0, store2_C ;81 ;RES 0,(Ix+d),C
+instr fetch_nop, op_RES0, store2_D ;82 ;RES 0,(Ix+d),D
+instr fetch_nop, op_RES0, store2_E ;83 ;RES 0,(Ix+d),E
+instr fetch_nop, op_RES0, store2_H ;84 ;RES 0,(Ix+d),H
+instr fetch_nop, op_RES0, store2_L ;85 ;RES 0,(Ix+d),L
instr fetch_nop, op_RES0, store_nop ;86 ;RES 0,(Ix+d)
-instr fetch_nop, op_RES0, store_A ;87 ;RES 0,(Ix+d),A
-instr fetch_nop, op_RES1, store_B ;88 ;RES 1,(Ix+d),B
-instr fetch_nop, op_RES1, store_C ;89 ;RES 1,(Ix+d),C
-instr fetch_nop, op_RES1, store_D ;8A ;RES 1,(Ix+d),D
-instr fetch_nop, op_RES1, store_E ;8B ;RES 1,(Ix+d),E
-instr fetch_nop, op_RES1, store_H ;8C ;RES 1,(Ix+d),H
-instr fetch_nop, op_RES1, store_L ;8D ;RES 1,(Ix+d),L
+instr fetch_nop, op_RES0, store2_A ;87 ;RES 0,(Ix+d),A
+instr fetch_nop, op_RES1, store2_B ;88 ;RES 1,(Ix+d),B
+instr fetch_nop, op_RES1, store2_C ;89 ;RES 1,(Ix+d),C
+instr fetch_nop, op_RES1, store2_D ;8A ;RES 1,(Ix+d),D
+instr fetch_nop, op_RES1, store2_E ;8B ;RES 1,(Ix+d),E
+instr fetch_nop, op_RES1, store2_H ;8C ;RES 1,(Ix+d),H
+instr fetch_nop, op_RES1, store2_L ;8D ;RES 1,(Ix+d),L
instr fetch_nop, op_RES1, store_nop ;8E ;RES 1,(Ix+d)
-instr fetch_nop, op_RES1, store_A ;8F ;RES 1,(Ix+d),A
-instr fetch_nop, op_RES2, store_B ;90 ;RES 2,(Ix+d),B
-instr fetch_nop, op_RES2, store_C ;91 ;RES 2,(Ix+d),C
-instr fetch_nop, op_RES2, store_D ;92 ;RES 2,(Ix+d),D
-instr fetch_nop, op_RES2, store_E ;93 ;RES 2,(Ix+d),E
-instr fetch_nop, op_RES2, store_H ;94 ;RES 2,(Ix+d),H
-instr fetch_nop, op_RES2, store_L ;95 ;RES 2,(Ix+d),L
+instr fetch_nop, op_RES1, store2_A ;8F ;RES 1,(Ix+d),A
+instr fetch_nop, op_RES2, store2_B ;90 ;RES 2,(Ix+d),B
+instr fetch_nop, op_RES2, store2_C ;91 ;RES 2,(Ix+d),C
+instr fetch_nop, op_RES2, store2_D ;92 ;RES 2,(Ix+d),D
+instr fetch_nop, op_RES2, store2_E ;93 ;RES 2,(Ix+d),E
+instr fetch_nop, op_RES2, store2_H ;94 ;RES 2,(Ix+d),H
+instr fetch_nop, op_RES2, store2_L ;95 ;RES 2,(Ix+d),L
instr fetch_nop, op_RES2, store_nop ;96 ;RES 2,(Ix+d)
-instr fetch_nop, op_RES2, store_A ;97 ;RES 2,(Ix+d),A
-instr fetch_nop, op_RES3, store_B ;98 ;RES 3,(Ix+d),B
-instr fetch_nop, op_RES3, store_C ;99 ;RES 3,(Ix+d),C
-instr fetch_nop, op_RES3, store_D ;9A ;RES 3,(Ix+d),D
-instr fetch_nop, op_RES3, store_E ;9B ;RES 3,(Ix+d),E
-instr fetch_nop, op_RES3, store_H ;9C ;RES 3,(Ix+d),H
-instr fetch_nop, op_RES3, store_L ;9D ;RES 3,(Ix+d),L
+instr fetch_nop, op_RES2, store2_A ;97 ;RES 2,(Ix+d),A
+instr fetch_nop, op_RES3, store2_B ;98 ;RES 3,(Ix+d),B
+instr fetch_nop, op_RES3, store2_C ;99 ;RES 3,(Ix+d),C
+instr fetch_nop, op_RES3, store2_D ;9A ;RES 3,(Ix+d),D
+instr fetch_nop, op_RES3, store2_E ;9B ;RES 3,(Ix+d),E
+instr fetch_nop, op_RES3, store2_H ;9C ;RES 3,(Ix+d),H
+instr fetch_nop, op_RES3, store2_L ;9D ;RES 3,(Ix+d),L
instr fetch_nop, op_RES3, store_nop ;9E ;RES 3,(Ix+d)
-instr fetch_nop, op_RES3, store_A ;9F ;RES 3,(Ix+d),A
-instr fetch_nop, op_RES4, store_B ;A0 ;RES 4,(Ix+d),B
-instr fetch_nop, op_RES4, store_C ;A1 ;RES 4,(Ix+d),C
-instr fetch_nop, op_RES4, store_D ;A2 ;RES 4,(Ix+d),D
-instr fetch_nop, op_RES4, store_E ;A3 ;RES 4,(Ix+d),E
-instr fetch_nop, op_RES4, store_H ;A4 ;RES 4,(Ix+d),H
-instr fetch_nop, op_RES4, store_L ;A5 ;RES 4,(Ix+d),L
+instr fetch_nop, op_RES3, store2_A ;9F ;RES 3,(Ix+d),A
+instr fetch_nop, op_RES4, store2_B ;A0 ;RES 4,(Ix+d),B
+instr fetch_nop, op_RES4, store2_C ;A1 ;RES 4,(Ix+d),C
+instr fetch_nop, op_RES4, store2_D ;A2 ;RES 4,(Ix+d),D
+instr fetch_nop, op_RES4, store2_E ;A3 ;RES 4,(Ix+d),E
+instr fetch_nop, op_RES4, store2_H ;A4 ;RES 4,(Ix+d),H
+instr fetch_nop, op_RES4, store2_L ;A5 ;RES 4,(Ix+d),L
instr fetch_nop, op_RES4, store_nop ;A6 ;RES 4,(Ix+d)
-instr fetch_nop, op_RES4, store_A ;A7 ;RES 4,(Ix+d),A
-instr fetch_nop, op_RES5, store_B ;A8 ;RES 5,(Ix+d),B
-instr fetch_nop, op_RES5, store_C ;A9 ;RES 5,(Ix+d),C
-instr fetch_nop, op_RES5, store_D ;AA ;RES 5,(Ix+d),D
-instr fetch_nop, op_RES5, store_E ;AB ;RES 5,(Ix+d),E
-instr fetch_nop, op_RES5, store_H ;AC ;RES 5,(Ix+d),H
-instr fetch_nop, op_RES5, store_L ;AD ;RES 5,(Ix+d),L
+instr fetch_nop, op_RES4, store2_A ;A7 ;RES 4,(Ix+d),A
+instr fetch_nop, op_RES5, store2_B ;A8 ;RES 5,(Ix+d),B
+instr fetch_nop, op_RES5, store2_C ;A9 ;RES 5,(Ix+d),C
+instr fetch_nop, op_RES5, store2_D ;AA ;RES 5,(Ix+d),D
+instr fetch_nop, op_RES5, store2_E ;AB ;RES 5,(Ix+d),E
+instr fetch_nop, op_RES5, store2_H ;AC ;RES 5,(Ix+d),H
+instr fetch_nop, op_RES5, store2_L ;AD ;RES 5,(Ix+d),L
instr fetch_nop, op_RES5, store_nop ;AE ;RES 5,(Ix+d)
-instr fetch_nop, op_RES5, store_A ;AF ;RES 5,(Ix+d),A
-instr fetch_nop, op_RES6, store_B ;B0 ;RES 6,(Ix+d),B
-instr fetch_nop, op_RES6, store_C ;B1 ;RES 6,(Ix+d),C
-instr fetch_nop, op_RES6, store_D ;B2 ;RES 6,(Ix+d),D
-instr fetch_nop, op_RES6, store_E ;B3 ;RES 6,(Ix+d),E
-instr fetch_nop, op_RES6, store_H ;B4 ;RES 6,(Ix+d),H
-instr fetch_nop, op_RES6, store_L ;B5 ;RES 6,(Ix+d),L
+instr fetch_nop, op_RES5, store2_A ;AF ;RES 5,(Ix+d),A
+instr fetch_nop, op_RES6, store2_B ;B0 ;RES 6,(Ix+d),B
+instr fetch_nop, op_RES6, store2_C ;B1 ;RES 6,(Ix+d),C
+instr fetch_nop, op_RES6, store2_D ;B2 ;RES 6,(Ix+d),D
+instr fetch_nop, op_RES6, store2_E ;B3 ;RES 6,(Ix+d),E
+instr fetch_nop, op_RES6, store2_H ;B4 ;RES 6,(Ix+d),H
+instr fetch_nop, op_RES6, store2_L ;B5 ;RES 6,(Ix+d),L
instr fetch_nop, op_RES6, store_nop ;B6 ;RES 6,(Ix+d)
-instr fetch_nop, op_RES6, store_A ;B7 ;RES 6,(Ix+d),A
-instr fetch_nop, op_RES7, store_B ;B8 ;RES 7,(Ix+d),B
-instr fetch_nop, op_RES7, store_C ;B9 ;RES 7,(Ix+d),C
-instr fetch_nop, op_RES7, store_D ;BA ;RES 7,(Ix+d),D
-instr fetch_nop, op_RES7, store_E ;BB ;RES 7,(Ix+d),E
-instr fetch_nop, op_RES7, store_H ;BC ;RES 7,(Ix+d),H
-instr fetch_nop, op_RES7, store_L ;BD ;RES 7,(Ix+d),L
+instr fetch_nop, op_RES6, store2_A ;B7 ;RES 6,(Ix+d),A
+instr fetch_nop, op_RES7, store2_B ;B8 ;RES 7,(Ix+d),B
+instr fetch_nop, op_RES7, store2_C ;B9 ;RES 7,(Ix+d),C
+instr fetch_nop, op_RES7, store2_D ;BA ;RES 7,(Ix+d),D
+instr fetch_nop, op_RES7, store2_E ;BB ;RES 7,(Ix+d),E
+instr fetch_nop, op_RES7, store2_H ;BC ;RES 7,(Ix+d),H
+instr fetch_nop, op_RES7, store2_L ;BD ;RES 7,(Ix+d),L
instr fetch_nop, op_RES7, store_nop ;BE ;RES 7,(Ix+d)
-instr fetch_nop, op_RES7, store_A ;BF ;RES 7,(Ix+d),A
-instr fetch_nop, op_SET0, store_B ;C0 ;SET 0,(Ix+d),B
-instr fetch_nop, op_SET0, store_C ;C1 ;SET 0,(Ix+d),C
-instr fetch_nop, op_SET0, store_D ;C2 ;SET 0,(Ix+d),D
-instr fetch_nop, op_SET0, store_E ;C3 ;SET 0,(Ix+d),E
-instr fetch_nop, op_SET0, store_H ;C4 ;SET 0,(Ix+d),H
-instr fetch_nop, op_SET0, store_L ;C5 ;SET 0,(Ix+d),L
+instr fetch_nop, op_RES7, store2_A ;BF ;RES 7,(Ix+d),A
+instr fetch_nop, op_SET0, store2_B ;C0 ;SET 0,(Ix+d),B
+instr fetch_nop, op_SET0, store2_C ;C1 ;SET 0,(Ix+d),C
+instr fetch_nop, op_SET0, store2_D ;C2 ;SET 0,(Ix+d),D
+instr fetch_nop, op_SET0, store2_E ;C3 ;SET 0,(Ix+d),E
+instr fetch_nop, op_SET0, store2_H ;C4 ;SET 0,(Ix+d),H
+instr fetch_nop, op_SET0, store2_L ;C5 ;SET 0,(Ix+d),L
instr fetch_nop, op_SET0, store_nop ;C6 ;SET 0,(Ix+d)
-instr fetch_nop, op_SET0, store_A ;C7 ;SET 0,(Ix+d),A
-instr fetch_nop, op_SET1, store_B ;C8 ;SET 1,(Ix+d),B
-instr fetch_nop, op_SET1, store_C ;C9 ;SET 1,(Ix+d),C
-instr fetch_nop, op_SET1, store_D ;CA ;SET 1,(Ix+d),D
-instr fetch_nop, op_SET1, store_E ;CB ;SET 1,(Ix+d),E
-instr fetch_nop, op_SET1, store_H ;CC ;SET 1,(Ix+d),H
-instr fetch_nop, op_SET1, store_L ;CD ;SET 1,(Ix+d),L
+instr fetch_nop, op_SET0, store2_A ;C7 ;SET 0,(Ix+d),A
+instr fetch_nop, op_SET1, store2_B ;C8 ;SET 1,(Ix+d),B
+instr fetch_nop, op_SET1, store2_C ;C9 ;SET 1,(Ix+d),C
+instr fetch_nop, op_SET1, store2_D ;CA ;SET 1,(Ix+d),D
+instr fetch_nop, op_SET1, store2_E ;CB ;SET 1,(Ix+d),E
+instr fetch_nop, op_SET1, store2_H ;CC ;SET 1,(Ix+d),H
+instr fetch_nop, op_SET1, store2_L ;CD ;SET 1,(Ix+d),L
instr fetch_nop, op_SET1, store_nop ;CE ;SET 1,(Ix+d)
-instr fetch_nop, op_SET1, store_A ;CF ;SET 1,(Ix+d),A
-instr fetch_nop, op_SET2, store_B ;D0 ;SET 2,(Ix+d),B
-instr fetch_nop, op_SET2, store_C ;D1 ;SET 2,(Ix+d),C
-instr fetch_nop, op_SET2, store_D ;D2 ;SET 2,(Ix+d),D
-instr fetch_nop, op_SET2, store_E ;D3 ;SET 2,(Ix+d),E
-instr fetch_nop, op_SET2, store_H ;D4 ;SET 2,(Ix+d),H
-instr fetch_nop, op_SET2, store_L ;D5 ;SET 2,(Ix+d),L
+instr fetch_nop, op_SET1, store2_A ;CF ;SET 1,(Ix+d),A
+instr fetch_nop, op_SET2, store2_B ;D0 ;SET 2,(Ix+d),B
+instr fetch_nop, op_SET2, store2_C ;D1 ;SET 2,(Ix+d),C
+instr fetch_nop, op_SET2, store2_D ;D2 ;SET 2,(Ix+d),D
+instr fetch_nop, op_SET2, store2_E ;D3 ;SET 2,(Ix+d),E
+instr fetch_nop, op_SET2, store2_H ;D4 ;SET 2,(Ix+d),H
+instr fetch_nop, op_SET2, store2_L ;D5 ;SET 2,(Ix+d),L
instr fetch_nop, op_SET2, store_nop ;D6 ;SET 2,(Ix+d)
-instr fetch_nop, op_SET2, store_A ;D7 ;SET 2,(Ix+d),A
-instr fetch_nop, op_SET3, store_B ;D8 ;SET 3,(Ix+d),B
-instr fetch_nop, op_SET3, store_C ;D9 ;SET 3,(Ix+d),C
-instr fetch_nop, op_SET3, store_D ;DA ;SET 3,(Ix+d),D
-instr fetch_nop, op_SET3, store_E ;DB ;SET 3,(Ix+d),E
-instr fetch_nop, op_SET3, store_H ;DC ;SET 3,(Ix+d),H
-instr fetch_nop, op_SET3, store_L ;DD ;SET 3,(Ix+d),L
+instr fetch_nop, op_SET2, store2_A ;D7 ;SET 2,(Ix+d),A
+instr fetch_nop, op_SET3, store2_B ;D8 ;SET 3,(Ix+d),B
+instr fetch_nop, op_SET3, store2_C ;D9 ;SET 3,(Ix+d),C
+instr fetch_nop, op_SET3, store2_D ;DA ;SET 3,(Ix+d),D
+instr fetch_nop, op_SET3, store2_E ;DB ;SET 3,(Ix+d),E
+instr fetch_nop, op_SET3, store2_H ;DC ;SET 3,(Ix+d),H
+instr fetch_nop, op_SET3, store2_L ;DD ;SET 3,(Ix+d),L
instr fetch_nop, op_SET3, store_nop ;DE ;SET 3,(Ix+d)
-instr fetch_nop, op_SET3, store_A ;DF ;SET 3,(Ix+d),A
-instr fetch_nop, op_SET4, store_B ;E0 ;SET 4,(Ix+d),B
-instr fetch_nop, op_SET4, store_C ;E1 ;SET 4,(Ix+d),C
-instr fetch_nop, op_SET4, store_D ;E2 ;SET 4,(Ix+d),D
-instr fetch_nop, op_SET4, store_E ;E3 ;SET 4,(Ix+d),E
-instr fetch_nop, op_SET4, store_H ;E4 ;SET 4,(Ix+d),H
-instr fetch_nop, op_SET4, store_L ;E5 ;SET 4,(Ix+d),L
+instr fetch_nop, op_SET3, store2_A ;DF ;SET 3,(Ix+d),A
+instr fetch_nop, op_SET4, store2_B ;E0 ;SET 4,(Ix+d),B
+instr fetch_nop, op_SET4, store2_C ;E1 ;SET 4,(Ix+d),C
+instr fetch_nop, op_SET4, store2_D ;E2 ;SET 4,(Ix+d),D
+instr fetch_nop, op_SET4, store2_E ;E3 ;SET 4,(Ix+d),E
+instr fetch_nop, op_SET4, store2_H ;E4 ;SET 4,(Ix+d),H
+instr fetch_nop, op_SET4, store2_L ;E5 ;SET 4,(Ix+d),L
instr fetch_nop, op_SET4, store_nop ;E6 ;SET 4,(Ix+d)
-instr fetch_nop, op_SET4, store_A ;E7 ;SET 4,(Ix+d),A
-instr fetch_nop, op_SET5, store_B ;E8 ;SET 5,(Ix+d),B
-instr fetch_nop, op_SET5, store_C ;E9 ;SET 5,(Ix+d),C
-instr fetch_nop, op_SET5, store_D ;EA ;SET 5,(Ix+d),D
-instr fetch_nop, op_SET5, store_E ;EB ;SET 5,(Ix+d),E
-instr fetch_nop, op_SET5, store_H ;EC ;SET 5,(Ix+d),H
-instr fetch_nop, op_SET5, store_L ;ED ;SET 5,(Ix+d),L
+instr fetch_nop, op_SET4, store2_A ;E7 ;SET 4,(Ix+d),A
+instr fetch_nop, op_SET5, store2_B ;E8 ;SET 5,(Ix+d),B
+instr fetch_nop, op_SET5, store2_C ;E9 ;SET 5,(Ix+d),C
+instr fetch_nop, op_SET5, store2_D ;EA ;SET 5,(Ix+d),D
+instr fetch_nop, op_SET5, store2_E ;EB ;SET 5,(Ix+d),E
+instr fetch_nop, op_SET5, store2_H ;EC ;SET 5,(Ix+d),H
+instr fetch_nop, op_SET5, store2_L ;ED ;SET 5,(Ix+d),L
instr fetch_nop, op_SET5, store_nop ;EE ;SET 5,(Ix+d)
-instr fetch_nop, op_SET5, store_A ;EF ;SET 5,(Ix+d),A
-instr fetch_nop, op_SET6, store_B ;F0 ;SET 6,(Ix+d),B
-instr fetch_nop, op_SET6, store_C ;F1 ;SET 6,(Ix+d),C
-instr fetch_nop, op_SET6, store_D ;F2 ;SET 6,(Ix+d),D
-instr fetch_nop, op_SET6, store_E ;F3 ;SET 6,(Ix+d),E
-instr fetch_nop, op_SET6, store_H ;F4 ;SET 6,(Ix+d),H
-instr fetch_nop, op_SET6, store_L ;F5 ;SET 6,(Ix+d),L
+instr fetch_nop, op_SET5, store2_A ;EF ;SET 5,(Ix+d),A
+instr fetch_nop, op_SET6, store2_B ;F0 ;SET 6,(Ix+d),B
+instr fetch_nop, op_SET6, store2_C ;F1 ;SET 6,(Ix+d),C
+instr fetch_nop, op_SET6, store2_D ;F2 ;SET 6,(Ix+d),D
+instr fetch_nop, op_SET6, store2_E ;F3 ;SET 6,(Ix+d),E
+instr fetch_nop, op_SET6, store2_H ;F4 ;SET 6,(Ix+d),H
+instr fetch_nop, op_SET6, store2_L ;F5 ;SET 6,(Ix+d),L
instr fetch_nop, op_SET6, store_nop ;F6 ;SET 6,(Ix+d)
-instr fetch_nop, op_SET6, store_A ;F7 ;SET 6,(Ix+d),A
-instr fetch_nop, op_SET7, store_B ;F8 ;SET 7,(Ix+d),B
-instr fetch_nop, op_SET7, store_C ;F9 ;SET 7,(Ix+d),C
-instr fetch_nop, op_SET7, store_D ;FA ;SET 7,(Ix+d),D
-instr fetch_nop, op_SET7, store_E ;FB ;SET 7,(Ix+d),E
-instr fetch_nop, op_SET7, store_H ;FC ;SET 7,(Ix+d),H
-instr fetch_nop, op_SET7, store_L ;FD ;SET 7,(Ix+d),L
+instr fetch_nop, op_SET6, store2_A ;F7 ;SET 6,(Ix+d),A
+instr fetch_nop, op_SET7, store2_B ;F8 ;SET 7,(Ix+d),B
+instr fetch_nop, op_SET7, store2_C ;F9 ;SET 7,(Ix+d),C
+instr fetch_nop, op_SET7, store2_D ;FA ;SET 7,(Ix+d),D
+instr fetch_nop, op_SET7, store2_E ;FB ;SET 7,(Ix+d),E
+instr fetch_nop, op_SET7, store2_H ;FC ;SET 7,(Ix+d),H
+instr fetch_nop, op_SET7, store2_L ;FD ;SET 7,(Ix+d),L
instr fetch_nop, op_SET7, store_nop ;FE ;SET 7,(Ix+d)
-instr fetch_nop, op_SET7, store_A ;FF ;SET 7,(Ix+d),A
+instr fetch_nop, op_SET7, store2_A ;FF ;SET 7,(Ix+d),A
#endif