]> git.sur5r.net Git - cc65/blobdiff - libsrc/geos/devel/crt0.s
Return 0 if color not found
[cc65] / libsrc / geos / devel / crt0.s
index 788a0aeb8e08f3fdccec235776a30df5b84bfd45..0418dbab04898624cc32201011440f54c75aa28a 100644 (file)
@@ -2,12 +2,12 @@
 ; This must be the *second* file on the linker command line
 ; (.cvt header must be the *first* one)
 
-; Maciej 'YTM/Alliance' Witkowiak
-; 26.10.99, 10.3.2000
+; Maciej 'YTM/Elysium' Witkowiak
+; 26.10.99, 10.3.2000, 15.8.2001
 
 ; 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
 
@@ -50,9 +57,9 @@ regbank =     $a3             ; 6 bytes hopefully not used by Kernal
 
 ; Setup stack
 
-       lda     #<$7900
+       lda     #<$6000
        sta     sp
-       lda     #>$7900
+       lda     #>$6000
                sta     sp+1            ; Set argument stack ptr
 
 ; Call module constructors
@@ -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
-                        
+