10 REM  VMAP2.BAS VERSION 2.0    10/24/83
20 '
30 DEFINT A-Z
40 OPTION BASE 0
50 VER$ = "2.0"
60 '
70 'SET-UP FOR OSBORNE 1    10/15/83    G. Dahl
80 '
90 COMP =  0 ' FLAG FOR COMPILED VERSION
100 IF COMP THEN N=350 ELSE N= 80 ' BLINK SPEED
110 WIDTH 52: PRINT CHR$(&H1A); ' WIDTH FOR OSBORNE, CLEAR SCREEN
120 PRINT TAB(8)"BASIC VARIABLE MAP PROGRAM,  Ver. "VER$:PRINT
130 PRINT TAB(8)"COPYRIGHT (C) 1983 BY GREGORY C. DAHL
140 IF COMP THEN PRINT TAB(7)CHR$(&H1B)CHR$(&H29)"PORTIONS COPYRIGHTED BY MICROSOFT, 1981"CHR$(&H1B)CHR$(&H28) ELSE PRINT
150 PRINT" This program is "CHR$(&H1B)CHR$(&H6C)"USER SUPPORTED SOFTWARE."CHR$(&H1B)CHR$(&H6D)"  If you
160 PRINT" find it useful and wish to encourage the develop-
170 PRINT" ment of new programs, you are invited to send a
180 PRINT" contribution to the author:
190 PRINT TAB(17) "Gregory C. Dahl
200 PRINT TAB(17)"4050 Arroyo Trail
210 PRINT TAB(17)"Carmel, CA  93923
220 PRINT" All contributors sending $10 or more will receive 
230 PRINT" a diskette with the latest version of this program 
240 PRINT" and its documentation, as well as other programs 
250 PRINT" by the same author.  Contribute as much as you feel
260 PRINT" the program is worth to you, and send your comments
270 PRINT" too!  Be sure to specify double or single density
280 PRINT" and the name of the program you want.
290 PRINT CHR$(&H1B)CHR$(&H29)"      (Offer subject to change without notice)" CHR$(&H1B)CHR$(&H28)
300 PRINT" This program is copyrighted and may not be sold 
310 PRINT" for profit without written permission from the
320 PRINT" author.  However, free copies may be made and 
330 PRINT" distributed without limitation.  Pass it around!
340 PRINT "           Press any key to continue...";
350 FOR I=1 TO N:A$=INKEY$:IF A$<>""THEN 390 ELSE NEXT I
360 PRINT CHR$(13)"                                       "CHR$(13);
370 FOR I=1 TO N:A$=INKEY$:IF A$<>""THEN 390 ELSE NEXT I
380 GOTO 340
390 PRINT CHR$(&H1A):PRINT:PRINT TAB(8)"BASIC VARIABLE MAP PROGRAM, Ver. "VER$:PRINT
400 IF COMP THEN PRINT  ELSE PRINT TAB(8)CHR$(&H1B)CHR$(&H29)"ALSO AVAILABLE IN A COMPILED VERSION":PRINT TAB(10)"WHICH RUNS ABOUT 15 TIMES FASTER"CHR$(&H1B)CHR$(&H28):PRINT:PRINT
410 '-------------------------------------------------------------
420 'INITIALIZATION SEGMENT 10/15/83 GCD
430 '
440 K=132: DIM K$(132) :'NUMBER OF BASIC COMMANDS IN DATA FILE
450 M=400: 'MAX NUMBER OF VARIABLES (CAPACITY)
460 DIM H(9) ' USED IN SORT ROUTINE
470 DIM V$(400), NL%(400), LL$(400), PA%(400), LN$(25), NT%(400), L2(25), L2$(25)
480 ' V$(M)    CONTAINS VARIABLE NAMES
490 ' NL%(M)   IS THE LAST LINE REFERENCE FOR EACH VARIABLE
500 ' LL$(M)   IS LINE REFERENCES, EACH 6 CHARACTERS 
510 ' PA%(M)   IS A VECTOR OF ASCENDING INTEGERS USED IN THE SORT ROUTINE
520 ' LN$(25)  IS STRINGS OF ALL LINE NUMBERS IN THE PROGRAM
530 '            (FOR VALIDITY CHECKS OF GOTO'S)
532 ' L2(25)   CONTAINS INDEX POINTERS TO V$ FOR OVERFLOW
533 '            LINE NUMBERS IN L2$
534 ' L2$(25)  IS OVERFLOW LINE NUMBERS WHICH DON'T FIT IN LL$
540 FOR I=1 TO K: READ K$(I): NEXT I: 'LOAD DATA K$
550 '
560 '----------------------------------------------------------
570 'BATCH BUILD SEGMENT, 10/15/83 GCD
580 '
590 INPUT "PROCESS LAST BATCH SETUP (Y/<N>) ";I$: IF I$="Y" OR I$="y" THEN GOTO 800
600 PRINT
610 OPEN "O",#1,"VMAPDATA"
620 PRINT"NOTE: THE INPUT FILE MUST BE IN ASCII FORMAT.":PRINT
630 INPUT"   INPUT FILE NAME               ";PN$
640 INPUT"   BEGIN AT LINE NUMBER <1>      ";X:IF X>0 THEN LB!=X ELSE LB!=1
650 INPUT"   END AT LINE NUMBER <65529>    ";X:IF X>0 THEN UB!=X ELSE UB!=65529!
660 INPUT"   DO YOU WANT A PRINTOUT (Y/<N>)";PT$:IF PT$="y" THEN PT$="Y"
670 PRINT"   DO YOU WANT TO WRITE
680 INPUT"        OUTPUT TO A FILE (Y/<N>) ";FOUT$:IF FOUT$="y" THEN FOUT$="Y"
690 FLNAME$="":IF FOUT$="Y" THEN INPUT"      NAME OF OUTPUT FILE:         ",FLNAME$
700 PRINT:PRINT"   ADD ANOTHER PROGRAM
710 INPUT"            TO THE BATCH? (Y/<N>)";I1$
720 IF I1$="y" THEN I1$="Y"
730 WRITE#1,PN$,LB!,UB!,PT$,I1$,FOUT$,FLNAME$
740 IF I1$<>"Y" THEN CLOSE: GOTO 800
750 PRINT: GOTO 630
760 '
770 '----------------------------------------------------
780 'MAPPING SEGMENT FOR BASIC FILES, 07/27/81, JWC
790 '
800 OPEN "I",#1,"VMAPDATA"
810 IF EOF(1) THEN CLOSE: END
820 FOR I=1 TO M:PA%(I)=I:NEXT I: 'COUNT 1 TO M PA%
830 DEF FNA$(A)=MID$(STR$(A),2)
840 INPUT#1,PN$,LB!,UB!,PT$,I1$,FOUT$,FLNAME$
850 IF INSTR(PN$,".")=0 THEN PN$=PN$+".BAS"
860 OPEN "I",#2,PN$
870 PRINT:PRINT:PRINT"*** LINES BEING PROCESSED:":
880 PRINT:PRINT"===> variable name [variable #] (# times on line)":PRINT:PRINT
890 IF EOF(2) THEN 930: 'END OF SOURCE FILE FINISH PROCESSING
900 S=0:H=0:O=0:Q=0:LINE INPUT#2,L$
910 GOSUB 1550 ' PROCESS A LINE
920 IF N+32767!<UB!GOTO 890 'N = LAST LINE NUMBER
930 PRINT:PRINT:PRINT"SORTING VARIABLES....... "
935 LN$(LNP)=LN$(LNP)+" "
940 GOSUB 2330
950 IF PT$="Y"THEN GOSUB 1210 : GOTO 1090 
960 PRINT:PRINT:PRINT "HIT RETURN WHEN READY FOR LISTING ON CRT ";
970 I$="": I$=INKEY$: IF I$="" GOTO 970: 'CONSOLE OUTPUT
980 PRINT:PRINT:PRINT"LIST OF VARIABLES FOR PROGRAM ";PN$:PRINT
990 FOR I=1 TO NF
1000 PRINT V$(I);: IF VAL(V$(I))>0 THEN GOSUB 1150: IF FLAG THEN PRINT CHR$(7) TAB(7) "**"; ' CHECK FOR INVALID LINE REF.
1005 LT$=LL$(PA%(I))
1010 PRINT TAB(14);"-";:J=2
1020 J2=J+35:IF J2>LEN(LT$) THEN J2=LEN(LT$):GOTO 1050
1030 FOR J3=J2 TO 1 STEP -1:IF MID$(LT$,J3,1)=" " THEN J2=J3:GOTO 1050
1040 NEXT J3
1050 PRINT TAB(16) MID$(LT$,J,J2-J+1):J=J2+1 ' PRINT LINE REFS.
1060 IF J<LEN(LT$) THEN GOTO 1020
1062 IF LEN(LT$)<244 THEN 1070
1064 FOR JQ=0 TO 25:IF L2(JQ)=PA%(I) AND L2$(JQ)<>LT$ THEN LT$=L2$(JQ):GOTO 1010
1068 NEXT JQ
1070 NEXT I
1080 PRINT:PRINT "  ** INDICATES AN INVALID LINE REFERENCE":PRINT
1090 CLOSE #2
1100 IF FOUT$="Y" THEN GOSUB 1390 ' FILE OUTPUT
1110 IF I1$<>"Y" THEN 2670
1120 GOTO 820
1130 '
1140 ' TEST VALIDITY OF LINE REF.
1150 FLAG=-1:FOR JQ=0 TO LNP : IF INSTR(LN$(JQ),STR$(VAL(V$(I)))+" ")>0 THEN FLAG=0:RETURN
1160 NEXT JQ: RETURN
1170 '
1180 '-----------------------------------------------
1190 'PRINTER SUBROUTINE
1200 '
1210 LC=0: GOSUB 1340
1220 FOR I=1 TO NF: LPRINT STR$(I)"." TAB(6);V$(I);: IF VAL(V$(I))>0 THEN GOSUB 1150: IF FLAG THEN LPRINT TAB(13) "**";:PRINT CHR$(7)"INVALID LINE REF  " V$(I)
1225 LT$=LL$(PA%(I))
1230 IF LC>60 THEN GOSUB 1330:GOSUB 1340 ' PAGINATION
1235 LPRINT TAB(18);"-";: J=2
1240 J2=J+60:IF J2>LEN(LT$) THEN J2=LEN(LT$):GOTO 1270
1250 FOR J3=J2 TO 1 STEP -1:IF MID$(LT$,J3,1)=" " THEN J2=J3:GOTO 1270
1260 NEXT J3
1270 LPRINT TAB(20) MID$(LT$,J,J2-J+1):J=J2+1:LC=LC+1 ' PRINT LINE REFS.
1280 IF J<LEN(LT$) THEN GOTO 1240
1282 IF LEN(LT$)<244 THEN 1290 ' CHECK FOR OVERFLOWS
1284 FOR JQ=0 TO 25:IF L2(JQ)=PA%(I) AND L2$(JQ)<>LT$ THEN LT$=L2$(JQ):GOTO 1230 ' PRINT OVERFLOW
1286 NEXT JQ
1290 LPRINT:LC=LC+1
1300 IF LC>58 THEN GOSUB 1330 :GOSUB 1340' PAGINATION
1310 NEXT I
1320 LPRINT:LPRINT "  ** INDICATES AN INVALID LINE REFERENCE"
1330 FOR IK=LC TO 65: LPRINT: NEXT IK: LC=0: RETURN: ' NEXT PAGE
1340  LPRINT:LPRINT:LPRINT TAB(5);"LIST OF VARIABLES FOR PROGRAM  "

