Move constructor code into the INIT segment. Note: Didn't change any
obsolete modules. git-svn-id: svn://svn.cc65.org/cc65/trunk@3407 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -12,8 +12,11 @@ SPACE = 32 ; SPACE char.
|
||||
.import __dos_type
|
||||
.constructor initmainargs,25
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
; Get command line
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
initmainargs:
|
||||
lda #0
|
||||
sta __argc
|
||||
@@ -32,7 +35,7 @@ nargdos:rts
|
||||
|
||||
argdos: lda #ATEOL
|
||||
sta ourcl+CL_SIZE
|
||||
|
||||
|
||||
; Move SpartaDOS command line to our own buffer
|
||||
|
||||
lda DOSVEC
|
||||
@@ -112,7 +115,7 @@ eopar:
|
||||
|
||||
finargs:
|
||||
lda __argc
|
||||
asl
|
||||
asl
|
||||
tax
|
||||
lda #0
|
||||
sta argv,x
|
||||
@@ -123,7 +126,10 @@ finargs:
|
||||
stx __argv+1
|
||||
rts
|
||||
|
||||
.bss
|
||||
; --------------------------------------------------------------------------
|
||||
; Data
|
||||
|
||||
.bss
|
||||
|
||||
argv: .res (1 + MAXARGS) * 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user