summaryrefslogtreecommitdiff
path: root/flags.asm
diff options
context:
space:
mode:
authorAstrid Smith2010-06-19 08:22:20 -0700
committerAstrid Smith2010-06-19 08:22:20 -0700
commitdf1455c1313f43c12a71ab54251617123e8aa084 (patch)
tree34aa24525857e076acaf54b4906281c0d87a6c81 /flags.asm
parent681be8cbedd80f5901f3f7993cca068c75673fff (diff)
Changes from Lionel
Diffstat (limited to 'flags.asm')
-rw-r--r--flags.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/flags.asm b/flags.asm
index 3f672e3..19273d1 100644
--- a/flags.asm
+++ b/flags.asm
@@ -48,13 +48,13 @@ F_ADD_SAVE MACRO
;; Destroys d1
f_norm_c:
move.b flag_valid-flag_storage(a3),d1
- andi.b #%00000001,d1
- bne.s FNC_ok ; Bit is valid
+; d1 is destroyed in all cases, so you can use lsr and the C bit (same speed, smaller)
+ lsr.b #1,d1
+ bcs.s FNC_ok ; Bit is valid
move.b f_host_ccr-flag_storage(a3),d1
andi.b #%00000001,d1
-;; XXX see above comment for using lea and then d(an) if you have a spare register.
or.b d1,flag_byte-flag_storage(a3)
- ori.b #%00000001,flag_valid
+ ori.b #%00000001,flag_valid-flag_storage(a3)
FNC_ok:
move.b flag_byte-flag_storage(a3),d1
andi.b #%00000001,d1
@@ -89,7 +89,7 @@ FNPV_ok:
;; d1. Destroys d0,d1.
f_calc_parity:
andi.w #$ff,d1
- move.b lut_parity-flag_storage(a3,d1),d1
+ move.b lut_parity-flag_storage(a3,d1.w),d1
move.w flag_byte(pc),d0
and.b #%11110111,d0
or.w #%0000100000000000,d0