Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50356/exeter.lst
There is 1 other file named exeter.lst in the archive. Click here to see a list.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1
    EXETER.CBL    22-JUN-64  09:05

    0001    IDENTIFICATION DIVISION.
    0002    PROGRAM-ID. EXETER.
    0003    AUTHOR. KAY R. FISHER ... DEC
    0004    DATE-COMPILED. 26-JUN-75. 
    0005    ENVIRONMENT DIVISION.
    0006    CONFIGURATION SECTION.
    0007    SOURCE-COMPUTER. DECsystem-10. 
    0008    OBJECT-COMPUTER. DECSYSTEM-10.
    0009    DATA DIVISION.
    0010    WORKING-STORAGE SECTION.
    0011    77 YES-OR-NO-ANSWER PICTURE AAA.
    0012  * USED FOR BASE OF RANDOM NUMBER GENERATOR
    0013    77	MULTIPLIER PICTURE 9(6) VALUE 262147.
    0014  * VALUE RETURNED BY RANDOM NUMBER GENERATOR
    0015    77	RAN PICTURE 99.
    0016  * BEGINNING OF RANDON NUMBER GENERATOR SEQUENCE IS BASED ON THIS NUMBER
    0017    77	SEED PICTURE 9(6) VALUE ZEROS.
    0018    77	TEMP1 PICTURE 9(6).
    0019    77	TEMP2 PICTURE 9(6).
    0020    77	CONDITION PICTURE A(6) JUSTIFIED RIGHT.
    0021    77	TORPEDO-COUNTER PICTURE 99.
    0022    77	DISPLAY-TORPEDO-COUNTER		PICTURE	Z9.
    0023    77	SHIELD-ENERGY			PICTURE	S9999.
    0024    77	DISPLAY-SHIELD-ENERGY		PICTURE	ZZZ9.
    0025    77	DAMAGE-WARP-DRIVE		PICTURE S99V999.
    0026    77	DAMAGE-SHORT-RANGE-SENSORS	PICTURE S99V999.
    0027    77	DAMAGE-LONG-RANGE-SENSORS	PICTURE S99V999.
    0028    77	DAMAGE-PHASERS			PICTURE S99V999.
    0029    77	DAMAGE-PHOTON-TUBES		PICTURE S99V999.
    0030    77	DAMAGE-DAMAGE-CONTROL		PICTURE S99V999.
    0031    77	DAMAGE-SHIELDS			PICTURE S99V999.
    0032    77	DAMAGE-COMPUTER			PICTURE S99V999.
    0033    77	STARDATE			PICTURE S9999V9.
    0034    77	DISPLAY-STARDATE		PICTURE	ZZZ9.9.
    0035    77	STARDATES-LEFT			PICTURE S9999V9.
    0036    77	TOTAL-ENERGY			PICTURE S9999.
    0037    77	DISPLAY-TOTAL-ENERGY		PICTURE	----9.
    0038    77	NCC-1706-QUADRANT-X		PICTURE	S999.
    0039    77	NCC-1706-QUADRANT-Y		PICTURE	S999.
    0040    77	NCC-1706-SECTOR-X		PICTURE	9.
    0041    77	NCC-1706-SECTOR-Y		PICTURE	9.
    0042    77	TOTAL-KLINGONS			PICTURE 999.
    0043    77	KLINGONS-LEFT			PICTURE 999.
    0044    77	TOTAL-STARBASES			PICTURE 99.
    0045    77	STARBASES-LEFT			PICTURE 99.
    0046    77	DOCK-TEST-X			PICTURE	S9.
    0047    77	DOCK-TEST-Y			PICTURE	S9.
    0048    77	COMMAND				PICTURE 99.
    0049    77	COURSE				PICTURE S9999V999999.
    0050    77	VECTOR				PICTURE	S9999V999999.
    0051    77	WARP-FACTOR			PICTURE	S99V999999.
    0052    77	WARP				PICTURE	S99V999999.
    0053    77	HIT				PICTURE	999V999999.
    0054    77	DISPLAY-HIT			PICTURE Z99.
    0055    77	DISTANCE			PICTURE	999V999999.
    0056    77	WARP-ENERGY			PICTURE	S9999.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-1
    EXETER.CBL    22-JUN-64  09:05

    0057    77	MOVE-DISTANCE			PICTURE	S99.
    0058    77	WHO-GOT-HIT			PICTURE	9.
    0059    77	DAMAGE				PICTURE	9V999.
    0060    77	REPAIR				PICTURE	9V999.
    0061    77	X1				PICTURE	S9V999.
    0062    77	X2				PICTURE	S9V999.
    0063    77	INT-VECTOR			PICTURE	9.
    0064    77	INT1-VECTOR			PICTURE	S99.
    0065    77	I	PICTURE		9.
    0066    77	J	PICTURE		9.
    0067    77	X				PICTURE		S999.
    0068    77	Y				PICTURE		S999.
    0069    77	REAL-X				PICTURE		S999V999999.
    0070    77	REAL-Y				PICTURE		S999V999999.
    0071    77	STARS-IN-PRESENT-SECTOR		PICTURE		9.
    0072    77	KLINGONS-IN-PRESENT-SECTOR	PICTURE		9.
    0073    77	STARBASE-IN-PRESENT-SECTOR	PICTURE		9.
    0074    77	TEMP-1				PICTURE		9.
    0075    77	TEMP-2				PICTURE		99.
    0076    77	TEMP-3				PICTURE		999.
    0077    77	TEMP-4				PICTURE		S9999V999999.
    0078    77	FIRE-POWER			PICTURE		S9999V999999.
    0079    77	EFFICIENCY-RATING		PICTURE		S9999V99.
    0080    77	TIME-OF-MISSION			PICTURE		S9999V9.
    0081    77	STARBASES-DESTROYED		PICTURE		99.
    0082    77	DAMAGE-SEVERITY-FACTOR		PICTURE		S9999V99.
    0083    77	SUM-OF-PHASER-HITS		PICTURE		9999999.
    0084    77	STARBASE-VISITS			PICTURE		999.
    0085    77	NAVIGATION-ERRORS		PICTURE		999.
    0086    77	TORPEDO-MISSES			PICTURE		999.
    0087    77	MISS-FACTOR1			PICTURE		S999.
    0088    77	MISS-FACTOR2			PICTURE		S999.
    0089    77	PICTURE-GALACTIC-RECORD		PICTURE		XXX.
    0090    77	SOURCE-X			PICTURE		S999V999999.
    0091    77	SOURCE-Y			PICTURE		S999V999999.
    0092    77	DESTINATION-X			PICTURE		S999V999999.
    0093    77	DESTINATION-Y			PICTURE		S999V999999.
    0094  * THIS IS THE MEAT OF RAYMOND FUSCI'S FAMOUS
    0095  * FLOATING COMMA ROUTINE.
    0096    01	DISPLAY-QUADRANT.
    0097  	03 DISPLAY-Y		PICTURE	-(8)9.
    0098  	03 DUMMY-1 REDEFINES DISPLAY-Y.
    0099  	   05 DISPLAY-X-1	PICTURE	-(6)9,.
    0100  	   05 FILLER		PICTURE	X.
    0101  	03 DUMMY-2 REDEFINES DISPLAY-Y.
    0102  	   05 DISPLAY-X-2	PICTURE	-(5)9,.
    0103  	   05 FILLER		PICTURE	XX.
    0104  	03 DUMMY-3 REDEFINES DISPLAY-Y.
    0105  	   05 DISPLAY-X-3	PICTURE	-(4)9,.
    0106  	   05 FILLER		PICTURE	XXX.
    0107  	03 DUMMY-4 REDEFINES DISPLAY-Y.
    0108  	   05 DISPLAY-X-4	PICTURE	---9,.
    0109  	   05 FILLER		PICTURE	XXXX.
    0110    01	KLINGON-ONE.
    0111  	02	ENERGY		PICTURE		S999V9.
    0112  	02	X-COORD		PICTURE		9.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-2
    EXETER.CBL    22-JUN-64  09:05

    0113  	02	Y-COORD		PICTURE		9.
    0114    01	KLINGON-TWO.
    0115  	02	ENERGY		PICTURE		S999V9.
    0116  	02	X-COORD		PICTURE		9.
    0117  	02	Y-COORD		PICTURE		9.
    0118    01	KLINGON-THREE.
    0119  	02	ENERGY		PICTURE		S999V9.
    0120  	02	X-COORD		PICTURE		9.
    0121  	02	Y-COORD		PICTURE		9.
    0122    01	MASTER-GALAXY-LAYOUT.
    0123  	02 FILLER OCCURS 8 TIMES.
    0124  	03 MASTER-GALAXY OCCURS 8 TIMES
    0125  				PICTURE		999.
    0126    77	DISPLAY-MASTER-GALAXY 		PICTURE		XXX.
    0127    01	COMPUTER-GALACTIC-RECORD.
    0128  	02 FILLER OCCURS 8 TIMES.
    0129  	03 GALACTIC-RECORD OCCURS 8 TIMES
    0130  				PICTURE		999.
    0131    77	DISPLAY-GALACTIC-RECORD		PICTURE		XXX.
    0132    01	PRESENT-SECTOR-LAYOUT.
    0133  	02 FILLER OCCURS 8 TIMES.
    0134  	03 PRESENT-SECTOR OCCURS 8 TIMES
    0135  				PICTURE		AAA.
    0136    01	COURSE-ARRAY.
    0137  	02 FILLER OCCURS 9 TIMES.
    0138  	03 CHART OCCURS 2 TIMES
    0139  					PICTURE		S9.
    0140    PROCEDURE DIVISION.
    0141    MAIN SECTION.
    0142    SEE-IF-HE-WANTS-INSTRUCTIONS.
    0143  	DISPLAY '		***********************************'.
    0144  	DISPLAY '		* UNITED FEDERATION OF PLANETS    *'.
    0145  	DISPLAY '		* STARFLEET COMMAND		  *'.
    0146  	DISPLAY '		* FLEET OFFICER TRAINING ACADEMY  *'.
    0147  	DISPLAY '		* TRAINING PROGRAM 16G.4	  *'.
    0148  	DISPLAY '		* COBOL VERSION BY KAY R. FISHER  *'.
    0149  	DISPLAY '		***********************************'.
    0150  	DISPLAY ' '.
    0151  	DISPLAY ' '.
    0152  	DISPLAY 'DO YOU WANT INSTRUCTIONS (THEY ARE LONG)? ' WITH NO ADVANCING.
    0153    WAITING-FOR-ANSWER.
    0154  	ACCEPT YES-OR-NO-ANSWER.
    0155  	IF YES-OR-NO-ANSWER EQUALS 'YES' OR 'Y'
    0156  	 GO TO INSTRUCTION-SECTION.
    0157  	IF YES-OR-NO-ANSWER EQUALS 'NO' OR 'N'
    0158  	 GO TO BEGIN-NEW-CONTEST.
    0159  	DISPLAY 'PLEASE ANSWER YES OR NO!'.
    0160  	DISPLAY 'DO YOU WANT INSTRUCTIONS (THEY ARE LONG)? ' WITH NO ADVANCING.
    0161  	GO TO WAITING-FOR-ANSWER.
    0162    INSTRUCTION-SECTION.
    0163  	DISPLAY ' '.
    0164  	DISPLAY ' '.
    0165  	DISPLAY '      INSTRUCTIONS'.
    0166  	DISPLAY ' '.
    0167  	DISPLAY 'THIS IS A SIMULATION PROGRAM DESIGNED TO MEASURE'.
    0168  	DISPLAY 'YOUR ABILITY TO (1) UTILIZE AVAILABLE RESOURCES.'.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-3
    EXETER.CBL    22-JUN-64  09:05

    0169  	DISPLAY '(2) NAVIGATE A STARSHIP.  (3) ENGAGE IN THEORETICAL'.
    0170  	DISPLAY 'COMBAT.  AND (4) CORRECTLY AND EFFICIENTLY'.
    0171  	DISPLAY 'RESPOND TO THE UNKNOWN.'.
    0172  	DISPLAY ' '.
    0173  	DISPLAY 'YOUR EFFICIENCY RATING ON THIS EXAM WILL BECOME A'.
    0174  	DISPLAY 'PERMINENT PART OF YOUR SERVICE RECORD AND'.
    0175  	DISPLAY 'WILL BE CONSIDERED DURING BOARDS CONVENING'.
    0176  	DISPLAY 'FOR PROMOTION AND ASSIGNMENT.'.
    0177  	DISPLAY ' '.
    0178  	DISPLAY 'SHOULD YOU SUCCEED IN YOUR MISSION AND YOUR EFFICIENCY'.
    0179  	DISPLAY 'RATING IS WITHIN THE TOP 5 EVER RECORDED - YOU WILL'.
    0180  	DISPLAY 'RECEIVE A SPECIAL COMMENDATION AND YOUR NAME'.
    0181  	DISPLAY 'WILL BECOME A PERMINENT PART OF THIS PROGRAM.'
    0182  	DISPLAY ' '.
    0183  	DISPLAY ' '.
    0184  	DISPLAY '	PROGRAM 16G.4 HONOR RECORD'.
    0185  	DISPLAY '	******************************************'.
    0186  	DISPLAY '	NAME			ASSIGNMENT'.
    0187  	DISPLAY '	CHRISTOPHER PIKE	STARFLEET ADMIRAL (RETIRED)'.
    0188  	DISPLAY '	JAMES T. KIRK		COMMANDING USS ENTERPRISE'.
    0189  	DISPLAY '	TOM SPEAKE		INSTRUCTOR - DEC'.
    0190  	DISPLAY '	KAY R. FISHER		PROGRAMMER - DEC'.
    0191  	DISPLAY '	BILL WALKER		COURSE DEVELOPER - DEC'.
    0192  	DISPLAY ' '.
    0193  	DISPLAY ' '.
    0194  	DISPLAY 'I.	YOU ARE THEREFORE POSTED, EFFECTIVE IMMEDIATELY,'.
    0195  	DISPLAY '	TO COMMAND THE FOLLOWING:'.
    0196  	DISPLAY '		THE U.S.S. EXETER'.
    0197  	DISPLAY '		STARSHIP CLASS - GROSS 190,000 TONS'.
    0198  	DISPLAY '		CREW COMPLEMENT - 430 PERSONS'.
    0199  	DISPLAY '		DRIVE - SPACE-WARP'.
    0200  	DISPLAY '		RANGE - 18 YEARS AT LIGHT-YEAR VELOCITY'.
    0201  	DISPLAY '		REGISTRY - EARTH, UNITED SPACESHIP'.
    0202  	DISPLAY ' '.
    0203  	DISPLAY 'II.	NATURE AND DURATION OF MISSION:'.
    0204  	DISPLAY "	SEEK OUT AND DESTROY ALL ENEMY KLINGON VESSEL'S,".
    0205  	DISPLAY '	WITHIN 30 STARDATES.'.
    0206  	DISPLAY ' '.
    0207  	DISPLAY 'III.	YOU WILL PATROL THE NINTH FEDERAL GALAXY, BEGINNING'.
    0208  	DISPLAY '	WITH ALPHA CENTAURI AND EXTENDING TO THE OUTER'.
    0209  	DISPLAY '	PINIAL GALAXY LIMIT.'.
    0210  	DISPLAY ' '.
    0211  	DISPLAY ' '.
    0212  	DISPLAY 'THE GALAXY IS DIVIDED INTO AN 8,8 QUADRANT GRID'.
    0213  	DISPLAY 'THE CAST OF CHARACTERS IS AS FOLLOWS:'.
    0214  	DISPLAY '<*> = EXETER'.
    0215  	DISPLAY '+++ = KLINGON'.
    0216  	DISPLAY '>!< = STARBASE'.
    0217  	DISPLAY ' *  = STAR'.
    0218  	DISPLAY ' '.
    0219  	DISPLAY 'COMMAND 0 = WARP ENGINE CONTROL:'.
    0220  	DISPLAY '  COURSE IS IN A CIRCULAR NUMERICAL        360'.    
    0221  	DISPLAY '  VECTOR ARRANGEMENT AS SHOWN.              !'.
    0222  	DISPLAY '  INTEGER AND REAL VALUES MAY BE            !'.
    0223  	DISPLAY '  USED.  THEREFORE COURSE 90.5 IS     270 ----- 90'.
    0224  	DISPLAY '  HALF WAY BETWEEN 90 AND 91.               !'.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-4
    EXETER.CBL    22-JUN-64  09:05

    0225  	DISPLAY '  A VECTOR OF 360 IS THE SAME AS 0.         !'.
    0226  	DISPLAY '  ONE WARP FACTOR IS THE SPEED OF          180'.
    0227  	DISPLAY '  LIGHT. HOWEVER WARP 3 = 27 TIMES THE'.
    0228  	DISPLAY '  SPEED OF LIGHT & MAX SPEED (WARP 8) IS EQUAL TO'.
    0229  	DISPLAY '  512 TIMES THE SPEED OF LIGHT.  WARP TO THE 3RD'.
    0230  	DISPLAY '  POWER GIVES SPEED RELATIVE TO LIGHT.  A ONE QUADRANT'.
    0231  	DISPLAY '  MOVE REQUIRES A WARP FACTOR OF 4.  THEREFORE TO GET'.
    0232  	DISPLAY '  FROM QUADRANT 6,5 TO 5,5 YOU WOULD'.
    0233  	DISPLAY '  USE COURSE 0. WARP FACTOR 4.'.
    0234  	DISPLAY ' '.
    0235  	DISPLAY 'COMMAND 1 = SHORT RANGE SENSOR SCAN'.
    0236  	DISPLAY '  PRINTS THE QUADRANT YOU ARE CORRENTLY IN.  INCLUDING'.
    0237  	DISPLAY '  STARS, KLINGONS, STARBASES, AND THE EXETER.'.
    0238  	DISPLAY '  ALONG WITH OTHER PERTINATE INFORMATION.'.
    0239  	DISPLAY ' '.
    0240  	DISPLAY 'COMMAND 2 = LONG RANGE SENSOR SCAN'.
    0241  	DISPLAY '  SHOWS CONDITIONS IN SPACE FOR ONE QUADRANT ON EACH SIDE'.
    0242  	DISPLAY '  OF THE EXETER IN THE MIDDLE OF THE SCAN.  THE SCAN'.
    0243  	DISPLAY '  IS CODED IN THE FORM "KBS", WHERE K IS THE NUMBER'.
    0244  	DISPLAY '  OF KLINGONS, B IS THE NUMBER OF STARBASES, AND S IS'.
    0245  	DISPLAY '  THE NUMBER OF STARS.'.
    0246  	DISPLAY ' '.
    0247  	DISPLAY 'COMMAND 3 = PHASER CONTROL'.
    0248  	DISPLAY '  ALLOWS YOU TO DESTROY THE KLINGONS BY HITTING THEM WITH'.
    0249  	DISPLAY '  SUITABLY LARGE NUMBERS OF ENERGY UNITS TO DEPLETE THEIR'.
    0250  	DISPLAY '  SHIELD POWER.  KEEP IN MIND THAT WHEN YOU SHOOT AT THEM.'.
    0251  	DISPLAY '  THEY GONNA SHOOT AT YOU, TOO!'.
    0252  	DISPLAY ' '.
    0253  	DISPLAY 'COMMAND 4 = PHOTON TORPEDO CONTROL'
    0254  	DISPLAY '  COURSE IS THE SAME AS USED IN WARP ENGINE CONTROL.'
    0255  	DISPLAY '  IF YOU HIT THE KLINGON, HE IS DESTROYED AND CANNOT FIRE'
    0256  	DISPLAY '  BACK AT YOU.  IF YOU MISS, YOU ARE SUBJECT TO HIS'
    0257  	DISPLAY '  PHASER FIRE.'
    0258  	DISPLAY '  NOTE:  THE LIBRARY COMPUTER (COMMAND 7) HAS AN OPTION'
    0259  	DISPLAY '  TO COMPUTE TORPEDO TRAJECTORY FOR YOU (OPTION 2).'
    0260  	DISPLAY ' '.
    0261  	DISPLAY 'COMMAND 5 = SHIELD CONTROL'
    0262  	DISPLAY '  DEFINES NUMBER OF ENERGY UNITS TO BE ASSIGNED TO SHIELDS.'
    0263  	DISPLAY "  ENERGY IS TAKEN FORM TOTAL SHIP'S ENERGY."
    0264  	DISPLAY '  NOTE:  TOTAL ENERGY INCLUDES SHIELD ENERGY.'
    0265  	DISPLAY ' '.
    0266  	DISPLAY 'COMMAND 6 = DAMAGE CONTROL REPORT'
    0267  	DISPLAY '  GIVES THE STATE OF REPAIRS OF ALL DEVICES.  A STATE OF REPAIR'
    0268  	DISPLAY '  LESS THAN ZERO SHOWS THAT THE DEVICE IS TEMPORALLY'
    0269  	DISPLAY '  DAMAGED.'
    0270  	DISPLAY ' '.
    0271  	DISPLAY 'COMMAND 7 = LIBRARY COMPUTER'
    0272  	DISPLAY '  THE LIBRARY COMPUTER CONTAINS THREE OPTIONS:'
    0273  	DISPLAY '    OPTION 0 = CUMULATIVE GALACTIC RECORD'
    0274  	DISPLAY '      WHICH SHOWS COMPUTER MEMORY OF THE RESULTS'
    0275  	DISPLAY '      OF ALL PREVIOUS LONG RANGE SENSOR SCANS.'
    0276  	DISPLAY '    OPTION 1 = STATUS REPORT'
    0277  	DISPLAY '      WHICH SHOWS IMPORTANT INFORMATION REGARDING THE'
    0278  	DISPLAY '      STATUS OF YOUR MISSION (EFFICIENCY RATING).'.
    0279  	DISPLAY '    OPTION 2 = PHOTON TORPEDO DATA'
    0280  	DISPLAY '      GIVES TRAJECTORY AND DISTANCE BETWEEN THE'
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-5
    EXETER.CBL    22-JUN-64  09:05

    0281  	DISPLAY '      EXETER AND ALL KLINGONS IN YOUR QUADRANT'
    0282  	DISPLAY '    OPTION 3 = CALCULATOR'
    0283  	DISPLAY '      CAN BE USED TO AID NAVIGATION OR DOCKING.'
    0284  	DISPLAY '      ENTER COORDINATES (QUADRANT OR SECTOR)'
    0285  	DISPLAY '      OF THE SHIP AND TARGET - IN SOURCE, DESTINATION'
    0286  	DISPLAY '      FORMAT - EG...S,S,T,T'
    0287  	DISPLAY ' '.
    0288  	DISPLAY 'COMMAND 8 = BEGIN NEW CONTEST'
    0289  	DISPLAY '  STARTS PROGRAM OVER AGAIN WITH ALL NEW DATA.'
    0290  	DISPLAY '  USED TO CREATE MORE CHALLENGING SETUP - IE: MORE'
    0291  	DISPLAY '  KLINGONS AND FEWER STARBASES!'
    0292  	DISPLAY ' '.
    0293  	DISPLAY ' '.
    0294    BEGIN-NEW-CONTEST.
    0295  * SET UP THE RANDOM NUMBER GENERATOR
    0296  	MOVE TODAY TO SEED.
    0297  	PERFORM RANDOMIZE.
    0298  	MOVE 10 TO TORPEDO-COUNTER.
    0299  	MOVE 30 TO STARDATES-LEFT.
    0300  	MOVE 3000 TO TOTAL-ENERGY
    0301  		     WARP-ENERGY.
    0302  	MOVE ZEROS TO 
    0303  		SHIELD-ENERGY
    0304  		DAMAGE-WARP-DRIVE
    0305  		DAMAGE-SHORT-RANGE-SENSORS
    0306  		DAMAGE-LONG-RANGE-SENSORS
    0307  		DAMAGE-PHASERS
    0308  		DAMAGE-PHOTON-TUBES
    0309  		DAMAGE-DAMAGE-CONTROL
    0310  		DAMAGE-SHIELDS
    0311  		DAMAGE-COMPUTER
    0312  		DAMAGE-SEVERITY-FACTOR
    0313  		KLINGON-ONE
    0314  		KLINGON-TWO
    0315  		KLINGON-THREE
    0316  		SUM-OF-PHASER-HITS
    0317  		MASTER-GALAXY-LAYOUT
    0318  		NAVIGATION-ERRORS
    0319  		TORPEDO-MISSES
    0320  		TOTAL-KLINGONS
    0321  		KLINGONS-LEFT
    0322  		TOTAL-STARBASES
    0323  		COMPUTER-GALACTIC-RECORD
    0324  		STARBASES-LEFT
    0325  		STARBASE-VISITS.
    0326  	MOVE SPACES TO
    0327  		PRESENT-SECTOR-LAYOUT.
    0328  * SET UP THE NAVIGATION CHART.
    0329  	MOVE -1 TO	CHART (2,1)
    0330  			CHART (3,1)
    0331  			CHART (4,1)
    0332  			CHART (4,2)
    0333  			CHART (5,2)
    0334  			CHART (6,2).
    0335  	MOVE 0 TO	CHART (1,1)
    0336  			CHART (3,2)
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-6
    EXETER.CBL    22-JUN-64  09:05

    0337  			CHART (5,1)
    0338  			CHART (7,2)
    0339  			CHART (9,1).
    0340  	MOVE 1 TO	CHART (1,2)
    0341  			CHART (2,2)
    0342  			CHART (6,1)
    0343  			CHART (7,1)
    0344  			CHART (8,1)
    0345  			CHART (8,2)
    0346  			CHART (9,2).
    0347  * PUT THE USS EXETER SOMEWHERE.
    0348  	PERFORM RANDOMIZE.
    0349  	COMPUTE NCC-1706-QUADRANT-X = (RAN + 12.4) / 12.4.
    0350  	PERFORM RANDOMIZE.
    0351  	COMPUTE NCC-1706-QUADRANT-Y = (RAN + 12.4) / 12.4.
    0352  	PERFORM RANDOMIZE.
    0353  	COMPUTE NCC-1706-SECTOR-X   = (RAN + 12.4) / 12.4.
    0354  	PERFORM RANDOMIZE.
    0355  	COMPUTE NCC-1706-SECTOR-Y   = (RAN + 12.4) / 12.4.
    0356  * SET UP GALAXY.
    0357  	MOVE 1 TO I, J.
    0358    KLINGON-GENERATOR.
    0359  	PERFORM RANDOMIZE.
    0360  	IF RAN > 97
    0361  		MOVE 300 TO MASTER-GALAXY (I,J)
    0362  		ADD 3 TO TOTAL-KLINGONS
    0363  		GO TO STARBASE-GENERATOR.
    0364  	IF RAN > 94
    0365  		MOVE 200 TO MASTER-GALAXY (I,J)
    0366  		ADD 2 TO TOTAL-KLINGONS
    0367  		GO TO STARBASE-GENERATOR.
    0368  	IF RAN > 79
    0369  		MOVE 100 TO MASTER-GALAXY (I,J)
    0370  		ADD 1 TO TOTAL-KLINGONS.
    0371    STARBASE-GENERATOR.
    0372  	PERFORM RANDOMIZE.
    0373  	IF RAN > 95
    0374  		ADD 10 TO MASTER-GALAXY (I,J)
    0375  		ADD 1 TO TOTAL-STARBASES
    0376  			 STARBASES-LEFT.
    0377  	PERFORM RANDOMIZE.
    0378  	COMPUTE X = (RAN + 12.4) / 12.4.
    0379  	ADD X TO MASTER-GALAXY (I,J).
    0380  	ADD 1 TO J.
    0381  	IF J < 9 GO TO KLINGON-GENERATOR.
    0382  	MOVE 1 TO J.
    0383  	ADD 1 TO I.
    0384  	IF I < 9 GO TO KLINGON-GENERATOR.
    0385  	MOVE TOTAL-KLINGONS TO KLINGONS-LEFT.
    0386  	IF TOTAL-STARBASES = ZERO
    0387  		PERFORM RANDOMIZE
    0388  		COMPUTE I = (RAN + 12.4) / 12.4
    0389  		PERFORM RANDOMIZE
    0390  		COMPUTE J = (RAN + 12.4) / 12.4
    0391  		ADD 10 TO MASTER-GALAXY (I,J)
    0392  		MOVE 1 TO TOTAL-STARBASES
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-7
    EXETER.CBL    22-JUN-64  09:05

    0393  			  STARBASES-LEFT.
    0394  	DISPLAY ' '.
    0395  	DISPLAY ' '.
    0396  	DISPLAY ' '.
    0397  	DISPLAY 'YOU MUST DESTROY ' TOTAL-KLINGONS 
    0398  		' KLINGONS IN 30 STARDATES WITH ' TOTAL-STARBASES 
    0399  		' STARBASES!!!!'.
    0400  	DISPLAY ' '.
    0401  	DISPLAY ' '.
    0402  	DISPLAY ' '.
    0403  	DISPLAY ' '.
    0404  	DISPLAY ' '.
    0405  	DISPLAY ' '.
    0406  	DISPLAY ' '.
    0407  	DISPLAY ' '.
    0408  	PERFORM RANDOMIZE.
    0409  	COMPUTE STARDATE = ((RAN / 5) + 20) * 100
    0410    STARSHIP-PLACEMENT.
    0411  * THIS CHECKS TO MAKE SURE WE ARE IN OUR ASSIGNED
    0412  * REGION OF THE GALAXY.
    0413  	IF NCC-1706-QUADRANT-X < 1 OR > 8
    0414  		MOVE ZEROS TO	STARS-IN-PRESENT-SECTOR
    0415  				STARBASE-IN-PRESENT-SECTOR
    0416  				KLINGONS-IN-PRESENT-SECTOR
    0417  		GO TO EMPTY-SPACE.
    0418  	IF NCC-1706-QUADRANT-Y < 1 OR > 8
    0419  		MOVE ZEROS TO	STARS-IN-PRESENT-SECTOR
    0420  				STARBASE-IN-PRESENT-SECTOR
    0421  				KLINGONS-IN-PRESENT-SECTOR
    0422  		GO TO EMPTY-SPACE.
    0423  	MOVE MASTER-GALAXY (NCC-1706-QUADRANT-X,NCC-1706-QUADRANT-Y)
    0424  		TO STARS-IN-PRESENT-SECTOR, TEMP-3, TEMP-2.
    0425  	DIVIDE TEMP-2 BY 10 GIVING STARBASE-IN-PRESENT-SECTOR.
    0426  	DIVIDE TEMP-3 BY 100 GIVING KLINGONS-IN-PRESENT-SECTOR.
    0427  	IF KLINGONS-IN-PRESENT-SECTOR = ZERO GO TO EMPTY-SPACE.
    0428  	IF SHIELD-ENERGY < 201
    0429  		DISPLAY ' '
    0430  		DISPLAY ' '
    0431  		DISPLAY '   SHIELDS DANGEROUSLY LOW'.
    0432  	DISPLAY ' '.
    0433  	DISPLAY 'COMBAT AREA      CONDITION RED'.
    0434    EMPTY-SPACE.
    0435  	MOVE ZEROS TO
    0436  		KLINGON-ONE
    0437  		KLINGON-TWO
    0438  		KLINGON-THREE.
    0439  * PUT THE EXETER SOMEWHERE.
    0440  	MOVE SPACES TO PRESENT-SECTOR-LAYOUT.
    0441  	MOVE '<*>' TO PRESENT-SECTOR (NCC-1706-SECTOR-X,NCC-1706-SECTOR-Y).
    0442  	MOVE 1 TO I.
    0443  	IF KLINGONS-IN-PRESENT-SECTOR = ZERO GO TO STARBASE-INSERTION.
    0444    KLINGON-INSERTION.
    0445  	PERFORM RANDOMIZE.
    0446  	COMPUTE X = (RAN + 12.4) / 12.4.
    0447  	PERFORM RANDOMIZE.
    0448  	COMPUTE Y = (RAN + 12.4) / 12.4.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-8
    EXETER.CBL    22-JUN-64  09:05

    0449  	IF PRESENT-SECTOR (X,Y) IS NOT = SPACES GO TO KLINGON-INSERTION.
    0450  	MOVE '+++' TO PRESENT-SECTOR (X,Y).
    0451  	IF I = 1
    0452  		MOVE 200 TO ENERGY OF KLINGON-ONE
    0453  		MOVE X TO X-COORD OF KLINGON-ONE
    0454  		MOVE Y TO Y-COORD OF KLINGON-ONE.
    0455  	IF I = 2
    0456  		MOVE 200 TO ENERGY OF KLINGON-TWO
    0457  		MOVE X TO X-COORD OF KLINGON-TWO
    0458  		MOVE Y TO Y-COORD OF KLINGON-TWO.
    0459  	IF I = 3
    0460  		MOVE 200 TO ENERGY OF KLINGON-THREE
    0461  		MOVE X TO X-COORD OF KLINGON-THREE
    0462  		MOVE Y TO Y-COORD OF KLINGON-THREE.
    0463  	ADD 1 TO I
    0464  	IF I IS NOT > KLINGONS-IN-PRESENT-SECTOR GO TO KLINGON-INSERTION.
    0465  	MOVE 1 TO I.
    0466    STARBASE-INSERTION.
    0467  	IF STARBASE-IN-PRESENT-SECTOR = ZERO GO TO STAR-INSERTION.
    0468  	PERFORM RANDOMIZE.
    0469  	COMPUTE X = (RAN + 12.4) / 12.4.
    0470  	PERFORM RANDOMIZE.
    0471  	COMPUTE Y = (RAN + 12.4) / 12.4.
    0472  	IF PRESENT-SECTOR (X,Y) IS NOT = SPACES GO TO STARBASE-INSERTION.
    0473  	MOVE '>!<' TO PRESENT-SECTOR (X,Y).
    0474    STAR-INSERTION.
    0475  	IF STARS-IN-PRESENT-SECTOR = ZERO GO TO DOCK-SCAN.
    0476  	PERFORM RANDOMIZE.
    0477  	COMPUTE X = (RAN + 12.4) / 12.4.
    0478  	PERFORM RANDOMIZE.
    0479  	COMPUTE Y = (RAN + 12.4) / 12.4.
    0480  	IF PRESENT-SECTOR (X,Y) IS NOT = SPACES GO TO STAR-INSERTION.
    0481  	MOVE ' * ' TO PRESENT-SECTOR (X,Y).
    0482  	ADD 1 TO I
    0483  	IF I IS NOT > STARS-IN-PRESENT-SECTOR GO TO STAR-INSERTION.
    0484    DOCK-SCAN.
    0485  	MOVE -1 TO X, Y.
    0486  	MOVE NCC-1706-SECTOR-X TO DOCK-TEST-X.
    0487  	MOVE NCC-1706-SECTOR-Y TO DOCK-TEST-Y.
    0488  	SUBTRACT 1 FROM DOCK-TEST-X
    0489  			DOCK-TEST-Y.
    0490    CHECK-FOR-DOCKING.
    0491  	IF DOCK-TEST-X < 1 OR > 8 GO TO DOCKING-LOOP.
    0492  	IF DOCK-TEST-Y < 1 OR > 8 GO TO DOCKING-LOOP.
    0493  	IF PRESENT-SECTOR (DOCK-TEST-X,DOCK-TEST-Y)
    0494  		IS NOT EQUAL '>!<' GO TO DOCKING-LOOP.
    0495    DOCKING-PROCEDURE.
    0496  	ADD 1 TO STARBASE-VISITS.
    0497  	MOVE 'DOCKED' TO CONDITION.
    0498  	MOVE 3000 TO TOTAL-ENERGY
    0499  		     WARP-ENERGY.
    0500  	MOVE ZERO TO SHIELD-ENERGY.
    0501  	MOVE 10 TO TORPEDO-COUNTER.
    0502  	IF DAMAGE-WARP-DRIVE IS NEGATIVE
    0503  		MOVE ZERO TO DAMAGE-WARP-DRIVE.
    0504  	IF DAMAGE-SHORT-RANGE-SENSORS IS NEGATIVE
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-9
    EXETER.CBL    22-JUN-64  09:05

    0505  		MOVE ZERO TO DAMAGE-SHORT-RANGE-SENSORS.
    0506  	IF DAMAGE-LONG-RANGE-SENSORS IS NEGATIVE
    0507  		MOVE ZERO TO DAMAGE-LONG-RANGE-SENSORS.
    0508  	IF DAMAGE-PHASERS IS NEGATIVE
    0509  		MOVE ZERO TO DAMAGE-PHASERS.
    0510  	IF DAMAGE-PHOTON-TUBES IS NEGATIVE
    0511  		MOVE ZERO TO DAMAGE-PHOTON-TUBES.
    0512  	IF DAMAGE-DAMAGE-CONTROL IS NEGATIVE
    0513  		MOVE ZERO TO DAMAGE-DAMAGE-CONTROL.
    0514  	IF DAMAGE-SHIELDS IS NEGATIVE
    0515  		MOVE ZERO TO DAMAGE-SHIELDS.
    0516  	IF DAMAGE-COMPUTER IS NEGATIVE
    0517  		MOVE ZERO TO DAMAGE-COMPUTER.
    0518  	DISPLAY ' '.
    0519  	DISPLAY 'SHIELDS DROPPED FOR DOCKING PURPOSES'.
    0520  	GO TO SHORT-RANGE-SENSOR-SCAN.
    0521    DOCKING-LOOP.
    0522  	ADD 1 TO Y
    0523  		DOCK-TEST-Y.
    0524  	IF Y > 1
    0525  		MOVE -1 TO Y
    0526  		SUBTRACT 1 FROM NCC-1706-SECTOR-Y GIVING DOCK-TEST-Y
    0527  		ADD 1 TO X
    0528  			DOCK-TEST-X.
    0529  	IF X < 2 GO TO CHECK-FOR-DOCKING.
    0530  	IF KLINGONS-IN-PRESENT-SECTOR > 0
    0531  		MOVE 'RED' TO CONDITION
    0532  		GO TO SHORT-RANGE-SENSOR-SCAN.
    0533  	IF TOTAL-ENERGY < 300
    0534  		MOVE 'YELLOW' TO CONDITION
    0535  		ELSE MOVE 'GREEN' TO CONDITION.
    0536    SHORT-RANGE-SENSOR-SCAN.
    0537  	IF DAMAGE-SHORT-RANGE-SENSORS < 0
    0538  		DISPLAY ' '
    0539  		DISPLAY '*** SHORT RANGE SENSORS ARE OUT ***'
    0540  		DISPLAY ' '
    0541  		GO TO HELL.
    0542  	DISPLAY ' '.
    0543  	DISPLAY 'SHORT RANGE SENSOR SCAN'.
    0544  	DISPLAY '------------------------'.
    0545  	MOVE STARDATE TO DISPLAY-STARDATE.
    0546  	DISPLAY PRESENT-SECTOR (1,1)
    0547  		PRESENT-SECTOR (1,2)
    0548  		PRESENT-SECTOR (1,3)
    0549  		PRESENT-SECTOR (1,4)
    0550  		PRESENT-SECTOR (1,5)
    0551  		PRESENT-SECTOR (1,6)
    0552  		PRESENT-SECTOR (1,7)
    0553  		PRESENT-SECTOR (1,8)
    0554  		'      STARDATE     '
    0555  		DISPLAY-STARDATE.
    0556  	DISPLAY PRESENT-SECTOR (2,1)
    0557  		PRESENT-SECTOR (2,2)
    0558  		PRESENT-SECTOR (2,3)
    0559  		PRESENT-SECTOR (2,4)
    0560  		PRESENT-SECTOR (2,5)
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-10
    EXETER.CBL    22-JUN-64  09:05

    0561  		PRESENT-SECTOR (2,6)
    0562  		PRESENT-SECTOR (2,7)
    0563  		PRESENT-SECTOR (2,8)
    0564  		'      CONDITION    '
    0565  		CONDITION.
    0566  * RAYMOND FUSCI'S FAMOUS FLOATING COMMA ROUTINE.
    0567  	MOVE NCC-1706-QUADRANT-Y TO DISPLAY-Y.
    0568  		IF DISPLAY-X-1 EQUALS SPACES
    0569  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-1
    0570  			GO TO RAYS-FLOATING-COMMA-BYPASS.
    0571  		IF DISPLAY-X-2 EQUALS SPACES
    0572  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-2
    0573  			GO TO RAYS-FLOATING-COMMA-BYPASS.
    0574  		IF DISPLAY-X-3 EQUALS SPACES
    0575  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-3
    0576  			GO TO RAYS-FLOATING-COMMA-BYPASS.
    0577  		MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-4.
    0578    RAYS-FLOATING-COMMA-BYPASS.
    0579  	DISPLAY PRESENT-SECTOR (3,1)
    0580  		PRESENT-SECTOR (3,2)
    0581  		PRESENT-SECTOR (3,3)
    0582  		PRESENT-SECTOR (3,4)
    0583  		PRESENT-SECTOR (3,5)
    0584  		PRESENT-SECTOR (3,6)
    0585  		PRESENT-SECTOR (3,7)
    0586  		PRESENT-SECTOR (3,8)
    0587  		'      QUADRANT  '
    0588  		DISPLAY-QUADRANT.
    0589  	DISPLAY PRESENT-SECTOR (4,1)
    0590  		PRESENT-SECTOR (4,2)
    0591  		PRESENT-SECTOR (4,3)
    0592  		PRESENT-SECTOR (4,4)
    0593  		PRESENT-SECTOR (4,5)
    0594  		PRESENT-SECTOR (4,6)
    0595  		PRESENT-SECTOR (4,7)
    0596  		PRESENT-SECTOR (4,8)
    0597  		'      SECTOR          '
    0598  		NCC-1706-SECTOR-X
    0599  		','
    0600  		NCC-1706-SECTOR-Y.
    0601  	MOVE TOTAL-ENERGY TO DISPLAY-TOTAL-ENERGY.
    0602  	DISPLAY PRESENT-SECTOR (5,1)
    0603  		PRESENT-SECTOR (5,2)
    0604  		PRESENT-SECTOR (5,3)
    0605  		PRESENT-SECTOR (5,4)
    0606  		PRESENT-SECTOR (5,5)
    0607  		PRESENT-SECTOR (5,6)
    0608  		PRESENT-SECTOR (5,7)
    0609  		PRESENT-SECTOR (5,8)
    0610  		'      TOTAL ENERGY  '
    0611  		DISPLAY-TOTAL-ENERGY.
    0612  	MOVE TORPEDO-COUNTER TO DISPLAY-TORPEDO-COUNTER.
    0613  	DISPLAY PRESENT-SECTOR (6,1)
    0614  		PRESENT-SECTOR (6,2)
    0615  		PRESENT-SECTOR (6,3)
    0616  		PRESENT-SECTOR (6,4)
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-11
    EXETER.CBL    22-JUN-64  09:05

    0617  		PRESENT-SECTOR (6,5)
    0618  		PRESENT-SECTOR (6,6)
    0619  		PRESENT-SECTOR (6,7)
    0620  		PRESENT-SECTOR (6,8)
    0621  		'      PHOTON TORPEDOS  '
    0622  		DISPLAY-TORPEDO-COUNTER.
    0623  	MOVE SHIELD-ENERGY TO DISPLAY-SHIELD-ENERGY.
    0624  	DISPLAY PRESENT-SECTOR (7,1)
    0625  		PRESENT-SECTOR (7,2)
    0626  		PRESENT-SECTOR (7,3)
    0627  		PRESENT-SECTOR (7,4)
    0628  		PRESENT-SECTOR (7,5)
    0629  		PRESENT-SECTOR (7,6)
    0630  		PRESENT-SECTOR (7,7)
    0631  		PRESENT-SECTOR (7,8)
    0632  		'      SHIELDS        '
    0633  		DISPLAY-SHIELD-ENERGY.
    0634  	DISPLAY PRESENT-SECTOR (8,1)
    0635  		PRESENT-SECTOR (8,2)
    0636  		PRESENT-SECTOR (8,3)
    0637  		PRESENT-SECTOR (8,4)
    0638  		PRESENT-SECTOR (8,5)
    0639  		PRESENT-SECTOR (8,6)
    0640  		PRESENT-SECTOR (8,7)
    0641  		PRESENT-SECTOR (8,8).
    0642  	DISPLAY '------------------------'.
    0643    HELL.
    0644  	DISPLAY ' '.
    0645  	DISPLAY ' '.
    0646  	DISPLAY 'COMMAND:' WITH NO ADVANCING.
    0647  	ACCEPT COMMAND.
    0648  	IF COMMAND EQUALS ZERO GO TO WARP-ENGINE-CONTROL.
    0649  	GO TO	SHORT-RANGE-SENSOR-SCAN
    0650  		LONG-RANGE-SENSOR-SCAN
    0651  		PHASER-CONTROL
    0652  		PHOTON-TORPEDO-CONTROL
    0653  		SHIELD-CONTROL
    0654  		DAMAGE-CONTROL-REPORT
    0655  		LIBRARY-COMPUTER
    0656  		BEGIN-NEW-CONTEST
    0657  			DEPENDING ON COMMAND.
    0658  	DISPLAY ' '.
    0659  	DISPLAY ' '.
    0660  	DISPLAY '0 = WARP ENGINE CONTROL'.
    0661  	DISPLAY '1 = SHORT RANGE SENSOR SCAN'.
    0662  	DISPLAY '2 = LONG RANGE SENSOR SCAN'.
    0663  	DISPLAY '3 = PHASER CONTROL'.
    0664  	DISPLAY '4 = PHOTON TORPEDO CONTROL'.
    0665  	DISPLAY '5 = SHIELD CONTROL'.
    0666  	DISPLAY '6 = DAMAGE CONTROL REPORT'.
    0667  	DISPLAY '7 = LIBRARY COMPUTER'.
    0668  	DISPLAY '8 = BEGIN NEW CONTEST'.
    0669  	GO TO HELL.
    0670    WARP-ENGINE-CONTROL.
    0671  	DISPLAY 'COURSE (0-360)? ' WITH NO ADVANCING.
    0672  	ACCEPT COURSE.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-12
    EXETER.CBL    22-JUN-64  09:05

    0673  	IF COURSE < ZERO OR > 360 GO TO WARP-ENGINE-CONTROL.
    0674  * COMVERTIING THE COURSE TO INTERNAL FORMAT (1-9).
    0675  	COMPUTE VECTOR = 90 - COURSE.
    0676  	IF VECTOR IS NEGATIVE
    0677  		ADD 360 TO VECTOR.
    0678  	COMPUTE VECTOR = VECTOR / 45 + 1.
    0679  	DISPLAY 'WARP FACTOR (0-8)? ' WITH NO ADVANCING.
    0680  	ACCEPT WARP-FACTOR.
    0681  	IF WARP-FACTOR < ZERO OR > 8 GO TO HELL.
    0682  	IF DAMAGE-WARP-DRIVE IS NEGATIVE
    0683  		IF WARP-FACTOR > 1
    0684  			DISPLAY 'WARP DRIVE IS DISABLED!'
    0685  			DISPLAY 'IMPULSE ENGINES ACTIVATED'
    0686  			DISPLAY 'MAXIMUM SPEED = WARP 1'
    0687  			GO TO HELL.
    0688  * CONVERTING THE WARP FACTOR TO A CUBE CURVE FROM (0-8).
    0689  	COMPUTE WARP = WARP-FACTOR ** 3 / 64.
    0690  * THIS MAKES SURE THAT AT WARP 1 SOME MOVEMENT IS NOTICED.
    0691  	IF WARP < .1 AND > .0019
    0692  		MOVE .1 TO WARP.
    0693  	IF WARP < .2 AND > .1
    0694  		MOVE .2 TO WARP.
    0695  	IF KLINGONS-IN-PRESENT-SECTOR > ZERO
    0696  		PERFORM THE-ENEMY-SHOOTS-BACK.
    0697  	IF SHIELD-ENERGY IS NEGATIVE GO TO THE-EXETER-IS-DEAD.
    0698  	SUBTRACT SHIELD-ENERGY FROM TOTAL-ENERGY GIVING WARP-ENERGY.
    0699  	COMPUTE MOVE-DISTANCE = (WARP + .0625) * 8.
    0700  * DYLITHIUM CRYSTALS ARE RECHARGING
    0701  	ADD 5 TO WARP-ENERGY
    0702  		 TOTAL-ENERGY.
    0703  	SUBTRACT MOVE-DISTANCE FROM TOTAL-ENERGY
    0704  				    WARP-ENERGY.
    0705  	IF WARP-ENERGY > ZERO GO TO MR-SCOTT-DO-YOUR-THING.
    0706  	IF KLINGONS-IN-PRESENT-SECTOR EQUAL ZERO
    0707  		DISPLAY 'INSUFFICIENT ENERGY AVAILABLE FOR WARP FACTOR' 
    0708  			WARP-FACTOR
    0709  		ADD MOVE-DISTANCE TO WARP-ENERGY
    0710  				     TOTAL-ENERGY.
    0711  		GO TO HELL.
    0712  	DISPLAY 'THE EXETER IS DEAD IN SPACE.  IF YOU SURVIVE ALL IMPENDING'.
    0713  	DISPLAY 'ATTACKS YOU WILL BE DEMOTED TO THE RANK OF PRIVATE.'.
    0714    CERTAIN-DEATH-LOOP.
    0715  	PERFORM THE-ENEMY-SHOOTS-BACK.
    0716  	IF SHIELD-ENERGY IS NEGATIVE GO TO THE-EXETER-IS-DEAD.
    0717  	GO TO CERTAIN-DEATH-LOOP.
    0718    MR-SCOTT-DO-YOUR-THING.
    0719  	IF DAMAGE-WARP-DRIVE IS NEGATIVE
    0720  		ADD 1 TO DAMAGE-WARP-DRIVE.
    0721  	IF DAMAGE-SHORT-RANGE-SENSORS IS NEGATIVE
    0722  		ADD 1 TO DAMAGE-SHORT-RANGE-SENSORS.
    0723  	IF DAMAGE-LONG-RANGE-SENSORS IS NEGATIVE
    0724  		ADD 1 TO DAMAGE-LONG-RANGE-SENSORS.
    0725  	IF DAMAGE-PHASERS IS NEGATIVE
    0726  		ADD 1 TO DAMAGE-PHASERS.
    0727  	IF DAMAGE-PHOTON-TUBES IS NEGATIVE
    0728  		ADD 1 TO DAMAGE-PHOTON-TUBES.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-13
    EXETER.CBL    22-JUN-64  09:05

    0729  	IF DAMAGE-DAMAGE-CONTROL IS NEGATIVE
    0730  		ADD 1 TO DAMAGE-DAMAGE-CONTROL.
    0731  	IF DAMAGE-SHIELDS IS NEGATIVE
    0732  		ADD 1 TO DAMAGE-SHIELDS.
    0733  	IF DAMAGE-COMPUTER IS NEGATIVE
    0734  		ADD 1 TO DAMAGE-COMPUTER.
    0735  	PERFORM RANDOMIZE.
    0736  	IF RAN > 19 GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0737  	DISPLAY 'DAMAGE CONTROL REPORTS ' WITH NO ADVANCING.
    0738  	PERFORM RANDOMIZE.
    0739  	IF RAN > 49 GO TO GOOD-NEWS.
    0740    BAD-NEWS.
    0741  	DISPLAY 'DAMAGE TO ' WITH NO ADVANCING.
    0742  	PERFORM RANDOMIZE.
    0743  	COMPUTE WHO-GOT-HIT = (RAN + 12.4) / 12.4.
    0744  	PERFORM RANDOMIZE.
    0745  	COMPUTE DAMAGE = (RAN + 1) / 20.
    0746  	ADD DAMAGE TO DAMAGE-SEVERITY-FACTOR.
    0747  	GO TO BAD-NEWS-WARP-DRIVE
    0748  	      BAD-NEWS-SHORT-RANGE-SENSORS
    0749  	      BAD-NEWS-LONG-RANGE-SENSORS
    0750  	      BAD-NEWS-PHASERS
    0751  	      BAD-NEWS-PHOTON-TUBES
    0752  	      BAD-NEWS-DAMAGE-CONTROL
    0753  	      BAD-NEWS-SHIELDS
    0754  	      BAD-NEWS-COMPUTER
    0755  			DEPENDING ON WHO-GOT-HIT.
    0756    BAD-NEWS-WARP-DRIVE.
    0757  	DISPLAY 'WARP DRIVE.'.
    0758  	SUBTRACT DAMAGE FROM DAMAGE-WARP-DRIVE.
    0759  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0760    BAD-NEWS-SHORT-RANGE-SENSORS.
    0761  	DISPLAY 'SHORT RANGE SENSORS.'.
    0762  	SUBTRACT DAMAGE FROM DAMAGE-SHORT-RANGE-SENSORS.
    0763  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0764    BAD-NEWS-LONG-RANGE-SENSORS.
    0765  	DISPLAY 'LONG RANGE SENSORS.'.
    0766  	SUBTRACT DAMAGE FROM DAMAGE-LONG-RANGE-SENSORS.
    0767  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0768    BAD-NEWS-PHASERS.
    0769  	DISPLAY 'PHASERS.'.
    0770  	SUBTRACT DAMAGE FROM DAMAGE-PHASERS.
    0771  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0772    BAD-NEWS-PHOTON-TUBES.
    0773  	DISPLAY 'PHOTON TUBES.'.
    0774  	SUBTRACT DAMAGE FROM DAMAGE-PHOTON-TUBES.
    0775  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0776    BAD-NEWS-DAMAGE-CONTROL.
    0777  	DISPLAY 'DAMAGE CONTROL.'.
    0778  	SUBTRACT DAMAGE FROM DAMAGE-DAMAGE-CONTROL.
    0779  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0780    BAD-NEWS-SHIELDS.
    0781  	DISPLAY 'SHIELD CONTROL.'.
    0782  	SUBTRACT DAMAGE FROM DAMAGE-SHIELDS.
    0783  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0784    BAD-NEWS-COMPUTER.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-14
    EXETER.CBL    22-JUN-64  09:05

    0785  	DISPLAY 'COMPUTER.'.
    0786  	SUBTRACT DAMAGE FROM DAMAGE-COMPUTER.
    0787  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0788    GOOD-NEWS.
    0789  	DISPLAY 'CONDITION IMPROVED ON ' WITH NO ADVANCING.
    0790  	PERFORM RANDOMIZE.
    0791  	COMPUTE WHO-GOT-HIT = (RAN + 12.4) / 12.4.
    0792  	PERFORM RANDOMIZE.
    0793  	COMPUTE REPAIR = (RAN + 1) / 20.
    0794  	ADD REPAIR TO DAMAGE-SEVERITY-FACTOR.
    0795  	GO TO	GOOD-NEWS-WARP-DRIVE
    0796  		GOOD-NEWS-SHORT-RANGE-SENSORS
    0797  		GOOD-NEWS-LONG-RANGE-SENSORS
    0798  		GOOD-NEWS-PHASERS
    0799  		GOOD-NEWS-PHOTON-TUBES
    0800  		GOOD-NEWS-DAMAGE-CONTROL
    0801  		GOOD-NEWS-SHIELDS
    0802  		GOOD-NEWS-COMPUTER
    0803  			DEPENDING ON WHO-GOT-HIT.
    0804    GOOD-NEWS-WARP-DRIVE.
    0805  	DISPLAY 'WARP DRIVE.'.
    0806  	ADD REPAIR TO DAMAGE-WARP-DRIVE.
    0807  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0808    GOOD-NEWS-SHORT-RANGE-SENSORS.
    0809  	DISPLAY 'SHORT RANGE SENSORS.'.
    0810  	ADD REPAIR TO DAMAGE-SHORT-RANGE-SENSORS.
    0811  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0812    GOOD-NEWS-LONG-RANGE-SENSORS.
    0813  	DISPLAY 'LONG RANGE SENSORS.'.
    0814  	ADD REPAIR TO DAMAGE-LONG-RANGE-SENSORS.
    0815  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0816    GOOD-NEWS-PHASERS.
    0817  	DISPLAY 'PHASERS.'.
    0818  	ADD REPAIR TO DAMAGE-PHASERS.
    0819  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0820    GOOD-NEWS-PHOTON-TUBES.
    0821  	DISPLAY 'PHOTON TUBES.'.
    0822  	ADD REPAIR TO DAMAGE-PHOTON-TUBES.
    0823  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0824    GOOD-NEWS-DAMAGE-CONTROL.
    0825  	DISPLAY 'DAMAGE CONTROL.'.
    0826  	ADD REPAIR TO DAMAGE-DAMAGE-CONTROL
    0827  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0828    GOOD-NEWS-SHIELDS.
    0829  	DISPLAY 'SHIELDS.'.
    0830  	ADD REPAIR TO DAMAGE-SHIELDS.
    0831  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0832    GOOD-NEWS-COMPUTER.
    0833  	DISPLAY 'COMPUTER.'.
    0834  	ADD REPAIR TO DAMAGE-COMPUTER.
    0835  	GO TO ZERO-THE-SECTOR-WE-LEAVE.
    0836    ZERO-THE-SECTOR-WE-LEAVE.
    0837  	IF WARP < .0019 GO TO PARK-THE-EXETER.
    0838  	MOVE SPACES TO PRESENT-SECTOR 
    0839  		(NCC-1706-SECTOR-X,NCC-1706-SECTOR-Y).
    0840  	MOVE NCC-1706-SECTOR-X TO REAL-X.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-15
    EXETER.CBL    22-JUN-64  09:05

    0841  	MOVE NCC-1706-SECTOR-Y TO REAL-Y.
    0842  	MOVE VECTOR TO INT-VECTOR.
    0843  	MOVE 1 TO I.
    0844  	COMPUTE INT1-VECTOR = VECTOR + 1.
    0845  	COMPUTE X1 = CHART (INT-VECTOR,1) + 
    0846  		(CHART (INT1-VECTOR,1) - CHART (INT-VECTOR,1))
    0847  		 * (VECTOR - INT-VECTOR).
    0848  	COMPUTE X2 = CHART (INT-VECTOR,2) + 
    0849  		(CHART (INT1-VECTOR,2) - CHART (INT-VECTOR,2))
    0850  		 * (VECTOR - INT-VECTOR).
    0851    NAVIGATION-LOOP.
    0852  	ADD X1 TO REAL-X.
    0853  	ADD X2 TO REAL-Y.
    0854  	COMPUTE X = REAL-X + .5.
    0855  	COMPUTE Y = REAL-Y + .5.
    0856  * DID WE FLY OUT OF OUR QUADRANT?
    0857  	IF X < 1 OR > 8 OR Y < 1 OR > 8 GO TO CHANGE-QUADRANTS.
    0858  * DID WE HIT ANYTHING?
    0859  	IF PRESENT-SECTOR (X,Y) IS NOT EQUAL TO SPACES GO TO COLLISION.
    0860  	IF I < MOVE-DISTANCE
    0861  		ADD 1 TO I
    0862  		GO TO NAVIGATION-LOOP.
    0863  	MOVE X TO NCC-1706-SECTOR-X.
    0864  	MOVE Y TO NCC-1706-SECTOR-Y.
    0865  	GO TO PARK-THE-EXETER.
    0866    COLLISION.
    0867  	ADD 1 TO NAVIGATION-ERRORS.
    0868  * BACK UP ONE SECTOR
    0869  	COMPUTE NCC-1706-SECTOR-X = X - X1.
    0870  	COMPUTE NCC-1706-SECTOR-Y = Y - X2.
    0871  	DISPLAY 'WARP ENGINES SHUTDOWN AT SECTOR ' NCC-1706-SECTOR-X 
    0872  		',' NCC-1706-SECTOR-Y ' DUE TO BAD NAVIGATION'.
    0873    PARK-THE-EXETER.
    0874  	MOVE '<*>' TO PRESENT-SECTOR (NCC-1706-SECTOR-X,
    0875  					      NCC-1706-SECTOR-Y).
    0876  	IF WARP < .11
    0877  		ADD .1 TO STARDATE
    0878  		SUBTRACT .1 FROM STARDATES-LEFT
    0879  	ELSE ADD 1 TO STARDATE
    0880  	     SUBTRACT 1 FROM STARDATES-LEFT.
    0881  	GO TO DOCK-SCAN.
    0882    TIME-IS-UP.
    0883  	IF STARDATES-LEFT IS NOT POSITIVE
    0884  		DISPLAY ' '
    0885  		DISPLAY 'IT IS STARDATE ' STARDATE
    0886  		DISPLAY 'YOU RAN OUT OF TIME.'
    0887  		DISPLAY 'THERE ARE STILL ' KLINGONS-LEFT 
    0888  			' KLINGON BATTLE CRUISERS.'
    0889  		DISPLAY ' '
    0890  		DISPLAY 'YOU CAN HAVE ANOTHER CHANCE....TURKEY!'
    0891  		GO TO BEGIN-NEW-CONTEST.
    0892    CHANGE-QUADRANTS.
    0893  	COMPUTE REAL-X = NCC-1706-QUADRANT-X * 8 + NCC-1706-SECTOR-X 
    0894  			+ X1 * MOVE-DISTANCE.
    0895  	COMPUTE REAL-Y = NCC-1706-QUADRANT-Y * 8 + NCC-1706-SECTOR-Y 
    0896  			+ X2 * MOVE-DISTANCE.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-16
    EXETER.CBL    22-JUN-64  09:05

    0897  	MOVE REAL-X TO X ROUNDED.
    0898  	MOVE REAL-Y TO Y ROUNDED.
    0899  	COMPUTE NCC-1706-QUADRANT-X = X / 8.
    0900  	COMPUTE NCC-1706-QUADRANT-Y = Y / 8.
    0901  	COMPUTE NCC-1706-SECTOR-X   = X - NCC-1706-QUADRANT-X * 8.
    0902  	COMPUTE NCC-1706-SECTOR-Y   = Y - NCC-1706-QUADRANT-Y * 8.
    0903  * IN THIS CRAZY MATH IT IS POSSIBLE TO ARRIVE AT SECTOR X,0 OR
    0904  * 0,X IN WHICH CASE WE MUST FALL BACKWARDS INTO ANOTHER QUADRANT AT
    0905  * SECTOR X,8 OR 8,X.
    0906  	IF NCC-1706-SECTOR-X EQUALS ZERO
    0907  		SUBTRACT 1 FROM NCC-1706-QUADRANT-X
    0908  		MOVE 8 TO NCC-1706-SECTOR-X.
    0909  	IF NCC-1706-SECTOR-Y EQUALS ZERO
    0910  		SUBTRACT 1 FROM NCC-1706-QUADRANT-Y
    0911  		MOVE 8 TO NCC-1706-SECTOR-Y.
    0912  	ADD 1 TO STARDATE.
    0913  	SUBTRACT 1 FROM STARDATES-LEFT.
    0914  	IF STARDATES-LEFT IS NOT POSITIVE GO TO TIME-IS-UP.
    0915  	GO TO STARSHIP-PLACEMENT.
    0916    LONG-RANGE-SENSOR-SCAN.
    0917  	IF DAMAGE-LONG-RANGE-SENSORS IS NEGATIVE
    0918  		DISPLAY 'LONG RANGE SENSORS ARE INOPERABLE'
    0919  		GO TO HELL.
    0920  * RAYMOND FUSCI'S FAMOUS FLOATING COMMA ROUTINE.
    0921  	MOVE NCC-1706-QUADRANT-Y TO DISPLAY-Y.
    0922  		IF DISPLAY-X-1 EQUALS SPACES
    0923  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-1
    0924  			GO TO RAYS-FLOATING-COMMA-BYPASS2.
    0925  		IF DISPLAY-X-2 EQUALS SPACES
    0926  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-2
    0927  			GO TO RAYS-FLOATING-COMMA-BYPASS2.
    0928  		IF DISPLAY-X-3 EQUALS SPACES
    0929  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-3
    0930  			GO TO RAYS-FLOATING-COMMA-BYPASS2.
    0931  		MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-4.
    0932    RAYS-FLOATING-COMMA-BYPASS2.
    0933  	DISPLAY 'LONG RANGE SENSOR SCAN FOR QUADRANT ' DISPLAY-QUADRANT.
    0934  	DISPLAY '-------------------'.
    0935  	MOVE NCC-1706-QUADRANT-X TO X.
    0936  	MOVE NCC-1706-QUADRANT-Y TO Y.
    0937  	SUBTRACT 1 FROM X, Y.
    0938  	DISPLAY ': ' WITH NO ADVANCING.
    0939  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0940  		DISPLAY '000 ' WITH NO ADVANCING
    0941  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    0942  		DISPLAY DISPLAY-MASTER-GALAXY ' ' WITH NO ADVANCING
    0943  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    0944  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    0945  	ADD 1 TO Y.
    0946  	DISPLAY ': ' WITH NO ADVANCING.
    0947  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0948  		DISPLAY '000 ' WITH NO ADVANCING
    0949  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    0950  		DISPLAY DISPLAY-MASTER-GALAXY ' ' WITH NO ADVANCING
    0951  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    0952  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-17
    EXETER.CBL    22-JUN-64  09:05

    0953  	ADD 1 TO Y.
    0954  	DISPLAY ': ' WITH NO ADVANCING.
    0955  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0956  		DISPLAY '000 :' 
    0957  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    0958  		DISPLAY DISPLAY-MASTER-GALAXY ' :'
    0959  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    0960  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    0961  	ADD 1 TO X.
    0962  	SUBTRACT 2 FROM Y.
    0963  	DISPLAY ': ' WITH NO ADVANCING.
    0964  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0965  		DISPLAY '000 ' WITH NO ADVANCING
    0966  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    0967  		DISPLAY DISPLAY-MASTER-GALAXY ' ' WITH NO ADVANCING
    0968  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    0969  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    0970  	ADD 1 TO Y.
    0971  	DISPLAY ': ' WITH NO ADVANCING.
    0972  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0973  		DISPLAY '000 ' WITH NO ADVANCING
    0974  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    0975  		DISPLAY DISPLAY-MASTER-GALAXY ' ' WITH NO ADVANCING
    0976  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    0977  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    0978  	ADD 1 TO Y.
    0979  	DISPLAY ': ' WITH NO ADVANCING.
    0980  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0981  		DISPLAY '000 :' 
    0982  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    0983  		DISPLAY DISPLAY-MASTER-GALAXY ' :'
    0984  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    0985  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    0986  	ADD 1 TO X.
    0987  	SUBTRACT 2 FROM Y.
    0988  	DISPLAY ': ' WITH NO ADVANCING.
    0989  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0990  		DISPLAY '000 ' WITH NO ADVANCING
    0991  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    0992  		DISPLAY DISPLAY-MASTER-GALAXY ' ' WITH NO ADVANCING
    0993  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    0994  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    0995  	ADD 1 TO Y.
    0996  	DISPLAY ': ' WITH NO ADVANCING.
    0997  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    0998  		DISPLAY '000 ' WITH NO ADVANCING
    0999  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    1000  		DISPLAY DISPLAY-MASTER-GALAXY ' ' WITH NO ADVANCING
    1001  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    1002  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    1003  	ADD 1 TO Y.
    1004  	DISPLAY ': ' WITH NO ADVANCING.
    1005  	IF X < 1 OR > 8 OR Y < 1 OR > 8 
    1006  		DISPLAY '000 :' 
    1007  	ELSE MOVE MASTER-GALAXY (X,Y) TO DISPLAY-MASTER-GALAXY
    1008  		DISPLAY DISPLAY-MASTER-GALAXY ' :'
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-18
    EXETER.CBL    22-JUN-64  09:05

    1009  		IF DAMAGE-COMPUTER IS NOT NEGATIVE
    1010  		 MOVE MASTER-GALAXY (X,Y) TO GALACTIC-RECORD (X,Y).
    1011  	DISPLAY '-------------------'.
    1012  	DISPLAY ' '.
    1013  	GO TO HELL.
    1014    PHASER-CONTROL.
    1015  	IF KLINGONS-IN-PRESENT-SECTOR IS NOT > ZERO
    1016  		DISPLAY 'SHORT RANGE SENSORS REPORT NO KLINGONS IN THIS QUADRANT'
    1017  		GO TO HELL.
    1018  	IF DAMAGE-PHASERS IS NEGATIVE
    1019  		DISPLAY 'PHASERS NOT OPERATIONAL'
    1020  		GO TO HELL.
    1021  	IF DAMAGE-COMPUTER IS NEGATIVE
    1022  		DISPLAY 'COMPUTER FAILURE HAMPERS ACCURACY'.
    1023    ENERGY-INFO-LOOP.
    1024  	DISPLAY 'PHASERS LOCKED ON TARGET.  ENERGY AVAILABLE = ' 
    1025  		WARP-ENERGY.
    1026  	DISPLAY 'NUMBER OF UNITS TO FIRE? ' WITH NO ADVANCING.
    1027  	ACCEPT FIRE-POWER.
    1028  	IF FIRE-POWER IS NEGATIVE GO TO HELL.
    1029  	IF FIRE-POWER > WARP-ENERGY GO TO ENERGY-INFO-LOOP.
    1030  	SUBTRACT FIRE-POWER FROM WARP-ENERGY
    1031  				   TOTAL-ENERGY.
    1032  	PERFORM THE-ENEMY-SHOOTS-BACK.
    1033  	IF SHIELD-ENERGY IS NEGATIVE GO TO THE-EXETER-IS-DEAD.
    1034  	IF DAMAGE-COMPUTER IS NEGATIVE
    1035  		PERFORM RANDOMIZE
    1036  		COMPUTE FIRE-POWER = FIRE-POWER * ((RAN + 1) / 100).
    1037  	IF ENERGY OF KLINGON-ONE > ZERO
    1038  	 COMPUTE DISTANCE = ((X-COORD OF KLINGON-ONE - 
    1039  	  NCC-1706-SECTOR-X) ** 2 + (Y-COORD OF KLINGON-ONE - 
    1040  	  NCC-1706-SECTOR-Y) ** 2) ** .5
    1041  	 PERFORM RANDOMIZE
    1042  	 COMPUTE HIT = (FIRE-POWER / KLINGONS-IN-PRESENT-SECTOR / 
    1043  	  DISTANCE) * (RAN / 50)
    1044  	 MOVE HIT TO DISPLAY-HIT
    1045  	 SUBTRACT HIT FROM ENERGY OF KLINGON-ONE
    1046  	 DISPLAY DISPLAY-HIT ' UNIT HIT ON KLINGON AT SECTOR ' 
    1047  	  X-COORD OF KLINGON-ONE ',' 
    1048  	  Y-COORD OF KLINGON-ONE '  (' 
    1049  	  ENERGY OF KLINGON-ONE ' LEFT)'
    1050  	 IF ENERGY OF KLINGON-ONE IS NOT POSITIVE
    1051  	  DISPLAY '*** KLINGON DESTROYED ***'
    1052  	  SUBTRACT 1 FROM KLINGONS-IN-PRESENT-SECTOR
    1053  			  KLINGONS-LEFT
    1054  	  MOVE '   ' TO PRESENT-SECTOR (X-COORD OF KLINGON-ONE, 
    1055  	   Y-COORD OF KLINGON-ONE)
    1056  	  SUBTRACT 100 FROM MASTER-GALAXY (NCC-1706-QUADRANT-X, 
    1057  	   NCC-1706-QUADRANT-Y)
    1058  	  IF GALACTIC-RECORD (NCC-1706-QUADRANT-X,NCC-1706-QUADRANT-Y)
    1059  	   IS NOT ZERO 
    1060  	    SUBTRACT 100 FROM GALACTIC-RECORD (NCC-1706-QUADRANT-X, 
    1061  	     NCC-1706-QUADRANT-Y).
    1062  	IF ENERGY OF KLINGON-TWO > ZERO
    1063  	 COMPUTE DISTANCE = ((X-COORD OF KLINGON-TWO - 
    1064  	  NCC-1706-SECTOR-X) ** 2 + (Y-COORD OF KLINGON-TWO - 
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-19
    EXETER.CBL    22-JUN-64  09:05

    1065  	  NCC-1706-SECTOR-Y) ** 2) ** .5
    1066  	 PERFORM RANDOMIZE
    1067  	 COMPUTE HIT = (FIRE-POWER / KLINGONS-IN-PRESENT-SECTOR / 
    1068  	  DISTANCE) * (RAN / 50)
    1069  	 MOVE HIT TO DISPLAY-HIT
    1070  	 SUBTRACT HIT FROM ENERGY OF KLINGON-TWO
    1071  	 DISPLAY DISPLAY-HIT ' UNIT HIT ON KLINGON AT SECTOR ' 
    1072  	  X-COORD OF KLINGON-TWO ',' 
    1073  	  Y-COORD OF KLINGON-TWO '  (' 
    1074  	  ENERGY OF KLINGON-TWO ' LEFT)'
    1075  	 IF ENERGY OF KLINGON-TWO IS NOT POSITIVE
    1076  	  DISPLAY '*** KLINGON DESTROYED ***'
    1077  	  SUBTRACT 1 FROM KLINGONS-IN-PRESENT-SECTOR
    1078  			  KLINGONS-LEFT
    1079  	  MOVE '   ' TO PRESENT-SECTOR (X-COORD OF KLINGON-TWO, 
    1080  	   Y-COORD OF KLINGON-TWO)
    1081  	  SUBTRACT 100 FROM MASTER-GALAXY (NCC-1706-QUADRANT-X, 
    1082  	   NCC-1706-QUADRANT-Y)
    1083  	  IF GALACTIC-RECORD (NCC-1706-QUADRANT-X,NCC-1706-QUADRANT-Y)
    1084  	   IS NOT ZERO 
    1085  	    SUBTRACT 100 FROM GALACTIC-RECORD (NCC-1706-QUADRANT-X, 
    1086  	     NCC-1706-QUADRANT-Y).
    1087  	IF ENERGY OF KLINGON-THREE > ZERO
    1088  	 COMPUTE DISTANCE = ((X-COORD OF KLINGON-THREE - 
    1089  	  NCC-1706-SECTOR-X) ** 2 + (Y-COORD OF KLINGON-THREE - 
    1090  	  NCC-1706-SECTOR-Y) ** 2) ** .5
    1091  	 PERFORM RANDOMIZE
    1092  	 COMPUTE HIT = (FIRE-POWER / KLINGONS-IN-PRESENT-SECTOR / 
    1093  	  DISTANCE) * (RAN / 50)
    1094  	 MOVE HIT TO DISPLAY-HIT
    1095  	 SUBTRACT HIT FROM ENERGY OF KLINGON-THREE
    1096  	 DISPLAY DISPLAY-HIT ' UNIT HIT ON KLINGON AT SECTOR ' 
    1097  	  X-COORD OF KLINGON-THREE ',' 
    1098  	  Y-COORD OF KLINGON-THREE '  (' 
    1099  	  ENERGY OF KLINGON-THREE ' LEFT)'
    1100  	 IF ENERGY OF KLINGON-THREE IS NOT POSITIVE
    1101  	  DISPLAY '*** KLINGON DESTROYED ***'
    1102  	  SUBTRACT 1 FROM KLINGONS-IN-PRESENT-SECTOR
    1103  			  KLINGONS-LEFT
    1104  	  MOVE '   ' TO PRESENT-SECTOR (X-COORD OF KLINGON-THREE, 
    1105  	   Y-COORD OF KLINGON-THREE)
    1106  	  SUBTRACT 100 FROM MASTER-GALAXY (NCC-1706-QUADRANT-X, 
    1107  	   NCC-1706-QUADRANT-Y)
    1108  	  IF GALACTIC-RECORD (NCC-1706-QUADRANT-X,NCC-1706-QUADRANT-Y)
    1109  	   IS NOT ZERO 
    1110  	    SUBTRACT 100 FROM GALACTIC-RECORD (NCC-1706-QUADRANT-X, 
    1111  	     NCC-1706-QUADRANT-Y).
    1112  	IF KLINGONS-LEFT IS POSITIVE GO TO HELL.
    1113    LAST-KLINGON-IS-DEAD.
    1114  	DISPLAY 'THE LAST KLINGON BATTLE CRUISER HAS BEEN DESTROYED'.
    1115  	DISPLAY 'THE FEDERATION HAS BEEN SAVED!'
    1116  	COMPUTE STARBASES-DESTROYED = TOTAL-STARBASES - STARBASES-LEFT.
    1117  	COMPUTE TIME-OF-MISSION = 30 - STARDATES-LEFT.
    1118  	COMPUTE EFFICIENCY-RATING = (1000 * TOTAL-KLINGONS / TIME-OF-MISSION) 
    1119  		- (10 * (NAVIGATION-ERRORS - 5)) 
    1120  		- (30 * TORPEDO-MISSES) 
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-20
    EXETER.CBL    22-JUN-64  09:05

    1121  		- (50 * (STARBASE-VISITS - (TOTAL-KLINGONS / 10))) 
    1122  		- ((SUM-OF-PHASER-HITS / 10) - TOTAL-KLINGONS / 3 * 100) 
    1123  		- (5 * DAMAGE-SEVERITY-FACTOR) 
    1124  		- (250 * STARBASES-DESTROYED).
    1125  	DISPLAY 'YOUR EFFICIENCY RATING = ' EFFICIENCY-RATING.
    1126  	DISPLAY 'YOUR ACTUAL TIME OF MISSION = ' TIME-OF-MISSION 
    1127  		' STARDATES'.
    1128  	DISPLAY 'YOU KILLED ' TOTAL-KLINGONS ' KLINGONS'.
    1129  	DISPLAY 'YOU MADE ' NAVIGATION-ERRORS ' NAVIGATION ERRORS'.
    1130  	DISPLAY 'YOU FIRED ' TORPEDO-MISSES ' PHOTON TORPEDOS THAT MISSED'.
    1131  	DISPLAY 'YOU DOCKED AT STARBASES ' STARBASE-VISITS ' TIMES'.
    1132  	DISPLAY 'YOUR STARSHIP ENDURED ' SUM-OF-PHASER-HITS ' UNITS OF ENEMY PHASER FIRE'.
    1133  	DISPLAY 'YOUR DAMAGE SEVERITY FACTOR WAS ' DAMAGE-SEVERITY-FACTOR.
    1134  	IF STARBASES-DESTROYED EQUALS ZERO GO TO TRY-AGAIN.
    1135  	DISPLAY 'ALSO YOU DESTROYED ' STARBASES-DESTROYED ' STARBASE' 
    1136  		WITH NO ADVANCING.
    1137  	IF STARBASES-DESTROYED > 1
    1138  		DISPLAY 'S YOU TURKEY!'
    1139  		ELSE DISPLAY ' TURKEY!'.
    1140    TRY-AGAIN.
    1141  	DISPLAY ' '.
    1142  	DISPLAY ' '.
    1143  	DISPLAY ' '.
    1144  	DISPLAY 'DO YOU WANT TO TRY AGAIN? ' WITH NO ADVANCING.
    1145  	ACCEPT YES-OR-NO-ANSWER.
    1146  	IF YES-OR-NO-ANSWER EQUALS 'YES' OR 'Y' GO TO BEGIN-NEW-CONTEST.
    1147  	IF YES-OR-NO-ANSWER EQUALS 'NO' OR 'N' GO TO QUIT.
    1148  	DISPLAY 'PLEASE ANSWER YES OR NO!'.
    1149  	GO TO TRY-AGAIN.
    1150    PHOTON-TORPEDO-CONTROL.
    1151  	IF DAMAGE-PHOTON-TUBES IS NEGATIVE
    1152  		DISPLAY 'PHOTON TORPEDO TUBES ARE NOT OPERATIONAL'
    1153  		GO TO HELL.
    1154  	IF TORPEDO-COUNTER EQUALS ZERO
    1155  		DISPLAY 'ALL PHOTON TORPEDOS EXPENDED'
    1156  		GO TO HELL.
    1157  	DISPLAY 'TORPEDO COURSE (0-360)? ' WITH NO ADVANCING.
    1158  	ACCEPT COURSE.
    1159  	IF COURSE < ZERO OR > 360 GO TO HELL.
    1160  	SUBTRACT 1 FROM TORPEDO-COUNTER.
    1161  * COMVERTIING THE COURSE TO INTERNAL FORMAT (1-9).
    1162  	COMPUTE VECTOR = 90 - COURSE.
    1163  	IF VECTOR IS NEGATIVE
    1164  		ADD 360 TO VECTOR.
    1165  	COMPUTE VECTOR = VECTOR / 45 + 1.
    1166  	MOVE NCC-1706-SECTOR-X TO REAL-X.
    1167  	MOVE NCC-1706-SECTOR-Y TO REAL-Y.
    1168  	MOVE VECTOR TO INT-VECTOR.
    1169  	COMPUTE INT1-VECTOR = VECTOR + 1.
    1170  	COMPUTE X1 = CHART (INT-VECTOR,1) + 
    1171  		(CHART (INT1-VECTOR,1) - CHART (INT-VECTOR,1))
    1172  		 * (VECTOR - INT-VECTOR).
    1173  	COMPUTE X2 = CHART (INT-VECTOR,2) + 
    1174  		(CHART (INT1-VECTOR,2) - CHART (INT-VECTOR,2))
    1175  		 * (VECTOR - INT-VECTOR).
    1176  	DISPLAY 'TORPEDO TRACK:'.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-21
    EXETER.CBL    22-JUN-64  09:05

    1177    TORPEDO-LOOP.
    1178  	ADD X1 TO REAL-X.
    1179  	ADD X2 TO REAL-Y.
    1180  	COMPUTE X = REAL-X + .5.
    1181  	COMPUTE Y = REAL-Y + .5.
    1182  	IF X < 1 OR > 8 OR Y < 1 OR > 8 GO TO TORPEDO-MISSED.
    1183  	DISPLAY REAL-X, '   ' REAL-Y.
    1184  	COMPUTE MISS-FACTOR1 = REAL-X + .25.
    1185  	COMPUTE MISS-FACTOR2 = REAL-X + .75.
    1186  	IF MISS-FACTOR1 IS NOT EQUAL TO MISS-FACTOR2 GO TO TORPEDO-LOOP.
    1187  	COMPUTE MISS-FACTOR1 = REAL-Y + .25.
    1188  	COMPUTE MISS-FACTOR2 = REAL-Y + .75.
    1189  	IF MISS-FACTOR1 IS NOT EQUAL TO MISS-FACTOR2 GO TO TORPEDO-LOOP.
    1190  	IF PRESENT-SECTOR (X,Y) EQUALS '   ' GO TO TORPEDO-LOOP.
    1191  	IF PRESENT-SECTOR (X,Y) EQUALS ' * ' 
    1192  		DISPLAY "YOU CAN'T DESTROY STARS, TURKEY"
    1193  		GO TO TORPEDO-MISSED.
    1194  	IF PRESENT-SECTOR (X,Y) IS NOT EQUAL TO '>!<' GO TO KLINGON-DESTROYED.
    1195  	DISPLAY '*** STARBASE DESTROYED ***......CONGRATULATIONS'.
    1196  	SUBTRACT 1 FROM STARBASES-LEFT
    1197  			STARBASE-IN-PRESENT-SECTOR.
    1198  	MOVE '   ' TO PRESENT-SECTOR (X,Y).
    1199  	SUBTRACT 10 FROM MASTER-GALAXY (NCC-1706-QUADRANT-X,NCC-1706-QUADRANT-Y).
    1200  	IF DAMAGE-COMPUTER IS NOT NEGATIVE
    1201  		IF GALACTIC-RECORD (NCC-1706-QUADRANT-X,NCC-1706-QUADRANT-Y)
    1202  			IS > ZERO
    1203  			SUBTRACT 10 FROM GALACTIC-RECORD (NCC-1706-QUADRANT-X,
    1204  				NCC-1706-QUADRANT-Y).
    1205  	GO TO TORPEDO-MISSED.
    1206    KLINGON-DESTROYED.
    1207  	SUBTRACT 1 FROM KLINGONS-IN-PRESENT-SECTOR
    1208  			KLINGONS-LEFT.
    1209  	DISPLAY '*** KLINGON DESTROYED ***'.
    1210  	IF KLINGONS-LEFT EQUALS ZERO GO TO LAST-KLINGON-IS-DEAD.
    1211  	IF X-COORD OF KLINGON-ONE EQUALS X AND Y-COORD OF KLINGON-ONE
    1212  		EQUALS Y
    1213  		MOVE ZEROS TO KLINGON-ONE.
    1214  	IF X-COORD OF KLINGON-TWO EQUALS X AND Y-COORD OF KLINGON-TWO
    1215  		EQUALS Y
    1216  		MOVE ZEROS TO KLINGON-TWO.
    1217  	IF X-COORD OF KLINGON-THREE EQUALS X AND Y-COORD OF KLINGON-THREE
    1218  		EQUALS Y
    1219  		MOVE ZEROS TO KLINGON-THREE.
    1220  	MOVE '   ' TO PRESENT-SECTOR (X,Y).
    1221  	SUBTRACT 100 FROM MASTER-GALAXY (NCC-1706-QUADRANT-X,
    1222  					 NCC-1706-QUADRANT-Y).
    1223  	IF DAMAGE-COMPUTER IS NOT NEGATIVE
    1224  		IF GALACTIC-RECORD (NCC-1706-QUADRANT-X,
    1225  			NCC-1706-QUADRANT-Y) IS > ZERO
    1226  			SUBTRACT 100 FROM
    1227  			 GALACTIC-RECORD (NCC-1706-QUADRANT-X,
    1228  			 NCC-1706-QUADRANT-Y).
    1229  	IF KLINGONS-IN-PRESENT-SECTOR > ZERO
    1230  		PERFORM THE-ENEMY-SHOOTS-BACK.
    1231  	IF SHIELD-ENERGY IS NEGATIVE GO TO THE-EXETER-IS-DEAD.
    1232  	GO TO HELL.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-22
    EXETER.CBL    22-JUN-64  09:05

    1233    TORPEDO-MISSED.
    1234  	DISPLAY 'TORPEDO MISSED'.
    1235  	ADD 1 TO TORPEDO-MISSES.
    1236  	IF KLINGONS-IN-PRESENT-SECTOR > ZERO
    1237  		PERFORM THE-ENEMY-SHOOTS-BACK.
    1238  	IF SHIELD-ENERGY IS NEGATIVE GO TO THE-EXETER-IS-DEAD.
    1239  	GO TO HELL.
    1240    SHIELD-CONTROL.
    1241  	IF DAMAGE-SHIELDS IS NEGATIVE
    1242  		DISPLAY 'SHIELD CONTROL IS NON-OPERATIONAL'
    1243  		GO TO HELL.
    1244  	DISPLAY 'ENERGY AVAILABLE = ' TOTAL-ENERGY.
    1245  	DISPLAY 'NUMBER OF UNITS TO SHIELDS? ' WITH NO ADVANCING.
    1246  	ACCEPT TEMP-4.
    1247  	IF TEMP-4 IS NEGATIVE GO TO HELL.
    1248  	IF TEMP-4 > TOTAL-ENERGY GO TO SHIELD-CONTROL.
    1249  	MOVE TEMP-4 TO SHIELD-ENERGY.
    1250  	SUBTRACT SHIELD-ENERGY FROM TOTAL-ENERGY GIVING WARP-ENERGY.
    1251  	GO TO HELL.
    1252    DAMAGE-CONTROL-REPORT.
    1253  	IF DAMAGE-DAMAGE-CONTROL IS NEGATIVE
    1254  		DISPLAY 'DAMAGE CONTROL REPORT IS NOT AVAILABLE'
    1255  		GO TO HELL.
    1256  	DISPLAY 'DAMAGE CONTROL REPORT:'.
    1257  	DISPLAY ' '.
    1258  	DISPLAY 'DEVICE			STATE OF REPAIR'.
    1259  	DISPLAY 'WARP DRIVE		' DAMAGE-WARP-DRIVE.
    1260  	DISPLAY 'SHORT RANGE SENSORS	' DAMAGE-SHORT-RANGE-SENSORS.
    1261  	DISPLAY 'LONG RANGE SENSORS	' DAMAGE-LONG-RANGE-SENSORS.
    1262  	DISPLAY 'PHASER CONTROL		' DAMAGE-PHASERS.
    1263  	DISPLAY 'PHOTON TORPEDO TUBES	' DAMAGE-PHOTON-TUBES.
    1264  	DISPLAY 'DAMAGE CONTROL		' DAMAGE-DAMAGE-CONTROL.
    1265  	DISPLAY 'SHIELD CONTROL		' DAMAGE-SHIELDS.
    1266  	DISPLAY 'LIBRARY COMPUTER	' DAMAGE-COMPUTER.
    1267  	GO TO HELL.
    1268    LIBRARY-COMPUTER.
    1269  	IF DAMAGE-COMPUTER IS NEGATIVE
    1270  		DISPLAY 'COMPUTER DISABLED'
    1271  		GO TO HELL.
    1272  	DISPLAY 'COMPUTER ACTIVE AND AWAITING COMMAND? ' WITH NO ADVANCING.
    1273  	ACCEPT COMMAND.
    1274  	IF COMMAND EQUALS ZERO GO TO CUMULATIVE-GALACTIC-RECORD.
    1275  	GO TO	STATUS-REPORT
    1276  		PHOTON-TORPEDO-DATA
    1277  		CALCULATOR
    1278  			DEPENDING ON COMMAND.
    1279  	DISPLAY 'FUNCTIONS AVAILABLE FROM COMPUTER'.
    1280  	DISPLAY '0 = CUMULATIVE GALACTIC RECORD'.
    1281  	DISPLAY '1 = STATUS REPORT'.
    1282  	DISPLAY '2 = PHOTON TORPEDO DATA'.
    1283  	DISPLAY '3 = CALCULATOR'.
    1284  	GO TO LIBRARY-COMPUTER.
    1285    CUMULATIVE-GALACTIC-RECORD.
    1286  	DISPLAY 'COMPUTER RECORD OF GALAXY FOR ALL LONG RANGE SENSOR SCANS'.
    1287  	DISPLAY '    1     2     3     4     5     6     7     8'.
    1288  	DISPLAY '   ----- ----- ----- ----- ----- ----- ----- -----' 
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-23
    EXETER.CBL    22-JUN-64  09:05

    1289  		WITH NO ADVANCING.
    1290  
    1291  	MOVE 0 TO I, J.
    1292    GALACTIC-RECORD-I-LOOP.
    1293  	ADD 1 TO I, J.
    1294  	DISPLAY ' '.
    1295  	DISPLAY I WITH NO ADVANCING.
    1296    GALACTIC-RECORD-J-LOOP.
    1297  	MOVE GALACTIC-RECORD (I,J) TO DISPLAY-GALACTIC-RECORD.
    1298  	DISPLAY '   ' DISPLAY-GALACTIC-RECORD WITH NO ADVANCING.
    1299  	ADD 1 TO J.
    1300  	IF J < 9 GO TO GALACTIC-RECORD-J-LOOP.
    1301  	MOVE ZERO TO J.
    1302  	IF I IS NOT EQUAL TO 8 GO TO GALACTIC-RECORD-I-LOOP.
    1303  	DISPLAY ' '.
    1304  	DISPLAY '   ----- ----- ----- ----- ----- ----- ----- -----'.
    1305  	GO TO HELL.
    1306    STATUS-REPORT.
    1307  	DISPLAY 'NUMBER OF KLINGONS LEFT = ' KLINGONS-LEFT.
    1308  	DISPLAY 'NUMBER OF STARDATES LEFT = ' STARDATES-LEFT.
    1309  	DISPLAY 'NUMBER OF STARBASES LEFT = ' STARBASES-LEFT.
    1310  	DISPLAY 'NUMBER OF NAVIGATION ERRORS = ' NAVIGATION-ERRORS.
    1311  	DISPLAY 'NUMBER OF TORPEDO MISSES = ' TORPEDO-MISSES.
    1312  	DISPLAY 'NUMBER OF STARBASE VISITS = ' STARBASE-VISITS.
    1313  	DISPLAY 'SUM OF PHASER HITS = ' SUM-OF-PHASER-HITS.
    1314  	DISPLAY 'DAMAGE SEVERITY FACTOR = ' DAMAGE-SEVERITY-FACTOR.
    1315  	DISPLAY ' '.
    1316  	GO TO DAMAGE-CONTROL-REPORT.
    1317    PHOTON-TORPEDO-DATA.
    1318  	MOVE NCC-1706-SECTOR-X TO SOURCE-X.
    1319  	MOVE NCC-1706-SECTOR-Y TO SOURCE-Y.
    1320  	IF ENERGY OF KLINGON-ONE > ZERO
    1321  		MOVE X-COORD OF KLINGON-ONE TO DESTINATION-X
    1322  		MOVE Y-COORD OF KLINGON-ONE TO DESTINATION-Y
    1323  		PERFORM VECTOR-ANALYSIS.
    1324  	IF ENERGY OF KLINGON-TWO > ZERO
    1325  		MOVE X-COORD OF KLINGON-TWO TO DESTINATION-X
    1326  		MOVE Y-COORD OF KLINGON-TWO TO DESTINATION-Y
    1327  		PERFORM VECTOR-ANALYSIS.
    1328  	IF ENERGY OF KLINGON-THREE > ZERO
    1329  		MOVE X-COORD OF KLINGON-THREE TO DESTINATION-X
    1330  		MOVE Y-COORD OF KLINGON-THREE TO DESTINATION-Y
    1331  		PERFORM VECTOR-ANALYSIS.
    1332  	GO TO HELL.
    1333    CALCULATOR.
    1334  * RAYMOND FUSCI'S FAMOUS FLOATING COMMA ROUTINE.
    1335  	MOVE NCC-1706-QUADRANT-Y TO DISPLAY-Y.
    1336  		IF DISPLAY-X-1 EQUALS SPACES
    1337  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-1
    1338  			GO TO RAYS-FLOATING-COMMA-BYPASS3.
    1339  		IF DISPLAY-X-2 EQUALS SPACES
    1340  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-2
    1341  			GO TO RAYS-FLOATING-COMMA-BYPASS3.
    1342  		IF DISPLAY-X-3 EQUALS SPACES
    1343  			MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-3
    1344  			GO TO RAYS-FLOATING-COMMA-BYPASS3.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-24
    EXETER.CBL    22-JUN-64  09:05

    1345  		MOVE NCC-1706-QUADRANT-X TO DISPLAY-X-4.
    1346    RAYS-FLOATING-COMMA-BYPASS3.
    1347  	DISPLAY 'YOU ARE AT QUADRANT' DISPLAY-QUADRANT 
    1348  		'      SECTOR ' NCC-1706-SECTOR-X ',' NCC-1706-SECTOR-Y.
    1349  	DISPLAY 'SHIP AND TARGET COORDINATES ARE? ' WITH NO ADVANCING.
    1350  	ACCEPT SOURCE-X, SOURCE-Y, DESTINATION-X, DESTINATION-Y.
    1351  	PERFORM VECTOR-ANALYSIS.
    1352  	GO TO HELL.
    1353    VECTOR-ANALYSIS SECTION.
    1354    A.
    1355  	COMPUTE REAL-X = SOURCE-X - DESTINATION-X.
    1356  	COMPUTE REAL-Y = DESTINATION-Y - SOURCE-Y.
    1357  	MOVE REAL-X TO I.
    1358  	MOVE REAL-Y TO J.
    1359  	IF REAL-X EQUALS ZERO AND REAL-Y EQUALS ZERO
    1360  		DISPLAY 'GET SERIOUS'
    1361  		GO TO HELL.
    1362  	IF REAL-Y IS POSITIVE AND REAL-X IS NOT NEGATIVE
    1363  		GO TO QUADRANT-ONE.
    1364  	IF REAL-Y IS NOT POSITIVE AND REAL-X IS POSITIVE
    1365  		GO TO QUADRANT-TWO.
    1366  	IF REAL-Y IS NEGATIVE AND REAL-X IS NOT POSITIVE
    1367  		GO TO QUADRANT-THREE.
    1368  	IF REAL-Y IS NOT NEGATIVE AND REAL-X IS NEGATIVE
    1369  		GO TO QUADRANT-FOUR.
    1370    QUADRANT-ONE.
    1371  	MOVE 1 TO VECTOR.
    1372    ANALYSIS-COMPUTATION1.
    1373  	IF J > I OR = I GO TO ANALYSIS-COMPUTATION2.
    1374  	COMPUTE VECTOR = VECTOR + (((I - J) + I) / I).
    1375  	GO TO DISTANCE-COMPUTATION.
    1376    ANALYSIS-COMPUTATION2.
    1377  	COMPUTE VECTOR = VECTOR + (I / J).
    1378  	GO TO DISTANCE-COMPUTATION.
    1379    QUADRANT-TWO.
    1380  	MOVE 3 TO VECTOR.
    1381    ANALYSIS-COMPUTATION3.
    1382  	IF I > J OR = J GO TO ANALYSIS-COMPUTATION4.
    1383  	COMPUTE VECTOR = VECTOR + (((J - I) + J) / J).
    1384  	GO TO DISTANCE-COMPUTATION.
    1385    ANALYSIS-COMPUTATION4.
    1386  	COMPUTE VECTOR = VECTOR + (J / I).
    1387  	GO TO DISTANCE-COMPUTATION.
    1388    QUADRANT-THREE.
    1389  	MOVE 5 TO VECTOR.
    1390  	GO TO ANALYSIS-COMPUTATION1.
    1391    QUADRANT-FOUR.
    1392  	MOVE 7 TO VECTOR.
    1393  	GO TO ANALYSIS-COMPUTATION3.
    1394    DISTANCE-COMPUTATION.
    1395  	COMPUTE COURSE = 90 - (VECTOR - 1) * 45.
    1396  	IF COURSE IS NEGATIVE
    1397  		ADD 360 TO COURSE.
    1398  	DISPLAY 'DIRECTION = ' COURSE.
    1399  	COMPUTE DISTANCE = (REAL-Y ** 2 + REAL-X ** 2) ** .5.
    1400  	DISPLAY 'DISTANCE = ' DISTANCE.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-25
    EXETER.CBL    22-JUN-64  09:05

    1401    THE-EXETER-IS-DEAD SECTION.
    1402    A.
    1403  	DISPLAY ' '.
    1404  	DISPLAY ' '.
    1405  	DISPLAY 'THE EXETER HAS BEEN DESTROYED.  THE'.
    1406  	DISPLAY 'FEDERATION WILL BE CONQUERED.'.
    1407  	DISPLAY 'THERE ARE STILL ' KLINGONS-LEFT 
    1408  		' KLINGON BATTLE CRUISERS LEFT.'.
    1409  	DISPLAY 'YOU GET ANOTHER CHANCE....TURKEY!'.
    1410  	GO TO BEGIN-NEW-CONTEST.
    1411    THE-ENEMY-SHOOTS-BACK SECTION.
    1412    A.
    1413  * THE CALLER OF THIS SUBROUTINE MUST HAVE THE FOLLOWING NEXT INSTRUCTION.
    1414  * IF SHIELD-ENERGY IS NEGATIVE GO TO THE-EXETER-IS-DEAD.
    1415  	IF CONDITION IS EQUAL TO 'DOCKED' GO TO SHOOTING-EXIT.
    1416  	 IF KLINGONS-IN-PRESENT-SECTOR EQUALS ZERO GO TO I-SHOOT-YOU-NOT.
    1417  	  IF ENERGY OF KLINGON-ONE > ZERO
    1418  	   COMPUTE DISTANCE = ((X-COORD OF KLINGON-ONE - 
    1419  	    NCC-1706-SECTOR-X) ** 2 + (Y-COORD OF KLINGON-ONE - 
    1420  	    NCC-1706-SECTOR-Y) ** 2) ** .5
    1421  	   PERFORM RANDOMIZE
    1422  	   COMPUTE HIT = (ENERGY OF KLINGON-ONE / DISTANCE) * 
    1423  	    (RAN / 100 + 2)
    1424  	   ADD HIT TO SUM-OF-PHASER-HITS
    1425  	   MOVE HIT TO DISPLAY-HIT
    1426  	   SUBTRACT HIT FROM SHIELD-ENERGY
    1427  			     TOTAL-ENERGY
    1428  	   DISPLAY 'KLINGON ATTACK'
    1429  	   DISPLAY DISPLAY-HIT ' UNIT HIT ON EXETER FROM SECTOR ' 
    1430  	    X-COORD OF KLINGON-ONE ',' Y-COORD OF KLINGON-ONE 
    1431  	    '     (' SHIELD-ENERGY ' LEFT)'.
    1432  	  IF ENERGY OF KLINGON-TWO > ZERO
    1433  	   COMPUTE DISTANCE = ((X-COORD OF KLINGON-TWO - 
    1434  	    NCC-1706-SECTOR-X) ** 2 + (Y-COORD OF KLINGON-TWO - 
    1435  	    NCC-1706-SECTOR-Y) ** 2) ** .5
    1436  	   PERFORM RANDOMIZE
    1437  	   COMPUTE HIT = (ENERGY OF KLINGON-TWO / DISTANCE) * 
    1438  	    (RAN / 100 + 2)
    1439  	   ADD HIT TO SUM-OF-PHASER-HITS
    1440  	   MOVE HIT TO DISPLAY-HIT
    1441  	   SUBTRACT HIT FROM SHIELD-ENERGY
    1442  			     TOTAL-ENERGY
    1443  	   DISPLAY 'KLINGON ATTACK'
    1444  	   DISPLAY DISPLAY-HIT ' UNIT HIT ON EXETER FROM SECTOR ' 
    1445  	    X-COORD OF KLINGON-TWO ',' Y-COORD OF KLINGON-TWO 
    1446  	    '     (' SHIELD-ENERGY ' LEFT)'.
    1447  	  IF ENERGY OF KLINGON-THREE > ZERO
    1448  	   COMPUTE DISTANCE = ((X-COORD OF KLINGON-THREE - 
    1449  	    NCC-1706-SECTOR-X) ** 2 + (Y-COORD OF KLINGON-THREE - 
    1450  	    NCC-1706-SECTOR-Y) ** 2) ** .5
    1451  	   PERFORM RANDOMIZE
    1452  	   COMPUTE HIT = (ENERGY OF KLINGON-THREE / DISTANCE) * 
    1453  	    (RAN / 100 + 2)
    1454  	   ADD HIT TO SUM-OF-PHASER-HITS
    1455  	   MOVE HIT TO DISPLAY-HIT
    1456  	   SUBTRACT HIT FROM SHIELD-ENERGY
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE 1-26
    EXETER.CBL    22-JUN-64  09:05

    1457  			     TOTAL-ENERGY
    1458  	   DISPLAY 'KLINGON-ATTACK'
    1459  	   DISPLAY DISPLAY-HIT ' UNIT HIT ON EXETER FROM SECTOR ' 
    1460  	    X-COORD OF KLINGON-THREE ',' Y-COORD OF KLINGON-THREE 
    1461  	    '     (' SHIELD-ENERGY ' LEFT)'.
    1462  	 GO TO I-SHOOT-YOU-NOT.
    1463    SHOOTING-EXIT.
    1464  	DISPLAY 'STARBASE SHIELDS PROTECT THE EXETER'.
    1465    I-SHOOT-YOU-NOT.
    1466    RANDOMIZE SECTION.
    1467    A.
    1468  * POWER RESIDUE RANDOM NUMBER GENERATOR
    1469  * THE NEXT 3 LINES INSURE THAT THE SEED IS ODD
    1470  	COMPUTE TEMP1 = SEED / 2.
    1471  	COMPUTE TEMP2 = TEMP1 * 2.
    1472  	IF SEED IS NOT = TO TEMP2  ADD 1 TO SEED.
    1473  	MULTIPLY MULTIPLIER BY SEED.
    1474  	DIVIDE 9999 INTO SEED GIVING RAN.
    1475  * THIS SECTION IS USED FOR A BREAK POINT FOR COBDDT SO THAT THE
    1476  * HISTOGRAM WON'T FORGET TO CLOSE THE FILE.
    1477    QUIT SECTION.
    1478    A.
    1479  	STOP RUN.
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE W-1
    EXETER.CBL    22-JUN-64  09:05

