Skip to content

Commit

Permalink
:ssob:
Browse files Browse the repository at this point in the history
  • Loading branch information
amukh1 committed Mar 5, 2024
1 parent 5c06451 commit 62e92cd
Show file tree
Hide file tree
Showing 15 changed files with 406 additions and 84 deletions.
Binary file added crt0.o
Binary file not shown.
38 changes: 38 additions & 0 deletions crt0.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.export _init, _exit
.exportzp sp
.import _main

.export __STARTUP__: absolute = 1
.import __RAM_START__, __RAM_SIZE__

.import copydata, zerobss, initlib, donelib

; .include "zeropage.inc"

; reserve byte or sp
.segment "ZEROPAGE"
sp: .res 1



.segment "STARTUP"

_init: ldx #$ff
txs
cld

lda #<(__RAM_START__ + __RAM_SIZE__)
STA sp
lda #>(__RAM_START__ + __RAM_SIZE__)
STA sp+1

jsr zerobss
jsr copydata
jsr initlib

jsr _main

_exit:
jsr donelib
brk

Loading

0 comments on commit 62e92cd

Please sign in to comment.