feat(buzbee): made BUZBEE command line case insensitive
This commit is contained in:
16
src/buzbee.s
16
src/buzbee.s
@@ -44,6 +44,7 @@ BUZBEE
|
||||
bsr INPLOOP ; Fill input buffer.
|
||||
cmpy #0 ; No data?
|
||||
beq BUZBEE ; Try again...
|
||||
lbsr MKINSENSITIVE ; Make the input buffer case insensitive
|
||||
lbsr TOKENIZE ; Try to tokenize the input buffer
|
||||
lbsr RUNIF ; Execute token buffer, handling any errors
|
||||
bra BUZBEE ; Repeat
|
||||
@@ -127,6 +128,21 @@ NEXT@
|
||||
ldy #0 ; Reset buffer fill pointer
|
||||
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
|
||||
|
Reference in New Issue
Block a user