Restored the old C-stack initiation code.

I had forgotten that the stack must be put below the CBM overlays.
This commit is contained in:
Greg King
2015-10-08 05:05:48 -04:00
parent 8a880580dc
commit ca70700a0b
3 changed files with 6 additions and 5 deletions

View File

@@ -8,7 +8,8 @@
.import initlib, donelib
.import moveinit, zerobss, callmain
.import BSOUT
.import __HIMEM__ ; from configure file
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
.import __STACKSIZE__ ; from configure file
.importzp ST
.include "zeropage.inc"
@@ -105,8 +106,8 @@ L1: lda sp,x
; Set up the stack.
lda #<__HIMEM__
ldx #>__HIMEM__
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
ldx #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
stx sp+1 ; Set argument stack ptr