Category : BASIC Source Code
Archive   : WDMQ0110.ZIP
Filename : PARSECMD.LST

 
Output of file : PARSECMD.LST contained in archive : WDMQ0110.ZIP
PAGE 1
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

0030 0006 ' Archive WDMQ0110 Program PARSECMD V1.0
0030 0006 ' QB4 Routine to Parse Command Line
0030 0006 ' Copyright 1988 (c) Wayne D. Mingee All rights reserv
ed
0030 0006 ' Released to Public Domain
0030 0006
0030 0006 ' PARMS: Program$ Program name used in displaying command su
mmary
0030 0006 ' and accessing the environment
0030 0006 ' Parm$ Output field for current parameter
0030 0006 ' Swchar$ Character that identifies switch parameter
s
0030 0006 ' Tdisplay -1 if debuging mode
0030 0006 ' Pnum Non-sw parmameter Number
0030 0006 ' on initial entry has the maximum number of
0030 0006 ' non switch character parameters.
0030 0006 ' on exit if > 0 then it is the number
0030 0006 ' of the non-swchar parameter
0030 0006 ' Errsw Error/Return code
0030 0006 ' > 0 on entry indicates that the last param
eter was
0030 0006 ' invalid. An error message is displayed.
0030 0006 ' -1 on exit indicates all parameters have b
een
0030 0006 ' processed.
0030 0006 ' -2 on exit indicates the current
0030 0006 ' parameter was enclosed in quotes.
0030 0006
0030 0006 ' SEE PARSECMD.TXT for further information
0030 0006
0030 0006 DEFINT A-Z
0030 0006 CONST True = -1, False = 0
0030 0006
0030 0006 SUB ParseCmd (Program$, Parm$, Swchar$, Errsw, Pnum, Tdisplay)
STATIC
0030 ** I00002: call B$LINA
0035 ** call B$LINA
003A ** call B$LINA
003F ** jmp I00003
0042 ** PARSECMD:
0042 ** mov cx,0000h
0045 ** call B$ENSD
004A 0006
004A 0006 IF NOT InitialSw THEN
004A 0006 InitialSw = True ' First time sw
004A 0006 Quote$ = CHR$(34) ' Double quote
004A 0006 Pmax = Pnum
004A 0006 CurrentP = 1
004A 0006
004A 0006 ' Get the current colors and tell QB to use them
004A 0006 IF CSRLIN > 1 THEN ' If not 1st line
004A 0006 A = SCREEN(CSRLIN - 1, 1, 1) ' use color from previou
s line
004A 0006 ELSE
PAGE 2
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

004A ** call B$LINA
004F ** mov ax,INITIALSW%
0052 ** not ax
0054 ** and ax,ax
0056 ** jne $+03h
0058 ** jmp I00005
005B ** call B$LINA
0060 ** mov INITIALSW%,0FFFFh
0066 ** call B$LINA
006B ** mov ax,0022h
006E ** push ax
006F ** call B$FCHR
0074 ** push ax
0075 ** mov ax,offset QUOTE$
0078 ** push ax
0079 ** call B$SASS
007E ** call B$LINA
0083 ** mov si,08h[bp]
0086 ** mov ax,[si]
0088 ** mov PMAX%,ax
008B ** call B$LINA
0090 ** mov CURRENTP%,0001h
0096 ** call B$LINA
009B ** call B$CSRL
00A0 ** cmp ax,0001h
00A3 ** jg $+03h
00A5 ** jmp I00006
00A8 ** call B$LINA
00AD ** call B$CSRL
00B2 ** dec ax
00B3 ** into
00B4 ** push ax
00B5 ** mov ax,0001h
00B8 ** push ax
00B9 ** push ax
00BA ** call B$FSCN
00BF ** mov A%,ax
00C2 ** call B$LINA
00C7 ** jmp I00007
00CA 0012 A = SCREEN(CSRLIN + 1, 1, 1) ' otherwise from next li
ne
00CA 0012 END IF
00CA ** I00006: call B$LINA
00CF ** call B$CSRL
00D4 ** inc ax
00D5 ** into
00D6 ** push ax
00D7 ** mov ax,0001h
00DA ** push ax
00DB ** push ax
00DC ** call B$FSCN
00E1 ** mov A%,ax
00E4 ** call B$LINA
00E9 0012 COLOR (A AND 15) + (A AND &H80) \ 16, (A AND &H70) \ 16
PAGE 3
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

