From 97988f1c19d8ee0c9c6eba0e968c3bbdc3aba301 Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Tue, 23 Apr 2019 00:09:05 +0930 Subject: [PATCH] fix bugs in BASIC main loop --- c64/basic/basic_main_loop.s | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/c64/basic/basic_main_loop.s b/c64/basic/basic_main_loop.s index 636910c7..aeb5383a 100644 --- a/c64/basic/basic_main_loop.s +++ b/c64/basic/basic_main_loop.s @@ -7,7 +7,9 @@ basic_main_loop: ;; Read a line of input ldx #$00 read_line_loop: - jsr $ffe4 ; KERNAL CHRIN + jsr $ffcf ; KERNAL CHRIN + bcs read_line_loop + cmp #$0d beq got_line_of_input ;; Not carriage return, so try to append to line so far @@ -21,7 +23,12 @@ read_line_loop: inx jmp read_line_loop -got_line_of_input: +got_line_of_input: + + ;; Do printing of the new line + lda #$0d + jsr $ffd2 + jsr ready_message jmp basic_main_loop