changeset 38:ef961e1c30cb

Detect tokens in interpretation loop correctly The next char routine loses the N flag so a TST is required to actually check if bit 7 is set or not.
author William Astle <lost@l-w.ca>
date Mon, 21 Nov 2022 22:56:24 -0700
parents ac52753bacfc
children e956d8b6e806
files src/lwbasic.s
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lwbasic.s	Mon Nov 21 22:54:25 2022 -0700
+++ b/src/lwbasic.s	Mon Nov 21 22:56:24 2022 -0700
@@ -1074,6 +1074,7 @@
 interpret2      stx inputptr
 interpret3      jsr nextchar                    ; fetch first character of next statement
                 beq interpret                   ; brif end of statement - do the next statement dance
+                tsta                            ; set flags properly for token
                 lbpl cmd_let                    ; brif no command - do assignment (LET command is optional)
                 ldx #primaryjump                ; point to jump table
                 anda #0x7f                      ; lose bit 7