From f439cb0a837da3c99d60483e24985d7ca38691cc Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Mon, 29 Apr 2019 23:21:46 +0930 Subject: [PATCH] correctly detect end of program --- c64/basic/basic_execute_line.s | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/c64/basic/basic_execute_line.s b/c64/basic/basic_execute_line.s index 86c26936..f3ab8659 100644 --- a/c64/basic/basic_execute_line.s +++ b/c64/basic/basic_execute_line.s @@ -27,9 +27,19 @@ no_space_to_skip: rts basic_execute_statement: + ;; Skip over any white space and : jsr basic_end_of_statement_check + ;; jsr printf + ;; .byte "LINE PTR = $" + ;; .byte $f1,basic_current_line_ptr + ;; .byte $f0,basic_current_line_ptr + ;; .byte ", STATEMENT PTR = $" + ;; .byte $f1,basic_current_statement_ptr + ;; .byte $f0,basic_current_statement_ptr + ;; .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 @@ -42,6 +52,8 @@ basic_execute_statement: ldx #