Lunar Excursion Module

Developer(s): Tony Willing, David Ahl
Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10176 – 10210.

Gallery

Lunar Excursion Module

Source Code

   0 REM  L.E.M.                          BY DAVID AHL MODIFIED           FOR %TS-1000 BY                  ANTHONY WILLING          
   5 SLOW 
  10 PRINT AT 10,12;"L.E.M."
  15 PRINT "   (LUNAR EXCURSION MODULE)"
  16 FOR Z=1 TO 45
  17 NEXT Z
  20 FOR Z=1 TO 10
  30 SCROLL 
  40 NEXT Z
  50 PRINT AT 4,0;"YOU ARE THE PILOT OF AN APOLLO";"  LUNAR LANDING CAPSULE WHOSE"
  55 PRINT "ONBOARD COMPUTER HAS FAILED (IT WAS MADE BY TEXAS INSTRUMENTS)."
  60 PRINT "TO SURVIVE, YOU MUST LAND THE   L.E.M. MANUALLY.  SET THE BURN"
  65 PRINT "RATE OF THE RETRO-ROCKETS TO ANYVALUE FROM 0 (FREE FALL) TO     16500 POUNDS PER SECOND."
  67 FOR Z=0 TO 300
  68 NEXT Z
  70 PRINT AT 17,10;"%G%O%O%D% %L%U%C%K"
  71 FOR Z=1 TO 100
  72 NEXT Z
  75 CLS 
  80 LET L=0
  85 PRINT "%S%E%C %M%I%+%F%T    %M%P%H  %L%B%.%F%U%E%L %B%U%R%N"
  90 LET A=140
  95 LET V=1
 100 LET M=33000
 105 LET N=16500
 110 LET G=1E-03
 115 LET Z=1.8
 117 LET K=0
 118 LET K=K/10
 120 PRINT L;TAB 4;INT (A);TAB 8;INT (5280*(A-INT (A)));TAB 13;INT (3600*V);TAB 18;M-N
 122 IF L>190 THEN SCROLL 
 123 INPUT K
 124 LET K=K/10
 125 LET T=10
 130 IF M-N<1E-03 THEN GOTO 185
 135 IF T<1E-03 THEN GOTO 120
 140 LET S=T
 145 IF M>=N+S*K THEN GOTO 155
 150 LET S=(M-N)/K
 155 GOSUB 1000
 160 IF I<=0 THEN GOTO 370
 165 IF V<=0 THEN GOTO 175
 170 IF J<0 THEN GOTO 400
 175 GOSUB 330
 180 GOTO 130
 185 PRINT "FUEL OUT AT ";L;" SECONDS"
 190 LET S=(-V+SQR (V*V+2*A*G))/G
 195 LET V=V+G*S
 200 LET L=L+S
 205 LET W=3600*V
 265 CLS 
 266 PRINT "ON MOON AT ";L;" SECONDS"
 270 PRINT " IMPACT VELOCITY ";INT W;" MPH."
 271 FOR H=1 TO 150
 272 NEXT H
 275 IF W<=1.2 THEN PRINT "PERFECT LANDING-CONGRATULATIONS"
 280 IF W<=1.2 THEN GOTO 2000
 285 IF W>=1.2 AND W<=10 THEN GOSUB 5000
 289 IF W>=1.2 AND W<=10 THEN PRINT "GOOD LANDING  (A BIT FAST...)"
 290 IF W>=1.2 AND W<=10 THEN GOTO 2000
 295 IF W>60 THEN GOTO 310
 300 PRINT "CRAFT DAMAGE...YOU\ 'RE STRANDED  HERE UNTIL A RESCUE PARTY       ARRIVES--HOPE YOU HAVE ENOUGH   OXYGEN"
 305 GOTO 2000
 310 FOR H=1 TO 370
 311 SLOW 
 312 FAST 
 313 NEXT H
 314 SLOW 
 315 PRINT "SORRY--THERE WERE NO SURVIVORS. YOU BLEW IT"
 316 PRINT "IN FACT, YOU BLASTED A NEW      CRATER ";W*.277;" FEET DEEP."
 320 PRINT "IT WILL, OF COURSE, BE NAMED IN YOUR HONOR..."
 325 GOTO 2000
 330 LET L=L+S
 335 LET T=T-S
 340 LET M=M-S*K
 350 LET A=I
 360 LET V=J
 365 RETURN 
 370 IF S<5E-03 THEN GOTO 205
 375 LET D=V+SQR (V*V+2*A*(G-Z*K/M))
 380 LET S=2*A/D
 385 GOSUB 1000
 390 GOSUB 330
 395 GOTO 370
 400 LET W=(1-M*G/(Z*K))/2
 405 LET S=M*V/(Z*K*(W+SQR (W*W+V/Z)))+.05
 410 GOSUB 1000
 415 IF I<=0 THEN GOTO 370
 420 GOSUB 330
 425 IF J>0 THEN GOTO 130
 430 IF V>0 THEN GOTO 400
 435 GOTO 130
1000 LET Q=S*K/M
1005 LET J=V+G*S+Z*(-Q-Q*Q/2-Q**3/3-Q**4/4-Q**5/5)
1010 LET I=A-G*S*S/2-V*S+Z*S*(Q/2+Q**2/6+Q**3/12+Q**4/20+Q**5/30)
1015 RETURN 
2000 FOR H=1 TO 150
2010 NEXT H
2015 CLS 
2020 PRINT AT 10,7;"%T%R%Y% %A%G%A%I%N%?% %(%Y%/%N%)"
2022 INPUT H$
2025 IF H$(1)="N" THEN CLS 
2026 IF H$(1)="N" THEN STOP 
2030 IF H$(1)="Y" THEN GOTO 50
5000 FOR H=1 TO 10
5001 FAST 
5002 SLOW 
5003 NEXT H
5005 RETURN 
5020 STOP 
5030 CLEAR 
5040 SAVE "1019%9"
5050 RUN 
Scroll to Top