]> git.sur5r.net Git - cc65/commitdiff
use callmain; don't call getargs, it's now called from initlib
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Aug 2003 19:59:51 +0000 (19:59 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Aug 2003 19:59:51 +0000 (19:59 +0000)
(it's now a constructor)

git-svn-id: svn://svn.cc65.org/cc65/trunk@2298 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/crt0.s

index 77766003e42052cbccc5369ceec92f1ed048ebf9..dae781f02b36df65a52c726d5f89de5a4d8a801e 100644 (file)
 ;
 
        .export         _exit
-       .constructor    initsp,26
+       .constructor    initsp, 26
 
-       .import         getargs, argc, argv
-       .import         initlib, donelib
+       .import         initlib, donelib, callmain
                .import         zerobss, pushax
-       .import         _main,__filetab,getfd
+       .import         _main, __filetab, getfd
        .import         __CODE_LOAD__, __BSS_LOAD__
 
         .include        "zeropage.inc"
@@ -105,19 +104,9 @@ L1:        lda     sp,x
        jsr     getfd
        sta     __filetab + (2 * _FILE_size)    ; setup stderr
 
-; Pass command line if present
+; Push arguments and call main
 
-       jsr     getargs
-
-       lda     argc
-       ldx     argc+1
-       jsr     pushax          ; argc
-       lda     #<argv
-       ldx     #>argv
-       jsr     pushax          ; argv
-
-       ldy     #4              ; Argument size
-       jsr     _main           ; call the users code
+       jsr     callmain
 
 ; Call module destructors. This is also the _exit entry.