From: Toni Wilen Date: Fri, 29 Mar 2019 17:40:48 +0000 (+0200) Subject: Fix (an,dn,xxxx.w/.l) disassembly. X-Git-Tag: 4200~10 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=cc32aec131dc7fc184a6868feb55cdb2edcd109c;p=francis%2Fwinuae.git Fix (an,dn,xxxx.w/.l) disassembly. --- diff --git a/newcpu.cpp b/newcpu.cpp index ca354a8b..47eeacd2 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -2290,8 +2290,19 @@ static uaecptr ShowEA_disp(uaecptr *pcp, uaecptr base, TCHAR *buffer, const TCHA TCHAR *p = buffer + _tcslen(buffer); if (dp & 3) { + // indirect _stprintf(p, _T("[")); p += _tcslen(p); + } else { + // (an,dn,word/long) + if (name) { + _stprintf(p, _T("%s,"), name); + p += _tcslen(p); + } + if (dr[0]) { + _stprintf(p, _T("%s%s,"), dr, mult); + p += _tcslen(p); + } } if ((dp & 0x30) == 0x20) { // BD SIZE = 2 (WORD) @@ -2313,27 +2324,26 @@ static uaecptr ShowEA_disp(uaecptr *pcp, uaecptr base, TCHAR *buffer, const TCHA _stprintf(p, _T("%s,"), name); p += _tcslen(p); } - } - if (!(dp & 0x04)) { - if (dr[0]) { - _stprintf(p, _T("%s%s,"), dr, mult); - p += _tcslen(p); + if (!(dp & 0x04)) { + if (dr[0]) { + _stprintf(p, _T("%s%s,"), dr, mult); + p += _tcslen(p); + } } - } - if (dp & 3) { if (p[-1] == ',') p--; _stprintf(p, _T("],")); p += _tcslen(p); - } - if ((dp & 0x04)) { - if (dr[0]) { - _stprintf(p, _T("%s%s,"), dr, mult); - p += _tcslen(p); + if ((dp & 0x04)) { + if (dr[0]) { + _stprintf(p, _T("%s%s,"), dr, mult); + p += _tcslen(p); + } } + } if ((dp & 0x03) == 0x02) {