mirror of
https://github.com/cc65/cc65.git
synced 2024-09-29 17:56:21 +00:00
fb7d4acd5c
load and run address now configured from header fix error codes not to conflict with test fix test/misc/endless.c which is supposed to fail if an endless loop does not occur
35 lines
928 B
ArmAsm
35 lines
928 B
ArmAsm
;
|
|
; Oliver Schmidt, 2013-05-16
|
|
;
|
|
; Startup code for cc65 (sim6502 version)
|
|
;
|
|
|
|
.export _exit
|
|
.export sim65start
|
|
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
|
.import zerobss, callmain
|
|
.import initlib, donelib
|
|
.import exit
|
|
.import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
|
|
.import __STACKSIZE__ ; Linker generated
|
|
|
|
.include "zeropage.inc"
|
|
|
|
.segment "STARTUP"
|
|
|
|
sim65start:
|
|
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 callmain
|
|
_exit: pha
|
|
jsr donelib
|
|
pla
|
|
jmp exit
|