mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 15:05:14 +00:00
26 lines
687 B
ArmAsm
26 lines
687 B
ArmAsm
|
.export _exit
|
||
|
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
||
|
.import zerobss, _main
|
||
|
.import initlib, donelib
|
||
|
.import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
|
||
|
.import __STACKSIZE__ ; Linker generated
|
||
|
|
||
|
.include "zeropage.inc"
|
||
|
|
||
|
.segment "STARTUP"
|
||
|
|
||
|
cld
|
||
|
ldx #$FF
|
||
|
txs
|
||
|
lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
|
||
|
ldx #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
|
||
|
sta sp
|
||
|
stx sp+1
|
||
|
jsr zerobss
|
||
|
jsr initlib
|
||
|
jsr _main
|
||
|
_exit: pha
|
||
|
jsr donelib
|
||
|
pla
|
||
|
brk
|