Interactive	db	1		; 0 - Off, 1 - On
proc            LoadCommandLine near
		; Scan the command line for the module name.
                mov     ds, [cs:PspAddress]
                mov     si, 128
		cld
		lodsb
                or      al,al                   ; Are we at a null?
		je	@@noargv
@@MoreThanOne:  mov     bx,si
                xor     ah,ah
                add     bx,ax
@@TopLoop:      cmp     bx,si
		je	@@noargv
                lodsb
                cmp     al,' '
		je	@@TopLoop
		cmp	al,'-'
		jne	@@GetFilename
		cmp	[Byte si],'i'
		je	@@SetInteractive
		cmp	[Byte si],'I'
		jne	@@DecIt
@@SetInteractive:
		mov	[Byte cs:Interactive],1
		jmp	@@TopLoop
@@DecIt:        dec     si
		lodsb
@@GetFilename:  xor     ah,ah
                dec     si
                mov     cx,80
@@TopGet:       cmp     bx,si
		je	@@StoreFilename
                lodsb
                cmp     al,'.'
		jne	@@NotPeriod
                mov     ah,1
@@NotPeriod:    cmp     al,13
		je	@@StoreFilename
                loop    @@TopGet
@@StoreFilename:or      ah,ah
		jne	@@JustZero
                mov     [Byte si],'.'
                mov     [Byte si+1],'M'
                mov     [Byte si+2],'O'
                mov     [Byte si+3],'D'
                add     si,4
@@JustZero:     mov     [Byte si],0
		mov	[Byte cs:Interactive],0
		clc
		ret
@@noargv:	stc
		ret
endp		LoadCommandLine

