From: Christian Groessler Date: Tue, 17 Sep 2013 21:03:33 +0000 (+0200) Subject: consider __STACKSIZE__ when initializing sp for atarixl X-Git-Tag: V2.15~223^2~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f679c9703c29933ec3efe3b5b67f0711b915325f;p=cc65 consider __STACKSIZE__ when initializing sp for atarixl --- diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index e30d7c07f..9bf5771d4 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -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