From bf63cf3d53a81a3f26a2a77dba3c3915fc4b10fa Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Wed, 20 May 2020 10:02:15 -0700 Subject: [PATCH] Start on cleanup of tab stops --- source/Debugger/Debugger_Display.cpp | 16 ++++++++++++++++ source/Debugger/Debugger_Display.h | 22 +++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/source/Debugger/Debugger_Display.cpp b/source/Debugger/Debugger_Display.cpp index 0507b6e8..2e170da9 100644 --- a/source/Debugger/Debugger_Display.cpp +++ b/source/Debugger/Debugger_Display.cpp @@ -67,6 +67,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Font FontConfig_t g_aFontConfig[ NUM_FONTS ]; +// Tabstops -- See TabStops_e + static int aDisasmTabStopsMaster[ NUM_TAB_STOPS ] = + { 5, 14, 26, 30, 41, 48, 49, 51, 54, 59, 62 }; + + int g_aDisasmTabStops[ NUM_TAB_STOPS ] = + { 5, 14, 26, 30, 41, 48, 49, 51, 54, 59, 62 }; + + // sAddress, sOpcodes, sTarget, sTargetOffset, nTargetOffset, sTargetPointer, sTargetValue, sImmediate, nImmediate, sBranch ); + //> Address Seperator Opcodes Label Mnemonic Target [Immediate] [Branch] + // + //> xxxx: xx xx xx LABEL MNEMONIC 'E' = + //> ^ ^ ^ ^ ^ + //> 6 17 27 41 46 + + static int g_aDisasmTabStopsPixels[ NUM_TAB_STOPS ]; + // Private ________________________________________________________________________________________ char g_aDebuggerVirtualTextScreen[ DEBUG_VIRTUAL_TEXT_HEIGHT ][ DEBUG_VIRTUAL_TEXT_WIDTH ]; diff --git a/source/Debugger/Debugger_Display.h b/source/Debugger/Debugger_Display.h index ae7d11c8..7e938d5e 100644 --- a/source/Debugger/Debugger_Display.h +++ b/source/Debugger/Debugger_Display.h @@ -48,8 +48,28 @@ { DISPLAY_HEIGHT = 384, MAX_DISPLAY_LINES = DISPLAY_HEIGHT / CONSOLE_FONT_HEIGHT, + MAX_ADDRESS_HISTORY = 32 }; - + + enum TabStop_e + { // First set of tab stops are dynamic + TS_OPCODE + , TS_LABEL + , TS_INSTRUCTION + , TS_TARGET + , TS_EFFECTIVE_ADDRESS // Effective Address : Preview Byte + , TS_BRANCH // Branch Indicator + , TS_CHAR // Preview (and Immediate) Char + , _NUM_TAB_STOPS + // Second set of tab stops are static + , TS_REG_NAME = _NUM_TAB_STOPS + , TS_REG_CHAR + , TS_REG_HEX + , TS_BREAKPOINT + , NUM_TAB_STOPS + }; + extern int g_aDisasmTabStops[ NUM_TAB_STOPS ]; + int GetConsoleTopPixels( int y ); extern FontConfig_t g_aFontConfig[ NUM_FONTS ];