00E9 0012
00E9 0012 ' the program must have initialized a pointer to DATA statement
s
00E9 0012 ' by default or with a RESTORE statement and they have two null
entries
00E9 0012 ' one after the copyright and one after the command summary
00E9 0012 ' Display copyright notice
00E9 0012 A = 0
00E9 0012 PRINT Program$; ' Program name
00E9 0012 DO
00E9 ** I00007: call B$LINA
00EE ** mov ax,0001h
00F1 ** push ax
00F2 ** mov cx,A%
00F6 ** and cx,0Fh
00F9 ** mov bx,cx
00FB ** mov cx,0010h
00FE ** mov dx,A%
0102 ** and dx,0080h
0106 ** mov 0F4h[bp],dx
0109 ** mov ax,0F4h[bp]
010C ** cwd
010D ** idiv cx
010F ** add ax,bx
0111 ** into
0112 ** push ax
0113 ** mov ax,0001h
0116 ** push ax
0117 ** mov ax,A%
011A ** and ax,0070h
011D ** cwd
011E ** idiv cx
0120 ** push ax
0121 ** mov ax,0004h
0124 ** push ax
0125 ** call B$COLR
012A ** call B$LINA
012F ** mov A%,0000h
0135 ** call B$LINA
013A ** push 10h[bp]
013D ** call B$PSSD
0142 ** call B$LINA
0148 0012 READ A$
0148 0012 PRINT A$
0148 0012 IF A$ = "" THEN EXIT DO ' If null quit
0147 ** I00008: call B$LINA
014D ** mov ax,offset A$
0150 ** push ds
0151 ** push ax
0152 ** xor ax,ax
0154 ** push ax
0155 ** call B$RDSD
015A ** call B$LINA
015F ** mov ax,offset A$
PAGE 4
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

0162 ** push ax
0163 ** call B$PESD
0168 ** call B$LINA
016D ** mov ax,offset A$
0170 ** push ax
0171 ** mov ax,offset
0174 ** push ax
0175 ** call B$SCMP
017A ** jne $+03h
017C ** jmp I00010
017F 0016 A = A + 1
017F 0016 LOOP
017F ** call B$LINA
0184 ** inc A%
0188 ** into
0189 ** call B$LINA
018E ** jmp $-48h
0190 0016
0190 0016 ' Display command summary
0190 0016 '
0190 0016 IF COMMAND$ = "?" THEN
0190 0016 DO
0190 ** I00010: call B$LINA
0195 ** call B$FCMD
019A ** push ax
019B ** mov ax,offset
019E ** push ax
019F ** call B$SCMP
01A4 ** je $+03h
01A6 ** jmp I00011
01A9 ** call B$LINA
01AE 0016 READ A$ ' Get a line
01AE 0016 IF A$ = "" THEN EXIT DO ' If null quit
01AE ** I00012: call B$LINA
01B3 ** mov ax,offset A$
01B6 ** push ds
01B7 ** push ax
01B8 ** xor ax,ax
01BA ** push ax
01BB ** call B$RDSD
01C0 ** call B$LINA
01C5 ** mov ax,offset A$
01C8 ** push ax
01C9 ** mov ax,offset
01CC ** push ax
01CD ** call B$SCMP
01D2 ** jne $+03h
01D4 ** jmp I00014
01D7 0016 IF A = 23 THEN ' Count lines
01D7 0016 PRINT "Press any key for more";
01D7 0016 WHILE INKEY$="" ' and MORE every 23
01D7 ** call B$LINA
01DC ** cmp word ptr A%,17h
01E1 ** je $+03h
PAGE 5
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

