1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

Don't presume the stack size to be a multiple of pages.

This commit is contained in:
Oliver Schmidt 2016-03-10 10:07:09 +01:00
parent aac0b1cbbb
commit 084453ba57

View File

@ -31,9 +31,10 @@ reset:
; Initialize data.
jsr copydata
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp+1 ; Set argument stack ptr
stz sp ; #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
ldx #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
stx sp+1 ; Set argument stack ptr
jsr initlib
jsr _main
_exit: jsr donelib