WARNINGS:

    0296  MOST SIGNIFICANT DIGITS TRUNCATED ON SEED
    0353  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-X
    0355  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-Y
    0388  MOST SIGNIFICANT DIGITS TRUNCATED ON I
    0390  MOST SIGNIFICANT DIGITS TRUNCATED ON J
    0409  MOST SIGNIFICANT DIGITS TRUNCATED ON STARDATE
    0423  MOST SIGNIFICANT DIGITS TRUNCATED ON MASTER-GALAXY
    0423  MOST SIGNIFICANT DIGITS TRUNCATED ON MASTER-GALAXY
    0425  MOST SIGNIFICANT DIGITS TRUNCATED ON STARBASE-IN-PRESENT-SECTOR
    0426  MOST SIGNIFICANT DIGITS TRUNCATED ON KLINGONS-IN-PRESENT-SECTOR
    0453  MOST SIGNIFICANT DIGITS TRUNCATED ON X-COORD
    0454  MOST SIGNIFICANT DIGITS TRUNCATED ON Y-COORD
    0457  MOST SIGNIFICANT DIGITS TRUNCATED ON X-COORD
    0458  MOST SIGNIFICANT DIGITS TRUNCATED ON Y-COORD
    0461  MOST SIGNIFICANT DIGITS TRUNCATED ON X-COORD
    0462  MOST SIGNIFICANT DIGITS TRUNCATED ON Y-COORD
    0699  MOST SIGNIFICANT DIGITS TRUNCATED ON MOVE-DISTANCE
    0699  LEAST SIGNIFICANT DIGITS TRUNCATED ON MOVE-DISTANCE
    0743  MOST SIGNIFICANT DIGITS TRUNCATED ON WHO-GOT-HIT
    0745  MOST SIGNIFICANT DIGITS TRUNCATED ON DAMAGE
    0746  LEAST SIGNIFICANT DIGITS TRUNCATED ON DAMAGE-SEVERITY-FACTOR
    0791  MOST SIGNIFICANT DIGITS TRUNCATED ON WHO-GOT-HIT
    0793  MOST SIGNIFICANT DIGITS TRUNCATED ON REPAIR
    0794  LEAST SIGNIFICANT DIGITS TRUNCATED ON DAMAGE-SEVERITY-FACTOR
    0842  MOST SIGNIFICANT DIGITS TRUNCATED ON INT-VECTOR
    0842  LEAST SIGNIFICANT DIGITS TRUNCATED ON INT-VECTOR
    0844  MOST SIGNIFICANT DIGITS TRUNCATED ON INT1-VECTOR
    0844  LEAST SIGNIFICANT DIGITS TRUNCATED ON INT1-VECTOR
    0845  MOST SIGNIFICANT DIGITS TRUNCATED ON X1
    0845  LEAST SIGNIFICANT DIGITS TRUNCATED ON X1
    0848  MOST SIGNIFICANT DIGITS TRUNCATED ON X2
    0848  LEAST SIGNIFICANT DIGITS TRUNCATED ON X2
    0854  LEAST SIGNIFICANT DIGITS TRUNCATED ON X
    0855  LEAST SIGNIFICANT DIGITS TRUNCATED ON Y
    0863  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-X
    0864  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-Y
    0869  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-X
    0869  LEAST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-X
    0870  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-Y
    0870  LEAST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-Y
    0893  MOST SIGNIFICANT DIGITS TRUNCATED ON REAL-X
    0895  MOST SIGNIFICANT DIGITS TRUNCATED ON REAL-Y
    0897  LEAST SIGNIFICANT DIGITS TRUNCATED ON X
    0898  LEAST SIGNIFICANT DIGITS TRUNCATED ON Y
    0901  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-X
    0902  MOST SIGNIFICANT DIGITS TRUNCATED ON NCC-1706-SECTOR-Y
    1030  LEAST SIGNIFICANT DIGITS TRUNCATED ON WARP-ENERGY
    1031  LEAST SIGNIFICANT DIGITS TRUNCATED ON TOTAL-ENERGY
    1036  MOST SIGNIFICANT DIGITS TRUNCATED ON FIRE-POWER
    1036  LEAST SIGNIFICANT DIGITS TRUNCATED ON FIRE-POWER
    1044  LEAST SIGNIFICANT DIGITS TRUNCATED ON DISPLAY-HIT
    1045  LEAST SIGNIFICANT DIGITS TRUNCATED ON ENERGY
    1069  LEAST SIGNIFICANT DIGITS TRUNCATED ON DISPLAY-HIT
    1070  LEAST SIGNIFICANT DIGITS TRUNCATED ON ENERGY
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE W-2
    EXETER.CBL    22-JUN-64  09:05

    1094  LEAST SIGNIFICANT DIGITS TRUNCATED ON DISPLAY-HIT
    1095  LEAST SIGNIFICANT DIGITS TRUNCATED ON ENERGY
    1118  MOST SIGNIFICANT DIGITS TRUNCATED ON EFFICIENCY-RATING
    1168  MOST SIGNIFICANT DIGITS TRUNCATED ON INT-VECTOR
    1168  LEAST SIGNIFICANT DIGITS TRUNCATED ON INT-VECTOR
    1169  MOST SIGNIFICANT DIGITS TRUNCATED ON INT1-VECTOR
    1169  LEAST SIGNIFICANT DIGITS TRUNCATED ON INT1-VECTOR
    1170  MOST SIGNIFICANT DIGITS TRUNCATED ON X1
    1170  LEAST SIGNIFICANT DIGITS TRUNCATED ON X1
    1173  MOST SIGNIFICANT DIGITS TRUNCATED ON X2
    1173  LEAST SIGNIFICANT DIGITS TRUNCATED ON X2
    1180  LEAST SIGNIFICANT DIGITS TRUNCATED ON X
    1181  LEAST SIGNIFICANT DIGITS TRUNCATED ON Y
    1184  LEAST SIGNIFICANT DIGITS TRUNCATED ON MISS-FACTOR1
    1185  LEAST SIGNIFICANT DIGITS TRUNCATED ON MISS-FACTOR2
    1187  LEAST SIGNIFICANT DIGITS TRUNCATED ON MISS-FACTOR1
    1188  LEAST SIGNIFICANT DIGITS TRUNCATED ON MISS-FACTOR2
    1249  LEAST SIGNIFICANT DIGITS TRUNCATED ON SHIELD-ENERGY
    1357  MOST SIGNIFICANT DIGITS TRUNCATED ON I
    1357  LEAST SIGNIFICANT DIGITS TRUNCATED ON I
    1358  MOST SIGNIFICANT DIGITS TRUNCATED ON J
    1358  LEAST SIGNIFICANT DIGITS TRUNCATED ON J
    1395  MOST SIGNIFICANT DIGITS TRUNCATED ON COURSE
    1424  LEAST SIGNIFICANT DIGITS TRUNCATED ON SUM-OF-PHASER-HITS
    1425  LEAST SIGNIFICANT DIGITS TRUNCATED ON DISPLAY-HIT
    1426  LEAST SIGNIFICANT DIGITS TRUNCATED ON SHIELD-ENERGY
    1427  LEAST SIGNIFICANT DIGITS TRUNCATED ON TOTAL-ENERGY
    1439  LEAST SIGNIFICANT DIGITS TRUNCATED ON SUM-OF-PHASER-HITS
    1440  LEAST SIGNIFICANT DIGITS TRUNCATED ON DISPLAY-HIT
    1441  LEAST SIGNIFICANT DIGITS TRUNCATED ON SHIELD-ENERGY
    1442  LEAST SIGNIFICANT DIGITS TRUNCATED ON TOTAL-ENERGY
    1454  LEAST SIGNIFICANT DIGITS TRUNCATED ON SUM-OF-PHASER-HITS
    1455  LEAST SIGNIFICANT DIGITS TRUNCATED ON DISPLAY-HIT
    1456  LEAST SIGNIFICANT DIGITS TRUNCATED ON SHIELD-ENERGY
    1457  LEAST SIGNIFICANT DIGITS TRUNCATED ON TOTAL-ENERGY
    1471  MOST SIGNIFICANT DIGITS TRUNCATED ON TEMP2
    1473  MOST SIGNIFICANT DIGITS TRUNCATED ON SEED
    1474  MOST SIGNIFICANT DIGITS TRUNCATED ON RAN