01E3 ** jmp I00015
01E6 ** call B$LINA
01EB ** mov ax,offset
01EE ** push ax
01EF ** call B$PSSD
01F4 ** call B$LINA
01FA 0016 WEND
01F9 ** I00016: call B$INKY
01FF ** push ax
0200 ** mov ax,offset
0203 ** push ax
0204 ** call B$SCMP
0209 ** je $+03h
020B ** jmp I00017
020E ** call B$LINA
0213 ** jmp $-1Bh
0216 0016 CLS
0216 0016 A = 1
0216 0016 END IF
0215 ** I00017: call B$LINA
021B ** mov ax,0FFFFh
021E ** push ax
021F ** call B$SCLS
0224 ** call B$LINA
0229 ** mov A%,0001h
022F ** call B$LINA
0234 0016 PRINT A$ ' Display it
0234 0016 A = A + 1
0234 0016 LOOP
0234 ** I00015: call B$LINA
0239 ** mov ax,offset A$
023C ** push ax
023D ** call B$PESD
0242 ** call B$LINA
0247 ** inc A%
024B ** into
024C ** call B$LINA
0251 ** jmp I00012
0254 0016 END
0254 0016 END IF
0254 ** I00014: call B$LINA
0259 ** call B$CEND
025E ** call B$LINA
0263 0016
0263 0016 ' Put the environment and command line together
0263 0016 ' If environment starts with a + add it after the command line
0263 0016 ' otherwise add before
0263 0016 Cmd$ = ENVIRON$(Program$) + " "
0263 0016 IF LEFT$(Cmd$, 1) = "+" THEN
0263 0016 Cmd$ = LTRIM$(COMMAND$ + " " + MID$(Cmd$, 2))
0263 0016 ELSE
0263 ** I00011: call B$LINA
0268 ** push 10h[bp]
026B ** call B$FEVS
PAGE 6
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

0270 ** push ax
0271 ** mov ax,offset
0274 ** push ax
0275 ** call B$SCAT
027A ** push ax
027B ** mov ax,offset CMD$
027E ** push ax
027F ** call B$SASS
0284 ** call B$LINA
0289 ** mov ax,offset CMD$
028C ** push ax
028D ** mov ax,0001h
0290 ** push ax
0291 ** call B$LEFT
0296 ** push ax
0297 ** mov ax,offset
029A ** push ax
029B ** call B$SCMP
02A0 ** je $+03h
02A2 ** jmp I00018
02A5 ** call B$LINA
02AA ** call B$FCMD
02AF ** push ax
02B0 ** mov ax,offset
02B3 ** push ax
02B4 ** call B$SCAT
02B9 ** push ax
02BA ** mov ax,offset CMD$
02BD ** push ax
02BE ** mov ax,0002h
02C1 ** push ax
02C2 ** mov ax,7FFFh
02C5 ** push ax
02C6 ** call B$FMID
02CB ** push ax
02CC ** call B$SCAT
02D1 ** push ax
02D2 ** call B$LTRM
02D7 ** push ax
02D8 ** mov ax,offset CMD$
02DB ** push ax
02DC ** call B$SASS
02E1 ** call B$LINA
02E6 ** jmp I00019
02E9 001A Cmd$ = LTRIM$(Cmd$ + COMMAND$)
02E9 001A END IF
02E9 ** I00018: call B$LINA
02EE ** mov ax,offset CMD$
02F1 ** push ax
02F2 ** call B$FCMD
02F7 ** push ax
02F8 ** call B$SCAT
02FD ** push ax
02FE ** call B$LTRM
PAGE 7
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

