diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-05-09 00:17:12 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-05-09 00:17:12 -0700 |
commit | e9cb3c417ed72f974a09c0818c65fd91bf02b792 (patch) | |
tree | b0198e03df9af375538edf5c70fe2593161bcca3 /z80_to_x86.c | |
parent | 47b16e520161bbb4877ba3757a19061356229f7a (diff) |
Correctly set the N flag for SBC
Diffstat (limited to 'z80_to_x86.c')
-rw-r--r-- | z80_to_x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c index db6b6e4..56e930c 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -648,7 +648,7 @@ uint8_t * translate_z80inst(z80inst * inst, uint8_t * dst, z80_context * context dst = sbb_ir(dst, src_op.disp, dst_op.base, z80_size(inst)); } dst = setcc_rdisp8(dst, CC_C, CONTEXT, zf_off(ZF_C)); - dst = mov_irdisp8(dst, 0, CONTEXT, zf_off(ZF_N), SZ_B); + dst = mov_irdisp8(dst, 1, CONTEXT, zf_off(ZF_N), SZ_B); //TODO: Implement half-carry flag dst = setcc_rdisp8(dst, CC_O, CONTEXT, zf_off(ZF_PV)); dst = setcc_rdisp8(dst, CC_Z, CONTEXT, zf_off(ZF_Z)); |