]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix (an,dn,xxxx.w/.l) disassembly.
authorToni Wilen <twilen@winuae.net>
Fri, 29 Mar 2019 17:40:48 +0000 (19:40 +0200)
committerToni Wilen <twilen@winuae.net>
Fri, 29 Mar 2019 17:40:48 +0000 (19:40 +0200)
newcpu.cpp

index ca354a8b1d228f9365128c77c530eb115349710e..47eeacd2cdaebf4569382f6b109e46678887f304 100644 (file)
@@ -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) {