1
0
mirror of https://github.com/cc65/cc65.git synced 2025-04-12 00:37:12 +00:00

don't use constructor to setup runtime stack

git-svn-id: svn://svn.cc65.org/cc65/trunk@4479 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cpg 2009-11-23 22:06:32 +00:00
parent fa25cc732f
commit 7357b44104

View File

@ -9,7 +9,6 @@
.export _exit
.export __STARTUP__ : absolute = 1 ; Mark as startup
.constructor initsp, 26
.import initlib, donelib, callmain
.import zerobss, pushax
@ -68,9 +67,11 @@ L1: lda sp,x
lda MEMTOP
sbc #<__RESERVED_MEMORY__
sta APPMHI ; initialize our APPMHI value
sta sp ; setup runtime stack part 1
lda MEMTOP+1
sbc #>__RESERVED_MEMORY__
sta APPMHI+1
sta sp+1 ; setup runtime stack part 2
; Call module constructors
@ -143,17 +144,6 @@ L2: lda zpsave,x
; *** end of main startup code
; setup sp
.segment "INIT"
initsp:
lda APPMHI
sta sp
lda APPMHI+1
sta sp+1
rts
.segment "ZPSAVE"
zpsave: .res zpspace