; no __hinit
- .export _exit
+ .export _exit
.import initlib, donelib
.import pushax
.import _main
.reloc
; ------------------------------------------------------------------------
-; Actual code
+; Create an empty LOWCODE segment to avoid linker warnings
+
+.segment "LOWCODE"
+
+; ------------------------------------------------------------------------
+; Place the startup code in a special segment.
+
+.segment "STARTUP"
; Clear the BSS data
jsr pushax ; argc
jsr pushax ; argv
+ cli
ldy #4 ; Argument size
jsr _main ; call the users code
jmp $c1c3 ; jump to GEOS MainLoop
_exit: jsr donelib ; Run module destructors
jmp $c22c ; EnterDeskTop
-
+