summaryrefslogtreecommitdiff
path: root/flags.asm
diff options
context:
space:
mode:
authorAstrid Smith2010-06-14 22:37:58 -0700
committerAstrid Smith2010-06-14 22:37:58 -0700
commitc66aae0e07d9bccd69f58cc8c492ff2eaa2f2f74 (patch)
treee4c8516a0b2bea5f1e008abd71c8e56d3437b58d /flags.asm
parentddd3b3267a0c434561840080eb73493572aaffa0 (diff)
Removed LABEL-flag_storage(a3) business, as A68k was choking on it :(
Diffstat (limited to 'flags.asm')
-rw-r--r--flags.asm20
1 files changed, 11 insertions, 9 deletions
diff --git a/flags.asm b/flags.asm
index 928a6e7..a7c6c4b 100644
--- a/flags.asm
+++ b/flags.asm
@@ -17,15 +17,16 @@ F_CLEAR MACRO
;; Sets or clears the bit explicitly.
;;
;; Byte for which parity is calculated must be in \1. High
- ;; byte of \1.w must be zero, using d0 is suggested. (d1
+ ;; byte of \1.w must be zero, using d0 is suggested. (a0,d1
;; destroyed)
F_PAR MACRO
- ori.b #%00000100,flag_valid-flag_storage(a3) ; ??/4
- move.b flag_byte-flag_storage(a3),d1 ; ??/2
- andi.b #%11111011,d1 ; ??/4
- or.b lut_parity-flag_storage(a3,\1.w),d1 ; ??/4
- move.b d1,flag_byte-flag_storage(a3) ; ??/2
+ ori.b #%00000100,(flag_valid).w ; ??/4
+ move.b (flag_byte).w,d1 ; ??/2
+ andi.b #%11111011,d1 ; ??/4
+ lea (lut_parity).w,a0
+ or.b 0(a0,\1.w),d1 ; ??/4
+ move.b d1,(flag_byte).w ; ??/2
ENDM ;xxx cycles (!)
@@ -37,9 +38,9 @@ F_OVFL MACRO
;; Save the two operands from ADD \1,\2
F_ADD_SAVE MACRO
- move.b \1,f_tmp_src_b-flag_storage(a3)
- move.b \2,f_tmp_dst_b-flag_storage(a3)
- move.b #$01,f_tmp_byte-flag_storage(a3)
+ move.b \1,(f_tmp_src_b).w
+ move.b \2,(f_tmp_dst_b).w
+ move.b #$01,(f_tmp_byte).w
F_SET #%
ENDM
@@ -131,6 +132,7 @@ f_host_sr: ds.b 0
f_host_ccr: ds.b 0
EVEN
+ ;; DO NOT REARRANGE THESE.
flag_byte: ds.b 0 ; Byte of all flags
flag_valid: ds.b 0 ; Validity mask -- 1 if valid.