From 7357b44104017916ec02600fdb15ea41df6198c0 Mon Sep 17 00:00:00 2001 From: cpg Date: Mon, 23 Nov 2009 22:06:32 +0000 Subject: [PATCH] don't use constructor to setup runtime stack git-svn-id: svn://svn.cc65.org/cc65/trunk@4479 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/atari/crt0.s | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index 0f0a5d77a..53caf0e4c 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -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 -- 2.39.5