1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-26 08:32:00 +00:00
cc65/libsrc/sim6502/crt0.s
Oliver Schmidt d8c31cf1d3 Renamed RAM to MAIN for all disk based targets.
The name RAM doesn't make much sense in general for a memeory area because i.e. the zero page is for sure RAM but is not part of the memory area named RAM.

For disk based targets it makes sense to put the disk file more into focus and here MAIN means the main part of the file - in contrast to some header.

Only for ROM based targets the name RAM is kept as it makes sense to focus on the difference between RAM and ROM.
2016-03-07 01:28:55 +01:00

33 lines
881 B
ArmAsm

;
; Oliver Schmidt, 2013-05-16
;
; Startup code for cc65 (sim6502 version)
;
.export _exit
.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"
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