I've just been glancing at the source code, I don't know for sure, but adding a command should be reasonably straight forward. All of this is supposition, I don't know.
The first step is defining a TOKEN value for it. This is done around line 296, you can see all of the token values defined. It starts with TK_END, and a value of $80, then rest build incrementally from there.
Couple of issues that I don't know of the top of my head.
1) is there even any room for another token, I assume a token must start with the high bit set, and there are a lot of tokens here, so there may well not even be room for another token. I would run the assembly listing and then look for the value of TK_MIDS. If it's less than $FF, then you should have room. If not, then you'll need to remove something.
2) I don't know if the order of the tokens matter. I sense not, but I'm not sure. He has them broken up in to primary commands, secondary commands, operators, and functions. It appears to be simply organization, rather than architecture. In theory, to be consistent, you would insert TK_BYE after TK_NMI, and update the definition for TK_TAB. But I'm not sure if you MUST do this, since you're defining a primary command.
Code:
TK_BYE = TK_NMI+1
TK_TAB = TK_BYE+1
Moving on...
Next, you need to define the code that is invoked when the command is executed. These are identified by LAB_XXX labels. In your case, LAB_BYE would be appropriate. (Mind, LOTS of things are identified by LAB_XXX, but within that set are the actual command runtime routines.). Since your code is just an escape, it should be a straight forward JMP to some known place, or a BRK, or whatever, so you don't have to know anything about the actual BASIC runtime here. Just make sure you cold start BASIC if you try to come back, or you'd likely be in trouble.
You'd probably, again for consistency, put your code just before LAB_MAX, which comes after all of the interrupt code and runtime for LAB_NMI.
Next...
Add your runtime routine to the command table, at LAB_CTBL. This list is in TOKEN order, so, again, you would put your entry just after LAB_NMI, and it would look something like:
Code:
.word LAB_BYE-1
Continuing...
Add the command to the command text table. Since the name of your command is BYE, you would put this in the B section, identified by TAB_ASCB. These lists are ALPHABETICAL, but BYE is going to be at the end anyway, so add your entry after LBB_BITTST. It will look like:
Code:
LBB_BYE .byte "YE", TK_BYE ; BYE
Then...
Add the entry for the LIST command decode table at LBB_KEYT. This is in TOKEN order, so your entry will be after NMI, again, and will look like:
Code:
.byte 3,'B'
.word LBB_BYE
And that should be it.
Good luck, let us know if I guessed right. I only looked at this thing for a couple minutes.