]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/crt0.s
don't use constructor to setup runtime stack
[cc65] / libsrc / apple2 / crt0.s
index 9ba7f953446698c3d5c16075892f31a35122f091..53b8043ca3f8ae312dbd1afcb71bdefeb309a182 100644 (file)
@@ -1,8 +1,10 @@
 ;
+; Oliver Schmidt, 15.09.2009
+;
 ; Startup code for cc65 (Apple2 version)
 ;
 
-        .export         _exit
+        .export         _exit, done, return
         .export         __STARTUP__ : absolute = 1      ; Mark as startup
         .import         zerobss
         .import        initlib, donelib
@@ -166,7 +168,7 @@ init:   ldx     #zpspace-1
         
         ; Check ProDOS system bit map
         lda     $BF6F           ; protection for pages $B8 - $BF
-        cmp     #%00000001      ; exactly page $BF is protected
+        cmp     #%00000001      ; exactly system global page is protected
         bne     basic
 
         ; No BASIC.SYSTEM so quit to ProDOS dispatcher instead
@@ -268,7 +270,7 @@ reset:  stx     SOFTEV
         sta     SOFTEV+1
         eor     #$A5
         sta     PWREDUP
-        rts
+return: rts
 
         ; Quit to ProDOS dispatcher
 quit:   jsr     $BF00           ; MLI call entry point