.export __STARTUP__ : absolute = 1 ; Mark as startup
.import initlib, donelib
.import callmain, zerobss
- .import __RAM_START__, __RAM_SIZE__, __BSS_LOAD__
+ .import __RAM_START__, __RAM_SIZE__
+ .import __BSS_LOAD__, __STACKSIZE__
.include "zeropage.inc"
.include "atmos.inc"
tsx
stx spsave ; save system stk ptr
- lda #<(__RAM_START__ + __RAM_SIZE__)
+ lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
- lda #>(__RAM_START__ + __RAM_SIZE__)
+ lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp+1 ; Set argument stack ptr
; Call module constructors
.import push0, callmain
.import RESTOR, BSOUT, CLRCH
.import __INTERRUPTOR_COUNT__
- .import __RAM_START__, __RAM_SIZE__
+ .import __RAM_START__, __RAM_SIZE__, __STACKSIZE__
.include "zeropage.inc"
.include "c128.inc"
tsx
stx spsave ; Save the system stack pointer
- lda #<(__RAM_START__ + __RAM_SIZE__)
+ lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
- lda #>(__RAM_START__ + __RAM_SIZE__)
+ lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp+1 ; Set argument stack ptr
; If we have IRQ functions, chain our stub into the IRQ vector
.import RESTOR, BSOUT, CLRCH
.import __INTERRUPTOR_COUNT__
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
+ .import __STACKSIZE__ ; Linker generated
.include "zeropage.inc"
.include "c64.inc"
tsx
stx spsave ; Save the system stack ptr
- lda #<(__RAM_START__ + __RAM_SIZE__)
+ lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
- lda #>(__RAM_START__ + __RAM_SIZE__)
+ lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp+1 ; Set argument stack ptr
; If we have IRQ functions, chain our stub into the IRQ vector
.export __STARTUP__ : absolute = 1 ; Mark as startup
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
+ .import __STACKSIZE__ ; Linker generated
.import initlib, donelib
.import callmain
.import zerobss
; Setup stack
- lda #<(__RAM_START__ + __RAM_SIZE__)
+ lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
- lda #>(__RAM_START__ + __RAM_SIZE__)
+ lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp+1 ; Set argument stack ptr
; Call module constructors
.import _main
.import __BSS_LOAD__
.import __INTERRUPTOR_COUNT__
- .import __RAM_START__, __RAM_SIZE__
+ .import __RAM_START__, __RAM_SIZE__, __STACKSIZE__
.include "zeropage.inc"
.include "extzp.inc"
; setup the stack
- lda #<(__RAM_START__ + __RAM_SIZE__)
+ lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
- lda #>(__RAM_START__ + __RAM_SIZE__)
+ lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp+1
; Init Mickey
.import RESTOR, BSOUT, CLRCH
.import __INTERRUPTOR_COUNT__
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
+ .import __STACKSIZE__ ; Linker generated
.include "zeropage.inc"
.include "vic20.inc"
tsx
stx spsave ; Save the system stack ptr
- lda #<(__RAM_START__ + __RAM_SIZE__)
+ lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp
- lda #>(__RAM_START__ + __RAM_SIZE__)
+ lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
sta sp+1 ; Set argument stack ptr
; If we have IRQ functions, chain our stub into the IRQ vector