mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
fix_autostart_square() now preserves X register correctly
This commit is contained in:
parent
def7e87151
commit
8ab47d3321
@ -21,12 +21,13 @@ sub home() {
|
|||||||
txt.chrout(19)
|
txt.chrout(19)
|
||||||
}
|
}
|
||||||
|
|
||||||
sub fix_autostart_square() {
|
asmsub fix_autostart_square() {
|
||||||
; Here's a possible work around for weird issue that prints a black character after first call to c64.PLOT()
|
; Here's a possible work around for weird issue that prints a black character after first call to c64.PLOT()
|
||||||
; if you're also using c64.CINT() yourself. The default prog8 program initialization (which calls CINT) already performs this workaround.
|
; if you're also using c64.CINT() yourself. The default prog8 program initialization (which calls CINT) already performs this workaround.
|
||||||
; The problem occurs when a program is autostarded in the emulator with -run -prg test.prg,
|
; The problem occurs when a program is autostarded in the emulator with -run -prg test.prg,
|
||||||
; or when the program is saved as AUTOBOOT.X16 and loaded on boot like that.
|
; or when the program is saved as AUTOBOOT.X16 and loaded on boot like that.
|
||||||
%asm {{
|
%asm {{
|
||||||
|
phx
|
||||||
sec
|
sec
|
||||||
jsr c64.PLOT
|
jsr c64.PLOT
|
||||||
clc
|
clc
|
||||||
@ -34,7 +35,9 @@ sub fix_autostart_square() {
|
|||||||
lda #' '
|
lda #' '
|
||||||
jsr c64.CHROUT ; overwrite the black square
|
jsr c64.CHROUT ; overwrite the black square
|
||||||
clc
|
clc
|
||||||
jmp c64.PLOT ; cursor back to original position
|
jsr c64.PLOT ; cursor back to original position
|
||||||
|
plx
|
||||||
|
rts
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user