0303 ** push ax
0304 ** mov ax,offset CMD$
0307 ** push ax
0308 ** call B$SASS
030D ** call B$LINA
0312 001A
0312 001A END IF
0312 ** I00019: call B$LINA
0317 001A
0317 001A ' If the program rejected the last parm display an error
msg
0317 001A IF Errsw > 0 THEN
0317 001A IF Pnum = 0 THEN Parm$ = Swchar$ + Parm$
0317 ** I00005: call B$LINA
031C ** mov si,0Ah[bp]
031F ** cmp word ptr [si],00h
0322 ** jg $+03h
0324 ** jmp I00020
0327 ** call B$LINA
032C ** mov si,08h[bp]
032F ** cmp word ptr [si],00h
0332 ** je $+03h
0334 ** jmp I00021
0337 ** push 0Ch[bp]
033A ** push 0Eh[bp]
033D ** call B$SCAT
0342 ** push ax
0343 ** push 0Eh[bp]
0346 ** call B$SASS
034B 001A PRINT "Unknown command >" + Parm$ + "< error=";Errsw
034B 001A END IF
034B ** I00021: call B$LINA
0350 ** mov ax,offset
0353 ** push ax
0354 ** push 0Eh[bp]
0357 ** call B$SCAT
035C ** push ax
035D ** mov ax,offset
0360 ** push ax
0361 ** call B$SCAT
0366 ** push ax
0367 ** call B$PSSD
036C ** mov si,0Ah[bp]
036F ** push [si]
0371 ** call B$PEI2
0376 ** call B$LINA
037B 001A
037B 001A ' Now extract one parameter from the command
037B 001A
037B 001A Errsw = False
037B 001A Pnum = CurrentP
037B 001A Restart:
037B ** I00020: call B$LINA
0380 ** mov si,0Ah[bp]
PAGE 8
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

0383 ** mov [si],0000h
0387 ** call B$LINA
038C ** mov ax,CURRENTP%
038F ** mov si,08h[bp]
0392 ** mov [si],ax
0394 001A Cmd$ = LTRIM$(Cmd$)
0394 001A Parm$ = ""
0394 001A FOR A = 1 TO LEN(Cmd$)
0394 ** I00022: call B$LINA
0399 ** mov ax,offset CMD$
039C ** push ax
039D ** call B$LTRM
03A2 ** push ax
03A3 ** mov ax,offset CMD$
03A6 ** push ax
03A7 ** call B$SASS
03AC ** call B$LINA
03B1 ** mov ax,offset
03B4 ** push ax
03B5 ** push 0Eh[bp]
03B8 ** call B$SASS
03BD ** call B$LINA
03C2 ** mov ax,offset CMD$
03C5 ** push ax
03C6 ** call B$FLEN
03CB ** mov t%,ax
03CE ** mov ax,0001h
03D1 ** jmp I00023
03D4 001C K$ = MID$(Cmd$, A, 1)
03D4 001C IF Inquote$ <> "" THEN 'If we had a q
uote
03D4 001C IF Inquote$ = K$ THEN 'then is this
the other
03D4 001C Inquote$ = "" 'turn off
03D4 001C ELSE
03D4 ** I00024: call B$LINA
03D9 ** mov ax,offset CMD$
03DC ** push ax
03DD ** push A%
03E1 ** mov ax,0001h
03E4 ** push ax
03E5 ** call B$FMID
03EA ** push ax
03EB ** mov ax,offset K$
03EE ** push ax
03EF ** call B$SASS
03F4 ** call B$LINA
03F9 ** mov ax,offset INQUOTE$
03FC ** push ax
03FD ** mov ax,offset
0400 ** push ax
0401 ** call B$SCMP
0406 ** jne $+03h
0408 ** jmp I00025
PAGE 9
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

