.import zerobss, push0
.import callmain
.import RESTOR, BSOUT, CLRCH
- .import __RAM_START__, __RAM_SIZE__ ; Linker generated
+ .import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
.import __STACKSIZE__ ; Linker generated
.importzp ST
tsx
stx spsave ; Save the system stack ptr
- lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
+ lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
+ ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp
- lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
- sta sp+1 ; Set argument stack ptr
+ stx sp+1 ; Set argument stack ptr
; Call the module constructors.
; ------------------------------------------------------------------------
-.segment "INITBSS"
+.segment "INIT"
zpsave: .res zpspace