]> git.sur5r.net Git - cc65/commitdiff
User linker generated symbols for stack placement (like most other targets) instead...
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 2 Oct 2010 10:32:26 +0000 (10:32 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 2 Oct 2010 10:32:26 +0000 (10:32 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4821 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/plus4/crt0.s

index f9e79db78675c3fafb46c04d27f9decc7e13038c..32596e6366bf882ec5e379597af9c704334b961f 100644 (file)
@@ -9,6 +9,8 @@
        .import         callirq_y, initlib, donelib
        .import         callmain, zerobss
        .import         __INTERRUPTOR_COUNT__
+       .import         __RAM_START__, __RAM_SIZE__     ; Linker generated
+       .import         __STACKSIZE__                   ; Linker generated
 
         .include        "zeropage.inc"
        .include        "plus4.inc"
@@ -65,9 +67,9 @@ L1:   lda     sp,x
                tsx
                stx     spsave          ; save system stk ptr
 
-        lda     #<$FD00
+        lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
         sta     sp
-        lda     #>$FD00
+        lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
         sta     sp+1
 
 ; Setup the IRQ vector in the banked RAM and switch off the ROM