040B ** call B$LINA
0410 ** mov ax,offset INQUOTE$
0413 ** push ax
0414 ** mov ax,offset K$
0417 ** push ax
0418 ** call B$SCMP
041D ** je $+03h
041F ** jmp I00026
0422 ** call B$LINA
0427 ** mov ax,offset
042A ** push ax
042B ** mov ax,offset INQUOTE$
042E ** push ax
042F ** call B$SASS
0434 ** call B$LINA
0439 ** jmp I00027
043C 0024 Parm$ = Parm$ + K$ 'save data
043C 0024 END IF
043C ** I00026: call B$LINA
0441 ** push 0Eh[bp]
0444 ** mov ax,offset K$
0447 ** push ax
0448 ** call B$SCAT
044D ** push ax
044E ** push 0Eh[bp]
0451 ** call B$SASS
0456 ** call B$LINA
045B 0024 ELSEIF K$ = Quote$ OR K$ = "'" THEN 'do we have a
quote
045B ** I00027: call B$LINA
0460 ** jmp I00028
0463 0024 Inquote$ = K$ 'turn on
0463 0024 Errsw = -2 'say quote
0463 0024 ELSEIF K$ = " " AND A > 1 THEN 'end of parm
0463 ** I00025: mov ax,offset K$
0466 ** push ax
0467 ** mov ax,offset QUOTE$
046A ** push ax
046B ** call B$SCMP
0470 ** mov ax,0000h
0473 ** jne $+01h
0475 ** dec ax
0476 ** mov bx,ax
0478 ** mov ax,offset K$
047B ** push ax
047C ** mov ax,offset
047F ** push ax
0480 ** mov 0F2h[bp],bx
0483 ** call B$SCMP
0488 ** mov ax,0000h
048B ** jne $+01h
048D ** dec ax
048E ** or ax,0F2h[bp]
0491 ** and ax,ax
PAGE 10
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

0493 ** jne $+03h
0495 ** jmp I00029
0498 ** call B$LINA
049D ** mov ax,offset K$
04A0 ** push ax
04A1 ** mov ax,offset INQUOTE$
04A4 ** push ax
04A5 ** call B$SASS
04AA ** call B$LINA
04AF ** mov si,0Ah[bp]
04B2 ** mov [si],0FFFEh
04B6 ** call B$LINA
04BB ** jmp I00028
04BE 0024 EXIT FOR
04BE 0024 ELSEIF K$ = Swchar$ THEN 'sw char
04BE ** I00029: mov ax,offset K$
04C1 ** push ax
04C2 ** mov ax,offset
04C5 ** push ax
04C6 ** call B$SCMP
04CB ** mov ax,0000h
04CE ** jne $+01h
04D0 ** dec ax
04D1 ** cmp word ptr A%,01h
04D6 ** mov cx,0000h
04D9 ** jng $+01h
04DB ** dec cx
04DC ** and cx,ax
04DE ** and cx,cx
04E0 ** jne $+03h
04E2 ** jmp I00030
04E5 ** call B$LINA
04EA ** jmp I00031
04ED ** call B$LINA
04F2 ** jmp I00028
04F5 0024 IF A = 2 THEN 'if 2 in a row
04F5 0024 Swchar$ = MID$(Cmd$, 3, 1) ' set new sw
char
04F5 0024 Cmd$ = MID$(Cmd$, 4)
04F5 0024 GOTO Restart 'back to top
04F5 0024 END IF
04F5 ** I00030: push 0Ch[bp]
04F8 ** mov ax,offset K$
04FB ** push ax
04FC ** call B$SCMP
0501 ** je $+03h
0503 ** jmp I00032
0506 ** call B$LINA
050B ** cmp word ptr A%,02h
0510 ** je $+03h
0512 ** jmp I00033
0515 ** call B$LINA
051A ** mov ax,offset CMD$
051D ** push ax
PAGE 11
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

