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:
ol.sc
2010-10-02 10:37:20 +00:00
parent eef8ecc74d
commit d1f5b74f01
6 changed files with 19 additions and 15 deletions

View File

@@ -25,7 +25,7 @@
.import _main
.import __BSS_LOAD__
.import __INTERRUPTOR_COUNT__
.import __RAM_START__, __RAM_SIZE__
.import __RAM_START__, __RAM_SIZE__, __STACKSIZE__
.include "zeropage.inc"
.include "extzp.inc"
@@ -94,9 +94,9 @@ MikeyInitData: .byte $9e,$18,$68,$1f,$00,$00,$00,$00,$00,$ff,$1a,$1b,$04,$0d,$2
; setup the stack
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
; Init Mickey