home *** CD-ROM | disk | FTP | other *** search
- **************************************************************************
- * *
- * Z-80 emulation routines for Amstrad CPC-Emulator *
- * Originally based on Simcpm's Z-80 emulator by Charlie Gibbs *
- * Left over from the original code are (as far as I can tell) *
- * the general source layout, most of the labels, DAA emulation, *
- * probably most of the macros, and most of the tables at the end *
- * of the file. *
- * The emulation code was rewritten to make better use of the *
- * 68000 registers, support the banking hardware and video refresh, *
- * and to emulate undocumented features as well *
- * *
- **************************************************************************
-
- XDEF simz80,sz80l,calcpca,daasp
- XDEF wword,wbyte,gword,gbyte
-
- XREF amsdos,basic,rambase,sysstat,scrbase,stack,xh,xl,ix,yh,yl,iy
- XREF DoScr,outp,inp,service,memmap
- XREF inthandler,intena,ffly,codecheck
- XREF RedrawArea,cleanup,crux
-
- INCLUDE "cpe.inc"
-
- illegl rts
-
- calcpca move.w d7,d5
- and.w #$C000,d5
- rol.w #4,d5
- move.l 0(a2,d5.w),a5
- ; jsr codecheck ; DISABLED! Read the other files
- rts
-
- gbyte move.w d5,d6
- rol.w #4,d6
- and.w #$C,d6
- move.l 0(a2,d6.w),a0
- move.b 0(a0,d5.w),d6
- rts
-
- gword move.w d5,d6
- rol.w #4,d6
- and.w #$c,d6
- move.l 0(a2,d6.w),a0
- move.b 1(a0,d5.w),d6
- lsl.w #8,d6
- move.b 0(a0,d5.w),d6
- rts
-
- wbyte move.b d6,0(a4,d5.w)
-
- testvideoram: ; also belongs to wbyte
- move.w d5,d6
- and.w #$C000,d6
- cmp.w scrbase,d6
- bne 1$
- jmp DoScr
- 1$ rts
-
- wword move.b d6,0(a4,d5.w)
- rol.w #8,d6
- move.b d6,1(a4,d5.w)
- move.w d5,d6
- and.w #$C000,d6
- cmp.w scrbase,d6
- bne 1$
- move.w d5,-(sp)
- jsr DoScr
- move.w (sp)+,d5
- addq.w #1,d5
- jmp DoScr
- 1$ rts
-
- gbpc MACRO
- moveq.l #0,d6
- move.b 0(sPCA,sPC.w),d6
- addq.w #1,sPC
- ENDM
-
- gbhl MACRO
- move.w sHL,d6
- rol.w #4,d6
- and.w #$C,d6
- move.l 0(a2,d6.w),a0
- move.b 0(a0,sHL.w),\1
- ENDM
-
- gwpc MACRO
- move.b 1(sPCA,sPC.w),\1
- rol.w #8,\1
- move.b 0(sPCA,sPC.w),\1
- addq.w #2,sPC
- ENDM
-
- jrd0 macro ;Jump relative (add D6 to program counter).
- ext.w d6
- add.w d6,sPC
- jmp (return)
- endm
-
- setflag macro ;Set Z-80 flags from 68000 flags.
- ifeq x680x0
- move sr,d5
- endc
- ifne x680x0
- dc.w $42C5
- endc
- and.w #$F,d5
- move.b 0(flagptr,d5.w),sF
- ifc '\1','SETONLY'
- mexit
- endc
- ifnc '\1',''
- move.b d5,\1
- endc
- jmp (return)
- endm
-
- inrflag macro ;Set flags after increment or decrement.
- ifeq x680x0
- move sr,d5
- endc
- ifne x680x0
- dc.w $42C5
- endc
- and.w #$E,d5
- and.w #$1,sF
- or.b 0(flagptr,d5.w),sF
- endm
-
- addflag macro ;Add and set flags.
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- add.b d6,sA
- setflag
- endm
-
- adcflag macro ;Add with carry and set flags.
- and.w #1,sF
- move.b sF,daaop3
- move.b sA,daaop1
- move.b d6,daaop2
- asr.w #1,sF
- moveq.l #0,d5
- addx.b d6,sA
- setflag
- endm
-
- sbbflag macro ;Subtract with borrow and set flags.
- move.b sA,daaop1
- move.b d6,daaop2
- and.w #1,sF
- move.b sF,d6
- nbcd.b d6
- move.b d6,daaop3
- asr.w #1,sF
- moveq.l #0,d6
- subx.b d5,sA
- setflag
- endm
-
- ashl macro ;16-bit add to or subtract from HL, set flags
- asr.b #1,sF
- ori #4,ccr
- \1x.w \2,sHL
- ifeq x680x0
- move sr,d5
- endc
- ifne x680x0
- dc.w $42C5
- endc
- and.w #$F,d5
- move.b 0(flagptr,d5.w),sF
- jmp (return)
- endm
-
- ret80 macro ;Return from subroutine.
- move.w stack,d5
- bsr gword
- addq.w #2,stack
- subq.l #4,daasp
- move.w d6,sPC
- bsr calcpca
- jmp (return)
- endm
-
- call80 macro ;Call a Z-80 subroutine.
- move.w d6,-(sp)
- subq.w #2,stack
- addq.l #4,daasp
- move.w stack,d5
- move.w sPC,d6
- bsr wword
- move.w (sp)+,sPC
- bsr calcpca
-
- jmp (return)
- endm
-
- rst80 macro ;Z-80 RST instruction
- subq.w #2,stack
- addq.l #4,daasp
- move.w stack,d5
- move.w sPC,d6
- bsr wword
- move.w #\1,sPC
- bsr calcpca
- jmp (return)
- endm
-
- docyf macro ;Copy 68000's carry flag to Z-80.
- bcs.s 1$
- bclr #0,sF
- jmp (return)
- 1$ bset #0,sF
- jmp (return)
- endm
-
- dozf macro ;Copy 68000's zero flag to Z-80.
- beq.s 1$
- and.w #$3f,sF ; clear Z & M
- jmp (return)
- 1$ and.w #$3F,sF
- bset #6,sF
- jmp (return)
- endm
-
- dozmf macro ;Copy 68000's zero flag to Z-80.
- beq.s 1$
- bclr #6,sF ; clear Z, Set M
- bset #7,sF
- jmp (return)
- 1$ bset #6,sF
- bclr #7,sF
- jmp (return)
- endm
-
- calcind macro ;Calculate (IX+d) or (IY+d).
- moveq.l #0,d5
- move.b 0(sPCA,sPC.w),d5
- ext.w d5
- addq.w #1,sPC
- add.w \1,d5
- endm
-
- simz80 lea memmap,a2
- lea rambase,a4
- lea optabl,a3
- lea flags,flagptr
- lea sz80l,return
- move.l #daastmid,daasp
- clr.l d5
- and.w #$FF,sA
- bsr calcpca
-
- ; The inthandler currently is *STUPID*
- ; it only counts instructions, and when a certain number is reached
- ; (300) it generates an interrupt. This is bad. The code in the PC
- ; version is *MUCH* more elaborate.
-
- sz80l jsr inthandler
- sz80gb gbpc
- addq.b #2,sRF+1
- add.w d6,d6
- add.w d6,d6
- move.l 0(a3,d6.w),a0
- jmp (a0)
-
- *************************************************************************
- * *
- * Opcode simulation routines *
- * *
- *************************************************************************
-
- nop00 jmp (return) ;00 NOP
-
- lxib gwpc sBC ;01 LD BC,nnnn
- jmp (return)
-
- staxb move.w sBC,d5 ;02 LD (BC),A
- move.b sA,0(a4,d5.w)
- bsr testvideoram
- jmp (return)
-
- inxb addq.w #1,sBC ;03 INC BC
- jmp (return)
-
- inrb rol.w #8,sBC ;04 INC B
- addq.b #1,sBC
- inrflag
- rol.w #8,sBC
- jmp (return)
-
- dcrb rol.w #8,sBC ;05 DEC B
- subq.b #1,sBC
- inrflag
- rol.w #8,sBC
- jmp (return)
-
- mvib rol.w #8,sBC ;06 LD B,nn
- move.b 0(sPCA,sPC.w),sBC
- addq.w #1,sPC
- rol.w #8,sBC
- jmp (return)
-
- rlc rol.b #1,sA ;07 RLCA
- docyf
-
- exaf swap sA ;08 EX AF,AF'
- swap sF
- move.l daaop1,d5
- move.l daaop1b,daaop1
- move.l d5,daaop1b
- jmp (return)
-
- dadb add.w sBC,sHL ;09 ADD HL,BC
- docyf
-
- ldaxb move.w sBC,d5 ;0A LD A,(BC)
- bsr gbyte
- move.b d6,sA
- jmp (return)
-
- dcxb subq.w #1,sBC ;0B DEC BC
- jmp (return)
-
- inrc addq.b #1,sBC ;0C INC C
- inrflag
- jmp (return)
-
- dcrc subq.b #1,sBC ;0D DEC C
- inrflag
- jmp (return)
-
- mvic move.b 0(sPCA,sPC.w),sBC ;0E LD C,nn
- addq.w #1,sPC
- jmp (return)
-
- rrc ror.b #1,sA ;0F RRCA
- docyf
-
- djnz gbpc ;10 DJNZ dd
- sub.w #$100,sBC
- move.w sBC,d5
- and.w #$FF00,d5
- beq.s lxidx
- jrd0
-
- lxid gwpc sDE ;11 LD DE,nnnn
- lxidx jmp (return)
-
- staxd move.w sDE,d5 ;12 LD (DE),A
- move.b sA,0(a4,d5.w)
- bsr testvideoram
- jmp (return)
-
- inxd addq.w #1,sDE ;13 INC DE
- jmp (return)
-
- inrd rol.w #8,sDE ;14 INC D
- addq.b #$1,sDE
- inrflag
- rol.w #8,sDE
- jmp (return)
-
- dcrd rol.w #8,sDE ;15 DEC D
- subq.b #1,sDE
- inrflag
- rol.w #8,sDE
- jmp (return)
-
- mvid rol.w #8,sDE ;16 LD D,nn
- move.b 0(sPCA,sPC.w),sDE
- addq.w #1,sPC
- rol.w #8,sDE
- jmp (return)
-
- ral roxr.b #1,sF ;17 RLA
- roxl.b #1,sA
- roxl.b #1,sF
- jmp (return)
-
- jr gbpc ;18 JR dd
- jrd0
-
- dadd add.w sDE,sHL ;19 ADD HL,DE
- docyf
-
- ldaxd move.w sDE,d5 ;1A LD A,(DE)
- bsr gbyte
- move.b d6,sA
- jmp (return)
-
- dcxd subq.w #1,sDE ;1B DEC DE
- jmp (return)
-
- inre addq.b #1,sDE ;1C INC E
- inrflag
- jmp (return)
-
- dcre subq.b #1,sDE ;1D DEC E
- inrflag
- jmp (return)
-
- mvie move.b 0(sPCA,sPC.w),sDE ;1E LD E,nn
- addq.w #1,sPC
- jmp (return)
-
- rar roxr.b #1,sF ;1F RRA
- roxr.b #1,sA
- roxl.b #1,sF
- jmp (return)
-
- jrnz gbpc ;20 JR NZ,dd
- btst #6,sF
- bne.s lxihx
- jrd0
-
- lxih gwpc sHL ;21 LD HL,nnnn
- lxihx jmp (return)
-
- shld gwpc d5 ;22 LD (nnnn),HL
- move.w sHL,d6
- bsr wword
- jmp (return)
-
- inxh addq.w #1,sHL ;23 INC HL
- jmp (return)
-
- inrh rol.w #8,sHL ;24 INC H
- addq.b #1,sHL
- inrflag
- rol.w #8,sHL
- jmp (return)
-
- dcrh rol.w #8,sHL ;25 DEC H
- subq.b #1,sHL
- inrflag
- rol.w #8,sHL
- jmp (return)
-
- mvih rol.w #8,sHL ;26 LD H,nn
- move.b 0(sPCA,sPC.w),sHL
- addq.w #1,sPC
- rol.w #8,sHL
- jmp (return)
-
- ; This is my favourite bug. Try
- ; 10 WHILE 1=1
- ; 20 PRINT PI;
- ; 30 WEND
- ; See what happens.
- ; The problem: We have no half-carry on the 68000, because it has commands
- ; like ABCD and SBCD. This makes it difficult to emulate this flag.
- ; In the SimCPM code, the operands as well as the flag register of the
- ; previous ADD/SUB instruction were saved in daaop?. I didn't change this,
- ; but this lead to the strange problem mentioned above. The cause:
- ; Interrupts. So, I now have set up a small extra stack for the daaop?
- ; variables, which get saved on every PUSH/POP AX. An ugly kluge, I agree.
- ; That's why you're reading the source, to FIX IT IMMEDIATELY (I hope :-)
-
- daa move.b daaop2,sA ;27 DAA FIXME!!!!
- move.b daaop1,d6
- move.b daaop3,d5
- tst.b d5
- beq daa_nocarry
- cmp.b #1,d5
- bne daa_minus
- move #4,ccr
- abcd d5,sA
- setflag SETONLY
- daa_op2:
- move.b sF,-(sp)
- move #4,ccr
- abcd d6,sA
- setflag SETONLY
- move.b (sp)+,d5
- and.b #1,d5
- or.b d5,sF ; quite a complicated mechanism to get the
- jmp (return) ; carry flag
-
- daa_minus:
- moveq #1,d5
- move #4,ccr
- sbcd d5,sA
- setflag SETONLY
- bra daa_op2
-
- daa_nocarry:
- move #4,ccr
- abcd d6,sA
- setflag
-
- jrz gbpc ;28 JR Z,dd
- btst #6,sF
- beq.s lhldx
- jrd0
-
- dadh add.w sHL,sHL ;29 ADD HL,HL
- docyf
-
- lhld gwpc d5 ;2A LD HL,(nnnn)
- bsr gword
- move.w d6,sHL
- lhldx jmp (return)
-
- dcxh subq.w #1,sHL ;2B DEC HL
- jmp (return)
-
- inrl addq.b #1,sHL ;2C INC L
- inrflag
- jmp (return)
-
- dcrl subq.b #1,sHL ;2D DEC L
- inrflag
- jmp (return)
-
- mvil move.b 0(sPCA,sPC.w),sHL ;2E LD L,nn
- addq.w #1,sPC
- jmp (return)
-
- cma not.b sA ;2F CPL
- jmp (return)
-
- jrnc gbpc ;30 JR NC,dd
- btst #0,sF
- bne.s lxisx
- jrd0
-
- lxis gwpc d6 ;31 LD SP,nnnn
- move.w d6,stack
- move.l #daastmid,daasp
- lxisx jmp (return)
-
- sta gwpc d5 ;32 LD (nnnn),A
- move.b sA,d6
- bsr wbyte
- jmp (return)
-
- inxs addq.w #1,stack ;33 INC SP
- subq.l #2,daasp
- jmp (return)
-
- inrm gbhl d6 ;34 INC (HL)
- addq.b #1,d6
- inrflag
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- dcrm gbhl d6 ;35 DEC (HL)
- subq.b #1,d6
- inrflag
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- mvim gbpc ;36 LD (HL),nn
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- stc bset #0,sF ;37 SCF
- jmp (return)
-
- jrc gbpc ;38 JR C,dd
- btst #0,sF
- beq.s ldax
- jrd0
-
- dads add.w stack,sHL ;39 ADD HL,SP
- docyf
-
- lda gwpc d5 ;3A LD A,(nnnn)
- bsr gbyte
- move.b d6,sA
- ldax jmp (return)
-
- dcxs subq.w #1,stack ;3B DEC SP
- addq.l #2,daasp
- jmp (return)
-
- inra addq.b #1,sA ;3C INC A
- inrflag
- jmp (return)
-
- dcra subq.b #1,sA ;3D DEC A
- inrflag
- jmp (return)
-
- mvia move.b 0(sPCA,sPC.w),sA ;3E LD A,nn
- addq.w #1,sPC
- jmp (return)
-
- cmc bchg #0,sF ;3F CCF
- jmp (return)
-
- movebb jmp (return) ;40 LD B,B
-
- movebc move.w sBC,d5 ;41 LD B,C
- rol.w #8,sBC
- move.b d5,sBC
- jmp (return)
-
- movebd move.w sDE,d5 ;42 LD B,D
- move.b sBC,d5
- move.w d5,sBC
- jmp (return)
-
- movebe move.w sDE,d5 ;43 LD B,E
- rol.w #8,d5
- move.b sBC,d5
- move.w d5,sBC
- jmp (return)
-
- movebh move.w sHL,d5 ;44 LD B,H
- move.b sBC,d5
- move.w d5,sBC
- jmp (return)
-
- movebl rol.w #8,sBC ;45 LD B,L
- move.b sHL,sBC
- rol.w #8,sBC
- jmp (return)
-
- movebm rol.w #8,sBC ;46 LD B,(HL)
- gbhl sBC
- rol.w #8,sBC
- jmp (return)
-
- moveba rol.w #8,sBC ;47 LD B,A
- move.b sA,sBC
- rol.w #8,sBC
- jmp (return)
-
- movecb move.w sBC,d5 ;48 LD C,B
- rol.w #8,d5
- move.b d5,sBC
- jmp (return)
-
- movecc jmp (return) ;49 LD C,C
-
- movecd move.w sDE,d5 ;4A LD C,D
- rol.w #8,d5
- move.b d5,sBC
- jmp (return)
-
- movece move.b sDE,sBC ;4B LD C,E
- jmp (return)
-
- movech move.w sHL,d5 ;4C LD C,H
- rol.w #8,d5
- move.b d5,sBC
- jmp (return)
-
- movecl move.b sHL,sBC ;4D LD C,L
- jmp (return)
-
- movecm gbhl sBC ;4E LD C,(HL)
- jmp (return)
-
- moveca move.b sA,sBC ;4F LD C,A
- jmp (return)
-
- movedb move.w sBC,d5 ;50 LD D,B
- move.b sDE,d5
- move.w d5,sDE
- jmp (return)
-
- movedc rol.w #8,sDE ;51 LD D,C
- move.b sBC,sDE
- rol.w #8,sDE
- jmp (return)
-
- movedd jmp (return) ;52 LD D,D
-
- movede move.b sDE,d5 ;53 LD D,E
- rol.w #8,sDE
- move.b d5,sDE
- jmp (return)
-
- movedh move.w sHL,d5 ;54 LD D,H
- move.b sDE,d5
- move.w d5,sDE
- jmp (return)
-
- movedl rol.w #8,sDE ;55 LD D,L
- move.b sHL,sDE
- rol.w #8,sDE
- jmp (return)
-
- movedm rol.w #8,sDE ;56 LD D,(HL)
- gbhl sDE
- rol.w #8,sDE
- jmp (return)
-
- moveda rol.w #8,sDE ;57 LD D,A
- move.b sA,sDE
- rol.w #8,sDE
- jmp (return)
-
- moveeb move.w sBC,d5 ;58 LD E,B
- rol.w #8,d5
- move.b d5,sDE
- jmp (return)
-
- moveec move.b sBC,sDE ;59 LD E,C
- jmp (return)
-
- moveed move.w sDE,d5 ;5A LD E,D
- rol.w #8,d5
- move.b d5,sDE
- jmp (return)
-
- moveee move.b sDE,sDE ;5B LD E,E
- jmp (return)
-
- moveeh move.w sHL,d5 ;5C LD E,H
- rol.w #8,d5
- move.b d5,sDE
- jmp (return)
-
- moveel move.b sHL,sDE ;5D LD E,L
- jmp (return)
-
- moveem gbhl sDE ;5E LD E,(HL)
- jmp (return)
-
- moveea move.b sA,sDE ;5F LD E,A
- jmp (return)
-
- movehb move.w sBC,d5 ;60 LD H,B
- move.b sHL,d5
- move.w d5,sHL
- jmp (return)
-
- movehc rol.w #8,sHL ;61 LD H,C
- move.b sBC,sHL
- rol.w #8,sHL
- jmp (return)
-
- movehd move.w sDE,d5 ;62 LD H,D
- move.b sHL,d5
- move.w d5,sHL
- jmp (return)
-
- movehe rol.w #8,sHL ;63 LD H,E
- move.b sDE,sHL
- rol.w #8,sHL
- jmp (return)
-
- movehh jmp (return) ;64 LD H,H
-
- movehl move.w sHL,d5 ;65 LD H,L
- rol.w #8,sHL
- move.b d5,sHL
- jmp (return)
-
- movehm gbhl d6 ;66 LD H,(HL)
- rol.w #8,sHL
- move.b d6,sHL
- rol.w #8,sHL
- jmp (return)
-
- moveha rol.w #8,sHL ;67 LD H,A
- move.b sA,sHL
- rol.w #8,sHL
- jmp (return)
-
- movelb move.w sBC,d5 ;68 LD L,B
- rol.w #8,d5
- move.b d5,sHL
- jmp (return)
-
- movelc move.b sBC,sHL ;69 LD L,C
- jmp (return)
-
- moveld move.w sDE,d5 ;6A LD L,D
- rol.w #8,d5
- move.b d5,sHL
- jmp (return)
-
- movele move.b sDE,sHL ;6B LD L,E
- jmp (return)
-
- movelh move.w sHL,d5 ;6C LD L,H
- rol.w #8,d5
- move.b d5,sHL
- jmp (return)
-
- movell move.b sHL,sHL ;6D LD L,L
- jmp (return)
-
- movelm gbhl sHL ;6E LD L,(HL)
- jmp (return)
-
- movela move.b sA,sHL ;6F LD L,A
- jmp (return)
-
- movemb move.w sHL,d5 ;70 LD (HL),B
- move.w sBC,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- movemc move.w sHL,d5 ;71 LD (HL),C
- move.b sBC,d6
- bsr wbyte
- jmp (return)
-
- movemd move.w sHL,d5 ;72 LD (HL),D
- move.w sDE,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- moveme move.w sHL,d5 ;73 LD (HL),E
- move.b sDE,d6
- bsr wbyte
- jmp (return)
-
- movemh move.w sHL,d5 ;74 LD (HL),H
- move.w sHL,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- moveml move.w sHL,d5 ;75 LD (HL),L
- move.b sHL,d6
- bsr wbyte
- jmp (return)
-
- halt jsr service ;76 HALT
- jmp (return)
-
- movema move.w sHL,d5 ;77 LD (HL),A
- move.b sA,d6
- bsr wbyte
- jmp (return)
-
- moveab move.w sBC,d5 ;78 LD A,B
- rol.w #8,d5
- move.b d5,sA
- jmp (return)
-
- moveac move.b sBC,sA ;79 LD A,C
- jmp (return)
-
- movead move.w sDE,d5 ;7A LD A,D
- rol.w #8,d5
- move.b d5,sA
- jmp (return)
-
- moveae move.b sDE,sA ;7B LD A,E
- jmp (return)
-
- moveah move.w sHL,d5 ;7C LD A,H
- rol.w #8,d5
- move.b d5,sA
- jmp (return)
-
- moveal move.b sHL,sA ;7D LD A,L
- jmp (return)
-
- moveam gbhl sA ;7E LD A,(HL)
- jmp (return)
-
- moveaa jmp (return) ;7F LD A,A
-
- addb move.w sBC,d6 ;80 ADD A,B
- rol.w #8,d6
- addflag
-
- addc move.b sBC,daaop1 ;81 ADD A,C
- move.b sA,daaop2
- clr.b daaop3
- add.b sBC,sA
- setflag
-
- addd move.w sDE,d6 ;82 ADD A,D
- rol.w #8,d6
- addflag
-
- adde move.b sDE,daaop1 ;83 ADD A,E
- move.b sA,daaop2
- clr.b daaop3
- add.b sDE,sA
- setflag
-
- addh move.w sHL,d6 ;84 ADD A,H
- rol.w #8,d6
- addflag
-
- addl move.b sHL,daaop1 ;85 ADD A,L
- move.b sA,daaop2
- clr.b daaop3
- add.b sHL,sA
- setflag
-
- addm gbhl d6 ;86 ADD A,(HL)
- addflag
-
- adda move.b sA,daaop1 ;87 ADD A,A
- move.b sA,daaop2
- clr.b daaop3
- add.b sA,sA
- setflag
-
- adcb move.w sBC,d6 ;88 ADC A,B
- rol.w #8,d6
- adcflag
-
- adcc move.b sBC,d6 ;89 ADC A,C
- adcflag
-
- adcd move.w sDE,d6 ;8A ADC A,D
- rol.w #8,d6
- adcflag
-
- adce move.b sDE,d6 ;8B ADC A,E
- adcflag
-
- adch move.w sHL,d6 ;8C ADC A,H
- rol.w #8,d6
- adcflag
-
- adcl move.b sHL,d6 ;8D ADC A,L
- adcflag
-
- adcm gbhl d6 ;8E ADC A,(HL)
- adcflag
-
- adca move.b sA,d6 ;8F ADC A,A
- adcflag
-
- subb move.w sBC,d5 ;90 SUB A,B
- rol.w #8,d5
- move.b d5,d6
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- subc move.b sBC,d6 ;91 SUB A,C
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b sBC,sA
- setflag
-
- subd move.w sDE,d5 ;92 SUB A,D
- rol.w #8,d5
- move.b d5,d6
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- sube move.b sDE,d6 ;93 SUB A,E
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b sDE,sA
- setflag
-
- subh move.w sHL,d5 ;94 SUB A,H
- rol.w #8,d5
- move.b d5,d6
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- subl move.b sHL,d6 ;95 SUB A,L
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b sHL,sA
- setflag
-
- subm gbhl d6 ;96 SUB A,(HL)
- move.b d6,d5
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- suba move.b sA,daaop2 ;97 SUB A,A
- move.b sA,d6
- nbcd d6
- move.b d6,daaop1
- clr.b daaop3
- sub.b sA,sA
- setflag
-
- sbbb move.w sBC,d5 ;98 SBC A,B
- rol.w #8,d5
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbc move.b sBC,d5 ;99 SBC A,C
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbd move.w sDE,d5 ;9A SBC A,D
- rol.w #8,d5
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbe move.b sDE,d5 ;9B SBC A,E
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbh move.w sHL,d5 ;9C SBC A,H
- rol.w #8,d5
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbl move.b sHL,d5 ;9D SBC A,L
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbm gbhl d6 ;9E SBC A,(HL)
- move.b d6,d5
- nbcd d6
- sbbflag
-
- sbba move.b sA,d5 ;9F SBC A,A
- move.b d5,d6
- nbcd d6
- sbbflag
-
- andb move.w sBC,d5 ;A0 AND A,B
- rol.w #8,d5
- and.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- andc and.b sBC,sA ;A1 AND A,C
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- andd move.w sDE,d5 ;A2 AND A,D
- rol.w #8,d5
- and.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- ande and.b sDE,sA ;A3 AND A,E
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- andh move.w sHL,d5 ;A4 AND A,H
- rol.w #8,d5
- and.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- andl and.b sHL,sA ;A5 AND A,L
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- andm gbhl d6 ;A6 AND A,(HL)
- and.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- anda and.b sA,sA
- move.b 16(flagptr,sA.w),sF ;A7 AND A,A
- jmp (return)
-
- xrab move.w sBC,d5 ;A8 XOR A,B
- rol.w #8,d5
- eor.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xrac eor.b sBC,sA ;A9 XOR A,C
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xrad move.w sDE,d5 ;AA XOR A,D
- rol.w #8,d5
- eor.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xrae eor.b sDE,sA ;AB XOR A,E
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xrah move.w sHL,d5 ;AC XOR A,H
- rol.w #8,d5
- eor.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xral eor.b sHL,sA ;AD XOR A,L
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xram gbhl d6 ;AE XOR A,(HL)
- eor.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xraa eor.w sA,sA ;AF XOR A,A
- move.b 16(flagptr),sF
- jmp (return)
-
- orab move.w sBC,d5 ;B0 OR A,B
- rol.w #8,d5
- or.b d5,sA
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- orac or.b sBC,sA ;B1 OR A,C
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- orad move.w sDE,d5 ;B2 OR A,D
- rol.w #8,d5
- or.b d5,sA
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- orae or.b sDE,sA ;B3 OR A,E
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- orah move.w sHL,d5 ;B4 OR A,H
- rol.w #8,d5
- or.b d5,sA
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- oral or.b sHL,sA ;B5 OR A,L
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- oram gbhl d6 ;B6 OR A,(HL)
- or.b d6,sA
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- oraa or.b sA,sA
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF ;B7 OR A,A
- jmp (return)
-
- cmpb move.w sBC,d5 ;B8 CP B
- rol.w #8,d5
- cmp.b d5,sA
- setflag
-
- cmpc cmp.b sBC,sA ;B9 CP C
- setflag
-
- cmpd move.w sDE,d5 ;BA CP D
- rol.w #8,d5
- cmp.b d5,sA
- setflag
-
- cmpe cmp.b sDE,sA ;BB CP E
- setflag
-
- cmph move.w sHL,d5 ;BC CP H
- rol.w #8,d5
- cmp.b d5,sA
- setflag
-
- cmpl cmp.b sHL,sA ;BD CP L
- setflag
-
- cmpam gbhl d6 ;BE CP (HL)
- cmp.b d6,sA
- setflag
-
- cmpaa cmp.b sA,sA ;BF CP A
- setflag
-
- rnz btst #6,sF ;C0 RET NZ
- bne.s popbx
- ret80
-
- popb move.w stack,d5 ;C1 POP BC
- bsr gword
- addq.w #2,stack
- move.w d6,sBC
- subq.l #4,daasp
- popbx jmp (return)
-
- jnz gwpc d6 ;C2 JP NZ,addr
- btst #6,sF
- bne.s jnzx
- move.w d6,sPC
- bsr calcpca
- jnzx jmp (return)
-
- jmpa gwpc d6 ;C3 JP addr
- move.w d6,sPC
- bsr calcpca
- jmp (return)
-
- cnz gwpc d6 ;C4 CALL NZ,addr
- btst #6,sF
- bne.s jnzx
- call80
-
- pushb move.w stack,d5 ;C5 PUSH BC
- subq.w #2,d5
- move.w d5,stack
- move.w sBC,d6
- bsr wword
- addq.l #4,daasp
- jmp (return)
-
- adi gbpc ;C6 ADD A,nn
- addflag
-
- rst0 rst80 $0 ;C7 RST 0
-
- rz btst #6,sF ;C8 RET Z
- beq.s jzx
- ret ret80 ;C9 RET
-
- jz gwpc d6 ;CA JP Z,addr
- btst #6,sF
- beq.s jzx
- move.w d6,sPC
- bsr calcpca
- jzx jmp (return)
-
- cz gwpc d6 ;CC CALL Z,addr
- btst #6,sF
- beq.s jzx
- call80
-
- call gwpc d6 ;CD CALL addr
- call80
-
- aci gbpc ;CE ADC A,nn
- adcflag
-
- rst1 rst80 $8 ;CF RST 1
-
- rnc btst #0,sF ;D0 RET NC
- bne.s jncx
- ret80
-
- popd move.w stack,d5 ;D1 POP DE
- bsr gword
- move.w d6,sDE
- addq.w #2,stack
- subq.l #4,daasp
- jmp (return)
-
- jnc gwpc d6 ;D2 JP NC,addr
- btst #0,sF
- bne.s jncx
- move.w d6,sPC
- bsr calcpca
- jncx jmp (return)
-
- out gbpc ;D3 OUT (nn),A
- move.b d6,d5
- move.b sA,d6
- jsr outp
- jmp (return)
-
- cnc gwpc d6 ;D4 CALL NC,addr
- btst #0,sF
- bne.s jncx
- call80
-
- pushd move.w stack,d5 ;D5 PUSH DE
- subq.w #2,d5
- move.w d5,stack
- move.w sDE,d6
- bsr wword
- addq.l #4,daasp
- jmp (return)
-
- sui gbpc ;D6 SUB A,nn
- move.b d6,d5
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- rst2 rst80 $10 ;D7 RST 2
-
- rc btst #0,sF ;D8 RET C
- beq.s jcx
- ret80
-
- exx swap sBC ;D9 EXX
- swap sHL
- swap sDE
- jmp (return)
-
- jc gwpc d6 ;DA JP C,addr
- btst #0,sF
- beq.s jcx
- move.w d6,sPC
- bsr calcpca
- jcx jmp (return)
-
- in gbpc ;DB IN A,(nn)
- move.b d6,d5
- jsr inp
- move.b d6,sA
- jmp (return)
-
- cc gwpc d6 ;DC CALL C,addr
- btst #0,sF
- beq jpox
- call80
-
- sbi gbpc ;DE SBC A,nn
- move.b d6,d5
- nbcd d6
- sbbflag
-
- rst3 rst80 $18 ;DF RST 3
-
- rpo btst #2,sF ;E0 RET PO
- bne.s jpox
- ret80
-
- poph move.w stack,d5 ;E1 POP HL
- bsr gword
- move.w d6,sHL
- addq.w #2,stack
- subq.l #4,daasp
- jmp (return)
-
- jpo gwpc d6 ;E2 JP PO,addr
- btst #2,sF
- bne.s jpox
- move.w d6,sPC
- bsr calcpca
- jpox jmp (return)
-
- xthl move.w stack,d5 ;E3 EX (SP),HL
- bsr gword
- move.w d6,-(sp)
- move.w stack,d5
- move.w sHL,d6
- bsr wword
- move.w (sp)+,sHL
- jmp (return)
-
- cpo gwpc d6 ;E4 CALL PO,addr
- btst #2,sF
- bne.s jpox
- call80
-
- pushh subq.w #2,stack ;E5 PUSH HL
- move.w stack,d5
- move.w sHL,d6
- bsr wword
- addq.l #4,daasp
- jmp (return)
-
- ani gbpc ;E6 AND nn
- and.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- rst4 rst80 $20 ;E7 RST 4
-
- rpe btst #2,sF ;E8 RET PE
- beq.s jpex
- ret80
-
- pchl move.w sHL,sPC ;E9 JP (HL)
- bsr calcpca
- jmp (return)
-
- jpe gwpc d6 ;EA JP PE,addr
- btst #2,sF
- beq.s jpex
- move.w d6,sPC
- bsr calcpca
- jpex jmp (return)
-
- xchg move.w sHL,d6 ;EB EX DE,HL
- move.w sDE,sHL ;exg.w DOESN'T work!
- move.w d6,sDE
- jmp (return)
-
- cpe gwpc d6 ;EC CALL PE,addr
- btst #2,sF
- beq.s jpex
- call80
-
- xri gbpc ;EE XOR nn
- eor.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- rst5 rst80 $28 ;EF RST 5
-
- rp btst #7,sF ;F0 RET P
- bne jpx
- ret80
-
- ; Ugh! This is ugly. Read the comment for DAA as well.
-
- popp move.w stack,d5 ;F1 POP AF
- bsr gbyte
- move.b d6,sF
- addq.w #1,d5
- bsr gbyte
- move.b d6,sA
- addq.w #2,stack
- move.l daasp,a0
- move.l -(a0),daaop1
- move.l a0,daasp
- jmp (return)
-
- jp gwpc d6 ;F2 JP P,addr
- btst #7,sF
- bne.s jpx
- move.w d6,sPC
- bsr calcpca
- jpx jmp (return)
-
- di clr.w intena
- jmp (return) ;F3 DI
-
- cp gwpc d6 ;F4 CALL P,addr
- btst #7,sF
- bne.s jpx
- call80
-
- ; Ugh! This is ugly. Read the comment for DAA as well.
-
- pushp move.w stack,d5 ;F5 PUSH AF
- subq.w #1,d5
- move.b sA,d6
- bsr wbyte
- subq.w #2,stack
- move.w stack,d5
- move.b sF,d6
- bsr wbyte
- move.l daasp,a0
- cmp.l #daastack,a0
- bcs pushp_stackerr
- cmp.l #daastackend,a0
- bcc pushp_stackerr
- move.l daaop1,(a0)+
- move.l a0,daasp
- jmp (return)
- pushp_stackerr
- jmp (return)
-
- oria gbpc ;F6 OR nn
- or.b d6,sA
- move.b sA,daaop1
- clr.b daaop2
- clr.b daaop3
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- rst6 rst80 $30 ;F7 RST 6
-
- rm btst #7,sF ;F8 RET M
- beq.s jmx
- ret80
-
- sphl move.w sHL,stack ;F9 LD SP,HL
- move.l #daastmid,daasp
- jmp (return)
-
- jm gwpc d6 ;FA JP M,addr
- btst #7,sF
- beq.s jmx
- move.w d6,sPC
- bsr calcpca
- jmx jmp (return)
-
- ei move.w #2,intena
- jmp (return) ;FB EI
-
- cm gwpc d6 ;FC CALL M,addr
- btst #7,sF
- beq.s jmx
- call80
-
- cpi gbpc ;FE CP nn
- cmp.b d6,sA
- setflag
-
- rst7 rst80 $38 ;FF RST 7
-
- *************************************************************************
- * *
- * Z-80 opcode simulation routines *
- * *
- *************************************************************************
-
- preCB gbpc
- addq.b #2,sRF+1
- add.w d6,d6
- add.w d6,d6
- lea CBoptab,a0
- move.l 0(a0,d6.w),a0
- jmp (a0)
-
- preDD moveq #0,d6
- gbpc
- addq.b #2,sRF+1
- add.w d6,d6
- add.w d6,d6
- lea DDoptab,a0
- move.l 0(a0,d6.w),a0
- jmp (a0)
-
- prDDCB calcind ix
- prDDCBs move.w d5,-(sp)
- gbpc
- addq.b #2,sRF+1
- move.b d6,d5
- and.b #7,d6
- cmp.b #6,d6
- bne ilgDDCB
- move.b d5,d6
- lsr.b #3,d6
- lsl.w #2,d6
- lea DDCBopt,a0
- move.w (sp)+,d5
- move.l 0(a0,d6.w),a0
- jmp (a0)
-
- preED gbpc
- addq.b #2,sRF+1
- add.w d6,d6
- add.w d6,d6
- lea EDoptab,a0
- move.l 0(a0,d6.w),a0
- jmp (a0)
-
- preFD gbpc
- addq.b #2,sRF+1
- add.w d6,d6
- add.w d6,d6
- lea FDoptab,a0
- move.l 0(a0,d6.w),a0
- jmp (a0)
-
- prFDCB calcind iy
- bra prDDCBs
-
- ilgDDCB move.w (sp)+,d5
- illgED jmp (return)
-
- rlcb rol.w #8,sBC ;CB00 RLC B
- rol.b #1,sBC
- setflag SETONLY
- rol.w #8,sBC
- jmp (return)
-
- rlcc rol.b #1,sBC ;CB01 RLC C
- setflag
-
- rlcd rol.w #8,sDE ;CB02 RLC D
- rol.b #1,sDE
- setflag SETONLY
- rol.w #8,sDE
- jmp (return)
-
- rlce rol.b #1,sDE ;CB03 RLC E
- setflag
-
- rlch rol.w #8,sHL ;CB04 RLC H
- rol.b #1,sHL
- setflag SETONLY
- rol.w #8,sHL
- jmp (return)
-
- rlcl rol.b #1,sHL ;CB05 RLC L
- setflag
-
- rlcm gbhl d6 ;CB06 RLC (HL)
- rol.b #1,d6
- setflag SETONLY
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- rlca rol.b #1,sA ;CB07 RLC A
- setflag
-
- rrcb rol.w #8,sBC ;CB08 RRC B
- ror.b #1,sBC
- setflag SETONLY
- rol.w #8,sBC
- jmp (return)
-
- rrcc ror.b #1,sBC ;CB09 RRC C
- setflag
-
- rrcd rol.w #8,sDE ;CB0A RRC D
- ror.b #1,sDE
- setflag SETONLY
- rol.w #8,sDE
- jmp (return)
-
- rrce ror.b #1,sDE ;CB0B RRC E
- setflag
-
- rrch rol.w #8,sHL ;CB0C RRC H
- ror.b #1,sHL
- setflag SETONLY
- rol.w #8,sHL
- jmp (return)
-
- rrcl ror.b #1,sHL ;CB0D RRC L
- setflag
-
- rrcm gbhl d6 ;CB0E RRC (HL)
- ror.b #1,d6
- setflag SETONLY
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- rrca ror.b #1,sA ;CB0F RRC A
- setflag
-
- rlrb rol.w #8,sBC ;CB10 RL B
- roxr.b #1,sF
- roxl.b #1,sBC
- setflag SETONLY
- rol.w #8,sBC
- jmp (return)
-
- rlrc roxr.b #1,sF ;CB11 RL C
- roxl.b #1,sBC
- setflag
-
- rlrd rol.w #8,sDE ;CB12 RL D
- roxr.b #1,sF
- roxl.b #1,sDE
- setflag SETONLY
- rol.w #8,sDE
- jmp (return)
-
- rlre roxr.b #1,sF ;CB13 RL E
- roxl.b #1,sDE
- setflag
-
- rlrh rol.w #8,sHL ;CB14 RL H
- roxr.b #1,sF
- roxl.b #1,sHL
- setflag SETONLY
- rol.w #8,sHL
- jmp (return)
-
- rlrl roxr.b #1,sF ;CB15 RL L
- roxl.b #1,sHL
- setflag
-
- rlrm gbhl d6 ;CB16 RL (HL)
- roxr.b #1,sF
- roxl.b #1,d6
- setflag SETONLY
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- rlra roxr.b #1,sF ;CB17 RL A
- roxl.b #1,sA
- setflag
-
- rrrb rol.w #8,sBC ;CB18 RR B
- roxr.b #1,sF
- roxr.b #1,sBC
- setflag SETONLY
- rol.w #8,sBC
- jmp (return)
-
- rrrc roxr.b #1,sF ;CB19 RR C
- roxr.b #1,sBC
- setflag
-
- rrrd rol.w #8,sDE ;CB1A RR D
- roxr.b #1,sF
- roxr.b #1,sDE
- setflag SETONLY
- rol.w #8,sDE
- jmp (return)
-
- rrre roxr.b #1,sF ;CB1B RR E
- roxr.b #1,sDE
- setflag
-
- rrrh rol.w #8,sHL ;CB1C RR H
- roxr.b #1,sF
- roxr.b #1,sHL
- setflag SETONLY
- rol.w #8,sHL
- jmp (return)
-
- rrrl roxr.b #1,sF ;CB1D RR L
- roxr.b #1,sHL
- setflag
-
- rrrm gbhl d6 ;CB1E RR (HL)
- roxr.b #1,sF
- roxr.b #1,d6
- setflag SETONLY
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- rrra roxr.b #1,sF ;CB1F RR A
- roxr.b #1,sA
- setflag
-
- slab rol.w #8,sBC ;CB20 SLA B
- asl.b #1,sBC
- setflag SETONLY
- rol.w #8,sBC
- jmp (return)
-
- slac asl.b #1,sBC ;CB21 SLA C
- setflag
-
- slad rol.w #8,sDE ;CB22 SLA D
- asl.b #1,sDE
- setflag SETONLY
- rol.w #8,sDE
- jmp (return)
-
- slae asl.b #1,sDE ;CB23 SLA E
- setflag
-
- slah rol.w #8,sHL ;CB24 SLA H
- asl.b #1,sHL
- setflag SETONLY
- rol.w #8,sHL
- jmp (return)
-
- slal asl.b #1,sHL ;CB25 SLA L
- setflag
-
- slam gbhl d6 ;CB26 SLA (HL)
- asl.b #1,d6
- setflag SETONLY
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- slaa asl.b #1,sA ;CB27 SLA A
- setflag
-
- srab rol.w #8,sBC ;CB28 SRA B
- asr.b #1,sBC
- setflag SETONLY
- rol.w #8,sBC
- jmp (return)
-
- srac asr.b #1,sBC ;CB29 SRA C
- setflag
-
- srad rol.w #8,sDE ;CB2A SRA D
- asr.b #1,sDE
- setflag SETONLY
- rol.w #8,sDE
- jmp (return)
-
- srae asr.b #1,sDE ;CB2B SRA E
- setflag
-
- srah rol.w #8,sHL ;CB2C SRA H
- asr.b #1,sHL
- setflag SETONLY
- rol.w #8,sHL
- jmp (return)
-
- sral asr.b #1,sHL ;CB2D SRA L
- setflag
-
- sram gbhl d6 ;CB2E SRA (HL)
- asr.b #1,d6
- setflag SETONLY
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- sraa asr.b #1,sA ;CB2F SRA A
- setflag
-
- srlb rol.w #8,sBC ;CB38 SRL B
- lsr.b #1,sBC
- setflag SETONLY
- rol.w #8,sBC
- jmp (return)
-
- srlc lsr.b #1,sBC ;CB39 SRL C
- setflag
-
- srld rol.w #8,sDE ;CB3A SRL D
- lsr.b #1,sDE
- setflag SETONLY
- rol.w #8,sDE
- jmp (return)
-
- srle lsr.b #1,sDE ;CB3B SRL E
- setflag
-
- srlh rol.w #8,sHL ;CB3C SRL H
- lsr.b #1,sHL
- setflag SETONLY
- rol.w #8,sHL
- jmp (return)
-
- srll lsr.b #1,sHL ;CB3D SRL L
- setflag
-
- srlm gbhl d6 ;CB3E SRL (HL)
- lsr.b #1,d6
- setflag SETONLY
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- srla lsr.b #1,sA ;CB3F SRL A
- setflag
-
- bit0b moveq #8,d6 ;CB40 BIT 0,B
- btst d6,sBC
- dozf
-
- bit0c btst #0,sBC ;CB41 BIT 0,C
- dozf
-
- bit0d moveq #8,d6 ;CB42 BIT 0,D
- btst d6,sDE
- dozf
-
- bit0e btst #0,sDE ;CB43 BIT 0,E
- dozf
-
- bit0h moveq #8,d6 ;CB44 BIT 0,H
- btst d6,sHL
- dozf
-
- bit0l btst #0,sHL ;CB45 BIT 0,L
- dozf
-
- bit0m gbhl d6 ;CB46 BIT 0,(HL)
- btst #0,d6
- dozf
-
- bit0a btst #0,sA ;CB47 BIT 0,A
- dozf
-
- bit1b moveq #9,d6 ;CB48 BIT 1,B
- btst d6,sBC
- dozf
-
- bit1c btst #1,sBC ;CB49 BIT 1,C
- dozf
-
- bit1d moveq #9,d6 ;CB4A BIT 1,D
- btst d6,sDE
- dozf
-
- bit1e btst #1,sDE ;CB4B BIT 1,E
- dozf
-
- bit1h moveq #9,d6 ;CB4C BIT 1,H
- btst d6,sHL
- dozf
-
- bit1l btst #1,sHL ;CB4D BIT 1,L
- dozf
-
- bit1m gbhl d6 ;CB4E BIT 1,(HL)
- btst #1,d6
- dozf
-
- bit1a btst #1,sA ;CB4F BIT 1,A
- dozf
-
- bit2b moveq #10,d6 ;CB50 BIT 2,B
- btst d6,sBC
- dozf
-
- bit2c btst #2,sBC ;CB51 BIT 2,C
- dozf
-
- bit2d moveq #10,d6 ;CB52 BIT 2,D
- btst d6,sDE
- dozf
-
- bit2e btst #2,sDE ;CB53 BIT 2,E
- dozf
-
- bit2h moveq #10,d6 ;CB54 BIT 2,H
- btst d6,sHL
- dozf
-
- bit2l btst #2,sHL ;CB55 BIT 2,L
- dozf
-
- bit2m gbhl d6 ;CB56 BIT 2,(HL)
- btst #2,d6
- dozf
-
- bit2a btst #2,sA ;CB57 BIT 2,A
- dozf
-
- bit3b moveq #11,d6 ;CB58 BIT 3,B
- btst d6,sBC
- dozf
-
- bit3c btst #3,sBC ;CB59 BIT 3,C
- dozf
-
- bit3d moveq #11,d6 ;CB5A BIT 3,D
- btst d6,sDE
- dozf
-
- bit3e btst #3,sDE ;CB5B BIT 3,E
- dozf
-
- bit3h moveq #11,d6 ;CB5C BIT 3,H
- btst d6,sHL
- dozf
-
- bit3l btst #3,sHL ;CB5D BIT 3,L
- dozf
-
- bit3m gbhl d6 ;CB5E BIT 3,(HL)
- btst #3,d6
- dozf
-
- bit3a btst #3,sA ;CB5F BIT 3,A
- dozf
-
- bit4b moveq #12,d6 ;CB60 BIT 4,B
- btst d6,sBC
- dozf
-
- bit4c btst #4,sBC ;CB61 BIT 4,C
- dozf
-
- bit4d moveq #12,d6 ;CB62 BIT 4,D
- btst d6,sDE
- dozf
-
- bit4e btst #4,sDE ;CB63 BIT 4,E
- dozf
-
- bit4h moveq #12,d6 ;CB64 BIT 4,H
- btst d6,sHL
- dozf
-
- bit4l btst #4,sHL ;CB65 BIT 4,L
- dozf
-
- bit4m gbhl d6 ;CB66 BIT 4,(HL)
- btst #4,d6
- dozf
-
- bit4a btst #4,sA ;CB67 BIT 4,A
- dozf
-
- bit5b moveq #13,d6 ;CB68 BIT 5,B
- btst d6,sBC
- dozf
-
- bit5c btst #5,sBC ;CB69 BIT 5,C
- dozf
-
- bit5d moveq #13,d6 ;CB6A BIT 5,D
- btst d6,sDE
- dozf
-
- bit5e btst #5,sDE ;CB6B BIT 5,E
- dozf
-
- bit5h moveq #13,d6 ;CB6C BIT 5,H
- btst d6,sHL
- dozf
-
- bit5l btst #5,sHL ;CB6D BIT 5,L
- dozf
-
- bit5m gbhl d6 ;CB6E BIT 5,(HL)
- btst #5,d6
- dozf
-
- bit5a btst #5,sA ;CB6F BIT 5,A
- dozf
-
- bit6b moveq #14,d6 ;CB70 BIT 6,B
- btst d6,sBC
- dozf
-
- bit6c btst #6,sBC ;CB71 BIT 6,C
- dozf
-
- bit6d moveq #14,d6 ;CB72 BIT 6,D
- btst d6,sDE
- dozf
-
- bit6e btst #6,sDE ;CB73 BIT 6,E
- dozf
-
- bit6h moveq #14,d6 ;CB74 BIT 6,H
- btst d6,sHL
- dozf
-
- bit6l btst #6,sHL ;CB75 BIT 6,L
- dozf
-
- bit6m gbhl d6 ;CB76 BIT 6,(HL)
- btst #6,d6
- dozf
-
- bit6a btst #6,sA ;CB77 BIT 6,A
- dozf
-
- bit7b moveq #15,d6 ;CB78 BIT 7,B
- btst d6,sBC
- dozmf
-
- bit7c btst #7,sBC ;CB79 BIT 7,C
- dozmf
-
- bit7d moveq #15,d6 ;CB7A BIT 7,D
- btst d6,sDE
- dozmf
-
- bit7e btst #7,sDE ;CB7B BIT 7,E
- dozmf
-
- bit7h moveq #15,d6 ;CB7C BIT 7,H
- btst d6,sHL
- dozmf
-
- bit7l btst #7,sHL ;CB7D BIT 7,L
- dozmf
-
- bit7m gbhl d6 ;CB7E BIT 7,(HL)
- btst #7,d6
- dozmf
-
- bit7a btst #7,sA ;CB7F BIT 7,A
- dozf
-
- res0b and.w #$FEFF,sBC ;CB80 RES 0,B
- jmp (return)
-
- res0c bclr #0,sBC ;CB81 RES 0,C
- jmp (return)
-
- res0d and.w #$FEFF,sDE ;CB82 RES 0,D
- jmp (return)
-
- res0e bclr #0,sDE ;CB83 RES 0,E
- jmp (return)
-
- res0h and.w #$FEFF,sHL ;CB84 RES 0,H
- jmp (return)
-
- res0l bclr #0,sHL ;CB85 RES 0,L
- jmp (return)
-
- res0m gbhl d6 ;CB86 RES 0,(HL)
- bclr #0,d6
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- res0a bclr #0,sA ;CB87 RES 0,A
- jmp (return)
-
- res1b and.w #$FDFF,sBC ;CB88 RES 1,B
- jmp (return)
-
- res1c bclr #1,sBC ;CB89 RES 1,C
- jmp (return)
-
- res1d and.w #$FDFF,sDE ;CB8A RES 1,D
- jmp (return)
-
- res1e bclr #1,sDE ;CB8B RES 1,E
- jmp (return)
-
- res1h and.w #$FDFF,sHL ;CB8C RES 1,H
- jmp (return)
-
- res1l bclr #1,sHL ;CB8D RES 1,L
- jmp (return)
-
- res1m move.w sHL,d5 ;CB8E RES 1,(HL)
- bsr gbyte
- bclr #1,d6
- bsr wbyte
- jmp (return)
-
- res1a bclr #1,sA ;CB8F RES 1,A
- jmp (return)
-
- res2b and.w #$FBFF,sBC ;CB90 RES 2,B
- jmp (return)
-
- res2c bclr #2,sBC ;CB91 RES 2,C
- jmp (return)
-
- res2d and.w #$FBFF,sDE ;CB92 RES 2,D
- jmp (return)
-
- res2e bclr #2,sDE ;CB93 RES 2,E
- jmp (return)
-
- res2h and.w #$FBFF,sHL ;CB94 RES 2,H
- jmp (return)
-
- res2l bclr #2,sHL ;CB95 RES 2,L
- jmp (return)
-
- res2m move.w sHL,d5 ;CB96 RES 2,(HL)
- bsr gbyte
- bclr #2,d6
- bsr wbyte
- jmp (return)
-
- res2a bclr #2,sA ;CB97 RES 2,A
- jmp (return)
-
- res3b and.w #$F7FF,sBC ;CB98 RES 3,B
- jmp (return)
-
- res3c bclr #3,sBC ;CB99 RES 3,C
- jmp (return)
-
- res3d and.w #$F7FF,sDE ;CB9A RES 3,D
- jmp (return)
-
- res3e bclr #3,sDE ;CB9B RES 3,E
- jmp (return)
-
- res3h and.w #$F7FF,sHL ;CB9C RES 3,H
- jmp (return)
-
- res3l bclr #3,sHL ;CB9D RES 3,L
- jmp (return)
-
- res3m move.w sHL,d5 ;CB9E RES 3,(HL)
- bsr gbyte
- bclr #3,d6
- bsr wbyte
- jmp (return)
-
- res3a bclr #3,sA ;CB9F RES 3,A
- jmp (return)
-
- res4b and.w #$EFFF,sBC ;CBA0 RES 4,B
- jmp (return)
-
- res4c bclr #4,sBC ;CBA1 RES 4,C
- jmp (return)
-
- res4d and.w #$EFFF,sDE ;CBA2 RES 4,D
- jmp (return)
-
- res4e bclr #4,sDE ;CBA3 RES 4,E
- jmp (return)
-
- res4h and.w #$EFFF,sHL ;CBA4 RES 4,H
- jmp (return)
-
- res4l bclr #4,sHL ;CBA5 RES 4,L
- jmp (return)
-
- res4m move.w sHL,d5 ;CBA6 RES 4,(HL)
- bsr gbyte
- bclr #4,d6
- bsr wbyte
- jmp (return)
-
- res4a bclr #4,sA ;CBA7 RES 4,A
- jmp (return)
-
- res5b and.w #$DFFF,sBC ;CBA8 RES 5,B
- jmp (return)
-
- res5c bclr #5,sBC ;CBA9 RES 5,C
- jmp (return)
-
- res5d and.w #$DFFF,sDE ;CBAA RES 5,D
- jmp (return)
-
- res5e bclr #5,sDE ;CBAB RES 5,E
- jmp (return)
-
- res5h and.w #$DFFF,sHL ;CBAC RES 5,H
- jmp (return)
-
- res5l bclr #5,sHL ;CBAD RES 5,L
- jmp (return)
-
- res5m move.w sHL,d5 ;CBAE RES 5,(HL)
- bsr gbyte
- bclr #5,d6
- bsr wbyte
- jmp (return)
-
- res5a bclr #5,sA ;CBAF RES 5,A
- jmp (return)
-
- res6b and.w #$BFFF,sBC ;CBB0 RES 6,B
- jmp (return)
-
- res6c bclr #6,sBC ;CBB1 RES 6,C
- jmp (return)
-
- res6d and.w #$BFFF,sDE ;CBB2 RES 6,D
- jmp (return)
-
- res6e bclr #6,sDE ;CBB3 RES 6,E
- jmp (return)
-
- res6h and.w #$BFFF,sHL ;CBB4 RES 6,H
- jmp (return)
-
- res6l bclr #6,sHL ;CBB5 RES 6,L
- jmp (return)
-
- res6m move.w sHL,d5 ;CBB6 RES 6,(HL)
- bsr gbyte
- bclr #6,d6
- bsr wbyte
- jmp (return)
-
- res6a bclr #6,sA ;CBB7 RES 6,A
- jmp (return)
-
- res7b and.w #$7FFF,sBC ;CBB8 RES 7,B
- jmp (return)
-
- res7c bclr #7,sBC ;CBB9 RES 7,C
- jmp (return)
-
- res7d and.w #$7FFF,sDE ;CBBA RES 7,D
- jmp (return)
-
- res7e bclr #7,sDE ;CBBB RES 7,E
- jmp (return)
-
- res7h and.w #$7FFF,sHL ;CBBC RES 7,H
- jmp (return)
-
- res7l bclr #7,sHL ;CBBD RES 7,L
- jmp (return)
-
- res7m move.w sHL,d5 ;CBBE RES 7,(HL)
- bsr gbyte
- bclr #7,d6
- bsr wbyte
- jmp (return)
-
- res7a bclr #7,sA ;CBBF RES 7,A
- jmp (return)
-
- set0b or.w #$100,sBC ;CBC0 SET 0,B
- jmp (return)
-
- set0c bset #0,sBC ;CBC1 SET 0,C
- jmp (return)
-
- set0d or.w #$0100,sDE ;CBC2 SET 0,D
- jmp (return)
-
- set0e bset #0,sDE ;CBC3 SET 0,E
- jmp (return)
-
- set0h or.w #$0100,sHL ;CBC4 SET 0,H
- jmp (return)
-
- set0l bset #0,sHL ;CBC5 SET 0,L
- jmp (return)
-
- set0m move.w sHL,d5 ;CBC6 SET 0,(HL)
- bsr gbyte
- bset #0,d6
- bsr wbyte
- jmp (return)
-
- set0a bset #0,sA ;CBC7 SET 0,A
- jmp (return)
-
- set1b or.w #$200,sBC ;CBC8 SET 1,B
- jmp (return)
-
- set1c bset #1,sBC ;CBC9 SET 1,C
- jmp (return)
-
- set1d or.w #$200,sDE ;CBCA SET 1,D
- jmp (return)
-
- set1e bset #1,sDE ;CBCB SET 1,E
- jmp (return)
-
- set1h or.w #$200,sHL ;CBCC SET 1,H
- jmp (return)
-
- set1l bset #1,sHL ;CBCD SET 1,L
- jmp (return)
-
- set1m move.w sHL,d5 ;CBCE SET 1,(HL)
- bsr gbyte
- bset #1,d6
- bsr wbyte
- jmp (return)
-
- set1a bset #1,sA ;CBCF SET 1,A
- jmp (return)
-
- set2b or.w #$400,sBC ;CBD0 SET 2,B
- jmp (return)
-
- set2c bset #2,sBC ;CBD1 SET 2,C
- jmp (return)
-
- set2d or.w #$400,sDE ;CBD2 SET 2,D
- jmp (return)
-
- set2e bset #2,sDE ;CBD3 SET 2,E
- jmp (return)
-
- set2h or.w #$400,sHL ;CBD4 SET 2,H
- jmp (return)
-
- set2l bset #2,sHL ;CBD5 SET 2,L
- jmp (return)
-
- set2m move.w sHL,d5 ;CBD6 SET 2,(HL)
- bsr gbyte
- bset #2,d6
- bsr wbyte
- jmp (return)
-
- set2a bset #2,sA ;CBD7 SET 2,A
- jmp (return)
-
- set3b or.w #$800,sBC ;CBD8 SET 3,B
- jmp (return)
-
- set3c bset #3,sBC ;CBD9 SET 3,C
- jmp (return)
-
- set3d or.w #$800,sDE ;CBDA SET 3,D
- jmp (return)
-
- set3e bset #3,sDE ;CBDB SET 3,E
- jmp (return)
-
- set3h or.w #$800,sHL ;CBDC SET 3,H
- jmp (return)
-
- set3l bset #3,sHL ;CBDD SET 3,L
- jmp (return)
-
- set3m move.w sHL,d5 ;CBDE SET 3,(HL)
- bsr gbyte
- bset #3,d6
- bsr wbyte
- jmp (return)
-
- set3a bset #3,sA ;CBDF SET 3,A
- jmp (return)
-
- set4b or.w #$1000,sBC ;CBE0 SET 4,B
- jmp (return)
-
- set4c bset #4,sBC ;CBE1 SET 4,C
- jmp (return)
-
- set4d or.w #$1000,sDE ;CBE2 SET 4,D
- jmp (return)
-
- set4e bset #4,sDE ;CBE3 SET 4,E
- jmp (return)
-
- set4h or.w #$1000,sHL ;CBE4 SET 4,H
- jmp (return)
-
- set4l bset #4,sHL ;CBE5 SET 4,L
- jmp (return)
-
- set4m move.w sHL,d5 ;CBE6 SET 4,(HL)
- bsr gbyte
- bset #4,d6
- bsr wbyte
- jmp (return)
-
- set4a bset #4,sA ;CBE7 SET 4,A
- jmp (return)
-
- set5b or.w #$2000,sBC ;CBE8 SET 5,B
- jmp (return)
-
- set5c bset #5,sBC ;CBE9 SET 5,C
- jmp (return)
-
- set5d or.w #$2000,sDE ;CBEA SET 5,D
- jmp (return)
-
- set5e bset #5,sDE ;CBEB SET 5,E
- jmp (return)
-
- set5h or.w #$2000,sHL ;CBEC SET 5,H
- jmp (return)
-
- set5l bset #5,sHL ;CBED SET 5,L
- jmp (return)
-
- set5m move.w sHL,d5 ;CBEE SET 5,(HL)
- bsr gbyte
- bset #5,d6
- bsr wbyte
- jmp (return)
-
- set5a bset #5,sA ;CBEF SET 5,A
- jmp (return)
-
- set6b or.w #$4000,sBC ;CBF0 SET 6,B
- jmp (return)
-
- set6c bset #6,sBC ;CBF1 SET 6,C
- jmp (return)
-
- set6d or.w #$4000,sDE ;CBF2 SET 6,D
- jmp (return)
-
- set6e bset #6,sDE ;CBF3 SET 6,E
- jmp (return)
-
- set6h or.w #$4000,sHL ;CBF4 SET 6,H
- jmp (return)
-
- set6l bset #6,sHL ;CBF5 SET 6,L
- jmp (return)
-
- set6m move.w sHL,d5 ;CBF6 SET 6,(HL)
- bsr gbyte
- bset #6,d6
- bsr wbyte
- jmp (return)
-
- set6a bset #6,sA ;CBF7 SET 6,A
- jmp (return)
-
- set7b or.w #$8000,sBC ;CBF8 SET 7,B
- jmp (return)
-
- set7c bset #7,sBC ;CBF9 SET 7,C
- jmp (return)
-
- set7d or.w #$8000,sDE ;CBFA SET 7,D
- jmp (return)
-
- set7e bset #7,sDE ;CBFB SET 7,E
- jmp (return)
-
- set7h or.w #$8000,sHL ;CBFC SET 7,H
- jmp (return)
-
- set7l bset #7,sHL ;CBFD SET 7,L
- jmp (return)
-
- set7m move.w sHL,d5 ;CBFE SET 7,(HL)
- bsr gbyte
- bset #7,d6
- bsr wbyte
- jmp (return)
-
- set7a bset #7,sA ;CBFF SET 7,A
- jmp (return)
-
- dadixb add.w sBC,ix ;DD09 DAD IX,B
- docyf
-
- dadixd add.w sDE,ix ;DD19 DAD IX,D
- docyf
-
- lxiix gwpc d6 ;DD21 LXI IX,nnnn
- move.w d6,ix
- jmp (return)
-
- sixd gwpc d5 ;DD22 SIXD addr
- move.w ix,d6
- bsr wword
- jmp (return)
-
- inxix addq.w #1,ix ;DD23 INX IX
- jmp (return)
-
- inrxh addq.b #1,xh ;DD24 INR XH (undocumented)
- inrflag
- jmp (return)
-
- dcrxh subq.b #1,xh ;DD25 DCR XH (undocumented)
- inrflag
- jmp (return)
-
- mvixh gbpc ;DD26 MVI XH,nn (undocumented)
- move.b d6,xh
- jmp (return)
-
- dadixx asl.w ix ;DD29 DAD IX,IX (multiply by 2)
- docyf
-
- lixd gwpc d5 ;DD2A LIXD addr
- bsr gword
- move.w d6,ix
- jmp (return)
-
- dcxix subq.w #1,ix ;DD2B DCX IX
- jmp (return)
-
- inrxl addq.b #1,xl ;DD2C INR XL (undocumented)
- inrflag
- jmp (return)
-
- dcrxl subq.b #1,xl ;DD2D DCR XL (undocumented)
- inrflag
- jmp (return)
-
- mvixl gbpc ;DD2E MVI XL,nn (undocumented)
- move.b d6,xl
- jmp (return)
-
- inrix calcind ix ;DD34 INR (IX+d)
- bsr gbyte
- move.w d5,-(sp)
- addq.b #1,d6
- inrflag
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- dcrix calcind ix ;DD35 DCR (IX+d)
- bsr gbyte
- move.w d5,-(sp)
- subq.b #1,d6
- inrflag
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- mviix calcind ix ;DD36 MVI (IX+d),nn
- move.w d5,-(sp)
- gbpc
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- dadixs move.w stack,d5 ;DD39 DAD IX,SP
- add.w d5,ix
- docyf
-
- movbxh rol.w #8,sBC ;DD44 LD B,XH (undocumented)
- move.b xh,sBC
- rol.w #8,sBC
- jmp (return)
-
- movbxl rol.w #8,sBC ;DD45 LD B,XL (undocumented)
- move.w xl,sBC
- rol.w #8,sBC
- jmp (return)
-
- movbix calcind ix ;DD46 LD B,(IX+d)
- bsr gbyte
- rol.w #8,sBC
- move.b d6,sBC
- rol.w #8,sBC
- jmp (return)
-
- movcxh move.b xh,sBC ;DD4C LD C,XH (undocumented)
- jmp (return)
-
- movcxl move.b xl,sBC ;DD4D LD C,XL (undocumented)
- jmp (return)
-
- movcix calcind ix ;DD4E LD C,(IX+d)
- bsr gbyte
- move.b d6,sBC
- jmp (return)
-
- movdxh rol.w #8,sDE ;DD54 LD D,XH (undocumented)
- move.b xh,sDE
- rol.w #8,sDE
- jmp (return)
-
- movdxl rol.w #8,sDE ;DD55 LD D,XL (undocumented)
- move.b xl,sDE
- rol.w #8,sDE
- jmp (return)
-
- movdix calcind ix ;DD56 LD D,(IX+d)
- bsr gbyte
- rol.w #8,sDE
- move.b d6,sDE
- rol.w #8,sDE
- jmp (return)
-
- movexh move.b xh,sDE ;DD5C LD E,XH (undocumented)
- jmp (return)
-
- movexl move.b xl,sDE ;DD5D LD E,XL (undocumented)
- jmp (return)
-
- moveix calcind ix ;DD5E LD E,(IX+d)
- bsr gbyte
- move.b d6,sDE
- jmp (return)
-
- movxhb move.w sBC,d6 ;DD60 LD XH,B (undocumented)
- rol.w #8,d6
- move.b d6,xh
- jmp (return)
-
- movxhc move.b sBC,xh ;DD61 LD XH,C (undocumented)
- jmp (return)
-
- movxhd move.w sDE,d6 ;DD62 LD XH,D (undocumented)
- rol.w #8,d6
- move.b d6,xh
- jmp (return)
-
- movxhe move.b sDE,xh ;DD63 LD XH,E (undocumented)
- jmp (return)
-
- mvxhxh jmp (return) ;DD64 LD XH,XH (undocumented)
-
- mvxhxl move.b xl,xh ;DD65 LD XH,XL (undocumented)
- jmp (return)
-
- movhix calcind ix ;DD66 LD H,(IX+d)
- bsr gbyte
- rol.w #8,sHL
- move.b d6,sHL
- rol.w #8,sHL
- jmp (return)
-
- movxha move.b sA,xh ;DD67 LD XH,A
- jmp (return)
-
- movxlb move.w sBC,d6 ;DD68 LD XL,B (undocumented)
- rol.w #8,d6
- move.b d6,xl
- jmp (return)
-
- movxlc move.b sBC,d6 ;DD69 LD XL,C (undocumented)
- jmp (return)
-
- movxld move.w sDE,d6 ;DD6A LD XL,D (undocumented)
- rol.w #8,d6
- move.b d6,xl
- jmp (return)
-
- movxle move.b sDE,xl ;DD6B LD XL,E (undocumented)
- jmp (return)
-
- mvxlxh move.b xh,xl ;DD6C LD XL,XH (undocumented)
- jmp (return)
-
- mvxlxl jmp (return) ;DD6D LD XL,XL (undocumented)
-
- movlix calcind ix ;DD6E LD L,(IX+d)
- bsr gbyte
- move.b d6,sHL
- jmp (return)
-
- movxla move.b sA,xl ;DD6F LD XL,A
- jmp (return)
-
- movixb calcind ix ;DD70 LD (IX+d),B
- move.w sBC,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- movixc calcind ix ;DD71 LD (IX+d),C
- move.b sBC,d6
- bsr wbyte
- jmp (return)
-
- movixd calcind ix ;DD72 LD (IX+d),D
- move.w sDE,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- movixe calcind ix ;DD73 LD (IX+d),E
- move.b sDE,d6
- bsr wbyte
- jmp (return)
-
- movixh calcind ix ;DD74 LD (IX+d),H
- move.w sHL,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- movixl calcind ix ;DD75 LD (IX+d),L
- move.b sHL,d6
- bsr wbyte
- jmp (return)
-
- movixa calcind ix ;DD77 LD (IX+d),A
- move.b sA,d6
- bsr wbyte
- jmp (return)
-
- movaxh move.b xh,sA ;DD7C LD A,XH (undocumented)
- jmp (return)
-
- movaxl move.b xl,sA ;DD7D LD A,XL (undocumented)
- jmp (return)
-
- movaix calcind ix ;DD7E LD A,(IX+d)
- bsr gbyte
- move.b d6,sA
- jmp (return)
-
- addxh move.b xh,d6 ;DD84 ADD A,XH (undocumented)
- addflag
-
- addxl move.b xl,d6 ;DD85 ADD A,XL (undocumented)
- addflag
-
- addix calcind ix ;DD86 ADD A,(IX+d)
- bsr gbyte
- addflag
-
- adcxh move.b xh,d6 ;DD8C ADC A,XH (undocumented)
- adcflag
-
- adcxl move.b xl,d6 ;DD8E ADC A,XL (undocumented)
- adcflag
-
- adcix calcind ix ;DD8E ADC A,(IX+d)
- bsr gbyte
- adcflag
-
- subxh move.b xh,d6 ;DD94 SUB A,XH (undocumented)
- move.b d6,d5
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- subxl move.b xl,d5 ;DD95 SUB A,XL (undocumented)
- move.b d5,d6
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- subix calcind ix ;DD96 SUB A,(IX+d)
- bsr gbyte
- move.b d6,d5
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- sbbxh move.b xh,d5 ;DD9C SBC A,XH (undocumented)
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbxl move.b xl,d5 ;DD9D SBC A,XL (undocumented)
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbix calcind ix ;DD9E SBC A,(IX+d)
- bsr gbyte
- move.w d6,d5
- nbcd d6
- sbbflag
-
- anaxh and.b xh,sA ;DDA4 AND A,XH (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- anaxl and.b xl,sA ;DDA5 AND A,XL (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- anaix calcind ix ;DDA6 AND A,(IX+d)
- bsr gbyte
- and.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xraxh move.b xh,d5 ;DDAC XOR A,XH (undocumented)
- eor.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xraxl move.b xl,d5 ;DDAD XOR A,XL (undocumented)
- eor.b d5,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xraix calcind ix ;DDAE XOR A,(IX+d)
- bsr gbyte
- eor.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- oraxh or.b xh,sA ;DDB4 OR A,XH (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- oraxl or.b xl,sA ;DDB5 OR A,XL (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- oraix calcind ix ;DDB6 OR A,(IX+d)
- bsr gbyte
- or.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- cmpxh cmp.b xh,sA ;DDBC CP XH (undocumented)
- setflag
-
- cmpxl cmp.b xl,sA ;DDBD CP XL (undocumented)
- setflag
-
- rlcix bsr gbyte ;DDCB06 RLC (IX+d)
- move.w d5,-(sp)
- rol.b #1,d6
- setflag SETONLY
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- rrcix bsr gbyte ;DDCB0E RRC (IX+d)
- move.w d5,-(sp)
- ror.b #1,d6
- setflag SETONLY
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- rlix bsr gbyte ;DDCB16 RL (IX+d)
- roxr.b #1,sF
- roxl.b #1,d6
- roxl.b #1,sF
- bsr wbyte
- jmp (return)
-
- rrix bsr gbyte ;DDCB1E RR (IX+d)
- roxr.b #1,sF
- roxr.b #1,d6
- roxl.b #1,sF
- bsr wbyte
- jmp (return)
-
- slaix bsr gbyte ;DDCB26 SLA (IX+d)
- asl.b #1,d6
- bcs.s slaixc
- bclr #0,sF
- bsr wbyte
- jmp (return)
- slaixc bset #0,sF
- bsr wbyte
- jmp (return)
-
- sraix bsr gbyte ;DDCB2E SRA (IX+d)
- asr.b #1,d6
- bcs.s sraixc
- bclr #0,sF
- bsr wbyte
- jmp (return)
- sraixc bset #0,sF
- bsr wbyte
- jmp (return)
-
- srlix bsr gbyte ;DDCB3E SRL (IX+d)
- lsr.b #1,d6
- bcs.s srlixc
- bclr #0,sF
- bsr wbyte
- jmp (return)
- srlixc bset #0,sF
- bsr wbyte
- jmp (return)
-
- bit0ix bsr gbyte ;DDCB46 BIT 0,(IX+d)
- btst #0,d6
- dozf
-
- bit1ix bsr gbyte ;DDCB4E BIT 1,(IX+d)
- btst #1,d6
- dozf
-
- bit2ix bsr gbyte ;DDCB56 BIT 2,(IX+d)
- btst #2,d6
- dozf
-
- bit3ix bsr gbyte ;DDCB5E BIT 3,(IX+d)
- btst #3,d6
- dozf
-
- bit4ix bsr gbyte ;DDCB66 BIT 4,(IX+d)
- btst #4,d6
- dozf
-
- bit5ix bsr gbyte ;DDCB6E BIT 5,(IX+d)
- btst #5,d6
- dozf
-
- bit6ix bsr gbyte ;DDCB76 BIT 6,(IX+d)
- btst #6,d6
- dozf
-
- bit7ix bsr gbyte ;DDCB7E BIT 7,(IX+d)
- btst #7,d6
- dozf
-
- res0ix bsr gbyte ;DDCB86 RES 0,(IX+d)
- bclr #0,d6
- bsr wbyte
- jmp (return)
-
- res1ix bsr gbyte ;DDCB8E RES 1,(IX+d)
- bclr #1,d6
- bsr wbyte
- jmp (return)
-
- res2ix bsr gbyte ;DDCB96 RES 2,(IX+d)
- bclr #2,d6
- bsr wbyte
- jmp (return)
-
- res3ix bsr gbyte ;DDCB9E RES 3,(IX+d)
- bclr #3,d6
- bsr wbyte
- jmp (return)
-
- res4ix bsr gbyte ;DDCBA6 RES 4,(IX+d)
- bclr #4,d6
- bsr wbyte
- jmp (return)
-
- res5ix bsr gbyte ;DDCBAE RES 5,(IX+d)
- bclr #5,d6
- bsr wbyte
- jmp (return)
-
- res6ix bsr gbyte ;DDCBB6 RES 6,(IX+d)
- bclr #6,d6
- bsr wbyte
- jmp (return)
-
- res7ix bsr gbyte ;DDCBBE RES 7,(IX+d)
- bclr #7,d6
- bsr wbyte
- jmp (return)
-
- set0ix bsr gbyte ;DDCBC6 SET 0,(IX+d)
- bset #0,d6
- bsr wbyte
- jmp (return)
-
- set1ix bsr gbyte ;DDCBCE SET 1,(IX+d)
- bset #1,d6
- bsr wbyte
- jmp (return)
-
- set2ix bsr gbyte ;DDCBD6 SET 2,(IX+d)
- bset #2,d6
- bsr wbyte
- jmp (return)
-
- set3ix bsr gbyte ;DDCBDE SET 3,(IX+d)
- bset #3,d6
- bsr wbyte
- jmp (return)
-
- set4ix bsr gbyte ;DDCBE6 SET 4,(IX+d)
- bset #4,d6
- bsr wbyte
- jmp (return)
-
- set5ix bsr gbyte ;DDCBEE SET 5,(IX+d)
- bset #5,d6
- bsr wbyte
- jmp (return)
-
- set6ix bsr gbyte ;DDCBF6 SET 6,(IX+d)
- bset #6,d6
- bsr wbyte
- jmp (return)
-
- set7ix bsr gbyte ;DDCBFE SET 7,(IX+d)
- bset #7,d6
- bsr wbyte
- jmp (return)
-
- cmpix calcind ix ;DDBE CP (IX+d)
- bsr gbyte
- cmp.b d6,sA
- setflag
-
- popix move.w stack,d5 ;DDE1 POP IX
- bsr gword
- move.w d6,ix
- addq.w #2,stack
- subq.l #4,daasp
- jmp (return)
-
- xtix move.w stack,d5 ;DDE3 XTIX
- bsr gword
- move.w ix,d5
- move.w d6,ix
- move.w d5,d6
- move.w stack,d5
- bsr wword
- jmp (return)
-
- pushix subq.w #2,stack ;DDE5 PUSH IX
- move.w stack,d5
- move.w ix,d6
- bsr wword
- addq.l #4,daasp
- jmp (return)
-
- pcix move.w ix,sPC ;DDE9 PCIX
- bsr calcpca
- jmp (return)
-
- spix move.w ix,stack ;DDF9 SPIX
- jmp (return)
-
- inbc move.w sBC,d5 ;ED40 IN B,(C)
- rol.w #8,d5
- jsr inp
- rol.w #8,sBC
- move.b d6,sBC
- rol.w #8,sBC
- jmp (return)
-
- outcb move.w sBC,d5 ;ED41 OUT (C),B
- move.w sBC,d6
- rol.w #8,d5
- rol.w #8,d6
- jsr outp
- jmp (return)
-
- dsbbb ashl sub,sBC ;ED42 DSBC A,B
-
- sbcd gwpc d5 ;ED43 SBCD addr
- move.w sBC,d6
- bsr wword
- jmp (return)
-
- nega neg.b sA ;ED44 NEG
- setflag
-
- retn equ ret ;ED45 RETN (treated as RET)
-
- ; Interrupt modes are ignored. They shoudn't be, and are not in the PC
- ; version. Will someone implement this?
-
- im0 jmp (return) ;ED46 IM0
-
- moveia jmp (return) ;ED47 LD I,A
-
- incc move.w sBC,d5 ;ED48 IN C,(C)
- rol.w #8,d5
- jsr inp
- move.b d6,sBC
- jmp (return)
-
- outcc move.w sBC,d5 ;ED49 OUT (C),C
- rol.w #8,d5
- move.b sBC,d6
- jsr outp
- jmp (return)
-
- dadcb ashl add,sBC ;ED4A DADC A,B
-
- lbcd gwpc d5 ;ED4B LBCD addr
- bsr gword
- move.w d6,sBC
- jmp (return)
-
- reti equ ret ;ED4D RETI (treated as RET)
-
- movera moveq #0,d6 ;ED4F LD R,A
- move.b sA,d6
- add.w d6,d6
- move.w d6,sRF
- jmp (return)
-
- indc move.w sBC,d5 ;ED50 IN D,(C)
- rol.w #8,d5
- jsr inp
- rol.w #8,sDE
- move.b d6,sDE
- rol.w #8,sDE
- jmp (return)
-
- outcd move.w sBC,d5 ;ED51 OUT (C),D
- rol.w #8,d5
- move.w sDE,d6
- rol.w #8,d6
- jsr outp
- jmp (return)
-
- dsbbd ashl sub,sDE ;ED52 DSBC A,D
-
- sded gwpc d5 ;ED53 SDED addr
- move.w sDE,d6
- bsr wword
- jmp (return)
-
- im1 jmp (return) ;ED56 IM1 (ignored)
-
- moveai move.b #0,sA ;ED57 LD A,I
- jmp (return)
-
- inec move.w sBC,d5 ;ED58 IN E,(C)
- rol.w #8,d5
- jsr inp
- move.b d6,sDE
- jmp (return)
-
- outce move.b sDE,d6 ;ED59 OUT (C),E
- move.w sBC,d5
- rol.w #8,d5
- jsr outp
- jmp (return)
-
- dadcd ashl add,sDE ;ED5A DADC A,D
-
- lded gwpc d5 ;ED5B LDED addr
- bsr gword
- move.w d6,sDE
- jmp (return)
-
- im2 jmp (return) ;ED5E IM2 (ignored)
-
- movear move.w sRF,d6 ;ED5F LD A,R
- lsr.w #1,d6
- move.b d6,sA
- jmp (return)
-
- inhc move.w sBC,d5 ;ED60 IN H,(C)
- rol.w #8,d5
- jsr inp
- rol.w #8,sHL
- move.b d6,sHL
- rol.w #8,sHL
- jmp (return)
-
- outch move.w sBC,d5 ;ED61 OUT (C),H
- move.w sHL,d6
- rol.w #8,d5
- rol.w #8,d6
- jsr outp
- jmp (return)
-
- dsbbh ashl sub,sHL ;ED62 DSBC A,H
-
- rrd move.w sHL,d5 ;ED67 RRD
- bsr gbyte
- move.w d6,d5
- move.b sA,-(sp)
- and.b #$F,d5
- and.b #$F0,sA
- or.b d5,sA
- move.w sHL,d5
- bsr gbyte
- move.w d6,d5
- lsr.b #4,d5
- move.w (sp)+,d6
- and.b #$F,d6
- lsl.b #4,d6
- or.b d6,d5
- move.w d5,d6
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- inlc move.w sBC,d5 ;ED68 IN L,(C)
- rol.w #8,d5
- jsr inp
- move.b d6,sHL
- jmp (return)
-
- outcl move.w sBC,d5 ;ED69 OUT (C),L
- rol.w #8,d5
- move.b sHL,d6
- jsr outp
- jmp (return)
-
- dadch ashl add,sHL ;ED6A DADC A,H
-
- rld move.w sHL,d5 ;ED6F RLD
- bsr gbyte
- move.b d6,d5
- move.w sA,-(sp)
- lsr.b #4,d5
- and.b #$F0,sA
- or.b d5,sA
- move.w sHL,d5
- bsr gbyte
- move.b d6,d5
- lsl.b #4,d5
- move.w (sp)+,d6
- and.b #$F,d6
- or.b d6,d5
- move.b d5,d6
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- inmc move.w sBC,d5 ;ED70 IN (HL),(C)
- rol.w #8,d5
- jsr inp
- move.w sHL,d5
- bsr wbyte
- jmp (return)
-
- outcm move.b sHL,d5 ;ED71 OUT (C),(HL)
- bsr gbyte
- move.w sBC,d5
- rol.w #8,d5
- jsr outp
- jmp (return)
-
- dsbbs move.w stack,d5 ;ED72 DSBC A,SP
- move.w sHL,d6
- asr.b #1,sF
- ori #4,ccr
- subx.w d5,d6
- ifeq x680x0
- move sr,d5
- endc
- ifne x680x0
- dc.w $42C5
- endc
- and.w #$F,d5
- move.b 0(flagptr,d5.w),sF
- move.w d6,sHL
- jmp (return)
-
- sspd gwpc d5 ;ED73 SSPD addr
- move.w stack,d6
- bsr wword
- jmp (return)
-
- inac move.w sBC,d5 ;ED78 IN A,(C)
- rol.w #8,d5
- jsr inp
- move.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- outca move.w sBC,d5 ;ED79 OUT (C),A
- move.b sA,d6
- rol.w #8,d5
- jsr outp
- jmp (return)
-
- dadcs move.w stack,d5 ;ED7A DADC A,SP
- asr.b #1,sF
- ori #4,ccr
- addx.w d5,sHL
- ifeq x680x0
- move sr,d5
- endc
- ifne x680x0
- dc.w $42C5
- endc
- and.w #$F,d5
- move.b 0(flagptr,d5.w),sF
- jmp (return)
-
- lspd gwpc d5 ;ED7B LSPD addr
- bsr gword
- move.w d6,stack
- jmp (return)
-
- ldi move.w sHL,d5 ;EDA0 LDI
- bsr gbyte
- move.w sDE,d5
- bsr wbyte
- addq.w #1,sDE
- addq.w #1,sHL
- subq.w #1,sBC
- beq.s 1$
- ori.b #4,sF
- andi.b #$ED,sF
- jmp (return)
- 1$ andi.b #$E9,sF
- jmp (return)
-
- cmpi move.w sHL,d5 ;EDA1 CPI
- bsr gbyte
- cmp.b d6,sA
- setflag SETONLY
- addq.w #1,sHL
- subq.w #1,sBC
- beq.s 1$
- ori.b #6,sF
- jmp (return)
- 1$ ori.b #2,sF
- jmp (return)
-
- ini jmp (return) ;EDA2 INI
-
- outi jmp (return) ;EDA3 OUTI
-
- ldd move.w sHL,d5 ;EDA8 LDD
- bsr gbyte
- move.w sDE,d5
- bsr wbyte
- subq.w #1,sHL
- subq.w #1,sDE
- subq.w #1,sBC
- beq.s 1$
- ori.b #4,sF
- andi.b #$ED,sF
- jmp (return)
- 1$ andi.b #$E9,sF
- jmp (return)
-
- cpd move.w sHL,d5 ;EDA9 CPD
- bsr gbyte
- cmp.b d6,sA
- setflag SETONLY
- subq.w #1,sHL
- subq.w #1,sBC
- beq.s 1$
- ori.b #6,sF
- jmp (return)
- 1$ ori.b #2,sF
- jmp (return)
-
- ind jmp (return) ;EDAA IND
-
- outd jmp (return) ;EDAB OUTD
-
- ldir moveq #0,d5
- move.w sDE,d5
- move.l d5,firstad
- moveq #0,d6
- move.w sBC,d6
- add.l d6,d5
- move.l d5,lastad
-
- move.b sRF,d5
- move.b d5,d6
- add.b sBC,d5
- add.b sBC,d5
- subq.b #2,d5
- and.b #$7f,d5
- and.b #$80,d6
- or.b d6,d5
- move.b d5,sRF
-
- ldirloop
- move.w sHL,d5 ;EDB0 LDIR
- bsr gbyte
- move.b d6,0(a4,sDE.w)
- addq.w #1,sHL
- addq.w #1,sDE
- subq.w #1,sBC
- bne.s ldirloop
- moveq #0,d6
- move.w scrbase,d6
- cmp.l lastad,d6
- bcc ldir_end
-
- move.l firstad,d5
- cmp.w d6,d5
- bcc ldir_fagr
- move.w d6,d5
- ldir_fagr
- move.l d5,firstad
-
- add.w #$3fff,d6
- move.l lastad,d5
- cmp.l d6,d5
- bcc ldir_engr
- move.w d5,d6
- ldir_engr
- move.l firstad,d5
- jsr RedrawArea
- ldir_end
- andi.b #$C1,sF
- jmp (return)
-
- cpir move.w d7,-(sp) ;EDB1 CPIR
- move.w sBC,d7
- subq.w #1,d7
- cpirlop move.w sHL,d5
- bsr gbyte
- addq.w #1,sHL
- cmp.b d6,sA
- dbeq d7,cpirlop
- bne.s cpirnom
- move.w d7,sBC
- beq.s 1$
- move.w #$46,sF
- bra cpirend
- 1$ move.w #$42,sF
- bra cpirend
- cpirnom addq.w #1,d7
- move.w d7,sBC
- beq.s 2$
- moveq #6,sF
- bra cpirend
- 2$ move.w #2,sF
- cpirend move.w (sp)+,d7
- jmp (return)
- inir jmp (return) ;EDB2 INIR
-
- otir jmp (return) ;EDB3 OTIR
-
- lddr: move.b sRF,d5 ;EDB8 LDDR
- move.b d5,d6
- add.b sBC,d5
- add.b sBC,d5
- subq.b #2,d5
- and.b #$7f,d5
- and.b #$80,d6
- or.b d6,d5
- move.b d5,sRF
- lddr2 move.w sHL,d5
- bsr gbyte
- move.w sDE,d5
- bsr wbyte
- subq.w #1,sHL
- subq.w #1,sDE
- subq.w #1,sBC
- bne.s lddr2
- andi.b #$C1,sF
- jmp (return)
-
- cpdr move.w d7,-(sp) ;EDB9 CPDR
- move.w sBC,d7
- subq.w #1,d7
- cpdrlop move.w sHL,d5
- bsr gbyte
- subq.w #1,sHL
- cmp.b d6,sA
- dbeq d7,cpdrlop
- bne.s cpdrnom
- move.w d7,sBC
- beq.s 1$
- move.w #$46,sF
- bra cpdrend
- 1$ move.w #$42,sF
- jmp cpdrend
- cpdrnom addq.w #1,d7
- move.w d7,sBC
- beq.s 2$
- move.w #6,sF
- bra cpdrend
- 2$ move.w #2,sF
- cpdrend move.w (sp)+,d7
- jmp (return)
-
- indr jmp (return) ;EDBA INDR
-
- otdr jmp (return) ;EDBB OTDR
-
- dadiyb add.w sBC,iy ;FD09 DAD IY,B
- docyf
-
- dadiyd add.w sDE,iy ;FD19 DAD IY,D
- docyf
-
- lxiiy gwpc d6 ;FD21 LXI IY,nnnn
- move.w d6,iy
- jmp (return)
-
- siyd gwpc d5 ;FD22 SIYD addr
- move.w iy,d6
- bsr wword
- jmp (return)
-
- inxiy addq.w #1,iy ;FD23 INX IY
- jmp (return)
-
- inryh addq.b #1,yh ;FD24 INR YH (undocumented)
- inrflag
- jmp (return)
-
- dcryh subq.b #1,yh ;FD25 DCR YH (undocumented)
- inrflag
- jmp (return)
-
- mviyh gbpc ;FD26 MVI YH,nn (undocumented)
- move.b d6,yh
- jmp (return)
-
- dadiyy move.w iy,d5 ;FD29 DAD IY,IY (multiply by 2)
- add.w d5,iy
- docyf
-
- liyd gwpc d5 ;FD2A LIYD addr
- bsr gword
- move.w d6,iy
- jmp (return)
-
- dcxiy subq.w #1,iy ;FD2B DCX IY
- jmp (return)
-
- inryl addq.b #1,yl ;FD2C INR YL (undocumented)
- inrflag
- jmp (return)
-
- dcryl subq.b #1,yl ;FD2D DCR YL (undocumented)
- inrflag
- jmp (return)
-
- mviyl gbpc ;FD2E MVI YL,nn (undocumented)
- move.b d6,yl
- jmp (return)
-
- inriy calcind iy ;FD34 INR (IY+d)
- bsr gbyte
- move.w d5,-(sp)
- addq.b #1,d6
- inrflag
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- dcriy calcind iy ;FD35 DCR (IY+d)
- bsr gbyte
- move.w d5,-(sp)
- subq.b #1,d6
- inrflag
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- mviiy calcind iy ;FD36 MVI (IY+d),nn
- move.w d5,-(sp)
- gbpc
- move.w (sp)+,d5
- bsr wbyte
- jmp (return)
-
- dadiys move.w stack,d5 ;FD39 DAD IY,SP
- add.w d5,iy
- docyf
-
- movbyh rol.w #8,sBC ;FD44 LD B,YH (undocumented)
- move.b yh,sBC
- rol.w #8,sBC
- jmp (return)
-
- movbyl rol.w #8,sBC ;FD45 LD B,YL (undocumented)
- move.b yl,sBC
- rol.w #8,sBC
- jmp (return)
-
- movbiy calcind iy ;FD46 LD B,(IY+d)
- bsr gbyte
- rol.w #8,sBC
- move.b d6,sBC
- rol.w #8,sBC
- jmp (return)
-
- movcyh move.b yh,sBC ;FD4C LD C,YH (undocumented)
- jmp (return)
-
- movcyl move.b yl,sBC ;FD4D LD C,YL (undocumented)
- jmp (return)
-
- movciy calcind iy ;FD4E LD C,(IY+d)
- bsr gbyte
- move.b d6,sBC
- jmp (return)
-
- movdyh rol.w #8,sDE ;FD54 LD D,YH (undocumented)
- move.b yh,sDE
- rol.w #8,sDE
- jmp (return)
-
- movdyl rol.w #8,sDE ;FD55 LD D,YL (undocumented)
- move.b yl,sDE
- rol.w #8,sDE
- jmp (return)
-
- movdiy calcind iy ;FD56 LD D,(IY+d)
- bsr gbyte
- rol.w #8,sDE
- move.b d6,sDE
- rol.w #8,sDE
- jmp (return)
-
- moveyh move.b yh,sDE ;FD5C LD E,YH (undocumented)
- jmp (return)
-
- moveyl move.b yl,sDE ;FD5D LD E,YL (undocumented)
- jmp (return)
-
- moveiy calcind iy ;FD5E LD E,(IY+d)
- bsr gbyte
- move.b d6,sDE
- jmp (return)
-
- movyhb move.w sBC,d5 ;FD60 LD YH,B (undocumented)
- rol.w #8,d5
- move.b d5,yh
- jmp (return)
-
- movyhc move.b sBC,yh ;FD61 LD YH,C (undocumented)
- jmp (return)
-
- movyhd move.w sDE,d5 ;FD62 LD YH,D (undocumented)
- rol.w #8,d5
- move.b d5,yh
- jmp (return)
-
- movyhe move.b sDE,yh ;FD63 LD YH,E (undocumented)
- jmp (return)
-
- mvyhyh jmp (return) ;FD64 LD YH,YH (undocumented)
-
- mvyhyl move.b yl,yh ;FD65 LD YH,YL (undocumented)
- jmp (return)
-
- movhiy calcind iy ;FD66 LD H,(IY+d)
- bsr gbyte
- rol.w #8,sHL
- move.b d6,sHL
- rol.w #8,sHL
- jmp (return)
-
- movyha move.b sA,yh ;FD67 LD YH,A
- jmp (return)
-
- movylb move.w sBC,d5 ;FD68 LD YL,B (undocumented)
- rol.w #8,d5
- move.b d5,yl
- jmp (return)
-
- movylc move.b sBC,yl ;FD69 LD YL,C (undocumented)
- jmp (return)
-
- movyld move.w sDE,d5 ;FD6A LD YL,D (undocumented)
- rol.w #8,d5
- move.b d5,yl
- jmp (return)
-
- movyle move.b sDE,yl ;FD6B LD YL,E (undocumented)
- jmp (return)
-
- mvylyh move.b yh,yl ;FD6C LD YL,YH (undocumented)
- jmp (return)
-
- mvylyl jmp (return) ;FD6D LD YL,YL (undocumented)
-
- movliy calcind iy ;FD6E LD L,(IY+d)
- bsr gbyte
- move.b d6,sHL
- jmp (return)
-
- movyla move.b sA,yl ;FD6F LD YL,A
- jmp (return)
-
- moviyb calcind iy ;FD70 LD (IY+d),B
- move.w sBC,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- moviyc calcind iy ;FD71 LD (IY+d),C
- move.b sBC,d6
- bsr wbyte
- jmp (return)
-
- moviyd calcind iy ;FD72 LD (IY+d),D
- move.w sDE,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- moviye calcind iy ;FD73 LD (IY+d),E
- move.b sDE,d6
- bsr wbyte
- jmp (return)
-
- moviyh calcind iy ;FD74 LD (IY+d),H
- move.w sHL,d6
- rol.w #8,d6
- bsr wbyte
- jmp (return)
-
- moviyl calcind iy ;FD75 LD (IY+d),L
- move.b sHL,d6
- bsr wbyte
- jmp (return)
-
- moviya calcind iy ;FD77 LD (IY+d),A
- move.b sA,d6
- bsr wbyte
- jmp (return)
-
- movayh move.b yh,sA ;FD7C LD A,YH (undocumented)
- jmp (return)
-
- movayl move.b yl,sA ;FD7D LD A,YL (undocumented)
- jmp (return)
-
- movaiy calcind iy ;FD7E LD A,(IY+d)
- bsr gbyte
- move.b d6,sA
- jmp (return)
-
- addyh move.b yh,d6 ;FD84 ADD A,YH (undocumented)
- addflag
-
- addyl move.b yl,d6 ;FD85 ADD A,YL (undocumented)
- addflag
-
- addiy calcind iy ;FD86 ADD A,(IY+d)
- bsr gbyte
- addflag
-
- adcyh move.b yh,d6 ;FD8C ADC A,YH (undocumented)
- adcflag
-
- adcyl move.b yl,d6 ;FD8E ADC A,YL (undocumented)
- adcflag
-
- adciy calcind iy ;FD8E ADC A,(IY+d)
- bsr gbyte
- adcflag
-
- subyh move.b yh,d5 ;FD94 SUB A,YH (undocumented)
- move.b d5,d6
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- subyl move.b yl,d5 ;FD95 SUB A,YL (undocumented)
- move.b d5,d6
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- subiy calcind iy ;FD96 SUB A,(IY+d)
- bsr gbyte
- move.b d6,d5
- nbcd d6
- move.b d6,daaop1
- move.b sA,daaop2
- clr.b daaop3
- sub.b d5,sA
- setflag
-
- sbbyh move.b yh,d5 ;FD9C SBC A,YH (undocumented)
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbyl move.b yl,d5 ;FD9D SBC A,YL (undocumented)
- move.b d5,d6
- nbcd d6
- sbbflag
-
- sbbiy calcind iy ;FD9E SBC A,(IY+d)
- bsr gbyte
- move.b d6,d5
- nbcd d6
- sbbflag
-
- anayh and.b yh,sA ;FDA4 AND A,YH (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- anayl and.b yl,sA ;FDA5 AND A,YL (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- anaiy calcind iy ;FDA6 AND A,(IY+d)
- bsr gbyte
- and.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xrayh move.b yh,d6 ;FDAC XOR A,YH (undocumented)
- eor.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xrayl move.b yl,d6 ;FDAD XOR A,YL (undocumented)
- eor.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- xraiy calcind iy ;FDAE XOR A,(IY+d)
- bsr gbyte
- eor.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- orayh or.b yh,sA ;FDB4 OR A,YH (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- orayl or.b yl,sA ;FDB5 OR A,YL (undocumented)
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- oraiy calcind iy ;FDB6 OR A,(IY+d)
- bsr gbyte
- or.b d6,sA
- move.b 16(flagptr,sA.w),sF
- jmp (return)
-
- cmpyh cmp.b yh,sA ;FDBC CP YH (undocumented)
- setflag
-
- cmpyl cmp.b yl,sA ;FDBD CP YL (undocumented)
- setflag
-
- cmpiy calcind iy ;FDBE CP (IY+d)
- bsr gbyte
- cmp.b d6,sA
- setflag
-
- popiy move.w stack,d5 ;FDE1 POP IY
- bsr gword
- addq.w #2,stack
- move.w d6,iy
- subq.l #4,daasp
- jmp (return)
-
- xtiy move.w iy,-(sp) ;FDE3 XTIY
- move.w stack,d5
- bsr gword
- move.w d6,iy
- move.w (sp)+,d6
- bsr wword
- jmp (return)
-
- pushiy subq.w #2,stack ;FDE5 PUSH IY
- move.w stack,d5
- move.w iy,d6
- bsr wword
- addq.l #4,daasp
- jmp (return)
-
- pciy move.w iy,sPC ;FDE9 PCIY
- bsr calcpca
- jmp (return)
-
- spiy move.w iy,stack ;FDF9 SPIY
- jmp (return)
-
- *************************************************************************
- * *
- * Opcode dispatch table *
- * *
- *************************************************************************
- data data
-
- even
- optabl dc.l nop00,lxib,staxb,inxb,inrb,dcrb,mvib,rlc
- dc.l exaf,dadb,ldaxb,dcxb,inrc,dcrc,mvic,rrc
- dc.l djnz,lxid,staxd,inxd,inrd,dcrd,mvid,ral
- dc.l jr,dadd,ldaxd,dcxd,inre,dcre,mvie,rar
- dc.l jrnz,lxih,shld,inxh,inrh,dcrh,mvih,daa
- dc.l jrz,dadh,lhld,dcxh,inrl,dcrl,mvil,cma
- dc.l jrnc,lxis,sta,inxs,inrm,dcrm,mvim,stc
- dc.l jrc,dads,lda,dcxs,inra,dcra,mvia,cmc
- dc.l movebb,movebc,movebd,movebe,movebh,movebl,movebm,moveba
- dc.l movecb,movecc,movecd,movece,movech,movecl,movecm,moveca
- dc.l movedb,movedc,movedd,movede,movedh,movedl,movedm,moveda
- dc.l moveeb,moveec,moveed,moveee,moveeh,moveel,moveem,moveea
- dc.l movehb,movehc,movehd,movehe,movehh,movehl,movehm,moveha
- dc.l movelb,movelc,moveld,movele,movelh,movell,movelm,movela
- dc.l movemb,movemc,movemd,moveme,movemh,moveml,halt,movema
- dc.l moveab,moveac,movead,moveae,moveah,moveal,moveam,moveaa
- dc.l addb,addc,addd,adde,addh,addl,addm,adda
- dc.l adcb,adcc,adcd,adce,adch,adcl,adcm,adca
- dc.l subb,subc,subd,sube,subh,subl,subm,suba
- dc.l sbbb,sbbc,sbbd,sbbe,sbbh,sbbl,sbbm,sbba
- dc.l andb,andc,andd,ande,andh,andl,andm,anda
- dc.l xrab,xrac,xrad,xrae,xrah,xral,xram,xraa
- dc.l orab,orac,orad,orae,orah,oral,oram,oraa
- dc.l cmpb,cmpc,cmpd,cmpe,cmph,cmpl,cmpam,cmpaa
- dc.l rnz,popb,jnz,jmpa,cnz,pushb,adi,rst0
- dc.l rz,ret,jz,preCB,cz,call,aci,rst1
- dc.l rnc,popd,jnc,out,cnc,pushd,sui,rst2
- dc.l rc,exx,jc,in,cc,preDD,sbi,rst3
- dc.l rpo,poph,jpo,xthl,cpo,pushh,ani,rst4
- dc.l rpe,pchl,jpe,xchg,cpe,preED,xri,rst5
- dc.l rp,popp,jp,di,cp,pushp,oria,rst6
- dc.l rm,sphl,jm,ei,cm,preFD,cpi,rst7
- page
- *************************************************************************
- * *
- * Flag register lookup tables *
- * *
- *************************************************************************
- flags dc.b $00,$01,$04,$05,$40,$41,$44,$45,$80,$81,$84,$85,$C0,$C1,$C4,$C5
- dc.b $44,$00,$00,$04,$00,$04,$04,$00,$00,$04,$04,$00,$04,$00,$00,$04
- dc.b $00,$04,$04,$00,$04,$00,$00,$04,$04,$00,$00,$04,$00,$04,$04,$00
- dc.b $00,$04,$04,$00,$04,$00,$00,$04,$04,$00,$00,$04,$00,$04,$04,$00
- dc.b $04,$00,$00,$04,$00,$04,$04,$00,$00,$04,$04,$00,$04,$00,$00,$04
- dc.b $00,$04,$04,$00,$04,$00,$00,$04,$04,$00,$00,$04,$00,$04,$04,$00
- dc.b $04,$00,$00,$04,$00,$04,$04,$00,$00,$04,$04,$00,$04,$00,$00,$04
- dc.b $04,$00,$00,$04,$00,$04,$04,$00,$00,$04,$04,$00,$04,$00,$00,$04
- dc.b $00,$04,$04,$00,$04,$00,$00,$04,$04,$00,$00,$04,$00,$04,$04,$00
- dc.b $80,$84,$84,$80,$84,$80,$80,$84,$84,$80,$80,$84,$80,$84,$84,$80
- dc.b $84,$80,$80,$84,$80,$84,$84,$80,$80,$84,$84,$80,$84,$80,$80,$84
- dc.b $84,$80,$80,$84,$80,$84,$84,$80,$80,$84,$84,$80,$84,$80,$80,$84
- dc.b $80,$84,$84,$80,$84,$80,$80,$84,$84,$80,$80,$84,$80,$84,$84,$80
- dc.b $84,$80,$80,$84,$80,$84,$84,$80,$80,$84,$84,$80,$84,$80,$80,$84
- dc.b $80,$84,$84,$80,$84,$80,$84,$80,$84,$80,$80,$84,$80,$84,$84,$80
- dc.b $80,$84,$84,$80,$84,$80,$84,$80,$84,$80,$80,$84,$80,$84,$84,$80
- dc.b $84,$80,$80,$84,$80,$84,$84,$80,$80,$84,$84,$80,$84,$80,$80,$84
- page
- *************************************************************************
- * *
- * More dispatch tables. *
- * *
- *************************************************************************
-
- CBoptab:
- dc.l rlcb,rlcc,rlcd,rlce,rlch,rlcl,rlcm,rlca ;CB00
- dc.l rrcb,rrcc,rrcd,rrce,rrch,rrcl,rrcm,rrca ;CB08
- dc.l rlrb,rlrc,rlrd,rlre,rlrh,rlrl,rlrm,rlra ;CB10
- dc.l rrrb,rrrc,rrrd,rrre,rrrh,rrrl,rrrm,rrra ;CB18
- dc.l slab,slac,slad,slae,slah,slal,slam,slaa ;CB20
- dc.l srab,srac,srad,srae,srah,sral,sram,sraa ;CB28
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;CB30
- dc.l srlb,srlc,srld,srle,srlh,srll,srlm,srla ;CB38
- dc.l bit0b,bit0c,bit0d,bit0e,bit0h,bit0l,bit0m,bit0a ;CB40
- dc.l bit1b,bit1c,bit1d,bit1e,bit1h,bit1l,bit1m,bit1a ;CB48
- dc.l bit2b,bit2c,bit2d,bit2e,bit2h,bit2l,bit2m,bit2a ;CB50
- dc.l bit3b,bit3c,bit3d,bit3e,bit3h,bit3l,bit3m,bit3a ;CB58
- dc.l bit4b,bit4c,bit4d,bit4e,bit4h,bit4l,bit4m,bit4a ;CB60
- dc.l bit5b,bit5c,bit5d,bit5e,bit5h,bit5l,bit5m,bit5a ;CB68
- dc.l bit6b,bit6c,bit6d,bit6e,bit6h,bit6l,bit6m,bit6a ;CB70
- dc.l bit7b,bit7c,bit7d,bit7e,bit7h,bit7l,bit7m,bit7a ;CB78
- dc.l res0b,res0c,res0d,res0e,res0h,res0l,res0m,res0a ;CB80
- dc.l res1b,res1c,res1d,res1e,res1h,res1l,res1m,res1a ;CB88
- dc.l res2b,res2c,res2d,res2e,res2h,res2l,res2m,res2a ;CB90
- dc.l res3b,res3c,res3d,res3e,res3h,res3l,res3m,res3a ;CB98
- dc.l res4b,res4c,res4d,res4e,res4h,res4l,res4m,res4a ;CBA0
- dc.l res5b,res5c,res5d,res5e,res5h,res5l,res5m,res5a ;CBA8
- dc.l res6b,res6c,res6d,res6e,res6h,res6l,res6m,res6a ;CBB0
- dc.l res7b,res7c,res7d,res7e,res7h,res7l,res7m,res7a ;CBB8
- dc.l set0b,set0c,set0d,set0e,set0h,set0l,set0m,set0a ;CBC0
- dc.l set1b,set1c,set1d,set1e,set1h,set1l,set1m,set1a ;CBC8
- dc.l set2b,set2c,set2d,set2e,set2h,set2l,set2m,set2a ;CBD0
- dc.l set3b,set3c,set3d,set3e,set3h,set3l,set3m,set3a ;CBD8
- dc.l set4b,set4c,set4d,set4e,set4h,set4l,set4m,set4a ;CBE0
- dc.l set5b,set5c,set5d,set5e,set5h,set5l,set5m,set5a ;CBE8
- dc.l set6b,set6c,set6d,set6e,set6h,set6l,set6m,set6a ;CBF0
- dc.l set7b,set7c,set7d,set7e,set7h,set7l,set7m,set7a ;CBF8
-
- DDoptab:
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;DD00
- dc.l illgED,dadixb,illgED,illgED,illgED,illgED,illgED,illgED ;DD08
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;DD10
- dc.l illgED,dadixd,illgED,illgED,illgED,illgED,illgED,illgED ;DD18
- dc.l illgED,lxiix,sixd,inxix,inrxh,dcrxh,mvixh,illgED ;DD20
- dc.l illgED,dadixx,lixd,dcxix,inrxl,dcrxl,mvixl,illgED ;DD28
- dc.l illgED,illgED,illgED,illgED,inrix,dcrix,mviix,illgED ;DD30
- dc.l illgED,dadixs,illgED,illgED,illgED,illgED,illgED,illgED ;DD38
- dc.l illgED,illgED,illgED,illgED,movbxh,movbxl,movbix,illgED ;DD40
- dc.l illgED,illgED,illgED,illgED,movcxh,movcxl,movcix,illgED ;DD48
- dc.l illgED,illgED,illgED,illgED,movdxh,movdxl,movdix,illgED ;DD50
- dc.l illgED,illgED,illgED,illgED,movexh,movexl,moveix,illgED ;DD58
- dc.l movxhb,movxhc,movxhd,movxhe,mvxhxh,mvxhxl,movhix,movxha ;DD60
- dc.l movxlb,movxlc,movxld,movxle,mvxlxh,mvxlxl,movlix,movxla ;DD68
- dc.l movixb,movixc,movixd,movixe,movixh,movixl,illgED,movixa ;DD70
- dc.l illgED,illgED,illgED,illgED,movaxh,movaxl,movaix,illgED ;DD78
- dc.l illgED,illgED,illgED,illgED,addxh,addxl,addix,illgED ;DD80
- dc.l illgED,illgED,illgED,illgED,adcxh,adcxl,adcix,illgED ;DD88
- dc.l illgED,illgED,illgED,illgED,subxh,subxl,subix,illgED ;DD90
- dc.l illgED,illgED,illgED,illgED,sbbxh,sbbxl,sbbix,illgED ;DD98
- dc.l illgED,illgED,illgED,illgED,anaxh,anaxl,anaix,illgED ;DDA0
- dc.l illgED,illgED,illgED,illgED,xraxh,xraxl,xraix,illgED ;DDA8
- dc.l illgED,illgED,illgED,illgED,oraxh,oraxl,oraix,illgED ;DDB0
- dc.l illgED,illgED,illgED,illgED,cmpxh,cmpxl,cmpix,illgED ;DDB8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;DDC0
- dc.l illgED,illgED,illgED,prDDCB,illgED,illgED,illgED,illgED ;DDC8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;DDD0
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;DDD8
- dc.l illgED,popix,illgED,xtix,illgED,pushix,illgED,illgED ;DDE0
- dc.l illgED,pcix,illgED,illgED,illgED,illgED,illgED,illgED ;DDE8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;DDF0
- dc.l illgED,spix,illgED,illgED,illgED,illgED,illgED,illgED ;DDF8
-
- DDCBopt:
- dc.l rlcix,rrcix,rlix,rrix,slaix,sraix,ilgDDCB,srlix ;DDCB06
- dc.l bit0ix,bit1ix,bit2ix,bit3ix,bit4ix,bit5ix,bit6ix,bit7ix ;DDCB46
- dc.l res0ix,res1ix,res2ix,res3ix,res4ix,res5ix,res6ix,res7ix ;DDCB86
- dc.l set0ix,set1ix,set2ix,set3ix,set4ix,set5ix,set6ix,set7ix ;DDCBC6
-
- EDoptab:
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED00
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED08
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED10
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED18
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED20
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED28
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED30
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED38
- dc.l inbc,outcb,dsbbb,sbcd,nega,retn,im0,moveia ;ED40
- dc.l incc,outcc,dadcb,lbcd,illgED,reti,illgED,movera ;ED48
- dc.l indc,outcd,dsbbd,sded,illgED,illgED,im1,moveai ;ED50
- dc.l inec,outce,dadcd,lded,illgED,illgED,im2,movear ;ED58
- dc.l inhc,outch,dsbbh,shld,illgED,illgED,illgED,rrd ;ED60
- dc.l inlc,outcl,dadch,lhld,illgED,illgED,illgED,rld ;ED68
- dc.l inmc,outcm,dsbbs,sspd,illgED,illgED,illgED,illgED ;ED70
- dc.l inac,outca,dadcs,lspd,illgED,illgED,illgED,illgED ;ED78
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED80
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED88
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED90
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;ED98
- dc.l ldi,cmpi,ini,outi,illgED,illgED,illgED,illgED ;EDA0
- dc.l ldd,cpd,ind,outd,illgED,illgED,illgED,illgED ;EDA8
- dc.l ldir,cpir,inir,otir,illgED,illgED,illgED,illgED ;EDB0
- dc.l lddr,cpdr,indr,otdr,illgED,illgED,illgED,illgED ;EDB8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDC0
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDC8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDD0
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDD8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDE0
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDE8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDF0
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;EDF8
-
- FDoptab:
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;FD00
- dc.l illgED,dadiyb,illgED,illgED,illgED,illgED,illgED,illgED ;FD08
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;FD10
- dc.l illgED,dadiyd,illgED,illgED,illgED,illgED,illgED,illgED ;FD18
- dc.l illgED,lxiiy,siyd,inxiy,inryh,dcryh,mviyh,illgED ;FD20
- dc.l illgED,dadiyy,liyd,dcxiy,inryl,dcryl,mviyl,illgED ;FD28
- dc.l illgED,illgED,illgED,illgED,inriy,dcriy,mviiy,illgED ;FD30
- dc.l illgED,dadiys,illgED,illgED,illgED,illgED,illgED,illgED ;FD38
- dc.l illgED,illgED,illgED,illgED,movbyh,movbyl,movbiy,illgED ;FD40
- dc.l illgED,illgED,illgED,illgED,movcyh,movcyl,movciy,illgED ;FD48
- dc.l illgED,illgED,illgED,illgED,movdyh,movdyl,movdiy,illgED ;FD50
- dc.l illgED,illgED,illgED,illgED,moveyh,moveyl,moveiy,illgED ;FD58
- dc.l movyhb,movyhc,movyhd,movyhe,mvyhyh,mvyhyl,movhiy,movyha ;FD60
- dc.l movylb,movylc,movyld,movyle,mvylyh,mvylyl,movliy,movyla ;FD68
- dc.l moviyb,moviyc,moviyd,moviye,moviyh,moviyl,illgED,moviya ;FD70
- dc.l illgED,illgED,illgED,illgED,movayh,movayl,movaiy,illgED ;FD78
- dc.l illgED,illgED,illgED,illgED,addyh,addyl,addiy,illgED ;FD80
- dc.l illgED,illgED,illgED,illgED,adcyh,adcyl,adciy,illgED ;FD88
- dc.l illgED,illgED,illgED,illgED,subyh,subyl,subiy,illgED ;FD90
- dc.l illgED,illgED,illgED,illgED,sbbyh,sbbyl,sbbiy,illgED ;FD98
- dc.l illgED,illgED,illgED,illgED,anayh,anayl,anaiy,illgED ;FDA0
- dc.l illgED,illgED,illgED,illgED,xrayh,xrayl,xraiy,illgED ;FDA8
- dc.l illgED,illgED,illgED,illgED,orayh,orayl,oraiy,illgED ;FDB0
- dc.l illgED,illgED,illgED,illgED,cmpyh,cmpyl,cmpiy,illgED ;FDB8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;FDC0
- dc.l illgED,illgED,illgED,prFDCB,illgED,illgED,illgED,illgED ;FDC8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;FDD0
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;FDD8
- dc.l illgED,popiy,illgED,xtiy,illgED,pushiy,illgED,illgED ;FDE0
- dc.l illgED,pciy,illgED,illgED,illgED,illgED,illgED,illgED ;FDE8
- dc.l illgED,illgED,illgED,illgED,illgED,illgED,illgED,illgED ;FDF0
- dc.l illgED,spiy,illgED,illgED,illgED,illgED,illgED,illgED ;FDF8
-
- bss bss
-
- daaop1 ds.b 1 ; Arrrrgh! I hate these
- daaop2 ds.b 1
- daaop3 ds.b 1
- EVEN
- daaop1b ds.b 1
- daaop2b ds.b 1
- daaop3b ds.b 1
- EVEN
- daastack ds.l 512
- daastmid ds.l 512
- daastackend
- daasp ds.l 1
-
- firstad ds.l 1 ; for fast LDIR
- lastad ds.l 1
- sRF ds.w 1 ; The seven copy protection bits
-
- end
-