Home of the original IBM PC emulator for browsers.
[PCjs Machine "ibm5150"]
Waiting for machine "ibm5150" to load....
For children of all ages, PACKMAN (Sound familiar?) is a game in which
the player moves a little computer character -- genus: Compchar;
species: Packman -- through a maze of walls which the player is looking
down on, and consumes the dots cluttering the hallways. While Packman
is merrily gobbling along, he is being chased by a series of monsters
giving all they have to gobble him up. His only defense is to eat one
of four special power dots, which imbue him with the stuff to gobble
his prospective gobblers. Anytime you gobble the gobblers, it's a good
game.
How to Start: For instructions on running BASIC programs, please refer
to the GETTING STARTED section in this catalog.
File Descriptions:
WUMPUS BAS Hunt the Wumpus in its cave
EVRONWRD BAS Ever Onward
RANGERD BAS The William Tell Overture (Lone Ranger Theme)
PUFF BAS Puff the Magic Dragon
LITUPLIF BAS You Light Up My Life
JAMMER BAS "Head On" Variation
RACJAM SCO Data for JAMMER game, scoring categories
GOBBLE BAS PAC MAN variation
TICTACTO BAS Tic-Tac-Toe
NEWTREK BAS Another version of StarTrek
MOON BAS Survival on the MOON
PACKMAN DOC Documentation for PACKMAN.EXE
PACKMAN EXE Excellent graphics version of PacMan
OPERATOR BAS Simulates S/370 VM Operator Console
NEWTREK HOW Documentation for NEWTREK.BAS
SONGS BAS Choose from several on "menu"
YESTER BAS Yesterday
PC-SIG Disk No. #24, version v1.1
The following is a list of the file checksums which should be produced by
the CRCK4 program on disk #9 (and others). If the CRC numbers do not match
you may have a bad file. To use type: CRCK4 <filespec>
CRCK4 output for this disk:
CRCK ver 4.2B (MS DOS VERSION )
CTL-S pauses, CTL-C aborts
--> FILE: EVRONWRD.BAS CRC = 56 DA
--> FILE: GOBBLE .BAS CRC = AE 81
--> FILE: JAMMER .BAS CRC = EA 7A
--> FILE: LITUPLIF.BAS CRC = 7F E2
--> FILE: MOON .BAS CRC = 0B 53
--> FILE: PUFF .BAS CRC = 1F EA
--> FILE: RANGERD .BAS CRC = 3D AA
--> FILE: YESTER .BAS CRC = FD 37
--> FILE: SONGS .BAS CRC = A8 32
--> FILE: TICTACTO.BAS CRC = CA 32
--> FILE: WUMPUS .BAS CRC = 21 B1
--> FILE: NEWTREK .BAS CRC = 46 7B
--> FILE: NEWTREK .HOW CRC = 99 39
--> FILE: OPERATOR.BAS CRC = 5E 97
--> FILE: PACKMAN .DOC CRC = AC A0
--> FILE: PACKMAN .EXE CRC = F7 32
--> FILE: RACJAM .SCO CRC = 7F E7
---------------------> SUM OF CRCS = CB EE
DONE
These and other Public Domain and user-supported programs from:
PC Software Interest Group
1125 Stewart Ct Suite G
Sunnyvale, CA 94086
(408) 730-9291
10 REM Ever Onward
20 '
30 ' The following was taken from the inside cover of the sheet music for
40 ' Ever Onward, The IBM Rally Song.
50 '
60 ' "The IBM rally song, Ever Onward, was written in 1931 by IBMer Fred
70 ' Tappe. This rousing number was only one of many songs written and sung
80 ' by the company's marketing representatives, students, managers and
90 ' employees whenever they gatehered for group meetings.
100 '
110 ' "During the 50's and 60's, changing social emphasis precipitated a
120 ' decline in group singing. The lyrics were rewritten in 1958 and sung
130 ' mainly by marketing students in IBM schools. But the company sing-along
140 ' has continued its steady decline; today the strains of Ever Onward
150 ' echo only on old film soundtracks in the company's archives and in the
160 ' memories of longtime IBMers."
170 '
180 ' This arrangement for IBM PC was done by W. E. Schmitt, IBM Charlotte 1982; tie 8-474-3511.
190 '
200 CLS
210 KEY OFF
220 PRINT SPC(25);
230 COLOR 16,7
240 PRINT "EVER ONWARD"
250 COLOR 7,7
260 PRINT
270 PRINT SPC(10);"The IBM Rally song, written by Fred Tappe"
280 PRINT SPC(10);"Arranged for IBM PC by W. E. Schmitt"
290 PRINT SPC(29);" IBM Charlotte"
300 PRINT
310 WORDS1$="There's a feeling ev'ry where of bigger things in store --"
320 WORDS2$="Of new horizons coming into view."
330 LINE1$="o3mnt160l4bb8o4dd8o3gg8bb8ee8ee8mle."
340 LINE2$="mnee8f#e8de8f#g8aa#8mlb.b.mnb."
350 WORDS3$="Our aim is clear To make each year exceed the one before"
360 WORDS4$="Staying in the lead in ev'rything we do."
370 LINE3$="d.bb8o4dd8o3gg8bb8ee8ee8mle."
380 LINE4$="mnef8f#e8de8f#g8ab8mlg.g.g.mng"
390 WORDS5$="The will to win is built right in It will not be denied."
400 WORDS6$="And we will go ahead we know by working side by side."
410 LINE5$="g8f#f#8aa8o4dd8o3aa8f#f#8aa8o4mld.mnd"
420 LINE6$="o4d8dd8dd8dd8dd8dc8o3af#8d2."
430 WORDS7$="Ever Onward, Ever Onward"
440 LINE7$="o3mnt160l4d.e.f#.g.f#.g.g#.a."
450 WORDS8$="That's the spirit that has brought us fame -------"
460 LINE8$="ga8bg8ab8ag8e.mle.mne"
470 WORDS9$="We're big but bigger we will be"
480 LINE9$="e8d#e8gf#8f#f8f#."
490 WORDSA$="We can't fail for all can see"
500 LINEA$="ff#8ag8gf#8g."
510 WORDSB$="That to serve humanity has been our aim -----"
520 LINEB$="f#g8ba8ag#8ae8f#g8a.mla.mna"
530 WORDSC$="Our products now are known ----- in ev'ry zone ----"
540 LINEC$="d8c#d8g.g.mlg.mngd8e.f.mlg.mng"
550 WORDSD$="Our reputation sparkles like a gem -------"
560 LINED$="g#8aa8ab8o4c#c#8o3ba8o4d1"
570 WORDSE$="We've fought our way thru and new "
580 LINEE$="c8o3af#8d.e.f#.g."
590 WORDSF$="Fields we're sure to conquer too"
600 LINEF$="f#f#8gg8g#g#8a8"
610 WORDSG$="For the Ever Onward I B M --------"
620 LINEG$="g#8a8bo4c8de8o3b.a.g1p2"
630 PRINT WORDS1$: PLAY LINE1$
640 PRINT WORDS2$: PLAY LINE2$
650 PRINT WORDS3$: PLAY LINE3$
660 PRINT WORDS4$: PLAY LINE4$
670 PRINT WORDS5$: PLAY LINE5$
680 PRINT WORDS6$: PLAY LINE6$
690 PRINT WORDS7$: PLAY LINE7$
700 PRINT WORDS8$: PLAY LINE8$
710 PRINT WORDS9$: PLAY LINE9$
720 PRINT WORDSA$: PLAY LINEA$
730 PRINT WORDSB$: PLAY LINEB$
740 PRINT WORDSC$: PLAY LINEC$
750 PRINT WORDSD$: PLAY LINED$
760 PRINT WORDSE$: PLAY LINEE$
770 PRINT WORDSF$: PLAY LINEF$
780 PRINT WORDSG$: PLAY LINEG$
790 END
5 'VERSION 3/30/82
10 CLS:KEY OFF:DEF SEG:POKE 106,0
12 ON ERROR GOTO 18
14 PLAY ""
16 ON ERROR GOTO 0:GOTO 20
18 PRINT "SORRY, THIS PROGRAM REQUIRES 'BASICA' TO RUN.":PRINT:PRINT:RESUME 19
19 ON ERROR GOTO 0:END
20 DEFINT A-Z:DIM X(4),Y(4),VX(4),VY(4),U$(4)
30 I=0:A$="":N=0:L=1:C1=22:C2=59
40 LOCATE 9,30,0:PRINT "G O B B L E M A N"
50 PRINT:PRINT:PRINT TAB(31) "press G to begin"
55 PRINT" Use 'Q' to move up, 'A' to move down, '[' left, and ']' for right."
60 S=0
80 C=0:A$=INKEY$
90 Z=RND*30000:RANDOMIZE Z:IF A$="" THEN 80 ELSE IF ASC(A$)<>71 AND ASC(A$)<>103 THEN GOTO 80
100 PLAY "MBMST250L4O3G4P16O4G8.P16E8C8G4E4P4O3G+4O4G+8.P16F8C+8G+4F4P4T130O3G8 F+8F+16G16G+16A16A+16B16O4C8"
102 COLOR 15,0:CLS
105 PRINT TAB(18) CHR$(201);STRING$(20,205);CHR$(32);STRING$(20,205);CHR$(187)
110 FOR N=0 TO 9
120 PRINT TAB(18) CHR$(186);STRING$(41,249);CHR$(186)
130 NEXT
131 PRINT TAB(18) CHR$(32);STRING$(41,249);CHR$(32)
132 FOR N=0 TO 9
133 PRINT TAB(18) CHR$(186);STRING$(41,249);CHR$(186)
134 NEXT
135 PRINT TAB(18) CHR$(200);STRING$(20,205);CHR$(32);STRING$(20,205);CHR$(188)
140 RESTORE
150 FOR I=0 TO 4
160 READ X(I),Y(I),VX(I),VY(I)
170 NEXT
180 U$(0)=CHR$(249)
190 FOR I=1 TO 3
200 U$(I)=U$(0)
210 NEXT
220 U$(4)=" "
230 FOR I=0 TO 3
240 LOCATE Y(I),X(I),0
250 PRINT CHR$(2)
260 NEXT
270 C=0:H=0
280 LOCATE Y(4),X(4),0
290 PRINT CHR$(1)
300 LOCATE 24,35,0:PRINT "Score = ";S;
310 A$=INKEY$
320 A$=INKEY$:IF A$="" GOTO 370
330 IF ASC(A$)=97 OR ASC(A$)=65 THEN VY(4)=1:VX(4)=0:GOTO 370
340 IF ASC(A$)=93 THEN VY(4)=0:VX(4)=1:GOTO 370
350 IF ASC(A$)=91 THEN VY(4)=0:VX(4)=-1:GOTO 370
360 IF ASC(A$)=113 OR ASC(A$)=81 THEN VY(4)=-1:VX(4)=0:GOTO 370
365 IF ASC(A$)=32 THEN VY(4)=0:VX(4)=0
370 FOR I=0 TO 3
380 LOCATE Y(I),X(I),0
390 PRINT U$(I)
400 Y(I)=Y(I)+VY(I)
410 IF Y(I)<2 OR Y(I)>C1 THEN VY(I)=-VY(I):GOTO 400
420 X(I)=X(I)+VX(I)
430 IF X(I)<19 OR X(I)>C2 THEN VX(I)=-VX(I):GOTO 420
440 LOCATE Y(I),X(I),0
450 U$(I)=CHR$(SCREEN(Y(I),X(I)))
460 PRINT CHR$(2)
470 IF U$(I)=CHR$(1) THEN H=1
480 IF U$(I)<>CHR$(2) GOTO 550
490 FOR N=0 TO 3
500 IF N=I GOTO 540
510 IF X(I)<>X(N) GOTO 540
520 IF Y(I)<>Y(N) THEN 540
530 U$(I)=U$(N):N=3
540 NEXT N
550 NEXT
560 IF H=1 THEN 900
570 LOCATE Y(4),X(4),0
580 PRINT " "
590 Y(4)=Y(4)+VY(4):X(4)=X(4)+VX(4)
591 IF Y(4)=12 AND X(4)=18 AND VX(4)=-1 THEN X(4)=59:GOTO 640
592 IF Y(4)=12 AND X(4)=60 AND VX(4)=1 THEN X(4)=19:GOTO 640
593 IF Y(4)=1 AND X(4)=39 AND VY(4)=-1 THEN Y(4)=22:GOTO 640
594 IF Y(4)=23 AND X(4)=39 AND VY(4)=1 THEN Y(4)=2:GOTO 640
600 IF Y(4)<2 THEN Y(4)=2:GOTO 620
610 IF Y(4)>C1 THEN Y(4)=C1
620 IF X(4)<19 THEN X(4)=19:GOTO 640
630 IF X(4)>C2 THEN X(4)=C2
640 LOCATE Y(4),X(4),0
650 U$(4)=CHR$(SCREEN(Y(4),X(4)))
660 PRINT CHR$(1)
670 IF U$(4)=CHR$(2) THEN 900
680 IF U$(4)=CHR$(249) THEN C=C+1:S=S+L:LOCATE 24,43,0: PRINT S;:GOSUB 4000:IF C=860 GOTO 820
700 U$(4)=" "
720 FOR I=0 TO 3
730 IF RND*10>L GOTO 800
735 IF RND*4>I+L GOTO 745
740 IF Y(4)>Y(I) THEN VY(I)=VY(I)+1 ELSE VY(I)=VY(I)-1
745 IF RND*4>I+L GOTO 770
750 IF X(4)>X(I) THEN VX(I)=VX(I)+1 ELSE VX(I)=VX(I)-1
760 IF VX(I)<-1 THEN VX(I)=-1:GOTO 770
765 IF VX(I)>1 THEN VX(I)=1
770 IF VY(I)<-1 THEN VY(I)=-1:GOTO 800
780 IF VY(I)>1 THEN VY(I)=1
800 NEXT
810 GOTO 320
820 CLS
830 PRINT "next time won't be so easy"
840 PRINT "try again !!! level = ";L
850 L=L+1
860 GOTO 80
870 DATA 19,2,1,1,59,2,-1,1,59,22,-1,-1,19,22,1,-1,39,12,0,0
900 PLAY "MBMLL4T130O0B4B-64A64A-64G64G-64F2"
910 GOTO 60
4000 PLAY "mbl64t255o2;cc#dd#gg#"
4010 RETURN
10 DEFINT A-Z
20 BRIGHT=10:DULL=2
50 CLS
55 KEY OFF
60 JAMSYM$=CHR$(8):RACSYM$=CHR$(15)
65 NUM.SCORE=0
150 ON ERROR GOTO 50000
160 OPEN "Racjam.sco" FOR INPUT AS #1
170 IF EOF(1) THEN CLOSE:GOTO 190
171 NUM.SCORE=NUM.SCORE+1
175 LINE INPUT #1,NAM$(NUM.SCORE):INPUT #1,SCO(NUM.SCORE)
180 GOTO 170
190 CLS:FOR S=NUM.SCORE+1 TO 10:NAM$(S)="-----------------":SCO(S)=0:NEXT :NUM.SCORE=10
200 CLS
300 DEF SEG:POKE 106,0
350 GOSUB 40000
400 YC=40:XC=12
500 LOCATE XC,YC
600 CP$(1)=CHR$(201)
700 CP$(2)=CHR$(187)
800 CP$(4)=CHR$(200)
900 CP$(3)=CHR$(188)
1000 KEY OFF:WIDTH 80
1100 DEF SEG=&HB800:POKE 0,77:IF PEEK(0)=77 THEN SEG=&HB800
1200 DEF SEG=&HB000:POKE 0,77:IF PEEK(0)=77 THEN SEG=&HB000
1300 CLS
1400 DEF FNPK$(ROW,COL)=CHR$(PEEK((ROW-1)*160 +(COL-1)*2))
1500 DEF SEG=SEG
1600 BRIGHT=10:DULL=2
1700 FALSE=0:TRUE=NOT FALSE
1800 Z=0
1900 IF Z>10 THEN Z=10
1950 DEF SEG=SEG
2000 FOR LVL=1 TO 6
2100 CY(1)=YC-(LVL*4+Z-1)
2200 CX(1)=XC-(LVL*2-1)
2300 CY(3)=YC+(LVL*4+Z-1)
2400 CX(3)=XC+(LVL*2-1)
2500 CY(4)=YC-(LVL*4+Z-1)
2600 CX(4)=XC+(LVL*2-1)
2700 CY(2)=YC+(LVL*4+Z-1)
2800 CX(2)=XC-(LVL*2-1)
2900 FOR I=1 TO 4
3000 LOCATE CX(I),CY(I)
3100 PRINT CP$(I);
3200 NEXT
3300 FOR X=CX(1)+1 TO CX(4)-1
3400 LOCATE X,CY(1):PRINT CHR$(186);
3500 LOCATE X,CY(2):PRINT CHR$(186);
3600 NEXT
3700 FOR Y=CY(1)+1 TO CY(2)-1
3800 LOCATE CX(1),Y:PRINT CHR$(205);
3900 LOCATE CX(3),Y:PRINT CHR$(205);
4000 NEXT
4100 XLIM(1,LVL)=CX(1)+1
4200 XLIM(2,LVL)=CX(2)+1
4300 XLIM(3,LVL)=CX(3)-1
4400 XLIM(4,LVL)=CX(4)-1
4500 YLIM(1,LVL)=CY(1)+2
4600 YLIM(2,LVL)=CY(2)-2
4700 YLIM(3,LVL)=CY(3)-2
4800 YLIM(4,LVL)=CY(4)+2
4900 IF LVL=1 THEN 5800
5000 FOR X=XLIM(1,LVL) TO XLIM(4,LVL)
5100 LOCATE X,YLIM(1,LVL):PRINT CHR$(4);
5200 LOCATE X,YLIM(2,LVL):PRINT CHR$(4);
5300 NEXT
5400 FOR Y=YLIM(1,LVL) TO YLIM(2,LVL) STEP 2
5500 LOCATE XLIM(1,LVL),Y:PRINT CHR$(4);
5600 LOCATE XLIM(3,LVL),Y:PRINT CHR$(4);
5700 NEXT
5800 NEXT
5900 FOR X=XC-1 TO XC+1
6000 LOCATE X,YLIM(1,6):PRINT STRING$(18," ");
6100 LOCATE X,YLIM(2,2):PRINT STRING$(18," ");
6200 NEXT
6300 FOR Y=YC-2 TO YC+2
6400 FOR X=XLIM(1,6) TO XLIM(1,2)
6500 LOCATE X,Y:PRINT " ";
6600 LOCATE X+12,Y:PRINT " ";
6700 NEXT
6800 NEXT
6900 TOTPTS=4*(50+5*INT(Z/2))-1
7000 LOCATE 3,1:PRINT "Total";
7100 LOCATE 4,1:PRINT "Points";
7200 LOCATE 2,1:PRINT USING " ###";TOTPTS;
7300 PTSREM=TOTPTS
7400 LOCATE 6,1:PRINT USING " ###";PTSREM
7500 LOCATE 7,1:PRINT "Remain";
7600 JAMSYM$=CHR$(8):RACSYM$=CHR$(15)
7700 RACLVL=6:JAMLVL=6
7800 RACX=XLIM(4,RACLVL):RACY=YLIM(4,RACLVL)
7900 JAMX=XLIM(3,JAMLVL):JAMY=YLIM(3,JAMLVL)
8000 RACBASESPD= 2:JAMBASESPD=1
8100 RACDIR=1:JAMDIR=2
8200 RACMAX=10:RACMIN=1
8300 RACXINC(1)=-1:RACYINC(1)=0
8400 RACXINC(2)=0:RACYINC(2)=1
8500 RACXINC(3)=1:RACYINC(3)=0
8600 RACXINC(4)=0:RACYINC(4)=-1
8700 JAMXINC(1)=0:JAMYINC(1)=-1
8800 JAMXINC(2)=-1:JAMYINC(2)=0
8900 JAMXINC(3)=0:JAMYINC(3)=1
9000 JAMXINC(4)=1:JAMYINC(4)=0
9100 JG$=CHR$(4)
9200 RACMOV%=RACBASESPD:JAMMOV%=JAMBASESPD
9250 IF NUM.SCO<>0 THEN LOCATE 25,1:PRINT USING "High Score: ##### by \ \";SCO(1),NAM$(1);
9300 '------------- Main loop ----------------
9400 A$=INKEY$:IF A$<>"" THEN GOSUB 14600
9500 IF ((JAMX=XC) OR (JAMY=YC)) AND (RACLVL<>JAMLVL) THEN GOSUB 18000
9600 RACMOV%=RACMOV%-1:IF RACMOV%=0 THEN RACMOV%=RACBASESPD:RAC.JUMPED=FALSE:GOSUB 9900
9700 JAMMOV%=JAMMOV%-1:IF JAMMOV%=0 THEN JAMMOV%=JAMBASESPD:JAM.JUMPED=FALSE:GOSUB 12200
9800 GOTO 9300
9900 '============= moves racer ================
10000 LOCATE RACX,RACY:PRINT " ";
10100 RACX=RACX+RACXINC(RACDIR):RACY=RACY+RACYINC(RACDIR)
10200 IF RACX<XLIM(1,RACLVL) OR RACX>XLIM(3,RACLVL) THEN 10800
10300 IF RACY<YLIM(1,RACLVL) OR RACY>YLIM(2,RACLVL) THEN 10800
10400 G$=FNPK$(RACX,RACY):IF G$=CHR$(4) THEN GOSUB 11100
10500 IF G$=CHR$(8) THEN 13400
10600 COLOR BRIGHT:LOCATE RACX,RACY:PRINT RACSYM$;:COLOR DULL
10700 RETURN
10800 RACX=XLIM(RACDIR,RACLVL):RACY=YLIM(RACDIR,RACLVL)
10900 RACDIR=(RACDIR MOD 4)+1
11000 GOTO 10100
11100 SOUND 56,2:PTSREM=PTSREM-1
11200 LOCATE 6,1:PRINT USING " ###";PTSREM
11300 IF PTSREM=0 THEN 11500
11400 RETURN
11500 CLS
11600 LOCATE 10,30
11650 SCO=INT(Z/2)*100+100
11800 LOCATE 12,30
11900 PRINT "Bravo -- now try this one"
12000 FOR I=1 TO 10:FOR J=0 TO 9:SOUND 200+50*J,1:NEXT :NEXT :CLS
12100 Z=Z+2:GOTO 1900
12200 '============= moves jammer ===============
12300 LOCATE JAMX,JAMY:IF JG$=CHR$(8) THEN COLOR BRIGHT ELSE COLOR DULL
12350 PRINT JG$;:COLOR DULL
12400 JAMX=JAMX+JAMXINC(JAMDIR):JAMY=JAMY+JAMYINC(JAMDIR)
12500 IF JAMX<XLIM(1,JAMLVL) OR JAMX>XLIM(3,JAMLVL) THEN 13100
12600 IF JAMY<YLIM(1,JAMLVL) OR JAMY>YLIM(2,JAMLVL) THEN 13100
12700 JG$=FNPK$(JAMX,JAMY)
12800 IF JG$=CHR$(15) THEN 13400
12900 COLOR BRIGHT:LOCATE JAMX,JAMY:PRINT JAMSYM$;:COLOR DULL
13000 RETURN
13100 JAMX=XLIM(JAMDIR,JAMLVL):JAMY=YLIM(JAMDIR,JAMLVL)
13200 JAMDIR=ABS(JAMDIR-1): IF JAMDIR=0 THEN JAMDIR=4
13300 GOTO 9900
13400 COLOR BRIGHT
13500 LOCATE XC,YC-Z/2-1
13600 PRINT "Oops";
13700 FOR I=250 TO 50 STEP -5:SOUND I,1:NEXT
13800 LOCATE 10,30
13850 SCO=(TOTPTS-PTSREM)/TOTPTS*100+(INT(Z/2))*100
13900 PRINT USING "Your score was ####" ;SCO
14000 FOR I=1 TO 5:LOCATE RACX,RACY:PRINT CHR$(8);:FOR WT=1 TO 500:NEXT:LOCATE RACX,RACY:PRINT " ";:FOR WT=1 TO 500:NEXT:NEXT
14100 CLS
14400 COLOR 2
14450 GOSUB 30000
14500 GOTO 200
14600 A=ASC(RIGHT$(A$,1))
14700 IF A=72 AND LEN(A$)=2 THEN A=1:GOTO 15200
14800 IF A=77 AND LEN(A$)=2 THEN A=2:GOTO 15200
14900 IF A=80 AND LEN(A$)=2 THEN A=3:GOTO 15200
15000 IF A=75 AND LEN(A$)=2 THEN A=4:GOTO 15200
15050 BEEP
15100 A=0:RETURN
15200 IF A=RACDIR THEN RACBASESPD=RACBASESPD-1:SOUND 250,3:GOTO 15700
15300 IF A=(RACDIR+1) MOD 4 +1 THEN RACBASESPD=RACBASESPD+1:SOUND 150,3:GOTO 15900
15400 IF A=(RACDIR MOD 4)+1 THEN 16100
15500 IF A=((RACDIR+2) MOD 4)+1 THEN 17300
15600 STOP
15700 IF RACBASESPD<RACMIN THEN RACBASESPD=RACMIN
15800 RETURN
15900 IF RACBASESPD>RACMAX THEN RACBASESPD=RACMAX
16000 RETURN
16100 IF ((RACDIR=1 OR RACDIR=3) AND ABS(RACX-XC)<2) THEN 16400
16200 IF ((RACDIR=2 OR RACDIR=4) AND ABS(RACY-YC)<2) THEN 16400
16300 RETURN
16400 LOCATE RACX,RACY:PRINT " ";
16500 IF RAC.JUMPED THEN RETURN
16600 RACLVL=RACLVL-1:SOUND 190,3:IF RACLVL<2 THEN RACLVL=2
16700 IF RACDIR=1 THEN RACY=YLIM(1,RACLVL)
16800 IF RACDIR=2 THEN RACX=XLIM(2,RACLVL)
16900 IF RACDIR=3 THEN RACY=YLIM(3,RACLVL)
17000 IF RACDIR=4 THEN RACX=XLIM(4,RACLVL)
17040 G$=FNPK$(RACX,RACY):IF G$=CHR$(4) THEN GOSUB 11100
17050 IF G$=CHR$(8) THEN 13400
17100 RAC.JUMPED=TRUE
17200 RETURN
17300 IF ((RACDIR=1 OR RACDIR=3) AND ABS(RACX-XC)<2) THEN 17600
17400 IF ((RACDIR=2 OR RACDIR=4) AND ABS(RACY-YC)<2) THEN 17600
17500 RETURN
17600 LOCATE RACX,RACY:PRINT " ";
17700 IF RAC.JUMPED THEN RETURN
17800 RACLVL=RACLVL+1:SOUND 90,3:IF RACLVL>6 THEN RACLVL=6
17900 GOTO 16700
18000 IF RND(5)<0.97-(Z*0.1) THEN LOCATE JAMX,JAMY:PRINT " "; ELSE SOUND 300,2:SOUND 400,2
18100 IF JAM.JUMPED THEN RETURN
18200 JAM.JUMPED=TRUE:IF RND(5)>0.9 THEN RETURN
18250 IF JAMLVL>2 AND RND(0.5)>0.9 THEN JAMLVL=JAMLVL-1:SOUND 190,3:GOTO 18500
18300 IF RACLVL>JAMLVL THEN JAMLVL=JAMLVL+1:SOUND 90,3
18400 IF RACLVL<JAMLVL THEN JAMLVL=JAMLVL-1:SOUND 190,3
18500 IF JAMDIR=1 THEN JAMX=XLIM(1,JAMLVL)
18600 IF JAMDIR=2 THEN JAMY=YLIM(2,JAMLVL)
18700 IF JAMDIR=3 THEN JAMX=XLIM(3,JAMLVL)
18800 IF JAMDIR=4 THEN JAMY=YLIM(4,JAMLVL)
18900 RETURN
30000 IP=1
30010 FOR I=1 TO 10
30020 IF SCO(I)>SCO THEN IP=I+1
30030 NEXT
30040 IF IP=11 THEN RETURN
30050 PRINT "Congratulations, your score is in the top 10 !!!"
30055 IF INKEY$<>"" THEN 30055
30060 PRINT:PRINT
30070 PRINT"What is your name: ";:COLOR BRIGHT:LINE INPUT N$:COLOR DULL
30080 FOR I=9 TO IP STEP -1
30090 NAM$(I+1)=NAM$(I)
30100 SCO(I+1)=SCO(I)
30110 NEXT
30120 SCO(IP)=SCO
30130 NAM$(IP)=N$
30140 OPEN "racjam.sco" FOR OUTPUT AS #1
30150 FOR I=1 TO 10
30155 PRINT #1,NAM$(I):PRINT#1,SCO(I)
30160 NEXT:CLOSE:RETURN
40000 RC=60
40005 JC=10:JR=20
40010 COLOR BRIGHT:LOCATE 10,RC,0:PRINT "Racer ";
40020 LOCATE JR,JC:PRINT " Jammer":COLOR DULL
40030 FOR WT=1 TO 50:NEXT
40035 IF JR=11 THEN 41000
40040 RC=RC-1:JC=JC+1
40045 IF JC>RC-10 THEN LOCATE JR,JC:PRINT " ";:JR=JR-1:JC=JC-1
40050 GOTO 40010
41000 LOCATE 1 ,10:PRINT "Use arrow keys to speed up,slow down, and change direction"
41005 PRINT:PRINT " Press Space Bar to Begin"
41010 LOCATE 5,20:PRINT RACSYM$;" -- Racer ";JAMSYM$;" -- Jammer"
41050 LOCATE 15,10
41055 PRINT "High Scores:"
41056 PRINT " --------------":PRINT
41060 FOR I=1 TO 5
41063 IF RIGHT$(NAM$(I),1)="|" THEN COLOR DULL ELSE COLOR BRIGHT
41065 PRINT USING " ## \ \ ##### ";I,NAM$(I),SCO(I);
41066 IF RIGHT$(NAM$(I+5),1)="|" THEN COLOR DULL ELSE COLOR BRIGHT
41068 PRINT USING " ## \ \ ##### ";I+5,NAM$(I+5),SCO(I+5)
41069 COLOR DULL
41070 NEXT
41095 IF INKEY$<>" " THEN 41095 ELSE CLS:RETURN
50000 '==== Error =======
50010 IF ERR=53 AND ERL=160 THEN GOTO 51000
50090 ON ERROR GOTO 0
51000 NAM$(1)="Heroic |":SCO(1)=500
51005 NAM$(2)="Professional |":SCO(2)=400
51010 NAM$(3)="Challenger |":SCO(3)=300
51015 NAM$(4)="Excellent |":SCO(4)=250
51020 NAM$(5)="Very Good |":SCO(5)=200
51025 NAM$(6)="Good |":SCO(6)=150
51030 NAM$(7)="Amateur |":SCO(7)=100
51035 NAM$(8)="Beginner |":SCO(8)=75
51045 NAM$(9)="Poor |":SCO(9)=50
51050 NAM$(10)="Why Bother? |":SCO(10)=25
51100 NUM.SCORE=10
52000 RESUME 190
2999 RUNITSTR$ = "DIRECT"
3000 REM this program will demonstrate the play statement for the pc
3010 REM set initial octave -- 2 = 1 octave below middle c
3020 REM the type of notes -- normal, legato, staccato
3030 REM the tempo -- no quarter notes per second?
3040 O$="o2mnt84" ' normal octave
3050 OM1$="o1mnt84" ' down 1 octave
3060 OP1$="o3mnt84" ' up 1 octave
3070 GOSUB 3090
3075 LOCATE 22,1,0 : PRINT STRING$(40,255)
3077 IF RUNITSTR$ = "direct" THEN END
3078 IF RUNITSTR$ = "DIRECT" THEN END
3080 RETURN ' to musica
3090 REM subroutine to play music from data statements
3100 RCNT = 0
3110 RESTORE
3120 GOSUB 3220 ' skip some measures if required
3130 READ A$
3150 IF (A$ = "tocoda") AND (RCNT = 0) THEN 3130
3160 IF (A$ = "tocoda") AND (RCNT = 1) THEN GOSUB 3300
3170 IF (A$ = "repeat") AND (RCNT = 0) THEN RCNT = 1 : RESTORE : GOTO 3130
3180 IF (A$ = "repeat") AND (RCNT = 1) THEN A$ = "end"
3190 IF A$ = "end" THEN 3330
3200 PLAY A$
3210 GOTO 3130
3220 REM skip data measures
3225 LOCATE 23,5,0
3230 INPUT "Enter measure to start with";MNO
3250 FOR I = 1 TO MNO - 1
3260 READ A$
3265 IF A$ = "end" THEN GOTO 3290
3280 NEXT I
3290 RETURN
3300 REM skip to coda subroutine
3310 READ A$
3320 IF A$ <> "coda" THEN GOTO 3310 ELSE READ A$ : RETURN
3330 RETURN
3340 DATA "p4p4","xo$;d-4mld-4mne-8","xom1$;b-2p8b-8"
3350 DATA "xo$;c4mlc4mnxom1$;b-8","a-4xo$;c2","xom1$;b-4mlb-4mnxo$;c8"
3360 DATA "mlxom1$;b-8g2mnb-8","a-4a-4b-4","xo$;mlc4c2","mne-4mld-4c8mn"
3370 DATA "xom1$;b-2p8b-8","xo$;c4c4xom1$;b-4","a-4xo$;c4c8"
3380 DATA "xom1$;b4b4xo$;c4","d2mlc8xom1$;bmn","xo$;d4d4e-4","mlf2f16mnp8xom1$;b-8"
3390 DATA "xo$;mlg2g4mn","p64g4a-4b-4","mlg2g4mn","p64g4a-4b-4","mlg2g4mn"
3400 DATA "e4f4g4","p64a-2p8f8","a-4b-4xop1$;c4xo$;","mla-2a-4mn"
3410 DATA "p64a-4b-4f4","tocoda","mlg2g4","g4mnp8a-8","mlf2f4","f4mnp8p8"
3420 DATA "repeat"
3430 DATA "coda","xo$;mlg2g4mn","p64mlb2b4mn","xop1$;mlc2c4mn","p64c4c4c4"
3440 DATA "xo$;mlb-2p64b-8g8mn","g4g4f4","mle-2e-4","e-4mnp64c4"
3450 DATA "xom1$;mlb-2b-4","b-8b-16","b-16mnp64b-4"
3460 DATA "xo$;msa-4g4mlf5g32f32e-32msd32mn","mle-2e-4","e-4e-8","e-16e-32","e-64mnp8p8"
3470 DATA "end"
3480 DATA "end"
0 'MIKE STAFFORD
5 ' ENTERED, CHANGED, CORRECTED, ENHANCED, AND SCREWED UP BY MIKE STAFFORD
6 KEY OFF
9 DEFINT A-Z
10 DIM T$(47)
20 DIM M(42,8) 'direction matrix
30 DIM O(14) 'object locations
60 REM *********************************************************
70 REM ** INITIALIZE TEXT AND MOVE MATRICES
80 REM *********************************************************
85 CLS: PRINT "VERSION 01-28-82.5 ms";CHR$(2)
86 PRINT ""
88 PRINT ""
90 PRINT " WELCOME TO THE GAME OF SURVIVAL."
95 PRINT""
97 PRINT ""
100 INPUT "WOULD YOU LIKE INSTRUCTIONS";B$
110 B$=LEFT$(B$,1):GOSUB 5050
120 IF B$="Y" THEN GOSUB 5130
125 CLS
127 LOCATE 4,10: PRINT "YOU ARE SLOWLY REGAINING YOUR SENSES AFTER DISCOVERING"
128 LOCATE 5,10: PRINT "THAT YOU ARE LOST ON THE MOON."
130 FOR I=1 TO 47:READ T$(I):NEXT
160 FOR I=1 TO 42:FOR J=1 TO 8:READ M(I,J):NEXT:NEXT
210 REM *************************************************************
220 REM ** INITIALIZE OTHER PROGRAM VARIABLES
225 REM **
230 REM ** P = CURRENT POSITION C = NO. OF ITEMS CARRIED
240 REM ** TIME.ELAPSED = CURRENT ELAPSED TIME F4 = ILLUMINATOR ON FLAG
250 REM ** OXYGEN.LEFT = OXYGEN REMAINING F1 = METEOR SHOWER FLAG
260 REM ** F0 = OXYGEN IN USE FLAG F2 = OPEN SHED FLAG
265 REM ** F5 = DEACTIVATOR EXPOSED FLAG
270 REM ** V = VISITS TO COMP ROOM F7 = BOMB DEACTIVATED FLAG
280 REM ** P1 = POWER IN POWER UNIT F9 = OXYGEN REQ'D IN STATION
290 REM ** P2 = POWER IN POWER PACK
300 REM *************************************************************
310 F5=0
320 P=1
330 C=2
340 TIME.ELAPSED=0
350 OXYGEN.LEFT=185
360 P1=230
370 P2=50
380 V=0
390 F0=1
391 REM Assign location of objects (99=carried, 0=not accessable)
400 O(1)=21
410 O(2)=19
420 O(3)=99
430 O(4)=6
440 O(5)=32
450 O(6)=0
460 O(7)=38
470 O(8)=35
480 O(9)=0
490 O(10)=35
500 O(11)=99
510 O(12)=33
520 O(13)=34
530 O(14)=37
570 F1=0
580 F2=0
590 F4=0
600 F7=0
610 F9=0
615 CLS
620 REM *************************************************************
630 REM ** DISPLAY CURRENT STATUS AND LOCATION INFORMATION
640 REM *************************************************************
650 PRINT "Elapsed time; "; TIME.ELAPSED; "minutes"
660 IF O(11)=99 THEN PRINT "Power Unit: "; P1; "units"
670 IF O(14)=99 THEN PRINT "Power Pack: "; P2; "units"
680 TIME.ELAPSED=TIME.ELAPSED+5
690 IF O(11)=99 AND P1>5 THEN P1=P1-5
700 IF O(14)=99 AND P2>5 THEN P2=P2-5
710 IF O(11)=99 AND P1=0 THEN 3680
720 IF O(14)=99 AND P2=0 THEN 3680
730 IF TIME.ELAPSED>400 THEN 2960 'FAILED, TIME USED UP
740 IF TIME.ELAPSED>350 THEN 3840 'TRY TO SET OFF BOMB
750 IF TIME.ELAPSED>200 THEN 3740 'EXPOSE DEACTIVATOR
760 IF F0=1 THEN OXYGEN.LEFT=OXYGEN.LEFT-5
770 IF OXYGEN.LEFT<0 THEN OXYGEN.LEFT=0
780 IF F0=0 THEN 800
790 IF OXYGEN.LEFT>0 THEN 840
800 IF F9=0 THEN 820
810 IF P>21 THEN 2900 'OXY REQUIRED
820 IF P<18 THEN 2900 'OXY REQUIRED
830 IF P=38 THEN 1700
840 IF P=38 THEN 3590
850 IF F0=1 THEN PRINT "Oxygen remaining: "; OXYGEN.LEFT; "minutes"
860 PRINT "Present location status: YOU ARE"
870 FOR I = M(P,7) TO M(P,8)
880 PRINT T$(I)
890 NEXT I
900 PRINT "##"
910 REM *************************************************************
920 REM ** DISPLAY ANY OBJECTS PRESENT
930 REM *************************************************************
940 IF P=2 THEN 1920
950 FOR I=1 TO 14
960 IF O(I)<>P THEN 990
970 GOSUB 4410
980 PRINT "THERE IS "; B$; " HERE."
990 NEXT I
1000 GOTO 2000 'go move robot if he has already been found
1010 REM*************************************************************
1020 REM ** READ AND PROCESS KEYBOARD RESPONSE
1030 REM ************************************************************
1040 INPUT B$:GOSUB 5050
1050 I=0
1060 IF LEN(B$)<>1 THEN 1320
1070 IF B$="N" THEN I=1
1080 IF B$="S" THEN I=2
1090 IF B$="E" THEN I=3
1100 IF B$="W" THEN I=4
1110 IF B$="U" THEN I=5
1120 IF B$="D" THEN I=6
1130 IF B$="Q" THEN GOTO 5960
1140 IF I=0 THEN 1570
1150 IF M(P,I)=0 THEN 1270
1160 IF M(P,I)=99 THEN 2940
1170 Q=M(P,I)
1180 IF P=12 THEN 3060
1190 IF P=13 THEN 3180
1200 IF P=22 THEN 3310
1210 IF P=23 THEN 3420
1220 IF P=29 THEN 3470
1230 R=P 'remember where we came from
1240 P=Q 'assign new location
1250 IF P=35 THEN V=V+1
1260 GOTO 650
1270 PRINT "YOU CANNOT GO IN THAT DIRECTION."
1280 GOTO 1040
1290 REM ************************************************************
1300 REM ** PROCESS 2 OR MORE CHARACTER COMMANDS
1310 REM ************************************************************
1320 C$=MID$(B$,1,3)
1330 IF C$="LOO" THEN 650
1340 IF C$="DES" THEN 650
1350 IF C$="GET" THEN 2190
1360 IF C$="TAK" THEN 2190
1370 IF C$="KEE" THEN 2190
1380 IF C$="DRO" THEN 2580
1390 IF C$="LEA" THEN 2580
1400 IF C$="PUT" THEN 2580
1410 IF C$="INV" THEN 2780
1420 IF C$="QUI" THEN 5960
1430 IF C$="END" THEN 5960
1440 IF C$="TRA" THEN 1750
1450 IF C$="DIG" THEN 1860
1460 IF C$="JMS" THEN 1610
1470 IF C$="FUE" THEN 4030
1480 IF C$="REA" THEN 4250
1490 IF C$="DEA" THEN 3890
1500 IF C$="BLA" THEN 4110
1510 IF C$="UP" THEN 1640
1520 IF C$="DOW" THEN 1640
1530 IF C$="NOR" THEN 1640
1540 IF C$="SOU" THEN 1640
1550 IF C$="EAS" THEN 1640
1560 IF C$="WES" THEN 1640
1570 PRINT "INVALID COMMAND!"
1580 GOTO 1040
1590 PRINT "I CANNOT PROCESS YOUR REQUEST!"
1600 GOTO 1040
1610 PRINT "ENTER LOCATION"
1620 INPUT P
1630 GOTO 650
1640 B$=MID$(C$,1,1)
1660 GOTO 1070
1670 REM ************************************************************
1680 REM ** PROCESS ENTRY TO HANGER FROM AIR LOCK
1690 REM ************************************************************
1700 IF R<>39 THEN 2900
1710 GOTO 840
1720 REM ************************************************************
1730 REM ** PROCESS TRANSPORT COMMAND
1740 REM ************************************************************
1750 IF P<>36 THEN 1800
1760 IF O(8)=99 THEN 1590
1770 P=O(8)
1780 PRINT "BEAMING IN PROCESS."
1790 GOTO 650
1800 IF P<>O(8) THEN 1590
1810 P=36
1820 GOTO 1780
1830 REM ************************************************************
1840 REM ** PROCESS DIG COMMAND
1850 REM ************************************************************
1860 IF P<>10 THEN 1590
1870 O(9)=10
1880 GOTO 940
1890 REM ************************************************************
1900 REM ** DROP ILLUMINATOR IF AT OVERLOOK
1910 REM ************************************************************
1920 IF O(4)<>99 THEN 950
1930 O(4)=100
1940 PRINT "YOU DROPPED YOUR ILLUMINATOR! YOU CANNOT RETRIEVE IT."
1945 C=C-1
1950 GOTO 950
1970 REM ***********************************************************
1980 REM ** PROCESS ROBOT
1990 REM ***********************************************************
2000 IF O(5)=28 THEN O(5)=35
2010 IF O(5)=42 THEN O(5)=28
2020 IF O(5)=41 THEN O(5)=42
2030 IF O(5)=27 THEN O(5)=41
2040 IF O(5)=25 THEN O(5)=27
2050 IF O(5)<>35 THEN 2090
2060 IF P<>28 THEN 1040
2070 M(28,1)=35
2080 GOTO 1040
2090 IF O(5)<>32 THEN 1040
2100 IF P<>32 THEN 1040
2110 O(5)=25
2120 IF O(13)=99 THEN 1040
2130 PRINT "ROBOT FAILS TO RECOGNIZE YOU. IT FIRES A PHASOR WEAPON AT YOU."
2140 GOTO 2980
2160 REM ************************************************************
2170 REM ** PROCESS GET OR TAKE COMMAND
2180 REM ************************************************************
2190 GOSUB 4590
2200 IF I>0 THEN 2260
2210 IF I<0 THEN 2240
2220 PRINT " I DON'T RECOGNIZE "; RIGHT$(B$,LEN(B$)-J); "."
2230 GOTO 1040
2240 PRINT "WHAT ITEM?"
2250 GOTO 1040
2260 IF O(I)<>P THEN 2370
2270 IF C>3 THEN 2390
2280 IF I=5 THEN 2410
2290 IF I=10 THEN 2430
2300 IF I=11 THEN 2460
2310 IF I=14 THEN 2490
2320 C=C+1
2330 O(I)=99
2340 IF I=3 THEN F0=1
2350 PRINT "O.K."
2360 GOTO 1040
2370 PRINT "THERE IS NO "; RIGHT$(B$,LEN(B$)-J); " HERE!"
2380 GOTO 1040
2390 PRINT "YOU CAN'T CARRY ANY MORE!"
2400 GOTO 1040
2410 PRINT "YOU CAN'T CARRY A ROBOT!"
2420 GOTO 1040
2430 PRINT "YOU CAN'T GET THE MESSAGE, IT'S ON THE TERMINAL SCREEN."
2450 GOTO 1040
2460 IF O(14)=99 THEN 2520
2470 O(11)=99
2480 GOTO 2320
2490 IF O(11)=99 THEN 2520
2500 O(14)=99
2510 GOTO 2320
2520 PRINT "YOU CAN'T HAVE MORE THAN ONE POWER SUPPLY."
2540 GOTO 1040
2550 REM ************************************************************
2560 REM ** PROCESS DROP OR LEAVE COMMAND
2570 REM ************************************************************
2580 GOSUB 4590
2590 IF I>0 THEN 2620
2600 IF I<0 THEN 2240
2610 GOTO 2220
2620 IF O(I)<>99 THEN 2690
2630 C=C-1
2635 SOUND 100,1
2640 O(I)=P
2650 IF I=3 THEN F0=0
2660 IF I=11 THEN 2710
2670 IF I=14 THEN 2710
2680 GOTO 2350
2690 PRINT "YOU DON'T HAVE "; RIGHT$(B$,LEN(B$)-J); "!"
2700 GOTO 1040
2710 IF P<22 THEN 2870
2720 IF P=38 THEN 2870
2730 IF F9=1 THEN 2870
2740 GOTO 2350
2750 REM ************************************************************
2760 REM ** PROCESS INVENTORY COMMAND
2770 REM ************************************************************
2780 FOR I=1 TO 14
2790 IF O(I)<>99 THEN 2820
2800 GOSUB 4410
2810 PRINT "YOU HAVE "; B$; "."
2820 NEXT I
2830 GOTO 1040
2840 REM ************************************************************
2850 REM ** PROGRAM TERMINATION PROCESSING
2860 REM ************************************************************
2870 PRINT "YOU HAVE NO POWER OR POWER PACK. YOU HAVE FROZEN TO DEATH."
2880 GOTO 2980
2900 PRINT "OXYGEN REQUIRED HERE. NONE AVAILABLE."
2910 GOTO 2980
2920 PRINT "A NUCLEAR DETONATION HAS JUST OCCURRED."
2930 GOTO 2980
2940 I=3000: WHILE I>950: SOUND I,1 :I=I/1.03: WEND: SOUND 250,2
2945 PRINT "YOU HAVE FALLEN TO YOU DEATH."
2950 GOTO 2980
2952 PRINT "YOU HAVE BEEN ZAPPED BY THE LASER."
2960 GOTO 2980
2970 PRINT "THE MOON BASE HAS JUST BEEN DESTROYED BY A LARGE ASTEROID."
2980 PRINT "YOU HAVE FAILED TO SURVIVE."
2990 PRINT "DO YOU WISH TO TRY AGAIN."
3000 INPUT B$:B$=LEFT$(B$,1):GOSUB 5050
3010 IF B$="Y" THEN RESTORE: GOTO 125
3020 GOTO 5960
3030 REM ************************************************************
3040 REM ** PROCESS METEOR SHOWER
3050 REM ************************************************************
3060 IF M(P,I)<>13 THEN 1230
3070 IF F2=1 THEN 1230
3080 PRINT "THERE IS A METEOR SHOWER, YOUR SPACE SUIT HAS DEVELOPED A LEAK!"
3090 GOSUB 4890
3100 IF I<>2 THEN 2980
3120 PRINT "YOUR SUIT IS NOW SEALED."
3130 F2=1
3140 GOTO 1230
3150 REM ************************************************************
3160 REM ** PROCESS LOCKED SHED
3170 REM ************************************************************
3180 IF M(P,I)<>22 THEN 1230
3190 IF F1=1 THEN 1230
3200 PRINT "THE SHED IS LOCKED!"
3210 GOSUB 4890
3220 IF I<>1 THEN 3260
3225 PLAY "L32N53N0N48N0N75N0N17N15N76N43N2N58"
3230 PRINT "YOU ARE IN THE SHED AIR LOCK."
3240 F1=1
3250 GOTO 1230
3260 PRINT "YOUR ATTEMPT FAILS."
3270 GOTO 1040
3280 REM ************************************************************
3290 REM ** PROCESS DARK VENTILATOR SHAFT
3300 REM ************************************************************
3310 IF M(P,I)<>23 THEN 1230
3320 IF F4=1 THEN 1230
3330 PRINT "IT IS DANGEROUS TO PROCEED IN THE DARK!"
3340 GOSUB 4890
3350 IF I<>4 THEN 2940
3360 PRINT "THE SHAFT IS NOW ILLUMINATED."
3370 F4=1
3380 GOTO 1230
3390 REM ************************************************************
3400 REM ** PROCESS SHAFT WITH NO ILLUMINATOR
3410 REM ************************************************************
3420 IF O(4)<>99 THEN 2940
3430 GOTO 1230
3440 REM ************************************************************
3450 REM ** PROCESS LASER BEAM
3460 REM ************************************************************
3470 IF M(P,I)<>37 THEN 1230
3480 IF F3=1 THEN 1230
3490 PRINT "THERE IS A LASER BEAM HERE. PASSAGE NOT POSSIBLE WITH BEAM PRESENT."
3510 GOSUB 4890
3520 IF I<>12 THEN 2952
3530 PRINT "THE BEAM IS NOW DEFLECTED."
3540 F3=1
3550 GOTO 1230
3560 REM ************************************************************
3570 REM ** PROCESS BLOWN SEAL IN SPACE STATION
3580 REM ************************************************************
3590 IF R<>29 THEN 850
3600 IF F9=1 THEN 850
3610 F9=1
3620 PRINT "YOU HAVE JUST BLOWN AIR SEAL IN SPACE STATION."
3630 GOTO 850
3650 REM ************************************************************
3660 REM ** POWER REQUIRED TESTING
3670 REM ************************************************************
3680 IF P<22 THEN 2870
3690 IF F9=1 THEN 2870
3700 GOTO 730
3710 REM ************************************************************
3720 REM ** EXPOSE DEACTIVATOR
3730 REM ************************************************************
3740 IF F5=1 THEN 760
3750 O(6)=14
3760 M(2,8)=M(2,7)
3770 M(14,8)=M(14,7)
3780 M(14,4)=2
3790 F5=1 'mark deactivator exposed
3800 GOTO 760
3810 REM ************************************************************
3820 REM ** DETONATE BOMB
3830 REM ************************************************************
3840 IF F7=0 THEN 2920
3850 GOTO 760
3860 REM ************************************************************
3870 REM ** DEACTIVATE BOMB
3880 REM ************************************************************
3890 IF O(6)<>99 THEN 3940
3900 IF O(7)<>99 THEN 3980
3910 F7=1
3920 PRINT "BOMB IS NOW DEACTIVATED."
3930 GOTO 1040
3940 PRINT "YOU HAVE NOTHING TO DO IT WITH!"
3950 GOTO 1040
3960 PRINT "THERE IS NOTHING TO DO IT TO!"
3970 GOTO 1040
3980 PRINT "YOU CAN'T DO IT FROM HERE!"
3990 GOTO 1040
4000 REM ************************************************************
4010 REM ** FUEL ROCKET
4020 REM ************************************************************
4030 IF P<>19 THEN 3980
4040 IF O(9)<>99 THEN 3940
4050 O(9)=98
4060 PRINT "FUEL IS NOW LOADED."
4065 C=C-1
4070 GOTO 1040
4080 REM ************************************************************
4090 REM ** BLASTOFF PROCESSING
4100 REM ************************************************************
4110 IF P<>21 THEN 3980
4120 IF O(9)<>98 THEN 4200
4130 IF F7=1 THEN 4160
4140 PRINT "REPAIRS NOT YET COMPLETE."
4150 GOTO 1040
4160 PRINT "CONGRATULATIONS. YOU HAVE JUST BLASTED OFF AND ARE ON YOUR WAY TO EARTH."
4180 PRINT "YOUR ESCAPE TIME:"; TIME.ELAPSED; " MINUTES."
4190 GOTO 2990
4200 PRINT "YOUR SPACE CRAFT HAS NO FUEL!"
4210 GOTO 1040
4220 REM ************************************************************
4230 REM ** COMPUTER READOUT PROCESSING
4240 REM ************************************************************
4250 IF P<>35 THEN 3980
4260 GOSUB 4590
4270 IF I<>10 THEN 3960
4280 IF V<>0 THEN 4320
4290 PRINT "BOMB DE-ACTIVATOR LOCATED SOMEWHERE EAST OF SPACE STATION, ON MOON'S SURFACE."
4310 GOTO 4360
4320 IF V<>1 THEN 4350
4330 PRINT "LOCAL FUEL SOURCE: DILITHIUM CRYSTAL."
4340 GOTO 4360
4350 PRINT "DILITHIUM FOUND IN SOFT SURFACES."
4360 IF F7=1 THEN PRINT "SPACECRAFT REPAIRS COMPLETED."
4370 GOTO 1040
4380 REM ************************************************************
4390 REN ** SUBROUTINE TO DESCRIVE ITEMS AT LOCATION
4400 REM ************************************************************
4410 IF I=1 THEN B$="AN ELECTRONIC KEY"
4420 IF I=2 THEN B$="SEALANT"
4430 IF I=3 THEN B$="AN OXYGEN MODULE"
4440 IF I=4 THEN B$="AN ILLUMINATOR"
4450 IF I=5 THEN B$="A ROBOT"
4460 IF I=6 THEN B$="A DEACTIVATOR"
4470 IF I=7 THEN B$="A NUCLEAR BOMB"
4480 IF I=8 THEN B$="A TRANSPORTER UNIT"
4490 IF I=9 THEN B$="DILITHIUM CRYSTALS"
4500 IF I=10 THEN B$="A COMPUTER MESSAGE"
4510 IF I=11 THEN B$="A POWER UNIT"
4520 IF I=12 THEN B$="A MIRROR"
4530 IF I=13 THEN B$="A CODED BADGE"
4540 IF I=14 THEN B$="A POWER PACK"
4550 RETURN
4560 REM ************************************************************
4570 REM ** SUBROUTINE TO CONVERT AN ITEM TO A NUMERIC VALUE
4580 REM ************************************************************
4590 FOR J=1 TO LEN(B$)
4600 IF MID$(B$,J,1)=" " THEN 4640
4610 NEXT J
4620 I=-1
4630 RETURN
4640 C$=MID$(B$,J+1,3)
4650 I=0
4660 IF C$="ELE" THEN I=1 ' "AN ELECTRONIC KEY"
4670 IF C$="KEY" THEN I=1 '
4680 IF C$="SEA" THEN I=2 ' "SEALANT"
4690 IF C$="OXY" THEN I=3 ' "AN OXYGEN MODULE"
4700 IF C$="MOD" THEN I=3 '
4710 IF C$="ILL" THEN I=4 ' "AN ILLUMINATOR"
4720 IF C$="ROB" THEN I=5 ' "A ROBOT"
4730 IF C$="DEA" THEN I=6 ' "A DEACTIVATOR"
4740 IF C$="NUC" THEN I=7 ' "A NUCLEAR BOMB"
4750 IF C$="BOM" THEN I=7 '
4760 IF C$="TRA" THEN I=8 ' "A TRANSPORTER UNIT"
4770 IF C$="DIL" THEN I=9 ' "DILITHIUM CRYSTALS"
4780 IF C$="CRY" THEN I=9 '
4790 IF C$="COM" THEN I=10 ' "A COMPUTER MESSAGE"
4800 IF C$="MES" THEN I=10 '
4810 IF C$="UNI" THEN I=11 ' "A POWER UNIT"
4820 IF C$="MIR" THEN I=12 ' "A MIRROR"
4830 IF C$="BAD" THEN I=13 ' "A CODED BADGE"
4840 IF C$="PAC" THEN I=14 ' "A POWER PACK"
4850 RETURN
4860 REM ************************************************************
4870 REM ** SUBROUTINE TO PROCESS TRY COMMAND
4880 REM ************************************************************
4890 INPUT B$:GOSUB 5050
4900 C$=LEFT$(B$,3)
4910 IF C$="TRY" THEN 4950
4920 IF C$="USE" THEN 4950
4930 I=-1
4940 RETURN
4950 GOSUB 4590
4960 IF I<1 THEN PRINT "USE WHAT?":RETURN
4970 IF O(I)=99 THEN RETURN
4980 PRINT "YOU DON'T HAVE "; RIGHT$(B$,LEN(B$)-J); "!"
4990 GOTO 4930
5000 PRINT "YOUR ATTEMPT FAILS!"
5010 GOTO 4930
5020 '***************************************************************
5030 '* SUBROUTINE TO CONVERT LOWERCASE TO UPPERCASE
5040 '***************************************************************
5050 FOR ICNTR=1 TO LEN(B$)
5060 DUM$=MID$(B$,ICNTR,1)
5070 IF DUM$>="a" AND DUM$<="z" THEN MID$(B$,ICNTR,1)=CHR$(ASC(DUM$) -32)
5080 NEXT ICNTR
5090 RETURN
5100 REM ************************************************************
5110 REM ** PRINT INSTRUCTIONS
5120 REM ************************************************************
5130 CLS: PRINT "YOU HAVE CRASH LANDED ON THE EARTH'S MOON. YOU HAVE LIMITED"
5140 PRINT "SUPPLIES AND TIME IN WHICH TO SURVIVE. TO TRAVEL, YOU MAY"
5150 PRINT "ENTER DIRECTIVES SUCH AS NORTH OR N, AS WELL AS S, E, W AND"
5160 PRINT "U, AND D (UP AND DOWN). YOU WILL ENCOUNTER VARIOUS ITEMS"
5170 PRINT "AND SITUATIONS DURING YOUR TRAVELS. TO COMMUNICATE, ENTER"
5180 PRINT "COMMANDS (VERBS), FOLLOWED BY OBJECT NAMES, IF APPLICABLE."
5190 PRINT "FOR EXAMPLE, GET XXX, LEAVE, AND INVENTORY."
5200 PRINT ""
5210 PRINT "ONCE YOU HAVE SURVIVED, THE OBJECT THEN IS TO ACHIEVE THE"
5220 PRINT "OPTIMUM SURVIVAL TIME. GOOD LUCK!!!"
5230 PRINT ""
5250 PRINT ""
5260 INPUT "HIT ENTER TO CONTINUE";ANYT$
5270 RETURN
5280 DATA "AT MARE SERENITATIS." :'1
5290 DATA "ON RIM OF POSIDONIUS." :'2
5300 DATA "TOTAL DARKNESS TO EAST." :'*
5310 DATA "TWIXT DAWES & PLINIUS." :'3
5320 DATA "AT PASS IN HAEMUS MOUNTAINS." :'4
5330 DATA "AT CRATER MANILUS." :'5
5340 DATA "AT MARE VAPORUM." :'6
5350 DATA "AT MT. EUDOXUS." :'7
5360 DATA "INSIDE ARISTOTELES." :'8
5370 DATA "IN CHANGING AREA." :'40
5380 DATA "IN LACUS SOMNIORUM." :'9
5390 DATA "AT LACUS MORTIS." :'10
5400 DATA "THE SURFACE IS VERY SOFT HERE." :'*
5410 DATA "AT EAST SIDE OF MARE IMBRIUM." :'11
5420 DATA "AT THE BASE OF PLATO CRATER. A" :'12
5430 DATA "SHINY OBJECT IS SEEN WEST." :'*
5440 DATA "BEFORE A METAL SHED. A" :'13
5450 DATA "SIGN READS VENT. SHAFT #2." :'*
5460 DATA "EAST OF MARE SERENITATIS." :'14
5470 DATA "THERE IS TOTAL DARKNESS." :'*
5480 DATA "AT THE CRASH SITE OF A SPACE CRAFT." :'15
5490 DATA "THE SHIP ENTRANCE IS BEFORE YOU." :'*
5500 DATA "AT THE CENTER OF MARE IMBRIUM." :'16,17
5510 DATA "IN THE AIR LOCK CHAMBER OF THE SHIP." :'18
5520 DATA "IN THE AFT CARGO AND FUEL STORAGE ROOM." :'19
5530 DATA "IN THE ENGINE ROOM OF THE SPACECRAFT." :'20
5540 DATA "IN THE SHIP'S CONTROL ROOM." :'21
5550 DATA "IN AN AIR LOCK CHAMBER." :'39
5560 DATA "INSIDE A VENTILLATOR SHED. A LADDER" :'22
5570 DATA "LEADS DOWN INTO A LARGE METAL SHAFT." :'*
5580 DATA "IN A VENTILLATOR PASSAGE." :'23
5590 DATA "AT A VENTILLATOR OPENING. THROUGH THE" :'24
5600 DATA "OPENING A LIT PASSAGEWAY CAN BE SEEN." :'*
5610 DATA "IN ALIGHTED SPACE STATION CORRIDOR." :'25,26,27,28,29
5620 DATA "IN THE SPACE STATION INFIRMARY." :'30
5630 DATA "IN THE RECREATION ROOM AND LIBRARY." :'31
5640 DATA "IN THE MESS HALL. ABANDONED FOOD TRAYS" :'32
5650 DATA "ARE STILL ON THE TABLES." :'*
5660 DATA "IN THE STORAGE ROOM AND SUPPLY AREA." :'34
5670 DATA "IN THE SLEEPING QUARTERS." :'33
5680 DATA "IN AN ELEVATOR AT SUBSURFACE LEVEL." :'41
5690 DATA "IN AN ELEVATOR AT SURFACE LEVEL." :'42
5700 DATA "IN THE STATION CONTROL CENTER." :'35
5710 DATA "IN THE TRANSPORTER ROOM." :'36
5720 DATA "IN THE SPACE STATION LABORATORY." :'37
5730 DATA "IN THE HANGAR AREA. THE LAUNCH AREA" :'38
5740 DATA "IS JUST SOUTH OF HERE." :'*
5745 ' N S E W U D DS DE
5750 DATA 07, 04, 02, 15, 00, 00, 01, 01 :'1
5755 DATA 09, 03, 14, 01, 00, 00, 02, 03 :'2
5760 DATA 02, 05, 14, 04, 00, 00, 04, 04 :'3
5765 DATA 01, 05, 03, 00, 00, 00, 05, 05 :'4
5770 DATA 04, 00, 03, 06, 00, 00, 06, 06 :'5
5775 DATA 00, 00, 05, 00, 00, 00, 07, 07 :'6
5780 DATA 08, 01, 09, 11, 00, 00, 08, 08 :'7
5785 DATA 00, 07, 10, 00, 00, 00, 09, 09 :'8
5790 DATA 10, 02, 14, 07, 00, 00, 11, 11 :'9
5795 DATA 00, 09, 14, 08, 00, 00, 12, 13 :'10
5800 DATA 12, 15, 07, 16, 00, 00, 14, 14 :'11
5805 DATA 00, 11, 00, 13, 00, 00, 15, 16 :'12
5810 DATA 00, 16, 12, 22, 00, 00, 17, 18 :'13
5815 DATA 99, 99, 99, 00, 00, 00, 19, 20 :'14
5820 DATA 11, 18, 01, 00, 00, 00, 21, 22 :'15
5825 DATA 17, 16, 07, 16, 00, 00, 23, 23 :'16
5830 DATA 16, 17, 11, 17, 00, 00, 23, 23 :'17
5835 DATA 15, 19, 00, 00, 00, 00, 24, 24 :'18
5840 DATA 18, 00, 20, 00, 00, 00, 25, 25 :'19
5845 DATA 00, 00, 00, 19, 21, 00, 26, 26 :'20
5850 DATA 00, 00, 00, 00, 00, 20, 27, 27 :'21
5855 DATA 00, 00, 13, 00, 00, 23, 29, 30 :'22
5860 DATA 24, 00, 00, 00, 22, 00, 31, 31 :'23
5865 DATA 25, 23, 00, 00, 00, 00, 32, 33 :'24
5870 DATA 27, 26, 33, 32, 24, 00, 34, 34 :'25
5875 DATA 25, 00, 30, 31, 00, 00, 34, 34 :'26
5880 DATA 34, 25, 41, 00, 00, 00, 34, 34 :'27
5885 DATA 00, 29, 42, 36, 00, 00, 34, 34 :'28
5890 DATA 28, 38, 40, 37, 00, 00, 34, 34 :'29
5895 DATA 00, 00, 00, 26, 00, 00, 35, 35 :'30
5900 DATA 00, 00, 26, 00, 00, 00, 36, 36 :'31
5905 DATA 00, 00, 25, 00, 00, 00, 37, 38 :'32
5910 DATA 00, 00, 00, 25, 00, 00, 40, 40 :'33
5915 DATA 00, 27, 00, 00, 00, 00, 39, 39 :'34
5920 DATA 00, 28, 00, 00, 24, 00, 43, 43 :'35
5925 DATA 00, 00, 28, 00, 00, 00, 44, 44 :'36
5930 DATA 00, 00, 29, 00, 00, 00, 45, 45 :'37
5935 DATA 29, 00, 39, 00, 00, 00, 46, 47 :'38
5940 DATA 40, 00, 00, 38, 00, 00, 28, 28 :'39
5945 DATA 00, 39, 00, 29, 00, 00, 10, 10 :'40
5950 DATA 00, 00, 00, 27, 42, 00, 41, 41 :'41
5955 DATA 00, 00, 00, 28, 00, 41, 42, 42 :'42
5960 END
3 REM ** R.H. JOHNSON 6/28/82 **
5 REM ** NEWTREK FOR THE IBM PC **
6 CLS:KEY OFF
10 DIM R(10),G(8,8),C(9,2),K(3,3),N(3),Z(8,8),D(8)
15 DIM K$(8),L$(8),M$(8),N$(8),P$(8)
20 DIM U$(8),V$(8),W$(8),G$(8)
30 G$(1) = "Alpha":G$(2) = "Beta":G$(3) = "Gamma":G$(4) = "Delta"
35 G$(5) = "Tau":G$(6) = "Zeta":G$(7) = "Eta":G$(8) = "Theta"
45 CLS
60 LOCATE 10,25: GOSUB 11020
70 PRINT "These are the Voyages of the"
71 LOCATE ,25: PRINT " Starship Enterprise "
72 FOR I = 1 TO 20: GOSUB 12000: NEXT
75 GOSUB 11000 : PRINT
100 PRINT
105 Z$ = " "
110 FOR I9 = 1 TO 8:R(I9) = 0:K$(I9) = Z$:L$(I9) = Z$
112 M$(I9) = Z$:N$(I9) = Z$:P$(I9) = Z$:U$(I9) = Z$
114 V$(I9) = Z$:W$(I9) = Z$: NEXT I9
120 LOCATE 20,25:PRINT"Push a key to start"
125 XKEY$=INKEY$:I=I*RND:LOCATE 20,50:PRINT USING"##.##";RND:IF LEN(XKEY$)=0 THEN 125
140 GOSUB 55000 ' see if instructions are wanted
150 CLS: LOCATE 10
160 PRINT "Enter your skill level-": PRINT "Beginner,Average,Expert"
165 INPUT "Skill? (B/A/E) ";A$
167 LOW$=A$:GOSUB 13000:A$=UP$
175 M1 = 1
180 IF A$ = "A" THEN M1 = 3
185 IF A$ = "E" THEN M1 = 9
189 PRINT
190 IF M1 = 1 THEN PRINT "You are a new Starship Commander"
195 IF M1 = 3 THEN PRINT "You are a Seasoned Starship Commander"
200 IF M1 = 9 THEN GOSUB 11010 : PRINT"You are on a Suicide Mission in Space!": GOSUB 7200: GOSUB 7200
201 GOSUB 11000
220 T0 = INT ( RND (1) * 20 + 20) * 100
225 T = T0:T9 = 30 + INT (60 * RND(1)):D0 = 0
240 E0 = 2800:E = 2000:P0 = 10:P =10:S = 1000:H8 = 0:A3 = 0:P6 = 0.05
280 DEF FN D(D) = SQR ((K(I,1) - S1) ^ 2 + (K(I,2) - S2) ^2)
285 DEF FN F(D) = SQR ((K(I,1) - F1) ^ 2 + (K(I,2) - F2) ^2)
286 DEF FN S(D) = - R(1) + 10 *R(2) - 20 * R(3) + 50 * R(4) + 30 * R(5) - 100 * R(6)
287 DEF FNX1(C1) = C(INT(C1),1) + (C(INT(C1 + 1),1) -C(INT(C1),1)) * (C1 - INT (C1))
288 DEF FNX2(C1) = C(INT(C1),2) + (C(INT(C1 + 1),2) -C(INT(C1),2)) * (C1 - INT (C1))
290 Q1 = INT ( RND (1) * 8 + 1):Q2 = INT ( RND (1) * 8 + 1)
295 S1 = INT ( RND (1) * 8 + 1):S2 = INT ( RND (1) * 8 + 1)
310 T7 = 0
315 C(2,1) = - 1:C(3,1) = - 1:C(4,1) = - 1
320 C(4,2) = - 1:C(5,2) = - 1:C(6,2) = - 1
325 C(1,1) = 0:C(3,2) = 0:C(5,1) = 0
360 C(7,2) = 0:C(9,1) = 0
370 C(1,2) = 1:C(2,2) = 1:C(6,1) = 1
385 C(7,1) = 1:C(8,1) = 1:C(8,2) =1:C(9,2) = 1
405 FOR I = 1 TO 8:D(I) = 0: NEXT I
410 D$ = "Warp EnginesS.R. SensorsL.R. SensorsPhaser Cntrl"
415 D$ = D$ + "Photon TubesDamage Cntrl"
420 F$ = "Shield CntrlComputer "
425 B9 = 0:K9 = 0
440 FOR I = 1 TO 8: FOR J = 1 TO 8:R1 = RND (1)
455 IF R1 > (0.9799999 - 0.05 * (M1 -1)) THEN 480
460 IF R1 > (0.95 - 0.05 * (M1 -1)) THEN 495
465 IF R1 > (0.8 - 0.05 * (M1 -1)) THEN 510
470 K3 = 0: GOTO 520
480 K3 = 3:K9 = K9 + 3: GOTO 520
495 K3 = 2:K9 = K9 + 2: GOTO 520
510 K3 = 1:K9 = K9 + 1
520 R1 = RND (1): IF R1 > 0.8 THEN 540
530 B3 = 0: GOTO 550
540 B3 = 1: IF RND (1) > 0.3 THEN 545
542 B3 = 1 + INT (3 * RND (1))
545 B9 = B9 + 1
550 S3 = INT ( RND (1) * 8 + 1)
555 G(I,J) = K3 * 100 + B3 * 10 +S3
560 Z(I,J) = 0: IF B3 > 0 THEN Z(I,J) = 10 * B3
565 NEXT J: NEXT I
575 K7 = K9: PRINT : PRINT : PRINT
580 GOSUB 7200: PRINT "Captain..."
590 PRINT "You must destroy ";K9;" Klingons "
591 PRINT "in ";T9;" Stardates with ";B9;" Starbases."
592 J$="S"
595 IF B9 > 0 THEN 610:G(6,3) = 114
610 K3 = 0:B3 = 0:S3 = 0
625 IF Q1 < 1 OR Q1 > 8 OR Q2 < 1 OR Q2 > 8 THEN 690
645 X = G(Q1,Q2) / 100
650 K3 = INT (X)
655 B3 = INT ((X - K3) * 10)
660 S3 = G(Q1,Q2) - INT (G(Q1,Q2) / 10) * 10
665 IF K3 = 0 THEN 685
670 IF S > 200 THEN 685
672 GOSUB 11010
675 PRINT "Combat Area - Condition Red"
680 PRINT "***Shields dangerously low***"
681 GOSUB 11000
682 GOSUB 7200
685 FOR I = 1 TO 3: FOR J = 1 TO 3:K(I,J) = 0: NEXT J: NEXT I
690 FOR I = 1 TO 3:K(I,3) = 0: NEXT I
705 FOR I9 = 1 TO 8
710 K$(I9) = Z$:L$(I9) = Z$:M$(I9) = Z$
725 N$(I9) = Z$:P$(I9) = Z$:U$(I9) = Z$
740 V$(I9) = Z$:W$(I9) = Z$: NEXT I9
755 F3 = 0:D8 = 0:D9 = 0
775 A$ = "<E>"
780 Z1 = S1:Z2 = S2: GOSUB 3940
795 IF RND (1) > P6 THEN 845
805 D9 = 1: GOSUB 3900
815 Z1 = R1:Z2 = R2:A$ = " D ": GOSUB 3940
834 GOSUB 11010 : GOSUB 7200
835 PRINT "**Quadrant contains Mystery": PRINT "DEATH Planet!!!**"
836 GOSUB 11000
840 GOSUB 4960
845 IF K3 < = 0 THEN 897
846 FOR I = 1 TO K3: GOSUB 3900
860 A$ = "+++":Z1 = R1:Z2 = R2: GOSUB 3940
880 K(I,1) = R1:K(I,2) = R2
890 K(I,3) = 100 + INT ( RND (1) * 200)
891 IF RND (1) > 0.1 THEN 895
892 GOSUB 11010 : GOSUB 7200: PRINT "Quadrant contains Klingon Commander!": GOSUB 11000
893 K(I,3) = 10 * K(I,3)
895 NEXT I
897 IF B3 < = 0 THEN 935
900 FOR I = 1 TO B3: GOSUB 3900
915 A$ = ">B<":Z1 = R1:Z2 = R2
930 GOSUB 3940: NEXT I
935 IF S3 < = 0 THEN 980
940 FOR I = 1 TO S3: GOSUB 3900:A$ = " * "
960 Z1 = R1:Z2 = R2: GOSUB 3940: NEXT I
980 IF RND (1) > 0.4 THEN 1010
981 GOSUB 11010 : GOSUB 7200
985 PRINT "Quadrant contains Invisible Romulan!"
986 GOSUB 11000
990 A3 = 1
995 GOSUB 3900
1000 A1 = R1:A2 = R2
1010 GOSUB 3130
1014 REM MAIN COMMAND ENTRY
1015 GOSUB 7200
1017 IF S<0 OR E<0 THEN 3050
1020 PRINT :INPUT "Command";A$
1021 LOW$=A$:GOSUB 13000:A$=UP$
1025 IF A$ = "M" THEN 1135
1030 IF A$ = "S" THEN 1010
1035 IF A$ = "L" THEN 1725
1040 IF A$ = "P" THEN 1850
1045 IF A$ = "T" THEN 2030
1050 IF A$ = "X" THEN 2640
1055 IF A$ = "D" THEN 2705
1060 IF A$ = "C" THEN 3470
1065 IF A$ = "E" THEN 4290
1070 IF A$ = "I" THEN 4790
1071 IF A$ = "H" THEN 10100
1072 GOSUB 11020
1075 PRINT "I=Idle in Space "
1080 PRINT "M=Move Enterprise "
1081 PRINT "H=Hyperspace Jump "
1085 PRINT "S=Short Range Scan "
1090 PRINT "L=Long Range Scan "
1095 PRINT "P=Fire Phasors "
1100 PRINT "T=Fire Photon Torpedoes "
1105 PRINT "X=Shield Control "
1110 PRINT "D=Damage Control Report "
1115 PRINT "C=Call Computer "
1120 PRINT "E=End This Game "
1125 GOSUB 11000 : GOTO 1015
1130 REM COURSE CONTROL
1135 GOSUB 50000
1140 INPUT "Course (1-9):";C1
1145 IF C1 = 0 THEN 1015
1150 IF C1 < 1 OR C1 > 9 THEN 1135
1160 INPUT "Warp Factor (0-9):";W1
1170 IF W1 < 0 OR W1 > 8 THEN 1135
1180 IF D(1) > = 0 OR W1 < = 0.2 THEN 1200
1185 GOSUB 11010 : GOSUB 7200
1190 PRINT "Warp engines are damaged.": PRINT "Maximum impulse speed is warp .1"
1195 GOTO 1135
1200 IF RND (0) > 0.09999999 THEN 1204
1201 GOSUB 7200: GOSUB 11020 : PRINT"Space Storm sends Enterprise off course!": GOSUB 11000
1202 C1 = (8.899999 + C1) / 2:W1 = 8! * RND (0)
1204 IF K3 < = 0 THEN 1225
1205 GOSUB 2830
1210 IF K3 < = 0 THEN 1225
1215 IF S < 0 THEN 3045
1220 GOTO 1245
1225 IF E > 500 OR S < 500 THEN 1245
1234 GOSUB 11010 : GOSUB 7200
1235 PRINT "You have ";E;" units of energy."
1240 PRINT "Suggest you get some from your": PRINT "shields which have ";S;" units"
1242 GOSUB 11000
1245 FOR I = 1 TO 8: IF D(I) > = 0 THEN 1270
1255 REM FIX ANY DAMAGED DEVICE
1260 D(I) = D(I) + 1: IF D(I) > 0 THEN D(I) = 0
1270 NEXT I
1275 IF RND (1) > 0.2 THEN 1350
1280 R1 = INT ( RND (1) * 8 + 1)
1285 IF R(1) > 0.5 THEN 1325
1290 D(R1) = D(R1) - ( RND (1) * 0.5 + 0.1)
1295 IF D(R1) > 0 THEN D(R1) = 0
1300 GOSUB 11020 : PRINT "Damage Control Report:": GOSUB 11000
1305 GOSUB 4040: PRINT " damaged": PRINT
1320 GOTO 1350
1325 D(R1) = D(R1) + ( RND (1) * 5 + 1): IF D(R1) > 0 THEN D( R1) = 0
1335 PRINT "Damage Control Report:";
1340 GOSUB 4040: PRINT : PRINT "condition improved."
1349 GOSUB 7200
1350 N3 = INT (W1 * 8)
1355 A$ = " ":Z1 = S1:Z2 = S2: GOSUB 3940
1380 X = S1:Y = S2
1390 X1 = FNX1(C1)
1395 X2 = FNX2(C1)
1400 FOR I = 1 TO N3:S1 = INT (S1 + X1):S2 = INT (S2 + X2)
1415 IF S1 < 1 OR S1 > = 9 OR S2 < 1 OR S2 > = 9 THEN 1575
1435 A$ = " ":Z1 = S1:Z2 = S2: GOSUB 4095
1455 IF Z3 = 1 THEN 1500
1459 GOSUB 11010 : GOSUB 7200
1460 PRINT "Warp engines shut down at sector ": PRINT TAB( 1);S1;",";S2;" due to bad navigation."
1461 GOSUB 11000
1465 H = INT (100! * RND (1) +5)
1470 PRINT "Stop uses ";H;" energy units."
1475 E = E - H
1480 IF E < 0 THEN 3045
1485 S1 = INT (S1 - X1):S2 = INT(S2 - X2): GOTO 1505
1500 NEXT I
1505 A$ = "<E>":Z1 = S1:Z2 = S2: GOSUB 3940
1525 E = E - 5 * N3
1530 GOSUB 4960
1535 IF W1 < 1 THEN 1550
1540 T = T + W1
1545 P6 = P6 + 0.01
1550 IF T > T0 + T9 THEN 3025
1555 IF A3 = 0 THEN 1570
1565 GOSUB 5335
1570 GOTO 1010
1575 X = Q1 * 8 + X + X1 * N3:Y =Q2 * 8 + Y + X2 * N3
1585 Q1 = INT (X / 8):Q2 = INT (Y / 8)
1595 S1 = INT (X - Q1 * 8):S2 = INT (Y - Q2 * 8)
1605 IF S1 < > 0 THEN 1620
1610 Q1 = Q1 - 1
1615 S1 = 8
1620 IF S2 < > 0 THEN 1640:Q2 =Q2 - 1:S2 = 8
1635 GOSUB 4960
1640 T = T + W1
1645 P6 = P6 + 0.01
1650 IF S1 < 1 THEN S1 = 1
1651 IF S1 > 8 THEN S1 = 8
1652 IF S2 < 1 THEN S2 = 1
1653 IF S2 > 8 THEN S2 = 8
1655 IF Q1 < 1 OR Q1 > 8 OR Q2 < 1 OR Q2 > 8 THEN 4230
1690 E = E - 5 * N3
1695 IF T > T0 + T9 THEN 3025
1700 IF A3 = 0 THEN 1715
1710 GOSUB 5335
1715 GOTO 610
1720 REM * LONG RANGE SCAN *
1725 IF D(3) > = 0 THEN 1740
1729 GOSUB 11010 : GOSUB 7200
1730 PRINT "Long Range Sensors not working."
1731 GOSUB 11000
1735 GOTO 1015
1740 GOSUB 11020
1745 PRINT "Long range scan for ";G$(Q1);" ";G$(Q2); "(";Q1;" ";Q2;")"
1750 PRINT "╔═══════════════════╗":GOSUB 11000
1755 FOR I = Q1 - 1 TO Q1 + 1
1760 N(1) = 0:N(2) = 0:N(3) = 0
1765 FOR J = Q2 - 1 TO Q2 + 1
1770 IF I < 1 OR I > 8 OR J < 1 OR J > 8 THEN 1805
1790 N(J - Q2 + 2) = G(I,J)
1795 IF D(8) < 0 THEN 1805
1800 Z(I,J) = G(I,J)
1805 NEXT J
1807 SCAN$="║ ### ### ### ║"
1815 PRINT USING SCAN$;N(1);N(2);N(3)
1825 NEXT I
1826 PRINT "╚═══════════════════╝":GOSUB 11000
1830 IF D(8) < 0 THEN GOSUB 11010 : GOSUB 7200: PRINT "Scan not recorded.": GOSUB 11000
1835 GOTO 1015
1840 REM * PHASOR CONTROL *
1850 IF K3 < = 0 THEN 2770
1855 IF D(4) > = 0 THEN 1875
1856 GOSUB 11010 : GOSUB 7200
1860 PRINT "PHASORS ARE DAMAGED.": GOSUB 11000 : GOTO 1015
1875 IF D(8) > = 0 THEN 1885
1876 GOSUB 11010 : GOSUB 7200
1880 PRINT "Computer failure hampers accuracy"
1881 GOSUB 11000
1885 PRINT "Phasors locked on target,": PRINT "Energy available ";E
1890 INPUT "Units to fire: ";X
1900 IF X < = 0 THEN 1015
1905 IF E - X < 0 THEN 1875
1910 E = E - X
1915 IF D(7) > = 0 THEN 1925
1920 X = 0.5 * X * RND (1)
1925 FOR I = 1 TO 3
1930 IF K(I,3) < = 0 THEN 2005
1935 H = INT (((X / K3) / FN D(0)) * (2 + RND (1)))
1936 GOSUB 7000
1940 K(I,3) = K(I,3) - H
1941 PRINT
1944 PRINT "Enterprise makes ";H;" unit hit on Klingon at ";K(I,1);",";K(I,2)
1945 PRINT " (";K(I,3);" power left)"
1947 GOSUB 14000
1955 IF F4 < 0! OR F3 = 0 THEN 1990
1965 H = INT (((0.25 * F4 / K3) / FN F(0)) * (2 + RND (1)))
1970 K(I,3) = K(I,3) - H
1971 GOSUB 7000
1972 PRINT
1974 PRINT "Cruiser makes ";H;" unit hit on Klingon at ";K(I,1);",";K(I,2)
1975 PRINT " (";K(I,3);" power left)"
1977 GOSUB 14000
1985 F4 = F4 - H
1990 IF K(I,3) > 0 THEN 2005
1992 PRINT
1995 GOSUB 2780
2000 IF K9 < = 0 THEN 3070
2005 NEXT I
2006 PRINT
2010 IF S < 0 THEN 3045
2015 GOSUB 2830
2020 GOTO 1015
2025 REM * PHOTON TORPEDOES *
2030 GOSUB 50000: IF D(5) > = 0 THEN 2045
2032 GOSUB 11010 : GOSUB 7200
2035 PRINT "Photon tubes not operational!": GOSUB 11000 : GOTO 1015
2045 IF P > 0 THEN 2060
2046 GOSUB 7200
2050 PRINT "All photon torpedoes expended": GOTO 1015
2060 INPUT "Torpedo course:";C9
2062 IF RND (1) > 0.1 THEN 2066
2063 GOSUB 11010 : GOSUB 7200: PRINT "***Torpedo Misfires***!!!": GOSUB 11000
2064 C9 = 1! + 8! * RND (1):C7 = 1: GOTO 2069
2066 INPUT "Number of Torpedoes:";C7
2068 IF P < C7 THEN 2066
2069 FOR I7 = 1 TO C7
2070 C1 = C9
2071 IF C1 = 0 THEN 1015
2075 C1 = C1 + (0.1 * RND (1)) - (0.1 * RND (1))
2085 IF C1 < 1 THEN C1 = 1
2086 IF C1 > 8.899999 THEN C1 = 8.899999
2095 X1 = FNX1(C1)
2100 X2 = FNX2(C1)
2101 IF ABS (X1) < 0.1 THEN X1 = 0
2102 IF ABS (X2) < 0.1 THEN X2 = 0
2103 GOSUB 11020
2104 GOSUB 12000
2105 X = S1:Y = S2:P = P - 1: PRINT"Torpedo track:"
2107 GOSUB 11000
2125 X = X + X1:Y = Y + X2
2135 IF X < 1 OR X > = 9 OR Y < 1 OR Y > = 9 THEN 2615
2155 PRINT USING" ##.## , ##.## ";X;Y
2165 A4 = 2
2170 IF INT (X + 0.5) < > A1 OR INT (Y + 0.5) < > A2 THEN 2300
2172 GOSUB 11010 : GOSUB 7200: PRINT "Invisible Romulan destroyed!": GOSUB 11000
2173 A1 = 0:A2 = 0:A3 = 0:R(5) = R(5) + 1: GOTO 2630
2300 GOSUB 5135
2301 IF A9 = 0 THEN 2125
2400 GOTO 2630
2615 GOSUB 11020 : PRINT "Torpedo missed.": GOSUB 11000
2620 IF S < 0 THEN 3045
2630 NEXT I7
2631 GOSUB 2830
2632 GOTO 1015
2635 REM * SHIELD CONTROL *
2640 IF D(7) > = 0 THEN 2655
2642 GOSUB 7200
2645 PRINT "Shield Control is non-operational": GOTO 1015
2655 PRINT "Energy available ";E + S
2660 INPUT "Units to shields:";X
2670 IF X < = 0 THEN 1015
2675 IF E + S - X < 0 THEN 2655
2680 E = E + S - X:S = X: PRINT "Ship=";E;",shields=";S: GOTO 1015
2700 REM * DAMAGE CONTROL *
2705 IF D(6) > = 0 THEN 2720
2706 GOSUB 7200
2710 PRINT "DAMAGE CONTROL REPORT NOT AVAILABLE.": GOTO 1015
2720 PRINT : PRINT "Device Repair Time"
2721 PRINT "------ -----------"
2730 FOR R1 = 1 TO 8: IF D(R1) > = 0 THEN 2755
2740 GOSUB 4040: PRINT USING " ##.## & ";- D(R1);" stardates "
2755 NEXT R1
2760 PRINT : GOTO 1015
2770 PRINT "No Klingons in this quadrant."
2775 GOTO 1015
2780 GOSUB 11010 : GOSUB 7200: PRINT "Klingon at ";K(I,1);",";K(I,2);" destroyed!": GOSUB 11000
2785 R(2) = R(2) + 1:K3 = K3 - 1:K9 = K9 - 1
2800 A$ = " ":Z1 = K(I,1):Z2 = K(I,2): GOSUB 3940
2820 G(Q1,Q2) = K3 * 100 + B3 * 10 + S3: RETURN
2830 IF C$ < > "DOCKED" THEN 2845
2835 PRINT "Base shields protect Enterprise"
2836 GOSUB 7200
2840 RETURN
2845 IF K3 < = 0 THEN 2985
2850 FOR I = 1 TO 3
2855 IF K(I,3) < = 0 THEN 2980
2860 H = INT ((K(I,3) / FN D(0)) * (2 + RND (1)))
2865 S = S - H
2866 GOSUB 7100
2870 PRINT H;" unit hit on Enterprise from Klingon at ";K(I,1);",";K(I,2)
2875 PRINT " (";S;" shield strength left)"
2877 GOSUB 14000
2880 P5 = 0.05
2885 IF H > 100! THEN P5 = 0.2
2890 IF H > 200! THEN P5 = 0.5
2895 IF RND (1) > P5 THEN 2920
2900 R1 = INT ( RND (1) * 8 + 1)
2905 D(R1) = D(R1) - ( RND (1) + 0.25)
2910 GOSUB 4040
2915 PRINT " Damaged by Klingon blast"
2920 IF F3 = 0 THEN 2980
2925 H = INT ((K(I,3) / FN F(0)) * (2 + RND (1)))
2930 F4 = F4 - H
2935 PRINT H;" Unit hit on Cruiser from Klingon at";K(I,1);",";K(I,2)
2940 PRINT " (";F4;" shield strength left)"
2942 GOSUB 14000
2945 IF F4 > 0 THEN 2980
2946 GOSUB 11010 : GOSUB 7200
2950 PRINT "**** Cruiser destroyed ****"
2951 GOSUB 11000
2955 A$ = " ":R(3) = R(3) + 1:Z1 = F1:Z2 = F2: GOSUB 3940
2975 F3 = 0
2980 NEXT I
2985 RETURN
2990 PRINT "The Enterprise is dead in Space."
2995 FOR I = 1 TO 5: GOSUB 7200: NEXT
3000 IF K3 < = 0 THEN 3050
3005 GOSUB 2830
3010 IF E < 0 OR S < 0 THEN 3045: GOTO 3000
3025 PRINT
3030 PRINT "IT IS STARDATE ";T
3035 PRINT "TIME HAS RUN OUT."
3036 PRINT "THE FEDERATION WILL BE DESTROYED."
3037 GOTO 3080
3040 REM * ENTERPRISE IS DONE FOR *
3045 PRINT
3050 GOSUB 11010 : BEEP:PRINT :PRINT "The Enterprise has been destroyed.":BEEP
3051 GOSUB 11000
3065 GOTO 3080
3070 PRINT "All Klingons have been destroyed."
3075 PRINT "You have saved the Federation!"
3080 F5 = T - T0
3081 IF F5 < = 0 THEN F5 = 1
3083 F5 = ((K7 - K9) / (F5))
3084 GOSUB 11020
3085 PRINT "Your efficiency rating is": PRINT F5;" Klingons/stardate."
3090 PRINT "Actual time of mission ";T - T0;" stardates"
3095 PRINT "Score =" FN S(0)
3096 GOSUB 11000
3100 INPUT "Another voyage? (yes/no) ";R$
3105 LOW$=R$:GOSUB 13000:R$=UP$
3110 IF R$ = "YES" THEN 45
3115 IF R$ < > "NO" THEN 3100
3120 GOTO 4290
3125 REM * SHORT RANGE SCAN AND STARTING POINT *
3130 IF (S + E) < 0 THEN 3045
3131 FOR I = S1 - 1 TO S1 + 1
3135 FOR J = S2 - 1 TO S2 + 1
3140 IF I < 1 OR I > 8 OR J < 1 OR J > 8 THEN 3185
3160 A$ = ">B<"
3165 Z1 = I
3170 Z2 = J
3175 GOSUB 4095
3180 IF Z3 = 1 THEN 3205
3185 NEXT J
3190 NEXT I
3195 D0 = 0: GOTO 3240
3205 D0 = 1:C$ = "DOCKED"
3215 E = B3 * 3000:P = B3 * 10
3225 PRINT "Shields dropped for docking."
3230 S = 0: GOTO 3275
3240 IF K3 > 0 THEN 3260
3245 IF E < E0 * 0.1 THEN 3270
3250 C$ = "GREEN": GOTO 3275
3260 C$ = "RED": GOTO 3275
3270 C$ = "YELLOW"
3275 IF D(2) > = 0 THEN 3300
3280 GOSUB 11010 : PRINT "Short range sensors are out.": GOSUB 7200: GOSUB 11000 : GOTO 3465
3300 IF K3 = 0 THEN 3355
3305 IF F3 = 1 THEN 3355
3310 IF RND (1) * SQR (K3) < 0.9 THEN 3353
3315 F3 = 1:F4 = INT (2000! * RND(1))
3325 GOSUB 3900
3330 A$ = "<F>":F1 = R1:F2 = R2: GOSUB 3940
3350 PRINT "A friendly star Cruiser has entered the quadrant."
3352 FOR TTT = 1 TO 200: NEXT TTT
3353 REM
3355 REM SHOW SCAN
3356 TX = INT (T): GOSUB 11020
3360 PRINT " ╔══1═══2═══3═══4═══5═══6═══7═══8══╗ Score "; FN S(0)
3362 SCAN$="\\║ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ║ "
3365 PRINT USING SCAN$;"1";K$(1);K$(2);K$(3);K$(4);K$(5);K$(6);K$(7);K$(8);
3366 PRINT"Star date ";TX
3375 PRINT USING SCAN$;"2";L$(1);L$(2);L$(3);L$(4);L$(5);L$(6);L$(7);L$(8);
3376 PRINT"Time left ";INT(T9-(T-T0))
3385 PRINT USING SCAN$;"3";M$(1);M$(2);M$(3);M$(4);M$(5);M$(6);M$(7);M$(8);
3386 PRINT"Location ";C$
3395 PRINT USING SCAN$;"4";N$(1);N$(2);N$(3);N$(4);N$(5);N$(6);N$(7);N$(8);
3396 PRINT"Quadrant ";"(";Q1;",";Q2;")"
3405 PRINT USING SCAN$;"5";P$(1);P$(2);P$(3);P$(4);P$(5);P$(6);P$(7);P$(8);
3406 PRINT"Sector ";"(";S1;",";S2;")"
3415 PRINT USING SCAN$;"6";U$(1);U$(2);U$(3);U$(4);U$(5);U$(6);U$(7);U$(8);
3416 PRINT"Energy ";E
3425 PRINT USING SCAN$;"7";V$(1);V$(2);V$(3);V$(4);V$(5);V$(6);V$(7);V$(8);
3426 PRINT"Torpedos ";P
3435 PRINT USING SCAN$;"8";W$(1);W$(2);W$(3);W$(4);W$(5);W$(6);W$(7);W$(8);
3436 PRINT"Shields ";S
3437 PRINT " ╚══1═══2═══3═══4═══5═══6═══7═══8══╝"
3443 GOSUB 11000 :PRINT
3445 IF E < 1 THEN 2990
3450 IF RND (1) > 0.05 THEN 3465
3455 A4 = 0: GOSUB 4990
3465 RETURN
3470 REM * COMPUTER COMMANDS *
3475 M2 = 0.1
3480 IF E + S < 600 THEN M2 = 0.5
3485 IF D(8) < 0 THEN 3510
3490 IF RND (1) > M2 THEN 3520
3491 GOSUB 11010 : GOSUB 7200
3495 PRINT "Computer has crashed, IPL will take 0.5 stardates."
3496 GOSUB 11000
3500 D(8) = - 0.5
3505 GOTO 1015
3510 PRINT "Computer being worked on by IBM Customer Engineer.": GOTO 1015
3520 INPUT "Computer command";T$
3521 A = VAL (T$)
3535 ON A GOTO 3585,3665,3885,3887,3895
3550 PRINT "Functions available from computer:"
3555 PRINT "1-Cumulative Galactic Record"
3565 PRINT "2-Photon torpedo targetting data"
3570 PRINT "3-Range/direction calculator"
3571 PRINT "4-Romulan finder"
3572 PRINT "5-Time left": GOTO 3520
3580 REM * GALACTIC RECORD *
3585 GOSUB 11020 : PRINT "Computer Record of Galaxy for ";Q1;",";Q2
3590 PRINT " 1 2 3 4 5 6 7 8"
3595 PRINT " ╔═════════════════════════════════╗"
3600 FOR I = 1 TO 8
3608 SCAN$="# ║ ### ### ### ### ### ### ### ### ║"
3610 PRINT USING SCAN$;I;Z(I,1);Z(I,2);Z(I,3);Z(I,4);Z(I,5);Z(I,6);Z(I,7);Z(I,8)
3615 NEXT I
3616 PRINT " ╚═════════════════════════════════╝"
3617 GOSUB 11000
3620 GOTO 1015
3660 REM * PHOTON TORPEDO *
3665 PRINT
3670 PRINT "Photon torpedo targetting data"
3675 H8 = 0
3680 FOR I = 1 TO 3
3685 IF K(I,3) < = 0 THEN 3875
3690 C1 = S1
3695 A = S2
3700 W1 = K(I,1)
3705 X = K(I,2)
3710 GOTO 3735
3715 INPUT "Input starting coordinates: ";C1,A
3725 INPUT "Target sector coordinates : ";W1,X
3735 X = X - A:A = C1 - W1
3745 IF X < 0 THEN 3805
3750 IF A < 0 THEN 3835
3755 IF X > 0 THEN 3765
3760 IF A = 0 THEN 3815
3765 C1 = 1
3770 IF ABS (A) < = ABS (X) THEN 3795
3775 V5 = C1 + ((( ABS (A) - ABS(X)) + ABS (A)) / ABS (A))
3780 PRINT "Direction=";V5
3790 GOTO 3860
3795 IF X = 0 THEN 3800
3798 PRINT "Direction=";C1 + ( ABS(A) / ABS (X))
3800 GOTO 3860
3805 IF A > 0 THEN 3825
3810 IF X = 0 THEN 3835
3815 C1 = 5
3820 GOTO 3770
3825 C1 = 3
3830 GOTO 3840
3835 C1 = 7
3840 IF ABS (A) > = ABS (X) THEN 3855
3845 PRINT "Direction=";C1 + ((( ABS (X) - ABS (A)) + ABS(X)) / ABS (X))
3850 GOTO 3860
3855 PRINT "Direction=";C1 + ( ABS(X) / ABS (A))
3860 PRINT "Distance=";0.1 * SQR(X ^ 2 + A ^ 2)
3870 IF H8 = 1 THEN 1015
3875 NEXT I
3880 GOTO 1015
3885 H8 = 1
3886 GOTO 3715
3887 IF A3 = 1 THEN 3890
3888 PRINT "No Romulan in this quadrant."
3889 GOTO 1015
3890 A = A1 + INT (2 * RND (1)) - INT (2 * RND (1))
3891 X = A2 + INT (2 * RND (1)) - INT (2 * RND (1))
3892 PRINT "The Romulan is near ";A;",";X
3893 GOTO 1015
3895 PRINT TAB( 5);"Time left "; INT (T0 + T9 - T);" stardates"
3896 GOTO 1015
3900 R1 = INT ( RND (1) * 8 + 1):R2 = INT ( RND (1) * 8 + 1)
3910 A$ = " ":Z1 = R1:Z2 = R2: GOSUB 4095
3930 IF Z3 = 0 THEN 3900
3935 RETURN
3940 REM * INSERTION IN STRING ARRAY *
3942 IF Z1 < 1 THEN Z1 = 1
3944 IF Z1 > 8 THEN Z1 = 8
3946 IF Z2 < 1 THEN Z2 = 1
3948 IF Z2 > 8 THEN Z2 = 8
3955 IF Z1 = 1 THEN K$(Z2) = A$
3965 IF Z1 = 2 THEN L$(Z2) = A$
3975 IF Z1 = 3 THEN M$(Z2) = A$
3985 IF Z1 = 4 THEN N$(Z2) = A$
3995 IF Z1 = 5 THEN P$(Z2) = A$
4005 IF Z1 = 6 THEN U$(Z2) = A$
4015 IF Z1 = 7 THEN V$(Z2) = A$
4025 IF Z1 = 8 THEN W$(Z2) = A$
4035 RETURN
4040 REM * PRINT DEVICE NAME *
4045 S8 = R1 * 12 - 11
4050 IF S8 > 72 THEN 4075
4055 B$ = LEFT$ (D$,S8 + 11)
4060 T$ = RIGHT$ (B$,12)
4065 PRINT T$;" ";
4070 GOTO 4090
4075 B$ = LEFT$ (F$,S8 - 61)
4080 T$ = RIGHT$ (B$,12)
4085 PRINT T$;" ";
4090 RETURN
4095 REM * STRING COMPARISON :
4100 Z3 = 0
4125 IF Z1 < 1 THEN Z1 = 1
4127 IF Z1 > 8 THEN Z1 = 8
4129 IF Z2 < 1 THEN Z2 = 1
4131 IF Z2 > 8 THEN Z2 = 8
4135 IF Z1 = 1 THEN T$ = K$(Z2)
4145 IF Z1 = 2 THEN T$ = L$(Z2)
4155 IF Z1 = 3 THEN T$ = M$(Z2)
4165 IF Z1 = 4 THEN T$ = N$(Z2)
4175 IF Z1 = 5 THEN T$ = P$(Z2)
4185 IF Z1 = 6 THEN T$ = U$(Z2)
4195 IF Z1 = 7 THEN T$ = V$(Z2)
4205 IF Z1 = 8 THEN T$ = W$(Z2)
4215 IF T$ < > A$ THEN 4225
4220 Z3 = 1
4225 RETURN
4230 PRINT "You have tried to cross the": PRINT "Negative Energy Barrier."
4235 PRINT "Emergency stop requires 100": PRINT "units of energy."
4236 GOSUB 7200
4240 E = E - 100
4245 IF S1 < 1 THEN S1 = 1
4250 IF S2 < 1 THEN S2 = 1
4255 IF S1 > 8 THEN S1 = 8
4260 IF S2 > 8 THEN S2 = 8
4265 IF Q1 < 1 THEN Q1 = 1
4270 IF Q2 < 1 THEN Q2 = 1
4275 IF Q1 > 8 THEN Q1 = 8
4280 IF Q2 > 8 THEN Q2 = 8
4285 GOTO 1690
4290 PRINT "***Goodbye Captain***":BEEP
4320 GOTO 9999
4790 REM * CODE TO IDLE SHIP *
4795 INPUT "Enter idle period in stardates:";A
4805 IF A < = 0 THEN 1015
4810 IF T + A < T0 + T9 THEN 4830
4815 GOSUB 11010 : GOSUB 7200: PRINT "We can't wait that long!": GOSUB 11000
4820 GOTO 4790
4830 K8 = INT (A)
4831 IF K8 = 0 THEN K8 = 1
4835 IF K3 < = 0 THEN 4915
4840 IF K8 < = 0 THEN 4915
4841 GOSUB 11020 : GOSUB 7200
4845 PRINT "The Klingons will attack the Enterprise."
4846 GOSUB 11000
4850 INPUT "Cancel the idle period? (yes/no) ";B$
4855 LOW$=B$:GOSUB 13000:B$=UP$
4860 IF B$ = "YES" THEN RETURN
4865 IF B$ < > "NO" THEN 4850
4870 FOR J9 = 1 TO K8
4875 IF S < = 0 THEN 4905
4880 GOSUB 2830
4885 GOSUB 4960
4905 NEXT J9
4910 IF S < = 0 THEN 3045
4915 REM * ADVANCE TIME *
4920 T = T + A
4921 IF A3 = 0 THEN 4925
4922 A4 = 1
4923 GOSUB 5335
4925 P6 = P6 + 0.01 * A
4930 I9 = 1
4935 IF D(I9) < 0 THEN D(I9) = D(I9) + A
4940 IF D9 = 0 THEN 4945
4945 I9 = I9 + 1
4950 IF I9 < 9 THEN 4935
4955 GOTO 1015
4960 REM * DEATH PLANET ATTACKS *
4965 IF D9 = 0 THEN 4985
4966 GOSUB 11010 : GOSUB 7200
4970 PRINT "Energy sucked out of Enterprise by Mystery Death Planet."
4971 GOSUB 11000
4975 E = INT (E * RND (1))
4980 F4 = INT (F4 * RND (1))
4985 RETURN
4990 REM * KELVIN DOOMSDAY MACHINE *
4991 PRINT : FOR M = 1 TO 5: GOSUB 7200: NEXT
4995 GOSUB 11020 : PRINT "All hands alert for Kelvin Doomsday Machine!!!": GOSUB 11000
5000 PRINT "Doomsday Machine track...."
5005 C1 = 4.5 + RND (1)
5010 X = INT (3! + 6! * RND (1))
5015 Y = 8
5020 X1 = FNX1(C1)
5025 X2 = FNX2(C1)
5026 IF ABS (X1) < 0.1 THEN X1 = 0
5027 IF ABS (X2) < 0.1 THEN X2 = 0
5030 GOTO 5070
5035 IF A4 > 0 THEN RETURN
5040 X = X + X1:Y = Y + X2
5041 GOSUB 12000
5050 IF X < 1 OR X > = 8.5 OR Y < 1 OR Y > = 8.5 THEN 5325
5070 CV = CSRLIN
5071 XI = X:YI =Y
5073 PRINT USING" ##.# , ##.#";XI,YI
5075 IF A4 = 0 THEN 5115
5080 IF A3 = 0 THEN 5115
5085 IF A1 < > INT (X + 0.5) OR A2< > INT (Y + 0.5) THEN 5115
5090 GOSUB 11010 : GOSUB 7200
5095 PRINT "Invisible Romulan destroyed."
5096 GOSUB 11000
5100 A3 = 0:R(5) = R(5) + 1: GOTO 5310
5115 IF S1 < > INT (X + 0.5) OR S2< > INT (Y + 0.5) THEN 5135
5120 GOSUB 11010 : FOR I = 1 TO 10: GOSUB 7200: NEXT
5125 PRINT "*** Munch Chomp Burp ... no more Enterprise ***!!!"
5126 GOSUB 11000
5127 FOR I = 1 TO 500: NEXT
5130 GOTO 3040
5131 REM * DAMAGE ASSESSMENT *
5135 A$ = " ":A9 = 0:Z1 = INT (X + 0.5):Z2 = INT (Y + 0.5)
5150 GOSUB 4095
5155 IF Z3 = 1 THEN 5035
5156 A9 = 1
5160 REM * WE HIT SOMETHING *
5165 IF T$ < > "<F>" THEN 5185
5166 GOSUB 11010 : GOSUB 7200
5170 PRINT "Cruiser destroyed."
5171 GOSUB 11000
5175 F3 = 0:R(3) = R(3) + 1: GOTO 5310
5185 IF T$ < > "+++" THEN 5245
5190 GOSUB 11010 : GOSUB 7200: PRINT "Klingon destroyed.": GOSUB 11000
5192 R(2) = R(2) + 1:K3 = K3 - 1:K9 = K9 - 1
5205 IF K9 < = 0 THEN 3070
5210 FOR I = 1 TO 3
5215 IF Z1 < > K(I,1) THEN 5225
5220 IF Z2 = K(I,2) THEN 5230
5225 NEXT I
5230 K(I,3) = 0
5235 G(Q1,Q2) = K3 * 100 + B3 * 10 + S3
5240 GOTO 5310
5245 IF T$ < > " * " THEN 5265
5246 GOSUB 7200
5250 PRINT "Star destroyed."
5252 R(1) = R(1) + 1
5255 S3 = S3 - 1: GOTO 5235
5265 IF T$ < > " D " THEN 5290
5266 IF A4 < 2 THEN 5274
5267 D8 = D8 + 1: GOSUB 7200
5268 PRINT "Torpedo blasts Death Planet."
5269 IF RND (1) > 0.5 THEN 5273
5270 PRINT "Death Planet Nitron Ray damages ship."
5271 GOSUB 7200
5273 IF D8 < 7! * RND (1) THEN RETURN
5274 GOSUB 11010 : GOSUB 7200: PRINT "Death Planet destroyed.": GOSUB 11000
5275 D9 = 0:R(4) = R(4) + 1:D8 = 0: GOTO 5310
5290 IF T$ < > ">B<" THEN 5035
5291 GOSUB 11010 : GOSUB 7200
5295 PRINT "Star Base destroyed."
5296 R(6) = R(6) + 1: GOSUB 11000
5300 B3 = B3 - 1
5301 IF A4 < 2 THEN 5235
5302 GOSUB 11010 : GOSUB 7200: PRINT "Blast severely damages Enterprise!": GOSUB 11000
5303 E = INT (0.1 * E)
5304 S = INT (0.1 * S)
5305 IF B3 = 0 THEN 5309
5306 GOSUB 11010 : GOSUB 7200: PRINT "Remaining Base sends signal": PRINT "DISABLINGNES!": GOSUB 11000
5307 D(1) = D(1) - 5! * RND (1) - 0.1
5309 GOTO 5235
5310 A$ = " "
5315 GOSUB 3940
5320 GOTO 5035
5325 REM
5326 PRINT "Kelvin Machine leaves quadrant."
5330 RETURN
5335 A5 = 0
5340 IF A1 < > S1 OR A2 < > S2 THEN 5356
5350 PRINT "AAAAAGGGGGHHHHH ..... Romulan destroys Enterprise!"
5355 GOTO 3040
5356 A4 = 1
5360 X = A1
5361 Y = A2
5362 GOSUB 5135
5363 IF A5 > 0 THEN RETURN
5365 A1 = A1 + INT (2.1 * RND (1)) - 1
5370 A2 = A2 + INT (2.1 * RND (1)) - 1
5395 IF A1 < 1 OR A1 > 8 OR A2 < 1 OR A2 > 8 THEN 5435
5415 PRINT "Romulan has moved."
5416 GOSUB 7200
5425 A5 = A5 + 1
5430 GOTO 5340
5435 PRINT "Romulan has left this quadrant."
5436 GOSUB 7200
5440 A3 = 0
5445 RETURN
6000 END
7000 REM * ENTERPRISE PHASORS *
7010 FOR M = 1 TO 5:GOSUB 12000: NEXT M
7050 RETURN
7100 REM * KLINGON PHASORS *
7120 FOR M = 1 TO 4: GOSUB 12000: NEXT
7150 RETURN
7200 REM * ALERT *
7205 GOSUB 12000
7210 GOSUB 12000
7240 RETURN
9999 PRINT FRE (0)
10000 END
10100 REM * HYPERSPACE JUMP * : PRINT "ATTEMPTING HYPERSPACE JUMP!": GOSUB 11000
10110 PRINT "Attempting Hyperspace jump!": GOSUB 11000
10120 IF E > 500 THEN 10200
10130 PRINT "Not enough energy": PRINT : GOTO 1015
10200 PRINT : PRINT "Enterprise drops into Hyperspace": PRINT
10210 X = FRE (0):E = E - (400 +100 * RND (1))
10215 E = INT (E)
10220 S1 = INT ( RND (1) * 8 + 1):S2 = INT ( RND (1) * 8 +1):Q1 = INT ( RND(1))
10230 IF A3 = 0 THEN 10240
10235 GOSUB 5335
10240 GOTO 610
10999 REM ********** SCREEN CONTROL ***********
11000 REM "Normal"
11002 COLOR 7,0:RETURN
11010 REM "Hi Light"
11012 COLOR 15,0:RETURN
11020 REM "Inverse"
11021 RETURN
11022 COLOR 0,7:RETURN
12000 REM ********** NOISE MAKER **************
12010 SOUND 100+2000*RND,1
12020 RETURN
13000 REM Convert LOW$ to uppercase in UP$
13005 UP$=""
13010 FOR ICQ=1 TO LEN(LOW$)
13015 ICS=ASC(MID$(LOW$,ICQ,1))
13020 IF ICS<&H7B AND ICS>&H60 THEN ICS=ICS-&H20
13025 UP$=UP$+CHR$(ICS)
13030 NEXT ICQ
13035 RETURN
14000 REM A Small Delay
14010 FOR DELAY=1 TO 500:NEXT DELAY
14020 RETURN
50000 REM PRINT NAV CHART
50010 GOSUB 11000
50015 LNOW=CSRLIN
50016 LNOW=LNOW-1
50020 LOCATE LNOW-10,68:PRINT "Directions": GOSUB 11020
50040 LOCATE LNOW-9,68:PRINT "╔═══════╗"
50050 LOCATE LNOW-8,68:PRINT "║ 4 3 2 ║"
50060 LOCATE LNOW-7,68:PRINT "║ \║/ ║"
50070 LOCATE LNOW-6,68:PRINT "║ 5═╬═1 ║"
50080 LOCATE LNOW-5,68:PRINT "║ /║\ ║"
50090 LOCATE LNOW-4,68:PRINT "║ 6 7 8 ║"
50100 LOCATE LNOW-3,68:PRINT "╚═══════╝"
50105 LOCATE LNOW+1,1
50110 GOSUB 11000 : RETURN
55000 REM Instructions
55005 PRINT:BEEP
55010 PRINT"Do you want the game instructions displayed (y/n) ";
55020 INPUT A$
55030 IF A$<>"y" THEN RETURN
55040 ON ERROR GOTO 55160
55050 DISK$="A:"
55060 FILE$="NEWTREK.HOW"
55070 XFILE$=DISK$+FILE$
55075 OPEN XFILE$ FOR INPUT AS #1
55080 ON ERROR GOTO 0
55085 HLINE=0:CLS
55090 LINE INPUT #1,A$
55095 PRINT A$:HLINE=HLINE+1
55100 IF (HLINE MOD 20)>0 THEN 55140
55110 PRINT:PRINT"Enter to continue, anything else to end instructions ";
55120 INPUT A$
55130 IF LEN(A$)>0 THEN RETURN
55140 IF EOF(1) THEN 55200
55150 GOTO 55090
55160 IF DISK$="B:" THEN PRINT:PRINT"Instructions not available.":RETURN
55170 DISK$="B:":RESUME 55070
55200 PRINT:PRINT"Push a key to continue the game...";
55210 INPUT A$:RETURN
100 KEY OFF:CLS
110 REM ** COMPUTER OPERATOR **
120 REM DJOHNSON 10/16/82, original version for Apple II
130 LOCATE 2 ,23: PRINT "Computer Operator":BEEP
140 FOR I = 1 TO 1000: NEXT I
145 GOSUB 5000
150 GOSUB 3070: REM SYSGEN
155 BEEP
160 DIM U(NU,5): REM USERS
170 DIM T(NT,2): REM TAPES
180 DIM D(ND): REM DISKS
190 DIM P(NP): REM PORTS
200 DIM ST$(3):ST$(0) = "Offline":ST$(1) = "Online":ST$(2) ="down"
210 NA = 100
220 DIM AU(NA),A$(NA)
230 DIM NM$(20)
240 NM$(1) = "Where is my output?"
250 NM$(2) = "When is systems time?"
260 NM$(3) = "System response is lousy!"
270 NM$(4) = "My terminal is hung"
280 NM$(5) = "Where is my other tape?"
290 NM$(6) = "Could you raise my priority??????"
300 NM$(7) = "?"
310 NM$(8) = "Do we have Adventure on this computer?"
320 NM$(9) = ".BUT NOT ,$#: 1"
330 NM$(10) = "Thanks"
331 NM$(11)="When will the 3800 be back up?"
332 NM$(12)="I think my A disk is crashed"
333 NM$(13)="How do I recover a file from the archive?"
334 NM$(14)="Is the network up?"
335 NM$(15)="My neighbors terminal is smoking!"
336 NMES=15
340 REM IPL SYSTEM
350 CLS : BEEP:PRINT "Begin System IPL...": PRINT
360 PRINT ""
365 TCPU=0
370 FOR I = 1 TO NU: REM NO USERS
380 FOR J = 1 TO 5:U(I,J) = 0: NEXT J,I
390 REM INIT DEVICES
400 FOR I = 1 TO NT
410 T(I,2) = 0: REM NOT IN USE
420 T(I,1) = 1: REM ONLINE
430 IF RND (1) > 0.8 THEN T(I,1) = 0: PRINT "TAPE ";280 + I;" came up offline"
440 NEXT I
450 PRINT : FOR I = 1 TO ND
460 D(I) = 1
470 IF RND (1) > 0.1 THEN 490
480 D(I) = 0: PRINT "Disk ";340 +I;" offline"
490 NEXT I
500 IF RND (1) > 0.9 THEN BEEP:PRINT "BAD SYSTEM CHECK POINT": PRINT "SYSTEM FAILURE": END
505 PRINT "Push a key to cause system to read a command.":PRINT
510 PRINT : PRINT "System ready": PRINT
520 CU = 0
530 CA = 0
540 CL = 0
550 PR = 1:NP = 0
560 REM MAIN DISPATCH LOOP
580 IF CL > 0 THEN CL = CL - 1: GOTO 830
590 IF LEN(INKEY$)=0 THEN 830
600 INPUT S$
605 GOSUB 4000 ' uppercase
610 IF LEN (S$) = 0 THEN 830
620 GOSUB 3220: REM TOKENIZE
630 X$ = TK$(1)
640 IF X$ = "FIX" THEN 1690
650 IF X$ = "ATTACH" THEN 1780
660 IF X$ = "A" THEN 1780
670 IF X$ = "FORCE" THEN 1920
680 IF X$ = "USERS" THEN 2030
690 IF X$ = "U" THEN 2030
700 IF X$ = "QUERY" THEN 2170
710 IF X$ = "Q" THEN 2170
720 IF X$ = "SHUTDOWN" THEN 2400
730 IF X$ = "MSG" THEN 2760
740 IF X$ = "IPL" THEN 340
750 IF X$ = "DISPLAY" THEN 2410
760 IF X$ = "D" THEN 2410
770 IF X$ = "ONLINE" THEN 2520
780 IF X$ = "O" THEN 2520
790 IF X$ = "OFFLINE" THEN 2680
800 IF X$ = "?" THEN 2980
810 BEEP:PRINT "'";S$;"' invalid"
820 GOTO 560
830 REM MAKE THINGS HAPPEN
840 IF RND (1) > PL THEN 1000
850 REM LOGON A USER
860 GOSUB 2940: REM GET USERID
870 IF CU < = 0 THEN 1000
880 U(CU,1) = CU:U(CU,5) = 1
890 CS = CS + 0.25: REM USE MAINSTORAGE
900 U(CU,2) = 0: IF RND (1) > 0.5 THEN 960
910 GOSUB 2880: REM GET ACTIONIDENT
920 A$(AQ) = "Attach tape to user "
930 U(CU,5) = 0
940 AU(AQ) = CU:U(CU,2) = - AQ
950 PRINT A$(AQ);AU(AQ)
960 J = INT (ND * RND (1) + 1)
970 U(CU,3) = J
980 U(CU,4) = INT (360 * RND (1))
990 PRINT "User";CU;" logging on"
1000 REM BREAK A DISK?
1010 IF RND (1) > PB THEN 1100
1020 K = INT (ND * RND (1) + 1)
1030 IF D(K) < > 1 THEN 1100
1040 IF RND (1) > 0.8 THEN 1090
1050 FOR MM = 1 TO 10 * RND (1) + 1
1060 D(K) = 0: PRINT "Data Check on ";340 + K
1070 NEXT MM
1080 GOTO 1100
1090 D(K) = 2: PRINT "Equipment failure on ";340 + K
1100 REM BREAK A TAPE?
1110 IF RND (1) > PB THEN 1200
1120 K = INT (NT * RND (1) + 1)
1130 IF T(K,1) < > 1 THEN 1200
1140 IF T(K,2) = 0 THEN 1200
1150 IF RND (1) > 0.8 THEN 1190
1160 FOR MM = 1 TO 10 * RND (1) + 1
1170 T(K,1) = 0: PRINT "Data check on ";280 + K
1180 NEXT MM: GOTO 1200
1190 T(K,1) = 2: PRINT "Tape ";280 + K;" has run off end of reel"
1200 REM
1210 IF RND (1) > PB THEN 1260
1220 IF RND (1) > 0.25 THEN 1260
1230 PRINT "CON OP CHK"
1240 CL = INT (20 * RND (1))
1250 IF CL > 15 THEN CL = 15
1260 IF RND (1) > PB THEN 1280
1270 REM
1280 IF RND (1) > PB THEN 1350
1290 IF PR = 0 THEN 1350
1300 PR = 0
1310 PRINT "PRINT CHECK"
1320 GOSUB 2880
1330 A$(AQ) = "Place printer online"
1340 AU(AQ) = 100
1350 IF PR = 0 THEN NP = NP + 1
1360 IF PR < > 0 THEN 1400
1370 IF NP < 20 THEN 1400
1380 PRINT "SPOOL SPACE 90% FULL"
1390 IF NP > 50 THEN BEEP:PRINT "System Spool ABEND": END
1400 IF PR = 0 THEN 1440
1410 IF RND (1) > PB THEN 1440
1420 SI = INT (10000 * RND (1)):LI = INT (10000 * RND (1))
1430 PRINT "SPOOL FILE ";SI;" PRINTED,";LI;" LINES"
1440 IF CS < 0.9 * XS THEN 1470
1450 PRINT "MAIN STORAGE OVERCOMMIT"
1460 IF CS > = XS THEN BEEP:PRINT "MAIN STORAGE ABEND": STOP
1470 REM
1480 REM DISPATCH USERS
1490 FOR I = 1 TO NU
1500 IF U(I,1) = 0 THEN 1670
1510 U(I,5) = 1
1520 IF U(I,1) = 1000 THEN U(I,5) = 0
1530 IF U(I,2) < 0 THEN U(I,5) =0
1540 IF U(I,2) > 0 THEN IF T(U(I,2),1) < > 1 THEN U(I,5) =0
1550 IF D(U(I,3)) < > 1 THEN U(I,5) = 0
1560 IF U(I,5) = 0 THEN 1670
1580 IF RND (1) > 0.005 THEN 1600
1590 PRINT "User";I;" ABENDing": GOTO 1620
1600 U(I,4) = U(I,4) - 1: TCPU=TCPU+1:IF U(I,4) > 0 THEN 1640
1610 PRINT "User";I;" logging off"
1620 U(I,1) = 0:CS = CS - 0.25
1630 IF U(I,2) > 0 THEN T(U(I,2),2) = 0
1640 IF RND (1) > 0.01 THEN 1670
1650 K = INT (NMES * RND (1) + 1): BEEP:PRINT "from User";I;"- ";NM$(K)
1660 IF RND (1) < 0.15 THEN U(I,1) = 1000
1670 NEXT I
1675 GOSUB 6000 ' update status line at bottom of screen
1680 GOTO 560
1690 IF II < > 2 THEN 810
1700 D$ = TK$(2): GOSUB 2820
1710 IF AD = 0 THEN 810
1720 IF TP > 0 THEN 1760
1730 IF T(AD - 280,1) < > 2 THEN PRINT "Device ";AD;" no trouble found": GOTO 830
1740 J = AD - 280: PRINT AD;" repaired and offline"
1750 T(J,1) = 0: GOTO 830
1760 IF D(AD - 340) < > 2 THEN PRINT "Device ";AD;" no trouble found": GOTO 830
1770 J = AD - 340: PRINT AD;" repaired and offline":D(J) = 0: GOTO 830
1780 IF II < > 3 THEN 810
1790 D$ = TK$(2): GOSUB 2820
1800 IF AD = 0 OR TP = 1 THEN 810
1810 XU = VAL (TK$(3))
1820 IF XU < = 0 OR XU > NU THEN 810
1830 IF U(XU,1) = 0 THEN PRINT "User";XU;" not logged on": GOTO 830
1840 XX = U(XU,2): IF XX > = 0 THEN PRINT "User";XU;" does not need a tape": GOTO 830
1850 TJ = INT (AD - 280)
1860 IF T(TJ,1) < > 1 THEN PRINT "Tape ";AD;" not available": GOTO 830
1870 IF T(TJ,2) < > 0 THEN PRINT "Drive ";AD;" in use": GOTO 830
1880 T(TJ,2) = XU:U(XU,2) = TJ
1890 PRINT "Drive ATTACHed"
1900 FOR I = 1 TO NA: IF AU(I) =XU THEN AU(I) = 0
1910 NEXT I: GOTO 830
1920 IF II < > 2 THEN 810
1930 K = VAL (TK$(2))
1940 IF K < = 0 THEN 810
1950 IF K > NU THEN 810
1960 IF U(K,1) = 0 THEN PRINT "User";K;" not logged on!": GOTO 830
1970 U(K,1) = 0: PRINT "User";K;" forced off by system"
1980 PL = PL + 0.2
1990 FOR I = 1 TO NA: IF AU(I) =K THEN AU(I) = 0
2000 NEXT I
2010 IF U(K,2) > 0 THEN T(U(K,2),2) = 0
2020 GOTO 830
2030 IF II < > 1 THEN 810
2035 PRINT"Userid Tape Disk cpu status"
2036 PRINT"------ ---- ---- --- ------"
2040 XU = 0
2050 FOR I = 1 TO NU
2060 U(I,1) = INT (U(I,1)): IF U(I,1) = 0 THEN 2140
2070 XT = U(I,2): IF XT > 0 THEN XT = 280 + XT
2080 IF XT < 0 THEN XT = 0
2090 XD = U(I,3): IF XD > 0 THEN XD = 340 + XD
2100 Y$ = "Waiting": IF U(I,5) >0 THEN Y$ = "Running"
2110 IF U(I,1) = 1000 THEN Y$ ="Waiting"
2115 FMT$="User## ### ### #### &"
2120 PRINT USING FMT$;I,XT,XD,U(I,4),Y$
2130 XU = XU + 1
2140 NEXT I
2150 IF XU = 0 THEN PRINT "No users logged on now"
2160 GOTO 830
2170 REM DISPLAY DEVICES
2180 IF II < > 2 THEN 810
2190 IF TK$(2) < > "TAPE" AND TK$(2) < > "T" THEN 2280
2200 PRINT "Tape drive status:"
2210 FOR I = 1 TO NT
2220 AD = 280 + I
2230 UU = T(I,2):Y$ = "USER"
2240 IF UU < = 0 THEN Y$ = "SYSTEM"
2250 PRINT AD;" ";ST$(T(I,1));" ";Y$;UU
2260 NEXT I
2270 GOTO 830
2280 IF TK$(2) < > "DISK" AND TK$(2) < > "D" THEN 2350
2290 PRINT "Disk drive status:"
2300 FOR I = 1 TO ND
2310 AD = 340 + I
2320 PRINT AD;" ";ST$(D(I))
2330 NEXT I
2340 GOTO 830
2350 IF PR = 0 THEN PRINT "Printer offline"
2360 IF PR = 1 THEN PRINT "Printer online"
2370 XX = INT (100 * CS / XS)
2380 PRINT "Main storage utilization ";XX;"%"
2390 GOTO 830
2400 BEEP:PRINT : PRINT "System going down": END
2410 IF CA < = 0 THEN GOTO 2500
2420 PRINT "Action Queue........."
2430 ZA = 0
2440 FOR I = 1 TO CA
2450 IF AU(I) = 0 THEN 2490
2460 IF AU(I) > 99 THEN PRINT A$(I): GOTO 2490
2470 PRINT A$(I);AU(I)
2480 ZA = ZA + 1
2490 NEXT I
2500 IF ZA = 0 THEN PRINT "Empty"
2510 GOTO 830
2520 IF II < > 2 THEN 810
2530 C$ = MID$ (TK$(2),1,1): IF C$ = "P" THEN 2630
2540 D$ = TK$(2): GOSUB 2820
2550 IF AD = 0 THEN 810
2560 IF TP > 0 THEN 2600
2570 IF T(AD - 280,1) = 2 THEN PRINT AD;" not operational": GOTO 830
2580 J = AD - 280: PRINT AD;" online"
2590 T(J,1) = 1: GOTO 830
2600 IF D(AD - 340) = 2 THEN PRINT AD;" not operational": GOTO 830
2610 J = AD - 340: PRINT AD;" online"
2620 D(J) = 1: GOTO 830
2630 IF PR = 1 THEN PRINT "Printer already online!": GOTO 830
2640 PR = 1:NP = 0
2650 PRINT "Printer now online"
2660 FOR I = 1 TO CA: IF AU(I) =100 THEN AU(I) = 0
2670 NEXT I: GOTO 830
2680 IF II < 2 THEN 810
2690 D$ = TK$(2): GOSUB 2820
2700 IF AD = 0 THEN 810
2710 IF TP > 0 THEN 2740
2720 J = AD - 280: PRINT AD;" now offline"
2730 T(J,1) = 0: GOTO 830
2740 J = AD - 340: PRINT AD;" now offline"
2750 D(J) = 0: GOTO 830
2760 IF II < 2 THEN 810
2770 J = VAL (TK$(2))
2780 IF J < 1 OR J > NU THEN 810
2790 IF U(J,1) = 0 THEN PRINT "User";J;" not logged on": GOTO 830
2800 IF U(J,1) = 1000 THEN PRINT "User";J;" not receiving": GOTO 830
2810 PRINT "From User";J;" - OK": GOTO 830
2820 AD = VAL (D$): IF AD = 0 THEN RETURN
2830 IF (AD > = 281 AND AD < =280 + NT) THEN 2860
2840 IF (AD > = 341 AND AD < =340 + ND) THEN 2870
2850 AD = 0: RETURN
2860 TP = 0: RETURN
2870 TP = 1: RETURN
2880 REM ASSIGN ACTION QUEUE IDENT
2890 IF CA = 0 THEN AQ = 1:CA =1: RETURN
2900 FOR K = 1 TO CA
2910 IF AU(K) = 0 THEN AQ = K: RETURN
2920 NEXT K
2930 CA = CA + 1:AQ = CA: RETURN
2940 FOR K = 1 TO NU
2950 IF U(K,1) = 0 THEN CU = K: RETURN
2960 NEXT K
2970 CU = - 1: RETURN
2980 PRINT "Valid System Commands:"
2981 PRINT "----- ------ ---------"
2990 PRINT "Attach addr nuser - attach a device to a user"
2992 PRINT "Display - display action queue"
2994 PRINT "FIX addr - repair a device"
2996 PRINT "FORCE nuser - force a user off the system"
2997 PRINT "IPL - restart the system"
2998 PRINT "MSG nuser - send a message to a user"
3000 PRINT "Online addr - place a device online to the system"
3002 PRINT "OFFLINE addr - place a device offline"
3004 PRINT "Query D|T|P - show status of disks, tapes, printer"
3006 PRINT "SHUTDOWN - take system out of service"
3008 PRINT "Users - show status of users"
3010 PRINT "? - list commands"
3050 PRINT
3060 GOTO 830
3070 REM PERFORM SYSGEN
3080 CLS
3090 PRINT : PRINT : PRINT "Begin System Configuration": PRINT
3100 INPUT "System memory size in MB (1-32) ";XS
3110 IF XS < 1 OR XS > 32 THEN 3100
3120 XS = INT (XS)
3130 INPUT "Maximum number of logged on users(5-100) ";NU
3140 IF NU < 5 OR NU > 100 THEN 3130
3150 NU = INT (NU)
3160 INPUT "Number of system disk drives (1-30) ";ND
3170 IF ND < 1 OR ND > 30 THEN 3160
3180 INPUT "Number of system tape drives (1-30) ";NT
3190 IF NT < 1 OR NT > 30 THEN 3180
3200 ND = INT (ND):NT = INT (NT)
3205 INPUT "Speed of game (0-255), 255 is very fast: ";PDL
3206 PB = PDL/1800!:PL = (2 * PDL) / 1000!
3210 PRINT "SYSGEN complete": FOR I = 1 TO 1000: NEXT I: RETURN
3220 REM * TOKENIZE LINE K *
3230 REM INPUT IN S$, OUTPUT IN
3240 REM TK$(I), II=NO. TOKENS
3250 II = 0:LC = 1
3260 LL = LEN (S$): IF LL = 0 THEN RETURN
3270 REM FIND A NON-BLANK
3280 IF LC > LL THEN RETURN
3290 FOR I = LC TO LL: IF MID$(S$,I,1) < > " " THEN 3310
3300 NEXT I: RETURN
3310 LC = I: REM LC=NON-BLANK
3320 A$ = MID$ (S$,LC,1):AC = ASC(A$)
3330 IF AC < 42 OR AC > 61 THEN 3360
3340 IF AC > 47 AND AC < 61 THEN 3360
3350 II = II + 1:TK$(II) = A$:LC =LC + 1: GOTO 3270
3360 XB = LL + 1: IF LC = LL THEN 3410
3370 FOR I = LC + 1 TO LL:XB = I:A$ = MID$ (S$,I,1)
3380 AC = ASC (A$): IF AC = 32 OR(AC > 41 AND AC < 48) OR AC =61 THEN 3410
3390 NEXT I
3400 XB = LL + 1
3410 II = II + 1:TK$(II) = MID$(S$,LC,XB - LC)
3420 LC = XB
3430 GOTO 3270
4000 REM convert to uppercase
4010 UP$=""
4020 FOR ICQ=1 TO LEN(S$)
4025 ICS=ASC(MID$(S$,ICQ,1))
4030 IF ICS<&H7B AND ICS>&H60 THEN ICS=ICS-&H20
4035 UP$=UP$+CHR$(ICS)
4040 NEXT ICQ
4045 S$=UP$:RETURN
5000 REM ** Instructions **
5005 PRINT
5010 PRINT "Instructions for Computer Operator"
5020 PRINT "----------------------------------"
5030 PRINT
5040 PRINT "This game simulates what it is like to be the operator of a large"
5050 PRINT "interactive computer system, such as an IBM VM system. Your job"
5060 PRINT "as the operator of the system is to keep user work flowing through"
5070 PRINT "smoothly. In this simplified simulation, users have files on disk"
5080 PRINT "and some will require a tape drive to do their work. The operating"
5090 PRINT "system of the computer will tell you when a tape drive is needed by"
5100 PRINT "a user. From time to time, things will happen that require operator"
5110 PRINT "attention. Disks drives will fail, tape drives will fail, the system"
5120 PRINT "printer will get stuck. You have commands for examining the status"
5130 PRINT "of devices attached to the system, commands for repairing devices,"
5140 PRINT "(repairs are done by the CE), and commands for placing devices in"
5150 PRINT "service. You can look at the status of all the users, and can see"
5160 PRINT "a list of things the operating system is waiting for you to do."
5170 PRINT "If you wait too long to take action when problems occur, the system"
5180 PRINT "will crash and the game is over. Use the '?' command to see which"
5190 PRINT "commands you have available to you to control the system."
5200 PRINT
5210 PRINT "Push any key to continue:";:INPUT X$:RETURN
6000 REM display status line at bottom
6010 OLINE=CSRLIN
6020 OCOL=POS(0)
6030 LOCATE 25,5
6040 PRINT "Total system cpu consumed: ";TCPU;" ";
6045 PRINT "Storage Utilization: ";INT(100*CS/XS);"%";" ";
6050 LOCATE OLINE,OCOL:RETURN
PACKMAN PROGRAM DESCRIPTION
===========================
SCREEN LAYOUT
-------------
The score appears at the upper left. The screen number is shown at the
far right. The remaining PACKMEN are also shown in the upper right.
The prompt area is in the center of the status area above the center
"tunnel" exit. The prompts indicate readiness to satrt/resume play, display
display bonus points for capturing a monster or prize, etc.
CONTROLS
--------
The player controls PACKMAN's direction using either the four arrow keys
(make sure [NumLock] is not accidently pressed!) or, optionally, via
joystick. The player indicates his choice simply by pressing either a
cursor key or joystick "fire" button to start/resume play in response to
the READY! prompt. Thus, it is even possible to alternate between keyboard
and joystick(s) during the game. The joystick button may also be used to
respond affirmatively to the new game prompt.
Pressing [CTRL][END] during play causes the program to end immediately and
return to DOS.
Note: This program assumes the joysticks are wired such that resistance
values increase from left to right and top to bottom, following the con-
vention for screen pel coordinates.
SCORING
-------
Dots:....................10 points
Power Capsules:..........50 points
"Scared" Monsters:......200,400,800, or 1600 points
Prizes:
Screen 1:..........100 points (Cherries)
Screen 2:..........300 points (Strawberry)
Screen 3:..........500 points (Apple)
Screen 4:..........700 points (Grapes)
Screen 5:.........1000 points (Key)
Screen >=6:.......2000 points (Randomly chosen symbol)
A bonus PACKMAN is awarded at each 10,000 point plateau.
GAME DESCRIPTION
================
The objective is for PACKMAN to score as many points as possible by
devouring dots, prizes, power capsules, and "scared" monsters, while
avoiding fatal collisions with "mean" monsters. A screen ends when
all 180 dots and four power capsules are cleared. The game ends when
the player loses his last PACKMAN.
As play starts/resumes, the four monsters emerge from their "pen" in
the center and begin searching for PACKMAN. At first, they move
randomly about the maze, checking out the corridors ahead and to the
sides. As soon as a monster sees PACKMAN, it begins to chase him.
PACKMAN may be spotted even if only partially visable in a corridor.
Chasing basically entail this: If PACKMAN is in sight, the monster will
head directly toward him. If PACKMAN then ducks out of sight, the
monster will remember where he was last seen and the direction he
turned, and will try to proceed to that point and turn the same way,
after which it reverts to its searching algorithm. The monsters also
forget the trail when exiting the tunnels or passing in front of the
pen exit.
PACKMAN Page 2
The monsters normally do not look backwards or reverse their direc-
tions arbitrarily. Therefore, PACKMAN can follow a monster without
being seen. However, since the monsters cannot run over each other,
collisions between monsters may resuld in one or both suddenly revers-
ing their course, unexpectedly trapping PACKMAN if he is careless.
When PACKMAN eats a power capsule, all monsters outside the pen turn
blue, slow to half-speed, and attempt to flee if they see PACKMAN.
The first monster PACKMAN catches is worth 200 points, doubling for
each subsequent monster. When a monster is captured, its disembodied
eyes make a beeline back to the pen, where it is reincarnated and re-
emerges. After a short time, the blue monsters flash white three times
and revert to their normal dangerous state.
The prize appears twice per screen, staying for a time for PACKMAN to
claim it, then disappearing. The first appearance is sometime after
one-third to two-thirds of the dots are cleared from the screen.
Each screen is progressively more difficult than the last. For the
first several screens, PACKMAN is considerably faster than the monsters
in open corridors, so he can usually out-run them unless he gets him-
self trapped or is slowed by eating a long string of dots (eating slows
his speed by one-third). However, with each screen, the monsters
become faster relative to PACKMAN, and remain frightened for shorter
length of time. By the tenth screen, the power capsules cease to have
any effect at all. Also, the prizes appear for progressively shorter
intervals.
creen, the power capsules cease to have
any
10 A$="MBO4C4P8C8C4C4O3B2G4P4A2O4C4C4O3G2.G4F4F4G4F4"
20 B$="E4G4O4C4C8C8C4O3A4B8O4C4.D1C4C4C4C4O3B4G2.A4A4O4C4C4O3G2.G4F4F4G4F4E4G4O4C4.C8O3A4O4C4O3B4O4D4C2O3B2"
30 C$="O4C4P4C8C4C4O3B2G4P4A2O4C4C4O3G2.G4F4F4G4F4E4G4O4C4C8C8C4O3A4B8O4C4.D1"
35 D$="O4C4P8C8C4C4O3B2G4P4A2O4C4C4O3G2.G4F4F4G4F4E4G4O4C4C8C8O3A4O4C4O3B4O4D4C2"
40 PLAY "XA$;XB$;XC$;XD$;"
1000 REM ===== THE LONE RANGER +++++++
1010 REM ===== ARRANGED BY TOM SORBER ++++++
1011 CLS:LOCATE 10,10:PRINT"THE LONE RANGER"
1012 LOCATE 12,10:PRINT"Arranged by Tom Sorber"
1013 LOCATE 14,10:PRINT"Played by the I B M PERSONAL COMPUTER ORCHESTRA
1014 LOCATE 16,10:PRINT" Conducted by Tom Sorber
1020 A$ = "t255msO2L8DDL4DL8DDL4DL8DDL4GAB"
1030 B$ = "O2 L8DDL4DL8DDL4GL8GBL4AF+D"
1040 C$ = "o2l8gbo3d2p8l8co2bal4gbg"
1050 PLAY "xa$;xb$;xa$;xc$;
1060 PLAY "xa$;xb$;xa$;xc$;
1070 D$ = "o2l16dd+ef+l2gl4bp8l8agf+ged
1080 E$ = "o2l8ef+gco1bo2l16def+go1l8bal16bo2cc+d
1090 F$ = "O1L4AGA
1100 G$ = "O2L16 DD-DEF+DEF+L8GL16GGL8G
1110 H$ = "O2L4BF+GABF+GA
1120 PLAY "xd$;xe$;xf$;xd$;xe$;xg$;
1130 REM PLAY "P8xa$;xb$;xa$;xc$;
1140 REM PLAY "p8xa$;xb$;xa$;xc$;
1150 REM PLAY "xd$;xe$;xf$;xd$;xe$;xg$;
1160 I$ = "l8o2bo1bo2f+o1f+o2go1go2ao1a
1170 J$ = "o2l2b-p8l16b-ge-o1b-o2e-g
1180 K$ = "o2l2bp8l16bcdo1bo2dg
1190 L$ = "o2l2bp8l16bg+eo1bo2eg+
1200 M$ = "o3l2c+p8l16c+o2a+f+c+f+a+
1210 N$ = "o3l8dd-co2bagf+e
1220 O$ = "o2l16dd-dedd-dedd-def+def+
1230 P$ = "o2l4gp8l16ggl32ggggggggl16gggg
1240 Q$ = "l8gdgbgdgb
1250 R$ = "l4gp8l16ggl32gggggggggggggggg
1260 S$ ="l1go1MLl1gL1G
1270 PLAY "P8xi$;xi$;xj$;xk$;xl$;xm$;xn$;xo$;xp$;xq$;xr$;xs$;
10 CLS
15 PRINT ,"Select one of the following:"
20 PRINT ""
25 PRINT ,"1. Sally Go Round The Sun"
30 PRINT ,"2. Oranges and Lemons"
35 PRINT ,"3. Brahms' Lullaby - Close Your Eyes"
40 PRINT ,"4. All Through The Night"
45 PRINT ,"5. Michael Finnigin"
50 PRINT ,"6. Ride a Cock Horse"
55 PRINT ,"7. Early One Morning"
60 PRINT ,"8. The Minstrel Boy"
62 PRINT ,"9. EXIT"
65 PRINT ""
70 PRINT ,"Enter your selection number: ";
75 N$=INKEY$: IF N$="" THEN 75
80 N=VAL(N$): PRINT N$
85 IF N>0 AND N<10 THEN GOTO 95 ELSE PRINT ,"Enter a valid selection number:";
90 GOTO 75
95 CLS
100 ON N GOSUB 125,165,275,355,445,590,655,900,110
105 GOTO 10
110 PRINT "Execution terminated - enter a command"
115 STOP
120 GOTO 10
125 LOCATE 10
130 PRINT ," 1. SALLY GO ROUND THE SUN (6/8)"
135 PRINT ""
140 PRINT ,"Sal-ly go round the/sun,/Sal-ly go round the/moon,"
145 PRINT ,"Sal-ly go round the/chimney top,/Ev-ery af-ter-/-noon."
150 S$="D8D8D8DD8 D2. F#8F#8F#8F#F#8 F#2. A8A8A8AB8 A4F#8DP8 F#F#8EE8 D2."
155 PLAY "T150P2O3XS$;"
160 RETURN
165 LOCATE 3
170 PRINT ,"Traditional 18th century words and tune from London (3/4)"
175 LOCATE 7
180 PRINT ,,"2. ORANGES AND LEMONS"
185 PRINT ""
190 PRINT ,"Oran-ges and/le-mons, Say the/bells of Saint/Clem-ents."
195 PRINT ,"You/owe me five/farthings, Say the/bells of Saint/Mar-tin's"
200 PRINT ""
205 PRINT ,"When will you pay me? Say the bells of Old Bailey."
210 PRINT ,"When I grow rich, Say the bells of Shoreditch."
215 PRINT ""
220 PRINT ,"When will that be? Say the bells of Stepney."
225 PRINT ,"I'm sure I don't know, Says the great bell of Bow."
230 PRINT ""
235 PRINT ,"Here comes a candle t-o light you to bed,"
240 PRINT ,"Here comes a chopper t-o chop off your head."
245 T1$="O4C4O3AO4C O3AFG8A8 B-GO4C O3AFO4C CO3AO4C O3AFG8A8 B-GO4C O3AF2"
250 T2$="O3GEG ECD8E8 FDG EC2 GEG C2D8E8 FDG C2."
255 T3$="O4CO3AO4C O3F2G8A8 B-GO4C O3F2O4C CO3AO4C O3F2G8A8 B-GO4C O3F2."
260 T4$="O4CO3AO4C O3AFMLG8MNA8 B-GO4C O3F2. O4CO3AO4C O3AFMLG8MNA8 B-AG F2."
265 PLAY "T140P2XT1$;XT2$;XT3$;XT4$;"
270 RETURN
275 LOCATE 7
280 PRINT ," 3. BRAHMS' LULLABY - CLOSE YOUR EYES (3/4)"
285 PRINT ""
290 PRINT ,"Close your/eyes, close your/eyes, go to/sleep now, my/dar-ling"
295 PRINT ,"There's a/sand-man, old and/wise, bring-ing/hap-py dreams to/you."
300 PRINT ,"Set-tle/down and go to/sleep 'til the/qui-et night/pass-es,"
305 PRINT ,"You are/safe in my/arms, in my/arms all night/through."
310 PRINT ""
315 PRINT ,"Now the moon, rid-ing high, turns the shad-ows to sil-ver,"
320 PRINT ,"And the night winds, with a sigh, whis-per soft a-cross the hill."
325 PRINT ,"It's a bright en-chanted land where the un-i-corn dances"
330 PRINT ,"'til the stars dis-ap-pear, and the whole world is still."
335 B1$="O3P2E8E8 G2E8E8 G2E8G8 O4CO3BA AGD8E8 FDD8E8 F2D8F8 B8A8GB O4C2O3C8C8"
340 B2$="O4C.C8O3A8F8 G2C8C8 FGA EGC8C8 O4C2O3A8F8 G2E8C8 FED C2."
345 PLAY "T100XB1$;XB2$;XB1$;XB2$;"
350 RETURN
355 LOCATE 3
360 PRINT "Old Welsh tune, words by Sir Harold Boulton 1884 (4/4)"
365 LOCATE 7
370 PRINT " 4. ALL THROUGH THE NIGHT"
375 PRINT ""
380 PRINT "Sleep, my love, and/peace at-tend thee,/All through the/night;"
385 PRINT "Guard-ian an-gels/God will send thee,/All through the/night;"
390 PRINT "Soft the drow-sy/hours are creep-ing,/Hill and dale in/slum-ber steep-ing;/"
395 PRINT "I my lov-ing/vi-gil keep-ing,/All through the/night."
400 PRINT ""
405 PRINT "Angels watching ever round thee, All through the night;"
410 PRINT "In thy slumbers close surround thee, All through the night;"
415 PRINT "They should of all fears disarm thee, No foreboding should alarm thee,"
420 PRINT "They will let no peril harm thee, All through the night."
425 N1$="O3G.F#8EGA.G8F#DE2F#.F#8G1"
430 N2$="O4C.O3B8O4CDEDCO3BO4CO3BAGB.A8GF#G.F#8EGA.G8F#DE2F#.F#8G1"
435 PLAY "T100XN1$;XN1$;XN2$;XN1$;XN1$;XN2$;"
440 RETURN
445 LOCATE 3
450 PRINT ,"Traditional words and tune (2/4)"
455 LOCATE 7
460 PRINT ," 5. MICHAEL FINNIGIN"
465 PRINT ""
470 PRINT ,"There/once was a man named/Mi-chael Fin-ni-gin,/"
475 PRINT ,"He grew whis-kers/on his chin-ni-gin,"
480 PRINT ,"The/wind came out and/blew them in-i-gin,/"
485 PRINT ,"Poor old Mi-chael/Fin-ni-gin (be-gin-i-gin)."
490 M1$="O3P4P8D8 G8G16G16G8G8 B8O4D8O3B16A16G8 A8A8A8A8 F#8A8F#16E16D16D16"
495 M2$="O3G8G8G8G8 B8O4D8O3B16A16G8 A8A8D8F#8 G16G16G16G16G16G16G8"
500 GOSUB 580
505 LOCATE 10
510 PRINT ,"He kicked up an awful dinigin, "
515 PRINT ,"Because they said he must not sinigin, "
520 GOSUB 580
525 LOCATE 10
530 PRINT ,"He went fishing with a pinigin,"
535 PRINT ,"Caught a fish but dropped it inigin, "
540 GOSUB 580
545 LOCATE 10
550 PRINT ,"Climbed a tree and barked his shinigin,"
555 PRINT ,"Took off several yards of skinigin, "
560 GOSUB 580
565 LOCATE 10
570 PRINT ,"He grew fat and he grew thinigin, "
575 PRINT ,"Then he died, and we have to beginigin,"
580 PLAY "T100XM1$;XM2$;"
585 RETURN
590 LOCATE 3
595 PRINT ,"Traditional 18th century words and tune (6/8)"
600 LOCATE 7
605 PRINT ," 6. RIDE A COCK HORSE"
610 PRINT ""
615 PRINT ,"Ride a cock horse to Ban-bu-ry Cross,"
620 PRINT ,"To see a fine la-dy on a white horse;"
625 PRINT ,"Rings on her fin-gers and bells on her toes,"
630 PRINT ,"And she shall have mu-sic where ev-er she goes."
635 R1$="O3E8.B16B8BB8 O4C#8.D#16C#8O3BB8 A8.B16A8MLG#8MNA8G#8 F#8.G#16F#8E."
640 R2$="E8.B16B8B8B8B8 O4C#8.D#16C#8O3BB8 A8.B16A8G#8A8G#8 F#8.G#16F#8E."
645 PLAY "XR1$;XR2$;"
650 RETURN
655 LOCATE 1
660 PRINT ,"Traditional words and tune (2/4)"
665 LOCATE 4
670 PRINT ," 8. EARLY ONE MORNING"
675 PRINT ""
680 PRINT ,"1. Ear-ly one/morn-ing just/as the sun was/ris-ing,"
685 PRINT ,"I/heard a maid/sing in the/val-ley be-/low:"
690 PRINT ,"O, don't de-/ceive me,/O, ne-ver/leave me."
695 PRINT ,"How could you/use a/poor mai-den/so?"
700 PRINT ""
705 PRINT ,"2. Remember the vows that you made to me truly,"
710 PRINT ,"Remember how tenderly you nestled close to me."
715 PRINT ,"Gay is the garland, fresh are the roses"
720 PRINT ,"I've culled from the garden to bind over thee."
725 PRINT ""
730 PRINT ,"3. Here I now wander alone as I wonder"
735 PRINT ,"Why you did leave me to sigh and complain."
740 PRINT ,"I ask of the roses, why should I be forsaken,
745 PRINT ,"Why must I in sorrow remain?"
750 E1$="O3EE8E8 MLE8MNG#8B8B8 O4C#8O3A8F#8E8 MLD#8MNF#8O2B8B8O3 EE8E8 MLE8MNG#8B8B8 MLO4C#8O3MNA8F#8D#8 E2"
755 E2$="F#G#8A8MLB8MNG#8E4F#G#8A8MLB8MNG#8EMLE8MNG#8B8O4E8MLD#8MNC#8O3MLB8MNA8MLG#8MNF#8E8D#8E2"
760 PLAY "T80P2XE1$;XE2$;XE1$;XE2$;XE1$;XE2$;"
765 CLS
770 LOCATE 3
775 PRINT ,"4. Through yonder grove, by the spring that is running,"
780 PRINT ,"There you and I have so merrily played,"
785 PRINT ,"Kissing and courting and gently sporting:"
790 PRINT ,"Oh, my innocent heart you've betrayed."
795 PRINT ""
800 PRINT ,"5. How can you slight so a pretty girl that loves you,"
805 PRINT ,"A pretty girl that loves you so dearly and warm,"
810 PRINT ,"Though love's folly is surely but a fancy,"
815 PRINT ,"Still it should prove to me sweeter than your scorn."
820 PRINT ""
825 PRINT ,"6. Soon you will meet with another pretty maiden,"
830 PRINT ,"Some pretty maiden, you'll court her for awhile,"
835 PRINT ,"Thus ever ranging, turning and changing,"
840 PRINT ,"Always seeking for a girl that is new."
845 PRINT ""
850 PRINT ,"7. Thus sang the maiden, her sorrows bewailing,"
855 PRINT ,"Thus sang the maid in the valley below:"
860 PRINT ,"`O, don't deceive me, O, never leave me,"
865 PRINT ,"How could you use a poor maiden so?'"
870 PLAY "T80XE1$;XE2$;XE1$;XE2$;XE1$;XE2$;XE1$;XE2$;"
875 RETURN
900 'Old Welsh tune, words by Thomas Moore, 1779-1852. (4/4)
905 'THE MINSTREL BOY
910 A0$="O2A"
912 A1$="O3D.E8MLG8MNF#8MLE8MND8 F#AO4DC#8.D16 O3BAMLF#8.MNG16MLA8MNF#8 E2D"
915 A2$="O4DC#O3BO4C#8D8 C#O3BAA# B.F#8F#A# MLB.MNO4C#8DD"
920 A3$= "XA0$;XA1$;XA0$;XA1$;P4XA2$;XA1$;"
925 PLAY "T100XA3$;XA3$;"
930 RETURN
10 CLEAR ,,1024
20 GOSUB 390 'set up arrays
30 GOSUB 50
40 GOSUB 440
50 COLOR 0,2
60 CLS
70 INPUT "Please enter your name, player A.",PLANAM$(1)
80 INPUT "Enter your name, player B.",PLANAM$(2)
90 CLS
100 PRINT "Fine, "PLANAM$(1)" and "PLANAM$(2)" let's get started!"
110 PRINT "The object of this game is to place 3 x's or 3 o's in a row."
120 PRINT "The row can be horizontal, vertical or diagonal."
130 PRINT "The first one to complete a row wins the game."
140 PRINT "Press any key to start the game"
150 C$=INKEY$:IF C$="" THEN 150
160 CLS
170 LOCATE 8,25: PRINT " "+CHR$(186)+" "+CHR$(186);
180 LOCATE 9,25: PRINT " "+CHR$(186)+" "+CHR$(186);
190 LOCATE 11,25: PRINT " "+CHR$(186)+" "+CHR$(186);
200 LOCATE 12,25: PRINT " "+CHR$(186)+" "+CHR$(186);
210 LOCATE 10,24:PRINT STRING$(5,205)+CHR$(206)+STRING$(4,205)+CHR$(206)+STRING$(5,205);
220 LOCATE 13,24:PRINT STRING$(5,205)+CHR$(206)+STRING$(4,205)+CHR$(206)+STRING$(5,205);
230 LOCATE 14,25: PRINT " "+CHR$(186)+" "+CHR$(186);
240 LOCATE 15,25: PRINT " "+CHR$(186)+" "+CHR$(186);
250 LOCATE 9,27:PRINT "1":LOCATE 9,31:PRINT "2":LOCATE 9,36:PRINT "3"
260 LOCATE 12,27:PRINT "4":LOCATE 12,31:PRINT "5":LOCATE 12,36:PRINT "6"
270 LOCATE 15,27:PRINT "7":LOCATE 15,31:PRINT "8":LOCATE 15,36:PRINT "9"
280 LOCATE 17,1:PRINT PLANAM$(1)", your selection will cause an X to be placed on the grid,"
290 LOCATE 18,1:PRINT "and yours, "PLANAM$(2)", will cause an O to appear.":RETURN
300 LOCATE 9,27:PRINT C$:RETURN
310 LOCATE 9,31:PRINT C$:RETURN
320 LOCATE 9,36:PRINT C$:RETURN
330 LOCATE 12,27:PRINT C$:RETURN
340 LOCATE 12,31:PRINT C$:RETURN
350 LOCATE 12,36:PRINT C$:RETURN
360 LOCATE 15,27:PRINT C$:RETURN
370 LOCATE 15,31:PRINT C$:RETURN
380 LOCATE 15,36:PRINT C$:RETURN
390 DIM PLANAM$(2) 'numbers of players
400 DIM PLY(10) 'game array to track progress
410 DIM WC(24) 'possible winning combinations
420 DATA 1,2,3,4,5,6,7,8,9,1,4,7,1,5,9,2,5,8,3,5,7,3,6,9
430 FOR I = 1 TO 24:READ WC(I):NEXT I:RETURN 'fill in the winning array
440 FOR P = 1 TO 9
450 IF PLANUM <>1 THEN PLANUM = 1: PN$ = PLANAM$(1) ELSE PLANUM = 2:PN$ = PLANAM$(2)
460 GOSUB 510 'request player input
470 NEXT P
480 LOCATE 23,1:PRINT "Game's over, no winner! Want to try another?":GOTO 650
490 LOCATE 20,6:PRINT "Make another selection "PN$" "
500 FOR Z= 1 TO 3000:NEXT Z:LOCATE 22,6:PRINT " ":GOTO 520
510 LOCATE 20,6:PRINT "Select a number, "PN$". "
520 LOCATE 21,3:INPUT A$
530 A = VAL(A$)
540 IF A<1 OR A>9 THEN GOTO 490
550 IF PLY(A) <> 0 THEN LOCATE 22,6:PRINT "Block already taken": GOTO 490
560 IF PLANUM = 1 THEN C$="X":ELSE C$ ="O"
570 ON A GOSUB 300,310,320,330,340,350,360,370,380
580 PLY(A) = PLANUM
590 GOSUB 600:RETURN
600 FOR A1 = 0 TO 21 'who wins?
610 FOR A2 = 1 TO 3:IF PLY(WC(A1+A2))<>PLANUM THEN 670
620 NEXT A2
630 IF PLANUM =1 THEN WIN$ = PLANAM$(1): ELSE WIN$ = PLANAM$(2)
640 LOCATE 23,1:PRINT "You win " WIN$ "! Good game! Do you want to try another?"
650 INPUT YN$
660 IF YN$ = "yes" THEN 10: ELSE END
670 A1 = A1 + 2
680 NEXT A1:RETURN
1000 PRINT TAB(10);"WUMPUS 2"
1010 PRINT " "
1020 REM - wumpus version 2
1030 DIM S(20,3)
1040 DIM L(6),M(6),P(5)
1050 PRINT "Instructions ?? (y,n);
1060 INPUT I$
1070 PRINT " "
1080 IF LEFT$(I$,1) <> "y" THEN 1110
1090 GOSUB 1640
1100 REM - choose and set up cave
1110 GOSUB 3680
1113 Q$=MID$(TIME$,7,2)
1114 Q1=CVI(Q$)
1115 RANDOMIZE(Q1)
1120 DEF FNA(X)=INT(20*RND)+1
1130 DEF FNB(X)=INT(3*RND)+1
1140 DEF FNC(X)=INT(4*RND)+1
1150 REM locate l array items
1160 REM 1-you, 2-wumpus, 3&4-pits, 5&6-bats
1170 FOR J=1 TO 6
1180 L(J)=FNA(0)
1190 M(J)=L(J)
1200 NEXT J
1210 REM - check for crossover (ie l(1)=l(2) etc)
1220 FOR J=1 TO 6
1230 FOR K=J TO 6
1240 IF J=K THEN 1260
1250 IF L(J)=L(K) THEN 1170
1260 NEXT K
1270 NEXT J
1280 REM - set # arrows
1290 A=5
1300 L=L(1)
1310 REM - run the game
1320 PRINT "Hunt the wumpus."
1330 REM-hazards warnings and location
1340 GOSUB 2410
1350 REM move or shoot
1360 GOSUB 2580
1370 ON O GOTO 1390,1430
1380 REM shoot
1390 GOSUB 2720
1400 IF F=0 THEN 1360
1410 GOTO 1450
1420 REM move
1430 GOSUB 3300
1440 IF F=0 THEN 1340
1450 IF F > 0 THEN 1500
1460 REM lose
1470 PRINT "HA HA HA - You LOOSE!!!"
1480 GOTO 1510
1490 REM win
1500 PRINT "HEE HEE HEE - The WUMPUS'LL GET YOU NEXT TIME!!!"
1510 FOR J=1 TO 6
1520 L(J)=M(J)
1530 NEXT J
1540 PRINT "Play again ?? (y/n)";
1550 INPUT I$
1560 PRINT " "
1570 PRINT " "
1580 IF LEFT$(I$,1) <> "y" THEN 4640
1590 PRINT "Same set-up ?? (y/n);
1600 INPUT I$
1610 PRINT " "
1620 IF LEFT$(I$,1) <> "y" THEN 1110
1630 GOTO 1290
1640 REM - instructions
1650 PRINT "Welcome to WUMPUS II"
1655 PRINT
1660 PRINT "This version has the same rules as"
1670 PRINT "'Hunt The WUMPUS'. However, you"
1680 PRINT "now have a choice of caves to play"
1690 PRINT "in. Some caves are easier than"
1700 PRINT "others. All caves have 20 rooms"
1710 PRINT "and 3 tunnels leading from one room"
1720 PRINT "to other rooms."
1730 PRINT "The caves are:"
1740 PRINT " 0 - DODECAHEDRON -- The rooms of this"
1750 PRINT " cave are on a 12-sided object,"
1760 PRINT " each forming a pentagon. The"
1770 PRINT " rooms are at the corners of the"
1780 PRINT " pentagons. Each room having"
1790 PRINT " tunnels that lead to 3 other rooms."
1800 PRINT " "
1810 PRINT " 1 - MOBIUS STRIP -- This cave is two"
1820 PRINT " rooms wide and 10 rooms around"
1830 PRINT " (like a belt). You will notice"
1840 PRINT " there is a half twist somewhere."
1850 PRINT " "
1860 PRINT "Press enter to continue";
1870 INPUT X$
1880 PRINT " "
1890 PRINT " 2 - STRING OF BEADS -- Five beads in"
1900 PRINT " a circle. Each bead is a diamond"
1910 PRINT " with a vertical cross-bar. The"
1920 PRINT " right & left corners lead to"
1930 PRINT " neighbouring beads. (This one is"
1940 PRINT " difficult to play)."
1950 PRINT " "
1960 PRINT " 3 - HEX NETWORK -- Imagine a hex tile"
1970 PRINT " floor. Take a rectangle with 20"
1980 PRINT " points (intersections) inside"
1990 PRINT " (4X4). Join right & left sides"
2000 PRINT " to make a cylinder. Then join"
2010 PRINT " top & bottom to form a torus"
2020 PRINT " (doughnut)."
2030 PRINT " Have fun imagining this one!!"
2040 PRINT " "
2050 PRINT " Caves 1-3 are regular in a sense that"
2060 PRINT "each room goes to three other rooms &"
2070 PRINT "tunnels allow two-way traffic. Here"
2080 PRINT "are some 'irregular' caves:"
2090 PRINT " "
2100 PRINT "Press enter to continue";
2110 INPUT X$
2120 PRINT " 4 - DENDRITE WITH DEGENERACIES --"
2130 PRINT " Pull a plant from the ground."
2140 PRINT " The roots & branches form a"
2150 PRINT " DENDRITE - ie., there are no"
2160 PRINT " looping paths. Degeneracy means"
2170 PRINT " a) some rooms connect to themselve"
2180 PRINT " and b) some rooms have more than"
2190 PRINT " one tunnel to the same other room"
2200 PRINT " ie, 12 has two tunnels to 13."
2210 PRINT " "
2220 PRINT " 5 - ONE WAY LATTICE - Here all tunnels"
2230 PRINT " go one way only. To return, you"
2240 PRINT " must go around the cave. (About"
2250 PRINT " 5 moves)."
2260 PRINT " "
2270 PRINT " 6 - ENTER YOUR OWN CAVE !! -- The"
2280 PRINT " computer will ask you the rooms"
2290 PRINT " next to each room in the cave."
2300 PRINT " For Example:"
2310 PRINT " Room #1 ? 2,3,4 -- your reply"
2320 PRINT " means room 1 has tunnels going to"
2330 PRINT " rooms 2, 3, &4."
2340 PRINT " "
2350 PRINT "Press enter to continue";
2360 INPUT X$
2370 PRINT " "
2380 PRINT "HAPPY HUNTING !!"
2390 PRINT " "
2400 RETURN
2410 REM
2420 PRINT " "
2430 FOR J=2 TO 6
2440 FOR K=1 TO 3
2450 IF S(L(1),K) <> L(J) THEN 2520
2460 ON J-1 GOTO 2470,2490,2490,2510,2510
2470 PRINT "I smell a WUMPUS !!"
2480 GOTO 2520
2490 PRINT "I feel a DRAFT !!"
2500 GOTO 2520
2510 PRINT "BATS Nearby !!"
2520 NEXT K
2530 NEXT J
2540 PRINT "You are in room ";L(1)
2550 PRINT "Tunnels lead to "S(L,1);S(L,2);S(L,3)
2560 PRINT " "
2570 RETURN
2580 REM - choose option
2590 GOTO 2630
2600 PRINT "error ";
2610 INPUT Z9
2620 PRINT " "
2630 PRINT "Shoot or move ";
2640 INPUT I$
2650 PRINT " "
2660 IF LEFT$(I$,1) <> "s" THEN 2690
2670 O=1
2680 RETURN
2690 IF LEFT$(I$,1) <> "m" THEN 2600
2700 O=2
2710 RETURN
2720 REM - arrow routine
2730 F=0
2740 REM - path of arrow
2750 GOTO 2790
2760 PRINT "error ";
2770 INPUT Z9
2780 PRINT " "
2790 PRINT "No. of rooms ";
2800 INPUT J9
2810 PRINT " "
2820 IF J9 < 1 OR J9 > 5 OR INT(J9) <> ABS(J9) THEN 2760
2830 FOR K=1 TO J9
2840 PRINT "Room #";
2850 INPUT P(K)
2860 PRINT " "
2870 IF P(K) > 0 AND P(K) < 21 AND INT(P(K))=ABS(P(K)) THEN 2920
2880 PRINT "error ";
2890 INPUT Z9
2900 PRINT " "
2910 GOTO 2840
2920 NEXT K
2930 PRINT " "
2940 REM - shoot arrow
2950 A=A-J9
2960 A9=L(1)
2970 FOR K=1 TO J9
2980 FOR K1=1 TO 3
2990 IF S(A9,K1)=P(K) THEN 3140
3000 NEXT K1
3010 REM - no tunnel for the arrow
3020 A9=S(A9,FNB(1))
3030 GOTO 3150
3040 NEXT K
3050 PRINT "Missed"
3060 REM - move wumpus
3070 GOSUB 3220
3080 REM - ammo check
3090 IF A > 0 THEN 3120
3100 PRINT "You have used ALL of your ARROWS"
3110 F=-1
3120 RETURN
3130 REM - see if arrow is at l(1) or l(2)
3140 A9=P(K)
3150 IF A9 <> L(2) THEN 3190
3160 PRINT "AHA! You got the WUMPUS! He was in room";L(2)
3170 F=1
3180 RETURN
3190 IF A9 <> L(1) THEN 3040
3200 PRINT "OUCH! Arrow got YOU!"
3210 GOTO 3110
3220 REM - move wumpus routine
3230 K=FNC(0)
3240 IF K=4 THEN 3290
3250 L(2)=S(L(2),K)
3260 IF L(2) <> L THEN 3290
3270 PRINT "TSK TSK TSK - WUMPUS Got YOU!!"
3280 F=-1
3290 RETURN
3300 REM - move routine
3310 F=0
3320 GOTO 3360
3330 PRINT "Error ";
3340 INPUT Z9
3350 PRINT " "
3360 PRINT "Where to ";
3370 INPUT L
3380 PRINT " "
3390 IF L < 1 OR L > 20 OR ABS(L) <> INT(L) THEN 3330
3400 FOR K=1 TO 3
3410 REM - check if legal move
3420 IF S(L(1),K)=L THEN 3490
3430 NEXT K
3440 IF L=L(1) THEN 3490
3450 PRINT "Not possible - ";
3460 INPUT Z9
3470 GOTO 3360
3480 REM - check for hazards
3490 L(1)=L
3500 REM - wumpus
3510 IF L <> L(2) THEN 3570
3520 PRINT "...OOPS! BUMPED A WUMPUS !"
3530 REM - move a wumpus
3540 GOSUB 3230
3550 IF F=0 THEN 3570
3560 REM - pit
3570 IF L <> L(3) AND L <> L(4) THEN 3620
3580 PRINT "YYYIIIEEEE . . . FELL IN A PIT !"
3590 F=-1
3600 RETURN
3610 REM - bats
3620 IF L <> L(5) AND L <> L(6) THEN 3670
3630 PRINT "ZAP--SUPER BAT SNATCH!"
3640 PRINT "ELSEWHERESVILLE FOR YOU!"
3650 L=FNA(1)
3660 GOTO 3490
3670 RETURN
3680 REM - select cave
3690 GOTO 3730
3700 PRINT "Error ";
3710 INPUT Z9
3720 PRINT ""
3730 PRINT "cave #(0-6) ";
3740 RESTORE
3750 INPUT N
3760 PRINT
3770 IF N<0 OR N>6 OR INT(N) <> ABS(N) THEN 3700
3780 ON N+1 GOSUB 3930,3870,3990,4110,4230,4350,4460
3790 RETURN
3800 REM - dodecahedron
3810 DATA 2,5,8,1,3,10,2,4,12,3,5,14,1,4,6
3820 DATA 5,7,15,6,8,17,1,7,9,8,10,18,2,9,11
3830 DATA 10,12,19,3,11,13,12,14,20,4,13,15,6,14,16
3840 DATA 15,17,20,7,16,18,9,17,19,11,18,20,13,16,19
3850 GOSUB 4570
3860 RETURN
3870 REM - mobius strip
3880 FOR B1=1 TO 1
3890 FOR B2=1 TO 60
3900 READ B0
3910 NEXT B2
3920 NEXT B1
3930 DATA 20,2,3,19,1,4,1,4,5,2,3,6,3,6,7
3940 DATA 4,5,8,5,8,9,6,7,10,7,10,11,8,9,12
3950 DATA 9,12,13,10,11,14,11,14,15,12,13,16,12,16,17
3960 DATA 14,15,18,15,18,19,16,17,20,2,17,20,1,18,19
3970 GOSUB 4570
3980 RETURN
3990 REM - string of beads
4000 FOR B1=1 TO 2
4010 FOR B2=1 TO 60
4020 READ B0
4030 NEXT B2
4040 NEXT B1
4050 DATA 2,3,20,1,3,4,1,2,4,2,3,5,4,6,7
4060 DATA 5,7,8,5,6,8,6,7,9,8,10,11,9,11,12
4070 DATA 9,10,12,10,11,13,12,14,15,13,15,16,13,14,16
4080 DATA 14,15,17,16,18,19,17,19,20,17,18,20,1,18,19
4090 GOSUB 4570
4100 RETURN
4110 REM - hex nut on torus
4120 FOR B1=1 TO 3
4130 FOR B2=1 TO 60
4140 READ B0
4150 NEXT B2
4160 NEXT B1
4170 DATA 6,10,16,6,7,17,7,8,18,8,9,19,9,10,20
4180 DATA 1,2,15,2,3,11,3,4,12,4,5,13,5,6,14
4190 DATA 7,16,20,8,16,17,9,17,18,10,18,19,6,19,20
4200 DATA 1,11,12,2,12,13,3,13,14,4,14,15,5,11,15
4210 GOSUB 4570
4220 RETURN
4230 REM - dendrite w/ degeneracies
4240 FOR B1=1 TO 4
4250 FOR B2=1 TO 60
4260 READ B0
4270 NEXT B2
4280 NEXT B1
4290 DATA 1,1,5,2,2,5,3,3,6,4,4,6,1,2,7
4300 DATA 3,4,7,5,6,10,8,9,9,8,8,10,7,9,11
4310 DATA 10,13,14,12,13,13,11,12,12,11,15,16,14,17,18
4320 DATA 14,19,20,15,17,17,15,18,18,16,19,19,16,20,20
4330 GOSUB 4570
4340 RETURN
4350 REM - one way lattice
4360 FOR B1=1 TO 53057! FOR B2=1 TO 60
4370 READ B0
4380 NEXT B2
4390 NEXT B1
4400 DATA 5,4,8,1,5,6,2,6,7,3,7,8,8,9,12
4410 DATA 5,9,10,6,10,11,7,11,12,12,13,16,9,13,14
4420 DATA 10,14,15,11,15,16,16,17,20,13,17,18,14,18,19
4430 DATA 15,19,20,1,4,20,1,2,17,2,3,18,3,4,19
4440 GOSUB 4570
4450 RETURN
4460 REM - input your own cave
4470 FOR J=1 TO 20
4480 PRINT "room #";J;
4490 INPUT S(J,1),S(J,2),S(J,3)
4500 FOR K=1 TO 3
4510 IF S(J,K) > 0 AND S(J,K) < 21 AND ABS(S(J,K))=INT(S(J,K)) THEN 4540
4520 PRINT "***** ERROR !!!!!"
4530 GOTO 4480
4540 NEXT K
4550 NEXT J
4560 RETURN
4570 REM - input cave
4580 FOR J=1 TO 20
4590 FOR K=1 TO 3
4600 READ S(J,K)
4610 NEXT K
4620 NEXT J
4630 RETURN
4640 END
10 ' Yesterday
20 PLAY "t80
30 PLAY "o3
40 PLAY "mn
50 PLAY "msl8gfmnl2f.l8p4ab
60 PLAY "o4c+defe.l16dl2d.l8p4msddmnc
70 PLAY "o3b-agl4b-msl8al4a.mn
80 PLAY "l4gfl8al4g.dfl8msa
90 PLAY "mll8al2a
100 PLAY "mn
110 PLAY "msl2aal4mn
120 PLAY "o4defl8edl4e.l8dl4cd
130 PLAY "o3msl1al2aamn
140 PLAY "o4l4defl8edl4e.l8dl4ce
150 PLAY "mlfco3b-amn
160 PLAY "l8gmsfl2f.mnl8p4ab
170 PLAY "o4c+defe.msl16dl2d.mnl4p4msl8ddmnc
180 PLAY "o3b-agl4b-msl8al4a.mngfl8al4g.dfmsl8a
190 PLAY "mll4al2amn
200 PLAY "l4fagdfmsl8amll8al2a
Volume in drive A has no label
Directory of A:\
CRC TXT 1359 11-09-84 8:37a
CRCK4 COM 1536 10-21-82 7:54p
EVRONWRD BAS 3328 1-01-80
GOBBLE BAS 2944 5-07-82
JAMMER BAS 7808 5-07-82
LITUPLIF BAS 2048 7-17-82 8:20p
MOON BAS 23428 1-01-80
NEWTREK BAS 25088 10-02-82 8:48a
NEWTREK HOW 3625 1-23-83 4:34p
OPERATOR BAS 12416 10-16-82 8:45p
PACKMAN DOC 4736 1-25-82 11:15p
PACKMAN EXE 37120 1-26-83 12:00p
PUFF BAS 384 5-04-82
RACJAM SCO 268 2-01-83 8:52p
RANGERD BAS 1280 1-01-80 12:11a
SONGS BAS 7424 2-24-82
TICTACTO BAS 3200 3-11-82
WUMPUS BAS 10368 2-07-82
YESTER BAS 512 1-01-80
19 file(s) 148872 bytes
7168 bytes free