From: ol.sc
Date: Sat, 2 Oct 2010 10:32:26 +0000 (+0000)
Subject: User linker generated symbols for stack placement (like most other targets) instead...
X-Git-Tag: V2.13.3~632
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eef8ecc74de03ebf31da7adbc1b3c5a42ad92a7e;p=cc65
User linker generated symbols for stack placement (like most other targets) instead of a hardcoded constant in order to allow control of stack placement via linker configuration.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4821 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
diff --git a/libsrc/plus4/crt0.s b/libsrc/plus4/crt0.s
index f9e79db78..32596e636 100644
--- a/libsrc/plus4/crt0.s
+++ b/libsrc/plus4/crt0.s
@@ -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