From: Stephan Mühlstrasser Date: Wed, 25 Feb 2015 22:48:57 +0000 (+0100) Subject: Fix wrong expression for top of C stack. X-Git-Tag: V2.15~20^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=52865410d2269e074bb7c41683d023f875b69f19;p=cc65 Fix wrong expression for top of C stack. Thanks to Greg King for this fix. --- diff --git a/libsrc/osic1p/crt0.s b/libsrc/osic1p/crt0.s index 657ee2743..62342c206 100644 --- a/libsrc/osic1p/crt0.s +++ b/libsrc/osic1p/crt0.s @@ -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 ; ---------------------------------------------------------------------------