summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
authorAstrid Smith2010-06-12 15:38:33 -0700
committerAstrid Smith2010-06-12 15:38:33 -0700
commit8dcefecca20aeca6d2ea3748ea181bd96be68ca2 (patch)
tree36c3ee39ebcf2e4c042f8945ebc488da521707db /main.asm
parentf93b02521c47459ef9e043294aabeeaafcf17a46 (diff)
I'm not sure where this changeset came from, but it looks good ...
Diffstat (limited to 'main.asm')
-rw-r--r--main.asm38
1 files changed, 25 insertions, 13 deletions
diff --git a/main.asm b/main.asm
index cafde71..6f6d3f8 100644
--- a/main.asm
+++ b/main.asm
@@ -157,26 +157,22 @@ HILO MACRO ; 22 cycles, 2 bytes
rol.w #8,\1
ENDM
+
;; calc84maniac suggests putting emu_fetch into this in order
;; to save 8 cycles per instruction, at the expense of code
;; size
-DONE MACRO ; 8 cycles, 2 bytes
- jmp (a2)
+ ;;
+ ;; See if I can get rid of the eor
+DONE MACRO
+ eor.w d0,d0 ; 4 cycles
+ move.b (a4)+,d0 ; 8 cycles
+ rol.w #5,d0 ; 4 cycles adjust to actual alignment
+ jmp 0(a3,d0) ;14 cycles
+ ;; overhead: 30 cycles
ENDM
;; == Special Opcode Macros ========================================
- ;; Do a SUB \2,\1
-F_SUB_B MACRO ;14 bytes?
-;; XXX use lea and then d(an) if you have a spare register.
- move.b \1,f_tmp_src_b ; preserve operands for flagging
- move.b \2,f_tmp_dst_b
- move.b #1,flag_n
- move.b #1,f_tmp_byte
- sub \1,\2
- move sr,f_host_ccr
- ENDM
-
;; Do an ADD \1,\2
F_ADD_W MACRO
@@ -1448,6 +1444,22 @@ emu_op_8f:
F_ADD_B d3,d3
DONE
+
+
+
+
+ ;; Do a SUB \2,\1
+ ;; XXX CHECK
+F_SUB_B MACRO ;14 bytes?
+ ;; XXX use lea and then d(an) if you have a spare register.
+ move.b \1,f_tmp_src_b ; preserve operands for flagging
+ move.b \2,f_tmp_dst_b
+ move.b #1,flag_n
+ move.b #1,f_tmp_byte
+ sub \1,\2
+ move sr,f_host_ccr
+ ENDM
+
START
emu_op_90:
;; SUB A,B