mirror of
https://github.com/cc65/cc65.git
synced 2025-02-26 07:29:25 +00:00
Fix wrong expression for top of C stack.
Thanks to Greg King for this fix.
This commit is contained in:
parent
8deeb2c59e
commit
52865410d2
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
||||||
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
|
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
|
||||||
|
.import __STACKSIZE__
|
||||||
|
|
||||||
.import zerobss, initlib, donelib
|
.import zerobss, initlib, donelib
|
||||||
|
|
||||||
@ -31,9 +32,9 @@ _init: ldx #$FF ; Initialize stack pointer to $01FF
|
|||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Set cc65 argument stack pointer
|
; Set cc65 argument stack pointer
|
||||||
|
|
||||||
lda #<(__RAM_START__ + __RAM_SIZE__)
|
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
|
||||||
sta sp
|
sta sp
|
||||||
lda #>(__RAM_START__ + __RAM_SIZE__)
|
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
|
||||||
sta sp+1
|
sta sp+1
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user