From: Toni Wilen Date: Sun, 31 May 2020 16:40:24 +0000 (+0300) Subject: Fix assembler not supporting instructions that modify address register but mnemonic... X-Git-Tag: 4400~22 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=31cf2fd547a3eadf5ca4c4f903ccd00f0126eb71;p=francis%2Fwinuae.git Fix assembler not supporting instructions that modify address register but mnemonic not ending to 'A'. --- diff --git a/disasm.cpp b/disasm.cpp index b741e555..4b99b17d 100644 --- a/disasm.cpp +++ b/disasm.cpp @@ -1265,6 +1265,7 @@ int m68k_asm(TCHAR *sline, uae_u16 *out, uaecptr pc) uae_u32 dval = 0; int ssize = -1; int dsize = -1; + struct mnemolookup *lookup; dmode = asm_parse_mode(dstea, &dreg, &dval, &dextcnt, dexts); @@ -1319,7 +1320,15 @@ int m68k_asm(TCHAR *sline, uae_u16 *out, uaecptr pc) ins[l + 1] = 0; } } else if (last != 'A') { - _tcscat(ins, _T("A")); + TCHAR insa[256]; + _tcscpy(insa, ins); + _tcscat(insa, _T("A")); + for (lookup = lookuptab; lookup->name; lookup++) { + if (!_tcscmp(insa, lookup->name)) { + _tcscpy(ins, insa); + break; + } + } } } @@ -1333,7 +1342,6 @@ int m68k_asm(TCHAR *sline, uae_u16 *out, uaecptr pc) tsize = 2; } - struct mnemolookup *lookup; for (lookup = lookuptab; lookup->name; lookup++) { if (!_tcscmp(ins, lookup->name)) break;