mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-18 08:06:27 -05:00
Add BUZZWD, GUNNER, TICTAC and WEKDAY.
This commit is contained in:
parent
a0b5ef2678
commit
9f63035c8e
124
dec/BUZZWD.BAS
Normal file
124
dec/BUZZWD.BAS
Normal file
@ -0,0 +1,124 @@
|
||||
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
|
58
dec/GUNNER.BAS
Normal file
58
dec/GUNNER.BAS
Normal file
@ -0,0 +1,58 @@
|
||||
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
Normal file
225
dec/TICTAC.BAS
Normal file
@ -0,0 +1,225 @@
|
||||
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
|
142
dec/WEKDAY.BAS
Normal file
142
dec/WEKDAY.BAS
Normal file
@ -0,0 +1,142 @@
|
||||
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
|
124
port/BUZZWD.BAS
Normal file
124
port/BUZZWD.BAS
Normal file
@ -0,0 +1,124 @@
|
||||
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
|
58
port/GUNNER.BAS
Normal file
58
port/GUNNER.BAS
Normal file
@ -0,0 +1,58 @@
|
||||
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
Normal file
225
port/TICTAC.BAS
Normal file
@ -0,0 +1,225 @@
|
||||
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
|
142
port/WEKDAY.BAS
Normal file
142
port/WEKDAY.BAS
Normal file
@ -0,0 +1,142 @@
|
||||
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