fix bugs in BASIC main loop

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-23 00:09:05 +09:30
1 parent 03550ab786
commit 97988f1c19
1 file changed
+9 -2
+9 -2
View File
@@ -7,7 +7,9 @@ basic_main_loop:
;; Read a line of input ;; Read a line of input
ldx #$00 ldx #$00
read_line_loop: read_line_loop:
jsr $ffe4 ; KERNAL CHRIN jsr $ffcf ; KERNAL CHRIN
bcs read_line_loop
cmp #$0d cmp #$0d
beq got_line_of_input beq got_line_of_input
;; Not carriage return, so try to append to line so far ;; Not carriage return, so try to append to line so far
@@ -21,7 +23,12 @@ read_line_loop:
inx inx
jmp read_line_loop 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 jsr ready_message
jmp basic_main_loop jmp basic_main_loop