NO FATAL ERRORS, 92 WARNINGS

    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE C-1
    EXETER.CBL    22-JUN-64  09:05


A				1354#	1402#	1412#	1467#	1478#
ANALYSIS-COMPUTATION1		1372#	1390
ANALYSIS-COMPUTATION2		1373	1376#
ANALYSIS-COMPUTATION3		1381#	1393
ANALYSIS-COMPUTATION4		1382	1385#
BAD-NEWS			0740#
BAD-NEWS-COMPUTER		0754	0784#
BAD-NEWS-DAMAGE-CONTROL		0752	0776#
BAD-NEWS-LONG-RANGE-SENSORS	0749	0764#
BAD-NEWS-PHASERS		0750	0768#
BAD-NEWS-PHOTON-TUBES		0751	0772#
BAD-NEWS-SHIELDS		0753	0780#
BAD-NEWS-SHORT-RANGE-SENSORS	0748	0760#
BAD-NEWS-WARP-DRIVE		0747	0756#
BEGIN-NEW-CONTEST		0158	0294#	0656	0891	1146	1410
CALCULATOR			1277	1333#
CERTAIN-DEATH-LOOP		0714#	0717
CHANGE-QUADRANTS		0857	0892#
CHART				0138#	0329	0330	0331	0332	0333	0334	0335	0336	0337	0338
				0339	0340	0341	0342	0343	0344	0345	0346	0845	0846	0846
				0848	0849	0849	1170	1171	1171	1173	1174	1174
