diff --git a/AppleWin/source/Debugger_Help.cpp b/AppleWin/source/Debugger_Help.cpp index 285f9bb3..6a9d11e4 100644 --- a/AppleWin/source/Debugger_Help.cpp +++ b/AppleWin/source/Debugger_Help.cpp @@ -212,17 +212,23 @@ Update_t CmdHelpSpecific (int nArgs) int nFoundCategory = FindParam( g_aArgs[ iArg ].sArg, MATCH_FUZZY, iParam, _PARAM_HELPCATEGORIES_BEGIN, _PARAM_HELPCATEGORIES_END ); switch( iParam ) { - case PARAM_CAT_BREAKPOINTS: iCmdBegin = CMD_BREAKPOINT ; iCmdEnd = CMD_BREAKPOINT_SAVE + 1; break; - case PARAM_CAT_CONFIG : iCmdBegin = CMD_CONFIG_COLOR ; iCmdEnd = CMD_CONFIG_SAVE + 1; break; - case PARAM_CAT_CPU : iCmdBegin = CMD_ASSEMBLE ; iCmdEnd = CMD_TRACE_LINE + 1; break; - case PARAM_CAT_FLAGS : iCmdBegin = CMD_FLAG_CLEAR ; iCmdEnd = CMD_FLAG_SET_N + 1; break; - case PARAM_CAT_MEMORY : iCmdBegin = CMD_MEMORY_COMPARE ; iCmdEnd = CMD_MEMORY_FILL + 1; break; - case PARAM_CAT_SYMBOLS : iCmdBegin = CMD_SYMBOLS_LOOKUP ; iCmdEnd = CMD_SYMBOLS_LIST + 1; break; - case PARAM_CAT_WATCHES : iCmdBegin = CMD_WATCH_ADD ; iCmdEnd = CMD_WATCH_LIST + 1; break; - case PARAM_CAT_WINDOW : iCmdBegin = CMD_WINDOW ; iCmdEnd = CMD_WINDOW_OUTPUT + 1; break; - case PARAM_CAT_ZEROPAGE : iCmdBegin = CMD_ZEROPAGE_POINTER; iCmdEnd = CMD_ZEROPAGE_POINTER_SAVE+1;break; + case PARAM_CAT_BOOKMARKS : iCmdBegin = CMD_BOOKMARK_MENU ; iCmdEnd = CMD_BOOKMARK_SAVE ; break; + case PARAM_CAT_BREAKPOINTS: iCmdBegin = CMD_BREAKPOINT ; iCmdEnd = CMD_BREAKPOINT_SAVE ; break; + case PARAM_CAT_CONFIG : iCmdBegin = CMD_CONFIG_COLOR ; iCmdEnd = CMD_CONFIG_SAVE ; break; + case PARAM_CAT_CPU : iCmdBegin = CMD_ASSEMBLE ; iCmdEnd = CMD_UNASSEMBLE ; break; + case PARAM_CAT_FLAGS : iCmdBegin = CMD_FLAG_CLEAR ; iCmdEnd = CMD_FLAG_SET_N ; break; + case PARAM_CAT_HELP : iCmdBegin = CMD_HELP_LIST ; iCmdEnd = CMD_MOTD ; break; + case PARAM_CAT_MEMORY : iCmdBegin = CMD_MEMORY_COMPARE ; iCmdEnd = CMD_MEMORY_FILL ; break; + case PARAM_CAT_OUTPUT : iCmdBegin = CMD_OUTPUT_CALC ; iCmdEnd = CMD_OUTPUT_RUN ; break; + case PARAM_CAT_REGISTERS : iCmdBegin = CMD_REGISTER_SET ; iCmdEnd = CMD_REGISTER_SET ; break; + case PARAM_CAT_SYMBOLS : iCmdBegin = CMD_SYMBOLS_LOOKUP ; iCmdEnd = CMD_SYMBOLS_LIST ; break; + case PARAM_CAT_WATCHES : iCmdBegin = CMD_WATCH_ADD ; iCmdEnd = CMD_WATCH_LIST ; break; + case PARAM_CAT_WINDOW : iCmdBegin = CMD_WINDOW ; iCmdEnd = CMD_WINDOW_OUTPUT ; break; + case PARAM_CAT_ZEROPAGE : iCmdBegin = CMD_ZEROPAGE_POINTER; iCmdEnd = CMD_ZEROPAGE_POINTER_SAVE;break; default: break; } + if (iCmdEnd) + iCmdEnd++; nNewArgs = (iCmdEnd - iCmdBegin); if (nNewArgs > 0) break; @@ -294,9 +300,12 @@ Update_t CmdHelpSpecific (int nArgs) int iCmd = g_aCommands[ iCommand ].iCommand; // Unaliased command // HACK: Major kludge to display category!!! - if (iCmd <= CMD_TRACE_LINE) + if (iCmd <= CMD_UNASSEMBLE) wsprintf( sCategory, "Main" ); else + if (iCmd <= CMD_BOOKMARK_SAVE) + wsprintf( sCategory, "Bookmark" ); + else if (iCmd <= CMD_BREAKPOINT_SAVE) wsprintf( sCategory, "Breakpoint" ); else @@ -318,6 +327,9 @@ Update_t CmdHelpSpecific (int nArgs) if (iCmd <= CMD_MEMORY_FILL) wsprintf( sCategory, "Memory" ); else + if (iCmd <= CMD_OUTPUT_RUN) + wsprintf( sCategory, "Output" ); + else if (iCmd <= CMD_REGISTER_SET) wsprintf( sCategory, "Registers" ); else @@ -448,6 +460,24 @@ Update_t CmdHelpSpecific (int nArgs) ConsoleBufferPush( TEXT(" Traces into current instruction") ); ConsoleBufferPush( TEXT(" with cycle counting." ) ); break; + // Bookmarks + case CMD_BOOKMARK_MENU: + case CMD_BOOKMARK_ADD: + ConsoleBufferPush( TEXT(" Usage: #
") ); + ConsoleBufferPush( TEXT(" Add specified bookmark.") ); + wsprintf( sText, TEXT(" i.e. %s 1 RESET" ), pCommand->m_sName ); + ConsoleBufferPush( sText ); + break; + case CMD_BOOKMARK_CLEAR: + ConsoleBufferPush( TEXT(" Usage: [# | *]") ); + ConsoleBufferPush( TEXT(" Clears specified bookmark, or all.") ); + wsprintf( sText, TEXT(" i.e. %s 1" ), pCommand->m_sName ); + ConsoleBufferPush( sText ); + break; + case CMD_BOOKMARK_LIST: + case CMD_BOOKMARK_LOAD: + case CMD_BOOKMARK_SAVE: + break; // Breakpoints case CMD_BREAKPOINT: wsprintf( sText, " Maximum breakpoints: %d", MAX_BREAKPOINTS ); @@ -523,7 +553,7 @@ Update_t CmdHelpSpecific (int nArgs) wsprintf( sText, TEXT(" Usage: [%s | %s | %s | %s | %s]") , g_aParameters[ PARAM_CONFIG_BRANCH ].m_sName - , g_aParameters[ PARAM_CONFIG_COLON ].m_sName + , g_aParameters[ PARAM_CONFIG_COLON ].m_sName , g_aParameters[ PARAM_CONFIG_OPCODE ].m_sName , g_aParameters[ PARAM_CONFIG_SPACES ].m_sName , g_aParameters[ PARAM_CONFIG_TARGET ].m_sName ); @@ -642,10 +672,55 @@ Update_t CmdHelpSpecific (int nArgs) ConsoleBufferPush( TEXT(" Where the form is .