mirror of
https://github.com/cc65/cc65.git
synced 2026-01-22 17:16:21 +00:00
disable the basic interrupt before main(), fixes #2764
This commit is contained in:
@@ -65,6 +65,15 @@ L1: lda c_sp,x
|
||||
|
||||
jsr initlib
|
||||
|
||||
; Disable the BASIC part of the IRQ handler. It would usually (once per frame)
|
||||
; copy the VIC shadow register, move sprites, play music. This would only get
|
||||
; in the way, so we turn it off.
|
||||
|
||||
lda INIT_STATUS
|
||||
sta initsave
|
||||
and #$fe
|
||||
sta INIT_STATUS
|
||||
|
||||
; Set the bank for the file name to our execution bank. We must do this
|
||||
; *after* calling the constructors because some of them might depend on
|
||||
; the original value of this register.
|
||||
@@ -89,6 +98,11 @@ L2: lda zpsave,x
|
||||
dex
|
||||
bpl L2
|
||||
|
||||
; Enable the BASIC interrupt again
|
||||
|
||||
lda initsave
|
||||
sta INIT_STATUS
|
||||
|
||||
; Place the program return code into BASIC's status variable.
|
||||
|
||||
pla
|
||||
@@ -116,5 +130,6 @@ zpsave: .res zpspace
|
||||
|
||||
.bss
|
||||
|
||||
spsave: .res 1
|
||||
mmusave:.res 1
|
||||
spsave: .res 1
|
||||
mmusave: .res 1
|
||||
initsave: .res 1
|
||||
|
||||
Reference in New Issue
Block a user