mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-18 08:06:27 -05:00
Compare commits
No commits in common. "1d798092c144a2c23b8df47afd96bfd786308e11" and "3db5e32e106736ea01939731c8a5b42de542c711" have entirely different histories.
1d798092c1
...
3db5e32e10
@ -1,44 +0,0 @@
|
||||
100 REM ***23 MATCHES
|
||||
110 PRINT "LET'S PLAY 23 MATCHES. WE START WITH 23 MATCHES."
|
||||
115 PRINT "YOU MOVE FIRST. YOU MAY TAKE 1,2 OR 3 MATCHES."
|
||||
120 PRINT "THEN I MOVE...I MAY TAKE 1,2 OR 3 MATCHES."
|
||||
125 PRINT "YOU MOVE, I MOVE AND SO ON. THE ONE WHO HAS TO"
|
||||
130 PRINT "TAKE THE LAST MATCH LOSES."
|
||||
135 PRINT "GOOD LUCK AND MAY THE BEST COMPUTER (HA HA) WIN."
|
||||
140 PRINT
|
||||
150 LET M=23
|
||||
200 REM ***THE HUMAN MOVES
|
||||
205 PRINT
|
||||
210 PRINT "THERE ARE NOW";M;"MATCHES."
|
||||
215 PRINT
|
||||
220 PRINT "HOW MANY DO YOU TAKE";
|
||||
230 INPUT H
|
||||
240 IF H>M THEN 510
|
||||
250 IF H<>INT(H) THEN 510
|
||||
260 IF H<=0 THEN 510
|
||||
270 IF H>=4 THEN 510
|
||||
280 LET M=M-H
|
||||
290 IF M=0 THEN 410
|
||||
300 REM ***THE COMPUTER MOVES
|
||||
305 IF M=1 THEN 440
|
||||
310 LET R=M-4*INT(M/4)
|
||||
320 IF R<>1 THEN 350
|
||||
330 LET C=INT(3*RND(0))+1
|
||||
340 GO TO 360
|
||||
350 LET C=(R+3)-4*INT((R+3)/4)
|
||||
360 LET M=M-C
|
||||
370 IF M=0 THEN 440
|
||||
375 PRINT
|
||||
380 PRINT "I TOOK";C;"...";
|
||||
390 GO TO 210
|
||||
400 REM ***SOMEBODY WON (SEE LINES 290,305,370)
|
||||
410 PRINT
|
||||
420 PRINT "I WON!!! BETTER LUCK NEXT TIME."
|
||||
430 GO TO 140
|
||||
440 PRINT
|
||||
450 PRINT "O.K. SO YOU WON. LET'S PLAY AGAIN."
|
||||
460 GO TO 140
|
||||
500 REM ***THE HUMAN CHEATED! (SEE LINES 240 THRU 270)
|
||||
510 PRINT "YOU CHEATED! BUT I'LL GIVE YOU ANOTHER CHANCE."
|
||||
520 GO TO 215
|
||||
999 END
|
@ -1,14 +0,0 @@
|
||||
5 DEF FNA(Z)=30*EXP(-Z*Z/100)
|
||||
100 PRINT
|
||||
110 FOR X=-30 TO 30 STEP 1.5
|
||||
120 L=0
|
||||
130 Y1=5*INT(SQR(900-X*X)/5)
|
||||
140 FOR Y=Y1 TO -Y1 STEP -5
|
||||
150 Z=INT(25+FNA(SQR(X*X+Y*Y))-.7*Y)
|
||||
160 IF Z<=L THEN 190
|
||||
170 L=Z
|
||||
180 PRINT TAB(Z)"*";
|
||||
190 NEXT Y
|
||||
200 PRINT
|
||||
210 NEXTX
|
||||
300 END
|
@ -1,99 +0,0 @@
|
||||
100 REM PROGRAM WRITTEN BY DANIEL R. VERNON
|
||||
110 REM SENIOR AT BUTLER SENIOR HIGH SCHOOL
|
||||
120 REM BUTLER, PENNSYLVANIA 16001
|
||||
130 REM DATE: 2-1-73
|
||||
140 REM COMPUTER SUPERVISION- MR. WILLIAM ELLIS
|
||||
150 REM COMPUTER TOPICS INSTRUCTION- MR. ALBERT STEWART
|
||||
160 REM
|
||||
170 REM THIS PROGRAM IS DESIGNED TO CREATE POSTERS
|
||||
180 REM
|
||||
190 DIMG$(6),H$(6),B$(9),G(6),A(54)
|
||||
200 PRINT"INPUT HEIGHTH, WIDTH IN INCHES";\INPUTL,R\S=0\A=R*2\C=A
|
||||
210 PRINT"HOW FAR, IN INCHES FROM THE LEFT HAND SIDE, DO YOU WANT TO PLACE "
|
||||
220 PRINT"THE LETTERS";\INPUTS\S=12*S
|
||||
230 PRINT"INPUT MESSAGE HERE"
|
||||
240 LINPUTB$(1),B$(2),B$(3),B$(4),B$(5),B$(6),B$(7),B$(8),B$(9)
|
||||
250 FORX=9TO1STEP-1\CHANGEB$(X)TOA\FORY=1TO6\A(X*6-6+Y)=A(Y)\NEXTY\NEXTX
|
||||
260 FORX=1TO6\READH$(X)\NEXTX\H$=H$(L)\GOSUB 940
|
||||
270 F=F+1\IFA(F)=0THEN990\G(0)=L\FORX=1TO6\G(X)=A(F)\NEXTX\CHANGEGTOG$
|
||||
280 FORX=1TO6\G(0)=X\CHANGEGTOG$(X)\NEXTX
|
||||
290 FORX=1TOA/2\PRINT\NEXTX
|
||||
300 IFA(F)=46THEN345\IFA(F)=36THEN990\IFA(F)=32THEN630\IFA(F)<48THEN270
|
||||
305 IFA(F)>57THEN310\ONA(F)-47GOTO500,440,620,625,635,550,615,605,595,585
|
||||
310 IFA(F)<65THEN270\IFA(F)>79THEN330
|
||||
320 ONA(F)-64GOTO350,360,370,380,390,400,410,430,440,450,460,470,480,490,500
|
||||
330 IFA>90THEN270\ONA(F)-79GOTO510,520,540,550,560,570,580,590,600,610,620
|
||||
340 GOTO270
|
||||
345 FORX=1TOA\PRINTTAB(S);G$;G$\NEXTX\GOTO270
|
||||
350 GOSUB640\GOSUB690\GOSUB640\GOTO270
|
||||
360 GOSUB640\GOSUB650\A=C*.5\GOSUB640\A=C\GOSUB810\GOTO270
|
||||
370 GOSUB640\GOSUB700\GOSUB700\GOTO270
|
||||
380 GOSUB640\GOSUB700\A=C*.5\GOSUB640\A=C\GOSUB840\GOTO270
|
||||
390 GOSUB640\GOSUB650\GOSUB650\GOTO270
|
||||
400 GOSUB640\GOSUB690\GOSUB690\GOTO270
|
||||
410 GOSUB640\A=C*.75\GOSUB700\A=C*.25\GOSUB650\A=C\GOSUB760
|
||||
420 A=C*.25\GOSUB710\A=C\GOTO270
|
||||
430 GOSUB640\GOSUB710\GOSUB640\GOTO270
|
||||
440 GOSUB640\GOTO270
|
||||
450 GOSUB750\GOSUB740\GOSUB640\GOTO270
|
||||
460 GOSUB640\GOSUB860\GOTO270
|
||||
470 GOSUB640\GOSUB740\GOSUB740\GOTO270
|
||||
480 GOSUB640\GOSUB890\GOSUB880\GOSUB640\GOTO270
|
||||
490 GOSUB640\GOSUB890\GOSUB640\GOTO270
|
||||
500 GOSUB640\GOSUB700\GOSUB640\GOTO270
|
||||
510 GOSUB640\GOSUB690\GOSUB790\GOTO270
|
||||
520 GOSUB640\A=C*.75\GOSUB700\A=C*.25\GOSUB650\A=C\GOSUB640
|
||||
530 A=C*.25\GOSUB710\A=C\GOTO270
|
||||
540 GOSUB640\GOSUB690\A=C*.5\GOSUB640\GOSUB810\A=C\GOTO270
|
||||
550 GOSUB770\GOSUB650\GOSUB760\GOTO270
|
||||
560 GOSUB780\GOSUB640\GOSUB780\GOTO270
|
||||
570 GOSUB640\GOSUB740\GOSUB640\GOTO270
|
||||
580 GOSUB890\GOSUB880\GOTO270
|
||||
585 GOSUB790\GOSUB690\GOSUB640\GOTO270
|
||||
590 GOSUB640\GOSUB880\GOSUB890\GOSUB640\GOTO270
|
||||
595 GOSUB640\GOSUB650\GOSUB640\GOTO270
|
||||
600 GOSUB900\GOTO270
|
||||
605 GOSUB780\GOSUB780\GOSUB640\GOTO270
|
||||
610 GOSUB970\GOSUB800\GOSUB960\GOTO270
|
||||
615 GOSUB640\GOSUB650\GOSUB760\GOTO270
|
||||
620 GOSUB920\GOTO270
|
||||
625 GOSUB700\GOSUB650\A=C*.5\GOSUB640\A=C\GOSUB810\GOTO270
|
||||
630 GOSUB940\GOTO270
|
||||
635 GOSUB790\GOSUB710\GOSUB640\GOTO270
|
||||
640 FORY=1TOA\PRINTTAB(S);\FORX=1TO10\PRINTG$;\NEXTX\PRINT\NEXTY\RETURN
|
||||
650 IFA<1THEN660\GOTO670
|
||||
660 LETA=1
|
||||
670 FORX=1TOA\PRINTTAB(S);G$;G$;H$;H$;G$;G$;H$;H$;G$;G$\NEXTX\RETURN
|
||||
680 PRINTTAB(S);
|
||||
690 FORX=1TOA\PRINTTAB(4*L+S);G$;G$;H$;H$;G$;G$\NEXTX\RETURN
|
||||
700 FORX=1TOA\PRINTTAB(S);G$;G$;\PRINTTAB(8*L+S);G$;G$\NEXTX\RETURN
|
||||
710 IFA<1THEN720\GOTO730
|
||||
720 LETA=1
|
||||
730 FORX=1TOA\PRINTTAB(4*L+S);G$;G$\NEXTX\RETURN
|
||||
740 FORX=1TOA\PRINTTAB(S);G$;G$\NEXTX\RETURN
|
||||
750 FORX=1TOA\PRINTTAB(S);G$;G$;G$;G$\NEXTX\RETURN
|
||||
760 FORY=1TOA\PRINTTAB(S);G$;G$;G$;G$;G$;G$;H$;H$;G$;G$\NEXTY\RETURN
|
||||
770 FORX=1TOA\PRINTTAB(S);G$;G$;H$;H$;G$;G$;G$;G$;G$;G$\NEXTX\RETURN
|
||||
780 FORX=1TOA\PRINTTAB(8*L+S);G$;G$\NEXTX\RETURN
|
||||
790 FORX=1TOA\PRINTTAB(4*L+S);G$;G$;G$;G$;G$;G$\NEXTX\RETURN
|
||||
800 FORX=1TOA\PRINTTAB(S);G$;G$;G$;G$;G$;G$\NEXTX\RETURN
|
||||
810 FORX=1TOC/2\PRINTTAB(S);\FORY=1TO2\FORZ=1TO(5*L)-X\PRINTG$(1);\NEXTZ
|
||||
820 IFX>3THEN950\V=X
|
||||
830 PRINTH$(2*V);\NEXTY\PRINT\NEXTX\RETURN
|
||||
840 FORX=1TOC/2\PRINTTAB(S);H$(X);\FORY=1TO10*L-(2*X)\PRINTG$(1);\NEXTY\PRINT
|
||||
850 NEXTX\RETURN
|
||||
860 FOR X=4*LTO7*LSTEP14*L/(C*6)\PRINTTAB(X+S);G$;G$;G$;
|
||||
870 PRINTTAB(7*L-X+S);G$;G$;G$\NEXT X\RETURN
|
||||
880 FORX=0TO6*LSTEP6*L/C\PRINTTAB(X+S);G$;G$;G$;G$\NEXTX\RETURN
|
||||
890 FORX=6*LTO0STEP-6*L/C\PRINTTAB(X+S);G$;G$;G$;G$\NEXTX\RETURN
|
||||
900 FORX=0TO7*LSTEP(14*L)/(C*6)\PRINTTAB(X+S);G$;G$;G$;
|
||||
910 PRINTTAB(7*L-X+S);G$;G$;G$\NEXT X\RETURN
|
||||
920 FORX=0TO7*LSTEP(7*L)/(C*3)\PRINTTAB(S);G$;G$;TAB(X+S);G$;G$;G$;
|
||||
930 PRINTTAB(8*L+S);G$;G$\NEXTX\RETURN
|
||||
940 FORX=1TOA*3\PRINT\NEXTX\RETURN
|
||||
950 FORW=1TOX-3\PRINT" ";\NEXTW\V=3\GOTO830
|
||||
960 FORX=4*LTO7*LSTEPL*4/C\PRINTTAB(X+S);G$;G$;G$\NEXTX\RETURN
|
||||
970 FOR X=7*LTO4*LSTEP-4*L/C\PRINTTAB(X+S);G$;G$;G$\NEXTX\RETURN
|
||||
980 DATA" "," "," "," "," "," ",""
|
||||
990 FORX=1TOC*3\PRINT\NEXTX
|
||||
1000 END
|
124
dec/BUZZWD.BAS
124
dec/BUZZWD.BAS
@ -1,124 +0,0 @@
|
||||
100 PRINT"THIS COMPUTER DEMONSTRATION IS A NEW AID FOR"
|
||||
110 PRINT"PREPARING SPEECHES AND BRIEFINGS. IT'S A BUZZWORD"
|
||||
120 PRINT"GENERATOR WHICH PROVIDES YOU WITH A SET OF 3 HIGHLY"
|
||||
130 PRINT"ACCEPTABLE WORDS TO WORK INTO YOUR MATERIAL. THE WORDS"
|
||||
140 PRINT"DON'T ACTUALLY MEAN ANYTHING, BUT THEY SOUND GREAT."
|
||||
150 PRINT
|
||||
160 PRINT"THE PROCEDURE:"
|
||||
170 PRINT" THINK OF ANY THREE NUMBERS BETWEEN 0 AND 9. ENTER"
|
||||
180 PRINT" THEM AFTER THE '?' SEPARATED BY COMMAS. YOUR"
|
||||
190 PRINT" BUZZWORD WILL BE PRINTED OUT. TYPING '100' FOR"
|
||||
191 PRINT" EACH OF YOUR CHOICES STOPS THIS PROGRAM."
|
||||
210 PRINT "WHAT ARE YOUR THREE NUMBERS";
|
||||
220 GOTO260
|
||||
230 PRINT
|
||||
240 PRINT
|
||||
250 PRINT"THREE MORE NUMBERS";
|
||||
260 INPUT N,M,P
|
||||
265 IF N=100 THEN 1290
|
||||
270 IF N<O THEN 1240
|
||||
280 IF P<0 THEN 1240
|
||||
290 IF M<0 THEN 1240
|
||||
300 IF N>9 THEN 1240
|
||||
310 IF P>9 THEN 1240
|
||||
320 IF M>9 THEN 1240
|
||||
330 PRINT
|
||||
340 IF N=0 THEN 640
|
||||
350 IF N=1THEN 660
|
||||
360 IF N=2THEN 680
|
||||
370 IF N=3THEN 700
|
||||
380 IF N=4 THEN 720
|
||||
390 IF N=5THEN 740
|
||||
400 IF N=6THEN 760
|
||||
410 IF N=7THEN 780
|
||||
420 IF N=8THEN 800
|
||||
430 IF N=9THEN 820
|
||||
440 IF M=0 THEN 840
|
||||
450 IF M=1 THEN 860
|
||||
460 IF M=2 THEN 880
|
||||
470 IF M=3 THEN 900
|
||||
480 IF M=4 THEN 920
|
||||
490 IF M=5 THEN 940
|
||||
500 IF M=6 THEN 960
|
||||
510 IF M=7 THEN 980
|
||||
520 IF M=8 THEN 1000
|
||||
530 IF M=9 THEN 1020
|
||||
540 IF P=0 THEN 1040
|
||||
550 IF P=1 THEN 1060
|
||||
560 IF P=2 THEN 1080
|
||||
570 IF P=3 THEN 1100
|
||||
580 IFP=4 THEN 1120
|
||||
590 IF P=5 THEN 1140
|
||||
600 IF P=6 THEN 1160
|
||||
610 IF P=7 THEN 1180
|
||||
620 IF P=8 THEN 1200
|
||||
630 IF P=9 THEN 1220
|
||||
640 PRINT" INTEGRATED";
|
||||
650 GOTO440
|
||||
660 PRINT" TOTAL";
|
||||
670 GOTO440
|
||||
680 PRINT "SYSTEMATIZED";
|
||||
690 GOTO440
|
||||
700 PRINT" PARALLEL";
|
||||
710 GO TO 440
|
||||
720 PRINT" FUNCTIONAL";
|
||||
730 GOTO440
|
||||
740 PRINT" RESPONSIVE";
|
||||
750 GOTO440
|
||||
760 PRINT" OPTIMAL";
|
||||
770 GOTO440
|
||||
780 PRINT" SYNCHRONIZED";
|
||||
790 GOTO440
|
||||
800 PRINT " COMPATIBLE";
|
||||
810 GOTO440
|
||||
820 PRINT" BALANCED";
|
||||
830 GOTO440
|
||||
840 PRINT" MANAGEMENT";
|
||||
850 GOTO 540
|
||||
860 PRINT" ORGANIZATIONAL";
|
||||
870 GOTO 540
|
||||
880 PRINT" MONITORED";
|
||||
890 GOTO 540
|
||||
900 PRINT" RECIPROCAL";
|
||||
910 GOTO 540
|
||||
920 PRINT" DIGITAL";
|
||||
930 GOTO 540
|
||||
940 PRINT" LOGISTICAL";
|
||||
950 GOTO 540
|
||||
960 PRINT " TRANSITIONAL";
|
||||
970 GOTO 540
|
||||
980 PRINT" INCREMENTAL";
|
||||
990 GOTO 540
|
||||
1000 PRINT" THIRD-GENERATION";
|
||||
1010 GO TO 540
|
||||
1020 PRINT" POLICY";
|
||||
1030 GOTO 540
|
||||
1040 PRINT" OPTIONS"
|
||||
1050 GOTO 230
|
||||
1060 PRINT " FLEXIBILITY"
|
||||
1070 GO TO 230
|
||||
1080 PRINT" CAPABILITY"
|
||||
1090 GOTO230
|
||||
1100 PRINT" MOBILITY"
|
||||
1110 GOTO230
|
||||
1120 PRINT" PROGRAMMING"
|
||||
1130 GO TO 230
|
||||
1140 PRINT" CONCEPT"
|
||||
1150 GOTO230
|
||||
1160 PRINT" TIME-PHASE"
|
||||
1170 GOTO230
|
||||
1180 PRINT" PROJECTION"
|
||||
1190 GOTO230
|
||||
1200 PRINT" HARDWARE"
|
||||
1210 GOTO230
|
||||
1220 PRINT" CONTINGENCY"
|
||||
1230 GOTO230
|
||||
1240 PRINT
|
||||
1250 PRINT
|
||||
1260 PRINT"NUMBERS MUST BE BETWEEN 0 AND 9. PLEASE SELECT THREE MORE."
|
||||
1270 GOTO 260
|
||||
1280 GOTO 260
|
||||
1290 PRINT "GOODBYE FOR NOW! "
|
||||
1300 PRINT\PRINT\PRINT
|
||||
1310 CHAIN "DEMON "
|
||||
1320 END
|
@ -1,58 +0,0 @@
|
||||
10 REM *** MODIFIED AND CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL
|
||||
90 RANDOMIZE
|
||||
100 PRINT "THIS COMPUTER DEMONSTRATION SIMULATES THE"
|
||||
110 PRINT"RESULTS OF FIRING A FIELD ARTILLERY WEAPON."
|
||||
120 PRINT
|
||||
130 PRINT"YOU ARE THE OFFICER-IN-CHARGE, GIVING ORDERS TO THE GUN"
|
||||
140 PRINT"CREW, TELLING THEM THE DEGREES OF ELEVATION YOU ESTIMATE"
|
||||
150 PRINT"WILL PLACE THE PROJECTILE ON TARGET. A HIT WITHIN 100 YARDS"
|
||||
160 PRINT "OF THE TARGET WILL DESTROY IT. TAKE MORE THAN 5 SHOTS,"
|
||||
170 PRINT "AND THE ENEMY WILL DESTROY YOU!"\PRINT
|
||||
180 PRINT"MAXIMUM RANGE OF YOUR GUN IS 46500 YARDS."
|
||||
185 Z=0
|
||||
190 PRINT
|
||||
195 S1=0
|
||||
200 LET T=43000-30000*RND(X)
|
||||
210 LET S=0
|
||||
220 GO TO 370
|
||||
230 PRINT"MINIMUM ELEVATION OF GUN IS ONE DEGREE."
|
||||
240 GO TO 390
|
||||
250 PRINT"MAXIMUM ELEVATION OF GUN IS 89 DEGREES."
|
||||
260 GO TO 390
|
||||
270 PRINT"OVER TARGET BY";ABS(E);"YARDS."
|
||||
280 GO TO 390
|
||||
290 PRINT "SHORT OF TARGET BY";ABS(E);"YARDS."
|
||||
300 GO TO 390
|
||||
310 GO TO 320
|
||||
320 PRINT"***TARGET DESTROYED*** ";S;"ROUNDS OF AMMUNITION EXPENDED"
|
||||
322 GOSUB 600
|
||||
325 S1=S1+S
|
||||
330 IF Z=4 THEN 490
|
||||
340 Z=Z+1
|
||||
345 PRINT
|
||||
350 PRINT"THE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY."
|
||||
360 GO TO 200
|
||||
370 PRINT" DISTANCE TO THE TARGET IS";INT(T);"YARDS....."
|
||||
380 PRINT
|
||||
390 PRINT
|
||||
400 PRINT"ELEVATION:";
|
||||
410 INPUT B
|
||||
420 IF B>89 THEN 250
|
||||
430 IF B<1 THEN 230
|
||||
440 LET S=S+1
|
||||
442 IF S<6 THEN 450
|
||||
444 PRINT\PRINT "BOOM !!! YOU HAVE JUST BEEN DESTROYED ";
|
||||
445 GOSUB 600
|
||||
446 PRINT "BY THE ENEMY"\PRINT\PRINT\GOTO 495
|
||||
450 LET B2=2*B/57.3\LET I=46500*SIN(B2)\LET X=T-I\LET E=INT(X)
|
||||
460 IF ABS(E)<100 THEN 310
|
||||
470 IF E>100 THEN 290
|
||||
480 IF E<-100 THEN 270
|
||||
490 PRINT\PRINT\PRINT "TOTAL ROUNDS EXPENDED WERE";S1
|
||||
491 IF S1>15 THEN 495\PRINT "NICE SHOOTING !!"\GOSUB 600\GOTO 500
|
||||
495 PRINT "BETTER GO BACK TO FORT SILL FOR REFRESHER TRAINING!"
|
||||
500 PRINT\PRINT "THANK YOU FOR PLAYING!"
|
||||
505 PRINT\PRINT "TRY AGAIN....."\PRINT\GOTO 180
|
||||
600 FOR N=1 TO 10\PRINT CHR$(7);\NEXT N
|
||||
610 RETURN
|
||||
999 END
|
225
dec/TICTAC.BAS
225
dec/TICTAC.BAS
@ -1,225 +0,0 @@
|
||||
120 PRINT"YOU HAVE THE OPPORTUNITY OF TRYING TO BEAT THE COMPUTER"
|
||||
130 PRINT"AT TIC-TAC-TOE. ENTER YOUR MOVES AS FOLLOWS:"
|
||||
140 PRINT
|
||||
150 DIM C(11)
|
||||
160 DIM D(11)
|
||||
170 FOR K=1 TO 11
|
||||
180 READ C(K), D(K)
|
||||
190 NEXT K
|
||||
200 PRINT "...ROW NUMBER...COMMA...COLUMN NUMBER..."
|
||||
210 PRINT
|
||||
220 PRINT"ROWS ARE HORIZONTAL(ACROSS)...COLUMNS ARE VERTICAL(UP + DOWN)"
|
||||
230 DIM B(9)
|
||||
240 DIM A(3,3)
|
||||
250 PRINT
|
||||
260 PRINT "NEW GAME STARTED NOW..........................."
|
||||
270 FOR J=1 TO 3
|
||||
280 FOR I=1 TO 3
|
||||
290 LET A(I,J)=0
|
||||
300 NEXT I
|
||||
301 LET I=I-1
|
||||
310 NEXT J
|
||||
311 LET J=J-1
|
||||
320 LET Z= 0
|
||||
330 PRINT "YOUR MOVE",
|
||||
340 INPUT R,C
|
||||
350 PRINT
|
||||
360 IF R>3 THEN 620
|
||||
370 IF C>3 THEN 620
|
||||
380 IF A(R,C) <> 0 THEN 620
|
||||
390 LET A(R,C)=-1
|
||||
400 GOSUB 1660
|
||||
410 IF Z =1 THEN 2070
|
||||
420 REM MACHINE MOVE...
|
||||
430 GOSUB 1100
|
||||
440 REM TEST FOR GAME WIN...
|
||||
450 GOSUB 1660
|
||||
460 IF Z=0 THEN 650
|
||||
470 REM PRINT GAME BOARD..
|
||||
480 GO TO 490
|
||||
490 PRINT
|
||||
500 FOR K=1 TO 3
|
||||
510 LET B=A(K,1)
|
||||
520 LET D=A(K,2)
|
||||
530 LET F=A(K,3)
|
||||
540 GOSUB 840
|
||||
550 IF K>2 THEN 570
|
||||
560 PRINT "***************"
|
||||
570 NEXT K
|
||||
571 LET K=K-1
|
||||
580 PRINT
|
||||
590 IF Z <>0 THEN 2070
|
||||
600 GO TO 330
|
||||
610 STOP
|
||||
620 PRINT "---- ILLEGAL MOVE -- TRY AGAIN ----"
|
||||
630 PRINT
|
||||
640 GO TO 330
|
||||
650LET T2=0
|
||||
660 FOR J=1 TO 3
|
||||
670 FOR I=1 TO 3
|
||||
680 IF A(I,J)<>0 THEN 700
|
||||
690 LET T2=T2+1
|
||||
700 NEXT I
|
||||
701 LET I=I-1
|
||||
710 NEXT J
|
||||
711 LET J=J-1
|
||||
720 IF T2>0 THEN 750
|
||||
730 GOSUB 1340
|
||||
740 GO TO 480
|
||||
750 IF T2>1 THEN 480
|
||||
760 FOR J=1 TO 8
|
||||
770 IF B(J)=-2 THEN 800
|
||||
780 NEXT J
|
||||
781 LET J=J-1
|
||||
790 GO TO 730
|
||||
800 GOSUB 2000
|
||||
810 GO TO 480
|
||||
820 REM PRINT TIC-TAC-TOE BOARD ROW.....
|
||||
830 REM
|
||||
840 IF B<>0 THEN 910
|
||||
850 PRINT " * ";
|
||||
860 IF D<>0 THEN 940
|
||||
870 PRINT " * ";
|
||||
880 IF F<>0 THEN 970
|
||||
890 PRINT " "
|
||||
900 GO TO 1070
|
||||
910 IF B>0 THEN 1000
|
||||
920 PRINT "YOU * ";
|
||||
930 GO TO 860
|
||||
940 IF D>0 THEN 1020
|
||||
950 PRINT "YOU * ";
|
||||
960 GO TO 880
|
||||
970 IF F>0 THEN 1040
|
||||
980 PRINT "YOU"
|
||||
990 GO TO 900
|
||||
1000 PRINT"PDP * ";
|
||||
1010 GO TO 860
|
||||
1020 PRINT "PDP * ";
|
||||
1030 GO TO 880
|
||||
1040 PRINT "PDP"
|
||||
1050 GO TO900
|
||||
1060 REM PRINT LEGENDS..
|
||||
1070 PRINT " * * "
|
||||
1080 RETURN
|
||||
1090 REM PROGRAM TO MAKE MOVE FOR THE MACHINE....
|
||||
1100 LET M=INT(3.33*RND(M))
|
||||
1110 LET N=INT(3.33333*RND(N))
|
||||
1120 IF M=0 THEN 1100
|
||||
1130 IF M>3 THEN 1100
|
||||
1140 IF N=0 THEN 1110
|
||||
1150 IF N>3 THEN 1110
|
||||
1160 LET C(2)=M
|
||||
1170 LET D(2)=N
|
||||
1180 LET C(3)=N
|
||||
1190 LET D(3)=M
|
||||
1200 FOR I=1 TO 8
|
||||
1210 IF B(I)>1 THEN 1370
|
||||
1220 NEXT I
|
||||
1221 LET I=I-1
|
||||
1230 FOR I=1 TO 8
|
||||
1240 IF B(I)<-1 THEN 1370
|
||||
1250 NEXT I
|
||||
1251 LET I=I-1
|
||||
1260 IF R+C=0 THEN 1550
|
||||
1270 FOR K=1 TO 11
|
||||
1280 LET I=C(K)
|
||||
1290 LET J=D(K)
|
||||
1300 IF A(I,J)<>0 THEN 1330
|
||||
1310 LET A(I,J)=1
|
||||
1320 GO TO 1360
|
||||
1330 NEXT K
|
||||
1331 LET K=K-1
|
||||
1340 PRINT " ... TIE GAME ... "
|
||||
1350 LET Z=3
|
||||
1360 RETURN
|
||||
1370 IF I>3 THEN 1440
|
||||
1380 FOR J=1 TO 3
|
||||
1390 IF A(I,J)=0 THEN 1420
|
||||
1400 NEXT J
|
||||
1401 LET J=J-1
|
||||
1410 GO TO 1360
|
||||
1420 LET A(I,J)=1
|
||||
1430 GO TO 1360
|
||||
1440 IF I>6 THEN 1510
|
||||
1450 FOR J=1 TO 3
|
||||
1460 IF A(J,I-3)=0 THEN 1490
|
||||
1470 NEXT J
|
||||
1471 LET J=J-1
|
||||
1480 GO TO 1360
|
||||
1490 LET A(J,I-3)=1
|
||||
1500 GO TO 1360
|
||||
1510 IF I>7 THEN 1550
|
||||
1520 FOR J=1 TO 3
|
||||
1530 IF A(J,J)=0 THEN 1590
|
||||
1540 NEXT J
|
||||
1541 LET J=J-1
|
||||
1550 IF A(1,3)=0 THEN 1610
|
||||
1560 IF A(3,1)=0 THEN 1630
|
||||
1570 LET A(2,2)=1
|
||||
1580 GO TO 1360
|
||||
1590 LET A(J,J)=1
|
||||
1600 GO TO 1360
|
||||
1610 LET A(1,3)=1
|
||||
1620 GO TO 1360
|
||||
1630 LET A(3,1)=1
|
||||
1640 GO TO 1360
|
||||
1650 REM PROGRAM TO TEST FOR GAME WINNER....
|
||||
1660 LET T1=0
|
||||
1670 FOR J=1 TO 9
|
||||
1680 LET B(J)=0
|
||||
1690 NEXT J
|
||||
1691 LET J=J-1
|
||||
1700 FOR J=1 TO 3
|
||||
1710 FOR I=1 TO 3
|
||||
1720 IF A(J,1)<>A(J,I) THEN 1750
|
||||
1730 NEXT I
|
||||
1731 LET I=I-1
|
||||
1740 LET T1=A(J,I)
|
||||
1750 NEXT J
|
||||
1751 LET J=J-1
|
||||
1760 FOR J=1 TO 3
|
||||
1770 FOR I=1 TO 3
|
||||
1780 IF A(1,J)<>A(I,J) THEN 1810
|
||||
1790 NEXT I
|
||||
1791 LET I=I-1
|
||||
1800 LET T1=A(I,J)
|
||||
1810 NEXT J
|
||||
1811 LET J=J-1
|
||||
1820 IF A(1,1)=A(3,3) THEN 1930
|
||||
1830 IF A(3,1)=A(1,3) THEN 1970
|
||||
1840 IF T1<>0 THEN 1990
|
||||
1850 FOR J=1 TO 3
|
||||
1860 FOR I=1 TO 3
|
||||
1870 LET B(J)=B(J)+A(J,I)
|
||||
1880 LET B(J+3)=B(J+3)+A(I,J)
|
||||
1890 NEXT I
|
||||
1891 LET I=I-1
|
||||
1900 NEXT J
|
||||
1901 LET J=J-1
|
||||
1910 LET B(7)=A(1,1)+A(2,2)+A(3,3)
|
||||
1920 RETURN
|
||||
1930 IF A(2,2)=A(3,3) THEN 1950
|
||||
1940 GO TO 1830
|
||||
1950 LET T1=A(2,2)
|
||||
1960 GO TO 1840
|
||||
1970 IF A(2,2)=A(1,3) THEN 1950
|
||||
1980 GO TO 1840
|
||||
1990 IF T1>0 THEN 2030
|
||||
2000 PRINT " ...YOU WIN THIS TIME..."
|
||||
2010 LET Z=1
|
||||
2020 GO TO 1850
|
||||
2030 PRINT " ... THE PDP-8 WINS THIS TIME ..."
|
||||
2040 LET Z=2
|
||||
2050 GO TO 1850
|
||||
2060 REM END OF TEST WINNER PROGRAM.......
|
||||
2070 PRINT "DO YOU WANT TO PLAY ANOTHER GAME: YES(1), NO(0)",
|
||||
2080 INPUT X1
|
||||
2090 IF X1 = 1 THEN 250
|
||||
2100 IF X1 = 0 THEN 2130
|
||||
2110 PRINT "I SAID ONE OR ZERO: TRY AGAIN",
|
||||
2120 GO TO 2080
|
||||
2130 PRINT"IT'S BEEN FUN, COME AGAIN SOMETIME"
|
||||
2140 GO TO 2160
|
||||
2150 DATA 2,2,0,0,0,0,1,1,3,3,1,3,3,1,1,2,3,2,2,3,2,1
|
||||
2160 CHAIN "DEMON "
|
||||
2170 END
|
@ -1,21 +0,0 @@
|
||||
4 PRINT "TIME - SPEED - DISTANCE EXERCISE"\PRINT
|
||||
5 RANDOMIZE
|
||||
10 C=INT(RND*25)+40
|
||||
15 D=INT(RND*15)+5
|
||||
20 T=INT(RND*19)+20
|
||||
25 PRINT " A CAR TRAVELING"C"MPH CAN MAKE A CERTAIN TRIP IN"
|
||||
30 PRINT D"HOURS LESS THAN A TRAIN TRAVELING AT"T"MPH."
|
||||
35 PRINT "HOW LONG DOES THE TRIP TAKE BY CAR";
|
||||
40 INPUT A
|
||||
45 V=D*T/(C-T)
|
||||
50 E=INT(ABS((V-A)*100/A)+.5)
|
||||
55 IF E>5 THEN 70
|
||||
60 PRINT "GOOD! ANSWER WITHIN"E"PERCENT."
|
||||
65 GOTO 80
|
||||
70 PRINT "SORRY. YOU WERE OFF BY"E"PERCENT."
|
||||
80 PRINT "CORRECT ANSWER IS"V"HOURS."
|
||||
90 PRINT
|
||||
95 PRINT "ANOTHER PROBLEM (YES OR NO)";
|
||||
100 INPUT A$\PRINT
|
||||
105 IF A$="YES" THEN 10
|
||||
999 END
|
46
dec/TRAP.BAS
46
dec/TRAP.BAS
@ -1,46 +0,0 @@
|
||||
10 G=6
|
||||
20 N=100
|
||||
30 REM-TRAP
|
||||
40 REM-STEVE ULLMAN, 8-1-72
|
||||
50 PRINT "WANT INSTRUCTIONS (1 FOR YES)";
|
||||
60 INPUT Z
|
||||
70 IF Z<>1 THEN 180
|
||||
80 PRINT "I AM THINKING OF A NUMBER BETWEEN 1 AND";N
|
||||
90 PRINT "TRY TO GUESS MY NUMBER. ON EACH GUESS,"
|
||||
100 PRINT "YOU ARE TO ENTER 2 NUMBERS, TRYING TO TRAP"
|
||||
110 PRINT "MY NUMBER BETWEEN THE TWO NUMBERS. I WILL"
|
||||
120 PRINT "TELL YOU IF YOU HAVE TRAPPED MY NUMBER, IF MY"
|
||||
130 PRINT "NUMBER IS LARGER THAN YOUR TWO NUMBERS, OR IF"
|
||||
140 PRINT "MY NUMBER IS SMALLER THAN YOUR TWO NUMBERS."
|
||||
150 PRINT "IF YOU WANT TO GUESS ONE SINGLE NUMBER, TYPE"
|
||||
160 PRINT "YOUR GUESS FOR BOTH YOUR TRAP NUMBERS."
|
||||
170 PRINT "YOU GET";G;"GUESSES TO GET MY NUMBER."
|
||||
180 X=INT(N*RND(0))+1
|
||||
190 FOR Q=1 TO G
|
||||
200 PRINT
|
||||
210 PRINT "GUESS #";Q;
|
||||
220 INPUT A,B
|
||||
230 IF A<>B THEN 240
|
||||
235 IF X=A THEN 400
|
||||
240 IF A <=B THEB 260
|
||||
250 GOSUB 360
|
||||
260 IF X<A THEN 300
|
||||
270 IF X<=B THEN 320
|
||||
280 PRINT "MY NUMBER IS LARGER THAN YOUR TRAP NUMBERS."
|
||||
290 GOTO 330
|
||||
300 PRINT "MY NUMBER IS SMALLER THAN YOUR TRAP NUMBERS."
|
||||
310 GOTO 330
|
||||
320 PRINT "YOU HAVE TRAPPED MY NUMBER."
|
||||
330 NEXTQ
|
||||
340 PRINT "SORRY, THAT'S";G;"GUESSES. NUMBER WAS";X
|
||||
350 GOTO 410
|
||||
360 R=A
|
||||
370 A=B
|
||||
380 B=R
|
||||
390 RETURN
|
||||
400 PRINT "YOU GOT IT!!!"
|
||||
410 PRINT
|
||||
420 PRINT "TRY AGAIN."
|
||||
430 PRINT
|
||||
440 GOTO 180
|
||||
450 END
|
142
dec/WEKDAY.BAS
142
dec/WEKDAY.BAS
@ -1,142 +0,0 @@
|
||||
10 PRINT""
|
||||
120PRINT
|
||||
124 LET Y1 = 1970
|
||||
130 PRINT" ENTER TODAY'S DATE IN THIS FORM: MONTH,DAY, YEAR";
|
||||
140 INPUT M1,D1,Y1
|
||||
150 IF Y1>100 THEN 170
|
||||
160 LET Y1 = Y1 + 1900
|
||||
170 DEF FNA(A)=INT(A/4)
|
||||
180 DIM T(12)
|
||||
190 DEF FNB(A)=INT(A/7)
|
||||
210 FOR I= 1 TO 12
|
||||
220 READ T(I)
|
||||
230 NEXT I
|
||||
240 PRINT
|
||||
241PRINT"THIS PROGRAM DEMONSTRATES PDP-11 BASIC AND ALSO GIVES "
|
||||
242PRINT"FACTS ABOUT A DATE OF INTEREST TO YOU"
|
||||
244 PRINT
|
||||
245 PRINT"ENTER DATE OF BIRTH IN THIS FORM: MO,DAY,YEAR";
|
||||
250 INPUT M,D,Y
|
||||
260 PRINT
|
||||
270 IF Y - 75 >0 THEN 280
|
||||
275 LET Y = Y+1900
|
||||
280 LET I1 = INT((Y-1500)/100)
|
||||
290 IF Y-1582<0 THEN 1300
|
||||
300 LET A = I1*5+(I1+3)/4
|
||||
310LET I2 = INT(A-FNB(A)*7)
|
||||
320 LET Y2= INT(Y/100)
|
||||
330 LET Y3 = INT(Y-Y2*100)
|
||||
340 LET A = Y3/4+Y3+D+T(M)+I2
|
||||
350 LET B = INT(A-FNB(A)*7)+1
|
||||
360 IF M>2 THEN 470
|
||||
370 IF Y3= 0 THEN 440
|
||||
380 LET T1 = INT(Y-FNA(Y)*4)
|
||||
390 IF T1<> 0 THEN 470
|
||||
400 IF B<>0 THEN 420
|
||||
410 LET B = 6
|
||||
420 LET B = B-1
|
||||
430 GOTO 470
|
||||
440 LET A = I1-1
|
||||
450 LET T1 = INT(A-FNA(A)*4)
|
||||
460 IF T1 = 0 THEN 400
|
||||
470 IF B <> 0 THEN 490
|
||||
480 LET B = 7
|
||||
490 IF (Y1*12+M1)*31+D1<(Y*12+M)*31+D THEN 550
|
||||
500 IF (Y1*12+M1)*31+D1=(Y*12+M)*31+D THEN 530
|
||||
510 PRINT M;"/";D;"/";Y;" WAS A ";
|
||||
520 GOTO 570
|
||||
530 PRINT M;"/";D;"/";Y;" IS A ";
|
||||
540 GOTO 570
|
||||
550 PRINT M;"/";D;"/";Y;" WILL BE A ";
|
||||
570 IF B<>1 THEN 590
|
||||
580 PRINT "SUNDAY"
|
||||
590 IF B<>2 THEN 610
|
||||
600 PRINT "MONDAY"
|
||||
610 IF B<>3 THEN630
|
||||
620 PRINT "TUESDAY"
|
||||
630 IF B<>4 THEN 650
|
||||
640 PRINT "WEDNESDAY"
|
||||
650 IF B<>5 THEN 670
|
||||
660 PRINT "THURSDAY"
|
||||
670 IF B<>6 THEN 690
|
||||
680 GOTO 1250
|
||||
690 IF B<>7 THEN 710
|
||||
700 PRINT "SATURDAY"
|
||||
710 IF (Y1*12+M1)*31+D1=(Y*12+M)*31+D THEN 1120
|
||||
720 LET I5=Y1-Y
|
||||
730 PRINT
|
||||
740 LET I6=M1-M
|
||||
750 LET I7=D1-D
|
||||
760 IF I7>=0 THEN 790
|
||||
770 LET I6=I6-1
|
||||
780 LET I7=I7+30
|
||||
790 IF I6>=0 THEN 820
|
||||
800 LET I5=I5-1
|
||||
810 LET I6=I6+12
|
||||
820 IF I5<0 THEN 1310
|
||||
830 IF I7<>0 THEN 850
|
||||
835 IF I6<>0 THEN 850
|
||||
840 PRINT "****HAPPY BIRTHDAY*****"
|
||||
850 PRINT " "," ","YEARS","MONTHS","DAYS"
|
||||
860 PRINT "YOUR AGE ",I5,I6,I7
|
||||
870 LET A8= (I5*365)+(I6*30)+I7+INT(I6/2)
|
||||
880 LET K5=I5
|
||||
890 LET K6=I6
|
||||
900 LET K7=I7
|
||||
920 LET E=Y+65
|
||||
940 LET F=.35
|
||||
950 PRINT "YOU HAVE SLEPT ",
|
||||
960 GOSUB 1370
|
||||
970 LET F=.17
|
||||
980 PRINT "YOU HAVE EATEN ",
|
||||
990 GOSUB 1370
|
||||
1000 LET F=.23
|
||||
1010 IF K5 > 3 THEN 1040
|
||||
1020 PRINT"YOU HAVE PLAYED ",
|
||||
1030 GOTO 1080
|
||||
1040 IF K5 > 9 THEN 1070
|
||||
1050 PRINT "YOU HAVE PLAYED/STUDIED",
|
||||
1060 GOTO 1080
|
||||
1070 PRINT "YOU HAVE WORKED/STUDIED",
|
||||
1080 GOSUB 1370
|
||||
1090 PRINT "YOU HAVE RELAXED ",K5,K6,K7
|
||||
1100 PRINT
|
||||
1110 PRINT " ","**YOU MAY RETIRE IN";E;"**"
|
||||
1120 PRINT
|
||||
1130 PRINT" CALCULATED BY THE BEST MINICOMPUTER TODAY - THE PDP-11"
|
||||
1140 FOR Q=1 TO 2
|
||||
1150 PRINT
|
||||
1160 NEXT Q
|
||||
1170 PRINT
|
||||
1240 GOTO 240
|
||||
1250 IF D=13 THEN 1280
|
||||
1260 PRINT "FRIDAY "
|
||||
1270 GOTO 710
|
||||
1280 PRINT "FRIDAY THE THIRTEENT@---BEWARE!"
|
||||
1290 GOTO 710
|
||||
1300 PRINT "NOT PREPARED TO GIVE DAY OF WEEK PRIOR TO MDLXPXII -"
|
||||
1305 PRINT " THE CURRENT CALENDAR DID NOT EXIST BEFORE THAT YEAR."
|
||||
1310 GOTO 1140
|
||||
1330 DATA 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5
|
||||
1370 LET K1= INT(F*A8)
|
||||
1380 LET I5 = INT(K1/365)
|
||||
1390 LET K1 = K1-(I5*365)
|
||||
1400 LET I6 = INT(K1/30)
|
||||
1410 LET I7 = K1-(I6*30)
|
||||
1420 LET K5 = K5-I5
|
||||
1430 LET K6 = K6-I6
|
||||
1440 LET K7 = K7-I7
|
||||
1450 IF K7 >= 0 THEN 1480
|
||||
1460 LET K7 = K7+30
|
||||
1470 LET K6 = K6-1
|
||||
1480 IF K6 > 0 THEN 1510
|
||||
1490 LET K6 = K6+12
|
||||
1500 LET K5 = K5-1
|
||||
1510 PRINT I5,I6,I7
|
||||
1520 RETURN
|
||||
1530 IF K6 = 12 THEN 1550
|
||||
1540 GOTO 1090
|
||||
1550 LET K5 = K5+1
|
||||
1560 LET K6=0
|
||||
1570 GOTO 1090
|
||||
1580 END
|
@ -1,45 +0,0 @@
|
||||
100 REM ***23 MATCHES
|
||||
105 RANDOMIZE
|
||||
110 PRINT "LET'S PLAY 23 MATCHES. WE START WITH 23 MATCHES."
|
||||
115 PRINT "YOU MOVE FIRST. YOU MAY TAKE 1,2 OR 3 MATCHES."
|
||||
120 PRINT "THEN I MOVE...I MAY TAKE 1,2 OR 3 MATCHES."
|
||||
125 PRINT "YOU MOVE, I MOVE AND SO ON. THE ONE WHO HAS TO"
|
||||
130 PRINT "TAKE THE LAST MATCH LOSES."
|
||||
135 PRINT "GOOD LUCK AND MAY THE BEST COMPUTER (HA HA) WIN."
|
||||
140 PRINT
|
||||
150 LET M=23
|
||||
200 REM ***THE HUMAN MOVES
|
||||
205 PRINT
|
||||
210 PRINT "THERE ARE NOW";M;"MATCHES."
|
||||
215 PRINT
|
||||
220 PRINT "HOW MANY DO YOU TAKE";
|
||||
230 INPUT H
|
||||
240 IF H>M THEN 510
|
||||
250 IF H<>INT(H) THEN 510
|
||||
260 IF H<=0 THEN 510
|
||||
270 IF H>=4 THEN 510
|
||||
280 LET M=M-H
|
||||
290 IF M=0 THEN 410
|
||||
300 REM ***THE COMPUTER MOVES
|
||||
305 IF M=1 THEN 440
|
||||
310 LET R=M-4*INT(M/4)
|
||||
320 IF R<>1 THEN 350
|
||||
330 LET C=INT(3*RND(0))+1
|
||||
340 GO TO 360
|
||||
350 LET C=(R+3)-4*INT((R+3)/4)
|
||||
360 LET M=M-C
|
||||
370 IF M=0 THEN 440
|
||||
375 PRINT
|
||||
380 PRINT "I TOOK";C;"...";
|
||||
390 GO TO 210
|
||||
400 REM ***SOMEBODY WON (SEE LINES 290,305,370)
|
||||
410 PRINT
|
||||
420 PRINT "I WON!!! BETTER LUCK NEXT TIME."
|
||||
430 GO TO 140
|
||||
440 PRINT
|
||||
450 PRINT "O.K. SO YOU WON. LET'S PLAY AGAIN."
|
||||
460 GO TO 140
|
||||
500 REM ***THE HUMAN CHEATED! (SEE LINES 240 THRU 270)
|
||||
510 PRINT "YOU CHEATED! BUT I'LL GIVE YOU ANOTHER CHANCE."
|
||||
520 GO TO 215
|
||||
999 END
|
@ -1,19 +0,0 @@
|
||||
5 DEF FNA(Z)=30*EXP(-Z*Z/100)
|
||||
10 ' DEF FNA(Z)=SQR(900.01-Z*Z)*.9-2
|
||||
20 ' DEF FNA(Z)=30*(COS(Z/16))^2
|
||||
30 ' DEF FNA(Z)=30-30*SIN(Z/18)
|
||||
40 ' DEF FNA(Z)=30*EXP(-COS(Z/16))-30
|
||||
50 ' DEF FNA(Z)=30*SIN(Z/10)
|
||||
100 PRINT
|
||||
110 FOR X=-30 TO 30 STEP 1.5
|
||||
120 L=0
|
||||
130 Y1=5*INT(SQR(900-X*X)/5)
|
||||
140 FOR Y=Y1 TO -Y1 STEP -5
|
||||
150 Z=INT(25+FNA(SQR(X*X+Y*Y))-.7*Y)
|
||||
160 IF Z<=L THEN 190
|
||||
170 L=Z
|
||||
180 PRINT TAB(Z)"*";
|
||||
190 NEXT Y
|
||||
200 PRINT
|
||||
210 NEXTX
|
||||
300 END
|
@ -1,99 +0,0 @@
|
||||
100 REM PROGRAM WRITTEN BY DANIEL R. VERNON
|
||||
110 REM SENIOR AT BUTLER SENIOR HIGH SCHOOL
|
||||
120 REM BUTLER, PENNSYLVANIA 16001
|
||||
130 REM DATE: 2-1-73
|
||||
140 REM COMPUTER SUPERVISION- MR. WILLIAM ELLIS
|
||||
150 REM COMPUTER TOPICS INSTRUCTION- MR. ALBERT STEWART
|
||||
160 REM
|
||||
170 REM THIS PROGRAM IS DESIGNED TO CREATE POSTERS
|
||||
180 REM
|
||||
190 DIMG$(6),H$(6),B$(9),G(6),A(54)
|
||||
200 PRINT"INPUT HEIGHT, WIDTH IN INCHES";\INPUTL,R\S=0\A=R*2\C=A
|
||||
210 PRINT"HOW FAR, IN INCHES FROM THE LEFT HAND SIDE, DO YOU WANT TO PLACE"
|
||||
220 PRINT"THE LETTERS";\INPUTS\S=12*S
|
||||
230 PRINT"INPUT MESSAGE HERE"
|
||||
240 LINPUTB$(1),B$(2),B$(3),B$(4),B$(5),B$(6),B$(7),B$(8),B$(9)
|
||||
250 FORX=9TO1STEP-1\CHANGEB$(X)TOA\FORY=1TO6\A(X*6-6+Y)=A(Y)\NEXTY\NEXTX
|
||||
260 FORX=1TO6\READH$(X)\NEXTX\H$=H$(L)\GOSUB 940
|
||||
270 F=F+1\IFA(F)=0THEN990\G(0)=L\FORX=1TO6\G(X)=A(F)\NEXTX\CHANGEGTOG$
|
||||
280 FORX=1TO6\G(0)=X\CHANGEGTOG$(X)\NEXTX
|
||||
290 FORX=1TOA/2\PRINT\NEXTX
|
||||
300 IFA(F)=46THEN345\IFA(F)=36THEN990\IFA(F)=32THEN630\IFA(F)<48THEN270
|
||||
305 IFA(F)>57THEN310\ONA(F)-47GOTO500,440,620,625,635,550,615,605,595,585
|
||||
310 IFA(F)<65THEN270\IFA(F)>79THEN330
|
||||
320 ONA(F)-64GOTO350,360,370,380,390,400,410,430,440,450,460,470,480,490,500
|
||||
330 IFA>90THEN270\ONA(F)-79GOTO510,520,540,550,560,570,580,590,600,610,620
|
||||
340 GOTO270
|
||||
345 FORX=1TOA\PRINTTAB(S);G$;G$\NEXTX\GOTO270
|
||||
350 GOSUB640\GOSUB690\GOSUB640\GOTO270
|
||||
360 GOSUB640\GOSUB650\A=C*.5\GOSUB640\A=C\GOSUB810\GOTO270
|
||||
370 GOSUB640\GOSUB700\GOSUB700\GOTO270
|
||||
380 GOSUB640\GOSUB700\A=C*.5\GOSUB640\A=C\GOSUB840\GOTO270
|
||||
390 GOSUB640\GOSUB650\GOSUB650\GOTO270
|
||||
400 GOSUB640\GOSUB690\GOSUB690\GOTO270
|
||||
410 GOSUB640\A=C*.75\GOSUB700\A=C*.25\GOSUB650\A=C\GOSUB760
|
||||
420 A=C*.25\GOSUB710\A=C\GOTO270
|
||||
430 GOSUB640\GOSUB710\GOSUB640\GOTO270
|
||||
440 GOSUB640\GOTO270
|
||||
450 GOSUB750\GOSUB740\GOSUB640\GOTO270
|
||||
460 GOSUB640\GOSUB860\GOTO270
|
||||
470 GOSUB640\GOSUB740\GOSUB740\GOTO270
|
||||
480 GOSUB640\GOSUB890\GOSUB880\GOSUB640\GOTO270
|
||||
490 GOSUB640\GOSUB890\GOSUB640\GOTO270
|
||||
500 GOSUB640\GOSUB700\GOSUB640\GOTO270
|
||||
510 GOSUB640\GOSUB690\GOSUB790\GOTO270
|
||||
520 GOSUB640\A=C*.75\GOSUB700\A=C*.25\GOSUB650\A=C\GOSUB640
|
||||
530 A=C*.25\GOSUB710\A=C\GOTO270
|
||||
540 GOSUB640\GOSUB690\A=C*.5\GOSUB640\GOSUB810\A=C\GOTO270
|
||||
550 GOSUB770\GOSUB650\GOSUB760\GOTO270
|
||||
560 GOSUB780\GOSUB640\GOSUB780\GOTO270
|
||||
570 GOSUB640\GOSUB740\GOSUB640\GOTO270
|
||||
580 GOSUB890\GOSUB880\GOTO270
|
||||
585 GOSUB790\GOSUB690\GOSUB640\GOTO270
|
||||
590 GOSUB640\GOSUB880\GOSUB890\GOSUB640\GOTO270
|
||||
595 GOSUB640\GOSUB650\GOSUB640\GOTO270
|
||||
600 GOSUB900\GOTO270
|
||||
605 GOSUB780\GOSUB780\GOSUB640\GOTO270
|
||||
610 GOSUB970\GOSUB800\GOSUB960\GOTO270
|
||||
615 GOSUB640\GOSUB650\GOSUB760\GOTO270
|
||||
620 GOSUB920\GOTO270
|
||||
625 GOSUB700\GOSUB650\A=C*.5\GOSUB640\A=C\GOSUB810\GOTO270
|
||||
630 GOSUB940\GOTO270
|
||||
635 GOSUB790\GOSUB710\GOSUB640\GOTO270
|
||||
640 FORY=1TOA\PRINTTAB(S);\FORX=1TO10\PRINTG$;\NEXTX\PRINT\NEXTY\RETURN
|
||||
650 IFA<1THEN660\GOTO670
|
||||
660 LETA=1
|
||||
670 FORX=1TOA\PRINTTAB(S);G$;G$;H$;H$;G$;G$;H$;H$;G$;G$\NEXTX\RETURN
|
||||
680 PRINTTAB(S);
|
||||
690 FORX=1TOA\PRINTTAB(4*L+S);G$;G$;H$;H$;G$;G$\NEXTX\RETURN
|
||||
700 FORX=1TOA\PRINTTAB(S);G$;G$;\PRINTTAB(8*L+S);G$;G$\NEXTX\RETURN
|
||||
710 IFA<1THEN720\GOTO730
|
||||
720 LETA=1
|
||||
730 FORX=1TOA\PRINTTAB(4*L+S);G$;G$\NEXTX\RETURN
|
||||
740 FORX=1TOA\PRINTTAB(S);G$;G$\NEXTX\RETURN
|
||||
750 FORX=1TOA\PRINTTAB(S);G$;G$;G$;G$\NEXTX\RETURN
|
||||
760 FORY=1TOA\PRINTTAB(S);G$;G$;G$;G$;G$;G$;H$;H$;G$;G$\NEXTY\RETURN
|
||||
770 FORX=1TOA\PRINTTAB(S);G$;G$;H$;H$;G$;G$;G$;G$;G$;G$\NEXTX\RETURN
|
||||
780 FORX=1TOA\PRINTTAB(8*L+S);G$;G$\NEXTX\RETURN
|
||||
790 FORX=1TOA\PRINTTAB(4*L+S);G$;G$;G$;G$;G$;G$\NEXTX\RETURN
|
||||
800 FORX=1TOA\PRINTTAB(S);G$;G$;G$;G$;G$;G$\NEXTX\RETURN
|
||||
810 FORX=1TOC/2\PRINTTAB(S);\FORY=1TO2\FORZ=1TO(5*L)-X\PRINTG$(1);\NEXTZ
|
||||
820 IFX>3THEN950\V=X
|
||||
830 PRINTH$(2*V);\NEXTY\PRINT\NEXTX\RETURN
|
||||
840 FORX=1TOC/2\PRINTTAB(S);H$(X);\FORY=1TO10*L-(2*X)\PRINTG$(1);\NEXTY\PRINT
|
||||
850 NEXTX\RETURN
|
||||
860 FOR X=4*LTO7*LSTEP14*L/(C*6)\PRINTTAB(X+S);G$;G$;G$;
|
||||
870 PRINTTAB(7*L-X+S);G$;G$;G$\NEXT X\RETURN
|
||||
880 FORX=0TO6*LSTEP6*L/C\PRINTTAB(X+S);G$;G$;G$;G$\NEXTX\RETURN
|
||||
890 FORX=6*LTO0STEP-6*L/C\PRINTTAB(X+S);G$;G$;G$;G$\NEXTX\RETURN
|
||||
900 FORX=0TO7*LSTEP(14*L)/(C*6)\PRINTTAB(X+S);G$;G$;G$;
|
||||
910 PRINTTAB(7*L-X+S);G$;G$;G$\NEXT X\RETURN
|
||||
920 FORX=0TO7*LSTEP(7*L)/(C*3)\PRINTTAB(S);G$;G$;TAB(X+S);G$;G$;G$;
|
||||
930 PRINTTAB(8*L+S);G$;G$\NEXTX\RETURN
|
||||
940 FORX=1TOA*3\PRINT\NEXTX\RETURN
|
||||
950 FORW=1TOX-3\PRINT" ";\NEXTW\V=3\GOTO830
|
||||
960 FORX=4*LTO7*LSTEPL*4/C\PRINTTAB(X+S);G$;G$;G$\NEXTX\RETURN
|
||||
970 FOR X=7*LTO4*LSTEP-4*L/C\PRINTTAB(X+S);G$;G$;G$\NEXTX\RETURN
|
||||
980 DATA" "," "," "," "," "," ",""
|
||||
990 FORX=1TOC*3\PRINT\NEXTX
|
||||
1000 END
|
124
port/BUZZWD.BAS
124
port/BUZZWD.BAS
@ -1,124 +0,0 @@
|
||||
100 PRINT"THIS COMPUTER DEMONSTRATION IS A NEW AID FOR"
|
||||
110 PRINT"PREPARING SPEECHES AND BRIEFINGS. IT'S A BUZZWORD"
|
||||
120 PRINT"GENERATOR WHICH PROVIDES YOU WITH A SET OF 3 HIGHLY"
|
||||
130 PRINT"ACCEPTABLE WORDS TO WORK INTO YOUR MATERIAL. THE WORDS"
|
||||
140 PRINT"DON'T ACTUALLY MEAN ANYTHING, BUT THEY SOUND GREAT."
|
||||
150 PRINT
|
||||
160 PRINT"THE PROCEDURE:"
|
||||
170 PRINT" THINK OF ANY THREE NUMBERS BETWEEN 0 AND 9. ENTER"
|
||||
180 PRINT" THEM AFTER THE '?' SEPARATED BY COMMAS. YOUR"
|
||||
190 PRINT" BUZZWORD WILL BE PRINTED OUT. TYPING '100' FOR"
|
||||
191 PRINT" EACH OF YOUR CHOICES STOPS THIS PROGRAM."
|
||||
210 PRINT "WHAT ARE YOUR THREE NUMBERS";
|
||||
220 GOTO260
|
||||
230 PRINT
|
||||
240 PRINT
|
||||
250 PRINT"THREE MORE NUMBERS";
|
||||
260 INPUT N,M,P
|
||||
265 IF N=100 THEN 1290
|
||||
270 IF N<0 THEN 1240
|
||||
280 IF P<0 THEN 1240
|
||||
290 IF M<0 THEN 1240
|
||||
300 IF N>9 THEN 1240
|
||||
310 IF P>9 THEN 1240
|
||||
320 IF M>9 THEN 1240
|
||||
330 PRINT
|
||||
340 IF N=0 THEN 640
|
||||
350 IF N=1THEN 660
|
||||
360 IF N=2THEN 680
|
||||
370 IF N=3THEN 700
|
||||
380 IF N=4 THEN 720
|
||||
390 IF N=5THEN 740
|
||||
400 IF N=6THEN 760
|
||||
410 IF N=7THEN 780
|
||||
420 IF N=8THEN 800
|
||||
430 IF N=9THEN 820
|
||||
440 IF M=0 THEN 840
|
||||
450 IF M=1 THEN 860
|
||||
460 IF M=2 THEN 880
|
||||
470 IF M=3 THEN 900
|
||||
480 IF M=4 THEN 920
|
||||
490 IF M=5 THEN 940
|
||||
500 IF M=6 THEN 960
|
||||
510 IF M=7 THEN 980
|
||||
520 IF M=8 THEN 1000
|
||||
530 IF M=9 THEN 1020
|
||||
540 IF P=0 THEN 1040
|
||||
550 IF P=1 THEN 1060
|
||||
560 IF P=2 THEN 1080
|
||||
570 IF P=3 THEN 1100
|
||||
580 IFP=4 THEN 1120
|
||||
590 IF P=5 THEN 1140
|
||||
600 IF P=6 THEN 1160
|
||||
610 IF P=7 THEN 1180
|
||||
620 IF P=8 THEN 1200
|
||||
630 IF P=9 THEN 1220
|
||||
640 PRINT" INTEGRATED";
|
||||
650 GOTO440
|
||||
660 PRINT" TOTAL";
|
||||
670 GOTO440
|
||||
680 PRINT" SYSTEMATIZED";
|
||||
690 GOTO440
|
||||
700 PRINT" PARALLEL";
|
||||
710 GO TO 440
|
||||
720 PRINT" FUNCTIONAL";
|
||||
730 GOTO440
|
||||
740 PRINT" RESPONSIVE";
|
||||
750 GOTO440
|
||||
760 PRINT" OPTIMAL";
|
||||
770 GOTO440
|
||||
780 PRINT" SYNCHRONIZED";
|
||||
790 GOTO440
|
||||
800 PRINT " COMPATIBLE";
|
||||
810 GOTO440
|
||||
820 PRINT" BALANCED";
|
||||
830 GOTO440
|
||||
840 PRINT" MANAGEMENT";
|
||||
850 GOTO 540
|
||||
860 PRINT" ORGANIZATIONAL";
|
||||
870 GOTO 540
|
||||
880 PRINT" MONITORED";
|
||||
890 GOTO 540
|
||||
900 PRINT" RECIPROCAL";
|
||||
910 GOTO 540
|
||||
920 PRINT" DIGITAL";
|
||||
930 GOTO 540
|
||||
940 PRINT" LOGISTICAL";
|
||||
950 GOTO 540
|
||||
960 PRINT " TRANSITIONAL";
|
||||
970 GOTO 540
|
||||
980 PRINT" INCREMENTAL";
|
||||
990 GOTO 540
|
||||
1000 PRINT" THIRD-GENERATION";
|
||||
1010 GO TO 540
|
||||
1020 PRINT" POLICY";
|
||||
1030 GOTO 540
|
||||
1040 PRINT" OPTIONS"
|
||||
1050 GOTO 230
|
||||
1060 PRINT " FLEXIBILITY"
|
||||
1070 GO TO 230
|
||||
1080 PRINT" CAPABILITY"
|
||||
1090 GOTO230
|
||||
1100 PRINT" MOBILITY"
|
||||
1110 GOTO230
|
||||
1120 PRINT" PROGRAMMING"
|
||||
1130 GO TO 230
|
||||
1140 PRINT" CONCEPT"
|
||||
1150 GOTO230
|
||||
1160 PRINT" TIME-PHASE"
|
||||
1170 GOTO230
|
||||
1180 PRINT" PROJECTION"
|
||||
1190 GOTO230
|
||||
1200 PRINT" HARDWARE"
|
||||
1210 GOTO230
|
||||
1220 PRINT" CONTINGENCY"
|
||||
1230 GOTO230
|
||||
1240 PRINT
|
||||
1250 PRINT
|
||||
1260 PRINT"NUMBERS MUST BE BETWEEN 0 AND 9. PLEASE SELECT THREE MORE."
|
||||
1270 GOTO 260
|
||||
1280 GOTO 260
|
||||
1290 PRINT "GOODBYE FOR NOW! "
|
||||
1300 PRINT\PRINT\PRINT
|
||||
1310 CHAIN "DEMON "
|
||||
1320 END
|
@ -1,58 +0,0 @@
|
||||
10 REM *** MODIFIED AND CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL
|
||||
90 RANDOMIZE
|
||||
100 PRINT "THIS COMPUTER DEMONSTRATION SIMULATES THE"
|
||||
110 PRINT"RESULTS OF FIRING A FIELD ARTILLERY WEAPON."
|
||||
120 PRINT
|
||||
130 PRINT"YOU ARE THE OFFICER-IN-CHARGE, GIVING ORDERS TO THE GUN"
|
||||
140 PRINT"CREW, TELLING THEM THE DEGREES OF ELEVATION YOU ESTIMATE"
|
||||
150 PRINT"WILL PLACE THE PROJECTILE ON TARGET. A HIT WITHIN 100 YARDS"
|
||||
160 PRINT "OF THE TARGET WILL DESTROY IT. TAKE MORE THAN 5 SHOTS,"
|
||||
170 PRINT "AND THE ENEMY WILL DESTROY YOU!"\PRINT
|
||||
180 PRINT"MAXIMUM RANGE OF YOUR GUN IS 46500 YARDS."
|
||||
185 Z=0
|
||||
190 PRINT
|
||||
195 S1=0
|
||||
200 LET T=43000-30000*RND(X)
|
||||
210 LET S=0
|
||||
220 GO TO 370
|
||||
230 PRINT"MINIMUM ELEVATION OF GUN IS ONE DEGREE."
|
||||
240 GO TO 390
|
||||
250 PRINT"MAXIMUM ELEVATION OF GUN IS 89 DEGREES."
|
||||
260 GO TO 390
|
||||
270 PRINT"OVER TARGET BY";ABS(E);"YARDS."
|
||||
280 GO TO 390
|
||||
290 PRINT "SHORT OF TARGET BY";ABS(E);"YARDS."
|
||||
300 GO TO 390
|
||||
310 GO TO 320
|
||||
320 PRINT"***TARGET DESTROYED*** ";S;"ROUNDS OF AMMUNITION EXPENDED"
|
||||
322 GOSUB 600
|
||||
325 S1=S1+S
|
||||
330 IF Z=4 THEN 490
|
||||
340 Z=Z+1
|
||||
345 PRINT
|
||||
350 PRINT"THE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY."
|
||||
360 GO TO 200
|
||||
370 PRINT" DISTANCE TO THE TARGET IS";INT(T);"YARDS....."
|
||||
380 PRINT
|
||||
390 PRINT
|
||||
400 PRINT"ELEVATION:";
|
||||
410 INPUT B
|
||||
420 IF B>89 THEN 250
|
||||
430 IF B<1 THEN 230
|
||||
440 LET S=S+1
|
||||
442 IF S<6 THEN 450
|
||||
444 PRINT\PRINT "BOOM !!! YOU HAVE JUST BEEN DESTROYED ";
|
||||
445 GOSUB 600
|
||||
446 PRINT "BY THE ENEMY"\PRINT\PRINT\GOTO 495
|
||||
450 LET B2=2*B/57.3\LET I=46500*SIN(B2)\LET X=T-I\LET E=INT(X)
|
||||
460 IF ABS(E)<100 THEN 310
|
||||
470 IF E>100 THEN 290
|
||||
480 IF E<-100 THEN 270
|
||||
490 PRINT\PRINT\PRINT "TOTAL ROUNDS EXPENDED WERE";S1
|
||||
491 IF S1>15 THEN 495\PRINT "NICE SHOOTING !!"\GOSUB 600\GOTO 500
|
||||
495 PRINT "BETTER GO BACK TO FORT SILL FOR REFRESHER TRAINING!"
|
||||
500 PRINT\PRINT "THANK YOU FOR PLAYING!"
|
||||
505 PRINT\PRINT "TRY AGAIN....."\PRINT\GOTO 180
|
||||
600 FOR N=1 TO 10\PRINT CHR$(7);\NEXT N
|
||||
610 RETURN
|
||||
999 END
|
225
port/TICTAC.BAS
225
port/TICTAC.BAS
@ -1,225 +0,0 @@
|
||||
100 RANDOMIZE
|
||||
120 PRINT"YOU HAVE THE OPPORTUNITY OF TRYING TO BEAT THE COMPUTER"
|
||||
130 PRINT"AT TIC-TAC-TOE. ENTER YOUR MOVES AS FOLLOWS:"
|
||||
140 PRINT
|
||||
150 DIM C(11)
|
||||
160 DIM D(11)
|
||||
170 FOR K=1 TO 11
|
||||
180 READ C(K), D(K)
|
||||
190 NEXT K
|
||||
200 PRINT "...ROW NUMBER...COMMA...COLUMN NUMBER..."
|
||||
210 PRINT
|
||||
220 PRINT"ROWS ARE HORIZONTAL(ACROSS)...COLUMNS ARE VERTICAL(UP + DOWN)"
|
||||
230 DIM B(9)
|
||||
240 DIM A(3,3)
|
||||
250 PRINT
|
||||
260 PRINT "NEW GAME STARTED NOW..........................."
|
||||
270 FOR J=1 TO 3
|
||||
280 FOR I=1 TO 3
|
||||
290 LET A(I,J)=0
|
||||
300 NEXT I
|
||||
301 LET I=I-1
|
||||
310 NEXT J
|
||||
311 LET J=J-1
|
||||
320 LET Z= 0
|
||||
330 PRINT "YOUR MOVE";
|
||||
340 INPUT R,C
|
||||
350 PRINT
|
||||
360 IF R>3 THEN 620
|
||||
370 IF C>3 THEN 620
|
||||
380 IF A(R,C) <> 0 THEN 620
|
||||
390 LET A(R,C)=-1
|
||||
400 GOSUB 1660
|
||||
410 IF Z =1 THEN 2037
|
||||
420 REM MACHINE MOVE...
|
||||
430 GOSUB 1100
|
||||
440 REM TEST FOR GAME WIN...
|
||||
450 GOSUB 1660
|
||||
460 IF Z=0 THEN 650
|
||||
470 REM PRINT GAME BOARD..
|
||||
480 GO TO 490
|
||||
490 PRINT
|
||||
500 FOR K=1 TO 3
|
||||
510 LET B=A(K,1)
|
||||
520 LET D=A(K,2)
|
||||
530 LET F=A(K,3)
|
||||
540 GOSUB 840
|
||||
550 IF K>2 THEN 570
|
||||
560 PRINT "***************"
|
||||
570 NEXT K
|
||||
571 LET K=K-1
|
||||
580 PRINT
|
||||
590 IF Z <>0 THEN 2037
|
||||
600 GO TO 330
|
||||
610 STOP
|
||||
620 PRINT "---- ILLEGAL MOVE -- TRY AGAIN ----"
|
||||
630 PRINT
|
||||
640 GO TO 330
|
||||
650LET T2=0
|
||||
660 FOR J=1 TO 3
|
||||
670 FOR I=1 TO 3
|
||||
680 IF A(I,J)<>0 THEN 700
|
||||
690 LET T2=T2+1
|
||||
700 NEXT I
|
||||
701 LET I=I-1
|
||||
710 NEXT J
|
||||
711 LET J=J-1
|
||||
720 IF T2>0 THEN 750
|
||||
730 GOSUB 1340
|
||||
740 GO TO 480
|
||||
750 IF T2>1 THEN 480
|
||||
760 FOR J=1 TO 8
|
||||
770 IF B(J)=-2 THEN 800
|
||||
780 NEXT J
|
||||
781 LET J=J-1
|
||||
790 GO TO 730
|
||||
800 GOSUB 2000
|
||||
810 GO TO 480
|
||||
820 REM PRINT TIC-TAC-TOE BOARD ROW.....
|
||||
830 REM
|
||||
840 IF B<>0 THEN 910
|
||||
850 PRINT " * ";
|
||||
860 IF D<>0 THEN 940
|
||||
870 PRINT " * ";
|
||||
880 IF F<>0 THEN 970
|
||||
890 PRINT " "
|
||||
900 GO TO 1070
|
||||
910 IF B>0 THEN 1000
|
||||
920 PRINT "YOU * ";
|
||||
930 GO TO 860
|
||||
940 IF D>0 THEN 1020
|
||||
950 PRINT "YOU * ";
|
||||
960 GO TO 880
|
||||
970 IF F>0 THEN 1040
|
||||
980 PRINT "YOU"
|
||||
990 GO TO 900
|
||||
1000 PRINT"PDP * ";
|
||||
1010 GO TO 860
|
||||
1020 PRINT "PDP * ";
|
||||
1030 GO TO 880
|
||||
1040 PRINT "PDP"
|
||||
1050 GO TO900
|
||||
1060 REM PRINT LEGENDS..
|
||||
1070 PRINT " * * "
|
||||
1080 RETURN
|
||||
1090 REM PROGRAM TO MAKE MOVE FOR THE MACHINE....
|
||||
1100 LET M=INT(3.33*RND(M))
|
||||
1110 LET N=INT(3.33333*RND(N))
|
||||
1120 IF M=0 THEN 1100
|
||||
1130 IF M>3 THEN 1100
|
||||
1140 IF N=0 THEN 1110
|
||||
1150 IF N>3 THEN 1110
|
||||
1160 LET C(2)=M
|
||||
1170 LET D(2)=N
|
||||
1180 LET C(3)=N
|
||||
1190 LET D(3)=M
|
||||
1200 FOR I=1 TO 8
|
||||
1210 IF B(I)>1 THEN 1370
|
||||
1220 NEXT I
|
||||
1221 LET I=I-1
|
||||
1230 FOR I=1 TO 8
|
||||
1240 IF B(I)<-1 THEN 1370
|
||||
1250 NEXT I
|
||||
1251 LET I=I-1
|
||||
1260 IF R+C=0 THEN 1550
|
||||
1270 FOR K=1 TO 11
|
||||
1280 LET I=C(K)
|
||||
1290 LET J=D(K)
|
||||
1300 IF A(I,J)<>0 THEN 1330
|
||||
1310 LET A(I,J)=1
|
||||
1320 GO TO 1360
|
||||
1330 NEXT K
|
||||
1331 LET K=K-1
|
||||
1340 PRINT " ... TIE GAME ... "
|
||||
1350 LET Z=3
|
||||
1360 RETURN
|
||||
1370 IF I>3 THEN 1440
|
||||
1380 FOR J=1 TO 3
|
||||
1390 IF A(I,J)=0 THEN 1420
|
||||
1400 NEXT J
|
||||
1401 LET J=J-1
|
||||
1410 GO TO 1360
|
||||
1420 LET A(I,J)=1
|
||||
1430 GO TO 1360
|
||||
1440 IF I>6 THEN 1510
|
||||
1450 FOR J=1 TO 3
|
||||
1460 IF A(J,I-3)=0 THEN 1490
|
||||
1470 NEXT J
|
||||
1471 LET J=J-1
|
||||
1480 GO TO 1360
|
||||
1490 LET A(J,I-3)=1
|
||||
1500 GO TO 1360
|
||||
1510 IF I>7 THEN 1550
|
||||
1520 FOR J=1 TO 3
|
||||
1530 IF A(J,J)=0 THEN 1590
|
||||
1540 NEXT J
|
||||
1541 LET J=J-1
|
||||
1550 IF A(1,3)=0 THEN 1610
|
||||
1560 IF A(3,1)=0 THEN 1630
|
||||
1570 LET A(2,2)=1
|
||||
1580 GO TO 1360
|
||||
1590 LET A(J,J)=1
|
||||
1600 GO TO 1360
|
||||
1610 LET A(1,3)=1
|
||||
1620 GO TO 1360
|
||||
1630 LET A(3,1)=1
|
||||
1640 GO TO 1360
|
||||
1650 REM PROGRAM TO TEST FOR GAME WINNER....
|
||||
1660 LET T1=0
|
||||
1670 FOR J=1 TO 9
|
||||
1680 LET B(J)=0
|
||||
1690 NEXT J
|
||||
1691 LET J=J-1
|
||||
1700 FOR J=1 TO 3
|
||||
1710 FOR I=1 TO 3
|
||||
1720 IF A(J,1)<>A(J,I) THEN 1750
|
||||
1730 NEXT I
|
||||
1731 LET I=I-1
|
||||
1740 LET T1=A(J,I)
|
||||
1750 NEXT J
|
||||
1751 LET J=J-1
|
||||
1760 FOR J=1 TO 3
|
||||
1770 FOR I=1 TO 3
|
||||
1780 IF A(1,J)<>A(I,J) THEN 1810
|
||||
1790 NEXT I
|
||||
1791 LET I=I-1
|
||||
1800 LET T1=A(I,J)
|
||||
1810 NEXT J
|
||||
1811 LET J=J-1
|
||||
1820 IF A(1,1)=A(3,3) THEN 1930
|
||||
1830 IF A(3,1)=A(1,3) THEN 1970
|
||||
1840 IF T1<>0 THEN 1990
|
||||
1850 FOR J=1 TO 3
|
||||
1860 FOR I=1 TO 3
|
||||
1870 LET B(J)=B(J)+A(J,I)
|
||||
1880 LET B(J+3)=B(J+3)+A(I,J)
|
||||
1890 NEXT I
|
||||
1891 LET I=I-1
|
||||
1900 NEXT J
|
||||
1901 LET J=J-1
|
||||
1910 LET B(7)=A(1,1)+A(2,2)+A(3,3)
|
||||
1920 RETURN
|
||||
1930 IF A(2,2)=A(3,3) THEN 1950
|
||||
1940 GO TO 1830
|
||||
1950 LET T1=A(2,2)
|
||||
1960 GO TO 1840
|
||||
1970 IF A(2,2)=A(1,3) THEN 1950
|
||||
1980 GO TO 1840
|
||||
1990 IF T1>0 THEN 2030
|
||||
2000 PRINT " ...YOU WIN THIS TIME..."
|
||||
2010 LET Z=1
|
||||
2020 GO TO 1850
|
||||
2030 PRINT " ... THE PDP-8 WINS THIS TIME ..."
|
||||
2034 LET Z=2
|
||||
2035 GO TO 1850
|
||||
2036 REM END OF TEST WINNER PROGRAM.......
|
||||
2037 PRINT "DO YOU WANT TO PLAY ANOTHER GAME: YES(1), NO(0)";
|
||||
2038 INPUT X1
|
||||
2039 IF X1 = 1 THEN 250
|
||||
2040 IF X1 = 0 THEN 2043
|
||||
2041 PRINT "I SAID ONE OR ZERO: TRY AGAIN";
|
||||
2042 GO TO 2038
|
||||
2043 PRINT"IT'S BEEN FUN, COME AGAIN SOMETIME"
|
||||
2044 CHAIN "DEMON "
|
||||
2045 DATA 2,2,0,0,0,0,1,1,3,3,1,3,3,1,1,2,3,2,2,3,2,1
|
||||
2046 END
|
@ -1,21 +0,0 @@
|
||||
4 PRINT "TIME - SPEED - DISTANCE EXERCISE"\PRINT
|
||||
5 RANDOMIZE
|
||||
10 C=INT(RND(1)*25)+40
|
||||
15 D=INT(RND(1)*15)+5
|
||||
20 T=INT(RND(1)*19)+20
|
||||
25 PRINT " A CAR TRAVELING"C"MPH CAN MAKE A CERTAIN TRIP IN"
|
||||
30 PRINT D"HOURS LESS THAN A TRAIN TRAVELING AT"T"MPH."
|
||||
35 PRINT "HOW LONG DOES THE TRIP TAKE BY CAR";
|
||||
40 INPUT A
|
||||
45 V=D*T/(C-T)
|
||||
50 E=INT(ABS((V-A)*100/A)+.5)
|
||||
55 IF E>5 THEN 70
|
||||
60 PRINT "GOOD! ANSWER WITHIN"E"PERCENT."
|
||||
65 GOTO 80
|
||||
70 PRINT "SORRY. YOU WERE OFF BY"E"PERCENT."
|
||||
80 PRINT "CORRECT ANSWER IS"V"HOURS."
|
||||
90 PRINT
|
||||
95 PRINT "ANOTHER PROBLEM (YES OR NO)";
|
||||
100 INPUT A$\PRINT
|
||||
105 IF A$="YES" THEN 10
|
||||
999 END
|
@ -1,47 +0,0 @@
|
||||
5 RANDOMIZE
|
||||
10 G=6
|
||||
20 N=100
|
||||
30 REM-TRAP
|
||||
40 REM-STEVE ULLMAN, 8-1-72
|
||||
50 PRINT "WANT INSTRUCTIONS (1 FOR YES)";
|
||||
60 INPUT Z
|
||||
70 IF Z<>1 THEN 180
|
||||
80 PRINT "I AM THINKING OF A NUMBER BETWEEN 1 AND";N
|
||||
90 PRINT "TRY TO GUESS MY NUMBER. ON EACH GUESS,"
|
||||
100 PRINT "YOU ARE TO ENTER 2 NUMBERS, TRYING TO TRAP"
|
||||
110 PRINT "MY NUMBER BETWEEN THE TWO NUMBERS. I WILL"
|
||||
120 PRINT "TELL YOU IF YOU HAVE TRAPPED MY NUMBER, IF MY"
|
||||
130 PRINT "NUMBER IS LARGER THAN YOUR TWO NUMBERS, OR IF"
|
||||
140 PRINT "MY NUMBER IS SMALLER THAN YOUR TWO NUMBERS."
|
||||
150 PRINT "IF YOU WANT TO GUESS ONE SINGLE NUMBER, TYPE"
|
||||
160 PRINT "YOUR GUESS FOR BOTH YOUR TRAP NUMBERS."
|
||||
170 PRINT "YOU GET";G;"GUESSES TO GET MY NUMBER."
|
||||
180 X=INT(N*RND(0))+1
|
||||
190 FOR Q=1 TO G
|
||||
200 PRINT
|
||||
210 PRINT "GUESS #";Q;
|
||||
220 INPUT A,B
|
||||
230 IF A<>B THEN 240
|
||||
235 IF X=A THEN 400
|
||||
240 IF A <=B THEB 260
|
||||
250 GOSUB 360
|
||||
260 IF X<A THEN 300
|
||||
270 IF X<=B THEN 320
|
||||
280 PRINT "MY NUMBER IS LARGER THAN YOUR TRAP NUMBERS."
|
||||
290 GOTO 330
|
||||
300 PRINT "MY NUMBER IS SMALLER THAN YOUR TRAP NUMBERS."
|
||||
310 GOTO 330
|
||||
320 PRINT "YOU HAVE TRAPPED MY NUMBER."
|
||||
330 NEXTQ
|
||||
340 PRINT "SORRY, THAT'S";G;"GUESSES. NUMBER WAS";X
|
||||
350 GOTO 410
|
||||
360 R=A
|
||||
370 A=B
|
||||
380 B=R
|
||||
390 RETURN
|
||||
400 PRINT "YOU GOT IT!!!"
|
||||
410 PRINT
|
||||
420 PRINT "TRY AGAIN."
|
||||
430 PRINT
|
||||
440 GOTO 180
|
||||
450 END
|
142
port/WEKDAY.BAS
142
port/WEKDAY.BAS
@ -1,142 +0,0 @@
|
||||
10 PRINT""
|
||||
120PRINT
|
||||
124 LET Y1 = 1970
|
||||
130 PRINT" ENTER TODAY'S DATE IN THIS FORM: MONTH,DAY, YEAR";
|
||||
140 INPUT M1,D1,Y1
|
||||
150 IF Y1>100 THEN 170
|
||||
160 LET Y1 = Y1 + 1900
|
||||
170 DEF FNA(A)=INT(A/4)
|
||||
180 DIM T(12)
|
||||
190 DEF FNB(A)=INT(A/7)
|
||||
210 FOR I= 1 TO 12
|
||||
220 READ T(I)
|
||||
230 NEXT I
|
||||
240 PRINT
|
||||
241PRINT"THIS PROGRAM DEMONSTRATES PDP-11 BASIC AND ALSO GIVES "
|
||||
242PRINT"FACTS ABOUT A DATE OF INTEREST TO YOU"
|
||||
244 PRINT
|
||||
245 PRINT"ENTER DATE OF BIRTH IN THIS FORM: MO,DAY,YEAR";
|
||||
250 INPUT M,D,Y
|
||||
260 PRINT
|
||||
270 IF Y - 75 >0 THEN 280
|
||||
275 LET Y = Y+1900
|
||||
280 LET I1 = INT((Y-1500)/100)
|
||||
290 IF Y-1582<0 THEN 1300
|
||||
300 LET A = I1*5+(I1+3)/4
|
||||
310LET I2 = INT(A-FNB(A)*7)
|
||||
320 LET Y2= INT(Y/100)
|
||||
330 LET Y3 = INT(Y-Y2*100)
|
||||
340 LET A = Y3/4+Y3+D+T(M)+I2
|
||||
350 LET B = INT(A-FNB(A)*7)+1
|
||||
360 IF M>2 THEN 470
|
||||
370 IF Y3= 0 THEN 440
|
||||
380 LET T1 = INT(Y-FNA(Y)*4)
|
||||
390 IF T1<> 0 THEN 470
|
||||
400 IF B<>0 THEN 420
|
||||
410 LET B = 6
|
||||
420 LET B = B-1
|
||||
430 GOTO 470
|
||||
440 LET A = I1-1
|
||||
450 LET T1 = INT(A-FNA(A)*4)
|
||||
460 IF T1 = 0 THEN 400
|
||||
470 IF B <> 0 THEN 490
|
||||
480 LET B = 7
|
||||
490 IF (Y1*12+M1)*31+D1<(Y*12+M)*31+D THEN 550
|
||||
500 IF (Y1*12+M1)*31+D1=(Y*12+M)*31+D THEN 530
|
||||
510 PRINT M;"/";D;"/";Y;" WAS A ";
|
||||
520 GOTO 570
|
||||
530 PRINT M;"/";D;"/";Y;" IS A ";
|
||||
540 GOTO 570
|
||||
550 PRINT M;"/";D;"/";Y;" WILL BE A ";
|
||||
570 IF B<>1 THEN 590
|
||||
580 PRINT "SUNDAY"
|
||||
590 IF B<>2 THEN 610
|
||||
600 PRINT "MONDAY"
|
||||
610 IF B<>3 THEN630
|
||||
620 PRINT "TUESDAY"
|
||||
630 IF B<>4 THEN 650
|
||||
640 PRINT "WEDNESDAY"
|
||||
650 IF B<>5 THEN 670
|
||||
660 PRINT "THURSDAY"
|
||||
670 IF B<>6 THEN 690
|
||||
680 GOTO 1250
|
||||
690 IF B<>7 THEN 710
|
||||
700 PRINT "SATURDAY"
|
||||
710 IF (Y1*12+M1)*31+D1=(Y*12+M)*31+D THEN 1120
|
||||
720 LET I5=Y1-Y
|
||||
730 PRINT
|
||||
740 LET I6=M1-M
|
||||
750 LET I7=D1-D
|
||||
760 IF I7>=0 THEN 790
|
||||
770 LET I6=I6-1
|
||||
780 LET I7=I7+30
|
||||
790 IF I6>=0 THEN 820
|
||||
800 LET I5=I5-1
|
||||
810 LET I6=I6+12
|
||||
820 IF I5<0 THEN 1310
|
||||
830 IF I7<>0 THEN 850
|
||||
835 IF I6<>0 THEN 850
|
||||
840 PRINT "****HAPPY BIRTHDAY*****"
|
||||
850 PRINT " "," ","YEARS","MONTHS","DAYS"
|
||||
860 PRINT "YOUR AGE ",I5,I6,I7
|
||||
870 LET A8= (I5*365)+(I6*30)+I7+INT(I6/2)
|
||||
880 LET K5=I5
|
||||
890 LET K6=I6
|
||||
900 LET K7=I7
|
||||
920 LET E=Y+65
|
||||
940 LET F=.35
|
||||
950 PRINT "YOU HAVE SLEPT ",
|
||||
960 GOSUB 1370
|
||||
970 LET F=.17
|
||||
980 PRINT "YOU HAVE EATEN ",
|
||||
990 GOSUB 1370
|
||||
1000 LET F=.23
|
||||
1010 IF K5 > 3 THEN 1040
|
||||
1020 PRINT"YOU HAVE PLAYED ",
|
||||
1030 GOTO 1080
|
||||
1040 IF K5 > 9 THEN 1070
|
||||
1050 PRINT "YOU HAVE PLAYED/STUDIED",
|
||||
1060 GOTO 1080
|
||||
1070 PRINT "YOU HAVE WORKED/STUDIED",
|
||||
1080 GOSUB 1370
|
||||
1090 PRINT "YOU HAVE RELAXED ",K5,K6,K7
|
||||
1100 PRINT
|
||||
1110 PRINT " ","**YOU MAY RETIRE IN";E;"**"
|
||||
1120 PRINT
|
||||
1130 PRINT" CALCULATED BY THE BEST MINICOMPUTER TODAY - THE PDP-11"
|
||||
1140 FOR Q=1 TO 2
|
||||
1150 PRINT
|
||||
1160 NEXT Q
|
||||
1170 PRINT
|
||||
1240 GOTO 240
|
||||
1250 IF D=13 THEN 1280
|
||||
1260 PRINT "FRIDAY "
|
||||
1270 GOTO 710
|
||||
1280 PRINT "FRIDAY THE THIRTEENTH---BEWARE!"
|
||||
1290 GOTO 710
|
||||
1300 PRINT "NOT PREPARED TO GIVE DAY OF WEEK PRIOR TO MDLXPXII -"
|
||||
1305 PRINT " THE CURRENT CALENDAR DID NOT EXIST BEFORE THAT YEAR."
|
||||
1310 GOTO 1140
|
||||
1330 DATA 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5
|
||||
1370 LET K1= INT(F*A8)
|
||||
1380 LET I5 = INT(K1/365)
|
||||
1390 LET K1 = K1-(I5*365)
|
||||
1400 LET I6 = INT(K1/30)
|
||||
1410 LET I7 = K1-(I6*30)
|
||||
1420 LET K5 = K5-I5
|
||||
1430 LET K6 = K6-I6
|
||||
1440 LET K7 = K7-I7
|
||||
1450 IF K7 >= 0 THEN 1480
|
||||
1460 LET K7 = K7+30
|
||||
1470 LET K6 = K6-1
|
||||
1480 IF K6 > 0 THEN 1510
|
||||
1490 LET K6 = K6+12
|
||||
1500 LET K5 = K5-1
|
||||
1510 PRINT I5,I6,I7
|
||||
1520 RETURN
|
||||
1530 IF K6 = 12 THEN 1550
|
||||
1540 GOTO 1090
|
||||
1550 LET K5 = K5+1
|
||||
1560 LET K6=0
|
||||
1570 GOTO 1090
|
||||
1580 END
|
Loading…
Reference in New Issue
Block a user