summaryrefslogtreecommitdiff
path: root/flags.asm
diff options
context:
space:
mode:
authorDuncan Smith2010-06-14 20:26:49 -0700
committerDuncan Smith2010-06-14 20:26:49 -0700
commit760f03cfdc45222f71cd0458e722b9c915f7e681 (patch)
treec848aac2e0125caad570889d7bd4dd2108750256 /flags.asm
parent209e61d7d73f51de361d507da1ce41166122a33a (diff)
Done with my first pass through the 1-byte opcodes.
Diffstat (limited to 'flags.asm')
-rw-r--r--flags.asm12
1 files changed, 12 insertions, 0 deletions
diff --git a/flags.asm b/flags.asm
index aa04118..928a6e7 100644
--- a/flags.asm
+++ b/flags.asm
@@ -84,6 +84,18 @@ FNPV_ok:
andi.b #%00000100,d1
rts
+ ;; Normalize and return Sign bit (loaded into Z bit).
+ ;; Destroys d1
+f_norm_sign:
+ move.b flag_valid-flag_storage(a3),d1
+ andi.b #%01000000,d1
+ bne.s FNsign_ok ; Bit is already valid
+ bsr flags_normalize
+FNsign_ok:
+ move.b flag_byte-flag_storage(a3),d1
+ andi.b #%01000000,d1
+ rts
+
;; Routine to turn 68k flags into z80 flags.
;; Preconditions:
;; Flags to change are noted in d0 by a 1 bit