Land your lander safely on the Moon.
Appears on
Capital Area Timex Sinclair User Group’s Library Tape.
Library tape of the Indiana Sinclair Timex User’s Group.
Source Code
1 REM USE LIST 2d RETURN :H\\ NEW o AND g GO SUB i{= CLEAR GO SUB a{= CLEAR LIST \ RETURN :H\\ NEW o AND g GO SUB i{= CLEAR GO SUB a{= CLEAR LIST <>oo 10 BORDER 5: PAPER 5: LET a=2: LET b=7: CLS 20 FOR i=0 TO 21 30 PRINT AT i,8; INK a; PAPER b;" STOP THE TAPE " 40 LET c=a: LET a=b: LET b=c: NEXT i 50 PRINT #1;AT 1,0; INK 9;" PRESS ANY KEY " 60 RANDOMIZE USR 26727 70 IF INKEY$="" THEN GO TO 60 80 GO SUB 370 90 GO SUB 520: GO SUB 400 100 LET z$=INKEY$: BEEP 0.05,.05+(12 AND fuel<100) 110 LET angle=angle+(z$="0")-(z$="9") 120 IF angle=8 THEN LET angle=0 130 IF angle=-1 THEN LET angle=7 140 POKE 40006,PEEK 40151: POKE 40151,angle 150 LET thrust=thrust+(z$="1")-(z$="2" AND thrust>0) 160 IF fuel<=0 THEN LET fuel=0: LET thrust=0 170 LET sx=sx+.03-.01*thrust*COS (2*PI*angle/8) 180 LET sy=sy+.01*thrust*SIN (2*PI*angle/8) 190 LET x=x+sx 200 LET y=y+sy 210 POKE 40038,PEEK 40183 220 POKE 40020,PEEK 40165 230 POKE 40183,x 240 POKE 40165,y 250 LET fuel=fuel-thrust 260 PRINT AT 20,2; PAPER 1;fuel;" ";AT 20,9;INT (sx*10);" ";AT 20,15;INT (sy*10);" ";AT 20,21;thrust;" " 270 LET v=USR 40000 280 LET v=USR 40145 290 IF v=0 THEN GO TO 100 300 IF (INT x)<>48 OR y<170 OR y>204 OR sx>.3 OR sy>.2 THEN LET v=USR 40145: FOR n=8 TO 11: POKE 40006,n: LET v=USR 40000: LET v=USR 40300: LET v=USR 40000: NEXT n: FOR n=1 TO 21: LET v=USR 40550: BEEP 0.02,21-n: NEXT n: PRINT #1;AT 0,0; INK 2; PAPER 6;" CRASH !!!! Press a key ": PAUSE NOT PI: GO TO 320 310 PRINT #1;AT 0,0; INK 2; PAPER 6;" ******* SAFE LANDING ******* ": PAUSE NOT PI 320 FOR n=0 TO 18: PRINT AT n,0; OVER 1; PAPER 0; INK 7,,: NEXT n 330 IF INKEY$<>"" THEN GO TO 330 340 PRINT #1;AT 0,0;" Q to QUIT or ANY to play again ": PAUSE NOT PI 350 IF INKEY$="Q" OR INKEY$="q" THEN STOP 360 GO SUB 520: INPUT "": GO SUB 470: GO TO 100 370 BORDER 0: PAPER 0: INK 9: CLS : PRINT AT 0,0;" *** M O O N L A N D E R *** "''" By PETER COOKE" 380 PRINT AT 5,0;"Use the keys "'"9 turn left"'"0 turn right"'"1 increase thrust"'"2 decrease thrust"''"land your L.E.M. on the pad (in yellow)." 390 PRINT AT 20,0;" press a key to start ": PAUSE NOT PI: RETURN 400 PAPER 0: INK 7: BORDER 0: CLS : FOR n=19 TO 21: PRINT AT n,0; PAPER 1,,: NEXT n 410 PLOT 0,0: DRAW 255,0: DRAW 0,175: DRAW -255,0: DRAW 0,-175 420 PLOT 30,175: DRAW 70,-110,.9: DRAW 30,70,.9: DRAW 60,30,-1: DRAW 65,-60,-1.3 430 PLOT 1,160: DRAW 100,-130,1.3: DRAW 70,90,1: DRAW 40,0: DRAW 44,-60,1 440 POKE 40452,31: POKE 40454,074: RANDOMIZE USR 40451 450 REM POKE 40401,51: POKE 40403,175: RANDOMIZE USR 40400 460 POKE 40401,1: POKE 40403,25: RANDOMIZE USR 40400 470 PRINT AT 19,2; PAPER 1;"fuel hsi vsi thrust" 480 PRINT AT 20,2; PAPER 1;fuel;" ";AT 20,9;sx;" ";AT 20,15;sy;" ";AT 20,21;thrust;" " 490 RANDOMIZE USR 40145 500 PRINT AT 7,21; INK 6; OVER 1;" " 510 RETURN 520 LET x=2: LET y=x 530 LET fuel=2000 540 LET thrust=0 550 LET angle=thrust 560 LET sx=0: LET sy=sx 570 POKE 40006,angle 580 POKE 40151,angle 590 POKE 40020,y: POKE 40165,y 600 POKE 40038,x: POKE 40183,x 610 RETURN 620 CLEAR 39999: PRINT INK 9;AT 10,2;" HANG ABOUT - STILL LOADING ": LOAD "moonland C"CODE : POKE 23676,166: POKE 23675,104: RUN 630 SAVE "Moonland" LINE 620: BEEP .2,22: SAVE "moonland C"CODE 40000,2768: BEEP .2,22