feat(buzbee): add command token parsing interface, and help message, added newlines to messages

This commit is contained in:
2025-10-03 22:38:13 -05:00
parent eda7b3ac1f
commit 893753561c
3 changed files with 97 additions and 25 deletions

View File

@@ -36,18 +36,18 @@ int main(void) {
\n\
SECTION BBHASHES\n\
\n\
EXPORT BBHASHLEN\n\
EXPORT BBHASHES\n");
EXPORT BBCHTC\n\
EXPORT BBCHT\n");
/* Command count.
* NOTE: This is a u16 because it gets emitted into the output assembly. */
uint16_t cCmds = sizeof(s_ppszCmds) / sizeof(char *);
/* Emit command count */
printf("BBHASHLEN\n fdb $%.4X\n", cCmds);
printf("BBCHTC\n fdb $%.4X\n", cCmds);
/* Emit table data */
puts("\nBBHASHES");
puts("\nBBCHT");
for (int iCmd = 0; iCmd < cCmds; iCmd++) {
uint8_t uHash = mkHash(s_ppszCmds[iCmd]);
printf(" fcb $%.2X\n", uHash);