From: Miro Kropacek Date: Tue, 9 Jan 2018 11:09:46 +0000 (+1100) Subject: Fix NBCD instruction X-Git-Tag: 3600~5^2^2 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=4fa80096ecfcdedcae909cdc91c21c9359091132;p=francis%2Fwinuae.git Fix NBCD instruction --- diff --git a/gencpu.cpp b/gencpu.cpp index 5b267362..72c5ef8d 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -3414,8 +3414,9 @@ static void gen_opcode (unsigned int opcode) printf ("\tuae_u16 newv_hi = - (src & 0xF0);\n"); printf ("\tuae_u16 newv;\n"); printf ("\tint cflg, tmp_newv;\n"); + printf ("\ttmp_newv = newv_hi + newv_lo;\n"); printf ("\tif (newv_lo > 9) { newv_lo -= 6; }\n"); - printf ("\ttmp_newv = newv = newv_hi + newv_lo;\n"); + printf ("\tnewv = newv_hi + newv_lo;\n"); printf ("\tcflg = (newv & 0x1F0) > 0x90;\n"); printf ("\tif (cflg) newv -= 0x60;\n"); printf ("\tSET_CFLG (cflg);\n");