From cdeaf05ccdeea7c7fa813592ba25967b65093822 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sat, 6 Jun 2020 22:23:24 +0200 Subject: [PATCH] fixed a bug preventing execution of multiple statements in the same line --- c64/basic/basic_execute_line.s | 73 +++++++++-------------- c64/basic/engine/end_of_statement_check.s | 2 + 2 files changed, 30 insertions(+), 45 deletions(-) diff --git a/c64/basic/basic_execute_line.s b/c64/basic/basic_execute_line.s index 3120eb63..d4cf88a0 100644 --- a/c64/basic/basic_execute_line.s +++ b/c64/basic/basic_execute_line.s @@ -2,62 +2,39 @@ // #LAYOUT# * BASIC_0 #TAKE // #LAYOUT# * * #IGNORE -// Jump back into the BASIC execute line loop -// after first checking that we have a colon -// or $00 char +// +// Tries to execute the statement, and all the subsequent ones +// basic_execute_statement: // Check for RUN/STOP + lda STKEY - bmi !+ - jmp cmd_stop + bpl_16 cmd_stop + + // Skip over any white spaces and colons (':') !: - // Skip over any white space and : - ldy #0 - -#if CONFIG_MEMORY_MODEL_60K - ldx #OLDTXT - // .byte $f0,OLDTXT - // .text ", STATEMENT PTR = $" - // .byte $f1,TXTPTR - // .byte $f0,TXTPTR - // .byte $d,0 - - // Go through the line until its end is reached. - // If we reach the end are in direct mode, then - // go back to reading input, else look for the - // next line, and advance to that, or else - // return to READY prompt because we have run out - // of program. - - // Get next char of program text, even if it is hiding under a ROM or the - // IO area. + // Check if end of the line - ldy #0 - -#if CONFIG_MEMORY_MODEL_60K - ldx #