tsx
stx spsave ; Save the system stack ptr
-; Save space by putting some of the start-up code in the INIT segment,
+; Save space by putting some of the start-up code in the ONCE segment,
; which can be re-used by the BSS segment, the heap and the C stack.
jsr init
; ------------------------------------------------------------------------
-.segment "INIT"
+.segment "ONCE"
init:
; Set up the stack.
- lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
- ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
+ lda #<(__MAIN_START__ + __MAIN_SIZE__)
+ ldx #>(__MAIN_START__ + __MAIN_SIZE__)
sta sp
stx sp+1 ; Set argument stack ptr
; ------------------------------------------------------------------------
; Data
-.segment "INITBSS"
+.segment "INIT"
mmusave:.res 1
spsave: .res 1