fix bugs in BASIC main loop
This commit is contained in:
1 parent
03550ab786
commit
97988f1c19
1 file changed
+8
-1
@@ -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
|
||||||
@@ -22,6 +24,11 @@ read_line_loop:
|
|||||||
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
|
||||||
Reference in new issue
Block a user