CHECK-FOR-DOCKING		0490#	0529
COLLISION			0859	0866#
COMMAND				0048#	0647	0648	0657	1273	1274	1278
COMPUTER-GALACTIC-RECORD	0127#	0323
CONDITION			0020#	0497	0531	0534	0535	0565	1415
COURSE				0049#	0672	0673	0675	1158	1159	1162	1395	1396	1397	1398
COURSE-ARRAY			0136#
CUMULATIVE-GALACTIC-RECORD	1274	1285#
DAMAGE				0059#	0745	0746	0758	0762	0766	0770	0774	0778	0782	0786
DAMAGE-COMPUTER			0032#	0311	0516	0517	0733	0734	0786	0834	0943	0951	0959
				0968	0976	0984	0993	1001	1009	1021	1034	1200	1223	1266
				1269
DAMAGE-CONTROL-REPORT		0654	1252#	1316
DAMAGE-DAMAGE-CONTROL		0030#	0309	0512	0513	0729	0730	0778	0826	1253	1264
DAMAGE-LONG-RANGE-SENSORS	0027#	0306	0506	0507	0723	0724	0766	0814	0917	1261
DAMAGE-PHASERS			0028#	0307	0508	0509	0725	0726	0770	0818	1018	1262
DAMAGE-PHOTON-TUBES		0029#	0308	0510	0511	0727	0728	0774	0822	1151	1263
DAMAGE-SEVERITY-FACTOR		0082#	0312	0746	0794	1123	1133	1314
DAMAGE-SHIELDS			0031#	0310	0514	0515	0731	0732	0782	0830	1241	1265
DAMAGE-SHORT-RANGE-SENSORS	0026#	0305	0504	0505	0537	0721	0722	0762	0810	1260
DAMAGE-WARP-DRIVE		0025#	0304	0502	0503	0682	0719	0720	0758	0806	1259
DESTINATION-X			0092#	1321	1325	1329	1350	1355
DESTINATION-Y			0093#	1322	1326	1330	1350	1356
DISPLAY-GALACTIC-RECORD		0131#	1297	1298
DISPLAY-HIT			0054#	1044	1046	1069	1071	1094	1096	1425	1429	1440	1444
				1455	1459
