Triggered when ENTER is pressed, or via script ===========================================================================
| 9588 | // Triggered when ENTER is pressed, or via script |
| 9589 | //=========================================================================== |
| 9590 | Update_t DebuggerProcessCommand ( const bool bEchoConsoleInput ) |
| 9591 | { |
| 9592 | Update_t bUpdateDisplay = UPDATE_NOTHING; |
| 9593 | |
| 9594 | if (bEchoConsoleInput) |
| 9595 | ConsoleDisplayPush( ConsoleInputPeek() ); |
| 9596 | |
| 9597 | if (g_bAssemblerInput) |
| 9598 | { |
| 9599 | if (g_nConsoleInputChars) |
| 9600 | { |
| 9601 | ParseInput( g_pConsoleInput, false ); // Don't cook the args |
| 9602 | bUpdateDisplay |= _CmdAssemble( g_nAssemblerAddress, 0, g_nArgRaw ); |
| 9603 | } |
| 9604 | else |
| 9605 | { |
| 9606 | AssemblerOff(); |
| 9607 | |
| 9608 | int nDelayedTargets = AssemblerDelayedTargetsSize(); |
| 9609 | if (nDelayedTargets) |
| 9610 | { |
| 9611 | ConsoleDisplayPushFormat( " Asm: %d sym declared, not defined", nDelayedTargets ); |
| 9612 | bUpdateDisplay |= UPDATE_CONSOLE_DISPLAY; |
| 9613 | } |
| 9614 | } |
| 9615 | ConsoleInputReset(); |
| 9616 | bUpdateDisplay |= UPDATE_CONSOLE_DISPLAY | UPDATE_CONSOLE_INPUT; |
| 9617 | ConsoleUpdate(); // udpate console, don't pause |
| 9618 | } |
| 9619 | else |
| 9620 | if (g_nConsoleInputChars) |
| 9621 | { |
| 9622 | // BufferedInputPush( |
| 9623 | // Handle Buffered Input |
| 9624 | // while ( BufferedInputPeek() ) |
| 9625 | int nArgs = ParseInput( g_pConsoleInput ); |
| 9626 | if (nArgs == ARG_SYNTAX_ERROR) |
| 9627 | { |
| 9628 | bUpdateDisplay |= ConsoleDisplayErrorFormat( "Syntax error: %s", g_aArgs[0].sArg ); |
| 9629 | } |
| 9630 | else |
| 9631 | { |
| 9632 | bUpdateDisplay |= ExecuteCommand( nArgs ); // ParseInput()); |
| 9633 | } |
| 9634 | |
| 9635 | if (!g_bConsoleBufferPaused) |
| 9636 | { |
| 9637 | ConsoleInputReset(); |
| 9638 | } |
| 9639 | } |
| 9640 | |
| 9641 | return bUpdateDisplay; |
| 9642 | } |
| 9643 | |
| 9644 | void ToggleFullScreenConsole () |
| 9645 | { |
no test coverage detected