PROGRAM LISTING LISTNH 1 REM *** WRITTEN BY JIM STORER, LEXINGTON HS 2 REM *** CONVERTED FROM FOCAL TO BASCI BY DAVID AHL. DIGITAL 10 PRINT "LUNAR LANDING SIMULATION":PRINT 20 PRINT; PRINT; PRINT "CONTROL CALLING LUNAR MODULE; ;":PRINT" 35PRINT "YOU MAY SET THE FUEL RATE <K> TO ZERO OR ANY VALUE" 40PRINT "BETWEEN 8 AND 200 LBS PER SECOND. A NEGATIVE FUEL" 50 PRINT "RATE WILL ABORT THE MISSION. ":PRINT 60PRINT "YOU HAVE 16000 LBS OF FUEL. " 70PRINT "ESTIMATED FREE FALL IMPACT TIME IS 120 SECONDS. " 80PRINT "CAPSULE WEIGHT IS 32,500 LBS. " 90 PRINT : PRINT "FIRST RADAR CHECK COMING UP… " 100 PRINT "BEGIN LANDING PROCEDURE" : PRINT:PRINT 110PRINT "TIME <SECS>", "HEIGHT <MI>", "VELOCITY <MPH>", "FUEL<LBS>", "FUEL RATE" 120 LET L=0; LET A=120; LET V=1; LET M=32500; LET N=16500 170 LET G=.001:LET Z=1. O 210 PRINT INT <L+. 5>, A, V=3600, M-N, "K". 220 INPUT K 225 LET T=10 230 IF K<0 GO TO 590 235 IF K=0 GOTO 310 240 IF K<0 THEN 260 250 IF K<=200 GO TO 310 260 PRINT "NOT POSSIBLE",,,,"K"; 270 INPUT K : GOTO 230 310 IF M-N-. 001 <=0 GOTO410 320 IF T<. 001 GOTO 210 330 LET S=T:IF N+S+K<=M GO TO 350 340 LET S=<M-N>/K 350 LET I0=1 : GOTO 900 360 IF I<= 0 GOT O 710 370 IF V<=0 GO TO 380 375 IF J<0 GOTO 810 380 LET I0=1:GOTO600 410 PRINT "FUEL OUT AT ";L; "SECS. " 420 LET S=< - V + SQR <V=V+2+A+G>>/G 430 LET V = V+G+S 440 LET L=L+S 510 PRINT "ON THE MOON AT "; L ; "SECS. " 511 LET W = 3600*V 514 PRINT "IMPACT VELOCITY OF "; W; "M. P. H. " 520 PRINT "FUEL LEFT ", M-N; "LBS. " 530 IF W>=1 GOTO 550 540 PRINT "PERFECT LANDING! CONGRATULATIONS!!" : GOTO 590 550 IF W>=10 THEN 560 552 PRINT "VERY GOOD LANDING. NOT PERFECT YET. " :GOTO590 560 IF W >= 25 THEN 570 562 PRINT " A FAIR LANDING. NO CRAFT DAMAGE. " : GOTO590 570 IF W >= 60 THEN500 572 PRINT "CRAFT DAMAGE. HOPE YOUR OXYGEN HOLDS OUT UNTIL A" 574 PRINT "SORRY, BUT THERE WERE NO SURVIVORS. " 560 PRINT "IN FACT YOU BLASTED A NEW LUNAR CRATER "; W*. 277777; " FEET DEEP. 590 PRINT : PRINT : PRINT "TRY AGAIN <1 FOR YES, 0 FOR NO>"; 592 INPUT R: IF R=1 THEN 90 595 PRINT : PRINT "CONTROL OUT" : GOTO 1000 600 LET L=L+S 610 LET T=T-S 620 LET M=M-S+K 630 LET A=1 640 LET V=J 650 IF I0=1 GO TO 310 660 IF I0=3 GO TO 850 710 IF S< . 005 GO TO 510 720 LET S= 2*A/<V+SQR<V=V+2*A G-Z+K/M>>> 730 LET IO=2 :GOTO 900 810 LET W=<1-M+G/.<Z+K>>/2 820 LET S=M+V/<Z+K+<W+SQR<W+W*V/Z>>>+. 05 825 LET IO=3 :GOTO 900 830 IF I<=0 THEN 710 840 GOTO 600 850 IF J>=0 THEN 310 860 IF V<=0 GO TO 310 870 GOTO 810 900 LET Q=S+K/M 905 IF Q<=0 THEN 1000 910 LET J=V+G+S+Z+<-Q+<1+Q+<1/2+Q+<1/3+Q+<1/4+Q+<1/5>>>>>> 920 LET I=A-G+S+S/2-V+S+Z+S++<Q+<1/2+Q+<1/6+Q+<1/12+Q+<1/20+Q+<1/30>>>>>> 930 IF IO=1 GOTO 360 940 IF IO=2 GOTO 600 950 IF IO=3 GOTO 830 1000 LET J=V+G+S 1010 LET I=A-G+S+S/2-V+S 1020 GOTO930 1000 END READY [image] Appollo 14 Launch Control Center, Cape Kennedy, Florida *** [image]LOVE[image] By David H. Ahl This program is designed to reproduce Robert Indiana's great work "Love" with a message of your choice up to 60 characters long. The program was written in BASIC-PLUS for DEC's RSTS-11 family. You will probably have to change portions of it for your machine. Multiple statements on one line are separated by a backslash. The message is inputted as A$ in Statement 60. Statements 65-67 set the output device; eliminate them if the device is always a terminal. Statements 100-130 repeat the message A$ if it is less than 60 characters long and insert it in T$. Statements 210-400 actually print the design. The data statements are an alternating count of the numbers of characters printed and the number of blanks which form the design. LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE L OVELOVELOVELOVELOVELOVELOV LOVELOVELOVE LOV ELOVELOVELOVELOVELOVELOV LOVELOVE LOVE VELOVELOVELOVELOVELOVEL VELOVE LOVE VELOVELOVELOVELOVELOVE LOVEL ELOVE LOVE VELOVELOVELOVELOVELOV VELOVELO LOVE LOVE VELOVELOVELOVELOVELOV OVELOVELOV LOVE LOVE VELOVELOVELOVELOVELOV LOVELOVELOV LOVE LOVE VELOVELOVELOVELOVELOV ELOVELOVELO LOVE LOVE VELOVELOVELOVELOVELOV VELOVELOVEL LOVE LOVE VELOVELOVELOVELOVELOV OVELOVELOVE LOVE LOVE VELOVELOVELOVELOVEL V LOVELOVELOV LOVE LOVE VELOVELOVELOVELOVEL V LOVELOVELO LOVE LOVE VELOVELOVELOVELOVE V OVELOVEL LOVE LOVE VELOVELOVELOVELOV V VELOV LOVE LOVE VELOVELOVELOVEL VE ELOVE L VELOV LOVELOVE L VELOVELOV LOVELOVELOVE L VELOV E L VELOV E LOVE VELOVELOVELOV VELOVELOVE VELOVELOVELO E LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVE E LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVE E LOVELO LOVELOVEL LOVELOVELOVE VELOVELOVELOVELO E LOVELO LOVELOVEL LOVELOVELOVE VELOVELOVELOVELOVE LOVELOV OVELOVE ELOVELOVELOVE VELOVEL VELOVELOVE LOVELOV OVELOVE ELOVELOVELOVE VELOVE VELOVELOVE LOVELOVE VELOV VELOVELOVELOVE VELOVELOVE LOVELOVE VELOV VELOVELOVELOVE VELOVE VELOVELOVE LOVELOVEL ELO OVELOVELOVELOVE VELOVEL VELOVELOVE LOVELOVEL ELO OVELOVELOVELOVE VELOVELOVELOVELO E LOVELOVELO L LOVELOVELOVELOVE VELOVELOVELOVEL E LOVELOVELO LOVELOVELOVELOVE VELOVELOVELOVE E LOVELOVELOV ELOVELOVELOVELOVE VELOVELOVELO E LOVELOVELOV ELOVELOVELOVELOVE E LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE 10 REMARKABLE PROGRAM BY DAVE AHL 20 PRINT "A TRIBUTE TO THE GREAT AMERICAN ARTIST, ROBERT INDIANA. 30 PRINT "HIS GREATEST WORK WILL BE REPRODUCED WITH A MESSAGE OF 40 PRINT "YOUR CHOICE UP TO 60 CHARACTERS, IF YOU CAN'T THINK OF 50 PRINT "A MESSAGE, SIMPLY TYPE THE WORD 'LOVE' " \ PRINT 60 INPUT "YOUR MESSAGE PLEASE " AS \ L=LEN (AS) 65 INPUT "OUTPUT DEVICE (LP: OR K8: )" JB3 66 IF B8*"LP:" OR B3*"KB1" THEN 67 ELSE PRINT "AGAIN" \ GOTO 65 67 OPEN AS FOR OUTPUT AS FILE 1 70 DIM T$ (120) \ PRINT #1 FOR I=1 TO 10 100 FOR J=0 T0 INT (60/L) 110 FOR I=1 TO L 120 TS (J+L+I)=MID (A$, I, 1) 130 NEXT I \ NEXT J 140 C=0 200 A1=1 \ P*1 \ C=C+1 \ IF C=37 THEN 999 205 PRINT #1 210 READ A \ A1=A1+1 \ IF P=1 THEN 300 240 PRINT #1, " "; FOR I=1 TO A \ P=1 \ GOTO 400 300 PRINT #1, T$ (I); FOR I*A1-1 TO A1-1 \ P*0 400 IF A1>60 THEN 200 ELSE 210 600 DATA 60,1,12,26,9,12,3,8,24,17,8,4,6,23,21,6,4,6,22,12,5,6,5 610 DATA 4,6,21,11,8,6,4,4,6,21,10,10,5,4,4,6,21,9,11,5,4 620 DATA 4,6,21,8,11,6,4,4,6,21,7,11,7,4,4,6,21,6,11,8,4 630 DATA 4,6,19,1,1,5,11,9,4,4,6,19,1,1,5,10,10,4,4,6,18,2,1,6,8,11,4 640 DATA 4,6,17,3,1,7,5,14,4,4,6,15,5,2,23,5,1,29,5,17,8 650 DATA 1,29,9,9,12,1,13,5,40,1,1,13,5,48,1,4,6,13,3,10,6,12,5,1 660 DATA 5,6,11,3,11,6,14,3,1,5,6,11,3,11,6,15,2,1 670 DATA 6,6,9,3,12,6,16,1,1,6,6,9,3,12,6,7,1,10 680 DATA 7,6,7,3,13,6,6,2,10,7,6,7,3,13,14,10,8,6,5,3,14,6,6,2,10 690 DATA 8,6,5,3,14,6,7,1,10,9,6,3,3,15,6,16,1,1 700 DATA 9,6,3,3,15,6,15,2,1,10,6,1,3,16,6,14,3,1,10,10,16,6,12,5,1 710 DATA 11,8,13,27,1,11,8,13,27,1,60 999 PRINT #1 FOR I=1 TO 10 \ CLOSE 1 \ END