DISPLAY-MASTER-GALAXY		0126#	0941	0942	0949	0950	0957	0958	0966	0967	0974	0975
				0982	0983	0991	0992	0999	1000	1007	1008
DISPLAY-QUADRANT		0096#	0588	0933	1347
DISPLAY-SHIELD-ENERGY		0024#	0623	0633
DISPLAY-STARDATE		0034#	0545	0555
DISPLAY-TORPEDO-COUNTER		0022#	0612	0622
DISPLAY-TOTAL-ENERGY		0037#	0601	0611
DISPLAY-X-1			0099#	0568	0569	0922	0923	1336	1337
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE C-2
    EXETER.CBL    22-JUN-64  09:05

DISPLAY-X-2			0102#	0571	0572	0925	0926	1339	1340
DISPLAY-X-3			0105#	0574	0575	0928	0929	1342	1343
DISPLAY-X-4			0108#	0577	0931	1345
DISPLAY-Y			0097#	0098	0101	0104	0107	0567	0921	1335
DISTANCE			0055#	1038	1043	1063	1068	1088	1093	1399	1400	1418	1422
				1433	1437	1448	1452
DISTANCE-COMPUTATION		1375	1378	1384	1387	1394#
DOCK-SCAN			0475	0484#	0881
DOCK-TEST-X			0046#	0486	0488	0491	0493	0528
DOCK-TEST-Y			0047#	0487	0489	0492	0493	0523	0526
DOCKING-LOOP			0491	0492	0494	0521#
DOCKING-PROCEDURE		0495#
DUMMY-1				0098#
DUMMY-2				0101#
DUMMY-3				0104#
DUMMY-4				0107#
EFFICIENCY-RATING		0079#	1118	1125
EMPTY-SPACE			0417	0422	0427	0434#
ENERGY				0111#	0115	0119	0452	0456	0460	1037	1045	1049	1050	1062
				1070	1074	1075	1087	1095	1099	1100	1320	1324	1328	1417
				1422	1432	1437	1447	1452
