home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
BBSING
/
RBBS
/
RBBS40.LBR
/
RBBS40.BQS
/
RBBS40.BAS
Wrap
BASIC Source File
|
2000-06-30
|
25KB
|
649 lines
10 DEFINT A-Z
20 DIM A$(25),M(150,2)
30 '
40 VERS2$=" Version 4.0, 1/11/85 "
50 SYS3$="SYSOP"
60 PC$="What is the DRI Debugger"
70 DSK$="A:":ERS$=CHR$(8)+" "+CHR$(8):BSL$=CHR$(8)+"/"+CHR$(8)
80 ANS1$=" >> Not a verified user << "
90 TWIT$=" "
100 BEEP=10000
110 SIZE=24
120 POKE 0,&HCD
130 INC=1
140 ON ERROR GOTO 4660
150 RFLG=PEEK(&H5D):POKE &H5D,&H20
160 RTNOKFLG=PEEK(&H5B):POKE &H5B,120
170 SELC$="0"
180 MSGS=1:CALLS=MSGS+1:MNUM=CALLS+1:NW=0
190 OPEN "I",1,"A:PWDS":IF EOF(1) THEN 220
200 '
210 INPUT #1,P1$,VAP$,P2$,P3$,PC$,DSK$,DSK2$,TWIT$,BEEP,SIZE,VERS1$,SYS1$,SYS2$
220 CLOSE #1
230 BK=0:GOSUB 4440:A$=VERS1$:N=1:GOSUB 4440
240 PRINT:PRINT
250 BEL=-1:XPR=0
260 A$=VERS2$:N=1:GOSUB 4440:GOSUB 4440:GOSUB 4440:SAV$=""
270 IF RFLG<>ASC("P") THEN 370
280 IF RTNOKFLG<>ASC("x") THEN 370
290 V=0:INC=0
300 OPEN "I",1,DSK2$+"LASTCALR":INPUT #1,N$,O$:CLOSE
310 A$="Welcome back, "
320 IF N$<>SYS3$ THEN 340
330 CN$=N$:O$="":CO$=O$:A$=A$+N$+".":GOSUB 4440:GOSUB 4440:V=1:GOTO 750
340 GOSUB 6060:V=1
350 A$=A$+CN$+" "+CO$+".":GOSUB 4440:GOSUB 4440
360 T01$=N$:T02$=O$:GOSUB 5540:MF$=MFJ$:GOTO 750
370 IF NOT BK THEN NW=1
380 GOSUB 4440:BK=0
390 GOSUB 4440
400 A1$="Enter your FIRST Name: ":N=1:GOSUB 4440
410 C=1:GOSUB 4550:N$=B$:IF N$="" THEN 400
420 IF N$=P1$ THEN POKE &H5B,0:GOTO 1460
430 IF N$<"A" OR LEN(N$)=1 THEN 400
440 A1$="Enter your LAST Name: ":N=1:GOSUB 4440
450 C=1:IF N$=SYS3$ THEN C=2
460 GOSUB 4550:O$=B$:IF O$="" THEN 400
470 IF O$<"A" OR LEN(O$)=1 THEN 400
480 IF N$=SYS3$ AND O$=P2$ THEN O$="":CN$=N$:CO$="":GOTO 700
490 IF N$=SYS3$ THEN 400
500 A$="Checking User file...":GOSUB 4440
510 V=0:T01$=N$:T02$=O$:OK=0:GOSUB 5540:IF OK THEN MF$=MFJ$:GOTO 520 ELSE 560
520 T=0
530 T=T+1:IF T=4 THEN 3850 ELSE A1$="Enter your PASSWORD: "
540 N=1:GOSUB 4440:C=2:GOSUB 4550:UPW$=B$:IF UPW$="" THEN 530
550 IF UPW$=S04$ THEN 700 ELSE 530
560 A1$="Are you a New User? ":GOSUB 5740
570 IF NOT OK THEN A$="OK, let's try again.":GOSUB 4440:GOTO 400
580 V=1:GOSUB 5370
590 A1$="Enter YOUR City, State: ":N=1:GOSUB 4440
600 C=1:GOSUB 4550:S03$=B$:IF S03$="" THEN 590
610 GOSUB 6060
620 A$="Hello "+CN$+" "+CO$+" from "+S03$:GOSUB 4440
630 A1$="Is anything misspelled? ":GOSUB 5740:IF OK THEN 400
640 HM=0:S05$=STR$(HM):S$=" "+N$+";"+O$+";"+S03$+";"+S04$+";"+S05$
650 OPEN "R",1,DSK$+"USERS",62:FIELD#1,62 AS RR$
660 RL=62:GOSUB 4770:NU=NU+1:PUT#1,NU+1:S$=STR$(NU):GOSUB 4770:PUT#1,1:CLOSE
670 FIL$="NEWCOM":GOSUB 4920
680 FIL$="INFO":GOSUB 4920
690 FIL$="BULLETIN":GOSUB 4920:MF$=" "
700 A$="Logging name to disk...":GOSUB 4440:RE=1
710 OPEN "R",1,DSK$+"CALLERS",60:FIELD#1,60 AS RR$:GET#1,1:RE=VAL(RR$)+1
720 S$=STR$(RE):RL=60:GOSUB 4770:PUT#1,1:RE=RE+1
730 S$=N$+" "+O$+" "+S03$:GOSUB 4770:PUT#1,RE:CLOSE#1
740 OPEN "O",1,DSK2$+"LASTCALR":PRINT #1,N$;",";O$:CLOSE
750 PRINT
760 IF MF$<>"*" GOTO 780
770 IF TWIT$="*" THEN GOTO 6370
780 IF V=0 THEN IF N$<>SYS3$ THEN GOSUB 6060
790 BK=0:GOSUB 4440:CN=1:M=0:U=0
800 OPEN "R",1,DSK2$+"COUNTERS."+SELC$,5:FIELD#1,5 AS RR$
810 GET#1,CALLS:CN=VAL(RR$)+INC
820 GET#1,MSGS:M=VAL(RR$)
830 GET#1,MNUM:U=VAL(RR$)
840 A$="You are User number: ":N=1:GOSUB 4440
850 A$=STR$(CN):LSET RR$=A$
860 A$=SPACE$(4-LEN(STR$(CN)))+STR$(CN):GOSUB 4440:PUT#1,CALLS:GOSUB 4440
870 A$="Number of Active Messages: ":N=1:GOSUB 4440
880 A$=SPACE$(4-LEN(STR$(M)))+STR$(M):GOSUB 4440
890 A$="Last System Message Number: ":N=1:GOSUB 4440
900 A$=SPACE$(4-LEN(STR$(U)))+STR$(U):GOSUB 4440:CLOSE
910 GOSUB 4440:IHM=HM
920 FT=-1:MX=0:MZ=0:IU=0:CNT=0:G=0
930 OPEN "R",1,DSK2$+"SUMMARY."+SELC$,30:RE=1:FIELD#1,28 AS RR$
940 BK=0:GET#1,RE:IF EOF(1) THEN 1090
950 G=VAL(RR$):MZ=MZ+1:M(MZ,1)=G:IF G=0 THEN 1080
960 IF IU=0 THEN IU=G
970 IF G>9998 THEN MZ=MZ-1:GOTO 1090
980 GET#1,RE+3:GOSUB 4800
990 I=INSTR(S$," "):IF I=0 THEN S1$=S$:S2$="":GOTO 1010
1000 S1$=LEFT$(S$,I-1):S2$=MID$(S$,I+1)
1010 IF S1$=N$ AND S2$=O$ THEN 1050
1020 IF N$<>SYS3$ THEN 1080
1030 IF S1$<>SYS1$ AND S2$<>SYS2$ THEN 1080
1040 IF S2$<>SYS2$ THEN 1080
1050 IF NOT FT THEN 1070
1060 GOSUB 4440:A$=CN$+", you have mail:":GOSUB 4440:GOSUB 4440:FT=0
1070 RX=RE:GOSUB 3410:RE=RX:CNT=CNT+1
1080 GET#1,RE+5:M(MZ,2)=VAL(RR$):MX=MX+M(MZ,2)+6:RE=RE+6:GOTO 940
1090 IF CNT=0 THEN 1130 ELSE GOSUB 4440:A$="Please [R]etrieve and [K]ill "
1100 IF CNT=1 THEN A$=A$+"this message."
1110 IF CNT>1 THEN A$=A$+"these messages."
1120 GOSUB 4440:GOSUB 4440
1130 CLOSE
1140 '
1150 A1$="Command: "
1160 IF NOT XPR THEN A1$=A1$+"B,E,R,S,K,G,J,U,T,X,P,C,N,O (or ?): "
1170 N=1:GOSUB 4440:C=1:GOSUB 4550
1180 IF B$="" THEN 1150
1190 FF=INSTR("BER?SKGJUTXPXOC",B$):GOSUB 1200:GOTO 1150
1200 IF FF=0 THEN 1220
1210 ON FF GOTO 1500,1540,2620,1520,3070,3920,3610,1270,4270,4900,4880,5460,6070,6390,6070
1220 '
1230 IF B$="N" THEN GOSUB 6340:RETURN
1240 GOSUB 4440
1250 A$="I don't understand '"+B$+"', "+CN$+".":GOSUB 4440:GOSUB 4440
1260 SAV$="":RETURN
1270 '
1280 IF N$=SYS3$ THEN 1340
1290 IF MF$="&" THEN 1340
1300 PRINT
1310 PRINT">>Not a verified user<<"
1320 PRINT
1330 GOTO 1140
1340 GOSUB 4440:T=0
1350 IF N$=SYS3$ THEN 1470
1360 IF MF$<>"*" THEN 1380
1370 A$=ANS1$:GOSUB 4440:SAV$="":RETURN
1380 IF P3$="NOPASS" THEN 1420
1390 T=T+1:IF T=2 THEN GOSUB 4440:GOSUB 4440:RETURN
1400 A1$=PC$:N=1:GOSUB 4440:C=2:GOSUB 4550
1410 IF B$="" OR B$<>P3$ THEN 1390
1420 IF XPR THEN 1450
1430 GOSUB 4440:FIL$="ENTERCPM":NW=1:GOSUB 4920:GOSUB 4440
1440 '
1450 IF IHM<>HM THEN MFJ$=MF$:GOSUB 5710
1460 GOSUB 3680
1470 POKE 4,0
1480 A$="Entering CP/M...":GOSUB 4440
1490 POKE 0,&HC3:SYSTEM
1500 '
1510 FIL$="BULLETIN":GOSUB 4920:RETURN
1520 '
1530 FIL$="MENURBBS":GOSUB 4920:GOSUB 4440:RETURN
1540 '
1550 IF N$=SYS3$ OR MF$="!" OR MF$="&" OR MF$="#" THEN GOTO 1580
1560 GOSUB 4440:GOSUB 4440
1570 A$=ANS1$:GOSUB 4440:GOSUB 4440:SAV$="":RETURN
1580 F=0:GOSUB 4440:V=0
1590 OPEN "R",1,DSK2$+"COUNTERS."+SELC$,5
1600 FIELD#1,5 AS RR$:GET#1,MNUM:V=VAL(RR$)
1610 A$="Msg # will be ":N=1:GOSUB 4440
1620 A$=STR$(V+1):GOSUB 4440:CLOSE
1630 GOSUB 4440
1640 A1$="Today's Date/Time (MM/DD|HH:MM) ":N=1:GOSUB 4440:GOSUB 4550
1650 IF B$="" THEN 1640 ELSE D$=B$
1660 IF LEN(D$) >11 THEN PRINT"Please use correct format ":GOTO 1640
1670 A1$="To (RETURN for ALL): ":N=1:GOSUB 4440
1680 C=1:GOSUB 4550:IF B$="" THEN T$="ALL" ELSE T$=B$
1690 GOSUB 5920:IF NOT OK THEN 1670
1700 GOSUB 6010
1710 A1$="Subject: ":N=1:GOSUB 4440
1720 C=0:GOSUB 4550:IF B$="" THEN 1710 ELSE K$=B$:
1730 IF LEN(K$)>26 THEN PRINT "Too long... 25 character limit":GOTO 1710
1740 A1$="Password ('*' for Private): ":N=1:GOSUB 4440
1750 C=1:GOSUB 4550:PW$=B$
1760 IF T$<>"ALL" OR LEFT$(PW$,1)<>"*" THEN 1780
1770 A$="Cannot use '*' with ALL.":GOSUB 4440:GOTO 1740
1780 IF XPR THEN 1830
1790 GOSUB 4440
1800 SIZE$=STR$(SIZE)
1810 A$="Enter up to"+SIZE$+" lines of text (NO semicolons).":GOSUB 4440
1820 A$="When finished, hit two <CR>'s in a row.":GOSUB 4440
1830 GOSUB 4440:F=0
1840 IF F=SIZE THEN A$="Message full.":GOSUB 4440:GOTO 1910
1850 F=F+1
1860 A1$=SPACE$(3-LEN(STR$(F)))+STR$(F)+"> ":N=1:GOSUB 4440
1870 GOSUB 4550:IF B$="" THEN F=F-1:IF F=0 THEN 2070 ELSE 1910
1880 IF F=SIZE-2 THEN PRINT "(2 lines left)"
1890 IF F=SIZE-1 THEN PRINT "(Last line)"
1900 A$(F)=B$+" ":GOTO 1840
1910 GOSUB 4440
1920 A1$="Select: (H)eader, (L)ist, (E)dit, (A)bort, (C)ontinue, (S)ave: "
1930 IF XPR THEN A1$="H,L,E,A,C,S: "
1940 N=1:GOSUB 4440:C=1:GOSUB 4550
1950 IF B$="" THEN 1920
1960 FF=INSTR("HLEACS",B$):IF FF=0 THEN 1920
1970 ON FF GOTO 2080,1980,2210,2070,1840,2310
1980 GOSUB 4420:GOSUB 4440
1990 A$="Time/Date: "+D$:GOSUB 4440
2000 A$="To: "+TX$:GOSUB 4440
2010 A$="Re: "+K$:GOSUB 4440
2020 A$="PW: "+PW$:GOSUB 4440
2030 GOSUB 4460
2040 FOR L=1 TO F:A$=SPACE$(3-LEN(STR$(L)))+STR$(L)+": "+A$(L)
2050 IF BK THEN 1910 ELSE GOSUB 4440:NEXT L
2060 GOSUB 4440:GOTO 1910
2070 GOSUB 4440:A$="Aborted":GOSUB 4440:GOSUB 4440:RETURN
2080 GOSUB 4440:A$="Enter replacement or RETURN for no change.":GOSUB 4440
2090 A1$="Date: "+D$+": ":N=1:GOSUB 4440:GOSUB 4550
2100 IF B$<>"" THEN D$=B$
2110 A1$="To: "+TX$+": ":N=1:GOSUB 4440:C=1:GOSUB 4550
2120 IF B$="" THEN 2150
2130 TSV$=T$:T$=B$:GOSUB 5920:IF NOT OK THEN T$=TSV$:GOTO 2110
2140 GOSUB 6010
2150 A1$="Re: "+K$+": ":N=1:GOSUB 4440:C=0:GOSUB 4550
2160 IF B$<>"" THEN K$=B$
2170 A1$="PW: "+PW$+": ":N=1:GOSUB 4440:C=1:GOSUB 4550
2180 IF B$="" THEN 1910
2190 IF T$<>"ALL" OR LEFT$(B$,1)<>"*" THEN PW$=B$:GOTO 1910
2200 A$="Cannot use '*' with ALL.":GOSUB 4440:GOTO 2170
2210 IF XPR THEN 2250
2220 GOSUB 4440
2230 A$="Enter Line # to change (<CR> or 0 to end).":GOSUB 4440
2240 A$="Then enter replacement or <CR> for no change.":GOSUB 4440
2250 GOSUB 4440:A1$="Line Number: ":N=1:GOSUB 4440:C=3:GOSUB 4550
2260 L=VAL(B$):IF L=0 OR L>F THEN GOSUB 4440:GOTO 1910
2270 A$=" was:":GOSUB 4440
2280 A$=SPACE$(3-LEN(STR$(L)))+STR$(L)+": "+A$(L):GOSUB 4440
2290 A1$=SPACE$(3-LEN(STR$(L)))+STR$(L)+": ":N=1:GOSUB 4440:GOSUB 4550
2300 IF B$="" THEN 2250 ELSE A$(L)=B$+" ":GOTO 2250
2310 '
2320 IF PW$<>"" THEN PW$=";"+PW$
2330 A$="Updating Summary file, ":N=1:GOSUB 4440
2340 OPEN "R",1,DSK2$+"SUMMARY."+SELC$,30
2350 RE=1:FIELD#1,30 AS RR$:RL=30
2360 RE=MZ*6+1:S$=STR$(V+1)+PW$:GOSUB 4770:PUT#1,RE
2370 RE=RE+1:S$=D$:GOSUB 4770:PUT#1,RE
2380 RE=RE+1:S$=N$+" "+O$:GOSUB 4770:PUT#1,RE
2390 RE=RE+1:S$=T$:GOSUB 4770:PUT#1,RE
2400 RE=RE+1:S$=K$:GOSUB 4770:PUT#1,RE
2410 RE=RE+1:S$=STR$(F):GOSUB 4770:PUT#1,RE
2420 RE=RE+1:S$=" 9999":GOSUB 4770:PUT#1,RE
2430 CLOSE#1
2440 A$="Next Message #, ":N=1:GOSUB 4440:VV=0
2450 OPEN "R",1,DSK2$+"COUNTERS."+SELC$,5:FIELD#1,5 AS RR$:GET#1,MNUM
2460 LSET RR$=STR$(V+1):PUT#1,MNUM
2470 A$="Active Messages, ":N=1:GOSUB 4440
2480 GET#1,MSGS:VV=VAL(RR$)
2490 LSET RR$=STR$(VV+1):PUT#1,MSGS:CLOSE#1
2500 A$="and Message file.":N=1:GOSUB 4440
2510 OPEN "R",1,DSK2$+"MESSAGES."+SELC$,65
2520 RL=65:FIELD#1,65 AS RR$:RE=MX+1
2530 S$=STR$(V+1)+PW$:GOSUB 4770:PUT#1,RE
2540 RE=RE+1:S$=D$:GOSUB 4770:PUT#1,RE
2550 RE=RE+1:S$=N$+" "+O$:GOSUB 4770:PUT#1,RE
2560 RE=RE+1:S$=T$:GOSUB 4770:PUT#1,RE
2570 RE=RE+1:S$=K$:GOSUB 4770:PUT#1,RE
2580 RE=RE+1:S$=STR$(F):GOSUB 4770:PUT#1,RE
2590 RE=RE+1
2600 FOR P=1 TO F:S$=A$(P):GOSUB 4770:PUT#1,RE:RE=RE+1:NEXT P:S$=" 9999":GOSUB 4770:PUT#1,RE:CLOSE#1:MX=MX+F+6:MZ=MZ+1:M(MZ,1)=V+1:M(MZ,2)=F
2610 GOSUB 4440:GOSUB 4440:U=U+1:RETURN
2620 '
2630 FT=-1:G=0
2640 GOSUB 4440
2650 A2$="Retrieve":GOSUB 3030
2660 IF LEN(B$)=0 THEN M=0 ELSE M=VAL(B$)
2670 IF M<1 THEN GOSUB 4440:RETURN
2680 IF M>U THEN GOSUB 5790:GOTO 2640
2690 OPEN "R",1,DSK2$+"MESSAGES."+SELC$,65
2700 RE=1:FIELD#1,65 AS RR$:MI=0
2710 MI=MI+1:IF (MI>MZ) OR BK THEN 3010 ELSE G=M(MI,1)
2720 IF MI=M AND G=0 THEN PRINT MI;" is deleted."
2730 IF G<M THEN RE=RE+M(MI,2)+6:GOTO 2710
2740 IF G>M THEN 2960
2750 GOSUB 5000:IF OK OR NOT PERS THEN 2760 ELSE PRINT MI;" is personal.":RE=RE+M(MI,2):GOTO 2710
2760 RE=RE+1:GET#1,RE:GOSUB 4800:D$=S$
2770 RE=RE+1:GET#1,RE:GOSUB 4800:NO$=S$
2780 RE=RE+1:GET#1,RE:GOSUB 4800:T$=S$
2790 RE=RE+1:GET#1,RE:GOSUB 4800:GOSUB 5080:K$=S$
2800 RE=RE+1:GET#1,RE:J=VAL(RR$):GOSUB 4440
2810 IF FT THEN GOSUB 4420:GOSUB 4440:FT=0
2820 A$="Msg #:"+STR$(G):GOSUB 4440
2830 A$="Time/Date: "+D$:GOSUB 4440
2840 T01$=NO$:T02$="":TX$=NO$
2850 I=INSTR(NO$," "):IF I>0 THEN T01$=LEFT$(NO$,I-1):T02$=MID$(NO$,I+1)
2860 IF T01$<>SYS3$ THEN GOSUB 6030
2870 A$="From: "+TX$:GOSUB 4440
2880 T01$=T$:T02$="":TX$=T$
2890 I=INSTR(T$," "):IF I>0 THEN T01$=LEFT$(T$,I-1):T02$=MID$(T$,I+1)
2900 GOSUB 6010
2910 A$="To: "+TX$:GOSUB 4440
2920 A$="Re: "+K$:GOSUB 4440:GOSUB 4440
2930 RE=RE+1:FOR P=1 TO J:GET#1,RE:GOSUB 4800:A$=S$:GOSUB 4440
2940 IF BK THEN BK=0:GOTO 2960
2950 RE=RE+1:NEXT P:GOSUB 4440
2960 IF RIGHT$(B$,1)="+" THEN 2990
2970 IF G>HM THEN HM=G
2980 CLOSE:GOTO 2640
2990 M=M+1:MI=0:RE=1
3000 IF M<=U AND NOT BK THEN 2710
3010 IF G>HM THEN HM=G
3020 CLOSE:A$="End of Messages.":GOSUB 4440:GOSUB 4440:D$="":NO$="":RETURN
3030 PRINT
3040 A1$="Message Number: ("+STR$(IU)+"-"+STR$(U)+")"
3050 IF NOT XPR THEN A1$=A1$+" to "+A2$+" (RETURN to quit)"
3060 A1$=A1$+" : ":N=1:GOSUB 4440:GOSUB 4550:GOSUB 4440:RETURN
3070 GOSUB 4440
3080 A2$="Start":GOSUB 3030
3090 IF LEN(B$)=0 THEN M=0:GOSUB 4440:RETURN ELSE M=VAL(B$):GOSUB 4530
3100 IP=INSTR(B$,","):IF IP>0 THEN B$=MID$(B$,IP+1) ELSE ST=0:GOTO 3150
3110 IF LEN(B$)<3 THEN RETURN
3120 IF MID$(B$,2,1)<>"=" THEN RETURN
3130 SV$=MID$(B$,3):B$=LEFT$(B$,1):ST=INSTR("FTS",B$)
3140 IF ST=0 THEN RETURN
3150 IF M<1 THEN RETURN
3160 IF M>U THEN GOSUB 5790:RETURN
3170 GOSUB 4420:GOSUB 4440
3180 OPEN "R",1,DSK2$+"SUMMARY."+SELC$,30:RE=1:FIELD #1,28 AS RR$
3190 GET #1,RE
3200 GOTO 3270
3210 IF PERS THEN PRINT" ";G;" is personal/deleted."
3220 GOTO 3250
3230 IF (RE+5)/6 <M THEN 3250
3240 PRINT" ";(RE+5)/6;" is deleted."
3250 RE=RE+6
3260 GOTO 3190
3270 IF EOF(1) OR BK THEN 3380 ELSE G=VAL(RR$)
3280 IF G>9998 THEN 3380
3290 IF G=0 THEN 3230
3300 IF G<M THEN 3250
3310 GOSUB 4990:IF OK OR NOT PERS THEN 3320 ELSE GOTO 3210
3320 GET #1,RE+ST+1
3330 IF ST=0 THEN 3350
3340 GOSUB 4800:CY$=S$:GOSUB 5860:IF INSTR(CY$,SV$)=0 THEN GOTO 3230
3350 GOSUB 3410
3360 IF BK THEN 3380
3370 IF U=G OR BK THEN 3380 ELSE RE=RE+2:GOTO 3190
3380 GOSUB 4440
3390 A$="*** End of Scan ***":GOSUB 4440:GOSUB 4440:GOSUB 4440
3400 CLOSE:RETURN
3410 '
3420 A$=SPACE$(4-LEN(STR$(G)))+STR$(G)+": "
3430 GET #1,RE+5:GOSUB 4800
3440 A$=A$+SPACE$(3-LEN(STR$(VAL(S$))))+STR$(VAL(S$))+" "
3450 RE=RE+1:GET #1,RE:GOSUB 4800
3460 A$=A$+S$+" "
3470 RE=RE+1:GET #1,RE:GOSUB 4800
3480 I=INSTR(S$," "):IF I>0 THEN S$=MID$(S$,I+1)
3490 IF LEN(S$) > 8 THEN S$=LEFT$(S$,8)
3500 IF S$<>SYS3$ THEN CX$=S$:GOSUB 5800:S$=CX$
3510 A$=A$+S$+SPACE$(8-LEN(S$))+" to => "
3520 RE=RE+1:GET #1,RE:GOSUB 4800
3530 I=INSTR(S$," "):IF I>0 THEN S$=MID$(S$,I+1)
3540 IF S$<>SYS3$ AND S$<>"ALL" THEN CX$=S$:GOSUB 5800:S$=CX$
3550 IF LEN(S$) > 8 THEN S$=LEFT$(S$,8)
3560 A$=A$+S$+SPACE$(8-LEN(S$))+" "
3570 RE=RE+1:GET #1,RE:GOSUB 4800
3580 GOSUB 5080
3590 A$=A$+S$:GOSUB 4440
3600 RETURN
3610 '
3620 BK=0:GOSUB 3680:IF BK THEN 1140
3630 IF MF$="*" THEN A$=N$+", Don't call back Again ! ":GOSUB 4440:GOTO 3660
3640 A$=CN$+", thanks for calling...":GOSUB 4440
3650 A$="Please call again! Bye...":GOSUB 4440
3660 GOSUB 4440:GOSUB 4440:IF IHM<>HM THEN MFJ$=MF$:GOSUB 5710
3670 GOTO 3870
3680 '
3690 IF N$=SYS3$ THEN RETURN
3700 GOSUB 4440
3710 A1$="Enter confidential comments for the SYSOP <Y or N> ":GOSUB 5740
3720 IF NOT OK THEN 3820
3730 RE=2:RL=65:OPEN "R",1,DSK2$+"COMMENTS",65:FIELD#1,65 AS RR$
3740 GET#1,1:RE=VAL(RR$)+1:IF RE=1 THEN RE=2
3750 S$=" ":GOSUB 4770:PUT#1,RE:RE=RE+1
3760 S$="From: "+CN$+" "+CO$:GOSUB 4770:PUT#1,RE
3770 A$="Enter Date, then text; type two RETURNs to end.":GOSUB 4440
3780 GOSUB 4440
3790 A1$="> ":N=1:GOSUB 4440:GOSUB 4550
3800 IF B$<>"" THEN RE=RE+1:S$=B$:RL=65:GOSUB 4770:PUT#1,RE:GOTO 3790
3810 S$=STR$(RE):RL=65:GOSUB 4770:PUT#1,1:CLOSE
3820 GOSUB 4440
3830 A$="Character count: "+STR$(A)+" typed by system - "+STR$(D)+" typed by you.":GOSUB 4440
3840 GOSUB 4440:RETURN
3850 A1$="Sorry, too many errors. Another time. Bye..."
3860 GOSUB 4440:GOSUB 4440
3870 '
3880 OUT &HFF,29
3890 POKE 0,&HC3
3900 POKE &H5B,0
3910 RUN "BYE"
3920 '
3930 IF N$=SYS3$ OR MF$="!" OR MF$="&" OR MF$="#" THEN GOTO 3970
3940 GOSUB 4440:GOSUB 4440
3950 A$=ANS1$:GOSUB 4440:GOSUB 4440:SAV$="":RETURN
3960 '
3970 GOSUB 4440
3980 A2$="Kill":GOSUB 3030
3990 IF LEN(B$)=0 THEN M=0 ELSE M=VAL(B$)
4000 IF M<1 THEN GOSUB 4440:RETURN
4010 IF M>U THEN GOSUB 5790:GOTO 3960
4020 A$="Scanning Summary file...":N=1:GOSUB 4440
4030 OPEN "R",1,DSK2$+"SUMMARY."+SELC$,30:RE=1:FIELD#1,30 AS RR$:RL=30
4040 GET#1,RE
4050 IF EOF(1) THEN 4250 ELSE G=VAL(RR$)
4060 IF G>9998 THEN 4250
4070 IF G<M THEN RE=RE+6:GOTO 4040
4080 IF G>M THEN 4250
4090 GOSUB 4990:IF OK OR NOT PERS THEN 4100 ELSE 4250
4100 GET#1,RE:GOSUB 4800:PW=INSTR(S$,";"):PW$=""
4110 IF N$=SYS3$ OR PERS OR OK THEN PERS = 0:GOTO 4150
4120 IF PW=0 THEN PRINT"INVALID KILL ":CLOSE #1:RETURN
4130 PW$=MID$(S$,PW+1):GOSUB 4440:A1$="Password: ":N=1:GOSUB 4440
4140 C=1:GOSUB 4550:IF B$<>PW$ THEN A$="Incorrect.":GOTO 4260
4150 S$=" 0"+":"+STR$(G):GOSUB 4770:PUT#1,RE:CLOSE
4160 A$="Updating Message file...":N=1:GOSUB 4440
4170 OPEN "R",1,DSK2$+"MESSAGES."+SELC$,65:RE=1:FIELD#1,65 AS RR$:MI=0
4180 MI=MI+1:IF MI>MZ THEN 4250 ELSE G=M(MI,1)
4190 IF G<M THEN RE=RE+M(MI,2)+6:GOTO 4180
4200 IF G=M THEN S$="0"+":"+STR$(G)+":"+N$+","+O$:RL=65:GOSUB 4770:PUT#1,RE:M(MI,1)=0
4210 CLOSE#1:A$="Updating Message count...":GOSUB 4440
4220 OPEN "R",1,DSK2$+"COUNTERS."+SELC$,5:FIELD#1,5 AS RR$
4230 GET#1,MSGS:LSET RR$=STR$(VAL(RR$)-1):PUT#1,MSGS
4240 GOSUB 4440:A$="Message killed.":GOTO 4260
4250 A$="Message not found."
4260 CLOSE:GOSUB 4440:GOTO 3970
4270 '
4280 GOSUB 4420
4290 OPEN "R",1,DSK$+"USERS",62:FIELD#1,1 AS MU$,1 AS SU$,60 AS RR$
4300 FIELD#1,10 AS NN$:GET#1,1:NU=VAL(NN$)
4310 GOSUB 4440
4320 FOR J=NU+1 TO 2 STEP -1
4330 GET#1,J:IF SU$="*" THEN 4390
4340 GOSUB 4800:S0$=S$
4350 I=INSTR(S0$,";"): S1$=LEFT$(S0$,I-1):S2$=MID$(S0$,I+1)
4360 I=INSTR(S2$,";"): S3$=MID$(S2$,I+1):S2$=LEFT$(S2$,I-1)
4370 I=INSTR(S3$,";"): S3$=LEFT$(S3$,I-1)
4380 A$=S1$+" "+S2$+", "+S3$:GOSUB 4440
4390 IF BK THEN 4410
4400 NEXT J
4410 CLOSE:GOSUB 4440:RETURN
4420 GOSUB 4440
4430 A$="Use CTL-S to PAUSE, CTL-K to ABORT."
4440 '
4450 IF SAV$<>"" AND A1$<>"" THEN A1$="":RETURN
4460 IF A1$<>"" THEN A$=A1$:A1$=""
4470 IF N=1 THEN PRINT A$;:PP$=A$:GOTO 4520
4480 BI=ASC(INKEY$+" ")
4490 IF BI=&H13 OR BI=&H53 OR BI=&H73 THEN BI=ASC(INPUT$(1)):GOTO 4510
4500 IF BI=&HB OR BI=&H4B OR BI=&H6B THEN BK=-1:GOTO 4530
4510 PRINT A$
4520 A=A+LEN(A$)
4530 A$="":N=0
4540 RETURN
4550 '
4560 IF BEL AND SAV$="" THEN PRINT CHR$(7);
4570 B$="":BK=0
4580 IF SAV$="" THEN GOSUB 5100:IF C<>3 THEN PRINT
4590 SP=INSTR(SAV$,";"):IF SP=0 THEN B$=SAV$:SAV$="":GOTO 4610
4600 B$=LEFT$(SAV$,SP-1):SAV$=MID$(SAV$,SP+1)
4610 IF LEN(B$)=0 THEN C=0:RETURN
4620 IF C=0 THEN 4640
4630 CY$=B$:GOSUB 5860:B$=CY$
4640 D=D+LEN(B$):C=0
4650 RETURN
4660 '
4670 IF ERL=190 THEN RESUME 220
4680 IF ERL=710 THEN RE=0:RESUME 720
4690 IF ERL=800 THEN RESUME 840
4700 IF ERL=930 THEN RESUME 1090
4710 IF ERL=1590 THEN RESUME 1610
4720 IF ERL=3180 THEN RESUME 3380
4730 IF ERL=3730 THEN RESUME 3760
4740 IF ERL=4930 THEN RESUME 4980
4750 IF ERL=5540 THEN RESUME 5670
4760 RESUME NEXT
4770 '
4780 LSET RR$=LEFT$(S$+SPACE$(RL-2),RL-2)+CHR$(13)+CHR$(10)
4790 RETURN
4800 '
4810 ZZ=LEN(RR$)-2
4820 WHILE MID$(RR$,ZZ,1)=" "
4830 ZZ=ZZ-1:IF ZZ=1 THEN 4850
4840 WEND
4850 S$=LEFT$(RR$,ZZ)
4860 IF MID$(S$,ZZ,1)="?" THEN S$=S$+" "
4870 RETURN
4880 '
4890 XPR=NOT XPR:RETURN
4900 '
4910 BEL=NOT BEL:RETURN
4920 '
4930 OPEN "I",1,DSK$+FIL$:BK=0:IF EOF(1) THEN 4980
4940 IF NW=0 THEN GOSUB 4420 ELSE NW=0
4950 GOSUB 4440
4960 IF EOF(1) OR BK THEN 4980 ELSE LINE INPUT #1,A$:GOSUB 4440:GOTO 4960
4970 GOSUB 4440
4980 CLOSE # 1:RETURN
4990 '
5000 PERS=0:OK=-1:GET #1,RE:IF INSTR(RR$,";*")<>0 THEN PERS=-1
5010 IF N$=SYS3$ THEN 5040
5020 GET #1,RE+3:GOSUB 5050:IF OK THEN 5040
5030 GET #1,RE+2:GOSUB 5050
5040 RETURN
5050 GOSUB 4800:I=INSTR(S$," "):S1$=LEFT$(S$,I-1):S2$=MID$(S$,I+1)
5060 IF S1$=N$ AND S2$=O$ THEN OK=-1 ELSE OK=0
5070 RETURN
5080 IF PERS THEN S$="("+S$:S$=S$+")":PERS=0
5090 RETURN
5100 '
5110 CHC=0: SAV$="":DC=0:IC=&H30
5120 NCH=ASC(INPUT$(1))
5130 IF NCH=13 THEN RETURN
5140 IF NCH=127 THEN 5220
5150 IF NCH<32 THEN 5240
5160 IF CHC>=63 THEN PRINT CHR$(7);:GOTO 5120
5170 SAV$=SAV$+CHR$(NCH): CHC=CHC+1 :IC=IC+1:IF IC=&H3A THEN IC=&H30
5180 IF DC THEN PRINT CHR$(10);
5190 IF C<>2 THEN PRINT CHR$(NCH); ELSE PRINT CHR$(IC);
5200 IF CHC=55 THEN PRINT CHR$(7);
5210 DC=0:GOTO 5120
5220 IF CHC=0 THEN 5120 ELSE PRINT BSL$;:DC=-1
5230 CHC=CHC-1:IC=IC-1: SAV$=LEFT$(SAV$,CHC): GOTO 5120
5240 IF CHC=0 THEN 5120
5250 IF NCH=8 THEN PRINT ERS$;:DC=0:GOTO 5230
5260 IF NCH=12 THEN GOSUB 5320:GOTO 5330
5270 IF NCH=18 THEN PRINT:PRINT PP$;:GOTO 5330
5280 IF NCH=21 THEN PRINT " #": PRINT PP$;:DC=0:GOTO 5110
5290 IF NCH<>24 THEN 5120
5300 GOSUB 5320
5310 GOTO 5110
5320 FOR BCC=1 TO CHC: PRINT ERS$;: NEXT BCC: RETURN
5330 IF C<>2 THEN PRINT SAV$;: GOTO 5350
5340 IC=&H30:FOR BCC=1 TO CHC: IC=IC+1: PRINT CHR$(IC);: NEXT BCC
5350 DC=0:GOTO 5120
5360 '
5370 GOSUB 4440
5380 A$="Enter at least six alphanumeric characters":GOSUB 4440
5390 A1$="for your PASSWORD: "
5400 N=1:GOSUB 4440:C=2:GOSUB 4550:S04$=B$:IF S04$="" THEN 5370
5410 IF LEN(S04$)<6 THEN 5370
5420 A1$="Now enter it again: "
5430 N=1:GOSUB 4440:C=2:GOSUB 4550
5440 IF S04$<>B$ THEN A1$="No match. Try again.":GOSUB 4440:GOTO 5370
5450 A$="OK, now please remember it.":GOSUB 4440:GOSUB 4440:RETURN
5460 '
5470 IF N$<>SYS3$ THEN 5680
5480 A1$="User's FIRST Name: ":N=1:GOSUB 4440
5490 C=1:GOSUB 4550:T01$=B$:IF T01$="" THEN RETURN
5500 A1$="User's LAST Name: ":N=1:GOSUB 4440
5510 C=1:GOSUB 4550:T02$=B$:IF T02$="" THEN RETURN
5520 OK=0:GOSUB 5540:IF OK THEN GOSUB 6230:GOTO 5480
5530 A$="Not found.":GOSUB 4440:GOTO 5480
5540 '
5550 OPEN "R",1,DSK$+"USERS",62:FIELD#1,62 AS RR$:GET#1,1:NU=VAL(RR$)
5560 FOR J=2 TO NU+1:GET#1,J:GOSUB 4800:S00$=MID$(S$,3)
5570 IF B$="S" THEN MFJ$="#"
5580 I=INSTR(S00$,";"): S01$=LEFT$(S00$,I-1):S02$=MID$(S00$,I+1)
5590 I=INSTR(S02$,";"): S03$=MID$(S02$,I+1):S02$=LEFT$(S02$,I-1)
5600 I=INSTR(S03$,";"): S04$=MID$(S03$,I+1):S03$=LEFT$(S03$,I-1)
5610 I=INSTR(S04$,";"): IF I=0 THEN S05$="0":GOTO 5630
5620 S05$=MID$(S04$,I+1):S04$=LEFT$(S04$,I-1)
5630 HM=VAL(S05$)
5640 IF T01$<>S01$ OR T02$<>S02$ THEN 5660
5650 MFJ$=LEFT$(S$,1):GOSUB 4440:UJ=J:OK=-1:CLOSE:RETURN
5660 NEXT J
5670 CLOSE:RETURN
5680 '
5690 MFJ$=MF$
5700 GOSUB 5360
5710 OPEN "R",1,DSK$+"USERS",62:FIELD#1,62 AS RR$
5720 S$=MFJ$+" "+S01$+";"+S02$+";"+S03$+";"+S04$+";"+STR$(HM)
5730 RL=62:GOSUB 4770:PUT#1,UJ:CLOSE:RETURN
5740 PRINT"Answer Y or N ."
5750 A2$=A1$:OK=0
5760 A1$=A2$:N=1:GOSUB 4440:C=1:GOSUB 4550:ANS$=LEFT$(B$,1)
5770 IF ANS$="" THEN 5760 ELSE IF ANS$="Y" THEN OK=-1:RETURN
5780 IF ANS$<>"N" THEN 5740 ELSE RETURN
5790 A$="Invalid message number, "+CN$+".":GOSUB 4440:SAV$="":RETURN
5800 '
5810 FOR ZZ=2 TO LEN(CX$)
5820 ZA=ASC(MID$(CX$,ZZ,1)):IF ZA<&H41 OR ZA>&H5A THEN 5840
5830 MID$(CX$,ZZ,1)=CHR$(ZA+&H20)
5840 NEXT ZZ
5850 RETURN
5860 '
5870 FOR ZZ=1 TO LEN(CY$)
5880 ZA=ASC(MID$(CY$,ZZ,1)):IF ZA<&H61 OR ZA>&H7A THEN 5900
5890 MID$(CY$,ZZ,1)=CHR$(ZA-&H20)
5900 NEXT ZZ
5910 RETURN
5920 '
5930 T01$=T$:T02$=""
5940 IF T$=SYS3$ OR T$="ALL" THEN OK=-1:RETURN
5950 U01$=S01$:U02$=S02$:U03$=S03$:U04$=S04$:SHM=HM:SUJ=UJ:SMF$=MF$
5960 I=INSTR(T$," "): IF I=0 THEN OK=0:GOTO 5990
5970 T01$=LEFT$(T$,I-1):T02$=MID$(T$,I+1):OK=0:GOSUB 5540
5980 S01$=U01$:S02$=U02$:S03$=U03$:S04$=U04$:HM=SHM:UJ=SUJ:MF$=SMF$
5990 IF NOT OK THEN A1$="Not a currently known User. OK? ":GOSUB 5740
6000 RETURN
6010 '
6020 IF T$=SYS3$ OR T$="ALL" THEN TX$=T$:RETURN
6030 CX$=T01$:GOSUB 5800:T01$=CX$:CX$=T02$:GOSUB 5800:T02$=CX$
6040 TX$=T01$+" "+T02$
6050 RETURN
6060 CX$=N$:GOSUB 5800:CN$=CX$:CX$=O$:GOSUB 5800:CO$=CX$:RETURN
6070 A$=" ":GOSUB 4440:GOSUB 4440:GOSUB 4440
6080 A$="You are in the CHAT mode":GOSUB 4440
6090 A1$="Shall I page the SYSOP <Y OR N> ":GOSUB 5740
6100 IF NOT OK THEN RETURN
6110 FOR T1=1 TO 3
6120 PRINT CHR$(7);
6130 FOR T2=1 TO BEEP:NEXT T2
6140 NEXT T1
6150 GOSUB 4440:GOSUB 4440
6160 A$="Type Bye to Exit the CHAT mode":GOSUB 4440
6170 A$="":GOSUB 4440
6180 BELS=BEL:BEL=0
6190 A1$="":N=1:GOSUB 4440:GOSUB 4550
6200 IF B$="BYE" OR B$="bye" OR B$="Bye" THEN BEL=BELS:RETURN
6210 GOTO 6190
6220 GOTO 1140
6230 '
6240 IF N$<>SYS3$ THEN GOTO 1140
6250 A1$="Change <P>assword or <V>alidation ->":N=1:GOSUB 4440
6260 C=1:GOSUB 4550:IF B$="P" THEN GOTO 5700
6270 GOSUB 4440
6280 A1$="<T>wit,<M>essage User,<C>PM/Message User, <S>PECIAL ->":N=1:GOSUB 4440
6290 C=1:GOSUB 4550:IF B$="T" THEN MFJ$="*"
6300 IF B$="M" THEN MFJ$="!"
6310 IF B$="C" THEN MFJ$="&"
6320 IF B$="S" THEN MFJ$="#"
6330 GOTO 5710
6340 '
6350 FIL$="NEWS":NW=0:GOSUB 4920:RETURN
6360 '
6370 FIL$="TWIT":NW=1:GOSUB 4920
6380 GOTO 3610
6390 IF N$=SYS3$ THEN 6410
6400 IF MF$<>"#" THEN GOTO 1300
6410 FIL$="BASES":GOSUB 4920
6430 PRINT "SELECTION: ":GOSUB 4550
6460 IF LEN(B$)>1 THEN 6430
6461 IF ASC(B$)>53 THEN 6430
6462 IF ASC(B$)<48 THEN 6430
6490 SELC$=B$
6500 GOTO 800
B 4550
6460 I