051E ** mov ax,0003h
0521 ** push ax
0522 ** mov ax,0001h
0525 ** push ax
0526 ** call B$FMID
052B ** push ax
052C ** push 0Ch[bp]
052F ** call B$SASS
0534 ** call B$LINA
0539 ** mov ax,offset CMD$
053C ** push ax
053D ** mov ax,0004h
0540 ** push ax
0541 ** mov ax,7FFFh
0544 ** push ax
0545 ** call B$FMID
054A ** push ax
054B ** mov ax,offset CMD$
054E ** push ax
054F ** call B$SASS
0554 ** call B$LINA
0559 ** jmp I00022
055C ** call B$LINA
0561 0024 IF A > 2 THEN EXIT FOR 'otherwise end
of parm
0561 ** I00033: call B$LINA
0566 ** cmp word ptr A%,02h
056B ** jng $+03h
056D ** jmp I00031
0570 0024 Pnum = 0 'say switch
0570 0024 ELSE
0570 ** call B$LINA
0575 ** mov si,08h[bp]
0578 ** mov [si],0000h
057C ** call B$LINA
0581 ** jmp I00028
0584 0024 Parm$ = Parm$ + K$ 'save data
0584 0024 END IF
0584 ** I00032: call B$LINA
0589 ** push 0Eh[bp]
058C ** mov ax,offset K$
058F ** push ax
0590 ** call B$SCAT
0595 ** push ax
0596 ** push 0Eh[bp]
0599 ** call B$SASS
059E ** call B$LINA
05A3 0024 NEXT A
05A3 ** I00028: call B$LINA
05A8 ** mov ax,A%
05AB ** inc ax
05AC ** into
05AD ** I00023: mov A%,ax
05B0 ** cmp ax,t%
PAGE 12
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

05B4 ** jg $+03h
05B6 ** jmp I00024
05B9 0024 ' If debuging display parms
05B9 0024 IF Tdisplay THEN PRINT Parm$ + "<>"; Cmd$
05B9 ** I00031: call B$LINA
05BE ** mov si,06h[bp]
05C1 ** mov ax,[si]
05C3 ** and ax,ax
05C5 ** jne $+03h
05C7 ** jmp I00035
05CA ** push 0Eh[bp]
05CD ** mov ax,offset
05D0 ** push ax
05D1 ** call B$SCAT
05D6 ** push ax
05D7 ** call B$PSSD
05DC ** mov ax,offset CMD$
05DF ** push ax
05E0 ** call B$PESD
05E5 0024 ' If no data then end of parms
05E5 0024 IF A = 1 THEN
05E5 0024 Errsw = True
05E5 0024 ' If parm file, read it and add to front of command
05E5 0024 ELSEIF LEFT$(Parm$, 1) = "@" THEN
05E5 ** I00035: call B$LINA
05EA ** cmp word ptr A%,01h
05EF ** je $+03h
05F1 ** jmp I00036
05F4 ** call B$LINA
05F9 ** mov si,0Ah[bp]
05FC ** mov [si],0FFFFh
0600 ** call B$LINA
0605 ** jmp I00037
0608 0024 OPEN "I", #1, MID$(Parm$, 2)
0608 0024 Wrk$ = ""
0608 0024 WHILE NOT EOF(1)
0608 ** I00036: push 0Eh[bp]
060B ** mov ax,0001h
060E ** push ax
060F ** call B$LEFT
0614 ** push ax
0615 ** mov ax,offset
0618 ** push ax
0619 ** call B$SCMP
061E ** je $+03h
0620 ** jmp I00038
0623 ** call B$LINA
0628 ** mov ax,offset
062B ** push ax
062C ** mov ax,0001h
062F ** push ax
0630 ** push 0Eh[bp]
0633 ** mov ax,0002h
0636 ** push ax
PAGE 13
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

0637 ** mov ax,7FFFh
063A ** push ax
063B ** call B$FMID
0640 ** push ax
0641 ** mov ax,0FFFFh
0644 ** push ax
0645 ** call B$OOPN
064A ** call B$LINA
064F ** mov ax,offset
0652 ** push ax
0653 ** mov ax,offset WRK$
0656 ** push ax
0657 ** call B$SASS
065C ** call B$LINA
0662 0028 LINE INPUT #1, In$
0661 ** I00039: mov ax,0001h
0665 ** push ax
0666 ** call B$FEOF
066B ** not ax
066D ** and ax,ax
066F ** jne $+03h
0671 ** jmp I00040
0674 ** call B$LINA
0679 ** mov ax,0001h
067C ** push ax
067D ** call B$DSKI
0682 0028 Wrk$ = Wrk$ + " " + In$
0682 0028 WEND
0682 ** mov ax,offset
0685 ** push ax
0686 ** mov ax,offset IN$
0689 ** push ds
068A ** push ax
068B ** xor ax,ax
068D ** push ax
068E ** mov ax,0001h
0691 ** push ax
0692 ** call B$LNIN
0697 ** call B$LINA
069C ** mov ax,offset WRK$
069F ** push ax
06A0 ** mov ax,offset
06A3 ** push ax
06A4 ** call B$SCAT
06A9 ** push ax
06AA ** mov ax,offset IN$
06AD ** push ax
06AE ** call B$SCAT
06B3 ** push ax
06B4 ** mov ax,offset WRK$
06B7 ** push ax
06B8 ** call B$SASS
06BD ** call B$LINA
06C2 ** jmp $-62h
PAGE 14
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