ENERGY-INFO-LOOP		1023#	1029
EXETER				0002
FIRE-POWER			0078#	1027	1028	1029	1030	1036	1036	1042	1067	1092
GALACTIC-RECORD			0129#	0944	0952	0960	0969	0977	0985	0994	1002	1010	1058
				1060	1083	1085	1108	1110	1201	1203	1224	1227	1297
GALACTIC-RECORD-I-LOOP		1292#	1302
GALACTIC-RECORD-J-LOOP		1296#	1300
GOOD-NEWS			0739	0788#
GOOD-NEWS-COMPUTER		0802	0832#
GOOD-NEWS-DAMAGE-CONTROL	0800	0824#
GOOD-NEWS-LONG-RANGE-SENSORS	0797	0812#
GOOD-NEWS-PHASERS		0798	0816#
GOOD-NEWS-PHOTON-TUBES		0799	0820#
GOOD-NEWS-SHIELDS		0801	0828#
GOOD-NEWS-SHORT-RANGE-SENSORS	0796	0808#
GOOD-NEWS-WARP-DRIVE		0795	0804#
HELL				0541	0643#	0669	0681	0687	0711	0919	1013	1017	1020	1028
				1112	1153	1156	1159	1232	1239	1243	1247	1251	1255	1267
				1271	1305	1332	1352	1361
