Now that we reduce the size of the RAM memory area by the stacksize in the linker configuration we need to add the stacksize to end of the RAM area when setting the initial stack pointer in the startup code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4822 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
.import push0, callmain
|
||||
.import RESTOR, BSOUT, CLRCH
|
||||
.import __INTERRUPTOR_COUNT__
|
||||
.import __RAM_START__, __RAM_SIZE__
|
||||
.import __RAM_START__, __RAM_SIZE__, __STACKSIZE__
|
||||
|
||||
.include "zeropage.inc"
|
||||
.include "c128.inc"
|
||||
@@ -77,9 +77,9 @@ L1: lda sp,x
|
||||
tsx
|
||||
stx spsave ; Save the system 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 ; Set argument stack ptr
|
||||
|
||||
; If we have IRQ functions, chain our stub into the IRQ vector
|
||||
|
||||
Reference in New Issue
Block a user