fix bugs with chrout to make work with BASIC
This commit is contained in:
1 parent
e80df3ff53
commit
63645c8ef8
1 file changed
+5
-3
+5
-3
@@ -12,12 +12,13 @@ chrout:
|
|||||||
tya
|
tya
|
||||||
pha
|
pha
|
||||||
lda last_printed_character_ascii
|
lda last_printed_character_ascii
|
||||||
|
tax
|
||||||
|
|
||||||
;; Write character on the screen
|
;; Write character on the screen
|
||||||
ldy current_screen_x
|
ldy current_screen_x
|
||||||
|
|
||||||
;; Carriage return
|
;; Carriage return
|
||||||
cmp #$0d
|
cmp #$0d
|
||||||
beq screen_advance_to_next_line
|
beq screen_advance_to_next_line
|
||||||
|
|
||||||
;; Clear screen
|
;; Clear screen
|
||||||
@@ -52,12 +53,13 @@ chrout_l1:
|
|||||||
jmp screen_advance_to_next_line
|
jmp screen_advance_to_next_line
|
||||||
no_screen_advance_to_next_line:
|
no_screen_advance_to_next_line:
|
||||||
chrout_done:
|
chrout_done:
|
||||||
;; Restore X and Y
|
;; Restore X and Y, set carry to mark success on exit
|
||||||
pla
|
pla
|
||||||
tay
|
tay
|
||||||
pla
|
pla
|
||||||
tax
|
tax
|
||||||
|
lda last_printed_character_ascii
|
||||||
|
clc ; indicate success
|
||||||
rts
|
rts
|
||||||
|
|
||||||
screen_grow_logical_line:
|
screen_grow_logical_line:
|
||||||
|
|||||||
Reference in new issue
Block a user