10 DIM T$(47)
20 DIM M(42,8)
30 DIM O(14)
90 PRINT "WELCOME TO THE GAME OF SURVIVAL. WOULD YOU LIKE INSTRUCTIONS?"
110 INPUT D$
120 IF D$="Y" THEN GOSUB 5050
130 FOR I=1 TO 47
140 READ T$(I)
150 NEXT I
160 FOR I=1 TO 42
170 FOR J=1 TO 8
180 READ M(I,J)
190 NEXT J
200 NEXT I
320 LET P=1
330 LET C=2
340 LET T1=0
350 LET T2=185
360 LET P1=230
370 LET P2=50
380 LET V=0
390 LET F0=1
400 LET O(1)=21
410 LET O(2)=19
420 LET O(3)=99
430 LET O(4)=6
440 LET O(5)=32
450 LET O(6)=0
460 LET O(7)=38
470 LET O(8)=35
480 LET O(9)=0
490 LET O(10)=35
500 LET O(11)=99
510 LET O(12)=33
520 LET O(13)=34
530 LET O(14)=37
540 LET M(14,4)=0
550 LET M(14,8)=M(14,7)+1
560 LET M(2,8)=M(2,7)+1
570 LET F1=0
580 LET F2=0
590 LET F4=0
600 LET F7=0
610 LET F9=0
650 PRINT "ELAPSED TIME: ";T1; "MINUTES"
660 IF O(11)=99 THEN PRINT "POWER UNIT: "; P1; "UNITS"
670 IF O(14)=99 THEN PRINT "POWER PACK: "; P2; "UNITS"
680 LET T1=T1+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 T1>400 THEN 2960
740 IF T1>350 THEN 3840
750 IF T1>200 THEN 3740
760 IF F0=1 THEN T2=T2-5
770 IF T2<0 THEN T2=0
780 IF F0=0 THEN 800
790 IF T2>0 THEN 840
800 IF F9=0 THEN 820
810 IF P>21 THEN 2900
820 IF P<18 THEN 2900
830 IF P=38 THEN 1700
840 IF P=38 THEN 3590 
850 IF F0=1 THEN PRINT "OXYGEN REMAINING: "; T2; "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 "##"
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
1010 REM
1020 REM
1030 REM
1040 INPUT B$
1050 LET I=0
1060 IF LEN(B$)<>1 GOTO 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 6200
1140 IF I=0 THEN 1570
1150 IF M(P,I)=0 THEN 1270
1160 IF M(P,I)=99 THEN 2940
1170 LET 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 LET R=P
1240 LET P=Q
1250 IF P=35 THEN V=V+1
1260 GOTO 650
1270 PRINT "YOU CANNOT GO IN THAT DIRECTION!"
1280 GOTO 1040
1320 LET C$=LEFT$(B$,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 6200
1430 IF C$="END" THEN 6200
1440 IF C$="TRA" THEN 1750
1450 IF C$="DIG" THEN 1860
1460 IF C$="DEB" 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 LET D$=B$
1650 LET B$=D$
1660 GOTO 1070
1700 IF R<>39 THEN 2900
1710 GOTO 840
1750 IF P<>36 THEN 1800
1760 IF O(8)=99 THEN 1590
1770 LET P=O(8)
1780 PRINT "BEAMING IN PROCESS."
1790 GOTO 650
1800 IF P<>O(8) THEN 1590
1810 LET P=36
1820 GOTO 1780
1860 IF P<>10 THEN 1590
1870 LET O(9)=10
1880 GOTO 940
1920 IF O(4)<>99 THEN 950
1930 LET O(4)=100
1940 PRINT "YOU DROPPED YOUR ILLUMINATOR!  YOU CANNOT RETRIEVE IT."
1960 GOTO 950
2000 IF O(5)=28 THEN LET O(5)=35
2010 IF O(5)=42 THEN LET O(5)=28
2020 IF O(5)=41 THEN LET O(5)=42
2030 IF O(5)=27 THEN LET O(5)=41
2040 IF O(5)=25 THEN LET O(5)=27
2050 IF O(5)<>35 THEN 2090
2060 IF P<>28 THEN 1010
2070 LET M(28,1)=35
2080 GOTO 1010
2090 IF O(5)<>32 THEN 1010
2100 IF P<>32 THEN 1010
2110 LET O(5)=25
2120 IF O(13)=99 THEN 1010
2130 PRINT "ROBOT FAILS TO RECOGNIZE YOU."
2140 PRINT "IT FIRES A PHASOR WEAPON AT YOU!"
2150 GOTO 2980
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 LET C=C+1
2330 O(I)=99
2340 IF I=3 THEN LET 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
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 LET C=C-1
2640 O(I)=P
2650 IF I=3 THEN LET 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
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
2870 PRINT "YOU HAVE NO POWER OR POWER PACK."
2880 PRINT "YOU HAVE FROZEN TO DEATH."
2890 GOTO 2980
2900 PRINT "OXYGEN REQUIRED HERE. NONE AVAILABLE."
2910 GOTO 2980
2920 PRINT "A NUCLEAR DETONATION HAS JUST OCCURRED."
2930 GOTO 2980
2940 PRINT "YOU HAVE FALLEN TO YOUR DEATH."
2950 GOTO 2980
2952 PRINT "YOU HAVE BEEN ZAPPED BY THE LASER."
2954 GOTO 2980
2960 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 D$
3010 IF D$="Y" THEN 320
3020 GOTO 6200
3060 IF M(P,I)<>13 THEN 1230
3070 IF F2=1 THEN 1230
3080 PRINT "THERE IS A METEOR SHOWER."
3090 PRINT "YOUR SPACE SUIT HAS DEVELOPED A LEAK!"
3100 GOSUB 4890
3110 IF I<>2 THEN 2980
3120 PRINT "YOUR SUIT IS NOW SEALED."
3130 LET F2=1
3140 GOTO 1230
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 
3230 PRINT "YOU ARE IN THE SHED AIR LOCK."
3240 LET F1=1
3250 GOTO 1230
3260 PRINT "YOUR ATTEMPT FAILS."
3270 GOTO 1040
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 LET F4=1
3380 GOTO 1230
3420 IF O(4)<>99 THEN 2940
3430 GOTO 1230
3470 IF M(P,I)<>37 THEN 1230
3480 IF F3=1 THEN 1230
3490 PRINT "THERE IS A LASER BEAM HERE."
3500 PRINT "PASSAGE NOT POSSIBLE WITH BEAM PRESENT."
3510 GOSUB 4890
3520 IF I<>12 THEN 2952
3530 PRINT "THE BEAM IS NOW DEFLECTED."
3540 LET F3=1
3550 GOTO 1230
3590 IF R<>29 THEN 850
3600 IF F9=1 THEN 850
3610 LET F9=1
3620 PRINT "YOU HAVE JUST BLOWN AIR SEAL IN SPACE STATION."
3640 GOTO 850
3680 IF P<22 THEN 2870
3690 IF F9=1 THEN 2870
3700 GOTO 730
3740 IF F5=1 THEN 760
3750 LET O(6)=14
3760 LET M(2,8)=M(2,7)
3770 LET M(14,8)=M(14,7)
3780 LET M(14,4)=2
3790 LET F5=1
3800 GOTO 760
3840 IF F7=0 THEN 2920
3850 GOTO 760
3890 IF O(6)<>99 THEN 3940
3900 IF O(7)<>99 THEN 3980
3910 LET 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
4030 IF P<>19 THEN 3980
4040 IF O(9)<>99 THEN 3940
4050 LET O(9)=98
4060 PRINT "FUEL IS NOW LOADED."
4070 GOTO 1040
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"
4170 PRINT "AND ARE ON YOUR WAY TO EARTH."
4180 PRINT "YOUR ESCAPE TIME: "; T1; "MINUTES"
4190 GOTO 2990
4200 PRINT "YOUR SPACE CRAFT HAS NO FUEL."
4210 GOTO 1040
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 SOMEHWERE EAST"
4300 PRINT "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
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
4590 FOR J=1 TO LEN(B$)
4600 IF MID$(B$,J,1)=" " THEN 4640
4610 NEXT J
4620 I=-1
4630 RETURN
4640 LET C$=MID$(B$,J+1,3)
4650 LET I=0
4660 IF C$="ELE" THEN I=1
4670 IF C$="KEY" THEN I=1
4680 IF C$="SEA" THEN I=2
4690 IF C$="OXY" THEN I=3
4700 IF C$="MOD" THEN I=3
4710 IF C$="ILL" THEN I=4
4720 IF C$="ROB" THEN I=5
4730 IF C$="DEA" THEN I=6
4740 IF C$="NUC" THEN I=7
4750 IF C$="BOM" THEN I=7
4760 IF C$="TRA" THEN I=8
4770 IF C$="DIL" THEN I=9
4780 IF C$="CRY" THEN I=9
4790 IF C$="COM" THEN I=10
4800 IF C$="MES" THEN I=10
4810 IF C$="UNI" THEN I=11
4820 IF C$="MIR" THEN I=12
4830 IF C$="BAD" THEN I=13
4840 IF C$="PAC" THEN I=14
4850 RETURN
4890 INPUT B$
4900 LET C$=B$
4910 IF LEFT$(C$,3)="TRY" THEN 4950
4920 IF LEFT$(C$,3)="USE" THEN 4950
4930 I=-1
4940 RETURN
4950 GOSUB 4590
4960 IF I<1 THEN 5050
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
5050 PRINT "YOU HAVE CRASH LANDED ON THE EARTH'S MOON.  YOU HAVE LIMITED "
5060 PRINT "SUPPLIES AND TIME IN WHICH TO SURVIVE.  TO TRAVEL, YOU MAY "
5070 PRINT "ENTER DIRECTIVES SUCH AS NORTH OR N, AS WELL AS S, E, W, AND "
5080 PRINT "U AND D (UP AND DOWN).  YOU WILL ENCOUNTER VARIOUS ITEMS AND "
5090 PRINT "SITUATIONS DURING YOUR TRAVELS.  TO COMMUNICATE, ENTER COM-
5100 PRINT "MANDS (VERBS) FOLLOWED BY OBJECT NAMES, IF APPLICABLE.  FOR "
5110 PRINT "EXAMPLE, GET XXX, LEAVE, USE, AND INVENTORY. "
5120 PRINT " "
5130 PRINT "ONCE YOU HAVE SURVIVED, THE OBJECT THEN IS TO ACHIEVE THE "
5140 PRINT "OPTIMUM SURVIVAL TIME.  GOOD LUCK!!!"
5240 RETURN
5280 DATA "AT MARE SERENITATIS."
5290 DATA "ON RIM OF POSIDONIUS."
5300 DATA "TOTAL DARKNESS TO E."
5310 DATA "TWIXT DAWES AND PLINIUS."
5320 DATA "AT PASS IN HAEMUS MTNS."
5330 DATA "AT CRATER MANILUS."
5340 DATA "AT MARE VAPORUM."
5350 DATA "AT MT. EUDOXUS."
5360 DATA "INSIDE ARISTOTELES."
5370 DATA "IN CHANGING AREA."
5380 DATA "IN LACUS SOMNIORUM."
5390 DATA "AT LACUS MORTIS."
5400 DATA "THE SURFACE IS VERY SOFT HERE."
5410 DATA "AT E.SIDE OF MARE IMBRIUM."
5420 DATA "AT THE BASE OF PLATO CRATER. A"
5430 DATA "SHINY OBJECT IS SEEN W."
5440 DATA "BEFORE A METAL SHED. A "
5450 DATA "SIGN READS VENT. SHAFT #2."
5460 DATA "E. OF MARE SERENITATIS."
5470 DATA "THERE IS TOTAL DARKNESS."
5480 DATA "AT CRASH SITE OF A SPACE CRAFT."
5490 DATA "THE SHIP ENTRANCE IS BEFORE YOU."
5500 DATA "AT THE CENTER OF MARE IMBRIUM."
5510 DATA "IN THE AIR LOCK CHAMBER OF THE SHIP."
5520 DATA "IN THE AFT CARGO AND FUEL STORAGE ROOM."
5530 DATA "IN THE ENGINE ROOM OF THE SPACE CRAFT."
5540 DATA "IN THE SHIP'S CONTROL ROOM."
5550 DATA "IN AN AIR LOCK CHAMBER."
5560 DATA "INSIDE A VENTILATOR SHED. A LADDER "
5570 DATA "LEADS DOWN INTO A LARGE METAL SHAFT."
5580 DATA "IN A VENTILATOR PASSAGE."
5590 DATA "AT A VENTILATOR OPENING. THROUGH THE "
5600 DATA "OPENING A LIT PASSAGEWAY CAN BE SEEN."
5610 DATA "IN A LIGHTED SPACE STATION CORRIDOR."
5620 DATA "IN THE SPACE STATION INFIRMARY."
5630 DATA "IN THE RECREATION ROOM AND LIBRARY."
5640 DATA "IN THE MESS HALL. ABANDONED FOOD TRAYS "
5650 DATA "ARE STILL ON THE TABLES."
5660 DATA "IN THE STORAGE ROOM AND SUPPLY AREA."
5670 DATA "IN THE SLEEPING QUARTERS."
5680 DATA "IN AN ELEVATOR AT SUBSURFACE LEVEL."
5690 DATA "IN AN ELEVATOR AT SURFACE LEVEL."
5700 DATA "IN THE STATION CONTROL CENTER."
5710 DATA "IN THE TRANSPORTER ROOM."
5720 DATA "IN THE SPACE STATION LABORATORY."
5730 DATA "IN THE HANGAR AREA. THE LAUNCH AREA "
5740 DATA "IS JUST SOUTH OF HERE."
5780 DATA 07,04,02,15,00,00,01,01
5790 DATA 09,03,14,01,00,00,02,03
5800 DATA 02,05,14,04,00,00,04,04
5810 DATA 01,05,03,00,00,00,05,05
5820 DATA 04,00,03,06,00,00,06,06
5830 DATA 00,00,05,00,00,00,07,07
5840 DATA 08,01,09,11,00,00,08,08
5850 DATA 00,07,10,00,00,00,09,09
5860 DATA 10,02,14,07,00,00,11,11
5870 DATA 00,09,14,08,00,00,12,13
5880 DATA 12,15,07,16,00,00,14,14
5890 DATA 00,11,00,13,00,00,15,16
5900 DATA 00,16,12,22,00,00,17,18
5910 DATA 99,99,99,99,00,00,19,20
5920 DATA 11,18,01,00,00,00,21,22
5930 DATA 17,16,07,16,00,00,23,23
5940 DATA 16,17,11,17,00,00,23,23
5950 DATA 15,19,00,00,00,00,24,24
5960 DATA 18,00,20,00,00,00,25,25
5970 DATA 00,00,00,19,21,00,26,26
5980 DATA 00,00,00,00,00,20,27,27
5990 DATA 00,00,13,00,00,23,29,30
6000 DATA 24,00,00,00,22,00,31,31
6010 DATA 25,23,00,00,00,00,32,33
6020 DATA 27,26,33,32,24,00,34,34
6030 DATA 25,00,30,31,00,00,34,34
6040 DATA 34,25,41,00,00,00,34,34
6050 DATA 00,29,42,36,00,00,34,34
6060 DATA 28,38,40,37,00,00,34,34
6070 DATA 00,00,00,26,00,00,35,35
6080 DATA 00,00,26,00,00,00,36,36
6090 DATA 00,00,25,00,00,00,37,38
6100 DATA 00,00,00,25,00,00,40,40
6110 DATA 00,27,00,00,00,00,39,39
6120 DATA 00,28,00,00,24,00,43,43
6130 DATA 00,00,28,00,00,00,44,44
6140 DATA 00,00,29,00,00,00,45,45
6150 DATA 29,00,39,00,00,00,46,47
6160 DATA 40,00,00,38,00,00,28,28
6170 DATA 00,39,00,29,00,00,10,10
6180 DATA 00,00,00,27,42,00,41,41
6190 DATA 00,00,00,28,00,41,42,42
6200 END
0,00,28,28
6170 DATA 00,39,00,29,00,00,10,10
6180 DATA 00,00,00,27,42,00,41,41
6190 DATA 00,00,00,28,00,41,42,42
6200 E