summaryrefslogtreecommitdiff
path: root/opcodes.asm
diff options
context:
space:
mode:
authorAstrid Smith2010-06-21 13:11:42 -0700
committerAstrid Smith2010-06-21 13:11:42 -0700
commit4a12b7289ca0a3182d94d84bb78380fa841885a6 (patch)
tree1d650842473e45f614bf9dc2cbbe19e12bc006f6 /opcodes.asm
parente1b749973d6eecbe634c131ffeb22e2273ab32b1 (diff)
Moved DONE macro to a more sensible location
Diffstat (limited to 'opcodes.asm')
-rw-r--r--opcodes.asm19
1 files changed, 9 insertions, 10 deletions
diff --git a/opcodes.asm b/opcodes.asm
index 2ae5c49..9b550ea 100644
--- a/opcodes.asm
+++ b/opcodes.asm
@@ -105,6 +105,15 @@ START MACRO
_align SET _align+$20
ENDM
+ ;; This is run at the end of every instruction routine.
+DONE MACRO
+ clr.w d0 ; 4 cycles / 2 bytes
+ move.b (a4)+,d0 ; 8 cycles / 2 bytes
+ rol.w #5,d0 ;16 cycles / 2 bytes
+ jmp 0(a5,d0.w) ;14 cycles / 4 bytes
+ ;; overhead: 42 cycles /10 bytes
+ ENDM
+
;; LOHI/HILO are hideously slow for instructions used often.
;; Interleave registers instead:
;;
@@ -133,16 +142,6 @@ WORD MACRO
;; overhead: 52 cycles /14 bytes
ENDM
-
- ;; This is run at the end of every instruction routine.
-DONE MACRO
- clr.w d0 ; 4 cycles / 2 bytes
- move.b (a4)+,d0 ; 8 cycles / 2 bytes
- rol.w #5,d0 ;16 cycles / 2 bytes
- jmp 0(a5,d0.w) ;14 cycles / 4 bytes
- ;; overhead: 42 cycles /10 bytes
- ENDM
-
;; == Special Opcode Macros ========================================
;; Do an ADD \1,\2