06C4 002C Cmd$ = UCASE$(Wrk$) + " " + LTRIM$(MID$(Cmd$, A))
06C4 002C Wrk$ = ""
06C4 002C CLOSE #1
06C4 002C GOTO Restart
06C4 002C ELSE
06C4 ** I00040: call B$LINA
06C9 ** mov ax,offset WRK$
06CC ** push ax
06CD ** call B$UCAS
06D2 ** push ax
06D3 ** mov ax,offset
06D6 ** push ax
06D7 ** call B$SCAT
06DC ** push ax
06DD ** mov ax,offset CMD$
06E0 ** push ax
06E1 ** push A%
06E5 ** mov ax,7FFFh
06E8 ** push ax
06E9 ** call B$FMID
06EE ** push ax
06EF ** call B$LTRM
06F4 ** push ax
06F5 ** call B$SCAT
06FA ** push ax
06FB ** mov ax,offset CMD$
06FE ** push ax
06FF ** call B$SASS
0704 ** call B$LINA
0709 ** mov ax,offset
070C ** push ax
070D ** mov ax,offset WRK$
0710 ** push ax
0711 ** call B$SASS
0716 ** call B$LINA
071B ** mov ax,0001h
071E ** push ax
071F ** push ax
0720 ** call B$CLOS
0725 ** call B$LINA
072A ** jmp I00022
072D ** call B$LINA
0732 002C Cmd$ = MID$(Cmd$, A) 'remove current parm fro
m command
0732 002C END IF
0732 ** I00038: call B$LINA
0737 ** mov ax,offset CMD$
073A ** push ax
073B ** push A%
073F ** mov ax,7FFFh
0742 ** push ax
0743 ** call B$FMID
0748 ** push ax
0749 ** mov ax,offset CMD$
PAGE 15
16 Oct 88
23:44:08
Offset Data Source Line Microsoft (R) QuickBASIC Compiler Version 4.00b

074C ** push ax
074D ** call B$SASS
0752 ** call B$LINA
0757 002C IF Pnum > 0 THEN
0757 002C CurrentP = CurrentP + 1
0757 002C IF CurrentP > Pmax THEN CurrentP = 1
0757 ** I00037: call B$LINA
075C ** mov si,08h[bp]
075F ** cmp word ptr [si],00h
0762 ** jg $+03h
0764 ** jmp I00041
0767 ** call B$LINA
076C ** inc CURRENTP%
0770 ** into
0771 ** call B$LINA
0776 ** mov ax,PMAX%
0779 ** cmp ax,CURRENTP%
077D ** jl $+03h
077F ** jmp I00042
0782 ** mov CURRENTP%,0001h
0788 002C END IF
0788 ** I00042: call B$LINA
078D 002C
078D 002C Exitsub:
078D ** I00041:
078D 002C END SUB
078D ** I00043: call B$LINA
0792 ** I00004: call B$EXSA
0797 ** ret 000Ch
079A 002C
079A 002C
079A ** I00003: call B$CENP
07A1 002C

43243 Bytes Available
41427 Bytes Free

0 Warning Error(s)
0 Severe Error(s)


  3 Responses to “Category : BASIC Source Code
Archive   : WDMQ0110.ZIP
Filename : PARSECMD.LST

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/