10 PRINT CHR$ (12)
20 PRINT:PRINT:PRINT
30 PRINT        *****************     S T A R  T R E K     *****************
40 PRINT:PRINT
50 Z$ = STRING$(24, )
60 DIM GALAXY(8,8), K(3,3), N(3), Z(8,8), STATUS(8)
70 GOSUB 7860
80 GOTO 90
90 STARDATE = RND*(40*100)
100 T0 = STARDATE
110 T9 = 40 + (RND*10)
120 D0 = 0
130 TOTALENERGY = 3500
140 E0 = TOTALENERGY
150 PHOTONTORP = 10
160 P0 = PHOTONTORP
170 S9 = 200
180 SHIELDSTRENGTH = 0
190 TOTALBASES = 0
200 TOTALKLINGONS = 0
210 X$ = 
220 X0$ =  IS 
230 'GOSUB 7860
240 QUADRANT1 = RND*10
250 IF QUADRANT1 > 8 OR QUADRANT1 <= 0 GOTO 240
260 QUADRANT2 = RND*10
270 IF QUADRANT2 > 8 OR QUADRANT2 <= 0 GOTO 260
280 'GOSUB 7860
290 SECTOR1 = INT(RND*10)
300 IF SECTOR1 > 8 OR SECTOR1 <= 0 GOTO 240
310 SECTOR2 = INT(RND*10)
320 IF SECTOR2 > 8 OR SECTOR2 <= 0 GOTO 240
330 FOR I = 1 TO 8
340 STATUS(I) = 0
350 NEXT I
360 A1$ = NAVSRSLRSPHATORSHIDAMCOMQUI
370 '************************************************************************
380 '        SET UP THE GALAXY  PUT IN STARS, BASES AND KLINGONS           *
390 '************************************************************************
400 FOR I = 1 TO 8
410 FOR J = 1 TO 8
420 KLINGON = 0
430 Z(I,J) = 0
440 'GOSUB 7860
450 R1 = RND*100
460 IF R1> 98 THEN KLINGON = 3:TOTALKLINGONS = TOTALKLINGONS + 3:GOTO 490
470 IF R1> 95 THEN KLINGON = 2:TOTALKLINGONS = TOTALKLINGONS + 2:GOTO 490
480 IF R1> 80 THEN KLINGON = 1:TOTALKLINGONS = TOTALKLINGONS + 1
490 BASES = 0
500 IF RND*100 > 96 THEN BASES = 1: TOTALBASES = TOTALBASES + 1
510 GALAXY(I,J) = INT(KLINGON*100 + BASES*10 + RND*10)
520 NEXT J
530 NEXT I
540 IF (TOTALKLINGONS) > (T9) THEN T9 = TOTALKLINGONS + 1
550 IF TOTALBASES <> 0 THEN GOTO 640
560 IF GALAXY(QUADRANT1,QUADRANT2) < 200 THEN GALAXY(QUADRANT1,QUADRANT2) = GALAXY(QUADRANT1,QUADRANT2) + 100
570 TOTALKLINGONS = TOTALKLINGONS + 1
580 TOTALBASES = TOTALBASES + 1
590 GALAXY(QUADRANT1,QUADRANT2) = GALAXY(QUADRANT1,QUADRANT2) + 10
600 QUADRANT1 = RND*10
610 IF QUADRANT1 > 8 OR QUADRANT1 <= 0 GOTO 600
620 QUADRANT2 = RND*10
630 IF QUADRANT2 > 8 OR QUADRANT2 <= 0 GOTO 620
640 MAXKLINGONS = TOTALKLINGONS
650 IF TOTALBASES <> 1 THEN X$ = S:X0$ =  ARE 
660 PRINT TAB(10) YOUR MISSION IS TO DESTROY THE;TOTALKLINGONS;KLINGON SHIPS WHICH HAVE
670 PRINT TAB(10) INVADED THE GALAXY, BEFORE THEY ATTACK FEDERATION HEADQUARTERS
680 PRINT USING           ON STARDATE . THIS GIVES YOU . STAR DAYS.;T0 + T9;T9
690 PRINT:PRINT TAB(10) THERE;X0$;TOTALBASES;STARBASE;X$; IN THE GALAXY FOR RESUPPLYING YOUR SHIP.
700 PRINT:PRINT TAB(10) PLEASE ENTER YOUR NAME IN THE CAPTAIN'S LOG ;
710 INPUT NA$
720 PRINT:PRINT  TAB(10) CAPTAIN ;NA$; HAVE YOU COMMANDED A STARSHIP BEFORE?  (YES OR NO);
730 INPUT A2$ : PRINT
740 IF LEFT$(A2$,1) = N THEN GOSUB 7940
750 '*******************************************************************
760 '    SET UP KLINGONS, BASES AND STARS IN THE CURRENT QUADRANT      *
770 '*******************************************************************
780 KLINGON = 0
790 BASES = 0
800 STARS = 0
810 'GOSUB 7860
820 D4 = .5*RND
830 Z(QUADRANT1,QUADRANT2) = GALAXY(QUADRANT1,QUADRANT2)
840 IF QUADRANT1 < 1 OR QUADRANT1 > 8 OR QUADRANT2 <1 OR QUADRANT2 >8 THEN GOTO 960
850 KLINGON = INT(GALAXY(QUADRANT1,QUADRANT2)100)
860 BASES = INT(GALAXY(QUADRANT1,QUADRANT2)10  10*KLINGON)
870 STARS = INT(GALAXY(QUADRANT1,QUADRANT2)  100*KLINGON  10*BASES)
880 IF KLINGON = 0 THEN GOTO 920
890 PRINT:PRINT TAB(10) COMBAT AREA CONDITION RED
900 IF SHIELDSTRENGTH > 200 THEN GOTO 920
910 PRINT TAB(10) CHR$(255)+AMSHIELDS DANGEROUSLY LOW+CHR$(255)+AA+CHR$(7)
920 FOR I = 1 TO 3
930 K(I,1) = 0
940 K(I,2) = 0
950 NEXT I
960 FOR I = 1 TO 3
970 K(I,3) = 0
980 NEXT I
990 Q$ = Z$ + Z$ + Z$ + Z$ + Z$ + Z$ + Z$ + Z$
1000 A$ = _^
1010 Z1 = SECTOR1
1020 Z2 = SECTOR2
1030 GOSUB 7490                    'PLACE AN OBJ IN QUAD
1040 IF KLINGON < 1 THEN GOTO 1160
1050 FOR I = 1 TO KLINGON
1060 GOSUB 7360                    'GEN RANDOM COORDS
1070 A$ = <_>
1080 Z1 = R1
1090 Z2 = R2
1100 GOSUB 7490                    'PLACE AN OBJ IN QUAD
1110 K(I,1) = R1
1120 K(I,2) = R2
1130 'GOSUB 7860
1140 K(I,3) = RND*400
1150 NEXT I
1160 IF BASES < 1 THEN GOTO 1240
1170 GOSUB 7360                    'GEN RANDOM COORDS
1180 A$ = +B+
1190 Z1 = R1
1200 B4 = R1
1210 Z2 = R2
1220 B5 = R2
1230 GOSUB 7490                    'PLACE AN OBJ IN QUAD
1240 FOR I = 1 TO STARS
1250 GOSUB 7360                    'GEN RANDOM COORDS
1260 A$ =  * 
1270 Z1 = R1
1280 Z2 = R2
1290 GOSUB 7490                    'PLACE AN OBJ IN QUAD
1300 NEXT I
1310 GOSUB 5670                    'SRS SCAN
1320 IF SHIELDSTRENGTH + TOTALENERGY > 10 THEN IF TOTALENERGY > 10 OR STATUS(7) = 0 THEN GOTO 1410
1330 PRINT TAB(10) CAPTAIN ;NA$;
1340 PRINT TAB(10) YOU'VE JUST STRANDED YOUR SHIP IN SPACE
1350 PRINT TAB(10) SHIELD CONTROL INCAPABLE OF CROSS  CIRCUITING TO ENGINE ROOM
1360 PRINT
1370 GOTO 5490
1380 '***************************************************************
1390 '                  INPUT THE COMMAND                           *
1400 '***************************************************************
1410 PRINT TAB(10) CHR$(255)+PFYOUR ORDERS, CAPTAIN ;NA$;
1420 INPUT A$
1430 FOR I = 1 TO 9
1440 IF LEFT$(A$,3) <> MID$(A1$,3*I  2,3) THEN GOTO 1460
1450 ON (I) GOTO 1610,1310,3140,3390,3850,4780,4930,6420,5530
1460 NEXT I
1470 PRINT TAB(10) THE COMMANDS ARE:
1480 PRINT TAB(10) CHR$(255)+ACNAV+CHR$(255)+AAIGATE
1490 PRINT TAB(10) CHR$(255)+ACSRS+CHR$(255)+AA SHORT RANGE SENSORS
1500 PRINT TAB(10) CHR$(255)+ACLRS+CHR$(255)+AA LONG RANGE SENSORS
1510 PRINT TAB(10) CHR$(255)+ACPHA+CHR$(255)+AASERS
1520 PRINT TAB(10) CHR$(255)+ACTOR+CHR$(255)+AAPEDOES
1530 PRINT TAB(10) CHR$(255)+ACSHI+CHR$(255)+AAELDS
1540 PRINT TAB(10) CHR$(255)+ACDAM+CHR$(255)+AAAGE CONTROL REPORT
1550 PRINT TAB(10) CHR$(255)+ACCOM+CHR$(255)+AAPUTER
1560 PRINT TAB(10) CHR$(255)+ACQUI+CHR$(255)+AAT:PRINT
1570 GOTO 1320
1580 '**************************************************************
1590 '                THE NAVIGATE COMMAND                         *
1600 '**************************************************************
1610 PRINT           COURSE (1  9) ;
1620 INPUT COURSE
1630 IF (COURSE = 9) THEN COURSE = 1
1640 IF (COURSE >= 1) AND (COURSE < 9) THEN 1670
1650 PRINT           LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR'
1660 GOTO 1320
1670 X$ = 8
1680 IF STATUS(1) < 0 THEN X$ = 0.2
1690 PRINT TAB(10) WARP FACTOR (0  ;X$;) ;
1700 INPUT WARPFACTOR                 
1710 PRINT
1720 IF STATUS(1) < 0 AND WARPFACTOR >.2 THEN GOTO 1770
1730 IF WARPFACTOR > 0 AND WARPFACTOR <= 8 THEN GOTO 1790
1740 IF WARPFACTOR = 0 THEN GOTO 1320
1750 PRINT TAB(10) CHIEF ENGINEER SCOTT REPORTS THE ENGINES WON'T TAKE WARP ;WARPFACTOR; '
1760 GOTO 1320
1770 PRINT TAB(10) WARP ENGINES ARE DAMAGED. MAXIMUM SPEED  = 0.2
1780 GOTO 1320
1790 WARPENERGY = WARPFACTOR*8
1800 IF (TOTALENERGY  WARPENERGY) >= 0 THEN GOTO 1850
1810 PRINT TAB(10) ENGINEERING REPORTS INSUFFICENT ENERGY AVAILABLE FOR MANEUVERING AT WARP ;WARPFACTOR; '
1820 IF SHIELDSTRENGTH < WARPENERGY  TOTALENERGY OR STATUS(7) <0 THEN GOTO 1320
1830 PRINT TAB(10) DEFLECTOR CONTROL ROOM ACKNOWLEDGES;SHIELDSTRENGTH;UNITS OF ENERGY DEPLOYED TO SHIELDS.:PRINT
1840 GOTO 1320
1850 FOR I = 1 TO KLINGON
1860 IF K(I,3) = 0 THEN GOTO 1960
1870 A$ =    
1880 Z1 = K(I,1)
1890 Z2 = K(I,2)
1900 GOSUB 7490                 'PLACE AN OBJ IN QUAD
1910 GOSUB 7360                 'GEN RANDOM C0ORDS
1920 K(I,1) = Z1
1930 K(I,2) = Z2
1940 A$ = <_>
1950 GOSUB 7490                 'PLACE AN OBJ IN QUAD
1960 NEXT I
1970 GOSUB 5260                 'KLINGON SHOOTS
1980 D6 = WARPFACTOR
1990 IF WARPFACTOR >= 1 THEN D6 = 1
2000 '******************************************
2010 '          MAKE REPAIRS TO SHIP           *
2020 '******************************************
2030 FOR DEVICE = 1 TO 8
2040 IF STATUS(DEVICE) >= 0 THEN GOTO 2110
2050 STATUS(DEVICE) = STATUS(DEVICE) + D6
2060 IF STATUS(DEVICE) < 0 GOTO 2110
2070 PRINT TAB(10) DAMAGE CONTROL REPORT: ;
2080 GOSUB 7570                 'GET DEV NAME
2090 PRINT DEVICENAME$;
2100 PRINT REPAIR COMPLETED
2110 NEXT DEVICE
2120 'GOSUB 7860
2130 IF (RND) > .2 THEN GOTO 2280
2140 DEVICE = INT((RND)*10)
2150 IF DEVICE > 8 OR DEVICE <= 0 GOTO 2140
2160 IF (RND)*10 >= 6 THEN GOTO 2220
2170 STATUS(DEVICE) = STATUS(DEVICE)  ((RND)*5)
2180 PRINT TAB(10) DAMAGE CONTROL REPORT: ;
2190 GOSUB 7570                 'GET DEV NAME
2200 PRINT DEVICENAME$; DAMAGED:PRINT
2210 GOTO 2280
2220 STATUS(DEVICE) = STATUS(DEVICE) + ((RND)*3)
2230 PRINT TAB(10) DAMAGE CONTROL REPORT: ;
2240 GOSUB 7570                  'GET DEV NAME
2250 PRINT DEVICENAME$;
2260 PRINT STATE OF REPAIR IMPROVED.
2270 PRINT
2280 A$ =    
2290 Z1 = SECTOR1
2300 Z2 = SECTOR2
2310 GOSUB 7490                  'PLACE AND OBJ IN QUAD
2320 RADIANS = .01745
2330 IF (COURSE >= 0) AND (COURSE < 3) THEN TRACK=(COURSE1)*45:GOTO 2380
2340 IF (COURSE >= 3) AND (COURSE < 5) THEN TRACK=(COURSE3)*45:GOTO 2410
2350 IF (COURSE >= 5) AND (COURSE < 7) THEN TRACK=(COURSE5)*45:GOTO 2440
2360 IF (COURSE >= 7) AND (COURSE < 9) THEN TRACK=(COURSE7)*45:GOTO 2470
2370 GOTO 1650
2380 X1 = (SIN(TRACK*RADIANS))
2390 X2 = COS(TRACK*RADIANS)
2400 GOTO 2490
2410 X1 = (COS(TRACK*RADIANS))
2420 X2 = (SIN(TRACK*RADIANS))
2430 GOTO 2490
2440 X1 = SIN(TRACK*RADIANS)
2450 X2 = (COS(TRACK*RADIANS))
2460 GOTO 2490
2470 X1 = COS(TRACK*RADIANS)
2480 X2 = SIN(TRACK*RADIANS)
2490 X = SECTOR1
2500 Y = SECTOR2
2510 NEWSECTOR1 = SECTOR1
2520 NEWSECTOR2 = SECTOR2
2530 Q4 = QUADRANT1
2540 Q5 = QUADRANT2
2550 FOR I = 1 TO WARPENERGY
2560 NEWSECTOR1 = NEWSECTOR1 + X1
2570 NEWSECTOR2 = NEWSECTOR2 + X2
2580 SECTOR1 = INT(NEWSECTOR1 + .5)
2590 SECTOR2 = INT(NEWSECTOR2 + .5)
2600 IF (SECTOR1 < 1) OR (SECTOR1 >= 9) OR (SECTOR2 < 1) OR (SECTOR2 >= 9) THEN GOTO 2790
2610 S8 = INT(SECTOR1*24 + SECTOR2*3  26)
2620 IF MID$(Q$,S8,3) =     THEN GOTO 2680
2630 SECTOR1 = NEWSECTOR1  X1
2640 SECTOR2 = NEWSECTOR2  X2
2650 SECTOR1 = INT(SECTOR1 + .5)
2660 SECTOR2 = INT(SECTOR2 + .5)
2670 PRINT TAB(10) WARP ENGINES SHUT DOWN AT SECTOR;SECTOR1;,;SECTOR2;DUE TO BAD NAVIGATION.:GOTO 2690
2680 NEXT I
2690 A$ = _^
2700 Z1 = SECTOR1
2710 Z2 = SECTOR2
2720 GOSUB 7490                   'PLACE AN OBJ IN QUAD
2730 GOSUB 3040                   'UPDATE ENGY
2740 T8 = 1
2750 IF WARPFACTOR <1 THEN T8 = .1*INT(10*WARPFACTOR)
2760 STARDATE = STARDATE + T8
2770 IF STARDATE > (T0 + T9) THEN GOTO 5490
2780 GOTO 1310
2790 X = 8*QUADRANT1 + X + WARPENERGY*X1
2800 Y = 8*QUADRANT2 + Y + WARPENERGY*X2
2810 QUADRANT1 = INT(X8)
2820 QUADRANT2 = INT(Y8)
2830 SECTOR1 = INT(X  QUADRANT1*8)
2840 SECTOR2 = INT(Y  QUADRANT2*8)
2850 NEUTRALZONE = 0
2860 IF SECTOR1 = 0 THEN QUADRANT1 = QUADRANT1  1:SECTOR1 = 8
2870 IF SECTOR2 = 0 THEN QUADRANT2 = QUADRANT2  1:SECTOR2 = 8
2880 IF QUADRANT1 < 1 THEN NEUTRALZONE = 1: QUADRANT1 = 1:SECTOR1 = 1
2890 IF QUADRANT1 > 8 THEN NEUTRALZONE = 1: QUADRANT1 = 8:SECTOR1 = 8
2900 IF QUADRANT2 < 1 THEN NEUTRALZONE = 1: QUADRANT2 = 1:SECTOR2 = 1
2910 IF QUADRANT2 > 8 THEN NEUTRALZONE = 1: QUADRANT2 = 8:SECTOR2 = 8
2920 IF NEUTRALZONE = 0 THEN GOTO 2970
2930 PRINT TAB(10)  PERMISSION TO CROSS PERIMETER *DENIED*. SHUT DOWN ENGINES.
2940 PRINT TAB(10) 'WARP ENGINES SHUT DOWN AT SECTOR;SECTOR1;,;SECTOR2;
2950 PRINT OF QUAD.;QUADRANT1;,; QUADRANT2;':PRINT
2960 IF STARDATE >(T0 + T9) THEN GOTO 5490
2970 IF (8*QUADRANT1 + QUADRANT2) = (8*Q4 + Q5) THEN GOTO 2690
2980 STARDATE = STARDATE + 1
2990 GOSUB 3040               'UPDATE ENGY
3000 GOTO 780
3010 '******************************************************************
3020 '     SUBROUTINE  UPDATE TOTAL ENERGY USED BY MANUVER            *
3030 '******************************************************************
3040 TOTALENERGY = TOTALENERGY  WARPENERGY  10
3050 IF TOTALENERGY >= 0 THEN RETURN
3060 PRINT TAB(10) SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER.:PRINT
3070 SHIELDSTRENGTH = SHIELDSTRENGTH + TOTALENERGY
3080 TOTALENERGY = 0
3090 IF SHIELDSTRENGTH <= 0 THEN SHIELDSTRENGTH = 0
3100 RETURN
3110 '******************************************************************
3120 '                  LONG RANGE SENSOR COMMAND                      *
3130 '******************************************************************
3140 IF STATUS(3)<0 THEN PRINT TAB(10) LONG RANGE SENSORS INOPERABLE:GOTO 1320
3150 PRINT CHR$(12)
3160 PRINT TAB(10) LONG RANGE SENSOR SCAN FOR QUAD.;QUADRANT1;,;QUADRANT2
3170 O1$ = 
3180 PRINT TAB(10) O1$
3190 FOR I = QUADRANT1  1 TO QUADRANT1 + 1
3200 N(1) = 1
3210 N(2) = 2
3220 N(3) = 3
3230 FOR J = QUADRANT2  1 TO QUADRANT2 + 1
3240 IF I > 0 AND I < 9 AND J > 0 AND J < 9 THEN N(J  QUADRANT2 + 2) = GALAXY(I,J):Z(I,J) = GALAXY(I,J)
3250 NEXT J
3260 PRINT TAB(10) : ;
3270 FOR L = 1 TO 3
3280 IF N(L) < 0 THEN PRINT*** ;:GOTO 3300
3290 PRINT RIGHT$(STR$(N(L) + 1000),3); ;
3300 PRINT : ;
3310 NEXT L
3320 PRINT TAB(10) O1$
3330 NEXT I
3340 PRINT CHR$(255)+PN
3350 GOTO 1310
3360 '********************************************************************
3370 '                       PHASER COMMAND                              *
3380 '********************************************************************
3390 PRINT
3400 IF STATUS(4) < 0 THEN PRINT TAB(10) PHASERS INOPERATIVE:GOTO 1320
3410 IF KLINGON > 0 THEN GOTO 3440
3420 PRINT TAB(10) 'SENSORS SHOW NO ENEMY SHIPS IN THIS QUADRANT'
3430 GOTO 1320
3440 IF STATUS(8) < 0 THEN PRINT TAB(10) COMPUTER FAILURE HAMPERS ACCURACY. PHASERS LOCKED ON TARGET.
3450 PRINT TAB(10) ENERGY AVAILABLE = ;TOTALENERGY;UNITS.
3460 PRINT TAB(10) PHASERS LOCKED ON TARGET
3470 PRINT TAB(10) NUMBER OF UNITS TO FIRE ;
3480 INPUT PHASERPOWER
3490 IF PHASERPOWER <= 0 THEN GOTO 1320
3500 IF TOTALENERGY  PHASERPOWER < 0 THEN GOTO 3450
3510 TOTALENERGY = TOTALENERGY  PHASERPOWER
3520 'GOSUB 7860
3530 IF STATUS(7) < 0 THEN PHASERPOWER = PHASERPOWER*RND
3540 H1 = INT(PHASERPOWERKLINGON)
3550 FOR I = 1 TO 3
3560 IF K(I,3) <= 0 THEN GOTO 3790
3570 JH = SQR(ABS(K(I,1)  SECTOR1)^2 + ABS(K(I,2)  SECTOR2)^2)
3580 H = INT((H1JH)*(RND + 2))
3590 IF H > PHASERPOWER THEN H = PHASERPOWER
3600 IF H >.15*K(I,3) THEN GOTO 3630
3610 PRINT:PRINT TAB(10) SENSORS SHOW NO DAMAGE TO ENEMY AT;K(I,1);,;K(I,2)
3620 GOTO 3790
3630 K(I,3) = K(I,3)  H
3640 PRINT:PRINT TAB(10) H;UNIT HIT ON KLINGON AT;
3650 PRINT SECTOR;K(I,1);,;K(I,2);
3660 IF K(I,3) <= 0 THEN PRINT***KLINGON DESTROYED***:PRINT:GOTO 3690
3670 PRINT TAB(10) (SENSORS SHOW;K(I,3);UNITS REMAINING IN THE KLINGON'S SHIELDS):PRINT
3680 GOTO 3790
3690 KLINGON = KLINGON  1
3700 TOTALKLINGONS = TOTALKLINGONS  1
3710 Z1 = K(I,1)
3720 Z2 = K(I,2)
3730 A$ =    
3740 GOSUB 7490               'PLACE AN OBJ IN QUAD
3750 K(I,3) = 0
3760 GALAXY(QUADRANT1,QUADRANT2) = GALAXY(QUADRANT1,QUADRANT2)  100
3770 Z(QUADRANT1,QUADRANT2) = GALAXY(QUADRANT1,QUADRANT2)
3780 IF TOTALKLINGONS <= 0 THEN GOTO 5610
3790 NEXT I
3800 GOSUB 5260               'KLINGON SHOOTS
3810 GOTO 1320
3820 '********************************************************************
3830 '               PHOTON TORPEDO COMMAND                              *
3840 '********************************************************************
3850 PRINT
3860 IF PHOTONTORP = 0 THEN PRINT TAB(10) ALL PHOTON TORPEDOES EXPENDED:GOTO 1320
3870 IF STATUS(5) <0 THEN PRINT TAB(10) PHOTON TUBES ARE NOT OPERATIONAL:GOTO 1320
3880 PRINT           PHOTON TORPEDO COURSE (1  9) ;
3890 INPUT COURSE
3900 IF COURSE = 9 THEN COURSE = 1
3910 IF (COURSE >= 1) AND (COURSE < 9) THEN GOTO 3940
3920 PRINT           ENSIGN CHEKOV REPORTS INCORRECT COURSE DATA, SIR':PRINT
3930 GOTO 1320
3940 RADIANS = .01745
3950 IF COURSE >= 0 AND COURSE < 3 THEN TRACK=(COURSE1)*45:GOTO 4000
3960 IF COURSE >= 3 AND COURSE < 5 THEN TRACK=(COURSE3)*45:GOTO 4030
3970 IF COURSE >= 5 AND COURSE < 7 THEN TRACK=(COURSE5)*45:GOTO 4060
3980 IF COURSE >= 7 AND COURSE < 9 THEN TRACK=(COURSE7)*45:GOTO 4090
3990 GOTO 3920
4000 X1 = (SIN(TRACK*RADIANS))
4010 X2 = COS(TRACK*RADIANS)
4020 GOTO 4110
4030 X1 = (COS(TRACK*RADIANS))
4040 X2 = (SIN(TRACK*RADIANS))
4050 GOTO 4110
4060 X1 = SIN(TRACK*RADIANS)
4070 X2 = (COS(TRACK*RADIANS))
4080 GOTO 4110
4090 X1 = COS(TRACK*RADIANS)
4100 X2 = SIN(TRACK*RADIANS)
4110 TOTALENERGY = TOTALENERGY  2
4120 PHOTONTORP = PHOTONTORP  1
4130 X = SECTOR1
4140 Y = SECTOR2
4150 X = X + X1
4160 Y = Y + X2
4170 X3=INT(X+.5)
4180 Y3=INT(Y+.5)
4190 IF X3 < 1 OR X3 > 8 OR Y3 < 1 OR Y3 > 8 THEN GOTO 4710
4200 PRINT:PRINT TAB(10) TRACKING TORPEDO: ;X3;,;Y3;
4210 FOR LOOP = 1 TO 3
4220 IF X3 = K(LOOP,1) AND Y3 = K(LOOP,2) THEN GOTO 4340
4230 NEXT LOOP
4240 A$ =    
4250 Z1 = X
4260 Z2 = Y
4270 GOSUB 7770                 'LOOK IN SECTOR
4280 IF OBJECTFOUND <> 0 THEN GOTO 4150
4290 A$ = <_>
4300 Z1 = X3
4310 Z2 = Y3
4320 GOSUB 7770                 'LOOK IN SECTOR
4330 IF OBJECTFOUND = 0 THEN GOTO 4440
4340 PRINT***KLINGON DESTROYED***:PRINT
4350 KLINGON = KLINGON  1
4360 TOTALKLINGONS = TOTALKLINGONS  1
4370 IF TOTALKLINGONS <= 0 THEN GOTO 5610
4380 FOR I = 1 TO 3
4390 IF X3 = K(I,1) AND Y3 = K(I,2) THEN GOTO 4420
4400 NEXT I
4410 I = 3
4420 K(I,3) = 0:K(I,1) = 0: K(I,2) = 0
4430 GOTO 4630
4440 A$ =  * 
4450 Z1 = X3
4460 Z2 = Y3
4470 GOSUB 7770                  'LOOK IN SECTOR
4480 IF OBJECTFOUND = 0 THEN GOTO 4520
4490 PRINTSTAR AT;X3;,;Y3;ABSORBED TORPEDO ENERGY.:PRINT
4500 GOSUB 5260                  'KLINGON SHOOTS
4510 GOTO 1320
4520 A$ = +B+
4530 Z1 = X3
4540 Z2 = Y3
4550 GOSUB 7770                  'LOOK IN SECT
4560 IF OBJECTFOUND = 0 THEN GOTO 4710
4570 PRINT***STARBASE DESTROYED***:BASES = BASES  1
4580 TOTALBASES = TOTALBASES  1
4590 IF TOTALBASES >0 OR TOTALKLINGONS >(STARDATE  T0  T9) THEN GOTO 4610
4600 GOTO 5530
4610 PRINT TAB(10) STARFLEET REVIEWING YOUR RECORD TO CONSIDER COURT MARTIAL
4620 D0 = 0
4630 Z1 = X3
4640 Z2 = Y3
4650 A$ =    
4660 GOSUB 7490                   'PLACE AN OBJ IN QUAD
4670 GALAXY(QUADRANT1,QUADRANT2) = KLINGON*100 + BASES*10 + STARS
4680 Z(QUADRANT1,QUADRANT2) = GALAXY(QUADRANT1,QUADRANT2)
4690 GOSUB 5260                   'KLINGON SHOOTS
4700 GOTO 1320
4710 IF X3 < 1 OR X3 > 8 OR Y3 < 1 OR Y3 > 8 THEN GOTO 4720 ELSE GOTO 4150
4720 PRINT TORPEDO MISSED:PRINT
4730 GOSUB 5260                   'KLINGON SHOOTS
4740 GOTO 1320
4750 '********************************************************************
4760 '                   SHIELD COMMAND                                  *
4770 '********************************************************************
4780 IF STATUS(7) <0 THEN PRINT:PRINT TAB(10) SHIELD CONTROL INOPERABLE:GOTO 1320
4790 PRINT:PRINT TAB(10) NUMBER OF UNITS TO SHIELDS;
4800 INPUT SHIELDPOWER
4810 IF SHIELDPOWER <= (TOTALENERGY + SHIELDSTRENGTH) THEN GOTO 4850
4820 IF SHIELDPOWER = 0 THEN PRINT TAB(10) (SHIELDS UNCHANGED):GOTO 1320
4830 PRINT TAB(10) (SHIELDS UNCHANGED)
4840 PRINT:GOTO 1320
4850 TOTALENERGY = (TOTALENERGY + SHIELDSTRENGTH) SHIELDPOWER
4860 SHIELDSTRENGTH = SHIELDPOWER
4870 PRINT TAB(10) DEFLECTOR CONTROL ROOM REPORT: 
4880 PRINT TAB(10) 'SHIELDS NOW AT;SHIELDSTRENGTH;UNITS PER YOUR COMMAND.'
4890 PRINT:GOTO 1320
4900 '*******************************************************************
4910 '                 DAMAGE CONTROL COMMAND                           *
4920 '*******************************************************************
4930 IF STATUS(6) >= 0 THEN GOTO 5130
4940 PRINT:PRINT TAB(10) DAMAGE CONTROL REPORT NOT AVAILABLE
4950 IF D0 = 0 THEN GOTO 1320
4960 D3 = 0
4970 FOR I = 1 TO 8
4980 IF STATUS(I)<0 THEN D3 = D3 + .1
4990 NEXT I
5000 IF D3 = 0 THEN GOTO 1320
5010 PRINT
5020 D3 = D3 + D4
5030 IF D3 >= 1 THEN D3 = .9
5040 PRINT:PRINT TAB(10) Technicians standing by to effect repairs to your ship;
5050 PRINT USING           Estimated time to repair: . Star days;D3
5060 PRINT TAB(10) WILL YOU AUTHORIZE THE REPAIR ORDER (YN);
5070 INPUT A$
5080 IF A$ <> Y THEN GOTO 1320
5090 FOR I = 1 TO 8
5100 IF STATUS(I)<0 THEN STATUS(I) = 0
5110 NEXT I
5120 STARDATE = STARDATE + D3 + .1
5130 PRINT:PRINT TAB(10) DEVICE STATE OF REPAIR
5140 PRINT TAB(10) 
5150 FOR DEVICE = 1 TO 8
5160 GOSUB 7570                  'GET DEV NAME
5170 PRINT TAB(10) DEVICENAME$;LEFT$(Z$,25  LEN(DEVICENAME$));
5180 PRINT USING .;STATUS(DEVICE)
5190 NEXT DEVICE
5200 PRINT
5210 IF D0 <> 0 THEN GOTO 4960
5220 GOTO 1320
5230 '*********************************************************************
5240 '     SUBROUTINE  KLINGONS SHOOT AT ENTERPRISE                      *
5250 '*********************************************************************
5260 IF KLINGON <= 0 THEN RETURN
5270 IF D0 <> 0 THEN PRINT TAB(10) STARBASE SHIELDS PROTECT THE ENTERPRISE:RETURN
5280 FOR I = 1 TO 3
5290 IF K(I,3) <= 0 THEN GOTO 5470
5300 JH = SQR((K(I,1)  SECTOR1)^2 + (K(I,2)  SECTOR2)^2)
5310 'GOSUB 7860
5320 H = INT((K(I,3)JH)*(2 + RND))
5330 SHIELDSTRENGTH = SHIELDSTRENGTH  H
5340 K(I,3) = K(I,3)  INT(K(I,3)*.1)
5350 IF K(I,3) <= 0 THEN K(I,3) = 5
5360 PRINT:PRINT TAB(10) H;UNIT HIT ON SHIELDS FROM SECTOR;K(I,1);,;K(I,2):PRINT
5370 IF SHIELDSTRENGTH <= 0 THEN GOTO 5510
5380 IF SHIELDSTRENGTH < 200 THEN PRINT TAB(10) CHR$(255)+AM(SHIELDS DOWN TO ;SHIELDSTRENGTH;UNITS)+CHR$(255)+AA
5390 IF H < 20 THEN GOTO 5470
5400 IF RND > .6 OR HSHIELDSTRENGTH <= .02 THEN GOTO 5470
5410 DEVICE = RND*10
5420 IF DEVICE > 8 OR DEVICE < 1 GOTO 5410
5430 STATUS(DEVICE) = INT(STATUS(DEVICE)  HSHIELDSTRENGTH  .5*RND)
5440 GOSUB 7570               'GET DEV NAME
5450 PRINT TAB(10) DAMAGE CONTROL REPORTS ';DEVICENAME$;
5460 PRINT  DAMAGED BY THE HIT
5470 NEXT I
5480 RETURN
5490 PRINT USING           IT IS STARDATE .;STARDATE
5500 GOTO 5530
5510 PRINT:PRINT TAB(10) THE ENTERPRISE HAS BEEN DESTROYED.
5520 GOTO 5490
5530 PRINT TAB(10) THERE WERE;TOTALKLINGONS;KLINGON BATTLE CRUISERS LEFT AT THE END OF YOUR MISSION.
5540 PRINT:PRINT
5550 IF TOTALBASES = 0 THEN GOTO 5570
5560 PRINT TAB(10) WANT TO TRY AGAIN;
5570 INPUT U1$
5580 IF LEFT$(U1$,1) = Y THEN GOTO 70 ELSE SYSTEM
5590 STARDATE = 100
5600 TOTALBASES = 1
5610 PRINT TAB(10) CONGRATULATIONS CAPTAIN ;NA$; YOU HAVE DEFEATED THE KLINGON EMPIRE 
5620 PRINT USING           YOUR EFFICIENCY RATING IS .;1000*((MAXKLINGONS(STARDATE  T0))*(MAXKLINGONS(STARDATE  T0)))
5630 GOTO 5540
5640 '****************************************************************
5650 '  CHECK FOR DOCKING WITH A STAR BASE AND DO A SHORT RANGE SCAN *
5660 '**************************************************************** 
5670 FOR I = SECTOR1  1 TO SECTOR1 + 1
5680 FOR J = SECTOR2  1 TO SECTOR2 + 1
5690 IF I < 1 OR I > 8 OR J < 1 OR J > 8 THEN GOTO 5750
5700 A$ = +B+
5710 Z1 = I
5720 Z2 = J
5730 GOSUB 7770                'LOOK IN SECT
5740 IF OBJECTFOUND = 1 THEN GOTO 5790
5750 NEXT J
5760 NEXT I
5770 D0 = 0
5780 GOTO 5860
5790 D0 = 1
5800 C$ =  DOCKED
5810 TOTALENERGY = E0
5820 PHOTONTORP = P0
5830 PRINT TAB(10) SHIELDS DROPPED FOR DOCKING
5840 SHIELDSTRENGTH = 0
5850 GOTO 5890
5860 IF KLINGON >0 THEN C$ = CHR$(255)+AI**RED**+CHR$(255)+AA:GOTO 5890
5870 C$ =   GREEN
5880 IF TOTALENERGY < 1000 THEN C$ =  YELLOW
5890 IF STATUS(2) >= 0 THEN GOTO 5940
5900 PRINT
5910 PRINT TAB(10) **SHORT RANGE SENSORS ARE OUT**
5920 PRINT
5930 RETURN
5940 O1$ =  12345678
5950 PRINT TAB(10) O1$
5960 PRINT TAB(10) 1;
5970 FOR I = 1 TO 22 STEP 3
5980 PRINT MID$(Q$,I,3);
5990 NEXT I
6000 PRINT USING      STARDATE         .;STARDATE
6010 PRINT TAB(10) 2;
6020 FOR I = 25 TO 46 STEP 3
6030 PRINT MID$(Q$,I,3);
6040 NEXT I
6050 PRINT TAB(40)CONDITION       ;C$
6060 PRINT TAB(10) 3;
6070 FOR I = 49 TO 70 STEP 3
6080 PRINT MID$(Q$,I,3);
6090 NEXT I
6100 PRINT TAB(40)QUADRANT         ;QUADRANT1;,;QUADRANT2
6110 PRINT TAB(10) 4;
6120 FOR I = 73 TO 94 STEP 3
6130 PRINT MID$(Q$,I,3);
6140 NEXT I
6150 PRINT TAB(40)SECTOR           ;SECTOR1;,;SECTOR2
6160 PRINT TAB(10) 5;
6170 FOR I = 97 TO 118 STEP 3
6180 PRINT MID$(Q$,I,3);
6190 NEXT I
6200 PRINT USING      TOTAL ENERGY       ;INT(TOTALENERGY)
6210 PRINT TAB(10) 6;
6220 FOR I = 121 TO 142 STEP 3
6230 PRINT MID$(Q$,I,3);
6240 NEXT I
6250 PRINT USING      PHOTON TORPEDOS    ;PHOTONTORP
6260 PRINT TAB(10) 7;
6270 FOR I = 145 TO 166 STEP 3
6280 PRINT MID$(Q$,I,3);
6290 NEXT I
6300 PRINT USING      SHIELD STRENGTH    ;SHIELDSTRENGTH
6310 PRINT TAB(10) 8;
6320 FOR I = 169 TO 190 STEP 3
6330 PRINT MID$(Q$,I,3);
6340 NEXT I
6350 PRINT USING      KLINGONS REMAINING ;TOTALKLINGONS
6360 PRINT TAB(10) O1$
6370 PRINT
6380 RETURN
6390 '*****************************************************************
6400 '                   COMPUTER COMMAND                             *
6410 '*****************************************************************
6420 IF STATUS(8) < 0 THEN PRINT TAB(10) COMPUTER DISABLED:GOTO 1320
6430 PRINT TAB(10) COMPUTER ACTIVE  AWAITING COMMAND;
6440 INPUT A:PRINT
6450 IF A < 0 OR A > 4 THEN GOTO 6480
6460 H8 = 1
6470 ON A + 1 GOTO 6540,6730,6840,7300,6990
6480 PRINT TAB(10) FUNCTIONS AVAILABLE FROM COMPUTER = 0  4
6490 PRINT
6500 GOTO 6430
6510 '*****************************************************************
6520 '         COMPUTER SUBCOMMAND 0  PRINT OUT OF GALAXY           *
6530 '*****************************************************************
6540 H8 = O:PRINT CHR$(12)
6550 PRINT TAB(10)                       THE GALAXY
6560 PRINT TAB(10)     COMPUTER SUMMARY OF ALL LONG RANGE SENSOR SCANS.:PRINT
6570 PRINT TAB(10)       1     2     3     4     5     6     7     8
6580 PRINT TAB(10)    
6590 FOR I = 1 TO 8
6600 PRINT USING             ;I;
6610 FOR J = 1 TO 8
6620 PRINT USING :  ;Z(I,J);
6630 NEXT J
6640 PRINT :
6650 PRINT TAB(10)    
6660 NEXT I
6670 PRINT:PRINT TAB(15) YOU ARE CURRENTLY IN QUADRANT ;QUADRANT1;,;QUADRANT2
6680 PRINT
6690 GOTO 1320
6700 '****************************************************************
6710 '         COMPUTER SUBCOMMAND 1  STATUS REPORT                *
6720 '****************************************************************
6730 PRINT:PRINT TAB(10) STATUS REPORT::PRINT
6740 PRINT USING           STAR DAYS LEFT  : .;T9(STARDATET0)
6750 PRINT USING           KLINGONS LEFT   : ;TOTALKLINGONS
6760 IF TOTALBASES < 1 THEN GOTO 6790
6770 PRINT USING           STAR BASES LEFT : ;TOTALBASES
6780 GOTO 4930
6790 PRINT TAB(10) CAPTAIN;NA$;YOU HAVE NO STARBASES LEFT
6800 GOTO 4930
6810 '****************************************************************
6820 '         COMPUTER SUBCOMMAND 2  KLINGON LOCATOR              *
6830 '****************************************************************
6840 IF KLINGON <= 0 THEN GOTO 3420
6850 X$ = 
6860 IF KLINGON >1 THEN X$ = S
6870 PRINT TAB(10) FROM ENTERPRISE TO KLINGON;X$
6880 H8 = 0
6890 FOR I = 1 TO 3
6900 IF K(I,3) <= 0 THEN GOTO 7250
6910 WARPFACTOR = K(I,1)
6920 X = K(I,2)
6930 COURSE = SECTOR1
6940 A = SECTOR2
6950 GOTO 7050
6960 '****************************************************************
6970 '   COMPUTER SUBCOMMAND 4  DIRECTION  DISTANCE CALCULATOR    *
6980 '****************************************************************
6990 PRINT TAB(10) DIRECTIONDISTANCE CALCULATOR:
7000 PRINT TAB(10) YOU ARE IN QUADRANT ;QUADRANT1;,;QUADRANT2;SECTOR SECTOR1;,;SECTOR2
7010 PRINT TAB(10) PLEASE ENTER YOUR DESTINATION COORDINATES (X,Y);
7020 INPUT WARPFACTOR,X
7030 COURSE = QUADRANT1
7040 A = QUADRANT2
7050 X = X  A
7060 A = COURSE  WARPFACTOR
7070 IF X < 0 THEN GOTO 7150
7080 IF A < 0 THEN GOTO 7170
7090 IF X > 0 THEN GOTO 7110
7100 IF A = 0 THEN COURSE = 5:GOTO 7120
7110 COURSE = 1
7120 IF ABS(A) <= ABS(X) THEN GOTO 7140
7130 PRINT USING           DIRECTION = .; COURSE+(((ABS(A)ABS(X))+ABS(A))ABS(A));:GOTO 7210
7140 PRINT USING           DIRECTION = .; COURSE + (ABS(A)(ABS(X) + .001));:GOTO 7210
7150 IF A > 0 THEN COURSE = 3:GOTO 7180
7160 IF X <> 0 THEN COURSE = 5:GOTO 7120
7170 COURSE = 7
7180 IF ABS(A) >= ABS(X) THEN GOTO 7200
7190 PRINT USING           DIRECTION = .;COURSE+(((ABS(X)ABS(A)) + ABS(X))ABS(X));:GOTO 7210
7200 PRINT USING           DIRECTION = .;COURSE + (ABS(X)ABS(A));
7210 PRINT  DISTANCE = ;
7220 IF (WARPFACTOR)=(B4) THEN PRINT USING .;SQR(X^2 + A^2)10:GOTO 7240
7230 PRINT USING .;SQR(X^2 + A^2)
7240 IF H8 = 1 THEN GOTO 1320
7250 NEXT I
7260 GOTO 1320
7270 '******************************************************************
7280 '        COMPUTER SUBCOMMAND 3  STAR BASE LOCATOR               *
7290 '******************************************************************
7300 IF BASES <> 0 THEN PRINT TAB(10) FROM ENTERPRISE TO STARBASE: :WARPFACTOR = B4:X = B5:GOTO 6930
7310 PRINT TAB(10) MR. SPOCK REPORTS SENSORS SHOW NO STARBASES IN THIS QUADRANT'
7320 GOTO 1320
7330 '*******************************************************************
7340 '         SUBROUTINE TO GENERATE RANDOM COORDINATES              *
7350 '******************************************************************
7360 'GOSUB 7860
7370 R1 = RND*10
7380 IF R1 > 8 OR R1 = 0 GOTO 7360
7390 R2 = RND*10
7400 IF R2 > 8 OR R2 = 0 GOTO 7360
7410 A$ =    
7420 Z1 = R1
7430 Z2 = R2
7440 GOSUB 7770              'LOOK IN SECT
7450 IF OBJECTFOUND = 1 THEN RETURN ELSE GOTO 7370
7460 '*********************************************************************
7470 '          SUBROUTINE TO PLACE AND OBJECT IN THE QUADRANT            *
7480 '*********************************************************************
7490 S8 = INT((Z2  1)*3 + (Z1  1)*24 + 1)
7500 IF S8 <= 1 THEN Q$ = A$ + RIGHT$(Q$,189): RETURN
7510 IF S8 >= 190 THEN Q$ = LEFT$(Q$,189) + A$: RETURN
7520 Q$ = LEFT$(Q$,S8  1) + A$ + RIGHT$(Q$,190  S8)
7530 RETURN
7540 '*********************************************************************
7550 '          SUBROUTINE TO IDENTIFY A DEVICE BY NAME                   *
7560 '*********************************************************************
7570 ON DEVICE GOTO 7580,7600,7620,7640,7660,7680,7700,7720
7580 DEVICENAME$ = WARP ENGINES
7590 RETURN
7600 DEVICENAME$ = SHORT RANGE SENSORS
7610 RETURN
7620 DEVICENAME$ = LONG RANGE SENSORS
7630 RETURN
7640 DEVICENAME$ = PHASER CONTROL
7650 RETURN
7660 DEVICENAME$ = PHOTON TUBES
7670 RETURN
7680 DEVICENAME$ = DAMAGE CONTROL
7690 RETURN
7700 DEVICENAME$ = SHIELD CONTROL
7710 RETURN
7720 DEVICENAME$ = LIBRARYCOMPUTER
7730 RETURN
7740 '******************************************************************
7750 '      SUBROUTINE TO SEE WHAT IS IN A SECTOR (A$ = SEARCH ITEM)   *
7760 '******************************************************************
7770 S8 = INT(Z1*24+Z2*326)
7780 OBJECTFOUND = 0
7790 IF S8 < 0 THEN S8 = 1
7800 IF MID$(Q$,S8,3) <> A$ THEN RETURN
7810 OBJECTFOUND = 1
7820 RETURN
7830 '********************************************************************
7840 '         GET THE TIME TO SEED RANDOM NUMBER GENERATOR              *
7850 '********************************************************************
7860 RA=PEEK(W,MAKEPOINTER(576,0))
7870 SA=PEEK(W,MAKEPOINTER(578,0))
7880 A=PEEK(W,MAKEPOINTER(RA,SA))
7890 RANDOMIZE (A)
7900 RETURN
7910 '********************************************************************
7920 '                  SUBROUTINE  INSTRUCTIONS                        *
7930 '********************************************************************
7940 PRINT CHR$(12);CHR$(255)+PN
7950 PRINT    THE GALAXY IS DIVIDED INTO 64 QUADRANTS WITH THE FOLLOWING COORDINATES:PRINT
7960 PRINT      1    2    3    4    5    6    7    8
7970 PRINT   
7980 FOR I=1 TO 8
7990 PRINT I;:    :    :    :    :    :    :    :    
8000 PRINT   
8010 NEXT I
8020 PRINT
8030 PRINTEACH QUADRANT IS SIMILARLY DIVIDED INTO 64 SECTORS.
8040 PRINTYOU WILL BE ASSIGNED A STARTING POINT SOMEWHERE IN THE GALAXY TO BEGIN
8050 PRINT YOUR TOUR OF DUTY AS COMMANDER OF THE STARSHIP ENTERPRISE, YOUR MISSION:
8060 PRINT TO SEEK AND DESTROY THE FLEET OF KLINGON WARSHIPS WHICH ARE INVADING
8070 PRINT THE UNITED FEDERATION OF PLANETS.
8080 PRINT CHR$(12)
8090 PRINT YOU HAVE THE FOLLOWING COMMANDS AVAILABLE TO YOU AS STARSHIP CAPTAIN
8100 PRINT
8110 PRINT  NAVIGATE COMMAND = WARP ENGINE CONTROL
8120 PRINT  
8130 PRINT   COURSE IS A CIRCULAR NUMERICAL                  3
8140 PRINT   VECTOR ASSIGNMENT AS SHOWN                   4  :  2
8150 PRINT   INTEGER AND REAL VALUES MAY BE                 \:
8160 PRINT   USED. (THUS, COURSE 1.5 IS HALF            5*1
8170 PRINT   WAY BETWEEN 1 AND 2 )                          :\
8180 PRINT             6  :  8
8190 PRINT   ONE WARP FACTOR IS THE SIZE OF                  7
8200 PRINT   ONE QUADRANT. THEREFORE, TO GET
8210 PRINT   FROM QUADRANT 6,5 TO 5,5 YOU WOULD
8220 PRINT   USE COURSE 3, WARP FACTOR 1.
8230 PRINT CHR$(12)
8240 PRINT  SRS COMMAND = SHORT RANGE SENSOR SCAN
8250 PRINT  
8260 PRINT 
8270 PRINT    SHOWS YOU A SCAN OF YOUR PRESENT QUADRANT.
8280 PRINT 
8290 PRINT      _^ = YOUR SHIPS POSITION:PRINT
8300 PRINT      <_> = KLINGON BATTLE CRUISER:PRINT
8310 PRINT      +B+ = STARBASE (REFUEL,REPAIR,REARM HERE ):PRINT
8320 PRINT       *  = STAR:PRINT
8330 PRINT   A CONDENSED STATUS REPORT WILL ALSO BE PRESENTED
8340 PRINT CHR$(12)
8350 PRINT  LRS COMMAND =  LONG RANGE SENSOR SCAN
8360 PRINT  
8370 PRINT
8380 PRINT    SHOWS THE CONDITIONS IN SPACE FOR ONE QUADRANT ON EACH SIDE
8390 PRINT    OF THE ENTERPRISE (WHICH IS IN THE MIDDLE OF THE SCAN).
8400 PRINT    THE SCAN IS CODED IN THE FORM '', WHERE THE UNITS DIGIT
8410 PRINT    IS THE NUMBER OF STARS, THE TENS DIGIT IS THE NUMBER OF STARBASES,
8420 PRINT    AND THE HUNDREDS DIGIT IS THE NUMBER OF KLINKONS.
8430 PRINT 
8440 PRINT    EXAMPLE: LONG RANGE SENSOR SCAN FOR QUAD. 4,4
8450 PRINT
8460 PRINT             
8470 PRINT             : 008 : 102 : 010 :
8480 PRINT             
8490 PRINT             : 213 : 008 : 107 :
8500 PRINT             
8510 PRINT             : 005 : 013 : 004 :
8520 PRINT             
8530 PRINT
8540 PRINT  IN THE QUADRANT THAT IS COURSE 5 WARP FACTOR 1 FROM THE ENTERPRISE :
8550 PRINT  THERE IS A 213. THIS INDICATES THERE ARE 2 KLINGONS, 1 STAR BASE,
8560 PRINT  AND 3 STARS.
8570 PRINT 
8580 PRINT CHR$(12)
8590 PRINT  PHASERS COMMAND = PHASER CONTROL
8600 PRINT  :PRINT
8610 PRINT    ALLOWS YOU TO DESTROY THE KLINGON BATTLE CRUISERS BY
8620 PRINT    ZAPPING THEM WITH SUITABLY LARGE UNITS OF ENERGY TO
8630 PRINT    DEPLETE THEIR SHIELD POWER. (NOTE: KLINGINS SHOOT BACK)
8640 PRINT CHR$(12)
8650 PRINT  TORPEDOS COMMAND = PHOTON TORPEDO CONTROL
8660 PRINT  :PRINT
8670 PRINT    TORPEDO COURSE IS THE SAME AS USED IN WARP ENGINE CONTROL.
8680 PRINT    IF YOU HIT THE KLINGON VESSEL, HE IS DESTROYED AND CANNOT
8690 PRINT    FIRE BACK AT YOU. IF YOU MISS YOU ARE SUBJECT TO HIS PHASER FIRE.:PRINT
8700 PRINT    COURSE = A NUMBER FROM 1 TO 8.9.
8710 PRINT    NUMBERS INDICATE DIRECTION STARTING AT THE RIGHT AND
8720 PRINT    GOING COUNTER CLOCKWISE AT 45 DEGREE INTERVALS:
8730 PRINT
8740 PRINT                     3
8750 PRINT                  4  :  2
8760 PRINT                    \:
8770 PRINT                 5*1
8780 PRINT                    :\
8790 PRINT                  6  :  8
8800 PRINT                     7
8810 PRINT
8820 PRINT CHR$(12)
8830 PRINT  SHIELD COMMAND = SHIELD CONTROL
8840 PRINT  :PRINT
8850 PRINT    DEFINES NUMBER OF ENERGY UNITS TO BE ASSIGNED TO SHIELDS:PRINT
8860 PRINT    ENERGY IS TAKEN FROM TOTAL SHIP'S ENERGY.  NOTE THAT THE
8870 PRINT    TOTAL ENERGY INCLUDES THE SHIELD ENERGY
8880 PRINT:PRINT
8890 PRINT  DAMAGE CONTROL STATUS COMMAND
8900 PRINT  :PRINT
8910 PRINT    GIVES STATE OF REPAIR OF ALL DEVICES, WHERE A NEGATIVE
8920 PRINT    'STATE OF REPAIR' SHOWS THAT THE DEVICE IS TEMPORARILY DAMAGED
8930 PRINT CHR$(12)
8940 PRINT
8950 PRINT
8960 PRINT  COMPUTER  LIBRARY COMPUTER OPTIONS
8970 PRINT  :
8980 PRINT
8990 PRINT         0) GALAXY MAP  SUMMMARY OF ALL LONG RANGE SENSOR SCANS
9000 PRINT         1) STATUS
9010 PRINT         2) DIRECTIONDISTANCE CALCULATOR TO KLINGON
9020 PRINT         3) DIRECTIONDISTANCE CALCULATOR TO STARBASE
9030 PRINT         4) DIRECTIONDISTANCE CALCULATOR
9040 PRINT CHR$(255)+PF
9050 INPUT           WOULD YOU LIKE TO SEE THE INSTRUCTIONS AGAIN? (Y or N);A2$
9060 IF A2$ = Y OR A2$= y THEN GOTO 7940 ELSE RETURN
