use callmain; don't call getargs, it's now called from initlib

(it's now a constructor)


git-svn-id: svn://svn.cc65.org/cc65/trunk@2298 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cpg
2003-08-12 19:59:51 +00:00
parent cfa26a93be
commit 624b88e976

View File

@@ -10,12 +10,11 @@
; ;
.export _exit .export _exit
.constructor initsp,26 .constructor initsp, 26
.import getargs, argc, argv .import initlib, donelib, callmain
.import initlib, donelib
.import zerobss, pushax .import zerobss, pushax
.import _main,__filetab,getfd .import _main, __filetab, getfd
.import __CODE_LOAD__, __BSS_LOAD__ .import __CODE_LOAD__, __BSS_LOAD__
.include "zeropage.inc" .include "zeropage.inc"
@@ -105,19 +104,9 @@ L1: lda sp,x
jsr getfd jsr getfd
sta __filetab + (2 * _FILE_size) ; setup stderr sta __filetab + (2 * _FILE_size) ; setup stderr
; Pass command line if present ; Push arguments and call main
jsr getargs jsr callmain
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
; Call module destructors. This is also the _exit entry. ; Call module destructors. This is also the _exit entry.