]> git.sur5r.net Git - cc65/blobdiff - libsrc/geos/devel/crt0.s
Return 0 if color not found
[cc65] / libsrc / geos / devel / crt0.s
index 4c1139ed1c598fa9bf3e09185cc3bad62269d85f..0418dbab04898624cc32201011440f54c75aa28a 100644 (file)
@@ -7,7 +7,7 @@
 
 ; no __hinit
 
-       .export         _exit  
+       .export         _exit
        .import         initlib, donelib
                .import         pushax
        .import         _main
@@ -42,7 +42,14 @@ regbank =    $a3             ; 6 bytes hopefully not used by Kernal
        .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
 
@@ -66,6 +73,7 @@ regbank =     $a3             ; 6 bytes hopefully not used by Kernal
        jsr     pushax          ; argc
        jsr     pushax          ; argv
 
+       cli
        ldy     #4              ; Argument size
                jsr     _main           ; call the users code
        jmp     $c1c3           ; jump to GEOS MainLoop
@@ -76,4 +84,4 @@ regbank =     $a3             ; 6 bytes hopefully not used by Kernal
 _exit: jsr     donelib         ; Run module destructors
 
        jmp     $c22c           ; EnterDeskTop
-                        
+