diff options
| author | Astrid Smith | 2011-10-21 01:14:17 -0700 |
|---|---|---|
| committer | Astrid Smith | 2011-10-21 01:14:17 -0700 |
| commit | de8e7b57b32f09271408be8b75b8924021af10ff (patch) | |
| tree | fa295b7ef088278404d5d944b70d64e7c74175e0 | |
| parent | 541bce94a4d73e754ce522758dd25ecddb818f04 (diff) | |
Changed comment markers
Doubtless Github will hate me now.
| -rw-r--r-- | alu.s | 51 | ||||
| -rw-r--r-- | global.inc | 40 | ||||
| -rw-r--r-- | interrupts.s.m4 | 116 | ||||
| -rw-r--r-- | opcodes.inc.m4 | 2 | ||||
| -rw-r--r-- | opcodes.s.m4 | 1800 |
5 files changed, 1005 insertions, 1004 deletions
@@ -1,13 +1,14 @@ - ;; Parting out the big math/logic routines from the - ;; instruction dispatch table. + || -*- gas -*- + || Parting out the big math/logic routines from the + || instruction dispatch table. .text alu_add: - ;; ADD instruction - ;; ADD d1,d0 - ;; d1 + d0 -> d1 - move.b d0,f_tmp_src_b ; preserve operands for flag work + || ADD instruction + || ADD d1,d0 + || d1 + d0 -> d1 + move.b d0,f_tmp_src_b | preserve operands for flag work move.b d1,f_tmp_dst_b move.b #1,f_tmp_byte add d0,d1 @@ -16,9 +17,9 @@ alu_add: rts alu_adc: - ;; ADC instruction - ;; ADC d1,d0 - ;; d1 + d0 + carry -> d1 + || ADC instruction + || ADC d1,d0 + || d1 + d0 + carry -> d1 bsr flags_normalize move.b flag_byte(pc),d2 andi.b #1,d2 @@ -31,10 +32,10 @@ alu_adc: rts alu_sbc: - ;; SBC instruction - ;; SBC d1,d0 - ;; d1 - (d0+C) -> d1 - ;; sets flags + || SBC instruction + || SBC d1,d0 + || d1 - (d0+C) -> d1 + || sets flags push.l d2 bsr flags_normalize @@ -51,14 +52,14 @@ alu_sbc: rts alu_sub: - ;; SUB instruction - ;; SUB d1,d0 - ;; d1 - d0 -> d1 - ;; sets flags + || SUB instruction + || SUB d1,d0 + || d1 - d0 -> d1 + || sets flags - ;; XXX use lea and then d(an) if you have a spare register. + || XXX use lea and then d(an) if you have a spare register. - ;; preserve operands for flagging + || preserve operands for flagging move.b d0,f_tmp_src_b move.b d1,f_tmp_dst_b move.b #1,f_tmp_byte @@ -69,22 +70,22 @@ alu_sub: rts alu_and: - ;; XXX do this + || XXX do this rts alu_xor: - ;; XXX do this + || XXX do this rts alu_or: - ;; XXX do this + || XXX do this rts alu_cp: - ;; Same as SUB but the macro that calls this doesn't save the - ;; result. + || Same as SUB but the macro that calls this doesn't save the + || result. - ;; SPEED can hardcode one of the arguments to always be the A register. + || SPEED can hardcode one of the arguments to always be the A register. move.b d0,f_tmp_src_b move.b d1,f_tmp_dst_b move.b #1,f_tmp_byte @@ -1,27 +1,27 @@ -;; -*- asm -*- +|| -*- gas -*- - ;; Register naming -esp EQUR a4 - ;; a5 is pointer to base of opcode jump table -epc EQUR a6 + || Register naming +.equiv esp a4 + || a5 is pointer to base of opcode jump table +.equiv epc a6 - ;; d0 is scratch generally used in macros - ;; d1 is scratch generally used outside macros - ;; d2 is scratch and up for grabs -eaf EQUR d3 -ebc EQUR d4 -ede EQUR d5 -ehl EQUR d6 -eixy EQUR d7 + || d0 is scratch generally used in macros + || d1 is scratch generally used outside macros + || d2 is scratch and up for grabs +.equiv eaf d3 +.equiv ebc d4 +.equiv ede d5 +.equiv ehl d6 +.equiv eixy d7 -SAVEREG MACRO +.macro SAVEREG movem.l d3-d7/a3-a6,-(sp) - ENDM +.endm -RESTREG MACRO +.macro RESTREG movem.l (sp)+,d3-d7/a3-a6 - ENDM +.endm - ;; Size of the ‘jmp do_interrupt’ in every invocation of - ;; START. -INT_OFFSET SET 4 + || Size of the ‘jmp do_interrupt’ in every invocation of + || START. +.set INT_OFFSET 4 diff --git a/interrupts.s.m4 b/interrupts.s.m4 index 66b71d8..8982cb3 100644 --- a/interrupts.s.m4 +++ b/interrupts.s.m4 @@ -1,43 +1,43 @@ -;;; interrupt handling code, in -*- asm -*- +||| interrupt handling code, in -*- gas -*- .data - ;; Current interrupt mode. IM 1 and friends will modify - ;; this. It can be any of 0, 1, 2. + || Current interrupt mode. IM 1 and friends will modify + || this. It can be any of 0, 1, 2. int_mode: dc.b 0 - ;; 0 if the emulated device doesn't want interrupts. - ;; 1 if interrupts are turned on. + || 0 if the emulated device doesn't want interrupts. + || 1 if interrupts are turned on. int_enabled: dc.b 1 - ;; In interrupt mode 0, an interrupt will force a byte onto - ;; the data bus for the processor to execute. To handle - ;; those, the emulator will store the bus byte in int_opcode, - ;; which is followed by an absolute jump to the "next - ;; instruction". The value of int_jump will then be - ;; &int_opcode. - ;; - ;; This differs slightly from what I understand to be actual - ;; handling. The hardware will fetch an immediate argument to - ;; the interrupting instruction from the next location in - ;; memory. - ;; - ;; This emulator, on the other hand, will fetch the immediate - ;; argument from the JP instruction in the shim, and then - ;; dance off into la-la land. + || In interrupt mode 0, an interrupt will force a byte onto + || the data bus for the processor to execute. To handle + || those, the emulator will store the bus byte in int_opcode, + || which is followed by an absolute jump to the "next + || instruction". The value of int_jump will then be + || &int_opcode. + || + || This differs slightly from what I understand to be actual + || handling. The hardware will fetch an immediate argument to + || the interrupting instruction from the next location in + || memory. + || + || This emulator, on the other hand, will fetch the immediate + || argument from the JP instruction in the shim, and then + || dance off into la-la land. int0_opcode: dc.b 0 - dc.b $c3 ; JP immed.w -int0_return: dc.w 0 ; the destination address + dc.b $c3 | JP immed.w +int0_return: dc.w 0 | the destination address .text - ;; This is the interrupt routine. It can come at any point - ;; during an instruction, though routines that use a5 (e.g. by - ;; calling C subroutines) will have to turn off or hold - ;; interrupts. - ;; - ;; Routines that call into TIOS will have to remove this - ;; interrupt handler. + || This is the interrupt routine. It can come at any point + || during an instruction, though routines that use a5 (e.g. by + || calling C subroutines) will have to turn off or hold + || interrupts. + || + || Routines that call into TIOS will have to remove this + || interrupt handler. int_handler: sub.l #INT_OFFSET,a5 rte @@ -46,18 +46,18 @@ int_handler: int_nevermind: rts do_interrupt: - add.l #INT_OFFSET,a5 ; clear the interrupt flag - pea 0(a5,d0.w) ; allows us to rts properly + add.l #INT_OFFSET,a5 | clear the interrupt flag + pea 0(a5,d0.w) | allows us to rts properly - tst.b int_enabled ; 4 cycles - beq.b int_nevermind ; 8 cycles not taken - ;; Common case: interrupts enabled, fall through + tst.b int_enabled | 4 cycles + beq.b int_nevermind | 8 cycles not taken + || Common case: interrupts enabled, fall through - ;; Since this is an instruction all its own, we have D0, D1, - ;; and D2 available. + || Since this is an instruction all its own, we have D0, D1, + || and D2 available. - ;; Interrupts are most often in mode 1, then mode 2, and - ;; almost never in mode 0. + || Interrupts are most often in mode 1, then mode 2, and + || almost never in mode 0. move.b int_mode,d0 cmpi.b #1,d0 beq int_do_mode2 @@ -67,49 +67,49 @@ do_interrupt: beq int_do_mode0 rts - ;; This routine emulates a mode 0 interrupt. + || This routine emulates a mode 0 interrupt. - ;; IM 0: A byte is placed on the bus and executed as if it - ;; were inline in the program. This emulator will put that - ;; byte into int0_opcode and set epc (or int_jump) to point - ;; there. + || IM 0: A byte is placed on the bus and executed as if it + || were inline in the program. This emulator will put that + || byte into int0_opcode and set epc (or int_jump) to point + || there. int_do_mode0: move epc,int0_opcode rts - ;; This routine emulates a mode 1 interrupt. + || This routine emulates a mode 1 interrupt. - ;; IM 1: RST 38 is executed on every interrupt. This is what - ;; the TI-83+ uses almost all the time. + || IM 1: RST 38 is executed on every interrupt. This is what + || the TI-83+ uses almost all the time. int_do_mode1: jmp emu_op_ff - ;; This routine emulates a mode 2 interrupt. + || This routine emulates a mode 2 interrupt. - ;; IM 2: Vectored, the address jumped to is as follows: - ;; - ;; (I << 8) | (byte & 0xfe) - ;; - ;; where I is the I register, and byte is the byte that was - ;; found on the bus. + || IM 2: Vectored, the address jumped to is as follows: + || + || (I << 8) | (byte & 0xfe) + || + || where I is the I register, and byte is the byte that was + || found on the bus. int_do_mode2: rts - ;; This routine emulates a non-maskable interrupt. + || This routine emulates a non-maskable interrupt. int_do_nmi: rts - ;; This routine is used by the emulated DI instruction, which - ;; turns off emulator interrupts. + || This routine is used by the emulated DI instruction, which + || turns off emulator interrupts. ints_stop: rts - ;; This routine is used by the emulated EI instruction, which - ;; turns on emulator interrupts. + || This routine is used by the emulated EI instruction, which + || turns on emulator interrupts. ints_start: rts diff --git a/opcodes.inc.m4 b/opcodes.inc.m4 index 80a9064..0ce4a17 100644 --- a/opcodes.inc.m4 +++ b/opcodes.inc.m4 @@ -1,6 +1,6 @@ dnl # change the comments to match the assembler. Prevents/reduces dnl # confusion. -changecom(;)dnl +changecom(|)dnl dnl # I'm using these, in this direction, specifically to confuse Germans. changequote(`«', `»')dnl dnl # diff --git a/opcodes.s.m4 b/opcodes.s.m4 index 522b539..038fed4 100644 --- a/opcodes.s.m4 +++ b/opcodes.s.m4 @@ -1,47 +1,47 @@ -;;; == -*- asm -*- ========================================================= -;;; ======================================================================== -;;; ___ ___ ======= ============================== -;;; ___( _ ) / _ \ emulation core ==================================== -;;; |_ / _ \| | | | emulation core =================================== -;;; / ( (_) | |_| | emulation core ================================== -;;; /___\___/ \___/ emulation core ================================= -;;; ======= ============================== -;;; ======================================================================== -;;; ======================================================================== - -;;; http://z80.info/z80oplist.txt - - ;; == Memory Macros ================================================ - - ;; Macro to read a byte from main memory at register \addr. Puts - ;; the byte read in \dest. -.macro FETCHB src dest ; 106 cycles, 8 bytes +||| == -*- gas-*- ========================================================= +||| ======================================================================== +||| ___ ___ ======= ============================== +||| ___( _ ) / _ \ emulation core ==================================== +||| |_ / _ \| | | | emulation core =================================== +||| / ( (_) | |_| | emulation core ================================== +||| /___\___/ \___/ emulation core ================================= +||| ======= ============================== +||| ======================================================================== +||| ======================================================================== + +||| http://z80.info/z80oplist.txt + + || == Memory Macros ================================================ + + || Macro to read a byte from main memory at register \addr. Puts + || the byte read in \dest. +.macro FETCHB src dest | 106 cycles, 8 bytes move.w \addr,d1 jsr deref move.b (a0),\dest .endm - ;; Macro to write a byte in \val to main memory at \addr -.macro PUTB val addr ; 106 cycles, 8 bytes + || Macro to write a byte in \val to main memory at \addr +.macro PUTB val addr | 106 cycles, 8 bytes move.w \addr,d1 jsr deref move.b \val,(a0) .endm - ;; Macro to read a word from main memory at register \addr - ;; (unaligned). Puts the word read in \dest. -.macro FETCHW addr dest ; 140 cycles, 16 bytes + || Macro to read a word from main memory at register \addr + || (unaligned). Puts the word read in \dest. +.macro FETCHW addr dest | 140 cycles, 16 bytes move.w \addr,d1 jsr deref - ;; XXX SPEED + || XXX SPEED move.b (a0)+,d2 move.b (a0),\dest rol.w #8,\dest move.b d2,\dest .endm - ;; Macro to write a word in \val to main memory at \addr (regs only) -.macro PUTW val addr ; 140 cycles, 14 bytes + || Macro to write a word in \val to main memory at \addr (regs only) +.macro PUTW val addr | 140 cycles, 14 bytes move.w \addr,d1 jsr deref move.w \val,d0 @@ -50,58 +50,58 @@ move.b d0,(a0) .endm - ;; Push the word in \val (register) using stack register esp. - ;; Sadly, I can't trust the stack register to be aligned. - ;; Destroys d2. + || Push the word in \val (register) using stack register esp. + || Sadly, I can't trust the stack register to be aligned. + || Destroys d2. - ;; (SP-2) <- \1_l - ;; (SP-1) <- \1_h - ;; SP <- SP - 2 -.macro PUSHW val ; 42 cycles, 8 bytes + || (SP-2) <- \1_l + || (SP-1) <- \1_h + || SP <- SP - 2 +.macro PUSHW val | 42 cycles, 8 bytes move.w \val,d2 - LOHI d2 ;slow - move.b d2,-(esp) ; high byte - move.b \val,-(esp) ; low byte + LOHI d2 |slow + move.b d2,-(esp) | high byte + move.b \val,-(esp) | low byte .endm - ;; Pop the word at the top of stack esp into \dest. - ;; Destroys d0. + || Pop the word at the top of stack esp into \dest. + || Destroys d0. - ;; \1_h <- (SP+1) - ;; \1_l <- (SP) - ;; SP <- SP + 2 -.macro POPW dest ; 60 cycles, 8 bytes + || \1_h <- (SP+1) + || \1_l <- (SP) + || SP <- SP + 2 +.macro POPW dest | 60 cycles, 8 bytes move.b (esp)+,\dest LOHI \dest - move.b (esp)+,\dest ; high byte + move.b (esp)+,\dest | high byte HILO \dest .endm - ;; == Immediate Memory Macros == + || == Immediate Memory Macros == - ;; Macro to read an immediate byte into \dest. -.macro FETCHBI dest ; 8 cycles, 2 bytes + || Macro to read an immediate byte into \dest. +.macro FETCHBI dest | 8 cycles, 2 bytes move.b (epc)+,\dest .endm - ;; Macro to read an immediate word (unaligned) into \dest. -.macro FETCHWI dest ; 42 cycles, 8 bytes - ;; XXX SPEED + || Macro to read an immediate word (unaligned) into \dest. +.macro FETCHWI dest | 42 cycles, 8 bytes + || XXX SPEED move.b (epc)+,d2 move.b (epc)+,\dest rol.w #8,\dest move.b d2,\dest .endm - ;; == Common Opcode Macros ========================================= + || == Common Opcode Macros ========================================= - ;; To align opcode routines. + || To align opcode routines. .set _align,0 .macro start .org emu_plain_op+_align -.set _align,_align+$100 ; opcode routine length - jmp do_interrupt ; for interrupt routines +.set _align,_align+$100 | opcode routine length + jmp do_interrupt | for interrupt routines .endm .macro START_DD @@ -128,26 +128,26 @@ .org emu_plain_op+_align+$4A .endm - ;; LOHI/HILO are hideously slow for instructions used often. - ;; Consider interleaving registers instead: - ;; - ;; d4 = [B' B C' C] - ;; - ;; Thus access to B is fast (swap d4) while access to BC is - ;; slow. + || LOHI/HILO are hideously slow for instructions used often. + || Consider interleaving registers instead: + || + || d4 = [B' B C' C] + || + || Thus access to B is fast (swap d4) while access to BC is + || slow. - ;; When you want to use the high reg of a pair, use this first -.macro LOHI reg ; 22 cycles, 2 bytes + || When you want to use the high reg of a pair, use this first +.macro LOHI reg | 22 cycles, 2 bytes ror.w #8,\reg .endm - ;; Then do your shit and finish with this -.macro HILO reg ; 22 cycles, 2 bytes + || Then do your shit and finish with this +.macro HILO reg | 22 cycles, 2 bytes rol.w #8,\reg .endm - ;; Rearrange a register: ABCD -> ACBD. -.macro WORD reg ; 52 cycles, 14 bytes + || Rearrange a register: ABCD -> ACBD. +.macro WORD reg | 52 cycles, 14 bytes move.l \reg,-(sp) movep.w 0(sp),\reg swap \reg @@ -155,19 +155,19 @@ addq #4,sp .endm - ;; == Special Opcode Macros ======================================== + || == Special Opcode Macros ======================================== - ;; Do an ADD \1,\2 -.macro F_ADD_W ; ? cycles, ? bytes - ;; XXX + || Do an ADD \1,\2 +.macro F_ADD_W | ? cycles, ? bytes + || XXX .endm - ;; Do an SUB \1,\2 -.macro F_SUB_W ; ? cycles, ? bytes - ;; XXX + || Do an SUB \1,\2 +.macro F_SUB_W | ? cycles, ? bytes + || XXX .endm - ;; INC and DEC macros -.macro F_INC_B reg ; 108 cycles, 34 bytes + || INC and DEC macros +.macro F_INC_B reg | 108 cycles, 34 bytes move.b #1,f_tmp_byte-flag_storage(a3) move.b #1,f_tmp_src_b-flag_storage(a3) move.b \reg,f_tmp_dst_b-flag_storage(a3) @@ -177,86 +177,86 @@ F_OVFL .endm -.macro F_DEC_B reg ; 80 cycles, 26 bytes +.macro F_DEC_B reg | 80 cycles, 26 bytes move.b #1,f_tmp_byte-flag_storage(a3) - st f_tmp_src_b-flag_storage(a3) ;; why did I do this? + st f_tmp_src_b-flag_storage(a3) || why did I do this? move.b \reg,f_tmp_dst_b-flag_storage(a3) subq #1,\reg F_SET #2 .endm -.macro F_INC_W regpr ; 4 cycles, 2 bytes +.macro F_INC_W regpr | 4 cycles, 2 bytes addq.w #1,\regpr ENDM -.macro F_DEC_W regpr ; 4 cycles, 2 bytes +.macro F_DEC_W regpr | 4 cycles, 2 bytes subq.w #1,\regpr ENDM - ;; I might be able to unify rotation flags or maybe use a - ;; lookup table + || I might be able to unify rotation flags or maybe use a + || lookup table - ;; This is run at the end of every instruction routine. + || This is run at the end of every instruction routine. done: - clr.w d0 ; 4 cycles / 2 bytes - move.b (epc)+,d0 ; 8 cycles / 2 bytes + clr.w d0 | 4 cycles / 2 bytes + move.b (epc)+,d0 | 8 cycles / 2 bytes move.b d0,$4c00+32*(128/8) - rol.w #6,d0 ;18 cycles / 2 bytes - jmp 0(a5,d0.w) ;14 cycles / 4 bytes - ;; overhead: 42 cycles /10 bytes + rol.w #6,d0 |18 cycles / 2 bytes + jmp 0(a5,d0.w) |14 cycles / 4 bytes + || overhead: 42 cycles /10 bytes .macro DONE - clr.w d0 ; 4 cycles / 2 bytes - move.b (epc)+,d0 ; 8 cycles / 2 bytes + clr.w d0 | 4 cycles / 2 bytes + move.b (epc)+,d0 | 8 cycles / 2 bytes move.b d0,$4c00+32*(128/8) - rol.w #6,d0 ;18 cycles / 2 bytes - jmp 0(a5,d0.w) ;14 cycles / 4 bytes + rol.w #6,d0 |18 cycles / 2 bytes + jmp 0(a5,d0.w) |14 cycles / 4 bytes .endm - ;; Timing correction for more precise emulation - ;; - ;; \1 is number of tstates the current instruction should take - ;; \2 is number of cycles taken already + || Timing correction for more precise emulation + || + || \1 is number of tstates the current instruction should take + || \2 is number of cycles taken already .macro TIME .endm CNOP 0,32 -emu_plain_op: ; Size(bytes) Time(cycles) - ; S0 T0 +emu_plain_op: | Size(bytes) Time(cycles) + | S0 T0 - ;; I would like to thank the State of Washington for - ;; supporting the initial development of this file, by giving - ;; me a job doing nothing with no oversight for hours at a - ;; time. + || I would like to thank the State of Washington for + || supporting the initial development of this file, by giving + || me a job doing nothing with no oversight for hours at a + || time. - ;; NOP + || NOP OPCODE(00,«»,4) - ;; + || OP_DD(00,«») - ;; RLC B + || RLC B OP_CB(00,«») - ;; + || OP_DDCB(00,«») - ;; + || OP_FD(00,«») - ;; + || OP_FDCB(00,«») - ;; + || OP_ED(00,«») - ;; LD BC,immed.w - ;; Read a word and put it in BC - ;; No flags - ;; 42 cycles + || LD BC,immed.w + || Read a word and put it in BC + || No flags + || 42 cycles OPCODE(01,« FETCHWI ebc »,36,,12) @@ -269,10 +269,10 @@ OP_FDCB(01,«») OP_ED(01,«») - ;; LD (BC),A - ;; (BC) <- A - ;; No flags - ;; 106 cycles + || LD (BC),A + || (BC) <- A + || No flags + || 106 cycles OPCODE(02,« PUTB eaf,ebc »,14,,4) @@ -284,10 +284,10 @@ OP_FD(02,«») OP_FDCB(02,«») OP_ED(02,«») - ;; INC BC - ;; BC <- BC+1 - ;; No flags - ;; 4 cycles + || INC BC + || BC <- BC+1 + || No flags + || 4 cycles OPCODE(03,« F_INC_W ebc »,4,,2) @@ -299,9 +299,9 @@ OP_FD(03,«») OP_FDCB(03,«») OP_ED(03,«») - ;; INC B - ;; B <- B+1 - ;; 152 cycles + || INC B + || B <- B+1 + || 152 cycles OPCODE(04,« LOHI ebc F_INC_B ebc @@ -315,15 +315,15 @@ OP_FD(04,«») OP_FDCB(04,«») OP_ED(04,«») - ;; DEC B - ;; B <- B-1 - ;; 124 cycles + || DEC B + || B <- B-1 + || 124 cycles OPCODE(05,« LOHI ebc F_DEC_B ebc HILO ebc ») - ;nok + |nok OP_DD(05,«») OP_CB(05,«») @@ -332,17 +332,17 @@ OP_FD(05,«») OP_FDCB(05,«») OP_ED(05,«») - ;; LD B,immed.b - ;; Read a byte and put it in B - ;; B <- immed.b - ;; No flags - ;; 52 cycles + || LD B,immed.b + || Read a byte and put it in B + || B <- immed.b + || No flags + || 52 cycles OPCODE(06,« LOHI ebc FETCHBI ebc HILO ebc »,26,,10) - ;nok + |nok OP_DD(06,«») OP_CB(06,«») @@ -351,15 +351,15 @@ OP_FD(06,«») OP_FDCB(06,«») OP_ED(06,«») - ;; RLCA - ;; Rotate A left, carry bit gets top bit - ;; Flags: H,N=0; C aff. - ;; XXX flags - ;; ? cycles + || RLCA + || Rotate A left, carry bit gets top bit + || Flags: H,N=0| C aff. + || XXX flags + || ? cycles OPCODE(07,« rol.b #1,eaf »,4,,2) - ;nok + |nok OP_DD(07,«») OP_CB(07,«») @@ -368,14 +368,14 @@ OP_FD(07,«») OP_FDCB(07,«») OP_ED(07,«») - ;; EX AF,AF' - ;; No flags - ;; XXX AF - ;; 4 cycles, 2 bytes + || EX AF,AF' + || No flags + || XXX AF + || 4 cycles, 2 bytes OPCODE(08,« swap eaf »,4,,2) - ;nok + |nok OP_DD(08,«») OP_CB(08,«») @@ -384,14 +384,14 @@ OP_FD(08,«») OP_FDCB(08,«») OP_ED(08,«») - ;; ADD HL,BC - ;; HL <- HL+BC - ;; Flags: H, C aff.; N=0 - ;; ? cycles + || ADD HL,BC + || HL <- HL+BC + || Flags: H, C aff.| N=0 + || ? cycles OPCODE(09,« F_ADD_W ebc,ehl ») - ;nok + |nok OP_DD(09,«») OP_CB(09,«») @@ -400,10 +400,10 @@ OP_FD(09,«») OP_FDCB(09,«») OP_ED(09,«») - ;; LD A,(BC) - ;; A <- (BC) - ;; No flags - ;; 106 cycles, 8 bytes + || LD A,(BC) + || A <- (BC) + || No flags + || 106 cycles, 8 bytes OPCODE(0a,« FETCHB ebc,eaf »,14,,4) @@ -415,14 +415,14 @@ OP_FD(0a,«») OP_FDCB(0a,«») OP_ED(0a,«») - ;; DEC BC - ;; BC <- BC-1 - ;; No flags - ;; 4 cycles, 2 bytes + || DEC BC + || BC <- BC-1 + || No flags + || 4 cycles, 2 bytes OPCODE(0b,« F_DEC_W ebc »,4,,2) - ;nok + |nok OP_DD(0b,«») OP_CB(0b,«») @@ -431,14 +431,14 @@ OP_FD(0b,«») OP_FDCB(0b,«») OP_ED(0b,«») - ;; INC C - ;; C <- C+1 - ;; Flags: S,Z,H aff.; P=overflow, N=0 - ;; 108 cycles, 34 bytes + || INC C + || C <- C+1 + || Flags: S,Z,H aff.| P=overflow, N=0 + || 108 cycles, 34 bytes OPCODE(0c,« F_INC_B ebc ») - ;nok + |nok OP_DD(0c,«») OP_CB(0c,«») @@ -447,14 +447,14 @@ OP_FD(0c,«») OP_FDCB(0c,«») OP_ED(0c,«») - ;; DEC C - ;; C <- C-1 - ;; Flags: S,Z,H aff., P=overflow, N=1 - ;; 80 cycles, 26 bytes + || DEC C + || C <- C-1 + || Flags: S,Z,H aff., P=overflow, N=1 + || 80 cycles, 26 bytes OPCODE(0d,« F_DEC_B ebc ») - ;nok + |nok OP_DD(0d,«») OP_CB(0d,«») @@ -463,14 +463,14 @@ OP_FD(0d,«») OP_FDCB(0d,«») OP_ED(0d,«») - ;; LD C,immed.b - ;; C <- immed.b - ;; No flags - ;; 8 cycles, 2 bytes + || LD C,immed.b + || C <- immed.b + || No flags + || 8 cycles, 2 bytes OPCODE(0e,« FETCHBI ebc »,18,,6) - ;nok + |nok OP_DD(0e,«») OP_CB(0e,«») @@ -479,15 +479,15 @@ OP_FD(0e,«») OP_FDCB(0e,«») OP_ED(0e,«») - ;; RRCA - ;; Rotate A right, carry bit gets top bit - ;; Flags: H,N=0; C aff. - ;; XXX FLAGS - ;; ? cycles + || RRCA + || Rotate A right, carry bit gets top bit + || Flags: H,N=0| C aff. + || XXX FLAGS + || ? cycles OPCODE(0f,« ror.b #1,eaf ») - ;nok + |nok OP_DD(0f,«») OP_CB(0f,«») @@ -496,25 +496,25 @@ OP_FD(0f,«») OP_FDCB(0f,«») OP_ED(0f,«») - ;; DJNZ immed.w - ;; Decrement B - ;; and branch by immed.b - ;; if B not zero - ;; No flags - ;; 24 bytes - ;; take: 22+4+ 8+8+4+8+22 = 76 - ;; skip: 22+4+10+ 22 = 58 + || DJNZ immed.w + || Decrement B + || and branch by immed.b + || if B not zero + || No flags + || 24 bytes + || take: 22+4+ 8+8+4+8+22 = 76 + || skip: 22+4+10+ 22 = 58 OPCODE(10,« LOHI ebc subq.b #1,ebc - beq.s local(end) ; slooooow + beq.s local(end) | slooooow FETCHBI d1 ext.w d1 add.w d1,epc local(end): HILO ebc »,,,32) - ;nok + |nok OP_DD(10,«») OP_CB(10,«») @@ -523,14 +523,14 @@ OP_FD(10,«») OP_FDCB(10,«») OP_ED(10,«») - ;; LD DE,immed.w - ;; DE <- immed.w - ;; No flags - ;; 42 cycles, 8 bytes + || LD DE,immed.w + || DE <- immed.w + || No flags + || 42 cycles, 8 bytes OPCODE(11,« FETCHWI ede ») - ;nok + |nok OP_DD(11,«») OP_CB(11,«») @@ -539,14 +539,14 @@ OP_FD(11,«») OP_FDCB(11,«») OP_ED(11,«») - ;; LD (DE),A - ;; (DE) <- A - ;; No flags - ;; 106 cycles, 8 bytes + || LD (DE),A + || (DE) <- A + || No flags + || 106 cycles, 8 bytes OPCODE(12,« PUTB eaf,ede ») - ;nok + |nok OP_DD(12,«») OP_CB(12,«») @@ -555,13 +555,13 @@ OP_FD(12,«») OP_FDCB(12,«») OP_ED(12,«») - ;; INC DE - ;; No flags - ;; 4 cycles, 2 bytes + || INC DE + || No flags + || 4 cycles, 2 bytes OPCODE(13,« F_INC_W ede ») - ;nok + |nok OP_DD(13,«») OP_CB(13,«») @@ -570,15 +570,15 @@ OP_FD(13,«») OP_FDCB(13,«») OP_ED(13,«») - ;; INC D - ;; Flags: S,Z,H aff.; P=overflow, N=0 - ;; 152 cycles + || INC D + || Flags: S,Z,H aff.| P=overflow, N=0 + || 152 cycles OPCODE(14,« LOHI ede F_INC_B ede HILO ede ») - ;nok + |nok OP_DD(14,«») OP_CB(14,«») @@ -587,15 +587,15 @@ OP_FD(14,«») OP_FDCB(14,«») OP_ED(14,«») - ;; DEC D - ;; Flags: S,Z,H aff.; P=overflow, N=1 - ;; 124 cycles + || DEC D + || Flags: S,Z,H aff.| P=overflow, N=1 + || 124 cycles OPCODE(15,« LOHI ede F_DEC_B ede HILO ede ») - ;nok + |nok OP_DD(15,«») OP_CB(15,«») @@ -604,15 +604,15 @@ OP_FD(15,«») OP_FDCB(15,«») OP_ED(15,«») - ;; LD D,immed.b - ;; No flags - ;; 52 cycles + || LD D,immed.b + || No flags + || 52 cycles OPCODE(16,« LOHI ede FETCHBI ede HILO ede ») - ;nok + |nok OP_DD(16,«») OP_CB(16,«») @@ -621,14 +621,14 @@ OP_FD(16,«») OP_FDCB(16,«») OP_ED(16,«») - ;; RLA - ;; Flags: P,N=0; C aff. - ;; XXX flags - ;; ? cycles + || RLA + || Flags: P,N=0| C aff. + || XXX flags + || ? cycles OPCODE(17,« roxl.b #1,eaf ») - ;nok + |nok OP_DD(17,«») OP_CB(17,«») @@ -637,24 +637,24 @@ OP_FD(17,«») OP_FDCB(17,«») OP_ED(17,«») - ;; JR immed.b - ;; PC <- immed.b - ;; Branch relative by a signed immediate byte - ;; No flags - ;; 20 cycles + || JR immed.b + || PC <- immed.b + || Branch relative by a signed immediate byte + || No flags + || 20 cycles - ;; XXX - ;; Yes, I can avoid the underef/deref cycle. To do so, put a - ;; sled of emulator trap instructions on either side of each - ;; 16k page. When that trap is executed, undo the shortcut - ;; and redo it by the book. + || XXX + || Yes, I can avoid the underef/deref cycle. To do so, put a + || sled of emulator trap instructions on either side of each + || 16k page. When that trap is executed, undo the shortcut + || and redo it by the book. OPCODE(18,« clr.w d1 FETCHBI d1 add.w d1,epc ») - ;nok + |nok OP_DD(18,«») OP_CB(18,«») @@ -663,14 +663,14 @@ OP_FD(18,«») OP_FDCB(18,«») OP_ED(18,«») - ;; ADD HL,DE - ;; HL <- HL+DE - ;; Flags: H,C aff,; N=0 - ;; ? cycles + || ADD HL,DE + || HL <- HL+DE + || Flags: H,C aff,| N=0 + || ? cycles OPCODE(19,« F_ADD_W ede,ehl ») - ;nok + |nok OP_DD(19,«») OP_CB(19,«») @@ -679,14 +679,14 @@ OP_FD(19,«») OP_FDCB(19,«») OP_ED(19,«») - ;; LD A,(DE) - ;; A <- (DE) - ;; No flags - ;; 106 cycles, 8 bytes + || LD A,(DE) + || A <- (DE) + || No flags + || 106 cycles, 8 bytes OPCODE(1a,« FETCHB ede,eaf ») - ;nok + |nok OP_DD(1a,«») OP_CB(1a,«») @@ -695,13 +695,13 @@ OP_FD(1a,«») OP_FDCB(1a,«») OP_ED(1a,«») - ;; DEC DE - ;; No flags - ;; 4 cycles, 2 bytes + || DEC DE + || No flags + || 4 cycles, 2 bytes OPCODE(1b,« subq.w #1,ede ») - ;nok + |nok OP_DD(1b,«») OP_CB(1b,«») @@ -710,13 +710,13 @@ OP_FD(1b,«») OP_FDCB(1b,«») OP_ED(1b,«») - ;; INC E - ;; Flags: S,Z,H aff.; P=overflow; N=0 - ;; 108 cycles, 34 bytes + || INC E + || Flags: S,Z,H aff.| P=overflow| N=0 + || 108 cycles, 34 bytes OPCODE(1c,« F_INC_B ede ») - ;nok + |nok OP_DD(1c,«») OP_CB(1c,«») @@ -725,13 +725,13 @@ OP_FD(1c,«») OP_FDCB(1c,«») OP_ED(1c,«») - ;; DEC E - ;; Flags: S,Z,H aff.; P=overflow, N=1 - ;; 80 cycles, 26 bytes + || DEC E + || Flags: S,Z,H aff.| P=overflow, N=1 + || 80 cycles, 26 bytes OPCODE(1d,« F_DEC_B ede ») - ;nok + |nok OP_DD(1d,«») OP_CB(1d,«») @@ -740,13 +740,13 @@ OP_FD(1d,«») OP_FDCB(1d,«») OP_ED(1d,«») - ;; LD E,immed.b - ;; No flags - ;; 8 cycles, 2 bytes + || LD E,immed.b + || No flags + || 8 cycles, 2 bytes OPCODE(1e,« FETCHBI ede ») - ;nok + |nok OP_DD(1e,«») OP_CB(1e,«») @@ -755,14 +755,14 @@ OP_FD(1e,«») OP_FDCB(1e,«») OP_ED(1e,«») - ;; RRA - ;; Flags: H,N=0; C aff. - ;; XXX FLAGS - ;; ? cycles + || RRA + || Flags: H,N=0| C aff. + || XXX FLAGS + || ? cycles OPCODE(1f,« roxr.b #1,eaf ») - ;nok + |nok OP_DD(1f,«») OP_CB(1f,«») @@ -771,18 +771,18 @@ OP_FD(1f,«») OP_FDCB(1f,«») OP_ED(1f,«») - ;; JR NZ,immed.b - ;; if ~Z, - ;; PC <- PC+immed.b - ;; No flags - ;; 10 bytes - ;; take: 40+10+20(=JR immed.b) = 70 - ;; skip: 40+12+12 = 64 + || JR NZ,immed.b + || if ~Z, + || PC <- PC+immed.b + || No flags + || 10 bytes + || take: 40+10+20(=JR immed.b) = 70 + || skip: 40+12+12 = 64 OPCODE(20,« jsr f_norm_z - ;; if the emulated Z flag is set, this will be clear - beq emu_op_18 ; branch taken: Z reset -> eq (zero set) - add.l #1,epc ; skip over the immediate byte + || if the emulated Z flag is set, this will be clear + beq emu_op_18 | branch taken: Z reset -> eq (zero set) + add.l #1,epc | skip over the immediate byte ») OP_DD(20,«») @@ -792,13 +792,13 @@ OP_FD(20,«») OP_FDCB(20,«») OP_ED(20,«») - ;; LD HL,immed.w - ;; No flags - ;; 42 cycles + || LD HL,immed.w + || No flags + || 42 cycles OPCODE(21,« FETCHWI ehl ») - ;nok + |nok OP_DD(21,«») OP_CB(21,«») @@ -807,15 +807,15 @@ OP_FD(21,«») OP_FDCB(21,«») OP_ED(21,«») - ;; LD immed.w,HL - ;; (address) <- HL - ;; No flags - ;; 182 cycles + || LD immed.w,HL + || (address) <- HL + || No flags + || 182 cycles OPCODE(22,« FETCHWI d1 PUTW ehl,d1 ») - ;nok + |nok OP_DD(22,«») OP_CB(22,«») @@ -824,13 +824,13 @@ OP_FD(22,«») OP_FDCB(22,«») OP_ED(22,«») - ;; INC HL - ;; No flags - ;; 4 cycles + || INC HL + || No flags + || 4 cycles OPCODE(23,« addq.w #1,ehl ») - ;nok + |nok OP_DD(23,«») OP_CB(23,«») @@ -839,15 +839,15 @@ OP_FD(23,«») OP_FDCB(23,«») OP_ED(23,«») - ;; INC H - ;; Flags: S,Z,H aff.; P=overflow, N=0 - ;; 152 cycles + || INC H + || Flags: S,Z,H aff.| P=overflow, N=0 + || 152 cycles OPCODE(24,« LOHI ehl F_INC_B ehl HILO ehl ») - ;nok + |nok OP_DD(24,«») OP_CB(24,«») @@ -856,15 +856,15 @@ OP_FD(24,«») OP_FDCB(24,«») OP_ED(24,«») - ;; DEC H - ;; Flags: S,Z,H aff.; P=overflow, N=1 - ;; 124 cycles + || DEC H + || Flags: S,Z,H aff.| P=overflow, N=1 + || 124 cycles OPCODE(25,« LOHI ehl F_DEC_B ehl HILO ehl ») - ;nok + |nok OP_DD(25,«») OP_CB(25,«») @@ -873,15 +873,15 @@ OP_FD(25,«») OP_FDCB(25,«») OP_ED(25,«») - ;; LD H,immed.b - ;; No flags - ;; 52 cycles + || LD H,immed.b + || No flags + || 52 cycles OPCODE(26,« LOHI ehl FETCHBI ehl HILO ehl ») - ;nok + |nok OP_DD(26,«») OP_CB(26,«») @@ -890,16 +890,16 @@ OP_FD(26,«») OP_FDCB(26,«») OP_ED(26,«») - ;; DAA - ;; Decrement, adjust accum - ;; http://www.z80.info/z80syntx.htm#DAA - ;; Flags: ummm, go find a manual. - ;; XXX - ;; ? cycles + || DAA + || Decrement, adjust accum + || http://www.z80.info/z80syntx.htm#DAA + || Flags: ummm, go find a manual. + || XXX + || ? cycles OPCODE(27,« F_PAR eaf ») - ;nok + |nok OP_DD(27,«») OP_CB(27,«») @@ -908,18 +908,18 @@ OP_FD(27,«») OP_FDCB(27,«») OP_ED(27,«») - ;; JR Z,immed.b - ;; If zero - ;; PC <- PC+immed.b - ;; SPEED can be made faster - ;; No flags - ;; ~130 cycles + || JR Z,immed.b + || If zero + || PC <- PC+immed.b + || SPEED can be made faster + || No flags + || ~130 cycles OPCODE(28,« jsr f_norm_z bne emu_op_18 add.l #1,epc ») - ;nok + |nok OP_DD(28,«») OP_CB(28,«») @@ -928,13 +928,13 @@ OP_FD(28,«») OP_FDCB(28,«») OP_ED(28,«») - ;; ADD HL,HL - ;; No flags - ;; ? cycles + || ADD HL,HL + || No flags + || ? cycles OPCODE(29,« F_ADD_W ehl,ehl ») - ;nok + |nok OP_DD(29,«») OP_CB(29,«») @@ -943,14 +943,14 @@ OP_FD(29,«») OP_FDCB(29,«») OP_ED(29,«») - ;; LD HL,(immed.w) - ;; address is absolute - ;; 172 cycles + || LD HL,(immed.w) + || address is absolute + || 172 cycles OPCODE(2a,« FETCHWI d1 FETCHW d1,ehl ») - ;nok + |nok OP_DD(2a,«») OP_CB(2a,«») @@ -959,13 +959,13 @@ OP_FD(2a,«») OP_FDCB(2a,«») OP_ED(2a,«») - ;; XXX TOO LONG - ;; DEC HL - ;; ? cycles + || XXX TOO LONG + || DEC HL + || ? cycles OPCODE(2b,« F_DEC_W ehl ») - ;nok + |nok OP_DD(2b,«») OP_CB(2b,«») @@ -974,12 +974,12 @@ OP_FD(2b,«») OP_FDCB(2b,«») OP_ED(2b,«») - ;; INC L - ;; 108 cycles + || INC L + || 108 cycles OPCODE(2c,« F_INC_B ehl ») - ;nok + |nok OP_DD(2c,«») OP_CB(2c,«») @@ -988,12 +988,12 @@ OP_FD(2c,«») OP_FDCB(2c,«») OP_ED(2c,«») - ;; DEC L - ;; 80 cycles + || DEC L + || 80 cycles OPCODE(2d,« F_DEC_B ehl ») - ;nok + |nok OP_DD(2d,«») OP_CB(2d,«») @@ -1002,12 +1002,12 @@ OP_FD(2d,«») OP_FDCB(2d,«») OP_ED(2d,«») - ;; LD L,immed.b - ;; 8 cycles + || LD L,immed.b + || 8 cycles OPCODE(2e,« FETCHBI ehl ») - ;nok + |nok OP_DD(2e,«») OP_CB(2e,«») @@ -1016,14 +1016,14 @@ OP_FD(2e,«») OP_FDCB(2e,«») OP_ED(2e,«») - ;; CPL - ;; A <- NOT A - ;; XXX flags - ;; ? cycles + || CPL + || A <- NOT A + || XXX flags + || ? cycles OPCODE(2f,« not.b eaf ») - ;nok + |nok OP_DD(2f,«») OP_CB(2f,«») @@ -1032,13 +1032,13 @@ OP_FD(2f,«») OP_FDCB(2f,«») OP_ED(2f,«») - ;; JR NC,immed.b - ;; If carry clear - ;; PC <- PC+immed.b - ;; ? cycles + || JR NC,immed.b + || If carry clear + || PC <- PC+immed.b + || ? cycles OPCODE(30,« jsr f_norm_c - beq emu_op_18 ; branch taken: carry clear + beq emu_op_18 | branch taken: carry clear add.l #1,epc ») @@ -1049,14 +1049,14 @@ OP_FD(30,«») OP_FDCB(30,«») OP_ED(30,«») - ;; LD SP,immed.w - ;; 140 cycles + || LD SP,immed.w + || 140 cycles OPCODE(31,« FETCHWI d1 jsr deref movea.l a0,esp ») - ;nok + |nok OP_DD(31,«») OP_CB(31,«») @@ -1065,15 +1065,15 @@ OP_FD(31,«») OP_FDCB(31,«») OP_ED(31,«») - ;; LD (immed.w),A - ;; store indirect - ;; 170 cycles + || LD (immed.w),A + || store indirect + || 170 cycles OPCODE(32,« FETCHWI d1 rol.w #8,d1 PUTB eaf,d1 ») - ;nok + |nok OP_DD(32,«») OP_CB(32,«») @@ -1082,16 +1082,16 @@ OP_FD(32,«») OP_FDCB(32,«») OP_ED(32,«») - ;; INC SP - ;; No flags - ;; - ;; FYI: Do not have to deref because this will never cross a - ;; page boundary. So sayeth BrandonW. - ;; 4 cycles + || INC SP + || No flags + || + || FYI: Do not have to deref because this will never cross a + || page boundary. So sayeth BrandonW. + || 4 cycles OPCODE(33,« addq.w #1,esp ») - ;nok + |nok OP_DD(33,«») OP_CB(33,«») @@ -1100,16 +1100,16 @@ OP_FD(33,«») OP_FDCB(33,«») OP_ED(33,«») - ;; INC (HL) - ;; Increment byte - ;; SPEED can be made faster - ;; 320 cycles + || INC (HL) + || Increment byte + || SPEED can be made faster + || 320 cycles OPCODE(34,« FETCHB ehl,d1 F_INC_B d1 PUTB d1,ehl ») - ;nok + |nok OP_DD(34,«») OP_CB(34,«») @@ -1118,16 +1118,16 @@ OP_FD(34,«») OP_FDCB(34,«») OP_ED(34,«») - ;; DEC (HL) - ;; Decrement byte - ;; SPEED can be made faster - ;; 292 cycles + || DEC (HL) + || Decrement byte + || SPEED can be made faster + || 292 cycles OPCODE(35,« FETCHB ehl,d1 F_DEC_B d1 PUTB d1,ehl ») - ;nok + |nok OP_DD(35,«») OP_CB(35,«») @@ -1136,13 +1136,13 @@ OP_FD(35,«») OP_FDCB(35,«») OP_ED(35,«») - ;; LD (HL),immed.b - ;; 114 cycles + || LD (HL),immed.b + || 114 cycles OPCODE(36,« FETCHBI d1 PUTB ehl,d1 ») - ;nok + |nok OP_DD(36,«») OP_CB(36,«») @@ -1151,10 +1151,10 @@ OP_FD(36,«») OP_FDCB(36,«») OP_ED(36,«») - ;; SCF - ;; Set Carry Flag - ;; XXX flags are more complicated than this :( - ;; ? cycles + || SCF + || Set Carry Flag + || XXX flags are more complicated than this :( + || ? cycles OPCODE(37,« ori.b #%00111011,flag_valid-flag_storage(a3) move.b eaf,d1 @@ -1162,7 +1162,7 @@ OPCODE(37,« andi.b #%11101101,d1 or.b d1,flag_byte-flag_storage(a3) ») - ;nok + |nok OP_DD(37,«») OP_CB(37,«») @@ -1171,10 +1171,10 @@ OP_FD(37,«») OP_FDCB(37,«») OP_ED(37,«») - ;; JR C,immed.b - ;; If carry set - ;; PC <- PC+immed.b - ;; ? cycles + || JR C,immed.b + || If carry set + || PC <- PC+immed.b + || ? cycles OPCODE(38,« jsr f_norm_c bne emu_op_18 @@ -1188,14 +1188,14 @@ OP_FD(38,«») OP_FDCB(38,«») OP_ED(38,«») - ;; ADD HL,SP - ;; HL <- HL+SP + || ADD HL,SP + || HL <- HL+SP OPCODE(39,« move.l esp,a0 jsr underef F_ADD_W d0,ehl ») - ;nok + |nok OP_DD(39,«») OP_CB(39,«») @@ -1204,12 +1204,12 @@ OP_FD(39,«») OP_FDCB(39,«») OP_ED(39,«») - ;; LD A,(immed.w) + || LD A,(immed.w) OPCODE(3a,« FETCHWI d1 FETCHB d1,eaf ») - ;nok + |nok OP_DD(3a,«») OP_CB(3a,«») @@ -1218,12 +1218,12 @@ OP_FD(3a,«») OP_FDCB(3a,«») OP_ED(3a,«») - ;; DEC SP - ;; No flags + || DEC SP + || No flags OPCODE(3b,« subq.l #1,esp ») - ;nok + |nok OP_DD(3b,«») OP_CB(3b,«») @@ -1232,7 +1232,7 @@ OP_FD(3b,«») OP_FDCB(3b,«») OP_ED(3b,«») - ;; INC A + || INC A OPCODE(3c,« F_INC_B eaf ») @@ -1244,11 +1244,11 @@ OP_FD(3c,«») OP_FDCB(3c,«») OP_ED(3c,«») - ;; DEC A + || DEC A OPCODE(3d,« F_DEC_B eaf ») - ;nok + |nok OP_DD(3d,«») OP_CB(3d,«») @@ -1257,14 +1257,14 @@ OP_FD(3d,«») OP_FDCB(3d,«») OP_ED(3d,«») - ;; LD A,immed.b + || LD A,immed.b OPCODE(3e,« FETCHBI eaf ») - ;; CCF - ;; Clear carry flag - ;; XXX fuck flags + || CCF + || Clear carry flag + || XXX fuck flags OP_DD(3e,«») OP_CB(3e,«») @@ -1275,11 +1275,11 @@ OP_ED(3e,«») OPCODE(3f,« jsr flags_normalize - ;; SZ5H3PNC + || SZ5H3PNC ori.b #%00000001,flag_valid-flag_storage(a3) andi.b #%11111110,flag_byte-flag_storage(a3) ») - ;nok + |nok OP_DD(3f,«») OP_CB(3f,«») @@ -1288,25 +1288,25 @@ OP_FD(3f,«») OP_FDCB(3f,«») OP_ED(3f,«») - ;; LD B,B - ;; SPEED + || LD B,B + || SPEED OPCODE(40,« LOHI ebc move.b ebc,ebc HILO ebc ») - ;nok + |nok OP_DD(40,«») - ;; BIT 0,A + || BIT 0,A OP_CB(40,«») OP_DDCB(40,«») OP_FD(40,«») OP_FDCB(40,«») - ;; IN B,(C) + || IN B,(C) OP_ED(40,« move.b ebc,d0 jsr port_in @@ -1314,15 +1314,15 @@ OP_ED(40,« move.b d1,ebc HILO ebc ») - ;nok + |nok - ;; LD B,C + || LD B,C OPCODE(41,« move.w ebc,d1 - LOHI d1 ; deliberate trickery + LOHI d1 | deliberate trickery move.b d1,ebc ») - ;nok + |nok OP_DD(41,«») OP_CB(41,«») @@ -1330,7 +1330,7 @@ OP_DDCB(41,«») OP_FD(41,«») OP_FDCB(41,«») - ;; OUT (C),B + || OUT (C),B OP_ED(41,« move.b ebc,d0 LOHI ebc @@ -1339,9 +1339,9 @@ OP_ED(41,« jsr port_out ») - ;; LD B,D - ;; B <- D - ;; SPEED + || LD B,D + || B <- D + || SPEED OPCODE(42,« LOHI ebc LOHI ede @@ -1349,7 +1349,7 @@ OPCODE(42,« HILO ebc HILO ede ») - ;nok + |nok OP_DD(42,«») OP_CB(42,«») @@ -1358,14 +1358,14 @@ OP_FD(42,«») OP_FDCB(42,«») OP_ED(42,«») - ;; LD B,E - ;; B <- E + || LD B,E + || B <- E OPCODE(43,« LOHI ebc - move.b ebc,ede ; 4 + move.b ebc,ede | 4 HILO ebc ») - ;nok + |nok OP_DD(43,«») OP_CB(43,«») @@ -1374,9 +1374,9 @@ OP_FD(43,«») OP_FDCB(43,«») OP_ED(43,«») - ;; LD B,H - ;; B <- H - ;; SPEED + || LD B,H + || B <- H + || SPEED OPCODE(44,« LOHI ebc LOHI ehl @@ -1384,7 +1384,7 @@ OPCODE(44,« HILO ebc HILO ehl ») - ;nok + |nok OP_DD(44,«») OP_CB(44,«») @@ -1393,14 +1393,14 @@ OP_FD(44,«») OP_FDCB(44,«») OP_ED(44,«») - ;; LD B,L - ;; B <- L + || LD B,L + || B <- L OPCODE(45,« LOHI ebc move.b ehl,ebc HILO ebc ») - ;nok + |nok OP_DD(45,«») OP_CB(45,«») @@ -1409,14 +1409,14 @@ OP_FD(45,«») OP_FDCB(45,«») OP_ED(45,«») - ;; LD B,(HL) - ;; B <- (HL) + || LD B,(HL) + || B <- (HL) OPCODE(46,« LOHI ebc FETCHB ehl,ebc HILO ebc ») - ;nok + |nok OP_DD(46,«») OP_CB(46,«») @@ -1425,14 +1425,14 @@ OP_FD(46,«») OP_FDCB(46,«») OP_ED(46,«») - ;; LD B,A - ;; B <- A + || LD B,A + || B <- A OPCODE(47,« LOHI ebc move.b eaf,ebc HILO ebc ») - ;nok + |nok OP_DD(47,«») OP_CB(47,«») @@ -1441,15 +1441,15 @@ OP_FD(47,«») OP_FDCB(47,«») OP_ED(47,«») - ;; LD C,B - ;; C <- B + || LD C,B + || C <- B OPCODE(48,« move.w ebc,-(sp) move.b (sp),ebc - ;; XXX emfasten? + || XXX emfasten? addq.l #2,sp ») - ;nok + |nok OP_DD(48,«») OP_CB(48,«») @@ -1457,18 +1457,18 @@ OP_DDCB(48,«») OP_FD(48,«») OP_FDCB(48,«») - ;; IN C,(C) + || IN C,(C) OP_ED(48,« move.b ebc,d0 jsr port_in move.b d1,ebc ») - ;; LD C,C + || LD C,C OPCODE(49,« move.b ebc,ebc ») - ;nok + |nok OP_DD(49,«») OP_CB(49,«») @@ -1476,22 +1476,22 @@ OP_DDCB(49,«») OP_FD(49,«») OP_FDCB(49,«») - ;; OUT (C),C + || OUT (C),C OP_ED(49,« move.b ebc,d0 move.b ebc,d1 jsr port_out ») - ;nok + |nok - ;; LD C,D + || LD C,D OPCODE(4a,« move.w ede,-(sp) move.b (sp),ebc - ;; XXX emfasten? + || XXX emfasten? addq.l #2,sp ») - ;nok + |nok OP_DD(4a,«») OP_CB(4a,«») @@ -1500,11 +1500,11 @@ OP_FD(4a,«») OP_FDCB(4a,«») OP_ED(4a,«») - ;; LD C,E + || LD C,E OPCODE(4b,« move.b ebc,ede ») - ;nok + |nok OP_DD(4b,«») OP_CB(4b,«») @@ -1513,13 +1513,13 @@ OP_FD(4b,«») OP_FDCB(4b,«») OP_ED(4b,«») - ;; LD C,H + || LD C,H OPCODE(4c,« LOHI ehl move.b ebc,ehl HILO ehl ») - ;nok + |nok OP_DD(4c,«») OP_CB(4c,«») @@ -1528,11 +1528,11 @@ OP_FD(4c,«») OP_FDCB(4c,«») OP_ED(4c,«») - ;; LD C,L + || LD C,L OPCODE(4d,« move.b ebc,ehl ») - ;nok + |nok OP_DD(4d,«») OP_CB(4d,«») @@ -1541,12 +1541,12 @@ OP_FD(4d,«») OP_FDCB(4d,«») OP_ED(4d,«») - ;; LD C,(HL) - ;; C <- (HL) + || LD C,(HL) + || C <- (HL) OPCODE(4e,« FETCHB ehl,ebc ») - ;nok + |nok OP_DD(4e,«») OP_CB(4e,«») @@ -1555,11 +1555,11 @@ OP_FD(4e,«») OP_FDCB(4e,«») OP_ED(4e,«») - ;; LD C,A + || LD C,A OPCODE(4f,« move.b eaf,ebc ») - ;nok + |nok OP_DD(4f,«») OP_CB(4f,«») @@ -1568,13 +1568,13 @@ OP_FD(4f,«») OP_FDCB(4f,«») OP_ED(4f,«») -; faster (slightly bigger) if we abuse sp again, something along the lines of (UNTESTED) -; move.w ebc,-(sp) ; 8, 2 -; move.w ede,-(sp) ; 8, 2 -; move.b 2(sp),(sp) ; 16, 4 -; move.w (sp)+,ede ; 8, 2 -; addq.l #2,sp ; 8, 2 - ;; LD D,B +| faster (slightly bigger) if we abuse sp again, something along the lines of (UNTESTED) +| move.w ebc,-(sp) | 8, 2 +| move.w ede,-(sp) | 8, 2 +| move.b 2(sp),(sp) | 16, 4 +| move.w (sp)+,ede | 8, 2 +| addq.l #2,sp | 8, 2 + || LD D,B OPCODE(50,« LOHI ebc LOHI ede @@ -1582,7 +1582,7 @@ OPCODE(50,« HILO ebc HILO ede ») - ;nok + |nok OP_DD(50,«») OP_CB(50,«») @@ -1590,7 +1590,7 @@ OP_DDCB(50,«») OP_FD(50,«») OP_FDCB(50,«») - ;; IN D,(C) + || IN D,(C) OP_ED(50,« move.b ebc,d0 jsr port_in @@ -1599,13 +1599,13 @@ OP_ED(50,« HILO ede ») - ;; LD D,C + || LD D,C OPCODE(51,« LOHI ede move.b ebc,ede HILO ede ») - ;nok + |nok OP_DD(51,«») OP_CB(51,«») @@ -1613,7 +1613,7 @@ OP_DDCB(51,«») OP_FD(51,«») OP_FDCB(51,«») - ;; OUT (C),D + || OUT (C),D OP_ED(51,« move.b ebc,d0 LOHI ede @@ -1622,10 +1622,10 @@ OP_ED(51,« jsr port_out ») - ;; LD D,D + || LD D,D OPCODE(52,« ») - ;nok + |nok OP_DD(52,«») OP_CB(52,«») @@ -1634,14 +1634,14 @@ OP_FD(52,«») OP_FDCB(52,«») OP_ED(52,«») - ;; LD D,E + || LD D,E OPCODE(53,« andi.w #$00ff,ede move.b ede,d1 lsl #8,d1 or.w d1,ede ») - ;nok + |nok OP_DD(53,«») OP_CB(53,«») @@ -1650,16 +1650,16 @@ OP_FD(53,«») OP_FDCB(53,«») OP_ED(53,«») - ;; LD D,H + || LD D,H OPCODE(54,« - LOHI ede ; 4 - LOHI ehl ; 4 - move.b ehl,ede ; 4 - HILO ede ; 4 - HILO ehl ; 4 + LOHI ede | 4 + LOHI ehl | 4 + move.b ehl,ede | 4 + HILO ede | 4 + HILO ehl | 4 »,20) - ;nok - ;20 cycles + |nok + |20 cycles OP_DD(54,«») OP_CB(54,«») @@ -1668,13 +1668,13 @@ OP_FD(54,«») OP_FDCB(54,«») OP_ED(54,«») - ;; LD D,L + || LD D,L OPCODE(55,« LOHI ede move.b ehl,ede HILO ede ») - ;nok + |nok OP_DD(55,«») OP_CB(55,«») @@ -1683,14 +1683,14 @@ OP_FD(55,«») OP_FDCB(55,«») OP_ED(55,«») - ;; LD D,(HL) - ;; D <- (HL) + || LD D,(HL) + || D <- (HL) OPCODE(56,« LOHI ede FETCHB ehl,ede HILO ede ») - ;nok + |nok OP_DD(56,«») OP_CB(56,«») @@ -1699,13 +1699,13 @@ OP_FD(56,«») OP_FDCB(56,«») OP_ED(56,«») - ;; LD D,A + || LD D,A OPCODE(57,« LOHI ede move.b eaf,ede HILO ede ») - ;nok + |nok OP_DD(57,«») OP_CB(57,«») @@ -1714,13 +1714,13 @@ OP_FD(57,«») OP_FDCB(57,«») OP_ED(57,«») - ;; LD E,B + || LD E,B OPCODE(58,« LOHI ebc move.b ebc,ede HILO ebc ») - ;nok + |nok OP_DD(58,«») OP_CB(58,«») @@ -1728,18 +1728,18 @@ OP_DDCB(58,«») OP_FD(58,«») OP_FDCB(58,«») - ;; IN E,(C) + || IN E,(C) OP_ED(58,« move.b ebc,d0 jsr port_in move.b d1,ede ») - ;; LD E,C + || LD E,C OPCODE(59,« move.b ebc,ede ») - ;nok + |nok OP_DD(59,«») OP_CB(59,«») @@ -1747,22 +1747,22 @@ OP_DDCB(59,«») OP_FD(59,«») OP_FDCB(59,«») - ;; OUT (C),E + || OUT (C),E OP_ED(59,« move.b ebc,d0 move.b ede,d1 jsr port_out ») - ;nok + |nok - ;; LD E,D + || LD E,D OPCODE(5a,« - andi.w #$ff00,ede ; 8/4 - move.b ede,d1 ; 4/2 - lsr.w #8,d1 ;22/2 - or.w d1,ede ; 4/2 + andi.w #$ff00,ede | 8/4 + move.b ede,d1 | 4/2 + lsr.w #8,d1 |22/2 + or.w d1,ede | 4/2 »,38,,2) - ;nok + |nok OP_DD(5a,«») OP_CB(5a,«») @@ -1771,11 +1771,11 @@ OP_FD(5a,«») OP_FDCB(5a,«») OP_ED(5a,«») - ;; LD E,E + || LD E,E OPCODE(5b,« move.b ede,ede ») - ;nok + |nok OP_DD(5b,«») OP_CB(5b,«») @@ -1784,13 +1784,13 @@ OP_FD(5b,«») OP_FDCB(5b,«») OP_ED(5b,«») - ;; LD E,H + || LD E,H OPCODE(5c,« LOHI ehl move.b ede,ehl HILO ehl ») - ;nok + |nok OP_DD(5c,«») OP_CB(5c,«») @@ -1799,11 +1799,11 @@ OP_FD(5c,«») OP_FDCB(5c,«») OP_ED(5c,«») - ;; LD E,L + || LD E,L OPCODE(5d,« move.b ede,ehl ») - ;nok + |nok OP_DD(5d,«») OP_CB(5d,«») @@ -1812,11 +1812,11 @@ OP_FD(5d,«») OP_FDCB(5d,«») OP_ED(5d,«») - ;; LD E,(HL) + || LD E,(HL) OPCODE(5e,« FETCHB ehl,d1 ») - ;nok + |nok OP_DD(5e,«») OP_CB(5e,«») @@ -1825,11 +1825,11 @@ OP_FD(5e,«») OP_FDCB(5e,«») OP_ED(5e,«») - ;; LD E,A + || LD E,A OPCODE(5f,« move.b ede,eaf ») - ;nok + |nok OP_DD(5f,«») OP_CB(5f,«») @@ -1838,7 +1838,7 @@ OP_FD(5f,«») OP_FDCB(5f,«») OP_ED(5f,«») - ;; LD H,B + || LD H,B OPCODE(60,« LOHI ebc LOHI ehl @@ -1846,7 +1846,7 @@ OPCODE(60,« HILO ebc HILO ehl ») - ;nok + |nok OP_DD(60,«») OP_CB(60,«») @@ -1854,7 +1854,7 @@ OP_DDCB(60,«») OP_FD(60,«») OP_FDCB(60,«») - ;; IN H,(C) + || IN H,(C) OP_ED(60,« move.b ebc,d0 jsr port_in @@ -1863,13 +1863,13 @@ OP_ED(60,« HILO ehl ») - ;; LD H,C + || LD H,C OPCODE(61,« LOHI ehl move.b ebc,ehl HILO ehl ») - ;nok + |nok OP_DD(61,«») OP_CB(61,«») @@ -1877,7 +1877,7 @@ OP_DDCB(61,«») OP_FD(61,«») OP_FDCB(61,«») - ;; OUT (C),H + || OUT (C),H OP_ED(61,« move.b ebc,d0 LOHI ehl @@ -1886,7 +1886,7 @@ OP_ED(61,« jsr port_out ») - ;; LD H,D + || LD H,D OPCODE(62,« LOHI ede LOHI ehl @@ -1894,7 +1894,7 @@ OPCODE(62,« HILO ede HILO ehl ») - ;nok + |nok OP_DD(62,«») OP_CB(62,«») @@ -1903,13 +1903,13 @@ OP_FD(62,«») OP_FDCB(62,«») OP_ED(62,«») - ;; LD H,E + || LD H,E OPCODE(63,« LOHI ehl move.b ede,ehl HILO ehl ») - ;nok + |nok OP_DD(63,«») OP_CB(63,«») @@ -1918,13 +1918,13 @@ OP_FD(63,«») OP_FDCB(63,«») OP_ED(63,«») - ;; LD H,H + || LD H,H OPCODE(64,« LOHI ehl move.b ehl,ehl HILO ehl ») - ;nok + |nok OP_DD(64,«») OP_CB(64,«») @@ -1933,15 +1933,15 @@ OP_FD(64,«») OP_FDCB(64,«») OP_ED(64,«») - ;; LD H,L - ;; H <- L + || LD H,L + || H <- L OPCODE(65,« move.b ehl,d1 LOHI ehl move.b d1,ehl HILO ehl ») - ;nok + |nok OP_DD(65,«») OP_CB(65,«») @@ -1950,14 +1950,14 @@ OP_FD(65,«») OP_FDCB(65,«») OP_ED(65,«») - ;; LD H,(HL) + || LD H,(HL) OPCODE(66,« FETCHB ehl,d1 LOHI ehl move.b d1,ehl HILO ehl ») - ;nok + |nok OP_DD(66,«») OP_CB(66,«») @@ -1966,13 +1966,13 @@ OP_FD(66,«») OP_FDCB(66,«») OP_ED(66,«») - ;; LD H,A + || LD H,A OPCODE(67,« LOHI ehl move.b eaf,ehl HILO ehl ») - ;nok + |nok OP_DD(67,«») OP_CB(67,«») @@ -1981,13 +1981,13 @@ OP_FD(67,«») OP_FDCB(67,«») OP_ED(67,«») - ;; LD L,B + || LD L,B OPCODE(68,« LOHI ebc move.b ebc,ehl HILO ebc ») - ;nok + |nok OP_DD(68,«») OP_CB(68,«») @@ -1995,18 +1995,18 @@ OP_DDCB(68,«») OP_FD(68,«») OP_FDCB(68,«») - ;; IN L,(C) + || IN L,(C) OP_ED(68,« move.b ebc,d0 jsr port_in move.b d1,ehl ») - ;; LD L,C + || LD L,C OPCODE(69,« move.b ebc,ehl ») - ;nok + |nok OP_DD(69,«») OP_CB(69,«») @@ -2014,20 +2014,20 @@ OP_DDCB(69,«») OP_FD(69,«») OP_FDCB(69,«») - ;; OUT (C),L + || OUT (C),L OP_ED(69,« move.b ebc,d0 move.b ehl,d1 jsr port_out ») - ;; LD L,D + || LD L,D OPCODE(6a,« LOHI ede move.b ede,ehl HILO ede ») - ;nok + |nok OP_DD(6a,«») OP_CB(6a,«») @@ -2036,11 +2036,11 @@ OP_FD(6a,«») OP_FDCB(6a,«») OP_ED(6a,«») - ;; LD L,E + || LD L,E OPCODE(6b,« move.b ede,ehl ») - ;nok + |nok OP_DD(6b,«») OP_CB(6b,«») @@ -2049,13 +2049,13 @@ OP_FD(6b,«») OP_FDCB(6b,«») OP_ED(6b,«») - ;; LD L,H + || LD L,H OPCODE(6c,« move.b ehl,d1 LOHI d1 move.b d1,ehl ») - ;nok + |nok OP_DD(6c,«») OP_CB(6c,«») @@ -2064,11 +2064,11 @@ OP_FD(6c,«») OP_FDCB(6c,«») OP_ED(6c,«») - ;; LD L,L + || LD L,L OPCODE(6d,« move.b ehl,ehl ») - ;nok + |nok OP_DD(6d,«») OP_CB(6d,«») @@ -2077,12 +2077,12 @@ OP_FD(6d,«») OP_FDCB(6d,«») OP_ED(6d,«») - ;; LD L,(HL) - ;; L <- (HL) + || LD L,(HL) + || L <- (HL) OPCODE(6e,« FETCHB ehl,ehl ») - ;nok + |nok OP_DD(6e,«») OP_CB(6e,«») @@ -2091,11 +2091,11 @@ OP_FD(6e,«») OP_FDCB(6e,«») OP_ED(6e,«») - ;; LD L,A + || LD L,A OPCODE(6f,« move.b eaf,ehl ») - ;nok + |nok OP_DD(6f,«») OP_CB(6f,«») @@ -2104,13 +2104,13 @@ OP_FD(6f,«») OP_FDCB(6f,«») OP_ED(6f,«») - ;; LD (HL),B + || LD (HL),B OPCODE(70,« LOHI ebc PUTB ehl,ebc HILO ebc ») - ;nok + |nok OP_DD(70,«») OP_CB(70,«») @@ -2119,11 +2119,11 @@ OP_FD(70,«») OP_FDCB(70,«») OP_ED(70,«») - ;; LD (HL),C + || LD (HL),C OPCODE(71,« PUTB ehl,ebc ») - ;nok + |nok OP_DD(71,«») OP_CB(71,«») @@ -2132,13 +2132,13 @@ OP_FD(71,«») OP_FDCB(71,«») OP_ED(71,«») - ;; LD (HL),D + || LD (HL),D OPCODE(72,« LOHI ede PUTB ehl,ede HILO ede ») - ;nok + |nok OP_DD(72,«») OP_CB(72,«») @@ -2147,11 +2147,11 @@ OP_FD(72,«») OP_FDCB(72,«») OP_ED(72,«») - ;; LD (HL),E + || LD (HL),E OPCODE(73,« PUTB ehl,ede ») - ;nok + |nok OP_DD(73,«») OP_CB(73,«») @@ -2160,13 +2160,13 @@ OP_FD(73,«») OP_FDCB(73,«») OP_ED(73,«») - ;; LD (HL),H + || LD (HL),H OPCODE(74,« move.w ehl,d1 HILO d1 PUTB d1,ehl ») - ;nok + |nok OP_DD(74,«») OP_CB(74,«») @@ -2175,12 +2175,12 @@ OP_FD(74,«») OP_FDCB(74,«») OP_ED(74,«») - ;; LD (HL),L + || LD (HL),L OPCODE(75,« move.b ehl,d1 PUTB d1,ehl ») - ;nok + |nok OP_DD(75,«») OP_CB(75,«») @@ -2189,12 +2189,12 @@ OP_FD(75,«») OP_FDCB(75,«») OP_ED(75,«») - ;; HALT - ;; XXX do this + || HALT + || XXX do this OPCODE(76,« bra emu_op_76 ») - ;nok + |nok OP_DD(76,«») OP_CB(76,«») @@ -2203,11 +2203,11 @@ OP_FD(76,«») OP_FDCB(76,«») OP_ED(76,«») - ;; LD (HL),A + || LD (HL),A OPCODE(77,« PUTB eaf,ehl ») - ;nok + |nok OP_DD(77,«») OP_CB(77,«») @@ -2216,13 +2216,13 @@ OP_FD(77,«») OP_FDCB(77,«») OP_ED(77,«») - ;; LD A,B + || LD A,B OPCODE(78,« move.w ebc,d1 LOHI d1 move.b d1,eaf ») - ;nok + |nok OP_DD(78,«») OP_CB(78,«») @@ -2230,19 +2230,19 @@ OP_DDCB(78,«») OP_FD(78,«») OP_FDCB(78,«») - ;; IN A,(C) + || IN A,(C) OP_ED(78,« move.b ebc,d0 jsr port_in move.b d1,eaf ») - ;nok + |nok - ;; LD A,C + || LD A,C OPCODE(79,« move.b ebc,eaf ») - ;nok + |nok OP_DD(79,«») OP_CB(79,«») @@ -2250,21 +2250,21 @@ OP_DDCB(79,«») OP_FD(79,«») OP_FDCB(79,«») - ;; OUT (C),A + || OUT (C),A OP_ED(79,« move.b ebc,d0 move.b eaf,d1 jsr port_out ») - ;nok + |nok - ;; LD A,D + || LD A,D OPCODE(7a,« move.w ede,d1 LOHI d1 move.b d1,eaf ») - ;nok + |nok OP_DD(7a,«») OP_CB(7a,«») @@ -2273,11 +2273,11 @@ OP_FD(7a,«») OP_FDCB(7a,«») OP_ED(7a,«») - ;; LD A,E + || LD A,E OPCODE(7b,« move.b ede,eaf ») - ;nok + |nok OP_DD(7b,«») OP_CB(7b,«») @@ -2286,13 +2286,13 @@ OP_FD(7b,«») OP_FDCB(7b,«») OP_ED(7b,«») - ;; LD A,H + || LD A,H OPCODE(7c,« move.w ehl,d1 LOHI d1 move.b d1,eaf ») - ;nok + |nok OP_DD(7c,«») OP_CB(7c,«») @@ -2301,11 +2301,11 @@ OP_FD(7c,«») OP_FDCB(7c,«») OP_ED(7c,«») - ;; LD A,L + || LD A,L OPCODE(7d,« move.b ehl,eaf ») - ;nok + |nok OP_DD(7d,«») OP_CB(7d,«») @@ -2314,8 +2314,8 @@ OP_FD(7d,«») OP_FDCB(7d,«») OP_ED(7d,«») - ;; LD A,(HL) - ;; A <- (HL) + || LD A,(HL) + || A <- (HL) OPCODE(7e,« FETCHB ehl,eaf ») @@ -2327,10 +2327,10 @@ OP_FD(7e,«») OP_FDCB(7e,«») OP_ED(7e,«») - ;; LD A,A + || LD A,A OPCODE(7f,« ») - ;nok + |nok OP_DD(7f,«») OP_CB(7f,«») @@ -2341,21 +2341,21 @@ OP_ED(7f,«») - ;; Do an ADD \2,\1 -.macro F_ADD_B src dest ; 14 bytes? + || Do an ADD \2,\1 +.macro F_ADD_B src dest | 14 bytes? move.b \dest,d1 move.b \src,d0 jsr alu_add move.b d1,\dest ENDM - ;; ADD A,B + || ADD A,B OPCODE(80,« LOHI ebc F_ADD_B ebc,eaf HILO ebc ») - ;nok + |nok OP_DD(80,«») OP_CB(80,«») @@ -2364,11 +2364,11 @@ OP_FD(80,«») OP_FDCB(80,«») OP_ED(80,«») - ;; ADD A,C + || ADD A,C OPCODE(81,« F_ADD_B ebc,eaf ») - ;nok + |nok OP_DD(81,«») OP_CB(81,«») @@ -2377,13 +2377,13 @@ OP_FD(81,«») OP_FDCB(81,«») OP_ED(81,«») - ;; ADD A,D + || ADD A,D OPCODE(82,« LOHI ede F_ADD_B ede,eaf HILO ede ») - ;nok + |nok OP_DD(82,«») OP_CB(82,«») @@ -2392,11 +2392,11 @@ OP_FD(82,«») OP_FDCB(82,«») OP_ED(82,«») - ;; ADD A,E + || ADD A,E OPCODE(83,« F_ADD_B ede,eaf ») - ;nok + |nok OP_DD(83,«») OP_CB(83,«») @@ -2405,13 +2405,13 @@ OP_FD(83,«») OP_FDCB(83,«») OP_ED(83,«») - ;; ADD A,H + || ADD A,H OPCODE(84,« LOHI ehl F_ADD_B ehl,eaf HILO ehl ») - ;nok + |nok OP_DD(84,«») OP_CB(84,«») @@ -2420,11 +2420,11 @@ OP_FD(84,«») OP_FDCB(84,«») OP_ED(84,«») - ;; ADD A,L + || ADD A,L OPCODE(85,« F_ADD_B ehl,eaf ») - ;nok + |nok OP_DD(85,«») OP_CB(85,«») @@ -2433,14 +2433,14 @@ OP_FD(85,«») OP_FDCB(85,«») OP_ED(85,«») - ;; ADD A,(HL) - ;; XXX size? + || ADD A,(HL) + || XXX size? OPCODE(86,« FETCHB ehl,d2 F_ADD_B d2,eaf PUTB d2,ehl ») - ;nok + |nok OP_DD(86,«») OP_CB(86,«») @@ -2449,11 +2449,11 @@ OP_FD(86,«») OP_FDCB(86,«») OP_ED(86,«») - ;; ADD A,A + || ADD A,A OPCODE(87,« F_ADD_B eaf,eaf ») - ;nok + |nok OP_DD(87,«») OP_CB(87,«») @@ -2464,22 +2464,22 @@ OP_ED(87,«») - ;; Do an ADC \2,\1 -.macro F_ADC_B src dest ; S34 + || Do an ADC \2,\1 +.macro F_ADC_B src dest | S34 move.b \dest,d1 move.b \src,d0 jsr alu_adc move.b d1,\dest ENDM - ;; ADC A,B - ;; A <- A + B + (carry) + || ADC A,B + || A <- A + B + (carry) OPCODE(88,« LOHI ebc F_ADC_B ebc,eaf HILO ebc ») - ;nok + |nok OP_DD(88,«») OP_CB(88,«») @@ -2488,12 +2488,12 @@ OP_FD(88,«») OP_FDCB(88,«») OP_ED(88,«») - ;; ADC A,C - ;; A <- A + C + (carry) + || ADC A,C + || A <- A + C + (carry) OPCODE(89,« F_ADC_B ebc,eaf ») - ;nok + |nok OP_DD(89,«») OP_CB(89,«») @@ -2502,13 +2502,13 @@ OP_FD(89,«») OP_FDCB(89,«») OP_ED(89,«») - ;; ADC A,D + || ADC A,D OPCODE(8a,« LOHI ede F_ADC_B ede,eaf HILO ede ») - ;nok + |nok OP_DD(8a,«») OP_CB(8a,«») @@ -2517,12 +2517,12 @@ OP_FD(8a,«») OP_FDCB(8a,«») OP_ED(8a,«») - ;; ADC A,E - ;; A <- A + E + carry + || ADC A,E + || A <- A + E + carry OPCODE(8b,« F_ADC_B ede,eaf ») - ;nok + |nok OP_DD(8b,«») OP_CB(8b,«») @@ -2531,13 +2531,13 @@ OP_FD(8b,«») OP_FDCB(8b,«») OP_ED(8b,«») - ;; ADC A,H + || ADC A,H OPCODE(8c,« LOHI eaf F_ADC_B ehl,eaf HILO eaf ») - ;nok + |nok OP_DD(8c,«») OP_CB(8c,«») @@ -2546,11 +2546,11 @@ OP_FD(8c,«») OP_FDCB(8c,«») OP_ED(8c,«») - ;; ADC A,L + || ADC A,L OPCODE(8d,« F_ADC_B ehl,eaf ») - ;nok + |nok OP_DD(8d,«») OP_CB(8d,«») @@ -2559,13 +2559,13 @@ OP_FD(8d,«») OP_FDCB(8d,«») OP_ED(8d,«») - ;; ADC A,(HL) + || ADC A,(HL) OPCODE(8e,« FETCHB ehl,d2 F_ADC_B d2,eaf PUTB d2,ehl ») - ;nok + |nok OP_DD(8e,«») OP_CB(8e,«») @@ -2574,11 +2574,11 @@ OP_FD(8e,«») OP_FDCB(8e,«») OP_ED(8e,«») - ;; ADC A,A + || ADC A,A OPCODE(8f,« F_ADC_B eaf,eaf ») - ;nok + |nok OP_DD(8f,«») OP_CB(8f,«») @@ -2591,7 +2591,7 @@ OP_ED(8f,«») - ;; Do a SUB \2,\1 + || Do a SUB \2,\1 .macro F_SUB_B src dest move.b \dest,d1 move.b \src,d0 @@ -2599,13 +2599,13 @@ OP_ED(8f,«») move.b d1,\dest ENDM - ;; SUB A,B + || SUB A,B OPCODE(90,« LOHI ebc F_SUB_B ebc,eaf HILO ebc ») - ;nok + |nok OP_DD(90,«») OP_CB(90,«») @@ -2614,11 +2614,11 @@ OP_FD(90,«») OP_FDCB(90,«») OP_ED(90,«») - ;; SUB A,C + || SUB A,C OPCODE(91,« F_SUB_B ebc,eaf ») - ;nok + |nok OP_DD(91,«») OP_CB(91,«») @@ -2627,13 +2627,13 @@ OP_FD(91,«») OP_FDCB(91,«») OP_ED(91,«») - ;; SUB A,D + || SUB A,D OPCODE(92,« LOHI ede F_SUB_B ede,eaf HILO ede ») - ;nok + |nok OP_DD(92,«») OP_CB(92,«») @@ -2642,11 +2642,11 @@ OP_FD(92,«») OP_FDCB(92,«») OP_ED(92,«») - ;; SUB A,E + || SUB A,E OPCODE(93,« F_SUB_B ede,eaf ») - ;nok + |nok OP_DD(93,«») OP_CB(93,«») @@ -2655,13 +2655,13 @@ OP_FD(93,«») OP_FDCB(93,«») OP_ED(93,«») - ;; SUB A,H + || SUB A,H OPCODE(94,« LOHI ehl F_SUB_B ehl,eaf HILO ehl ») - ;nok + |nok OP_DD(94,«») OP_CB(94,«») @@ -2670,7 +2670,7 @@ OP_FD(94,«») OP_FDCB(94,«») OP_ED(94,«») - ;; SUB A,L + || SUB A,L OPCODE(95,« F_SUB_B ehl,eaf ») @@ -2682,13 +2682,13 @@ OP_FD(95,«») OP_FDCB(95,«») OP_ED(95,«») - ;; SUB A,(HL) + || SUB A,(HL) OPCODE(96,« FETCHB ehl,d2 F_SUB_B d2,eaf PUTB d2,ehl ») - ;nok + |nok OP_DD(96,«») OP_CB(96,«») @@ -2697,11 +2697,11 @@ OP_FD(96,«») OP_FDCB(96,«») OP_ED(96,«») - ;; SUB A,A + || SUB A,A OPCODE(97,« F_SUB_B eaf,eaf ») - ;nok + |nok OP_DD(97,«») OP_CB(97,«») @@ -2713,7 +2713,7 @@ OP_ED(97,«») - ;; Do a SBC \2,\1 + || Do a SBC \2,\1 .macro F_SBC_B src dest move.b \dest,d1 move.b \src,d0 @@ -2721,13 +2721,13 @@ OP_ED(97,«») move.b d1,\dest .endm - ;; SBC A,B + || SBC A,B OPCODE(98,« LOHI ebc F_SBC_B ebc,eaf HILO ebc ») - ;nok + |nok OP_DD(98,«») OP_CB(98,«») @@ -2736,11 +2736,11 @@ OP_FD(98,«») OP_FDCB(98,«») OP_ED(98,«») - ;; SBC A,C + || SBC A,C OPCODE(99,« F_SBC_B ebc,eaf ») - ;nok + |nok OP_DD(99,«») OP_CB(99,«») @@ -2749,13 +2749,13 @@ OP_FD(99,«») OP_FDCB(99,«») OP_ED(99,«») - ;; SBC A,D + || SBC A,D OPCODE(9a,« LOHI ede F_SBC_B ede,eaf HILO ede ») - ;nok + |nok OP_DD(9a,«») OP_CB(9a,«») @@ -2764,11 +2764,11 @@ OP_FD(9a,«») OP_FDCB(9a,«») OP_ED(9a,«») - ;; SBC A,E + || SBC A,E OPCODE(9b,« F_SBC_B ede,eaf ») - ;nok + |nok OP_DD(9b,«») OP_CB(9b,«») @@ -2777,13 +2777,13 @@ OP_FD(9b,«») OP_FDCB(9b,«») OP_ED(9b,«») - ;; SBC A,H + || SBC A,H OPCODE(9c,« LOHI ehl F_SBC_B ehl,eaf HILO ehl ») - ;nok + |nok OP_DD(9c,«») OP_CB(9c,«») @@ -2792,11 +2792,11 @@ OP_FD(9c,«») OP_FDCB(9c,«») OP_ED(9c,«») - ;; SBC A,L + || SBC A,L OPCODE(9d,« F_SBC_B ehl,eaf ») - ;nok + |nok OP_DD(9d,«») OP_CB(9d,«») @@ -2805,13 +2805,13 @@ OP_FD(9d,«») OP_FDCB(9d,«») OP_ED(9d,«») - ;; SBC A,(HL) + || SBC A,(HL) OPCODE(9e,« FETCHB ehl,d2 F_SBC_B d2,eaf PUTB d2,ehl ») - ;nok + |nok OP_DD(9e,«») OP_CB(9e,«») @@ -2820,11 +2820,11 @@ OP_FD(9e,«») OP_FDCB(9e,«») OP_ED(9e,«») - ;; SBC A,A + || SBC A,A OPCODE(9f,« F_SBC_B eaf,eaf ») - ;nok + |nok @@ -2844,13 +2844,13 @@ OP_FD(9f,«») OP_FDCB(9f,«») OP_ED(9f,«») - ;; AND B + || AND B OPCODE(a0,« LOHI ebc F_AND_B ebc,eaf HILO ebc ») - ;nok + |nok OP_DD(a0,«») OP_CB(a0,«») @@ -2859,7 +2859,7 @@ OP_FD(a0,«») OP_FDCB(a0,«») OP_ED(a0,«») - ;; AND C + || AND C OPCODE(a1,« F_AND_B ebc,eaf ») @@ -2871,13 +2871,13 @@ OP_FD(a1,«») OP_FDCB(a1,«») OP_ED(a1,«») - ;; AND D + || AND D OPCODE(a2,« LOHI ede F_AND_B ede,eaf HILO ede ») - ;nok + |nok OP_DD(a2,«») OP_CB(a2,«») @@ -2886,11 +2886,11 @@ OP_FD(a2,«») OP_FDCB(a2,«») OP_ED(a2,«») - ;; AND E + || AND E OPCODE(a3,« F_AND_B ede,eaf ») - ;nok + |nok OP_DD(a3,«») OP_CB(a3,«») @@ -2899,13 +2899,13 @@ OP_FD(a3,«») OP_FDCB(a3,«») OP_ED(a3,«») - ;; AND H + || AND H OPCODE(a4,« LOHI ehl F_AND_B ehl,eaf HILO ehl ») - ;nok + |nok OP_DD(a4,«») OP_CB(a4,«») @@ -2914,11 +2914,11 @@ OP_FD(a4,«») OP_FDCB(a4,«») OP_ED(a4,«») - ;; AND L + || AND L OPCODE(a5,« F_AND_B ehl,eaf ») - ;nok + |nok OP_DD(a5,«») OP_CB(a5,«») @@ -2927,13 +2927,13 @@ OP_FD(a5,«») OP_FDCB(a5,«») OP_ED(a5,«») - ;; AND (HL) + || AND (HL) OPCODE(a6,« FETCHB ehl,d2 F_AND_B d2,eaf PUTB d2,ehl ») - ;nok + |nok OP_DD(a6,«») OP_CB(a6,«») @@ -2942,12 +2942,12 @@ OP_FD(a6,«») OP_FDCB(a6,«») OP_ED(a6,«») - ;; AND A - ;; SPEED ... It's probably not necessary to run this faster. + || AND A + || SPEED ... It's probably not necessary to run this faster. OPCODE(a7,« F_AND_B eaf,eaf ») - ;nok + |nok @@ -2967,13 +2967,13 @@ OP_FD(a7,«») OP_FDCB(a7,«») OP_ED(a7,«») - ;; XOR B + || XOR B OPCODE(a8,« LOHI ebc F_XOR_B ebc,eaf HILO ebc ») - ;nok + |nok OP_DD(a8,«») OP_CB(a8,«») @@ -2982,11 +2982,11 @@ OP_FD(a8,«») OP_FDCB(a8,«») OP_ED(a8,«») - ;; XOR C + || XOR C OPCODE(a9,« F_XOR_B ebc,eaf ») - ;nok + |nok OP_DD(a9,«») OP_CB(a9,«») @@ -2995,13 +2995,13 @@ OP_FD(a9,«») OP_FDCB(a9,«») OP_ED(a9,«») - ;; XOR D + || XOR D OPCODE(aa,« LOHI ede F_XOR_B ede,eaf HILO ede ») - ;nok + |nok OP_DD(aa,«») OP_CB(aa,«») @@ -3010,11 +3010,11 @@ OP_FD(aa,«») OP_FDCB(aa,«») OP_ED(aa,«») - ;; XOR E + || XOR E OPCODE(ab,« F_XOR_B ede,eaf ») - ;nok + |nok OP_DD(ab,«») OP_CB(ab,«») @@ -3023,13 +3023,13 @@ OP_FD(ab,«») OP_FDCB(ab,«») OP_ED(ab,«») - ;; XOR H + || XOR H OPCODE(ac,« LOHI ehl F_XOR_B ehl,eaf HILO ehl ») - ;nok + |nok OP_DD(ac,«») OP_CB(ac,«») @@ -3038,11 +3038,11 @@ OP_FD(ac,«») OP_FDCB(ac,«») OP_ED(ac,«») - ;; XOR L + || XOR L OPCODE(ad,« F_XOR_B ehl,eaf ») - ;nok + |nok OP_DD(ad,«») OP_CB(ad,«») @@ -3051,13 +3051,13 @@ OP_FD(ad,«») OP_FDCB(ad,«») OP_ED(ad,«») - ;; XOR (HL) + || XOR (HL) OPCODE(ae,« FETCHB ehl,d2 F_XOR_B d2,eaf PUTB d2,ehl ») - ;nok + |nok OP_DD(ae,«») OP_CB(ae,«») @@ -3066,12 +3066,12 @@ OP_FD(ae,«») OP_FDCB(ae,«») OP_ED(ae,«») - ;; XOR A + || XOR A OPCODE(af,« F_XOR_B eaf,eaf - ;; XXX + || XXX ») - ;nok + |nok @@ -3091,13 +3091,13 @@ OP_FD(af,«») OP_FDCB(af,«») OP_ED(af,«») - ;; OR B + || OR B OPCODE(b0,« LOHI ebc F_OR_B ebc,eaf HILO ebc ») - ;nok + |nok OP_DD(b0,«») OP_CB(b0,«») @@ -3106,11 +3106,11 @@ OP_FD(b0,«») OP_FDCB(b0,«») OP_ED(b0,«») - ;; OR C + || OR C OPCODE(b1,« F_OR_B ebc,eaf ») - ;nok + |nok OP_DD(b1,«») OP_CB(b1,«») @@ -3119,13 +3119,13 @@ OP_FD(b1,«») OP_FDCB(b1,«») OP_ED(b1,«») - ;; OR D + || OR D OPCODE(b2,« LOHI ede F_OR_B ede,eaf HILO ede ») - ;nok + |nok OP_DD(b2,«») OP_CB(b2,«») @@ -3134,11 +3134,11 @@ OP_FD(b2,«») OP_FDCB(b2,«») OP_ED(b2,«») - ;; OR E + || OR E OPCODE(b3,« F_OR_B ede,eaf ») - ;nok + |nok OP_DD(b3,«») OP_CB(b3,«») @@ -3147,13 +3147,13 @@ OP_FD(b3,«») OP_FDCB(b3,«») OP_ED(b3,«») - ;; OR H + || OR H OPCODE(b4,« LOHI ehl F_OR_B ehl,eaf HILO ehl ») - ;nok + |nok OP_DD(b4,«») OP_CB(b4,«») @@ -3162,11 +3162,11 @@ OP_FD(b4,«») OP_FDCB(b4,«») OP_ED(b4,«») - ;; OR L + || OR L OPCODE(b5,« F_OR_B ehl,eaf ») - ;nok + |nok OP_DD(b5,«») OP_CB(b5,«») @@ -3175,13 +3175,13 @@ OP_FD(b5,«») OP_FDCB(b5,«») OP_ED(b5,«») - ;; OR (HL) + || OR (HL) OPCODE(b6,« - ;; SPEED unnecessary move + || SPEED unnecessary move FETCHB ehl,d2 F_OR_B d2,eaf ») - ;nok + |nok OPCODE(b7,« OP_DD(b6,«») @@ -3191,23 +3191,23 @@ OP_FD(b6,«») OP_FDCB(b6,«») OP_ED(b6,«») - ;; OR A + || OR A F_OR_B eaf,eaf ») - ;nok + |nok - ;; COMPARE instruction - ;; Tests the argument against A + || COMPARE instruction + || Tests the argument against A .macro F_CP_B src dest - ;; XXX deal with \2 or \1 being d1 or d0 + || XXX deal with \2 or \1 being d1 or d0 move.b \dest,d1 move.b \src,d0 jsr alu_cp - ;; no result to save + || no result to save .endm OP_DD(b7,«») @@ -3217,13 +3217,13 @@ OP_FD(b7,«») OP_FDCB(b7,«») OP_ED(b7,«») - ;; CP B + || CP B OPCODE(b8,« move.w ebc,d2 LOHI d2 F_CP_B d2,eaf ») - ;nok + |nok OP_DD(b8,«») OP_CB(b8,«») @@ -3232,11 +3232,11 @@ OP_FD(b8,«») OP_FDCB(b8,«») OP_ED(b8,«») - ;; CP C + || CP C OPCODE(b9,« F_CP_B ebc,eaf ») - ;nok + |nok OP_DD(b9,«») OP_CB(b9,«») @@ -3245,13 +3245,13 @@ OP_FD(b9,«») OP_FDCB(b9,«») OP_ED(b9,«») - ;; CP D + || CP D OPCODE(ba,« move.w ede,d2 LOHI d2 F_CP_B d2,eaf ») - ;nok + |nok OP_DD(ba,«») OP_CB(ba,«») @@ -3260,11 +3260,11 @@ OP_FD(ba,«») OP_FDCB(ba,«») OP_ED(ba,«») - ;; CP E + || CP E OPCODE(bb,« F_CP_B ede,eaf ») - ;nok + |nok OP_DD(bb,«») OP_CB(bb,«») @@ -3273,13 +3273,13 @@ OP_FD(bb,«») OP_FDCB(bb,«») OP_ED(bb,«») - ;; CP H + || CP H OPCODE(bc,« move.w ehl,d2 LOHI d2 F_CP_B d2,eaf ») - ;nok + |nok OP_DD(bc,«») OP_CB(bc,«») @@ -3288,11 +3288,11 @@ OP_FD(bc,«») OP_FDCB(bc,«») OP_ED(bc,«») - ;; CP L + || CP L OPCODE(bd,« F_CP_B ehl,eaf ») - ;nok + |nok OP_DD(bd,«») OP_CB(bd,«») @@ -3301,13 +3301,13 @@ OP_FD(bd,«») OP_FDCB(bd,«») OP_ED(bd,«») - ;; CP (HL) + || CP (HL) OPCODE(be,« FETCHB ehl,d2 F_CP_B d2,eaf - ;; no result to store + || no result to store ») - ;nok + |nok OP_DD(be,«») OP_CB(be,«») @@ -3316,7 +3316,7 @@ OP_FD(be,«») OP_FDCB(be,«») OP_ED(be,«») - ;; CP A + || CP A OPCODE(bf,« F_CP_B eaf,eaf ») @@ -3328,17 +3328,17 @@ OP_FD(bf,«») OP_FDCB(bf,«») OP_ED(bf,«») - ;; RET NZ - ;; if ~Z - ;; PCl <- (SP) - ;; PCh <- (SP+1) - ;; SP <- (SP+2) + || RET NZ + || if ~Z + || PCl <- (SP) + || PCh <- (SP+1) + || SP <- (SP+2) OPCODE(c0,« jsr f_norm_z - ;; SPEED inline RET - beq emu_op_c9 ; RET + || SPEED inline RET + beq emu_op_c9 | RET ») - ;nok + |nok OP_DD(c0,«») OP_CB(c0,«») @@ -3347,12 +3347,12 @@ OP_FD(c0,«») OP_FDCB(c0,«») OP_ED(c0,«») - ;; POP BC - ;; Pops a word into BC -OPCODE(c1,« ; S10 T + || POP BC + || Pops a word into BC +OPCODE(c1,« | S10 T POPW ebc ») - ;nok + |nok OP_DD(c1,«») OP_CB(c1,«») @@ -3361,17 +3361,17 @@ OP_FD(c1,«») OP_FDCB(c1,«») OP_ED(c1,«») - ;; JP NZ,immed.w - ;; if ~Z - ;; PC <- immed.w + || JP NZ,immed.w + || if ~Z + || PC <- immed.w OPCODE(c2,« jsr f_norm_z bne local(continue) - jmp emu_op_c3 ; shame this has to be a long jump + jmp emu_op_c3 | shame this has to be a long jump local(continue): add.l #2,epc ») - ;nok + |nok OP_DD(c2,«») OP_CB(c2,«») @@ -3380,8 +3380,8 @@ OP_FD(c2,«») OP_FDCB(c2,«») OP_ED(c2,«») - ;; JP immed.w - ;; PC <- immed.w + || JP immed.w + || PC <- immed.w OPCODE(c3,« FETCHWI d1 jsr deref @@ -3395,17 +3395,17 @@ OP_FD(c3,«») OP_FDCB(c3,«») OP_ED(c3,«») - ;; CALL NZ,immed.w - ;; If ~Z, CALL immed.w + || CALL NZ,immed.w + || If ~Z, CALL immed.w OPCODE(c4,« jsr f_norm_z - ;; CALL (emu_op_cd) will run HOLD_INTS again. This doesn't - ;; matter with the current implementation because HOLD_INTS - ;; simply sets a bit. + || CALL (emu_op_cd) will run HOLD_INTS again. This doesn't + || matter with the current implementation because HOLD_INTS + || simply sets a bit. beq emu_op_cd add.l #2,epc ») - ;nok + |nok OP_DD(c4,«») OP_CB(c4,«») @@ -3414,11 +3414,11 @@ OP_FD(c4,«») OP_FDCB(c4,«») OP_ED(c4,«») - ;; PUSH BC + || PUSH BC OPCODE(c5,« PUSHW ebc ») - ;nok + |nok OP_DD(c5,«») OP_CB(c5,«») @@ -3427,12 +3427,12 @@ OP_FD(c5,«») OP_FDCB(c5,«») OP_ED(c5,«») - ;; ADD A,immed.b + || ADD A,immed.b OPCODE(c6,« FETCHBI d1 F_ADD_B d1,eaf ») - ;nok + |nok OP_DD(c6,«») OP_CB(c6,«») @@ -3441,9 +3441,9 @@ OP_FD(c6,«») OP_FDCB(c6,«») OP_ED(c6,«») - ;; RST &0 - ;; == CALL 0 - ;; XXX check + || RST &0 + || == CALL 0 + || XXX check OPCODE(c7,« move.l epc,a0 jsr underef @@ -3452,7 +3452,7 @@ OPCODE(c7,« jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(c7,«») OP_CB(c7,«») @@ -3461,14 +3461,14 @@ OP_FD(c7,«») OP_FDCB(c7,«») OP_ED(c7,«») - ;; RET Z + || RET Z OPCODE(c8,« jsr f_norm_z beq local(continue) - jmp emu_op_c9 ; shame this has to be a long jump + jmp emu_op_c9 | shame this has to be a long jump local(continue): ») - ;nok + |nok OP_DD(c8,«») OP_CB(c8,«») @@ -3477,16 +3477,16 @@ OP_FD(c8,«») OP_FDCB(c8,«») OP_ED(c8,«») - ;; RET - ;; PCl <- (SP) - ;; PCh <- (SP+1) POPW - ;; SP <- (SP+2) + || RET + || PCl <- (SP) + || PCh <- (SP+1) POPW + || SP <- (SP+2) OPCODE(c9,« POPW d1 jsr deref movea.l a0,epc ») - ;nok + |nok OP_DD(c9,«») OP_CB(c9,«») @@ -3495,14 +3495,14 @@ OP_FD(c9,«») OP_FDCB(c9,«») OP_ED(c9,«») - ;; JP Z,immed.w - ;; If Z, jump + || JP Z,immed.w + || If Z, jump OPCODE(ca,« jsr f_norm_z bne emu_op_c3 add.l #2,epc ») - ;nok + |nok OP_DD(ca,«») OP_CB(ca,«») OP_DDCB(ca,«») @@ -3510,11 +3510,11 @@ OP_FD(ca,«») OP_FDCB(ca,«») OP_ED(ca,«») - ;; prefix + || prefix OPCODE(cb,« movea.w emu_op_undo_cb(pc),a2 ») - ;nok + |nok OP_DD(cb,«») OP_CB(cb,«») @@ -3523,7 +3523,7 @@ OP_FD(cb,«») OP_FDCB(cb,«») OP_ED(cb,«») - ;; CALL Z,immed.w + || CALL Z,immed.w OPCODE(cc,« jsr f_norm_z beq local(continue) @@ -3531,7 +3531,7 @@ OPCODE(cc,« local(continue): add.l #2,epc ») - ;nok + |nok OP_DD(cc,«») OP_CB(cc,«») @@ -3540,18 +3540,18 @@ OP_FD(cc,«») OP_FDCB(cc,«») OP_ED(cc,«») - ;; CALL immed.w - ;; (Like JSR on 68k) - ;; (SP-1) <- PCh - ;; (SP-2) <- PCl - ;; SP <- SP - 2 - ;; PC <- address + || CALL immed.w + || (Like JSR on 68k) + || (SP-1) <- PCh + || (SP-2) <- PCl + || SP <- SP - 2 + || PC <- address OPCODE(cd,« move.l epc,a0 - jsr underef ; d0 has PC + jsr underef | d0 has PC add.w #2,d0 PUSHW d0 - bra emu_op_c3 ; JP + bra emu_op_c3 | JP ») OP_DD(cd,«») @@ -3561,12 +3561,12 @@ OP_FD(cd,«») OP_FDCB(cd,«») OP_ED(cd,«») - ;; ADC A,immed.b + || ADC A,immed.b OPCODE(ce,« FETCHWI d1 F_ADC_B d1,eaf ») - ;nok + |nok OP_DD(ce,«») OP_CB(ce,«») @@ -3575,17 +3575,17 @@ OP_FD(ce,«») OP_FDCB(ce,«») OP_ED(ce,«») - ;; RST &08 - ;; == CALL 8 + || RST &08 + || == CALL 8 OPCODE(cf,« move.l epc,a0 - jsr underef ; d0 has PC + jsr underef | d0 has PC PUSHW d0 move.w #$08,d0 jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(cf,«») OP_CB(cf,«») @@ -3594,12 +3594,12 @@ OP_FD(cf,«») OP_FDCB(cf,«») OP_ED(cf,«») - ;; RET NC + || RET NC OPCODE(d0,« jsr f_norm_c beq emu_op_c9 ») - ;nok + |nok OP_DD(d0,«») OP_CB(d0,«») @@ -3608,11 +3608,11 @@ OP_FD(d0,«») OP_FDCB(d0,«») OP_ED(d0,«») - ;; POP DE + || POP DE OPCODE(d1,« POPW ede ») - ;nok + |nok OP_DD(d1,«») OP_CB(d1,«») @@ -3621,7 +3621,7 @@ OP_FD(d1,«») OP_FDCB(d1,«») OP_ED(d1,«») - ;; JP NC,immed.w + || JP NC,immed.w OPCODE(d2,« jsr f_norm_c beq emu_op_c3 @@ -3635,13 +3635,13 @@ OP_FD(d2,«») OP_FDCB(d2,«») OP_ED(d2,«») - ;; OUT immed.b,A + || OUT immed.b,A OPCODE(d3,« move.b eaf,d1 FETCHBI d0 jsr port_out ») - ;nok + |nok OP_DD(d3,«») OP_CB(d3,«») @@ -3650,13 +3650,13 @@ OP_FD(d3,«») OP_FDCB(d3,«») OP_ED(d3,«») - ;; CALL NC,immed.w + || CALL NC,immed.w OPCODE(d4,« jsr f_norm_c beq emu_op_cd add.l #2,epc ») - ;nok + |nok OP_DD(d4,«») OP_CB(d4,«») @@ -3665,11 +3665,11 @@ OP_FD(d4,«») OP_FDCB(d4,«») OP_ED(d4,«») - ;; PUSH DE + || PUSH DE OPCODE(d5,« PUSHW ede ») - ;nok + |nok OP_DD(d5,«») OP_CB(d5,«») @@ -3678,12 +3678,12 @@ OP_FD(d5,«») OP_FDCB(d5,«») OP_ED(d5,«») - ;; SUB A,immed.b + || SUB A,immed.b OPCODE(d6,« FETCHBI d1 F_SUB_B eaf,d1 ») - ;nok + |nok OP_DD(d6,«») OP_CB(d6,«») @@ -3692,8 +3692,8 @@ OP_FD(d6,«») OP_FDCB(d6,«») OP_ED(d6,«») - ;; RST &10 - ;; == CALL 10 + || RST &10 + || == CALL 10 OPCODE(d7,« move.l epc,a0 jsr underef @@ -3702,7 +3702,7 @@ OPCODE(d7,« jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(d7,«») OP_CB(d7,«») @@ -3711,12 +3711,12 @@ OP_FD(d7,«») OP_FDCB(d7,«») OP_ED(d7,«») - ;; RET C + || RET C OPCODE(d8,« jsr f_norm_c bne emu_op_c9 ») - ;nok + |nok OP_DD(d8,«») OP_CB(d8,«») @@ -3725,13 +3725,13 @@ OP_FD(d8,«») OP_FDCB(d8,«») OP_ED(d8,«») - ;; EXX + || EXX OPCODE(d9,« swap ebc swap ede swap ehl ») - ;nok + |nok OP_DD(d9,«») OP_CB(d9,«») @@ -3740,12 +3740,12 @@ OP_FD(d9,«») OP_FDCB(d9,«») OP_ED(d9,«») - ;; JP C,immed.w + || JP C,immed.w OPCODE(da,« jsr f_norm_c bne emu_op_c3 ») - ;nok + |nok OP_DD(da,«») OP_CB(da,«») @@ -3754,13 +3754,13 @@ OP_FD(da,«») OP_FDCB(da,«») OP_ED(da,«») - ;; IN A,immed.b + || IN A,immed.b OPCODE(db,« move.b eaf,d1 FETCHBI d0 jsr port_in ») - ;nok + |nok OP_DD(db,«») OP_CB(db,«») @@ -3769,15 +3769,15 @@ OP_FD(db,«») OP_FDCB(db,«») OP_ED(db,«») - ;; CALL C,immed.w + || CALL C,immed.w OPCODE(dc,« jsr f_norm_c bne emu_op_cd add.l #2,epc ») - ;nok + |nok -OPCODE(dd,« ; prefix +OPCODE(dd,« | prefix movea.w emu_op_undo_dd(pc),a2 ») @@ -3788,12 +3788,12 @@ OP_FD(dc,«») OP_FDCB(dc,«») OP_ED(dc,«») - ;; SBC A,immed.b + || SBC A,immed.b OPCODE(de,« FETCHWI d1 F_SBC_B d1,eaf ») - ;nok + |nok OP_DD(dd,«») OP_CB(dd,«») @@ -3802,8 +3802,8 @@ OP_FD(dd,«») OP_FDCB(dd,«») OP_ED(dd,«») - ;; RST &18 - ;; == CALL 18 + || RST &18 + || == CALL 18 OPCODE(df,« move.l epc,a0 jsr underef @@ -3812,7 +3812,7 @@ OPCODE(df,« jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(de,«») OP_CB(de,«») @@ -3821,13 +3821,13 @@ OP_FD(de,«») OP_FDCB(de,«») OP_ED(de,«») - ;; RET PO - ;; If parity odd (P zero), return + || RET PO + || If parity odd (P zero), return OPCODE(e0,« jsr f_norm_pv beq emu_op_c9 ») - ;nok + |nok OP_DD(df,«») OP_CB(df,«») @@ -3836,11 +3836,11 @@ OP_FD(df,«») OP_FDCB(df,«») OP_ED(df,«») - ;; POP HL + || POP HL OPCODE(e1,« POPW ehl ») - ;nok + |nok OP_DD(e0,«») OP_CB(e0,«») @@ -3849,13 +3849,13 @@ OP_FD(e0,«») OP_FDCB(e0,«») OP_ED(e0,«») - ;; JP PO,immed.w + || JP PO,immed.w OPCODE(e2,« jsr f_norm_pv beq emu_op_c3 add.l #2,epc ») - ;nok + |nok OP_DD(e1,«») OP_CB(e1,«») @@ -3864,14 +3864,14 @@ OP_FD(e1,«») OP_FDCB(e1,«») OP_ED(e1,«») - ;; EX (SP),HL - ;; Exchange + || EX (SP),HL + || Exchange OPCODE(e3,« POPW d1 PUSHW ehl move.w d1,ehl ») - ;nok + |nok OP_DD(e2,«») OP_CB(e2,«») @@ -3880,14 +3880,14 @@ OP_FD(e2,«») OP_FDCB(e2,«») OP_ED(e2,«») - ;; CALL PO,immed.w - ;; if parity odd (P=0), call + || CALL PO,immed.w + || if parity odd (P=0), call OPCODE(e4,« jsr f_norm_pv beq emu_op_cd add.l #2,epc ») - ;nok + |nok OP_DD(e3,«») OP_CB(e3,«») @@ -3896,11 +3896,11 @@ OP_FD(e3,«») OP_FDCB(e3,«») OP_ED(e3,«») - ;; PUSH HL + || PUSH HL OPCODE(e5,« PUSHW ehl ») - ;nok + |nok OP_DD(e4,«») OP_CB(e4,«») @@ -3909,12 +3909,12 @@ OP_FD(e4,«») OP_FDCB(e4,«») OP_ED(e4,«») - ;; AND immed.b + || AND immed.b OPCODE(e6,« FETCHBI d1 F_AND_B d1,eaf ») - ;nok + |nok OP_DD(e5,«») OP_CB(e5,«») @@ -3923,8 +3923,8 @@ OP_FD(e5,«») OP_FDCB(e5,«») OP_ED(e5,«») - ;; RST &20 - ;; == CALL 20 + || RST &20 + || == CALL 20 OPCODE(e7,« move.l epc,a0 jsr underef @@ -3933,7 +3933,7 @@ OPCODE(e7,« jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(e6,«») OP_CB(e6,«») @@ -3942,13 +3942,13 @@ OP_FD(e6,«») OP_FDCB(e6,«») OP_ED(e6,«») - ;; RET PE - ;; If parity odd (P zero), return + || RET PE + || If parity odd (P zero), return OPCODE(e8,« jsr f_norm_pv bne emu_op_c9 ») - ;nok + |nok OP_DD(e7,«») OP_CB(e7,«») @@ -3957,13 +3957,13 @@ OP_FD(e7,«») OP_FDCB(e7,«») OP_ED(e7,«») - ;; JP (HL) + || JP (HL) OPCODE(e9,« FETCHB ehl,d1 jsr deref movea.l a0,epc ») - ;nok + |nok OP_DD(e8,«») OP_CB(e8,«») @@ -3972,13 +3972,13 @@ OP_FD(e8,«») OP_FDCB(e8,«») OP_ED(e8,«») - ;; JP PE,immed.w + || JP PE,immed.w OPCODE(ea,« jsr f_norm_pv bne emu_op_c3 add.l #2,epc ») - ;nok + |nok OP_DD(e9,«») OP_CB(e9,«») @@ -3987,11 +3987,11 @@ OP_FD(e9,«») OP_FDCB(e9,«») OP_ED(e9,«») - ;; EX DE,HL + || EX DE,HL OPCODE(eb,« exg.w ede,ehl ») - ;nok + |nok OP_DD(ea,«») OP_CB(ea,«») @@ -4000,14 +4000,14 @@ OP_FD(ea,«») OP_FDCB(ea,«») OP_ED(ea,«») - ;; CALL PE,immed.w - ;; If parity even (P=1), call + || CALL PE,immed.w + || If parity even (P=1), call OPCODE(ec,« jsr f_norm_c bne emu_op_cd add.l #2,epc ») - ;nok + |nok OP_DD(eb,«») OP_CB(eb,«») @@ -4016,11 +4016,11 @@ OP_FD(eb,«») OP_FDCB(eb,«») OP_ED(eb,«») - ;; XXX this probably ought to hold interrupts too -OPCODE(ed,« ; prefix + || XXX this probably ought to hold interrupts too +OPCODE(ed,« | prefix movea.w emu_op_undo_ed(pc),a2 ») - ;nok + |nok OP_DD(ec,«») OP_CB(ec,«») @@ -4029,12 +4029,12 @@ OP_FD(ec,«») OP_FDCB(ec,«») OP_ED(ec,«») - ;; XOR immed.b + || XOR immed.b OPCODE(ee,« FETCHBI d1 F_XOR_B d1,eaf ») - ;nok + |nok OP_DD(ed,«») OP_CB(ed,«») @@ -4043,8 +4043,8 @@ OP_FD(ed,«») OP_FDCB(ed,«») OP_ED(ed,«») - ;; RST &28 - ;; == CALL 28 + || RST &28 + || == CALL 28 OPCODE(ef,« move.l epc,a0 jsr underef @@ -4053,7 +4053,7 @@ OPCODE(ef,« jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(ee,«») OP_CB(ee,«») @@ -4062,13 +4062,13 @@ OP_FD(ee,«») OP_FDCB(ee,«») OP_ED(ee,«») - ;; RET P - ;; Return if Positive + || RET P + || Return if Positive OPCODE(f0,« jsr f_norm_sign - beq emu_op_c9 ; RET + beq emu_op_c9 | RET ») - ;nok + |nok OP_DD(ef,«») OP_CB(ef,«») @@ -4077,15 +4077,15 @@ OP_FD(ef,«») OP_FDCB(ef,«») OP_ED(ef,«») - ;; POP AF - ;; SPEED this can be made faster ... - ;; XXX AF + || POP AF + || SPEED this can be made faster ... + || XXX AF OPCODE(f1,« POPW eaf move.w eaf,(flag_byte-flag_storage)(a3) move.b #$ff,(flag_valid-flag_storage)(a3) ») - ;nok + |nok OP_DD(f0,«») OP_CB(f0,«») @@ -4094,13 +4094,13 @@ OP_FD(f0,«») OP_FDCB(f0,«») OP_ED(f0,«») - ;; JP P,immed.w + || JP P,immed.w OPCODE(f2,« jsr f_norm_sign - beq emu_op_c3 ; JP + beq emu_op_c3 | JP add.l #2,epc ») - ;nok + |nok OPCODE(f3,« OP_DD(f1,«») @@ -4110,7 +4110,7 @@ OP_FD(f1,«») OP_FDCB(f1,«») OP_ED(f1,«») - ;; DI + || DI jsr ints_stop ») @@ -4121,13 +4121,13 @@ OP_FD(f2,«») OP_FDCB(f2,«») OP_ED(f2,«») - ;; CALL P,&0000 - ;; Call if positive (S=0) + || CALL P,&0000 + || Call if positive (S=0) OPCODE(f4,« jsr f_norm_sign beq emu_op_cd ») - ;nok + |nok OP_DD(f3,«») OP_CB(f3,«») @@ -4136,16 +4136,16 @@ OP_FD(f3,«») OP_FDCB(f3,«») OP_ED(f3,«») - ;; PUSH AF + || PUSH AF OPCODE(f5,« jsr flags_normalize LOHI eaf move.b (flag_byte),eaf - ;; XXX wrong, af is not normalized by flags_normalize? + || XXX wrong, af is not normalized by flags_normalize? HILO eaf PUSHW eaf ») - ;nok + |nok OP_DD(f5,«») OP_CB(f5,«») @@ -4154,12 +4154,12 @@ OP_FD(f5,«») OP_FDCB(f5,«») OP_ED(f5,«») - ;; OR immed.b + || OR immed.b OPCODE(f6,« FETCHBI d1 F_OR_B d1,eaf ») - ;nok + |nok OP_DD(f6,«») OP_CB(f6,«») @@ -4168,8 +4168,8 @@ OP_FD(f6,«») OP_FDCB(f6,«») OP_ED(f6,«») - ;; RST &30 - ;; == CALL 30 + || RST &30 + || == CALL 30 OPCODE(f7,« move.l epc,a0 jsr underef @@ -4178,7 +4178,7 @@ OPCODE(f7,« jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(f7,«») OP_CB(f7,«») @@ -4187,13 +4187,13 @@ OP_FD(f7,«») OP_FDCB(f7,«») OP_ED(f7,«») - ;; RET M - ;; Return if Sign == 1, minus + || RET M + || Return if Sign == 1, minus OPCODE(f8,« jsr f_norm_sign - bne emu_op_c9 ; RET + bne emu_op_c9 | RET ») - ;nok + |nok OP_DD(f8,«») OP_CB(f8,«») @@ -4202,14 +4202,14 @@ OP_FD(f8,«») OP_FDCB(f8,«») OP_ED(f8,«») - ;; LD SP,HL - ;; SP <- HL + || LD SP,HL + || SP <- HL OPCODE(f9,« move.w ehl,d1 jsr deref movea.l a0,esp ») - ;nok + |nok OP_DD(f9,«») OP_CB(f9,«») @@ -4218,13 +4218,13 @@ OP_FD(f9,«») OP_FDCB(f9,«») OP_ED(f9,«») - ;; JP M,immed.w + || JP M,immed.w OPCODE(fa,« jsr f_norm_sign - bne emu_op_c3 ; JP + bne emu_op_c3 | JP add.l #2,epc ») - ;nok + |nok OP_DD(fa,«») OP_CB(fa,«») @@ -4233,11 +4233,11 @@ OP_FD(fa,«») OP_FDCB(fa,«») OP_ED(fa,«») - ;; EI + || EI OPCODE(fb,« jsr ints_start ») - ;nok + |nok OP_DD(fb,«») OP_CB(fb,«») @@ -4246,14 +4246,14 @@ OP_FD(fb,«») OP_FDCB(fb,«») OP_ED(fb,«») - ;; CALL M,immed.w - ;; Call if minus (S=1) + || CALL M,immed.w + || Call if minus (S=1) OPCODE(fc,« jsr f_norm_sign bne emu_op_cd add.l #2,epc ») - ;nok + |nok OP_DD(fc,«») OP_CB(fc,«») @@ -4262,8 +4262,8 @@ OP_FD(fc,«») OP_FDCB(fc,«») OP_ED(fc,«») - ;; swap IY, HL -OPCODE(fd,« ; prefix + || swap IY, HL +OPCODE(fd,« | prefix movea.w emu_op_undo_fd(pc),a2 ») @@ -4274,12 +4274,12 @@ OP_FD(fd,«») OP_FDCB(fd,«») OP_ED(fd,«») - ;; CP immed.b + || CP immed.b OPCODE(fe,« FETCHBI d1 F_CP_B d1,eaf ») - ;nok + |nok OP_DD(fe,«») OP_CB(fe,«») @@ -4288,8 +4288,8 @@ OP_FD(fe,«») OP_FDCB(fe,«») OP_ED(fe,«») - ;; RST &38 - ;; == CALL 38 + || RST &38 + || == CALL 38 OPCODE(ff,« move.l epc,a0 jsr underef @@ -4298,7 +4298,7 @@ OPCODE(ff,« jsr deref move.l a0,epc ») - ;nok + |nok OP_DD(ff,«») OP_CB(ff,«») |
