Mercurial > hg > index.cgi
changeset 47:b98c01cd3377
Add routine to throw syntax error if input character doesn't match
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 10 Dec 2022 00:19:53 -0700 |
parents | 8d9345b6d3a9 |
children | 39275fdc7c0b |
files | src/lwbasic.s |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lwbasic.s Fri Dec 09 22:46:53 2022 -0700 +++ b/src/lwbasic.s Sat Dec 10 00:19:53 2022 -0700 @@ -1237,6 +1237,12 @@ leax -1,x ; move back before start of code stream bra interpret2 ; go interpret this statement and then continue with stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Check for character in B and raise a syntax error if not found at current input pointer. If it is found, fetch the +; next input character. +syncheckb cmpb [inputptr] ; do we have a syntax match? + bne SNERROR ; brif not + jmp nextchar ; return next input character +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; The END command. cmd_end bne SNERROR ; error out if there is an argument ;jsr closeall ; close all files for END