]> git.sur5r.net Git - cc65/commitdiff
don't use constructor to setup runtime stack
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 23 Nov 2009 22:06:32 +0000 (22:06 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 23 Nov 2009 22:06:32 +0000 (22:06 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4479 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/crt0.s

index 0f0a5d77adcc26c954a76497178b33701d999160..53caf0e4c5a3f317ec3f78a1b61e7e03260f4e9a 100644 (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