Mercurial > hg > index.cgi
changeset 45:952bfb5c76fb
Add PRINT stub routine and make tokenization handle ? shortcut
author | William Astle <lost@l-w.ca> |
---|---|
date | Fri, 09 Dec 2022 22:24:11 -0700 |
parents | c04068c37316 |
children | 8d9345b6d3a9 |
files | src/lwbasic.s |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lwbasic.s Fri Dec 09 22:17:34 2022 -0700 +++ b/src/lwbasic.s Fri Dec 09 22:24:11 2022 -0700 @@ -1292,6 +1292,9 @@ prompt fcn 'OK' ; general prompt breakmsg fcn 'BREAK' ; "BREAK" message ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; PRINT command +cmd_print rts +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Error messages ; ; Each error begins with a deferr macro invocation which will define a symbol err_slug with the next error number @@ -1379,7 +1382,11 @@ beq tokenize2 ; brif so - stash it unmodified tst 1,s ; are we "in data"? bne tokenize2 ; brif so - don't tokenize it - cmpa #'' ; ' shortcut for remark? + cmpa #'? ; PRINT shortcut? + bne tokenize6a ; brif not + lda #tok_print ; load token for PRINT + bra tokenize2 ; move stash it and move on +tokenize6a cmpa #'' ; ' shortcut for remark? bne tokenize9 ; brif not ldd #':*256+tok_apos ; put token for ' and an implied colon std ,y++ ; stash it @@ -1511,6 +1518,7 @@ defcmd 'STOP',stop defcmd 'LET',let defcmd 'NEW',new + defcmd 'PRINT',print primarydict cmdtab secondarydict functab primaryjump cmdjump