diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-05-09 00:33:06 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-05-09 00:33:06 -0700 |
commit | e69a49fa8fb5adedc20ccfda844c86ab2023ad58 (patch) | |
tree | c8d75e5b1b3a69a73badda623763fd8e5f52c7b0 | |
parent | 1a515f83fdcc620646cf8afb99a9d47ad2e7213c (diff) |
Set the N flag to the correct value for DEC instructions
-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 97a3b46..7acfcd3 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -806,7 +806,7 @@ uint8_t * translate_z80inst(z80inst * inst, uint8_t * dst, z80_context * context } dst = sub_ir(dst, 1, dst_op.base, z80_size(inst)); if (z80_size(inst) == SZ_B) { - 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)); |