Compucolor.org – Virtual Media

Listing of file='LUNAR.BAS;01' on disk='vmedia/startrek-sector.ccvf'

100 PLOT 12:GOSUB 880
110 PLOT 14,12,6,7
120 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO) ? ";A$
130 IF A$= "NO"OR A$= "N"THEN 430
140 PLOT 12,15,6,2
150 PRINT "YOU ARE LANDING ON THE MOON AND HAVE TAKEN OVER MANUAL"
160 PRINT "CONTROL 500 FEET OVER A GOOD LANDING SPOT. YOU HAVE A"
170 PRINT "DOWNWARD VELOCITY OF 50 FT./SEC.  120 UNITS OF FUEL REMAIN."
180 PLOT 15,6,7:PRINT
190 PRINT "HERE ARE THE RULES THAT GOVERN YOUR SPACE VEHICLE:"
200 PRINT
210 PRINT "(1) AFTER EACH SECOND,THE HEIGHT,VELOCITY,AND REMAINING "
220 PRINT "    FUEL WILL BE REPORTED."
230 PRINT
240 PRINT "(2) THEN YOU WILL BE ASKED FOR THE NUMBER OF UNITS OF FUEL"
250 PRINT "    YOU WISH TO BURN DURING THE NEXT SECOND. EACH UNIT OF "
260 PRINT "    FUEL WILL SLOW YOUR DESCENT BY 1 FT./SEC."
270 PRINT
280 PRINT "(3) THE MAXIMUM THRUST OF YOUR ENGINE IS 30 FT/SEC/SEC OR"
290 PRINT "    30 UNITS OF FUEL PER SECOND."
300 PRINT
310 PRINT "(4) WHEN YOU CONTACT THE LUNAR SURFACE,YOUR DESCENT ENGINE"
320 PRINT "    WILL AUTOMATICALLY CUT OFF AND YOU WILL BE GIVEN A"
330 PRINT "    REPORT OF YOUR LANDING SPEED AND REMAINING FUEL."
340 PRINT
350 PRINT "(5) IF YOU RUN OUT OF FUEL, YOU WILL NO LONGER BE ASKED FOR"
360 PRINT "    THE AMOUNT OF FUEL, BUT YOUR REPORT WILL CONTINUE UNTIL"
370 PRINT "    YOU CONTACT THE LUNAR SURFACE.":PRINT
380 PRINT "(6) IF YOUR ALTITUDE EXCEEDS 500 FEET, THE LUNAR LANDER WILL"
390 PRINT "    GO UP OFF THE SCREEN. IT WILL RE-APPEAR WHEN THE ALTITUDE"
400 PRINT "    RETURNS TO 500 FEET OR LESS."
410 PRINT :PRINT :PRINT
420 INPUT "HIT THE RETURN KEY TO RESUME : ";Z$
430 GOSUB 970:REM  DRAW INSTRUMENTS & MOON
440 T= 0:H= 500:V= 50:F= 120
450 GOSUB 1440:REM  DRAW LUNAR LANDER
460 PLOT 15,6,48,3,0,25:INPUT " NUMBER OF UNITS OF FUEL YOU WISH TO BURN (30 MAX) ? ";B
470 PLOT 6,2,3,0,25,11
480 IF B< 0THEN 650
490 IF B> 30THEN B= 30
500 IF B> FTHEN B= F
510 V1= V- B+ 5
520 F= F- B
530 H= H- .5* (V+ V1)
540 IF H< = 0THEN 600
550 T= T+ 1
560 V= V1
570 IF F> 0THEN GOSUB 1430:GOSUB 1190:GOSUB 1430:GOSUB 1440:GOTO 460
580 B= 0
590 GOSUB 1430:GOSUB 1190:GOSUB 1430:GOSUB 1440:GOTO 510
600 H= H+ .5* (V+ V1)
610 IF B= 5THEN 640
620 D= (- V+ SQR (V* V+ H* (10- 2* B)))/ (5- B)
630 GOTO 650
640 D= H/ V
650 V1= V+ (5- B)* D
660 IF V1> 5THEN 810
670 RK= 1:IF V1> 2THEN RK= 2
680 ON RKGOTO 690,760
690 H= 0:V= 0:V1= 0:T= T+ 1:GOSUB 1190:GOSUB 1440
700 PLOT 3,0,4
710 PRINT "CONGRATULATIONS !!!        A PERFECT LANDING"
720 PRINT "YOUR LICENCE WILL BE RENEWED.............LATER"
730 FOR I= 1TO 4000:NEXT
740 PLOT 14,3,0,4,11,3,0,6,11
750 GOTO 820
760 H= 0:V= V1:T= T+ 1:GOSUB 1190:GOSUB 1440
770 PLOT 3,0,4,6,6:PRINT "YOUR LANDING WAS FAIR...ROOKIE !"
780 PLOT 3,64,0:FOR I= 1TO 4000:NEXT
790 PLOT 14,3,0,4,11,3,0,6,11
800 GOTO 820
810 GOSUB 1610
820 PLOT 3,0,4,14,29,6,2
830 INPUT "ANOTHER MISSION (YES OR NO) ? ";A$
840 IF A$= "Y"OR A$= "YES"THEN 430
850 PLOT 15,6,2,12
860 LOAD "MENU":RUN
870 END
880 PLOT 15,6,7,2,250,0
890 FOR I= 27TO 0STEP - 1:PLOT I,127:NEXT :PLOT 255
900 PLOT 14,6,28,3,9,2
910 PRINT " C O M P U C O L O R   C O R P O R A T I O N "
920 PLOT 15,6,7,3,28,5:PRINT "PRESENTS"
930 PLOT 3,19,28,14,6,39:PRINT " LUNAR LANDING SIMULATION
940 PLOT 6,2,15,3,64,0
950 FOR I= 1TO 5000:NEXT
960 RETURN
970 REM  DRAW INSTRUMENTS & MOON
980 PLOT 12,15,6,5,2
990 PLOT 250,4,2,122,9,122,21,122
1000 PLOT 246,2,4,21,63,21,85,21,107,21,122,21
1010 PLOT 255,6,2
1020 PLOT 3,4,27:PRINT "DAY    HOUR   MINUTE SECOND"
1030 PLOT 3,34,27:PRINT "VELOCITY"
1040 PLOT 3,45,27:PRINT "ALTITUDE"
1050 PLOT 3,56,27:PRINT "FUEL"
1060 PLOT 3,34,28,6,6:PRINT "FEET.SEC"
1070 PLOT 3,46,28:PRINT "(FEET)"
1080 PLOT 3,55,28:PRINT "(UNIT)"
1090 PLOT 3,5,30,6,7:PRINT "7      19      36"
1100 PLOT 3,28,30,6,3:PRINT "0"
1110 PLOT 3,37,30:PRINT "50"
1120 PLOT 3,47,30:PRINT "500"
1130 PLOT 3,57,30:PRINT "120"
1140 GOSUB 1430
1150 PLOT 6,7,2,246,30
1160 FOR I= 1TO 127:PLOT I,39:NEXT :PLOT 255
1170 GOSUB 1430
1180 RETURN
1190 REM  UPDATE INSTRUMENTS & FIRE THE BOOSTERS
1200 T$= STR$ (T):T1= LEN (T$)
1210 V$= STR$ (V):V2= LEN (V$)
1220 H$= STR$ (H):H1= LEN (H$)
1230 F$= STR$ (F):F1= LEN (F$)
1240 E$= "     ":PLOT 3,25,30:PRINT E$
1250 PLOT 3,33,30:PRINT E$
1260 PLOT 3,45,30:PRINT E$
1270 PLOT 3,56,30:PRINT E$
1280 PLOT 3,29- T1,30,6,3:PRINT T$
1290 PLOT 3,39- V2,30:PRINT V$
1300 PLOT 3,50- H1,30:PRINT H$
1310 PLOT 3,60- F1,30:PRINT F$
1320 REM
1330 IF B= 0THEN 1420
1340 U= 2* X+ 3
1350 S= W2- 2
1360 LW= 40
1370 IF S- LW> 5THEN LW= S- 5
1380 PLOT 6,67,2,246,LW,U,S,255
1390 FOR I= 1TO 500:NEXT
1400 PLOT 6,0,2,246,LW,U,S,255
1410 FOR I= 1TO 50:NEXT
1420 RETURN
1430 PLOT 3,64,0:RETURN
1440 REM  DRAW LUNAR LANDER
1450 IF H> 500AND Y= 1THEN PLOT 3,0,Y,11,3,64,0:RETURN
1460 IF T< > 0THEN PLOT 3,0,Y,11
1470 IF H< 0THEN 810
1480 IF H= 0THEN X= 1:Y= 21:GOTO 1530
1490 X= 60- 4* INT ((120- F)/ 8)
1500 IF X= 0THEN X= 1
1510 Y= 1+ INT ((500- H)/ 25)
1520 IF Y< 1THEN Y= 1
1530 W1= 127- Y* 4
1540 Z1= (X- 1)* 2+ 1
1550 W2= 124- Y* 4
1560 Z2= (X+ 2)* 2+ 2
1570 PLOT 15,6,7,3,X,Y,93,100,91
1580 PLOT 6,65,2,246,W1,Z1,W1,255
1590 PLOT 6,66,2,246,W2,Z2,W2,255
1600 PLOT 15:RETURN
1610 REM  BLOW-UP LUNAR LANDER & DRAW GRAVE
1620 PLOT 12,15
1630 FOR I= 1TO 5
1640 PLOT 6,27,12,6,0,12,6,9,12
1650 FOR J= 1TO 25:NEXT
1660 NEXT
1670 REM
1680 PLOT 6,6,12,30,2
1690 PLOT 246,12,54,87
1700 PLOT 246,12,88,87
1710 PLOT 246,16,93,91
1720 PLOT 250,54,87,88
1730 PLOT 250,60,91,93
1740 PLOT 253,54,87,242,59,91
1750 PLOT 253,88,87,242,93,91
1760 PLOT 255,3,64,0
1770 PLOT 3,30,15,123,100
1780 PLOT 3,34,15,101,110
1790 PLOT 3,38,15,123,100
1800 PLOT 3,30,16,97,124
1810 PLOT 3,34,16,127,108
1820 PLOT 3,38,16,97
1830 PLOT 2,250,54,12,88
1840 PLOT 253,88,12,242,93,16
1850 PLOT 253,93,16,255
1860 PLOT 6,2,14,29
1870 FOR I= 24TO 28STEP 2:PLOT 3,36,I,109:NEXT
1880 PLOT 6,1,2,250,71,35,74
1890 PLOT 250,70,34,75
1900 PLOT 250,71,33,74
1910 PLOT 250,72,32,73
1920 PLOT 255,6,2,2
1930 PLOT 253,68,15,69,14,70,13,70,12,71,11,71,10
1940 PLOT 72,9,72,8,70,19,70,18,71,17,71,16,71,15
1950 PLOT 72,14,72,13,72,12,71,11,77,23,77,22,76,21
1960 PLOT 76,20,75,19,75,18,75,17,74,16,74,15,74,14
1970 PLOT 74,13,73,12,73,11,73,10
1980 PLOT 255,6,2,15,3,64,2
1990 FOR I= 1TO 4000:NEXT
2000 RETURN