1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +00:00

Set FNAM_BANK *after* calling constructors

git-svn-id: svn://svn.cc65.org/cc65/trunk@2989 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2004-04-28 09:47:57 +00:00
parent 657f495500
commit 6aae136a00

View File

@ -50,11 +50,6 @@ Head: .word @Next
lda #14
jsr BSOUT
; Set the bank for the file name our execution bank
lda #0
sta FNAM_BANK
; Before doing anything else, we have to setup our banking configuration.
; Otherwise just the lowest 16K are actually RAM. Writing through the ROM
; to the underlying RAM works, but it is bad style.
@ -93,6 +88,13 @@ L1: lda sp,x
jsr initlib
; Set the bank for the file name to our execution bank. We must do this,
; *after* calling constructors, because some of them may depend on the
; original value of this register.
lda #0
sta FNAM_BANK
; If we have IRQ functions, chain our stub into the IRQ vector
lda #<__IRQFUNC_COUNT__