HIT				0053#	1042	1044	1045	1067	1069	1070	1092	1094	1095	1422
				1424	1425	1426	1437	1439	1440	1441	1452	1454	1455	1456
I				0065#	0357	0361	0365	0369	0374	0379	0383	0384	0388	0391
				0442	0451	0455	0459	0463	0464	0465	0482	0483	0843	0860
				0861	1291	1293	1295	1297	1302	1357	1373	1373	1374	1374
				1374	1377	1382	1383	1386
I-SHOOT-YOU-NOT			1416	1462	1465#
INSTRUCTION-SECTION		0156	0162#
INT-VECTOR			0063#	0842	0845	0846	0847	0848	0849	0850	1168	1170	1171
				1172	1173	1174	1175
INT1-VECTOR			0064#	0844	0846	0849	1169	1171	1174
J				0066#	0357	0361	0365	0369	0374	0379	0380	0381	0382	0390
				0391	1291	1293	1297	1299	1300	1301	1358	1373	1374	1377
				1382	1382	1383	1383	1383	1386
KAY				0003
KLINGON-DESTROYED		1194	1206#
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE C-3
    EXETER.CBL    22-JUN-64  09:05

KLINGON-GENERATOR		0358#	0381	0384
KLINGON-INSERTION		0444#	0449	0464
KLINGON-ONE			0110#	0313	0436	0452	0453	0454	1037	1038	1039	1045	1047
				1048	1049	1050	1054	1055	1211	1211	1213	1320	1321	1322
				1417	1418	1419	1422	1430	1430