;PN$;TAB(55) "LINES";NL+32767;"TO";N+32767:LPRINT:LC=LC+4: RETURN
1350 '
1360 '-------------------------------------------------------------
1370 'OUTPUT TO DISK SUBROUTINE
1380 '
1390 OPEN "O",#3,FLNAME$
1400 PRINT#3,TAB(5)"LIST OF VARIABLES FOR PROGRAM  "

PN$ TAB(55) "LINES" NL+32767! "TO" N+32767!:PRINT#3,
1410 FOR I=1 TO NF: PRINT#3,STR$(I)"." TAB(6);V$(I);: IF VAL(V$(I))>0 THEN GOSUB 1150: IF FLAG THEN PRINT#3,TAB(13) "**";:PRINT CHR$(7)"INVALID LINE REF  " V$(I)
1415 LT$=LL$(PA%(I))
1420 PRINT#3,TAB(18);"-";: J=2
1430 J2=J+60:IF J2>LEN(LT$) THEN J2=LEN(LT$):GOTO 1460
1440 FOR J3=J2 TO 1 STEP -1:IF MID$(LT$,J3,1)=" " THEN J2=J3:GOTO 1460
1450 NEXT J3
1460 PRINT#3,TAB(20) MID$(LT$,J,J2-J+1):J=J2+1' PRINT LINE REFS
1470 IF J<LEN(LT$) THEN GOTO 1430
1472 IF LEN(LT$)<244 THEN 1480
1474 FOR JQ=0 TO 25:IF L2(JQ)=PA%(I) AND L2$(JQ)<>LT$ THEN LT$=L2$(JQ):GOTO 1420
1476 NEXT JQ
1480 PRINT#3,
1490 NEXT I
1500 PRINT#3,:PRINT#3,"  ** INDICATES AN INVALID LINE REFERENCE":CLOSE#3:RETURN
1510 '
1520 '-------------------------------------------------------------
1530 'VARIABLE SEARCH SUBROUTINE
1540 '
1550 R=0:V=0:X=INSTR(L$," "):N=VAL(LEFT$(L$,X))-32767!:

