]> git.sur5r.net Git - cc65/commitdiff
Fix wrong expression for top of C stack.
authorStephan Mühlstrasser <stephan.muehlstrasser@web.de>
Wed, 25 Feb 2015 22:48:57 +0000 (23:48 +0100)
committerStephan Mühlstrasser <stephan.muehlstrasser@web.de>
Wed, 25 Feb 2015 22:48:57 +0000 (23:48 +0100)
Thanks to Greg King for this fix.

libsrc/osic1p/crt0.s

index 657ee27438acb2bd9de913c4fd49d3e56e1bbde8..62342c206e479d619bce354f381e6c1cead7df84 100644 (file)
@@ -9,6 +9,7 @@
 
 .export   __STARTUP__ : absolute = 1    ; Mark as startup
 .import   __RAM_START__, __RAM_SIZE__   ; Linker generated
+.import   __STACKSIZE__
 
 .import    zerobss, initlib, donelib
 
@@ -31,9 +32,9 @@ _init:    ldx     #$FF          ; Initialize stack pointer to $01FF
 ; ---------------------------------------------------------------------------
 ; Set cc65 argument stack pointer
 
-          lda     #<(__RAM_START__ + __RAM_SIZE__)
+          lda     #<(__RAM_START__ + __RAM_SIZE__  + __STACKSIZE__)
           sta     sp
-          lda     #>(__RAM_START__ + __RAM_SIZE__)
+          lda     #>(__RAM_START__ + __RAM_SIZE__  + __STACKSIZE__)
           sta     sp+1
 
 ; ---------------------------------------------------------------------------