diff options
| author | Duncan Smith | 2010-09-13 20:30:11 -0700 |
|---|---|---|
| committer | Duncan Smith | 2010-09-13 20:30:11 -0700 |
| commit | 1bb96fe059fbac8699bf55c8a7d551b71a22b92b (patch) | |
| tree | d956be882bf07ca581d8f663aa7c44a3db690aa3 | |
| parent | bbdd96f2a2f7f29125f7d79809590f93f4ca880e (diff) | |
More testcases and a few fixes
| -rw-r--r-- | opcodes.asm | 8 | ||||
| -rw-r--r-- | testbenches/mine.z80 | 17 |
2 files changed, 21 insertions, 4 deletions
diff --git a/opcodes.asm b/opcodes.asm index 14a0c8c..fdff23c 100644 --- a/opcodes.asm +++ b/opcodes.asm @@ -153,7 +153,7 @@ F_INC_B MACRO F_DEC_B MACRO move.b #1,f_tmp_byte-flag_storage(a3) - st f_tmp_src_b-flag_storage(a3) + st f_tmp_src_b-flag_storage(a3) ;; why did I do this? move.b \1,f_tmp_dst_b-flag_storage(a3) subq #1,\1 F_SET #2 @@ -723,7 +723,7 @@ emu_op_3d: emu_op_3e: ;; LD A,immed.b FETCHBI eaf - DONE ;nok + DONE START emu_op_3f: @@ -1871,6 +1871,7 @@ emu_op_ca: START emu_op_cb: ; prefix movea.w emu_op_undo_cb(pc),a2 + ;; nok START emu_op_cc: @@ -1889,6 +1890,7 @@ emu_op_cd: ;; PC <- address move.l epc,a0 bsr underef ; d0 has PC + add.w #2,d0 PUSHW d0 bra emu_op_c3 ; JP @@ -1929,7 +1931,7 @@ emu_op_d2: ;; JP NC,immed.w bsr f_norm_c beq emu_op_c3 - DONE ;nok + DONE START emu_op_d3: diff --git a/testbenches/mine.z80 b/testbenches/mine.z80 index 2499de3..2de2861 100644 --- a/testbenches/mine.z80 +++ b/testbenches/mine.z80 @@ -3,7 +3,7 @@ .ORG 4000h - call dec8 + call cond_jr ;cd halt inc8: @@ -17,9 +17,24 @@ inc8: dec8: ld a,0a5h ;3e dec a ;3d + ret ;c9 + +cond_jr: + ld a,01h ;3e + cp a ;b8 + jr nz,wrong ;20 + + ccf ;3f + jr c,wrong ;38 + + scf ;37 + jr nc,wrong ;30 ret +wrong: + jp wrong + data8: .db 0a5h data16: |