S$=MID$(L$,X+1)
1560 FOR I=1 TO M:NT%(I)=0:NEXT I ' INITIALIZE NT%
1565 NLS=NLS+1:FL=FL+LEN(L$)+2 ' # LINES AND FILE LENGTH
1570 ' N is line # - 32767
1580 ' NT% IS # OF TIMES A VBLE APPEARS ON THIS LINE
1590 IF N+32767!>UB!THEN RETURN
1600 IF N+32767!<LB!THEN RETURN ELSE PRINT:PRINT L$:

PRINT "===> ";:IF NOT XN%THEN XN%=-1:NL=N ' CAPTURES FIRST LINE # FOR PRINTOUT
1610 LN$(LNP)=LN$(LNP)+STR$(N+32767):IF LEN(LN$(LNP))>248 THEN LN$(LNP)=LN$(LNP)+" ": LNP=LNP+1 ' ADD LINE # TO LN$
1620 IF LEFT$(S$,1)=" "THEN S$=MID$(S$,2):GOTO 1620
1630 IF INSTR(S$,"DATA")=1 THEN RETURN
1640 I=INSTR(S$,"OPTION BASE"): IF I<>0 THEN S$=LEFT$(S$,I-1)+MID$(S$,I+11) ' TAKE OUT "OPTION BASE"
1650 ' LOOP THROUGH LENGTH OF LINE, BY CHARACTER:
1660 FOR I=1 TO LEN(S$)
1670 ' IF LEN(S$)-I>1 THEN IF MID$(S$,I,3)="REM" THEN RETURN 'IGNORE REMARKS
1680 X$=MID$(S$,I,1):X=ASC(X$)
1690 ' V IS TRUE WHEN A VARIABLE HAS BEEN FOUND
1700 ' S IS FLAG FOR &
1710 ' H IS FLAG FOR &H (HEX NUMBER)
1720 ' O IS FLAG FOR &O (OCTAL NUMBER)
1730 ' Q IS FLAG FOR " STRING
1740 ' DISCARD HEX AND OCTAL NUMBERS:
1750 IF NOT S THEN 1810
1760 IF H THEN IF(X=>48 AND X<=57)OR(X=>65 AND X<=70)

