This is the codebase for the B.B.S. (bulletin board system) program I developed from 1983 to 1987 as of today.
10 DIM DA$(12),LG$(25),MEM$(50),GD$(50)
100 GOTO 110 :: CALL CHAR :: CALL JOYST :: A$,AA$,AB$,AC$,AD$,B$,C$,CL$,OL$,D$,DAT$,EN$,F$,FILE$,FX$,LT$,M$,MSG$,NAME$,PHONE$,PR$,PRV$,PSWRD$,PX$,ST$,T$=””
101 DU$,TITLE$,V$,VA$,VAR$,VER$,YN$,_$,DA$(12),BNAME$(10),BORDER$(10),LAST$(3),DECK$(4)=”” :: A,B,BASEMSG,BOARD,BRD,C=0
102 CALNUM,CH,D,FIND,G,H,HST,K,LG,LINE,LN,LVL,MX,O,R,S,SS,TAG,TI,U,X,XPERT,Y,YY,Z,ZZ,FLS(5),MSG(4),V(4),E(4)=0
103 CALL ERR :: CALL KEY :: CALL LINK :: CALL LOAD :: CALL SOUND :: !@P-
110 OPEN #1:”RS232.CR” :: OPEN #3:”DSK1.PASSWORDS”,RELATIVE,FIXED 50 :: OPEN #4:”DSK1.SYSTEM”,RELATIVE,FIXED 5 :: OPEN #5:”RS232/2.BA=2400″
150 OPEN #2:”DSK1.LOGIN”,INPUT :: INPUT #2:LN :: FOR X=1 TO LN :: LINPUT #2:LG$(X):: NEXT X :: CLOSE #2
170 INPUT #4,REC 0:CALNUM,MSG(1),MSG(2),MSG(3),MSG(4),FLS(1),FLS(2),FLS(3),HST,DAT$,DU$,FLS(4),V(1),V(2),V(3),V(4)
200 OPEN #2:”DSK1.VB”,INPUT :: LINPUT #2:AA$ :: LINPUT #2:AB$ :: LINPUT #2:AC$ :: INPUT #2:DECK$(1),DECK$(2),DECK$(3),DECK$(4),PX$,B$,VER$,EN$,LT$
210 INPUT #2:VA$,YN$,FX$,PR$ :: FOR X=1 TO 12 :: INPUT #2:DA$(X):: NEXT X :: CLOSE #2 :: OPEN #2:”DSK1.MSG-SYS”,RELATIVE,INTERNAL,FIXED 35 :: INPUT #2,REC 0:A$,A$ :: CLOSE #2 :: GOSUB 2970
215 FX$=” “&FX$ :: YN$=YN$&” ” :: PR$=PR$&” ” :: CL$=CHR$(26)&CHR$(12)
220 OPEN #2:”DSK2.BORDER”,INPUT :: FOR X=1 TO 10 :: LINPUT #2:BORDER$(X):: LINPUT #2:BNAME$(X):: NEXT X :: CLOSE #2
230 CALL JOYST(1,X,Y):: IF X=0 THEN GOSUB 2260 :: ON ERROR 1120 :: GOTO 760
240 OPEN #2:”DSK1.HOLD”,INPUT
241 INPUT #2:NAME$,A$,A$,A$,A$,A$,A$,A$,A$,A$,A$ :: INPUT #2:A$,A$,A$,A$,LAST$(1),LAST$(2),LAST$(3):: CLOSE #2 :: GOSUB 2980 :: PRINT #1:B$&CHR$(13)
250 LG=78 :: PRV$=”001″ :: YY,TAG,SS,TI,CH,E(1),E(2),E(3),E(4),XPERT=0 :: LVL,BOARD=1 :: BRD=11 :: BASEMSG=MSG(1)
260 A$,AD$=”” :: FOR X=1 TO 4 :: U=MSG(X)+V(X):: YY=U+YY :: A$=A$&RPT$(“0”,4-LEN(STR$(U)))&STR$(U):: NEXT X :: A$=A$&RPT$(“0”,5-LEN(STR$(CALNUM)))&STR$(CALNUM)&RPT$(“0”,5-LEN(STR$(YY)))&STR$(YY):: VAR$=A$
270 CALL LINK(“SPINOF”):: ON ERROR 1120 :: CALL LOAD(-24576,LG):: GOSUB 2540 :: CALL CHAR(128,”000000FF”,142,””,143,””)
280 A$=”BBS V”&VER$&”: “&DA$(0):: U=12 :: GOSUB 2530 :: A$=M$ :: U=91 :: GOSUB 2530
300 FOR X=1 TO 4 :: A=MSG(X)+V(X):: A$=DECK$(X)&”: [“&RPT$(“0″,4-LEN(STR$(A)))&STR$(A)&”]” :: B=LEN(A$):: U=X*40+160+((40-B)/2):: GOSUB 2530 :: NEXT X :: U=120
310 GOSUB 313 :: B=B+1 :: IF B=1200 THEN B=0 :: CALL LINK(“CLRSCR”):: GOTO 311 ELSE OL$,A$=” Offline: “&STR$(INT((B+1)/240))&” min” :: GOSUB 2530 :: GOTO 310
311 FOR U=1 TO 960 :: B=B+1 :: GOSUB 313 :: GOSUB 2530 :: IF B=345 THEN A$,OL$=” Offline: “&STR$(VAL(SEG$(A$,11,POS(A$,” “,11)-11))+1)&” min” :: B=0
312 NEXT U :: GOTO 311
313 CALL JOYST(1,X,Y):: CALL KEY(0,K,S):: IF K=49 THEN 320 ELSE IF X=0 THEN 330 ELSE RETURN
320 A$=”Unplug Joystick” :: U=91 :: GOSUB 2530 :: CALL JOYST(1,X,Y):: IF X<>0 THEN 320 ELSE PRINT #1:”ATS10=255C0D”&CHR$(13)
321 A$=”L/ogon or M/aintenance” :: U=91 :: GOSUB 2530 :: CALL KEY(0,K,S):: IF S=0 THEN 321 ELSE IF K<76 AND K>77 THEN 321 ELSE ON K-75 GOTO 330,322
322 RUN “DSK1.BBS-MAINT”
330 Y=50 :: GOSUB 2520 :: CALL LINK(PX$,CL$):: A$=”Distress Signal “&STR$(CALNUM+1)&”C4~” :: GOSUB 2200 :: FOR X=1 TO LN :: A$=LG$(X)&”~” :: CALL LINK(“PRINT”,A$):: IF A$=”Q” THEN 340
331 GOSUB 2222 :: NEXT X
340 A$=”~~ Passcode => ” :: GOSUB 2210 :: GOSUB 1590
350 IF A$=”NEW” THEN 360 ELSE IF LEN(A$)<4 OR LEN(A$)>6 THEN 340 ELSE 590
360 FILE$=”1.NEW” :: GOSUB 1420
370 A$=”~Transmit your ENTIRE name or handle.~~ => ” :: GOSUB 2210 :: GOSUB 1560
380 GOSUB 2570 :: IF R THEN PSWRD$=”XXXX” :: M$,NAME$=A$ :: PHONE$=”713-XXX-XXXX” :: PRV$=”000″ :: LVL=0 :: GOTO 690
390 NAME$=A$ :: IF A$=”OFF” THEN 1120 :: IF LEN(A$)>23 OR LEN(A$)<5 THEN A$=”Too long or too short!~” :: GOSUB 2210 :: GOTO 370
410 A$=”~ Confirm? “&YN$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”N” THEN 370
420 A$=”~Your PHONE COMMUNICATOR code?~~ => ” :: GOSUB 2210 :: GOSUB 1540 :: PHONE$=A$
430 IF LEN(A$)<>12 OR SEG$(A$,4,1)<>”-” OR SEG$(A$,8,1)<>”-” OR ASC(A$)<49 OR ASC(A$)>58 THEN A$=”Format: [xxx-xxx-xxxx]” :: GOSUB 2200 :: GOTO 420
440 A$=”~ Confirm? “&YN$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”N” THEN 420
450 A$=”~ Can you do XMODEM transfers? “&YN$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”Y” THEN TI=1 ELSE TI=0
460 A$=”~~Confirmed. Please record the following~passcode for future use. Searching~computer databank records. Scanning.~” :: GOSUB 2210
470 FOR O=1 TO HST :: LINPUT #3,REC O:A$ :: GOSUB 2222 :: IF POS(A$,PHONE$,1)<>0 THEN 1080 ELSE IF SEG$(A$,1,2)=”EM” THEN 510
480 NEXT O :: HST=O
510 FIND=O :: RANDOMIZE :: FOR X=1 TO 3
520 A=INT(RND*90):: IF A=73 OR A=79 OR A<65 THEN 520 ELSE GD$(X)=CHR$(A)
530 NEXT X
540 PSWRD$=GD$(1)&STR$(O)&GD$(2)&GD$(3):: A$=”NCC-1701A Passcode is” :: GOSUB 2200 :: A$=”[> “&PSWRD$&” <]” :: GOSUB 2200
550 _$=STR$(LEN(NAME$)):: IF LEN(_$)<>2 THEN _$=”0″&_$
560 PRINT #3,REC O:PSWRD$&”1″&PHONE$&”0010″&_$&NAME$&STR$(TI):: PRINT #4,REC 8:HST :: OPEN #2:VA$,RELATIVE,FIXED 30 :: PRINT #2,REC O:VAR$ :: CLOSE #2
570 OPEN #2:”DSK1.MSG-SYS”,RELATIVE,INTERNAL,FIXED 35 :: PRINT #2,REC 10+O:”0″,”0″,”0″,”0″,”000000000″ :: CLOSE #2
580 A$=”~~ Hit [RETURN] to beam aboard.~” :: GOSUB 2210 :: GOSUB 1530 :: GOTO 670
590 FIND=VAL(SEG$(A$,2,LEN(A$)-3)):: IF FIND>HST THEN 340 :: B$=”~Encoding to Starfleet…~” :: CALL LINK(PX$,B$)
600 LINPUT #3,REC FIND:B$ :: PSWRD$=SEG$(B$,1,LEN(A$)):: IF A$=PSWRD$ THEN 610 ELSE A$=”Illogical Code!.” :: GOSUB 2200 :: GOTO 340
610 Z=LEN(A$):: PHONE$=SEG$(B$,Z+2,12):: LVL=VAL(SEG$(B$,Z+1,1)):: PRV$=SEG$(B$,Z+14,3):: TAG=VAL(SEG$(B$,Z+17,1)):: _$=SEG$(B$,Z+18,2):: NAME$=SEG$(B$,Z+20,VAL(_$))
620 TI=VAL(SEG$(B$,Z+20+VAL(_$),1)):: D$=SEG$(PHONE$,9,4):: A$=D$&” “&NAME$ :: U=91 :: GOSUB 2530 :: IF TAG THEN 650 ELSE U=0
630 U=U+1 :: C$=”~ Complete phone communicator code~~ “&SEG$(PHONE$,1,4)&”___-” :: CALL LINK(PX$,C$):: GOSUB 1600
640 IF LEN(A$)<>4 THEN 630 ELSE IF A$=D$ THEN 650 ELSE IF U=3 THEN 1120 ELSE 630
650 C$=STR$(VAL(PRV$)+1):: A=LEN(C$):: PRV$=RPT$(“0”,3-A)&C$
660 XPERT=1 :: GOSUB 2900 :: IF TAG>1 THEN TAG=1
670 LAST$(3)=LAST$(2):: LAST$(2)=LAST$(1):: LAST$(1)=M$ :: GOSUB 2980 :: CALNUM=CALNUM+1 :: PRINT #4,REC 0:STR$(CALNUM)
690 PRINT #5:CALNUM;OL$;” “;PSWRD$;LVL;PHONE$;TI;M$ :: IF TI THEN LG=38 :: CALL LOAD(-24576,LG)
700 GOSUB 990 :: IF TAG THEN 740 ELSE A$=CL$&”~~ Enterprise welcomes you… ~~ [:> ENERGIZING <:]~~” :: GOSUB 2210
710 A$=”” :: Y=LEN(M$):: FOR X=Y TO 1 STEP -1 :: A$=A$&SEG$(M$,X,1):: NEXT X :: A$=A$&RPT$(CHR$(8),LEN(M$))&M$ :: Y=40-Y :: A$=RPT$(” “,INT(Y/2))&A$&”~~”
720 A$=A$&” Captain’s Log EntryDate “&DAT$&”~~ Read document ? “&YN$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”Y” THEN FILE$=”1.W/C” :: GOSUB 1420
740 A$=”~ Previous lifeforms…~~” :: FOR X=1 TO 3 :: A$=A$&” [“&STR$(CALNUM-X)&”> “&LAST$(X)&”~” :: NEXT X :: GOSUB 2210
744 IF LVL<3 THEN 750 ELSE OPEN #2:EN$,RELATIVE,FIXED 30
745 A$=”Scanning MAIL sector “&STR$(FIND)&”.” :: GOSUB 2200
746 FOR H=0 TO 49 :: LINPUT #2,REC H:B$ :: IF ASC(B$)=32 THEN 747 ELSE IF FIND=VAL(SEG$(B$,1,3))THEN 4060
747 NEXT H :: CLOSE #2 :: OPEN #2:VA$,RELATIVE,FIXED 30 :: LINPUT #2,REC FIND:A$ :: PRINT #2,REC FIND:VAR$ :: VAR$=A$ :: CLOSE #2
748 X=CALNUM-VAL(SEG$(VAR$,17,5))-2 :: ZZ=YY-VAL(SEG$(VAR$,22,5)):: IF ZZ<1 THEN 750 ELSE A$=”~ Logic dictates that “&STR$(ZZ)&” transmissions~are new. “&STR$(X)&” calls have”
749 A$=A$&” elapsed since~your last mission. The ship has been~idle for “&SEG$(OL$,11,POS(OL$,” “,11)-11)&” minutes.~” :: GOSUB 2210
750 IF XPERT=0 THEN 870
760 BRD=BRD-1 :: IF BRD=0 THEN BRD=10
770 YY=MSG(BOARD)+V(BOARD)-VAL(SEG$(VAR$,4*BOARD-3,4)):: IF YY<1 THEN YY=0 :: IF LEN(AD$)=72 THEN 1060
771 IF BOARD=3 THEN A$=”~”&BORDER$(BRD)&”~” ELSE A$=”~”
780 A$=A$&”[“&STR$(YY)&” new\ “&DECK$(BOARD)&”~”&PR$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”” THEN 760 ELSE X=POS(“!NT+IVEUR=123?BCYXWFPSML#*A”,A$,1):: IF X=0 THEN 790 ELSE AD$=AD$&A$&”;”
785 CALL LINK(“PRINTC”,280,AD$):: ON X GOTO 2960,2950,2800,2760,2750,2740,4000,2700,2080,2590,2010,2010,2010,870,900,960,1010,1030,1050,1150,1610,1650,1800,1830,1990,2000,1940
790 IF TI=0 THEN 800 ELSE IF A$=”D” THEN AD$=AD$&A$&”;” :: GOTO 2330
800 IF LVL<6 THEN 760 ELSE X=POS(“@45”,A$,1):: IF X=0 THEN 760 ELSE ON X GOTO 1830,2010,2160
870 FILE$=”1.M/M” :: GOSUB 1420 :: IF LVL<6 THEN 760 ELSE A$=”5: BorderLines” :: GOSUB 2200 :: GOTO 760
900 IF LVL<3 THEN 1820 ELSE A$=”[Encode BorderLine Comment Now]~” :: GOSUB 2200
910 D=11 :: GOSUB 1540 :: IF LEN(A$)<4 THEN 750
920 IF CH=1 THEN 930 :: D=D-1 :: BORDER$(D)=BORDER$(D-1):: BNAME$(D)=BNAME$(D-1):: IF D=2 THEN 930 :: GOTO 920
930 CALL LINK(PX$,”~ Saving…~”)
940 BORDER$(1)=SEG$(A$,1,80):: CH=1 :: BRD=2 :: BNAME$(1)=NAME$ :: OPEN #2:”DSK2.BORDER”,OUTPUT :: FOR X=1 TO 10 :: PRINT #2:BORDER$(X):BNAME$(X)
950 NEXT X :: CLOSE #2 :: GOTO 750
960 A$=”][ RED ALERT ][” :: GOSUB 2200 :: CALL SOUND(1250,1760,0,1762,0):: CALL SOUND(1250,1760,0,1319,0,1321,0)
961 CALL SOUND(1250,1760,7,1319,4,1568,0):: CALL SOUND(1250,1319,7,1568,3,988,0):: A$=”~Kirk has been summoned. If he doesn t~”
962 A$=A$&”break in soon, leave him F/eedback.~” :: GOSUB 2210 :: CALL SOUND(1,32765,30):: CALL LINK(“PRINTC”,116,”CHAT”):: GOTO 760
970 B$=CL$&”~ A bright flash of light appears. The~Captain materializes.~~Yes?~~” :: CALL LINK(PX$,B$):: CALL LINK(“CHAT”):: CALL LINK(“PRINTC”,116,” “)
980 B$=”~~Kirk waves goodbye as he fades into~the transporter beam.~~” :: CALL LINK(PX$,B$):: GOSUB 2210 :: RETURN
990 GOSUB 2540 :: A$=”Handle => “&M$ :: U=124 :: GOSUB 2530 :: A$=”Telephone => “&PHONE$ :: U=164 :: GOSUB 2530 :: A$=”Passcode => “&PSWRD$ :: U=204 :: GOSUB 2530
1000 U=12 :: A$=DA$(0):: GOSUB 2530 :: A$=”LVL “&STR$(LVL):: U=35 :: GOSUB 2530 :: A$=”TI “&STR$(TI):: U=76 :: GOSUB 2530 :: RETURN
1010 A$=M$ :: GOSUB 2200 :: A$=”Mission #”&STR$(CALNUM)&”: [“&DA$(0)&”]” :: GOSUB 2200
1020 A$=”Level “&STR$(LVL)&” TI/Level “&STR$(TI):: GOSUB 2200 :: A$=”[“&PSWRD$&”] “&PHONE$ :: GOSUB 2200 :: GOTO 760
1030 IF XPERT THEN A$=”Expert Mode => Off” :: GOSUB 2200 :: XPERT=0 :: GOTO 760
1040 A$=”Expert Mode => On” :: GOSUB 2200 :: XPERT=1 :: GOTO 760
1050 FILE$=”1.W/C” :: GOSUB 1420 :: GOTO 760
1060 A$=”Time Limit aboard ship EXPIRED!” :: GOSUB 2200 :: GOTO 1090
1070 A$=”Engaging transporter control.” :: GOSUB 2200 :: GOTO 1090
1080 A$=”~ You are in SECURITY VOILATION with~user #”&STR$(O)&”.~” :: GOSUB 2210 :: GOTO 1100
1090 IF LVL=1 THEN A$=AA$ :: GOSUB 2210
1100 A$=M$&” dematerializing” :: Y=39-LEN(A$):: A$=”~”&FX$&”~~”&RPT$(” “,Y/2)&A$&”~~ ]\:/[ The USS Enterprise ]\:/[~”
1110 GOSUB 2210 :: A$=” +=+ (C)opyright 1987 +=+~~ Help Kirk – Save a Whale~~”&FX$&”~~Softworx V”&VER$&” BHC-II~” :: GOSUB 2210
1120 PRINT #1:”$$$” :: Y=150 :: GOSUB 2520 :: PRINT #1:”ATH”&CHR$(13)
1130 ON ERROR 1140 :: CLOSE #2
1140 IF LEN(AD$)=0 THEN 250 ELSE PRINT #5:” CMDS:”&AD$
1145 CALL JOYST(1,X,Y):: IF X<>0 THEN 250 ELSE CALL SOUND(-100,440,0,443,0):: GOTO 1145
1150 IF LVL=0 OR LVL=2 THEN 760 ELSE TITLE$=”FEEDBACK” :: A$=”~Transmit your feedback to the Captain~now…~” :: GOSUB 2210 :: MX=26
1160 LINE=0
1170 A$=”~Encode transmission here. On an empty~line, type /EX to edit or /S to save.~ [“&STR$(MX)&” lines maximum]~~” :: GOSUB 2210 :: GOTO 1190
1180 A$=”Continue transmission…” :: GOSUB 2200 :: IF LINE>2 THEN A$=”~”&MEM$(LINE-1)&”~”&MEM$(LINE)&”~” :: GOSUB 2210
1190 IF LINE=MX THEN 1230 ELSE LINE=LINE+1 :: IF LINE-1=MX THEN 1220
1200 GOSUB 1540 :: IF A$=”/EX” OR A$=”/ex” THEN 1220 ELSE MEM$(LINE)=A$ :: IF LEN(A$)<10 THEN GD$(LINE)=”0″&STR$(LEN(A$))ELSE GD$(LINE)=STR$(LEN(A$))
1210 IF A$=”/S” OR A$=”/s” OR A$=”/C” OR A$=”/c” THEN LINE=LINE-1 :: U=ASC(SEG$(A$,2,1)):: GOTO 1260 ELSE 1190
1220 LINE=LINE-1
1230 A$=”~L/ist S/ave N/ew A/dd E/dit Q/uit~C/enter & Save [> ” :: GOSUB 2210
1240 GOSUB 1530 :: X=POS(“LASNECQ”,A$,1):: IF X=0 OR A$=”” THEN 1230 :: U=ASC(A$):: ON X GOTO 1250,1180,1260,1160,1380,1260,1241
1241 IF BRD=11 THEN 745 ELSE IF MX=10 THEN CLOSE #2 :: GOTO 760 ELSE 760
1250 A$=CL$&”~Title: “&TITLE$&”~” :: GOSUB 2210 :: FOR X=1 TO LINE :: A$=”~”&STR$(X)&”:~”&MEM$(X)&”~” :: GOSUB 2210 :: NEXT X :: GOTO 1230
1260 A$=”~~ Encoding databanks…” :: GOSUB 2210 :: IF MX=10 THEN 4018 ELSE IF MX<>26 THEN OPEN #2:”DSK3.”&MSG$,APPEND,VARIABLE 254 :: GOTO 1266
1261 GOSUB 2990 :: GOTO 760
1266 IF U=83 OR U=115 THEN 1275
1267 FOR X=1 TO LINE :: A=LEN(MEM$(X)):: IF A=0 THEN 1272 ELSE IF ASC(MEM$(X))<>32 THEN 1271
1268 FOR Y=1 TO A :: IF ASC(SEG$(MEM$(X),Y,1))<>32 THEN 1270
1269 NEXT Y :: MEM$(X)=”” :: GOTO 1272
1270 MEM$(X)=SEG$(MEM$(X),Y,A-Y+1)
1271 Y=LG-LEN(MEM$(X)):: MEM$(X)=RPT$(” “,Y/2)&MEM$(X)
1272 NEXT X
1275 B$=”” :: B,X=0 :: IF E(BOARD)=1 THEN A$=”~”&FX$&”~~” :: GOTO 1290 ELSE A$=”Msg left by: “&M$&”~Date Posted: “&DA$(0)&”~~” :: GOTO 1290
1280 X=X+1 :: A$=MEM$(X)&”~”
1290 A=LEN(A$):: IF A+B>253 THEN 1300 ELSE B$=B$&A$ :: IF X=LINE THEN PRINT #2:B$ :: CLOSE #2 :: GOTO 1320 ELSE B=LEN(B$):: GOTO 1280
1300 C$=B$&SEG$(A$,1,253-B):: PRINT #2:C$ :: B$=”” :: A$=SEG$(A$,254-B,80):: B=0 :: IF X<>LINE THEN 1290 ELSE PRINT #2:A$ :: CLOSE #2
1320 IF E(BOARD)=1 THEN 1370 ELSE V$=”DSK3.B”&STR$(BOARD)&”-“&STR$(1+V(BOARD)):: IF MSG(BOARD)=30 THEN V(BOARD)=V(BOARD)+1 :: DELETE V$ :: GOTO 1330 ELSE BASEMSG=BASEMSG+1
1330 PRINT #4,REC 11+BOARD:V(BOARD):: PRINT #4,REC BOARD:BASEMSG :: CLOSE #4 :: OPEN #4:”DSK1.SYSTEM”,RELATIVE,FIXED 5
1340 A$=”DSK3.T-“&STR$(BOARD):: IF MSG(BOARD)=30 THEN 1350 ELSE OPEN #2:A$,APPEND :: PRINT #2:TITLE$ :: CLOSE #2 :: GOTO 1370
1350 OPEN #2:A$,INPUT :: FOR X=1 TO 30 :: LINPUT #2:MEM$(X):: NEXT X :: CLOSE #2 :: OPEN #2:A$,OUTPUT :: FOR X=2 TO 30
1360 PRINT #2:MEM$(X):: NEXT X :: PRINT #2:TITLE$ :: CLOSE #2
1370 SS=0 :: E(BOARD)=1 :: A$=RPT$(CHR$(8)&” “&CHR$(8),16)&”ed…~” :: GOSUB 2210 :: A$=STR$(BOARD):: GOTO 2010
1380 IF LINE=0 THEN 1230 ELSE A$=”~[Edit 1-“&STR$(LINE)&” C/R=Quit] #” :: GOSUB 2210
1390 GOSUB 1570 :: IF A<1 OR A>LINE THEN 1230
1400 A$=”~Line “&STR$(A)&”:~”&MEM$(A)&”~~Replace… [C/R=Abort]~” :: GOSUB 2210
1410 GOSUB 1540 :: IF A$=”” THEN 1380 ELSE MEM$(A)=A$ :: B$=STR$(LEN(A$)):: GD$(A)=RPT$(“0”,2-LEN(B$))&B$ :: GOTO 1380
1420 OPEN #2:”DSK”&FILE$,INPUT :: A=ASC(FILE$)-48 :: IF A=3 THEN 1440 ELSE IF A=4 THEN 1450 ELSE CALL LINK(PX$,CL$):: GOTO 1470
1440 LINPUT #2:A$ :: CALL LINK(PX$,B$):: B=POS(A$,”~”,1):: CALL LINK(PX$,SEG$(A$,1,13)&”^o”&SEG$(A$,14,B-14)&”^n”):: A$=SEG$(A$,B,254):: GOTO 1510
1450 INPUT #2:X :: IF LVL<X THEN CLOSE #2 :: A$=”~You need at least level “&STR$(X)&”.~~” :: GOSUB 2210 :: RETURN
1460 A$=CL$&”~ [^S Stop ^Q Continue]~ Spacebar Quits~~” :: GOSUB 2210
1470 IF EOF(2)THEN CLOSE #2 :: RETURN
1480 LINPUT #2:A$ :: IF LEN(A$)<2 THEN 1500 ELSE IF ASC(A$)=13 AND TI<ASC(SEG$(A$,2,1))-48 THEN CLOSE #2 :: RETURN
1500 IF A<>3 AND LEN(A$)<81 THEN A$=A$&”~”
1510 CALL LINK(“PRINT”,A$):: IF A$=”Q” THEN CLOSE #2 :: CALL LINK(PX$,”~”):: RETURN ELSE GOSUB 2222 :: GOTO 1470
1530 GOSUB 2190 :: CALL LOAD(-24574,1):: CALL LOAD(-24573,0):: CALL LINK(“ONE”,A$):: CALL LINK(PX$,”~”):: IF A$=”O” THEN 1070 :: RETURN
1540 GOSUB 2190 :: CALL LOAD(-24574,0):: CALL LINK(“IN”,A$):: CALL LINK(PX$,”~”):: RETURN
1560 GOSUB 2190 :: CALL LOAD(-24574,1):: CALL LINK(“IN”,A$):: CALL LINK(PX$,”~”):: RETURN
1570 GOSUB 2190 :: CALL LINK(“NUMIN”,A$):: CALL LINK(PX$,”~”):: IF LEN(A$)=0 THEN A$=”0″
1580 A=VAL(A$):: RETURN
1590 GOSUB 2190 :: CALL LOAD(-24574,1):: CALL LOAD(-24573,95):: CALL LINK(“IN”,A$):: CALL LINK(PX$,”~”):: CALL LOAD(-24573,0):: RETURN
1600 GOSUB 2190 :: CALL LOAD(-24573,95):: CALL LINK(“NUMIN”,A$):: CALL LINK(PX$,”~”):: CALL LOAD(-24573,0):: RETURN
1610 IF LVL<3 THEN 760 ELSE MX=50 :: IF E(BOARD)=1 THEN 1630 ELSE A$=”^*^ Post: [“&DECK$(BOARD)&”] ^*^” :: GOSUB 2200 :: A$=”~Title: ” :: GOSUB 2210 :: GOSUB 1540 :: A=LEN(A$):: IF A<2 THEN 760 ELSE IF A<23 THEN 1640
1620 A$=”Too LONG…” :: GOSUB 2200 :: GOTO 1610
1630 MSG$=”B”&STR$(BOARD)&”-“&STR$(BASEMSG+V(BOARD)):: TITLE$=”Con t” :: GOTO 1160
1640 TITLE$=A$ :: MSG$=”B”&STR$(BOARD)&”-“&STR$(BASEMSG+1+V(BOARD)):: GOTO 1160
1650 A$=”^*^ Scan: [“&DECK$(BOARD)&”] ^*^” :: GOSUB 2200 :: OPEN #2:”DSK3.T-“&STR$(BOARD),INPUT :: FOR X=1 TO BASEMSG :: LINPUT #2:MEM$(X)
1660 NEXT X :: CLOSE #2
1670 A$=”~ Titles [1-“&STR$(MSG(BOARD))&” C/R=New] => ” :: GOSUB 2210 :: GOSUB 1570 :: IF A<1 OR A>BASEMSG THEN A=1+MSG(BOARD)-YY :: IF A<1 THEN A=1
1680 ST$=STR$(A-1):: CALL LINK(PX$,”~”):: FOR X=A TO BASEMSG :: A$=”MSG “&STR$(X)&”> “&MEM$(X)&”~” :: IF 1+MSG(BOARD)-YY>X THEN A$=” “&A$ ELSE A$=”*”&A$
1685 CALL LINK(“PRINT”,A$):: IF A$=”Q” THEN 1720
1690 NEXT X :: GOTO 1720
1700 ST$=STR$(A)
1710 FILE$=”3.B”&STR$(BOARD)&”-“&STR$(VAL(ST$)+V(BOARD)):: B$=”~Frequency #”&ST$&”: “&MEM$(VAL(ST$))&”~<Spacebar Warps>~~” :: GOSUB 1420 :: IF VAL(ST$)=BASEMSG THEN 1750
1720 A$=”~~[1-“&STR$(BASEMSG)&”/Last=”&ST$&”/Q=Quit] Read Msg #” :: GOSUB 2210 :: GOSUB 1540 :: IF A$=”” THEN 1780 ELSE IF ASC(A$)=81 OR ASC(A$)=113 THEN 1750
1730 FOR X=1 TO BASEMSG :: IF A$=STR$(X)THEN 1770
1740 NEXT X :: GOTO 1720
1750 A$=”~~E/mail P/ost Q/uit R/ead T/itles => ” :: GOSUB 2210 :: GOSUB 1530
1760 X=POS(“RPTE”,A$,1):: IF X=0 OR A$=”” THEN 760 ELSE AD$=AD$&A$&”;” :: CALL LINK(“PRINTC”,280,AD$):: ON X GOTO 1720,1610,1670,4000
1770 ST$=A$ :: GOTO 1710
1780 IF VAL(ST$)=BASEMSG THEN 1750 ELSE ST$=STR$(VAL(ST$)+1):: GOTO 1710
1800 A$=”NCC-1701A Crew~” :: GOSUB 2200 :: FOR X=0 TO HST :: LINPUT #3,REC X:B$ :: Y=LEN(STR$(X)):: IF SEG$(B$,1,2)=”EM” OR SEG$(B$,Y+4,1)=”1″ THEN 1802 ELSE A$=STR$(X)&” ”
1801 A$=A$&SEG$(B$,Y+23,VAL(SEG$(B$,Y+21,2)))&”~” :: CALL LINK(“PRINT”,A$):: IF A$=”Q” THEN 760
1802 GOSUB 2222 :: NEXT X :: GOTO 760
1810 !
1820 A$=”~ You ll need higher access for this.~Read the rank file or beg Kirk for~access…~~” :: GOSUB 2210 :: GOTO 750
1830 C=POS(“AL@”,A$,1):: ON XPERT+1 GOTO 1840,1850
1840 FILE$=”1.MENU-“&STR$(C):: GOSUB 1420
1850 A$=”~ [?=Menu 1-“&STR$(FLS(C))&”] => ” :: GOSUB 2210 :: GOSUB 1540 :: IF A$=”?” THEN 1840
1860 FOR X=1 TO FLS(C):: IF A$=STR$(X)THEN 1880
1870 NEXT X :: GOTO 760
1880 FILE$=”4.”&STR$(C)&”-“&A$ :: GOSUB 1420 :: GOTO 1850
1940 A$=”~ [1> for Adventure Solution Menu~ [2> for On-Line Adventure Arena~~ [C/R=Quit] =>” :: GOSUB 2210 :: GOSUB 1570 :: IF A=0 OR A>2 THEN 760
1950 IF A=1 THEN A$=”A” :: GOTO 1830
1970 A$=AB$ :: GOSUB 2210 :: GOSUB 1570 :: IF A<1 OR A>7 THEN 760 ELSE GOSUB 2230 :: ON A GOTO 2290,2300,2310,2311,2312,2313,2314
1990 FILE$=”1.RANK” :: GOSUB 1420 :: GOTO 760
2000 A$=”~” :: FOR X=1 TO 4 :: A$=A$&RPT$(” “,9)&”Deck “&STR$(X)&” – “&DECK$(X)&”~” :: NEXT X :: GOSUB 2210 :: GOTO 760
2010 IF LVL<1 THEN 1810 ELSE MSG(BOARD)=BASEMSG :: BASEMSG=MSG(VAL(A$)):: BOARD=VAL(A$):: GOTO 760
2080 IF LVL<3 THEN 760 ELSE A$=CL$&”~ [“&DECK$(BOARD)&”: Delete 1-“&STR$(BASEMSG)&”] => ” :: GOSUB 2210 :: GOSUB 1570 :: IF A<1 OR A>BASEMSG THEN 760
2100 B$=”DSK3.B”&STR$(BOARD)&”-“&STR$(A+V(BOARD)):: OPEN #2:B$,INPUT :: LINPUT #2:C$ :: CLOSE #2 :: IF ASC(SEG$(C$,12,1))<>58 THEN 2115 ELSE C$=SEG$(C$,14,POS(C$,”~”,1)-14):: IF C$=M$ OR LVL>7 THEN 2120
2115 A$=”Clearance DENIED.” :: GOSUB 2200 :: GOTO 760
2120 A$=”~ Confirm? “&YN$ :: GOSUB 2210 :: GOSUB 1560 :: IF A$<>”Y” THEN 760
2130 OPEN #2:B$,OUTPUT :: PRINT #2:”Msg left by: “&C$&”~ Jammed by: “&M$&”~” :: CLOSE #2
2140 IF E(BOARD)=1 AND BASEMSG=A THEN E(BOARD)=0 :: GOTO 760 ELSE 760
2160 A$=”[BorderLines]~” :: GOSUB 2200 :: FOR X=1 TO 10 :: A$=”~#”&STR$(X)&” left by “&BNAME$(X)&”~”&BORDER$(X)&”~” :: CALL LINK(“PRINT”,A$):: IF A$=”Q” THEN 760
2161 NEXT X :: GOTO 760
2190 CALL KEY(0,K,S):: IF K=67 THEN 970 ELSE IF K=79 THEN 1060 ELSE IF K=76 THEN 2195 ELSE CALL JOYST(1,K,S):: IF K<>0 THEN 1120 ELSE RETURN
2191 A$=”~~(1> Handle~(2> Level~(3> TI~(4> Save~~ =>” :: GOSUB 2210 :: GOSUB 1570 :: IF A<1 OR A>4 THEN 2197 ELSE ON A GOTO 2192,2193,2194,2196
2192 A$=”~[Name> ” :: GOSUB 2210 :: GOSUB 1560 :: IF LEN(A$)<5 OR LEN(A$)>23 THEN 2191 ELSE NAME$=A$ :: GOSUB 2980 :: _$=RPT$(“0”,2-LEN(STR$(LEN(M$))))&STR$(LEN(M$)):: GOTO 2191
2193 A$=”~[Level> ” :: GOSUB 2210 :: GOSUB 1570 :: IF A>8 THEN 2191 ELSE LVL=A :: GOTO 2191
2194 A$=”~[TI> ” :: GOSUB 2210 :: GOSUB 1570 :: IF A>3 THEN 2191 ELSE TI=A :: GOTO 2191
2195 C$=A$ :: GOTO 2191
2196 GOSUB 2900
2197 A$=C$ :: GOTO 2210
2200 K=40-LEN(A$):: A$=”~”&RPT$(” “,K/2)&A$&”~”
2210 IF A$=”” THEN A$=”~”
2220 CALL LINK(PX$,A$)
2222 CALL JOYST(1,K,S):: IF K<>0 THEN 1120 ELSE RETURN
2230 A$=”Don t Move! Energizing…” :: GOSUB 2200 :: IF SS THEN RETURN ELSE OPEN #2:”DSK1.HOLD”,OUTPUT
2240 PRINT #2:NAME$:PHONE$:LG:AD$:LVL:BASEMSG:BOARD:PSWRD$:PRV$:_$:X:BRD:CALNUM:TI:XPERT:LAST$(1):LAST$(2):LAST$(3)
2250 PRINT #2:E(1):E(2):E(3):E(4):FIND:TAG:VAR$ :: CLOSE #2 :: RETURN
2260 OPEN #2:”DSK1.HOLD”,INPUT :: INPUT #2:NAME$,PHONE$,LG,AD$,LVL,BASEMSG,BOARD,PSWRD$,PRV$,_$,X,BRD,CALNUM
2270 INPUT #2:TI,XPERT,LAST$(1),LAST$(2),LAST$(3),E(1),E(2),E(3),E(4),FIND,TAG,VAR$ :: GOSUB 2980 :: SS=1 :: CLOSE #2 :: RETURN
2290 RUN “DSK1.ADV1”
2300 RUN “DSK1.ADV2”
2310 RUN “DSK1.ADV3”
2311 RUN “DSK1.ADV4”
2312 RUN “DSK1.ADV5”
2313 RUN “DSK1.ADV6”
2314 RUN “DSK1.ADV7”
2330 IF LVL<2 THEN 1810 ELSE A$=” AE Updated “&DU$ :: GOSUB 2200 :: A$=”~ Transport to AE? “&YN$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$<>”Y” THEN 760
2340 GOSUB 2230 :: RUN “DSK1.AE”
2520 FOR X=1 TO Y :: NEXT X :: RETURN
2530 CALL LINK(“PRINTC”,INT(U),A$):: RETURN
2540 CALL LINK(“CLRSCR”):: CALL LINK(“PRINTC”,360,RPT$(“”,40)):: RETURN
2570 R=0 :: OPEN #2:”DSK1.SMUTCATCH”,INPUT :: CALL LINK(PX$,”~ Correlating data…~”)
2580 LINPUT #2:D$ :: IF POS(A$,D$,1)<>0 THEN CLOSE #2 :: R=1 :: RETURN ELSE IF EOF(2)THEN CLOSE #2 :: RETURN ELSE 2580
2590 IF LVL<8 THEN 760 ELSE A$=”~ BBS Maintenance~~ Password? ” :: GOSUB 2210 :: GOSUB 1590 :: IF A$<>”SAL” THEN 760 ELSE GOSUB 2230
2600 RUN “DSK1.BBS-MAINT”
2700 IF LVL<3 THEN 1810 ELSE FILE$=”1.A/U” :: GOSUB 1420 :: A$=”~Filename to UPLOAD~~ [C/R=Quit] =>” :: GOSUB 2210 :: GOSUB 1560 :: GOSUB 2730 :: OPEN #2:”DSK2.!”&A$,APPEND :: B$=A$
2710 PRINT #1:”.” :: GOSUB 1540 :: IF A$=”/EX” OR A$=”/ex” THEN 2720 ELSE PRINT #2:A$ :: GOTO 2710
2720 CLOSE #2 :: PRINT #5:” A/UL [“&B$&”] “;:: GOTO 760
2730 IF POS(A$,”.”,1)<>0 OR POS(A$,” “,1)<>0 OR LEN(A$)<1 OR LEN(A$)>9 OR POS(A$,”C/R”,1)<>0 OR SEG$(A$,1,1)=”!” THEN 760 ELSE RETURN
2740 A$=CL$&”~ Video Display Width~~~ 40 or 80 Columns [>” :: GOSUB 2210 :: GOSUB 1570 :: IF A<>40 AND A<>80 THEN 750 ELSE CALL LOAD(-24576,A-2):: GOSUB 990 :: LG=A-2 :: GOTO 750
2750 FILE$=”1.INFO” :: GOSUB 1420 :: GOTO 750
2760 A$=”You begin to dematerialize.” :: GOSUB 2200 :: GOSUB 2230 :: RUN “DSK1.VOTING”
2800 IF LVL<2 THEN 1820 ELSE IF TAG THEN 2820 ELSE A$=”~This feature allows you to skip phone~access verification and materialization~while boarding the ship. Enable this~command if yo”
2810 A$=A$&”u are certain of password~security…~~ Enable? “&YN$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”Y” THEN TAG=1 :: GOTO 2815 ELSE 2817
2815 GOSUB 2900 :: A$=”~Done…~” :: GOSUB 2210 :: GOTO 760
2817 A$=”~Aborted…~” :: GOSUB 2210 :: GOTO 760
2820 A$=”~~Disable? “&YN$ :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”Y” THEN TAG=0 :: GOTO 2815 ELSE 2817
2900 PRINT #3,REC FIND:PSWRD$&STR$(LVL)&PHONE$&PRV$&STR$(TAG)&_$&NAME$&STR$(TI):: RETURN
2950 A$=”Plotting course for Neutral Zone.” :: GOSUB 2200 :: GOSUB 2230 :: RUN “DSK1.BASE”
2960 IF LVL<8 THEN 760 ELSE OPEN #2:”DSK1.MSG-SYS”,RELATIVE,INTERNAL,FIXED 35 :: INPUT #2,REC 0:C$,D$
2961 A$=”~ SIG Stardate “&D$&”~~ Update => ” :: GOSUB 2210 :: GOSUB 1560 :: IF LEN(A$)<>8 THEN 2961 ELSE GOSUB 2970 :: PRINT #2,REC 0:C$,A$ :: CLOSE #2 :: GOTO 760
2970 DA$(0)=DA$(VAL(SEG$(A$,1,2)))&” “&SEG$(A$,4,2)&”, 19″&SEG$(A$,7,2):: RETURN
2980 M$=”” :: FOR X=1 TO LEN(NAME$):: Z=Y :: Y=ASC(SEG$(NAME$,X,1)):: IF Y=91 THEN M$=M$&SEG$(NAME$,X,50):: RETURN ELSE IF Z=0 OR Z=15 OR X=1 OR Y<65 OR Y>90 THEN Y=Y-32
2981 M$=M$&CHR$(Y+32):: NEXT X :: RETURN
2990 PRINT #5:”.S”&TITLE$ :: FOR X=1 TO LINE :: IF POS(MEM$(X),RPT$(” “,15),1)>0 OR LEN(MEM$(X))<5 THEN 2991 ELSE PRINT #5:MEM$(X)&” “;
2991 FOR Y=1 TO 75 :: NEXT Y :: NEXT X :: PRINT #5: : :: RETURN
4000 IF BRD=11 THEN 745 ELSE IF LVL<3 THEN 760 ELSE A$=”~~ SubSpace Communication Network~~ [Type user # or name or phone #]~~ Transmit to => ” :: GOSUB 2210 :: GOSUB 1560
4001 IF A$=”” OR LEN(A$)>23 THEN 760 ELSE ON ERROR 4002 :: G=VAL(A$):: IF G<0 OR G>HST THEN 760 ELSE LINPUT #3,REC G:B$ :: GOTO 4009
4002 ON ERROR 1120 :: FOR G=0 TO HST :: LINPUT #3,REC G:B$ :: GOSUB 2222 :: IF SEG$(B$,1,2)=”EM” THEN 4004
4003 IF POS(B$,A$,1)<>0 THEN 4010
4004 NEXT G :: GOTO 4050
4009 ON ERROR 1120 :: IF SEG$(B$,1,2)<>”EM” THEN 4010 ELSE A$=”No such crew member.” :: GOSUB 2200 :: GOTO 4000
4010 F$=SEG$(B$,LEN(STR$(G))+23,VAL(SEG$(B$,LEN(STR$(G))+21,2))):: A$=”~Transmit to “&F$&”? Y/N [>” :: GOSUB 2210 :: GOSUB 1530 :: MX=10 :: IF A$=”N” THEN 4000
4011 IF FIND=G THEN A$=”Cute.” :: GOSUB 2200 :: GOTO 4000
4015 TITLE$=”E-MAIL TO: #”&STR$(G)&” “&F$ :: OPEN #2:EN$,RELATIVE,FIXED 30 :: FOR H=0 TO 49 :: LINPUT #2,REC H:A$ :: IF ASC(A$)=32 THEN 1160
4016 NEXT H :: A$=”No empty slots! Sorry.” :: GOSUB 2200 :: IF BRD=11 THEN 745 ELSE CLOSE #2 :: GOTO 4000
4018 A$=RPT$(“0”,3-LEN(STR$(G)))&STR$(G)&STR$(LINE-1)&RPT$(“0”,3-LEN(STR$(FIND)))&STR$(FIND)
4020 PRINT #2,REC H:A$&M$ :: CLOSE #2 :: OPEN #2:LT$,RELATIVE,FIXED 80 :: FOR X=1 TO LINE :: PRINT #2,REC H*10+X:GD$(X)&MEM$(X)
4021 NEXT X :: CLOSE #2 :: GOSUB 2990 :: IF BRD=11 THEN 744 ELSE 760
4050 A$=A$&” not found.” :: GOSUB 2200 :: GOTO 4000
4060 CLOSE #2 :: LINE=VAL(SEG$(B$,4,1))+1 :: G=VAL(SEG$(B$,5,3)):: F$=SEG$(B$,8,23):: OPEN #2:LT$,RELATIVE,FIXED 80 :: FOR X=1 TO LINE :: LINPUT #2,REC H*10+X:MEM$(X):: NEXT X :: CLOSE #2 :: MX=10
4065 TITLE$=”E-MAIL TO: #”&STR$(G)&” “&F$ :: A$=”[Mail from “&F$&” #”&STR$(G)&”]~” :: GOSUB 2200 :: FOR X=1 TO LINE :: A$=SEG$(MEM$(X),3,VAL(SEG$(MEM$(X),1,2)))&”~” :: GOSUB 2210 :: NEXT X
4070 A$=”~ D/elete R/ead A/utoreply => ” :: GOSUB 2210 :: GOSUB 1530 :: IF A$=”R” THEN 4065 ELSE IF A$<>”D” AND A$<>”A” THEN 4070
4075 OPEN #2:EN$,RELATIVE,FIXED 30 :: PRINT #2,REC H :: IF A$=”D” THEN 745 ELSE 1160