image of READY prompt

Wang2200.org

Listing of file='StarTrek' on disk='vmedia/games_vol_4.wvd.zip'

# Sector 312, program filename = 'StarTrek'
0100 REM "StarTrek"  06/17/80  T Smith & R Droz
0101 REM Loader for StarTrek
0105 REM % Main
0110 REM Main variables
0115    COM F, I, J, X, Y
0120    COM A0, B0, C0, D0, E0,     H0, I0, K0, P0, R0, S0, T0, W0
0122    COM A1, B1, C1, D1, E1, F1, H1,     K1, P1, R1, S1, T1, W1, X1, Y1
0125    COM                                 P2,         T2
0130    COM                                 W2,W3
0135    COM C(7), D(9), R(7), X(9), Y(9)
0140    COM C0$8, C1$8, I$35, I4$1, S$80
0145    COM D$(9)15, F1$(3)5, I$(8)35, M$(5)60, M1$(5)2, U$(64, 64)1
0150    COM C$(8, 8)3, C1$(8)9, K$(28)4, L$(3, 3)3, L8$(4)2, T$(10)9
0155    COM            K$6,                T$6,P$1
0160 REM
0165 REM  F      Flag indicating reason for end of game
0175 REM             0 - Game still on
0180 REM             1 - Enterprise shot by a photon torpedo
0185 REM             2 - Enterprise has become prey of a black hole
0190 REM             3 - Out of Time
0195 REM             4 - Dead in Space
0200 REM             5 - Destroyed by Klingon
0205 REM             8 - Quit
0210 REM             9 - Normal End
0215 REM
0220 REM  F1     Count down 'til Klingons may shoot again
0225 REM  I,J    Scratch, loop indexes
0235 REM  X,Y    Scratch, co-ordinates in U$()
0245 REM
0250 REM  A0, A1  Efficiency weighting
0255 REM  B0, B1  Number of starbases
0260 REM  C0, C1  Enterprise Course
0265 REM  D0, D1  Time til end of mission
0270 REM  E0, E1  Enterprise Energy
0275 REM  H0, H1  Number of black holes
0280 REM  I0      Cursor image being input
0285 REM  I1      Cursor position in current input line
0290 REM  K0, K1  Number of Klingons
0295 REM  K2      Number of Klingons in SR sensor range
0300 REM  P0, P1  Number of photon torpedoes
0305 REM  P2      Number of torpedoes in space
0310 REM  R0, R1  Number of stars (excluding "black hole"'s)
0315 REM  S0, S1  Energy in Enterprise's shields
0320 REM  T0, T1  Galaxy time in standard stardates
0325 REM  T2      Width of current time slice (Max = 1)
0330 REM  X1, Y1  Co-ordinates of the Enterprise
0335 REM  W0, W1  Warp factor of the Enterprise
0340 REM  W2      Warp to accellerate to
0345 REM  W3      Remaining distance to travel under warp power
0350 REM
0355 REM  C1$,C0$ Current condition, Old condition
0360 REM  C1$()   Condition condition codes
0365 REM  STR(C1$,9,1)  Remaining time to display condition code
0370 REM I4$        - item to search for
0375 REM P$         - Penalty flag = "D" if base has been torpedoed
0380 REM  S$     Scratch
0385 REM  S1$    =T if a shot has been taken since condition red came on
0390 REM
0395 REM  C()    The vector of column numbers for screen sections
0400 REM  R()    The vector of row numbers for screen sections
0405 REM             1st - Short range scan
0410 REM             2nd - Cumulative galactic record
0415 REM             3rd - Main screen
0420 REM             4th - Damage control
0425 REM             5th - Rose
0430 REM             6th - Command table
0435 REM             7th - Command entry
0440 REM
0445 REM  C$()   The cumulative galactic record
0450 REM           Format = A1, A1, A1
0455 REM             1st - Number of Klingons
0460 REM             2nd - Number of starbases
0465 REM             3rd - Number of stars
0470 REM
0475 REM  D()    Damage control values
0480 REM  D$()   Damage control titles
0485 REM             1st - Computer
0490 REM             2nd - Damage control
0495 REM             3rd - Impulse engines
0500 REM             4th - Long range sensors
0505 REM             5th - Phasors
0510 REM             6th - Photon tubes
0515 REM             7th - Shield control
0520 REM             8th - Short range sensors
0525 REM             9th - Warp drive
0530 REM
0535 REM  I$     Current image for input
0540 REM  I$()   The vector of images for input
0545 REM             1st - Course
0550 REM             2nd - Impulse Engines
0555 REM             3rd - Navigation computer
0560 REM             4th - Phasor energy
0565 REM             5th - Shield energy
0570 REM             6th - Fire Torpedo
0575 REM             7th - Enter warp factor
0580 REM             8th - Quit
0585 REM
0590 REM  F1$()  Attribute selector array (On and lock)
0595 REM           1st - normal
0600 REM           2nd - bright
0605 REM           3rd - bright/blink
0620 REM
0625 REM  K$()   The vector of Klingons
0630              $FORMAT K$ = P1.0, P1.0, P2.0
0635 REM             1st - The x co-ordinate
0640 REM             2nd - The y co-ordinate
0645 REM             3rd - Energy left
0650 REM
0655 REM  L$()   The long range scan
0660 REM           Format = A1, A1, A1
0665 REM             1st - Number of Klingons
0670 REM             2nd - Number of starbases
0675 REM             3rd - Number of stars
0680 REM
0685 REM L8$()  Scratch Locator array
0690 REM
0695 REM  T$()   The vector of torpedoes
0700              $FORMAT T$ = P3.3, P3.3, P3.3
0705 REM             1st - x co-ordinate
0710 REM             2nd - y co-ordinate
0715 REM             3rd - Course
0720 REM             (The speed of a photon torpedo is one sector/itteration)
0725 REM           (The Enterprise is torpedo number 1)
0730 REM
0735 REM  U$()   The universe
0740 REM           Format = A1
0750 REM             0 - Blank
0755 REM             1 - Federation starbase
0760 REM             2 - Black hole
0765 REM             3 - Klingon
0770 REM             4 - Star
0775 REM             5 - Enterprise
0780 REM             6 - Torpedo
0785 REM
0790 REM  X()    Mapping function from course to dx
0795 REM  Y()    Mapping function from course to dy
0800 REM
0805 REM Subroutines
0810 REM
0815 REM '100          - Initialize
0820 REM '101          - Display board
0825 REM '102          - Iterate
0830 REM '103          - Find an empty slot in the universe
0835 REM             X,Y - co-ordinates of empty slot
0845 REM '104 (X4, Y4) - Check for collision
0850 REM            F4 - Flag (non-zero indicates collision)
0855 REM '105          - Check for a key
0860 REM '106 (F2)     - Display message
0865 REM            F2 - Display time
0870 REM '107 (C0$,C5)  - Change condition code to S$
0875 REM  C5           - Display time
0880 REM '108 (X4,Y4,I4$,I9) - Look around X4,Y4, radius I9 for item I4$
0885 REM  I4$             - code for item to search for; " " if anything
0890 REM  returns
0895 REM  I4$,X3,Y3       - item found at co-ords X3,Y3; I4$=" " if nothing fo
     und
0900 REM
0905 REM '109(I9)      - Convert offset in S$() to co-ords in universe
0910 REM               -returns X4,Y4
0915 REM
0920 GOTO 1750
0925 REM % Initialize
0930    DEFFN '100
0940 REM Init terminal and it's screen
0945      SELECT P, PRINT 005(80), CO  005(80), R
0955      PRINT HEX(020D0C030F06)
0990      S$ = "STAR TREK"
0995      PRINT AT(7, 0+(80-LEN(S$)+1)/2); F1$(3); S$; F1$(1)
1000      S$ = "( Pardon us while we generate your galaxy... )"
1005      PRINT AT(9, 0+(80-LEN(S$)+1)/2); S$
1035 REM
1040 REM Initialize the initial-variable's values
1045      A0 = 50
1050      B0 = INT(RND(1)*(  4 -  1) +  1) + 1
1055      C0 = 1
1060      D0 = INT(RND(1)*( 35 - 25) + 25) + 1
1065      E0 = 3500
1070      H0 = INT(RND(1)*( 16 -  2) +  2) + 1
1075      K0 = INT(RND(1)*( 28 -  9) +  9) + 1
1080      P0 = 10
1085      R0 = INT(RND(1)*(512 - 64) + 64) + 1
1090      S0 = 0
1095      T0 = INT(RND(1)*( 40 - 20) + 20)*100
1100      W0 = 0
1105 REM
1110 REM Initialize the current-variable's values
1115      A1 = A0
1120      B1 = B0
1125      C1 = C0
1130      D1 = D0
1135      E1 = E0
1140      F1 = 10
1145      H1 = H0
1150      K1 = K0
1155      P1 = P0
1160      R1 = R0
1165      S1 = S0
1170      T1 = T0
1175      W1 = W0
1180 REM
1185 REM Initialize the row and column number for the screen segments
1190      RESTORE LINE 1210
1195      FOR I = 1 TO 7
1200        READ R(I), C(I)
1205      NEXT I
1210        DATA  0,  0
1215        DATA  0, 47
1220        DATA  0, 27
1225        DATA 10, 58
1230        DATA 10, 28
1235        DATA 10, 41
1240        DATA 16,  0
1245 REM
1250 REM Initialize the cumulative galactic record
1255      C$() = ALL(" ")
1260 REM
1265 REM Initialize the current status
1270      RESTORE LINE 1295
1275      FOR I=1 TO 8
1280        READ C1$(I)
1285        STR(C1$(I),9,1)=BIN(0)
1290      NEXT I
1295      DATA "Green","Yellow","Blue","Bad!!","Red","Docked","Blue","Bad!!"
1300 REM
1305 REM Initialize the current damage state
1310      MAT D = CON
1315      MAT D = (80)*D
1320 REM
1325 REM Init the damage control headings
1330      RESTORE LINE 1340
1335      MAT READ D$
1340        DATA "Computer"
1345        DATA "Damage Control"
1350        DATA "Impulse Engines"
1355        DATA "LR Sensors"
1360        DATA "Phasors"
1365        DATA "Photon Tubes"
1370        DATA "Shield Control"
1375        DATA "SR Sensors"
1380        DATA "Warp Drive"
1385 REM
1390 REM Initialize end of game flag to not-end-of-game
1395      F = 0
1400 REM
1405 REM Initialize the input array
1410      RESTORE LINE 1420
1415      MAT READ I$
1420        DATA "C Enter\80Course: #.###"
1425        DATA "I Activate\80Impulse Engines"
1430        DATA "N\80Navigation: Destination = ##,##"
1435        DATA "P Enter\80Phasor Energy: ####"
1440        DATA "S Enter\80Shield Energy: ####"
1445        DATA "T Fire\80Torpedo"
1450        DATA "W Enter\80Warp Factor: #.###"
1455        DATA "Q Key 'return' to\80Quit"
1460 REM
1465 REM Initialize the vectors for the Klingons, Torpedoes, and the Universe
1470      K$(), T$(), U$() = ALL(HEX(00))
1475 REM
1480 REM Initialize blank message
1485      M1$() = ALL(HEX(00))
1490      MAT MOVE M1$() TO M$()
1495 REM
1500 REM Initialize number of torpedoes in flight
1505      P2 = 0
1510 REM
1515 REM Initialize the time slice
1520      T2 = .1
1525 REM
1530 REM Initialize the one unit movement help varialbes
1535      X(2), X(3), X(4)       = -1
1540      X(1), X(5), X(9)       =  0
1545      X(6), X(7), X(8)       = +1
1550      Y(4), Y(5), Y(6)       = -1
1555      Y(3), Y(7)             =  0
1560      Y(1), Y(2), Y(8), Y(9) = +1
1565 REM
1570 REM Fill the universe
1575 REM
1580 REM   Do the starbases
1585      FOR I = 1 TO B1
1590        GOSUB '103
1595        U$(X, Y) = HEX(01)
1600      NEXT I
1605 REM
1610 REM   Do the black holes
1615      FOR I = 1 TO H1
1620        GOSUB '103
1625        U$(X, Y) = HEX(02)
1630      NEXT I
1635 REM
1640 REM   Do the Klingons
1645      FOR I = 1 TO K1
1650        GOSUB '103
1655        U$(X, Y) = HEX(03)
1660        $PACK (F = K$) K$(I) FROM X, Y, INT(180 + 100*RND(1))
1665      NEXT I
1670 REM
1675 REM   Do the stars
1680      FOR I = 1 TO R1
1685        GOSUB '103
1690        U$(X, Y) = HEX(04)
1695      NEXT I
1700 REM
1705 REM   Do the Enterprise
1710      GOSUB '103
1715      U$(X, Y) = HEX(05)
1720      X1 = X
1725      Y1 = Y
1740    RETURN
1745 REM %Main
1750    GOSUB '202
1751    GOSUB '200
1753    GOSUB '201(F)
1755    GOSUB '100
1760    PRINT
   : PRINT "Uhura here, Captain, with a message from Starfleet Command:"
1762    SELECT P9
1765    PRINT "   We must destroy";K0;"Klingons within";D0;"Stardates."
1766    PRINT
1767    PRINT
1768    PRINT
1769    PRINT
1770    SELECT P
1780    LOAD T#1,"Star1"
2000 REM %  Initialize attribute array
2005    DEFFN'202
2010      RESTORE LINE 2020
2015      MAT READ F1$
2017    RETURN
2020 DATA HEX(020400000E),HEX(020402000E),HEX(02040B000E)
2025 REM %Select Disk
2030  DEFFN'200
2035    DIM D$3
2040    GOSUB 2315
2045    D$=" "
2050    LIMITS T#1,"Star1",A,A,A,D
   : ERRORGOTO 2060
2055    IF D=1 THEN RETURN
2060    PRINT AT(2,0);HEX(07);
2065    LINPUT "StarTrek game is on which disk?"-D$
2070    SELECT #1 <D$>
   : ERRORGOTO 2060
2075    GOTO 2050
2080 REM %Instructions
2085  DEFFN'201(F)
2090    D$=" "
2095    PRINT AT(4,0);
2100    LINPUT "Have you commanded a Star Ship before?"D$
2105    GOSUB '139(D$)
2110    ON I9+1 GOTO 2095,2290,2115
2115    RESTORE LINE 3000
2120    GOSUB 2315
2125    READ S$
2130    IF POS(S$="\8B")>0 THEN 2155
2135    IF POS(S$="\8C")>0 THEN GOSUB 2300
2140    $TRAN(S$,HEX(008C008B))R
2145    PRINT S$
2150    GOTO 2125
2155    GOSUB 2300
2160    GOSUB 2315
2165    D$=" "
2170    PRINT AT(5,0);
2175    LINPUT "Would you like a hard copy of the Enterprise Operator's Manual
     ?",D$
2180    GOSUB '139(D$)
2185    ON I9+1 GOTO 2170,2190,2290
2190    D$=" "
2195    PRINT AT(6,0);
2200    LINPUT "Printer Address?" -D$
2205    IF VER(D$,"HHH")<>3 THEN 2195
2210    SELECT PRINT <D$>,#15 <D$>
   : ERRORGOTO 2195
2215    $OPEN #15
2220    P9=-1
2225    S$=" "
2230    RESTORE LINE 3000
2235    P9=P9+1
2240    IF MOD(P9,2)=0 THEN PRINT HEX(0D0C0E);"STARSHIP ENTERPRISE OPERATOR'S
     MANUAL"
2245    PRINT
2250    $TRAN(S$,HEX(008C008B))R
2255    PRINT S$
2260    READ S$
2265    IF POS(S$="\8C")>0 THEN 2235
2270    IF POS(S$="\8B")=0 THEN 2255
2275    PRINT HEX(0C);
2280    $CLOSE
2285    SELECT PRINT /005(80)
2290  RETURN
2295 REM %TITLE
2300    PRINT AT(23,0);F1$(2);"Key RETURN for furthur instructions...";
2305    KEYIN B$,,2305
2310    IF STR(B$,,1)<>HEX(0D) THEN 2305
2315    PRINT HEX(030D);TAB(30);F1$(3);" Star Trek";HEX(0F)
   : PRINT
2320  RETURN
3000 REM %Instructions
3010 DATA "You are to command the United Federation of Planets Star Ship Enter
     prise"
3015 DATA "on a mission to rid the galaxy of Klingon battle cruisers."
3020 DATA " "
3025 DATA "Your crew consists of:"
3030 DATA "    Lieutenant Commander Spock, Science Officer;"
3032 DATA "    Dr. Leonard 'Bones' McCoy,MD, Medical Officer;"
3035 DATA "    Lieutenant Commander Montgomery Scott, Engineer;"
3040 DATA "    Lieutenant Uhura, Communications Officer;"
3044 DATA "    Lieutenant Sulu, Helmsman;"
3045 DATA "    Ensign Checkov, Navigator"," "
3050 DATA "The sensors and ship's computer are constantly reporting the ship's
      position"
3064 DATA "and status, unless a device has been damaged by enemy fire.  The cr
     ew will also"
3065 DATA "give their reports, from time to time, in the lower left area of th
     e screen."
3066 DATA "The display is being constantly up-dated, but sometimes cannot keep
      up with"
3067 DATA "changes as fast as they occur."
3070 DATA "\8CThe galaxy is divided in a grid of 64 by 64 sectors. The origin
     of co-ordinates"
3075 DATA "is in the upper left hand corner of the Short Range Sensor and Cumu
     lative"
3080 DATA "Galactic Record Displays.  The co-ordinates of a object are given b
     y"
3085 DATA "first specifying the vertical co-ordinate."," "
3090 DATA "Your primary eyes are the Short Range Sensors.  The Short Range Sen
     sor display"
3095 DATA "in the upper left hand corner of the screen displays a five sector
     radius in the"
3100 DATA "immediate vacinity of the Enterprise.  The Enterprise is represente
     d"
3105 DATA "by the + in the center of the display.  Other objects are:"
3110 DATA " * -- Stars,        ` -- Black Holes,       \81 -- Klingon Battle C
     ruisers,"
3111 DATA " # -- Federation Star Bases"
3115 DATA " ","The Short Range Sensors are not operational when the Enterprise
     "
3120 DATA "is moving faster than warp factor 1."
3125 DATA "\8CThe Cumulative Galactic Record is a record maintained by the shi
     p's computer"
3130 DATA "of the portion of the galaxy that has been explored by the Enterpri
     se."
3135 DATA "The highlighted portion of the display is the output of the Long Ra
     nge Sensors."
3140 DATA "It is the Long Range Sensors that provide the ship's computer with
     the"
3145 DATA "data to update the Cumulative Galactic Record, thus both the Long R
     ange"
3150 DATA "Sensors and the Computer must be operational in order for the Cumul
     ative"
3155 DATA "Galactic Record to contain correct data. At best, the Cumulative Ga
     lactic Record"
3156 DATA "is far from perfect because Klingons move and stars are consumed by
      black holes."
3159 DATA " ","Each entry in the Cumulative Galactic Record represents"
3160 DATA "the contents of an area of space 8 sectors by 8 sectors."
3165 DATA "The digits represent, from left to right, Klingons, Bases, and Star
     s."
3170 DATA "The position of the Enterprise is shown by a cursor, \81#*, to remi
     nd the viewer"
3175 DATA "of the significance of each digit.  "
3180 DATA "\8CThe ship is maneuvered with a series of one letter commands from
      the menu"
3185 DATA "near the center of the screen.  Typing a letter will cause a comman
     d prompt"
3190 DATA "to appear in the box labeled COMMAND in the lower left area of the
     sscreen."
3195 DATA "Data is entered into the prompt by replacing each # in the prompt w
     ith a number."
3200 DATA "Special characters, such as decimal points and commas, must be ente
     red as they"
3205 DATA "appear in the prompt.  Commands that expect integer numbers will ac
     cept"
3210 DATA "left justified numbers; commands that expect decimal fractions will
      fill"
3215 DATA "the fraction with zeros if all digits are not typed.  All commands
     allow"
3220 DATA "the use of backspace and line erase.  All commands must be terminat
     ed with"
3225 DATA "RETURN in order to take effect; any command may be aborted by simpl
     ying"
3230 DATA "typing a letter corresponding to another valid command."," "
3235 DATA "                           ENERGY & SHIELD CONTROL"
3240 DATA "The Enterprise has a limited amount of energy that may be divided b
     etween the"
3250 DATA "deflector shields and general use.  The shield command allows the c
     aptain to"
3255 DATA "give up to 80% of the total ship's energy (energy + shields) to the
      shields."
3270 DATA " ","The shields protect the Enterprise from enemy fire.  The enemy
     will try to"
3275 DATA "destroy the Enterprise by reducing her shields to less than zero.
     Likewise, the"
3280 DATA "Enterprise destroys a Klingon, if the Klingon's shields are reduced
      below zero."
3290 DATA "\8C                            ENGINES & NAVIGATION"
3295 DATA "The Enterprise has two means of propulsion:  The Impulse Engines al
     low the"
3300 DATA "ship to maneuver precisely at low speed.  Each time the Impulse com
     mand is"
3305 DATA "executed, the ship moves on sector.  The Warp engines are for faste
     r, longer"
3310 DATA "distance travel.  One warp factor is equal to 8 sectors, or one uni
     t on the"
3315 DATA "Cumulative Galactic Record display.  The ship cannot instantly acce
     llerate"
3320 DATA "to warp speed.  Until speed greater than warp 1 is acheived, obstic
     als"
3325 DATA "must be avoided.  The ship is always maneuverable.  If the warp dri
     ve is"
3326 DATA "damaged, the ship may still travel at warp .2"," "
3330 DATA "The ship is steered by specifying a course in one of two ways.  The
      course"
3335 DATA "command may be used to specify a heading directly.  The navigation
     computer"
3340 DATA "may be used to calculate the course, given the co-ordinates of the
     destination."
3345 DATA "\8C                               WEAPONS"
3350 DATA "The Enterprise has two types of weapons, phasors and photon torpedo
     s."
3355 DATA "Phasors are beams of energy aimed by the ship's computer.  The capt
     ain may order"
3360 DATA "up to 80% of the ship's energy to be fired in a single phasor blast
     .  One unit"
3365 DATA "of phasor energy will counteract one unit of enemy shield energy.
     However,"
3370 DATA "phasor effectiveness is inversely proportional to target distance.
      If the"
3375 DATA "computer is damaged, the phasors cannot be aimed as accurately, so
     increased"
3380 DATA "energy will be necessary.  If there is more than one target within
     short range"
3385 DATA "sensor range, the phasor charge will be divided equally among visib
     le targets."," "
3400 DATA "Photon torpedos are matter -- anti-matter charges that are fired fr
     om tubes"
3405 DATA "in the direction of Enterprise heading.  The photon torpedos are ai
     med by using"
3410 DATA "the course command or the navigation computer to face the Enterpris
     e toward"
3415 DATA "the target.  The Torpedo command fires one torpedo.  Photon torpedo
     s travel at"
3420 DATA "warp .1, so it is easy to overtake them and destroy the Enterprise
     if you're not"
3425 DATA "careful.  Photon torpedos continue to travel until they hit somethi
     ng.  If a"
3430 DATA "torpedo hits a Klingon, the Klingon is destroyed.  However, some Kl
     ingons are"
3435 DATA "quite good at dodging photon torpedos.  If a torpedo hits a star, t
     he star"
3440 DATA "becomes a black hole."
3445 DATA "\8C                            SHIP STATUS"
3450 DATA "The damage control display informs the captain of the status of the
      various"
3455 DATA "devices.  If the state of repair of a device is less than 25%, the
     device is"
3460 DATA "unusable.  Damage is inflicted by enemy fire in inverse proportion
     to the"
3465 DATA "amount of energy in the shields.  Repairs commence as soon as a dev
     ice falls"
3470 DATA "below 25%.  Random damage and repairs are constantly going on, and
     are"
3475 DATA "reflected in periodic damage control reports."," "
3480 DATA "                              STAR BASES"
3485 DATA "Star Bases are places of refuge and refueling.  The Enterprise dock
     s at a"
3490 DATA "Star Base by maneuvering within a 1 sector radius of the base.  In
     order to dock,"
3495 DATA "the Enterprise must drop her deflector shields.  This is done autom
     atically."
3500 DATA "Refueling and repair of damage begins.  You may stay docked at the
     Star Base"
3505 DATA "as long as desired.  While at the Star Base, the Enterprise is prot
     ected against"
3510 DATA "destruction by enemy fire.  The enemy is, however, capable of infli
     cting"
3515 DATA "damage faster than the Star Base repair crews can repair it.  A Sta
     r Base is a"
3520 DATA "good place to be when several Klingons are around.  Remember, thoug
     h, that"
3525 DATA "Star Base crews require time to refuel the Enterprise, so firing ex
     tremely large"
3530 DATA "phasor charges will require waiting extra long at the Star Base for
      the energy"
3535 DATA "to be replaced.  The capacity of the Enterprise is 3850 units of en
     ergy and"
3540 DATA "10 photon torpedos.  Star Base crews will repair ship's devices to
     80%"
3546 DATA "\8CStar Bases don't move.  It is useful to note their exact locatio
     n so that the"
3547 DATA "navigation computer can be used to compute the shortest course to o
     ne and so they"
3548 DATA "may be located when the Short Range Sensors are damaged."," "
3550 DATA "                              OTHER DANGERS"
3555 DATA "In addition to Klingons, there are other dangers to the Enterprise.
     "
3560 DATA "Black holes can absorb any object in space -- Klingons, Stars, Star
      Bases,"
3565 DATA "or the Enterprise.  Approaching a Black Hole within 3 sectors radiu
     s is"
3570 DATA "risky; two sectors is dangerous; one sector is fool-hearty."," "
3575 DATA "Another danger is stray photon torpedos.  Photon torpedos keep trav
     eling"
3580 DATA "until they hit something.  It is not uncommon to late in the missio
     n observe"
3585 DATA "a photon torpedo that was fired long ago.  Stay out of its way, or
     destroy"
3590 DATA "it with another photon torpedo."
3600 DATA "\8B"
4000 REM % YES/NO DECISION
4005    DEFFN'139(B$)
4010      $TRAN (B$,"YyEeSsNnOo") R
4015      MAT SEARCH "YESNO ",=STR(B$,,LEN(B$)) TO I9$ STEP 3
4020      I9=MIN(2,VAL(I9$,2))
4025    RETURN
7640 REM % Find a random blank cell
7648 REM    X,Y - co-ordinates of empty slot
7656 REM
7660    DEFFN '103
7664        X = INT(RND(1)*64+1)
7668        Y = INT(RND(1)*64+1)
7672      IF U$(X, Y) <> HEX(00) THEN 7664
7676    RETURN
9000 DEFFN'31
   : COM CLEAR  F
   : LOAD T "START"