KLINGON-THREE			0118#	0315	0438	0460	0461	0462	1087	1088	1089	1095	1097
				1098	1099	1100	1104	1105	1217	1217	1219	1328	1329	1330
				1447	1448	1449	1452	1460	1460
KLINGON-TWO			0114#	0314	0437	0456	0457	0458	1062	1063	1064	1070	1072
				1073	1074	1075	1079	1080	1214	1214	1216	1324	1325	1326
				1432	1433	1434	1437	1445	1445
KLINGONS-IN-PRESENT-SECTOR	0072#	0416	0421	0426	0427	0443	0464	0530	0695	0706	1015
				1042	1052	1067	1077	1092	1102	1207	1229	1236	1416
KLINGONS-LEFT			0043#	0321	0385	0887	1053	1078	1103	1112	1208	1210	1307
				1407
LAST-KLINGON-IS-DEAD		1113#	1210
LIBRARY-COMPUTER		0655	1268#	1284
LONG-RANGE-SENSOR-SCAN		0650	0916#
MAIN				0141#
MASTER-GALAXY			0124#	0361	0365	0369	0374	0379	0391	0423	0941	0944	0949
				0952	0957	0960	0966	0969	0974	0977	0982	0985	0991	0994
				0999	1002	1007	1010	1056	1081	1106	1199	1221
MASTER-GALAXY-LAYOUT		0122#	0317
MISS-FACTOR1			0087#	1184	1186	1187	1189
MISS-FACTOR2			0088#	1185	1186	1188	1189
MOVE-DISTANCE			0057#	0699	0703	0709	0860	0894	0896
MR-SCOTT-DO-YOUR-THING		0705	0718#
MULTIPLIER			0013#	1473
NAVIGATION-ERRORS		0085#	0318	0867	1119	1129	1310
NAVIGATION-LOOP			0851#	0862
NCC-1706-QUADRANT-X		0038#	0349	0413	0423	0569	0572	0575	0577	0893	0899	0901
				0907	0923	0926	0929	0931	0935	1056	1058	1060	1081	1083
				1085	1106	1108	1110	1199	1201	1203	1221	1224	1227	1337
				1340	1343	1345
NCC-1706-QUADRANT-Y		0039#	0351	0418	0423	0567	0895	0900	0902	0910	0921	0936
				1057	1058	1061	1082	1083	1086	1107	1108	1111	1199	1201
				1204	1222	1225	1228	1335
NCC-1706-SECTOR-X		0040#	0353	0441	0486	0598	0839	0840	0863	0869	0871	0874
				0893	0901	0906	0908	1039	1064	1089	1166	1318	1348	1419
				1434	1449
NCC-1706-SECTOR-Y		0041#	0355	0441	0487	0526	0600	0839	0841	0864	0870	0872
				0875	0895	0902	0909	0911	1040	1065	1090	1167	1319	1348
				1420	1435	1450
PARK-THE-EXETER			0837	0865	0873#
PHASER-CONTROL			0651	1014#
PHOTON-TORPEDO-CONTROL		0652	1150#
PHOTON-TORPEDO-DATA		1276	1317#
PICTURE-GALACTIC-RECORD		0089#
PRESENT-SECTOR			0134#	0441	0449	0450	0472	0473	0480	0481	0493	0546	0547
				0548	0549	0550	0551	0552	0553	0556	0557	0558	0559	0560
				0561	0562	0563	0579	0580	0581	0582	0583	0584	0585	0586
				0589	0590	0591	0592	0593	0594	0595	0596	0602	0603	0604
				0605	0606	0607	0608	0609	0613	0614	0615	0616	0617	0618
				0619	0620	0624	0625	0626	0627	0628	0629	0630	0631	0634
				0635	0636	0637	0638	0639	0640	0641	0838	0859	0874	1054
				1079	1104	1190	1191	1194	1198	1220
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE C-4
    EXETER.CBL    22-JUN-64  09:05

PRESENT-SECTOR-LAYOUT		0132#	0327	0440
QUADRANT-FOUR			1369	1391#
QUADRANT-ONE			1363	1370#
QUADRANT-THREE			1367	1388#
QUADRANT-TWO			1365	1379#
QUIT				1147	1477#
RAN				0015#	0349	0351	0353	0355	0360	0364	0368	0373	0378	0388
				0390	0409	0446	0448	0469	0471	0477	0479	0736	0739	0743
				0745	0791	0793	1036	1043	1068	1093	1423	1438	1453	1474
RANDOMIZE			0297	0348	0350	0352	0354	0359	0372	0377	0387	0389	0408
				0445	0447	0468	0470	0476	0478	0735	0738	0742	0744	0790
				0792	1035	1041	1066	1091	1421	1436	1451	1466#
RAYS-FLOATING-COMMA-BYPASS	0570	0573	0576	0578#
RAYS-FLOATING-COMMA-BYPASS2	0924	0927	0930	0932#
RAYS-FLOATING-COMMA-BYPASS3	1338	1341	1344	1346#
REAL-X				0069#	0840	0852	0854	0893	0897	1166	1178	1180	1183	1184
				1185	1355	1357	1359	1362	1364	1366	1368	1399
REAL-Y				0070#	0841	0853	0855	0895	0898	1167	1179	1181	1183	1187
				1188	1356	1358	1359	1362	1364	1366	1368	1399
REPAIR				0060#	0793	0794	0806	0810	0814	0818	0822	0826	0830	0834
SEE-IF-HE-WANTS-INSTRUCTIONS	0142#
SEED				0017#	0296	1470	1472	1472	1473	1474
SHIELD-CONTROL			0653	1240#	1248
SHIELD-ENERGY			0023#	0303	0428	0500	0623	0697	0698	0716	1033	1231	1238
				1249	1250	1426	1431	1441	1446	1456	1461
SHOOTING-EXIT			1415	1463#
SHORT-RANGE-SENSOR-SCAN		0520	0532	0536#	0649
SOURCE-X			0090#	1318	1350	1355
SOURCE-Y			0091#	1319	1350	1356
STAR-INSERTION			0467	0474#	0480	0483
STARBASE-GENERATOR		0363	0367	0371#
STARBASE-IN-PRESENT-SECTOR	0073#	0415	0420	0425	0467	1197
STARBASE-INSERTION		0443	0466#	0472
STARBASE-VISITS			0084#	0325	0496	1121	1131	1312
STARBASES-DESTROYED		0081#	1116	1124	1134	1135	1137
STARBASES-LEFT			0045#	0324	0376	0393	1116	1196	1309
STARDATE			0033#	0409	0545	0877	0879	0885	0912
STARDATES-LEFT			0035#	0299	0878	0880	0883	0913	0914	1117	1308
STARS-IN-PRESENT-SECTOR		0071#	0414	0419	0424	0475	0483
STARSHIP-PLACEMENT		0410#	0915
STATUS-REPORT			1275	1306#
SUM-OF-PHASER-HITS		0083#	0316	1122	1132	1313	1424	1439	1454
TEMP-1				0074#
TEMP-2				0075#	0424	0425
TEMP-3				0076#	0424	0426
TEMP-4				0077#	1246	1247	1248	1249
TEMP1				0018#	1470	1471
TEMP2				0019#	1471	1472
THE-ENEMY-SHOOTS-BACK		0696	0715	1032	1230	1237	1411#
THE-EXETER-IS-DEAD		0697	0716	1033	1231	1238	1401#
TIME-IS-UP			0882#	0914
TIME-OF-MISSION			0080#	1117	1118	1126
TORPEDO-COUNTER			0021#	0298	0501	0612	1154	1160
TORPEDO-LOOP			1177#	1186	1189	1190
TORPEDO-MISSED			1182	1193	1205	1233#
TORPEDO-MISSES			0086#	0319	1120	1130	1235	1311
    P R O G R A M   E X E T E R 		COBOL 6A(270)	26-JUN-75  09:05		PAGE C-5
    EXETER.CBL    22-JUN-64  09:05

TOTAL-ENERGY			0036#	0300	0498	0533	0601	0698	0702	0703	0710	1031	1244
				1248	1250	1427	1442	1457
TOTAL-KLINGONS			0042#	0320	0362	0366	0370	0385	0397	1118	1121	1122	1128
TOTAL-STARBASES			0044#	0322	0375	0386	0392	0398	1116
TRY-AGAIN			1134	1140#	1149
VECTOR				0050#	0675	0676	0677	0678	0678	0842	0844	0847	0850	1162
				1163	1164	1165	1165	1168	1169	1172	1175	1371	1374	1374
				1377	1377	1380	1383	1383	1386	1386	1389	1392	1395
VECTOR-ANALYSIS			1323	1327	1331	1351	1353#
WAITING-FOR-ANSWER		0153#	0161
WARP				0052#	0689	0691	0692	0693	0694	0699	0837	0876
WARP-ENERGY			0056#	0301	0499	0698	0701	0704	0705	0709	1025	1029	1030
				1250
WARP-ENGINE-CONTROL		0648	0670#	0673
WARP-FACTOR			0051#	0680	0681	0683	0689	0708
WHO-GOT-HIT			0058#	0743	0755	0791	0803
X				0067#	0378	0379	0446	0449	0450	0453	0457	0461	0469	0472
				0473	0477	0480	0481	0485	0527	0529	0854	0857	0859	0863
				0869	0897	0899	0901	0935	0937	0939	0941	0944	0944	0947
				0949	0952	0952	0955	0957	0960	0960	0961	0964	0966	0969
				0969	0972	0974	0977	0977	0980	0982	0985	0985	0986	0989
				0991	0994	0994	0997	0999	1002	1002	1005	1007	1010	1010
				1180	1182	1190	1191	1194	1198	1211	1214	1217	1220
X-COORD				0112#	0116	0120	0453	0457	0461	1038	1047	1054	1063	1072
				1079	1088	1097	1104	1211	1214	1217	1321	1325	1329	1418
				1430	1433	1445	1448	1460
X1				0061#	0845	0852	0869	0894	1170	1178
X2				0062#	0848	0853	0870	0896	1173	1179
Y				0068#	0448	0449	0450	0454	0458	0462	0471	0472	0473	0479
				0480	0481	0485	0522	0524	0525	0855	0857	0859	0864	0870
				0898	0900	0902	0936	0937	0939	0941	0944	0944	0945	0947
				0949	0952	0952	0953	0955	0957	0960	0960	0962	0964	0966
				0969	0969	0970	0972	0974	0977	0977	0978	0980	0982	0985
				0985	0987	0989	0991	0994	0994	0995	0997	0999	1002	1002
				1003	1005	1007	1010	1010	1181	1182	1190	1191	1194	1198
				1212	1215	1218	1220
Y-COORD				0113#	0117	0121	0454	0458	0462	1039	1048	1055	1064	1073
				1080	1089	1098	1105	1211	1214	1217	1322	1326	1330	1419
				1430	1434	1445	1449	1460
YES-OR-NO-ANSWER		0011#	0154	0155	0157	1145	1146	1147
ZERO-THE-SECTOR-WE-LEAVE	0736	0759	0763	0767	0771	0775	0779	0783	0787	0807	0811
				0815	0819	0823	0827	0831	0835	0836#