diff options
| author | Astrid Smith | 2010-09-13 22:26:37 -0700 |
|---|---|---|
| committer | Astrid Smith | 2010-09-13 22:26:37 -0700 |
| commit | 5e4ce46cab62bc9d7b127b3feed01588b32bb9de (patch) | |
| tree | dde0c7cdcb92ca0b60ffe04abd12557b3fd04af2 | |
| parent | a1d4464975c3e714564fa908e21a5bbbe4a0b7c6 (diff) | |
CCF flags :(
| -rw-r--r-- | opcodes.asm | 4 | ||||
| -rw-r--r-- | testbenches/mine.z80 | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/opcodes.asm b/opcodes.asm index 329a825..f6171e9 100644 --- a/opcodes.asm +++ b/opcodes.asm @@ -738,9 +738,11 @@ emu_op_3e: emu_op_3f: ;; CCF ;; Clear carry flag + ;; XXX fuck flags bsr flags_normalize ;; SZ5H3PNC - eor.b #%00010001,flag_byte-flag_storage(a3) + andi.b #%11111110,flag_byte-flag_storage(a3) + ori.b #%00000001,flag_valid-flag_storage(a3) DONE ;nok START diff --git a/testbenches/mine.z80 b/testbenches/mine.z80 index 637d2b5..0b75414 100644 --- a/testbenches/mine.z80 +++ b/testbenches/mine.z80 @@ -20,16 +20,16 @@ dec8: ret ;c9 cond_jr: - ld a,01h ;3e + ld a,01h ;3e 01 cp a ;bf - jr nz,wrong ;20 + jr nz,wrong ;20 07 ccf ;3f - jr c,wrong ;38 + jr c,wrong ;38 scf ;37 - jr nc,wrong ;30 - ret + jr nc,wrong ;30 + ret ;c9 wrong: |
