From 2a91824873889b2b8f228475ceee5adfaea70c59 Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Sun, 8 Jan 2023 12:02:53 -0800 Subject: [PATCH 1/2] Debugger 2.9.1.14 Fix disassembly when in middle of data --- docs/Debugger_Changelog.txt | 7 +++++++ source/Debugger/Debug.cpp | 2 +- source/Debugger/Debugger_Assembler.cpp | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/Debugger_Changelog.txt b/docs/Debugger_Changelog.txt index 0930a155..840756cd 100644 --- a/docs/Debugger_Changelog.txt +++ b/docs/Debugger_Changelog.txt @@ -1,4 +1,11 @@ /* +2.9.1.14 Fix disassembly when in middle of data + Example: + ASC 7D0:7D7 + ASC 7D8:7DF + 7CF:EA 40 41 42 43 44 45 46 47 48 + U 7D7 + 2.9.1.13 Added: CD now detects ".." to change to the previous directory and chops the trailing sub-directory from the current path. It worked before but would clutter up the current directory with a trailing "..\". 2.9.1.12 Added: New commands HGR0, HGR3, HGR4, HGR5 to see pseudo pages $00, $60, $80, $A0 respectively. diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index c037e509..88bf45be 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define ALLOW_INPUT_LOWERCASE 1 // See /docs/Debugger_Changelog.txt for full details - const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,13); + const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,14); // Public _________________________________________________________________________________________ diff --git a/source/Debugger/Debugger_Assembler.cpp b/source/Debugger/Debugger_Assembler.cpp index 09217f7a..4724ec57 100644 --- a/source/Debugger/Debugger_Assembler.cpp +++ b/source/Debugger/Debugger_Assembler.cpp @@ -498,7 +498,10 @@ int _6502_GetOpmodeOpbyte ( const int nBaseAddress, int & iOpmode_, int & nOpby if ( pData_ ) *pData_ = pData; - nSlack = pData->nEndAddress - pData->nStartAddress + 1; // *inclusive* KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes() + const DWORD nStartAddress = pData->nStartAddress; + const DWORD nEndAddress = pData->nEndAddress; + const int nDisplayLen = nEndAddress - nBaseAddress + 1; // *inclusive* KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes() + nSlack = nDisplayLen; // Data Disassembler // Smart Disassembly - Data Section From d5329228213a9738badbe530ed0b3fc0f5474794 Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Sun, 8 Jan 2023 12:48:25 -0800 Subject: [PATCH 2/2] Remove unused var nStartAddress --- source/Debugger/Debugger_Assembler.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/source/Debugger/Debugger_Assembler.cpp b/source/Debugger/Debugger_Assembler.cpp index 4724ec57..61c42420 100644 --- a/source/Debugger/Debugger_Assembler.cpp +++ b/source/Debugger/Debugger_Assembler.cpp @@ -498,7 +498,6 @@ int _6502_GetOpmodeOpbyte ( const int nBaseAddress, int & iOpmode_, int & nOpby if ( pData_ ) *pData_ = pData; - const DWORD nStartAddress = pData->nStartAddress; const DWORD nEndAddress = pData->nEndAddress; const int nDisplayLen = nEndAddress - nBaseAddress + 1; // *inclusive* KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes() nSlack = nDisplayLen;