| Purpose: | There are some default Command Extensions which came with the MIRTOS Operating System. They may be removed, replaced, recoded, or recovered. This is the source code to use as a suggested starting point for all of those operations. |
| Assumes: | This subroutine is called by MIRTOS immediately before
passing control to the default command handler. This subroutine returns a FLAG which causes the default routine to either process the command normally or understand that it need do no further processing. The system's default Parsing Buffer may or may not be the buffer to process (i.e., it could be on the stack or anywhere else in the SRAM.) |
| Passed: | R31:R30 | WORD * | wPtrMyAddress | The ICALL address used to reach this subroutine |
| R29:R28 | BYTE * | bPtrUVars | pointer to *uVars.B[0] | |
| R27:R26 | BYTE * | bPtrBuffer | pointer to the text buffer being parsed, formatted as: the buffered BYTE count in the first BYTE, then the ASCIIz text string (command buffer) follows it |
|
| R23 | CHAR | cBuffer3 | third buffered character, uppercase (but may be 0) | |
| R22 | CHAR | cBuffer2 | second buffered character, uppercase (but may be 0) | |
| R21 | CHAR | cCommand | first buffered character, uppercase; the command BYTE | |
| R20 | BYTE | bStrlen | string length, or buffered BYTE count | |
| R19:R18 | WORD * | wPtrHandler | the WORD address of that command's default handler | |
| Returns: | FLAGS | ZERO | flag | TRUE if the command was NOT handled (so process as usual), or FALSE if it was handled (so skip the default processing) |
| Alters: | If it is desired that the default command processor handle the command the usual way (i.e., not intercepted), the only changes that can be safely made are to the FLAGS, R0, R18, R19, R24 and R25. When no further system command processing is to be done, all of those plus R20 to R23, R30 and R31 may be changed without consequence. Note that these are simply the customary register usage rules for subroutines, so save and restore the state of all other Registers (R1 to R16, R29:R28, SPH and SPL) which are used. | |||
| Code: | ExtBaseline.Asm | |||
| Notes: | The first instruction upon return from this routine is a BRNE to the EXIT, so if the ZERO flag is cleared, the Operating System will skip the predefined processing. | |||
| Also see: | - | |||