summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Smith2010-06-18 17:31:31 -0700
committerDuncan Smith2010-06-18 17:31:31 -0700
commitc1ec4ca955149302b44a77d2a5405379dd64160f (patch)
tree762ea63c0e220d6bf5ad4c1576aadf1da50ec6a0
parentbb9c5d5e6d1b111ad8bd76940b81531169de5bae (diff)
Added more flag stubs
-rw-r--r--flags.asm13
1 files changed, 11 insertions, 2 deletions
diff --git a/flags.asm b/flags.asm
index ac51b01..0dceb2a 100644
--- a/flags.asm
+++ b/flags.asm
@@ -97,6 +97,11 @@ f_calc_parity:
move.w d0,flag_byte-flag_storage(a3)
rts
+ ;; Routine to make both the Carry and Half-Carry flags valid.
+f_calc_carries:
+ ;; XXX do this
+ rts
+
;; Normalize and return Sign bit (loaded into Z bit).
;; Destroys d1
f_norm_sign:
@@ -110,8 +115,6 @@ FNsign_ok:
rts
;; Routine to turn 68k flags into z80 flags.
- ;; Preconditions:
- ;; Flags to change are noted in d0 by a 1 bit
flags_normalize:
move.b f_host_ccr(pc),d1 ; 8/4
;; .w keeps d1 clean
@@ -126,6 +129,12 @@ flags_normalize:
or.b d1,flag_byte-flag_storage(a3)
rts
+ ;; Routine to completely fill the flags register
+flags_all:
+ bsr flags_normalize
+ bsr f_calc_carries
+ rts
+
flag_storage:
;; Numbers in comments are offsets from flag_storage, so use
;; offset(a3) to address.