changeset 34:7111bc587420

Enable default LET command with stub handler
author William Astle <lost@l-w.ca>
date Mon, 21 Nov 2022 22:29:06 -0700
parents 317b81c81808
children 336be9cef342
files src/lwbasic.s
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lwbasic.s	Mon Nov 21 22:25:44 2022 -0700
+++ b/src/lwbasic.s	Mon Nov 21 22:29:06 2022 -0700
@@ -1071,7 +1071,7 @@
 interpret2      stx inputptr
 interpret3      jsr nextchar                    ; fetch first character of next statement
                 beq interpret                   ; brif end of statement - do the next statement dance
-                ;lbpl cmd_let                    ; brif no command - do assignment (LET command is optional)
+                lbpl cmd_let                    ; brif no command - do assignment (LET command is optional)
                 ldx #primaryjump                ; point to jump table
                 anda #0x7f                      ; lose bit 7
                 leax a,x                        ; get half way to the correct offset
@@ -1164,6 +1164,9 @@
                 deferr sn
                 fcn 'Syntax error'
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; The LET command which is the default if no token begins a statement
+cmd_let         jmp SNERROR                     ; not yet implemented
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Set carry if upper/lower case alpha
 setcifalpha     cmpa #'z+1                      ; is it above lower case Z?
                 bhs setcifalpha0                ; brif so, C clear
@@ -1354,6 +1357,7 @@
                 defcmd 'ELSE',else
                 defcmd 'END',end
                 defcmd 'STOP',stop
+                defcmd 'LET',let
 primarydict     cmdtab
 secondarydict   functab
 primaryjump     cmdjump