THEN 1950 ELSE H=0:S=0:GOTO 1810 ' CHECK FOR 0-9,A-F
1770 IF O THEN IF(X=>48 AND X<=57)THEN 1950 ELSE O=0:S=0:GOTO 1810
1780 IF X=72 AND NOT H THEN H=-1:GOTO 1950 ' CHECK FOR H
1790 IF X=79 AND NOT O THEN O=-1:GOTO 1950 ELSE S=0:H=0:O=0 'CHECK FOR O
1800 ' END CHECK FOR HEX, OCTAL.  CHECK FOR ":
1810 IF X=34 THEN IF Q THEN Q=0:V$="":GOTO 1950 ELSE Q=-1:GOTO 1950
1820 IF Q THEN 1950
1830 IF X=39 THEN RETURN: 'REMARK BEGINNING WITH '
1840 IF X=38 THEN S=-1:GOTO 1950 ' CHECK FOR &
1850 IF X=35 THEN IF V$="WRITE" OR V$="INPUT" OR V$="PRINT" OR V$="CLOSE" THEN V$=X$:GOTO 1950 'CHECK FOR WRITE#n, ETC.
1860 IF(X=>48 AND X<=57) OR (X=>65 AND X<=90) OR X=46 THEN IF V THEN V$=V$+X$: GOTO 1950 ELSE V$=X$:V=-1:GOTO 1950 ' VLBES COMPOSED OF 0-9,A-Z OR .
1870 IF X=35 AND NOT V THEN V$=X$:V=-1:GOTO 1950
1880 IF X=35 OR X=36 OR X=37 OR X=33 THEN V$=V$+X$: GOTO 1910 '!#$% TERMINATE VBLE NAME
1890 ' IF X=40 AND V THEN V$=V$+X$
1900 IF NOT V THEN 1950
1910 GOSUB 2000:V=0
1920 IF JZ<5 AND NOT R THEN GFLAG=-1 ELSE GFLAG=0 'SET GFLAG IF RESERVED WORD IS A GOTO, GOSUB, ETC.
1930 ' JZ IS POSITION OF RESERVED WORD IN K$
1940 IF R THEN RETURN ' R IS FLAG FOR REM OR DATA
1950 NEXT I:IF NOT V THEN RETURN
1960 '
1970 '------------------------------------------------------
1980 'KEYWORD COMPARE SUBROUTINE
1990 '
2000 IF V$="REM"OR V$="DATA"THEN R=-1
2010 ' STOP ' DEBUG  * * * * * * * * *
2020 IF NOT GFLAG THEN 2050
2030 GFLAG=0:IF VAL(V$)>0 THEN JZ=50: GOTO 2130 'TREAT NUMBERS AFTER GOTO, ETC., AS VARIABLE
2040 ' GET RID OF NUMBERS:
2050 IF VAL(V$)<>0 OR LEFT$(V$,1)="0" OR LEFT$(V$,1)="." THEN V$=MID$(V$,2):GOTO 2050
2060 IF V$="(" OR V$="" OR V$="!" OR V$="%" OR V$="#" THEN RETURN
2070 ' LOOP THROUGH RESERVED WORDS:
2080 FOR J=1 TO K:IF INSTR(V$,K$(J)) =0 THEN 2100
2090 IF V$=K$(J)THEN JZ=J:RETURN: 'RESERVED WORD FOUND
2100 NEXT J: JZ=J
2110 ' IF HAVEN'T RETURNED BY NOW, WE HAVE A VARIABLE
2120 ' IF IN%THEN PRINT";";:ELSE IN%=-1 ' prints ; except at beginning
2130 IF NF=0 THEN 2230
2140 FOR J=1 TO NF ' SEE IF VBLE ALREADY IN TABLE
2150 IF V$<>V$(J)THEN 2210
2160 NT%(J)=NT%(J)+1:PRINT V$;"(";FNA$(NT%(J));")  ";
2170 IF NL%(J)<>N THEN GOTO 2270 ' FIRST APPEARANCE OF VBLE ON LINE
2171 ' PUT LL$(J) IN TEMPORARY STRING LT$; GO TO OVERFLOW IF NECESSARY
2172 LT$=LL$(J):IF LEN(LT$)<245 THEN 2178
2174 FOR JT=25 TO 0 STEP -1 :IF L2(JT)=J THEN LT$=L2$(JT):GOSUB 2180:L2$(JT)=LT$:RETURN
2176 NEXT JT
2178 GOSUB 2180: LL$(J)=LT$:RETURN
2180 IF RIGHT$(LT$,1)<>")" THEN LT$=LT$+"("+FNA$(NT%(J))+")":RETURN ' SECOND OCCURRENCE OF VLBE ON LINE
2190 FOR JQ=2 TO 4:IF MID$(LT$,LEN(LT$)-JQ,1)="(" THEN LT$=LEFT$(LT$,LEN(LT$)-JQ)+FNA$(NT%(J))+")":RETURN '3rd OR HIGHER OCCURRENCE
2200 NEXT JQ:RETURN
2210 NEXT J
2220 IF NF=M OR FRE("")<500 THEN PRINT:PRINT"OUT OF ROOM FOR VARIABLES, ";

