Compare commits
2 Commits
v0.1.0
...
c9b665d509
Author | SHA1 | Date | |
---|---|---|---|
c9b665d509 | |||
3943b5502a
|
@@ -25,7 +25,7 @@ int main(void) {
|
|||||||
; Copyright (c) 2025 Gale Faraday\n\
|
; Copyright (c) 2025 Gale Faraday\n\
|
||||||
; Licensed under MIT\n\
|
; Licensed under MIT\n\
|
||||||
\n\
|
\n\
|
||||||
; This file generated by bbmkcmds.c\n\
|
; This file generated by bbmkhash.c\n\
|
||||||
\n\
|
\n\
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\
|
||||||
;;\n\
|
;;\n\
|
||||||
@@ -40,10 +40,10 @@ int main(void) {
|
|||||||
|
|
||||||
/* Command count.
|
/* Command count.
|
||||||
* NOTE: This is a u16 because it gets emitted into the output assembly. */
|
* NOTE: This is a u16 because it gets emitted into the output assembly. */
|
||||||
uint16_t cCmds = sizeof(s_ppszCmds) / sizeof(char *);
|
uint16_t cCmds = sizeof(s_ppszCmds) / sizeof(char *);
|
||||||
|
|
||||||
/* Emit command count */
|
/* Emit command count */
|
||||||
printf("BBCHTC\n fdb $%.4X\n", cCmds);
|
printf("BBCHTC\n fdb $%.4X\n", cCmds);
|
||||||
|
|
||||||
/* Emit table data */
|
/* Emit table data */
|
||||||
puts("\nBBCHT");
|
puts("\nBBCHT");
|
||||||
|
30
src/buzbee.s
30
src/buzbee.s
@@ -40,13 +40,14 @@ BBVAR tagbbvar
|
|||||||
EXPORT BUZBEE
|
EXPORT BUZBEE
|
||||||
|
|
||||||
BUZBEE
|
BUZBEE
|
||||||
lbsr NEWLINE ; Setup the new input line and handle display.
|
lbsr NEWLINE ; Setup the new input line and handle display.
|
||||||
bsr INPLOOP ; Fill input buffer.
|
bsr INPLOOP ; Fill input buffer.
|
||||||
cmpy #0 ; No data?
|
cmpy #0 ; No data?
|
||||||
beq BUZBEE ; Try again...
|
beq BUZBEE ; Try again...
|
||||||
lbsr TOKENIZE ; Try to tokenize the input buffer
|
lbsr MKINSENSITIVE ; Make the input buffer case insensitive
|
||||||
lbsr RUNIF ; Execute token buffer, handling any errors
|
lbsr TOKENIZE ; Try to tokenize the input buffer
|
||||||
bra BUZBEE ; Repeat
|
lbsr RUNIF ; Execute token buffer, handling any errors
|
||||||
|
bra BUZBEE ; Repeat
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
@@ -127,6 +128,21 @@ NEXT@
|
|||||||
ldy #0 ; Reset buffer fill pointer
|
ldy #0 ; Reset buffer fill pointer
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
; Makes the input buffer case insensitive
|
||||||
|
MKINSENSITIVE
|
||||||
|
NEXTC@
|
||||||
|
lda BBVAR.input,x
|
||||||
|
cmpa #'z ; Is the char outside the lowercase range?
|
||||||
|
bhi NOTLCASE@ ; Yes? Skip offset part
|
||||||
|
cmpa #'a ; Again on the other side of the range
|
||||||
|
blo NOTLCASE@
|
||||||
|
anda #$DF ; -32
|
||||||
|
NOTLCASE@
|
||||||
|
leax 1,x ; Ready next char
|
||||||
|
cmpx BBVAR.cchinput ; Are we at the end?
|
||||||
|
bne NEXTC@ ; No? Loop
|
||||||
|
rts
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; Hex Conversion and Printing Routines
|
;; Hex Conversion and Printing Routines
|
||||||
|
Reference in New Issue
Block a user