Compucolor.org – Virtual Media

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

1 REM  WRITTEN BY :  DENNIS L. MARTIN
2 REM                8470 OHERN STREET
3 REM                OMAHA, NE.  68127
4 REM  COPYRIGHT (C) 1979 BY COLORSOFT ( A DIVISION OF RDS SYSTEMS, INC.)
10 PLOT 12,29,17
15 XX= 0:YY= 0:XY= 127:YX= 127
20 XA= 0:YB= 0:AB= 127:BA= 127
25 FOR Q9= 1TO 12
30 PLOT 2,XX,YY,242,XA,BA,242,XY,YX,242,AB,YB,242,XX,YY,255
35 XA= XA+ 3:YX= YX- 3:AB= AB- 3:YY= YY+ 3
37 XX= XX+ 3:YB= YB+ 3:XY= XY- 3:BA= BA- 3
40 NEXT
44 PLOT 29,23,14
45 PLOT 3,27,10,30,112,113,32,116,117,32,116,117,32,112,98
50 PLOT 3,27,12,30,97,98,32,118,119,32,118,119,32,97,115
55 PLOT 3,22,16,30,112,113,32,101,110,32,99,102,32,99,102,32,101,110,32,116,117,32,112,98
60 PLOT 3,22,18,30,97,98,32,127,108,32,103,100,32,103,100,32,127,108,32,118,119,32,97,115
70 PLOT 15
75 FOR Q9= 1TO 1000:PLOT 3,80,0:NEXT
90 PLOT 27,24,0,32,12
100 PLOT 3,10,14
110 PRINT "WOULD YOU LIKE INSTRUCTIONS (Y OR N) ?";
115 POKE 33278,0
120 Z9= PEEK (33278)
125 IF Z9= 89THEN 140
130 IF Z9= 78THEN 245
135 GOTO 120
140 PLOT 12,27,4:PRINT "LOA INSTR.PIC":PLOT 255
220 PRINT "";
225 POKE 33278,0
230 Z9= PEEK (33278)
235 IF Z9> 0THEN 245
240 GOTO 230
245 PLOT 12:PRINT
250 INPUT "WHAT IS THE INITIAL ALTITUDE (METERS) ?";A3
260 PRINT :INPUT "WHAT IS THE INITIAL VERTICAL VELOCITY (DOWN IS +) ?";V6
270 PRINT :INPUT "WHAT IS THE DISTANCE Y ? ";D4
280 PRINT :INPUT "WHAT IS THE Y VELOCITY ? ";V4
290 PRINT :INPUT "WHAT IS THE DISTANCE X ? ";D5
300 PRINT :INPUT "WHAT IS THE X VELOCITY ? ";V5
310 PRINT :INPUT "WHAT IS THE MAXIMUM BURN RATE ? ";M
320 PRINT :INPUT "WHAT IS YOUR FUEL CAPACITY ? ";F3
330 PRINT :INPUT "WHAT IS THE GRAVITATIONAL CONSTANT ? ";G
335 G= G* 5
340 PRINT :INPUT "WHAT IS THE NAME OF YOUR SHIP ? ";N1$
350 PLOT 12,3,13,14,14,31
370 PRINT "CONTROL TO ";N1$;", COMMENCE LANDING"
375 PLOT 15,15
380 REM
390 PLOT 27,4:PRINT "LOA MOON.PIC":PLOT 255
395 PLOT 27,27
403 GOSUB 1900
405 V= V6:V1= V4:V2= V5:T= 0:F= F3:A= A3:D1= D4:D2= D5
410 T3= T3+ T
415 L9= 27
420 GOSUB 10000
650 GOSUB 2080
660 IF F< = 0THEN 1190
710 PLOT 3,26,26,32,32,32,32,32,26,26,26,26,26
720 INPUT " ";T
730 PLOT 3,26,27,32,32,32,32,32,26,26,26,26,26
740 INPUT " ";B
750 PLOT 3,26,28,32,32,32,32,32,26,26,26,26,26
760 INPUT " ";B2
770 B2= - B2
780 PLOT 3,26,29,32,32,32,32,32,26,26,26,26,26
790 INPUT " ";B1
800 B1= - B1
820 GOTO 1340
830 F1= F
840 A1= A
850 IF F< = 0GOTO 1190
860 A= A- V* T- ((G- B)* T)/ 2
870 IF A< = 0GOTO 910
880 V= V+ (G- B)* T
890 GOSUB 2010
900 GOTO 410
910 G1= G- B
920 T1= ((- 2* V)+ SQR (ABS (4* V^ 2+ 8* G* A1)))/ (2* G)
930 V= V+ (G1* T1)
940 GOSUB 2010
950 T4= T3+ T1
960 IF V< 3GOTO 990
965 GOSUB 15000
970 PLOT 3,32,10
972 PRINT "AT T=";T4;" THE ";N1$
974 PLOT 3,32,11
976 PRINT "CRASHED WITH A DESCENT"
980 GOTO 1000
990 PLOT 3,32,10
992 PRINT "AT T=";T4;" THE ";N1$
994 PLOT 3,32,11
996 PRINT "LANDED WITH A DESCENT"
1000 PLOT 3,32,12
1002 PRINT "VELOCITY OF ";V;" M/SEC"
1005 FOR Q9= 1TO 1000:NEXT
1010 R= SQR (V1^ 2+ V2^ 2)
1020 IF R> 5THEN 1050
1030 PLOT 3,32,13
1032 PRINT "WITH A HORIZONTAL VELOCITY OF"
1034 PLOT 3,32,14
1036 PRINT R;" METERS/SEC"
1040 GOTO 1080
1050 P9= 1
1060 PLOT 3,32,13
1062 PRINT "AND FLIPPED OVER WITH A "
1064 PLOT 3,32,14
1066 PRINT "HORIZONTAL VELOCITY OF"
1068 PLOT 3,32,15
1069 PRINT R;" METERS/SEC"
1070 P9= 1
1080 PLOT 3,32,16
1082 PRINT "THE LANDING POINT WAS AT"
1084 PLOT 3,32,17
1086 PRINT "(";D2;",";D1;")"
1090 D= SQR (D1^ 2+ D2^ 2)
1100 IF R< = 5GOTO 1140
1110 PLOT 3,32,18
1112 PRINT D;" METERS FROM THE "
1113 PLOT 3,32,19
1114 PRINT "LANDING SITE"
1115 FOR Q9= 1TO 1000:NEXT
1120 GOTO 1790
1130 IF P9= 1GOTO 1790
1140 IF D> 100GOTO 1170
1150 PLOT 3,32,18
1152 PRINT "BEAUTIFUL ";N1$;", YOU WERE"
1154 PLOT 3,32,19
1156 PRINT D;" METERS FROM THE"
1157 PLOT 3,32,20
1158 PRINT "LANDING SITE"
1160 GOTO 1790
1170 PLOT 3,32,18
1172 PRINT "GOOD LANDING ";N1$;", BUT YOU"
1174 PLOT 3,32,19
1176 PRINT "WERE";D;" METERS OFF"
1180 GOTO 1790
1190 T= T+ 1:T3= T3+ 1
1191 B= 0:B1= 0:B2= 0
1192 A= A- (V* ((G- B)/ 2)):IF A< 0THEN A= 0
1193 T1= (- V+ SQR (V^ 2+ 2* A* G))/ G
1194 V= V+ G* T1
1200 PLOT 3,30,27,29,17,14,31
1210 PRINT "     OUT OF FUEL !!            "
1220 PLOT 29,17,15,15
1240 GOSUB 2010
1250 D1= D1+ V1* (T1- T)
1260 D2= D2+ V2* (T1- T)
1270 IF V< 3GOTO 950
1280 T4= T3+ T1
1281 IF Y8> 0OR X8> 0THEN T3= T4:A= 0:GOTO 1286
1285 Y8= 22:T3= T4:A= 0:X8= 46+ D2
1286 GOSUB 2010
1290 GOSUB 19000
1291 PLOT 3,32,10
1292 PRINT "THE ";N1$;" CRASHED AT "
1293 PLOT 3,32,11
1294 PRINT "T=";T4;" SEC AT THE POINT"
1295 PLOT 3,32,12
1296 PRINT "(";D2;",";D1;")"
1300 R= SQR (V1^ 2+ V2^ 2)
1310 PLOT 3,32,13
1312 PRINT "WITH A DOWNWARD VELOCITY";V
1313 PLOT 3,32,14
1314 PRINT "AND A FORWARD VELOCITY";R
1320 PLOT 3,32,16
1322 PRINT "CRASH DUE TO PILOT ERROR"
1324 PLOT 3,32,17
1326 PRINT "( THE IDIOT RAN OUT OF FUEL!! )"
1330 GOTO 1790
1340 IF ABS (B)< = MTHEN 1400
1350 IF B< 0GOTO 1380
1360 B= M
1370 GOTO 1390
1380 B= - M
1390 Z= Z+ 1
1400 IF ABS (B1)< = MTHEN 1460
1410 IF B1< 0THEN 1440
1420 B1= M
1430 GOTO 1450
1440 B1= - M
1450 Z1= Z1+ 1
1460 IF ABS (B2)< = MGOTO 1520
1470 IF B2< 0GOTO 1500
1480 B2= M
1490 GOTO 1510
1500 B2= - M
1510 Z2= Z2+ 1
1520 F= F- ((ABS (B)+ ABS (B1)+ ABS (B2))* T)
1530 IF Z= 1THEN 1600
1540 IF Z= 2THEN 1780
1550 IF Z1= 1THEN 1660
1560 IF Z1= 2THEN 1780
1570 IF Z2= 1THEN 1720
1580 IF Z2= 2THEN 1780
1590 GOTO 1770
1600 IF B= 0GOTO 1550
1610 E= E- 1
1620 IF E= 0GOTO 1780
1630 GOSUB 1880
1640 PLOT 3,32,27,29,17,31
1644 PRINT "ENGINE WILL BLOW IN";E;" BURNS "
1646 PLOT 29,23,15
1650 GOTO 1550
1660 IF B1= 0GOTO 1570
1670 E1= E1- 1
1680 IF E1= 0GOTO 1780
1690 GOSUB 1880
1700 PLOT 3,32,29,29,17,31
1704 PRINT "ENGINE WILL BLOW IN";E1;" BURNS "
1706 PLOT 29,23,15
1710 GOTO 1570
1720 IF B2= 0GOTO 1770
1730 E2= E2- 1
1740 IF E2= 0GOTO 1780
1750 GOSUB 1880
1760 PLOT 3,32,28,29,17,31
1764 PRINT "ENGINE WILL BLOW IN";E2;" BURNS "
1766 PLOT 29,23,15
1770 GOTO 840
1780 GOSUB 1990
1790 FOR Q9= 26TO 29:PLOT 3,0,Q9,11:NEXT
1795 PLOT 3,0,27:PRINT "CONTROL TO ";N1$;": WOULD YOU LIKE TO TRY ANOTHER MISSION ?";
1800 POKE 33278,0
1805 Z9= PEEK (33278)
1810 IF Z9= 89THEN 1830
1820 IF Z9= 78THEN 1870
1825 GOTO 1805
1830 PLOT 12:PRINT :PLOT 3,10,15
1832 PRINT "SAME INITIAL VALUES ? ";
1835 POKE 33278,0
1840 Z9= PEEK (33278)
1845 IF Z9= 89THEN 350
1850 IF Z9= 78THEN 245
1855 GOTO 1840
1870 END
1880 L9= 25
1890 RETURN
1900 T3= 0
1910 Z= 0
1920 Z1= 0
1930 Z2= 0
1940 E= 11
1950 E1= 11
1960 E2= 11
1965 K7= 0
1970 P9= 0
1975 PLOT 3,5,5:PRINT SPC( 50)""
1980 RETURN
1990 IF A< 120AND D2> - 13AND D2< 12THEN GOTO 17000
1991 PLOT 3,40,16
1992 PLOT 31,66,32,65,32,78,32,71,33
1993 FOR O9= 1TO 1000:NEXT
2000 RETURN
2010 V7= V1- B1* T
2020 D1= D1+ (V1* T)+ (T* (V1- V7))/ 2
2030 V8= V2- B2* T
2040 D2= D2+ (V2* T)+ (T* (V2- V8))/ 2
2050 V1= V7
2060 V2= V8
2065 GOSUB 10000
2070 RETURN
2080 REM
2260 RETURN
10000 PLOT 29,23,3,7,1:PRINT T3
10050 IF A< 0THEN A= 0
10060 PLOT 3,23,1:PRINT "     "
10100 PLOT 3,23,1:PRINT A;" "
10150 IF A< 30AND K7< 1THEN GOSUB 14300
10200 PLOT 3,49,1:PRINT V;" "
10300 PLOT 3,16,2:PRINT D2;" "
10400 PLOT 3,42,2:PRINT V2;" "
10500 PLOT 3,16,3:PRINT D1;" "
10600 PLOT 3,42,3:PRINT V1;" "
10650 PLOT 3,15,4:PRINT "     "
10675 IF F< 0THEN F= 0
10700 PLOT 3,16,4:PRINT F;" "
10720 IF K9= 1THEN GOSUB 12000
10730 IF K8= 1THEN GOSUB 14000
10750 IF D2> - 13AND D2< 12AND D1< 8AND D1> - 7THEN GOSUB 11000
10760 IF D2> - 13AND D2< 12AND A< 120THEN GOSUB 13000
10800 RETURN
11000 K9= 1
11100 X9= D2+ 13:Y9= D1+ 16
11200 PLOT 3,X9,Y9,43
11800 GOSUB 13000
11900 RETURN
12000 PLOT 3,X9,Y9,32
12100 K9= 0
12200 RETURN
13000 IF K8= 1THEN GOSUB 14000
13050 IF A> 120OR D2> 15OR D2< - 17THEN RETURN
13100 Y8= 22- (A/ 10):X8= 46+ D2
13200 PLOT 3,X8,Y8,29,18,31,46,15,29,23,30,16,99,100,29,17,31,46,15
13300 K8= 1
13900 RETURN
14000 PLOT 3,X8,Y8,32,32,32,32
14100 K8= 0
14200 RETURN
14300 FOR Q9= 31TO 62:PLOT 30,23,3,Q9,23,32:NEXT :PLOT 30,16
14400 PLOT 3,31,22,29,18,31,46,29,23,15
14500 PLOT 3,62,22,29,17,31,46,29,23,15
14550 K7= 1
14600 RETURN
15000 FOR Q9= 1TO 10
15100 IF Q9/ 2= INT (Q9/ 2)THEN C9= 19:GOTO 15300
15200 C9= 17
15300 PLOT 3,X8+ 1,Y8,29,C9,116,117
15400 NEXT
15500 PLOT 3,X8,Y8,32,32,32,32
15600 RETURN
17000 FOR Q9= 1TO 10
17100 IF Q9/ 2= INT (Q9/ 2)THEN C9= 23:GOTO 17300
17200 C9= 17
17300 PLOT 3,X8,Y8,29,C9,42,42,42,42
17400 NEXT
17500 PLOT 3,X8,Y8,32,32,32,32
17600 PLOT 3,32,14
17700 PRINT "YOUR ENGINE HAS BLOWN,"
17800 PLOT 3,32,15
17900 PRINT "AND YOUR SHIP HAS BEEN"
18000 PLOT 3,32,16
18100 PRINT "DESTROYED !!"
18200 GOTO 2000
19000 PLOT 3,X8,Y8,32,32,32,32
19100 Y8= 22
19150 A= 0
19200 GOSUB 15000
19300 RETURN