2 ; Ullrich von Bassewitz, 2003-03-07
3 ; Maciej Witkowiak, 2003-05-02
5 ; Setup arguments for main
7 ; There is always either 1 or 3 arguments:
10 ; <program name>, <data file name>, <data disk name>, 0
11 ; the 2nd case is when using DeskTop user drags an icon of a file and drops it
12 ; on icon of your application
15 .constructor initmainargs, 24
16 .import __argc, __argv
18 .include "../inc/const.inc"
19 .include "../inc/geossym.inc"
21 ;---------------------------------------------------------------------------
22 ; Setup arguments for main
28 ; Setup a pointer to our argv vector
39 lda dirEntryBuf+OFF_FNAME,y
51 ; Check if there are any more arguments
55 ldx #0 ; no dataFileName - NULL the 2nd argument
58 inx ; there is only one argument
61 ldx #3 ; there are three arguments
68 ;---------------------------------------------------------------------------
73 argv: .word argv0 ; Pointer to program name
74 .word dataFileName ; dataFileName or NULL if last one
75 .word dataDiskName ; dataDiskName
76 .word $0000 ; last one must be NULL
79 argv0: .res 17 ; Program name