summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAstrid Smith2010-09-14 19:50:47 -0700
committerAstrid Smith2010-09-14 19:50:47 -0700
commit2fffd745741cdefa133837a40d3672894f610e81 (patch)
treeb6a6124f9352442d7a76b8788e60d5a902203489
parent5e4ce46cab62bc9d7b127b3feed01588b32bb9de (diff)
Trivial changes.
-rw-r--r--flags.asm3
-rw-r--r--opcodes.asm2
-rw-r--r--testbenches/mine.z802
3 files changed, 5 insertions, 2 deletions
diff --git a/flags.asm b/flags.asm
index 62e1631..40e2f44 100644
--- a/flags.asm
+++ b/flags.asm
@@ -177,6 +177,9 @@ flags_normalize:
move.b (f_host_sr+1)(pc),d1 ; 8/4
;; .w keeps d1 clean
andi.w #%00011111,d1 ; 8/4
+
+ ;; doesn't this invalidate the previous contents of d1
+ ;; entirely?
move.b lut_ccr(pc,d1.w),d1 ; 10/4
move.b flag_valid(pc),d0
not.b d0
diff --git a/opcodes.asm b/opcodes.asm
index f6171e9..7568c49 100644
--- a/opcodes.asm
+++ b/opcodes.asm
@@ -741,8 +741,8 @@ emu_op_3f:
;; XXX fuck flags
bsr flags_normalize
;; SZ5H3PNC
- andi.b #%11111110,flag_byte-flag_storage(a3)
ori.b #%00000001,flag_valid-flag_storage(a3)
+ andi.b #%11111110,flag_byte-flag_storage(a3)
DONE ;nok
START
diff --git a/testbenches/mine.z80 b/testbenches/mine.z80
index 0b75414..aa33fb5 100644
--- a/testbenches/mine.z80
+++ b/testbenches/mine.z80
@@ -4,7 +4,7 @@
.ORG 4000h
call cond_jr ;cd
- halt
+ halt ;76
inc8:
ld bc,data8 ;01