]> git.sur5r.net Git - cc65/commitdiff
consider __STACKSIZE__ when initializing sp for atarixl
authorChristian Groessler <chris@groessler.org>
Tue, 17 Sep 2013 21:03:33 +0000 (23:03 +0200)
committerChristian Groessler <chris@groessler.org>
Tue, 17 Sep 2013 21:03:33 +0000 (23:03 +0200)
libsrc/atari/crt0.s

index e30d7c07fbd214c2fecacec981fdedf0010b49f8..9bf5771d46accb386ea5ed97e2ed5b755eaa449c 100644 (file)
@@ -17,6 +17,7 @@
         .import         __RESERVED_MEMORY__
         .import         __RAM_START__, __RAM_SIZE__
 .if .defined(__ATARIXL__)
+        .import         __STACKSIZE__
         .import         sram_init
         .import         scrdev
         .import         findfreeiocb
@@ -88,9 +89,9 @@ start:
 
 .else
 
-        lda     #<(__RAM_START__ + __RAM_SIZE__ - 1)
+        lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
         sta     sp
-        lda     #>(__RAM_START__ + __RAM_SIZE__ - 1)
+        lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
         sta     sp+1
 
 .endif