"CONTINUE NEXT RUN...":GOTO 930
2230 NF=NF+1:PRINT V$;"[";FNA$(NF);"]  ";
2240 V$(NF)=V$: NT%(J)=1
2250 J=NF
2260 ' ADD CURRENT LINE NUMBER TO LL$ FOR THIS VBLE:
2270 IF LEN(LL$(J))<245 THEN LL$(J)=LL$(J)+STR$(N+32767):GOTO 2280
2271 ' FIND THIS VARIABLE IN OVERFLOW LINE BUFFER L2$
2272 FOR JQ=0 TO 25:IF L2(JQ)=J AND LEN(L2$(JQ))<245 THEN 2278
2274 IF L2(JQ)=0 THEN L2(JQ)=J:GOTO 2278
2276 NEXT JQ:PRINT CHR$(7)"OVERFLOW BUFFER FOR LINE NUMBERS IS FULL.":PRINT "MAP YOUR PROGRAM IN SEGMENTS.":GOTO 2670
2278 IF LEN(L2$(JQ))<245 THEN L2$(JQ)=L2$(JQ)+STR$(N+32767) ELSE PRINT CHR$(7) "OVERFLOW LINE BUFFER FOR "V$"IS FULL":PRINT"LINE "N+32767"   STOPPING.":GOTO 2670
2280 NL%(J)=N:RETURN
2290 '
2300 '-----------------------------------------------------------
2310 'SORT SUBROUTINE
2320 '
2330 H(1)=1: H(2)=4: H(3)=13: T=1
2340 IF H(T+2)<5000 THEN T=T+1:H(T+2)=3*H(T+1)+1:GOTO 2340
2350 IF NF=0 THEN RETURN ELSE FOR T=1 TO 6:IF H(T+2)<NF THEN NEXT
2360 FOR S=T TO 1 STEP -1:H=H(S):FOR JJ=H TO NF
2370 V$=V$(JJ):PA%=PA%(JJ):FOR II=JJ-H TO 0 STEP -H
2380 TEST=0:IF VAL(V$)=0 AND VAL(V$(II))=0 AND V$<V$(II) THEN TEST=-1
2390 IF VAL(V$)<>0 AND VAL(V$(II))<>0 AND VAL(V$)<VAL(V$(II)) THEN TEST = -1
2400 IF VAL(V$(II))<>0 AND VAL(V$)=0 THEN TEST=-1 ' V$(II) A LINE # AND V$ A VBLE.
2410 IF TEST THEN V$(II+H)=V$(II):PA%(II+H)=PA%(II):NEXT
2420 V$(II+H)=V$:PA%(II+H)=PA%:NEXT JJ,S
2430 RETURN
2440 '
2450 '------------------------------------------
2460 ' MICROSOFT BASIC RESERVED WORDS
2470 DATA GOTO,GOSUB,THEN,ELSE
2480 ' THESE GOTO STATEMENTS MUST BE FIRST!
2490 DATA ABS,AND,ASC,ATN,AUTO,CALL,CDBL,CHAIN,CHR$,CINT,CLEAR,CLOAD,CLOSE
2500 DATA COMMON,CONT,COS,CSAVE,CSNG,CVD,CVI,CVS,DATA,DEF
2510 DATA DEFDBL,DEFINT,DEFSNG,DEFSTR,DELETE,DIM,EDIT,END
2520 DATA EOF,EQV,ERASE,ERL,ERR,ERROR,EXP,FIELD,FILES,FIX,FOR
2530 DATA FRE,GET,HEX$,IF,IMP,INKEY$,INP,INPUT,INPUT$,INSTR
2540 DATA INT,KILL,LEFT$,LEN,LET,LINE,LIST,LLIST,LOAD,LOC,LOF,LOG,LPOS
2550 DATA LPRINT,LSET,MERGE,MID$,MKD$,MKI$,MKS$,MOD,NAME,NEW,NEXT,NOT,NULL
2560 DATA OCT$,ON,OPEN,OPTION,OR,OUT,PEEK,POKE,POS,PRINT,PUT,RANDOMIZE
2570 DATA READ,REM,RENUM,RESET,RESTORE,RESUME,RETURN,RIGHT$,RND
2580 DATA RSET,RUN,SAVE,SGN,SIN,SPACE$,SPC,SQR,STEP,STOP,STR$,STRING$
2590 DATA SWAP,SYSTEM,TAB,TAN,TO,TROFF,TRON,USING,USR,VAL,VARPTR,WAIT
2600 DATA WEND,WHILE,WIDTH,WRITE,XOR
2610 ' 132 entries
2620 ' LIST RESERVED WORDS:
2630 LPRINT "MICROSOFT BASIC RESERVED WORDS:":LPRINT:LPRINT
2640 FOR J=1 TO K/3:LPRINT STR$(J)"."TAB(7)K$(J)TAB(25)STR$(J+K/3)"."TAB(31)K$(J+K/3)TAB(50)STR$(J+2*K/3)"."TAB(56)K$(J+2*K/3):NEXT J
2650 END
2660 ' CLOSING
2670 PRINT:PRINT:PRINT "MEMORY USE STATISTICS:
2680 PRINT:PRINT
2690 PRINT"   FREE MEMORY:           " FRE(""):PRINT
2700 PRINT"   VARIABLES FOUND:       " NF TAB(37) "MAX: " M
2710 PRINT
2720 PRINT"   LINE # LIST STRINGS:   " LNP TAB(37) "MAX:  25":PRINT
2730 PRINT"   # OF LINES PROCESSED:  " NLS:PRINT
2740 PRINT"   LENGTH OF PROGRAM FILE:" FL
2760 PRINT:PRINT:PRINT"      * * *  END OF PROGRAM  * * *":END
SSED:  " NLS:PRINT
2740 PRINT"   LENGTH OF PROG