1
0
mirror of https://github.com/rfivet/BCG101.git synced 2024-12-17 23:56:24 -05:00

Compare commits

...

2 Commits

18 changed files with 891 additions and 0 deletions

53
dec/BOUNCE.BAS Normal file
View File

@ -0,0 +1,53 @@
90 DIM T(20)
100 PRINT "THIS SIMULATION LETS YOU SPECIFY THE INITIAL VELOCITY"
110 PRINT "OF A BALL THROWN STRAIGHT UP, AND THE COEFFICIENT OF"
120 PRINT "ELASTICITY OF THE BALL. PLEASE USE A DECIMAL FRACTION"
130 PRINT "COEFFICIENT (LESS THAN 1)."
131 PRINT
132 PRINT "YOU ALSO SPECIFY THE TIME INCREMENT TO BE USED IN"
133 PRINT "'STROBING' THE BALL'S FLIGHT (TRY .1 INITIALLY)."
134 PRINT
135 PRINT "TIME INCREMENT (SEC)";
136 INPUT S2
140 PRINT
150 PRINT "VELOCITY (FPS)";
160 INPUT V
165 PRINT
170 PRINT "COEFFICIENT";
180 INPUT C
184 PRINT
185 PRINT "FEET"
186 PRINT
187 S1=INT(70/(V/(16*S2)))
190 FOR I=1 TO S1
200 T(I)=V*C^(I-1)/16
210 NEXT I
220 FOR H=INT(-16*(V/32)^2+V^2/32+.5) TO 0 STEP -.5
221 IF INT(H)<>H THEN 225
222 PRINT H;
225 L=0
230 FOR I=1 TO S1
240 FOR T=0 TO T(I) STEP S2
245 L=L+S2
250 IF ABS(H-(.5*(-32)*T^2+V*C^(I-1)*T))>.25 THEN 270
260 PRINT TAB(L/S2);"O";
270 NEXT T
275 T=T(I+1)/2
276 IF -16*T^2+V*C^(I-1)*T<H THEN 290
280 NEXT I
290 PRINT
300 NEXT H
310 PRINT TAB(1);
320 FOR I=1 TO INT(L+1)/S2+1
330 PRINT ".";
340 NEXT I
350 PRINT
355 PRINT " 0";
360 FOR I=1 TO INT(L+.9995)
380 PRINT TAB(INT(I/S2));I;
390 NEXT I
400 PRINT
410 PRINT TAB(INT(L+1)/(2*S2)-2);"SECONDS"
420 PRINT
430 GOTO 135
440 END

55
dec/CALNDR.BAS Normal file
View File

@ -0,0 +1,55 @@
100 REM VALUES FOR 1973; SEE NOTES
110 '
120 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I
130 D=-1 '1973 STARTS ON MON. [0=SUN.,-1=MON.,-2=TUE...]
140 S=0
150 REM: READ DAYS OF EACH MONTH
160 FOR N=0 TO 12 \ READ M(N) \ NEXT N
170 ''''''''
180 FOR N=1 TO 12
190 PRINT \ PRINT \ S=S+M(N-1)
200 PRINT "**";S;TAB(7);
210 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I
220 ON N GOTO 230,240,250,260,270,280,290,300,310,320,330,340
230 PRINT " JANUARY "; \GOTO 350
240 PRINT " FEBRUARY"; \GOTO 350
250 PRINT " MARCH "; \GOTO 350
260 PRINT " APRIL "; \GOTO 350
270 PRINT " MAY "; \GOTO 350
280 PRINT " JUNE "; \GOTO 350
290 PRINT " JULY "; \GOTO 350
300 PRINT " AUGUST "; \GOTO 350
310 PRINT "SEPTEMBER"; \GOTO 350
320 PRINT " OCTOBER "; \GOTO 350
330 PRINT " NOVEMBER"; \GOTO 350
340 PRINT " DECEMBER";
350 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I
360 PRINT 365-S;"**";
370 ' [366-S; ON LEAP YEARS]
380 PRINT CHR$(10) \ PRINT " S M T W";
390 PRINT " T F S
400 PRINT
410 FOR I=1 TO 59 \ PRINT "*"; \ NEXT I
420 ''''
430 FOR W=1 TO 6
440 PRINT CHR$(10)
450 PRINT TAB(4);
460 ''
470 FOR G=1 TO 7
480 D=D+1
490 D2=D-S
500 IF D2>M(N) THEN 580
510 IF D2>0 THEN PRINT D2;
520 PRINT TAB(4+8*G);
530 NEXT G
540 ''
550 IF D2=M(N) THEN 590
560 NEXT W
570 ''''
580 D=D-G
590 NEXT N
600 ''''''''
610 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I
620 DATA 0,31,28,31,30,31,30,31,31,30,31,30,31
630 ' [0,31,29, ..., ON LEAP YEARS]
640 END

26
dec/CHANGE.BAS Normal file
View File

@ -0,0 +1,26 @@
2 PRINT "I, YOUR FRIENDLY EDUSYSTEM COMPUTER, WILL DETERMINE"
3 PRINT "THE CORRECT CHANGE FOR ITEMS COSTING UP TO $100."
4 PRINT\PRINT
10 PRINT "COST OF ITEM";\INPUT A\PRINT "AMOUNT OF PAYMENT";\INPUT P
20 C=P-A\M=C\IF C<>0 THEN 90 \PRINT "CORRECT AMOUNT,THANK YOU"
30 GO TO 10
90 IF C>0 THEN 120 \PRINT "SORRY,YOU HAVE SHORT CHANGED ME $";A-P
100 GO TO 10
120 PRINT "YOUR CHANGE,$";C\D=INT(C/10)\IF D=0 THEN 155
150 PRINT D;"TEN DOLLAR BILL(S)"
155 C=M-(D*10)\E=INT(C/5)\IF E=0 THEN 185
180 PRINT E;"FIVE DOLLARS BILL(S)"
185 C=M-(D*10+E*5)\F=INT(C)\IF F=0 THEN 215
210 PRINT F;"ONE DOLLAR BILL(S)"
215 C=M-(D*10+E*5+F)\C=C*100\N=C\G=INT(C/50)\IF G=0 THEN 255
250 PRINT G;"ONE-HALF DOLLAR(S)"
255 C=N-(G*50)\H=INT(C/25)\IF H=0 THEN 285
280 PRINT H;"QUARTER(S)"
285 C=N-(G*50+H*25)\I=INT(C/10)\IF I=0 THEN 315
310 PRINT I;"DIME(S)"
315 C=N-(G*50+H*25+I*10)\J=INT(C/5)\IF J=0 THEN 345
340 PRINT J;"NICKEL(S)"
345 C=N-(G*50+H*25+I*10+J*5)\K=INT(C+.5)\IF K=0 THEN 380
370 PRINT K;"PENNY(S)"
380 PRINT "THANK YOU,COME AGAIN"\PRINT \PRINT \GO TO 10
999 END

49
dec/CHIEF.BAS Normal file
View File

@ -0,0 +1,49 @@
10 PRINT " I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD."
20 PRINT "ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR";
30 INPUT A$
40 IF A$="YES" THEN 60
50 PRINT "SHUT UP, PALEFACE WITH WISE TOUNGE."
60 PRINT " TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND"
70 PRINT "MULTIPLY BY 8. DIVIDE BY 5 AND ADD THE SAME. SUBTRACT 1."
80 PRINT "WHAT DO YOU HAVE";
85 PRINT
90 INPUT B
100 LET C = (B+1-5)*5/8*5-3
110 PRINT "I BET YOUR NUMBER WAS " C" WAS I RIGHT";
120 INPUT D$
130 IF D$="YES" THEN 510
140 PRINT "WHAT WAS YOUR ORIGINAL NUMBER";
150 INPUT K
155 LET F=K+3
160 LET G=F/5
170 LET H=G*8
180 LET I=H/5+5
190 LET J=I-1
200 PRINT "SO YOU THINK YOU'RE SO SMART, EH?"
210 PRINT "NOW WATCH...."
230 PRINT K"PLUS 3 EQUALS "F". THIS DIVIDED BY 5 EQUALS"G","
240 PRINT "THIS TIMES 8 EQUALS"H". IF WE DIVIDE BY 5 AND ADD THE SAME,"
250 PRINT "WE GET"I". MINUS 1 EQUALS"J"."
260 PRINT "NOW DO YOU BELIEVE ME";
270 INPUT Z$
290 IF Z$="YES" THEN 510
295 PRINT "YOU HAVE MADE ME MAD!!!"
300 PRINT "THERE MUST NOW BE A GREAT LIGHTNING BOLT!"
310 PRINT\PRINT
330 FOR X=30 TO 22 STEP -1
340 PRINT TAB(X) "X X"
350 NEXT X
360 PRINT TAB(21)"X XXX"
370 PRINT TAB(20) "X X"
380 PRINT TAB(19) "XX X"
390 FOR Y=20 TO 13 STEP -1
400 PRINT TAB(Y) "X X"
410 NEXT Y
420 PRINT TAB(12) "XX"
430 PRINT TAB(11) "X"
440 PRINT TAB(10) "*"
450 PRINT\PRINT "##################################"\PRINT
470 PRINT "I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!"
480 GOTO 520
510 PRINT "BYE!!!"
520 END

48
dec/HURKLE.BAS Normal file
View File

@ -0,0 +1,48 @@
90 REM *** CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL
100 REM HURKLE - PEOPLE'S COMPUTER COMPANY, MEMLO PARK CA
105 RANDOM
110 N=5
120 G=10
210 PRINT
220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE"
230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A"
240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO"
250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES."
260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE"
270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE."
280 PRINT
285 A=INT(G*RND(0))
286 B=INT(G*RND(0))
310 FOR K=1 TO N
320 PRINT "GUESS #";K;
330 INPUT X,Y
340 IF ABS(X-A)+ABS(Y-B)=0 THEN 500
350 REM PRINT INFO
360 GOSUB 610
370 PRINT
380 NEXT K
410 PRINT
420 PRINT "SORRY, THAT'S";N;"GUESSES."
430 PRINT "THE HURKLE IS AT ";A;",";B
440 PRINT
450 PRINT "LET'S PLAY AGAIN, HURKLE IS HIDING."
460 PRINT
470 GOTO 285
500 REM
510 PRINT
520 PRINT "YOU FOUND HIM IN";K;"GUESSES!"
540 GOTO 440
610 PRINT "GO ";
620 IF Y=B THEN 670
630 IF Y<B THEN 660
640 PRINT "SOUTH";
650 GOTO 670
660 PRINT "NORTH";
670 IF X=A THEN 720
680 IF X<A THEN 710
690 PRINT "WEST";
700 GOTO 720
710 PRINT "EAST";
720 PRINT
730 RETURN
999 END

68
dec/MATHDI.BAS Normal file
View File

@ -0,0 +1,68 @@
10 REM-MATHDICE*** (BASIC PROGRAM BEGINS AT LINE 100) WAS PROGRAMMED
11 REM-BY JIM GERRISH, FOURTH GRADE TEACHER AT THE BERNICE A. RAY
12 REM-SCHOOL, HANOVER, NEW HAMPSHIRE. LAST CHANGE: 3/21/72.
13 REM
14 REM-PROGRAM PERFORMS PICTORAL DRILL ON ADDITION FACTS USING
15 REM-PRINTED DICE, NO READING INVOLVED. GOOD FOR BEGINNING
16 REM-ADDITION, SINCE ANSWER CAN BE DERRIVED FROM COUNTING SPOTS
17 REM-DICE AS WELL AS BY MEMORIZING MATH FACTS OR AWARENESS
18 REM-OF NUMBER CONCEPTS.
19 REM-
20 PRINT"THIS PROGRAM GENERATES SUCCESSIVE PICTURES OF TWO DICE."
21 PRINT"WHEN TWO DICE AND AN EQUAL SIGN FOLLOWED BY A QUESTION"
22 PRINT"MARK HAVE BEEN PRINTED, TYPE YOUR ANSWER AND THE RETURN KEY."
23 PRINT"TO CONCLUDE THE LESSON, TYPE CTRL/C AS YOUR ANSWER."
24 PRINT
25 PRINT
100 RANDOMIZE
105 LET N=N+1
110 LET D=INT(RND(0)*6+1)
120 PRINT ".-----."
130 IF D=1 THEN 200
140 IF D=2 THEN 180
150 IF D=3 THEN 180
160 PRINT "I * * I"
170 GOTO 210
180 PRINT "I * I"
190 GOTO 210
200 PRINT "I I"
210 IF D=2 THEN 260
220 IF D=4 THEN 260
230 IF D=6 THEN 270
240 PRINT "I * I"
250 GOTO 280
260 PRINT "I I"
265 GOTO 280
270 PRINT "I * * I"
280 IF D=1 THEN 350
290 IF D=2 THEN 330
300 IF D=3 THEN 330
310 PRINT "I * * I"
320 GOTO 360
330 PRINT "I * I"
340 GOTO 360
350 PRINT "I I"
360 PRINT ".-----."
370 PRINT
375 IF N=2 THEN 500
380 PRINT " +"
381 PRINT
400 LET A=D
410 GOTO 100
500 LET T=D+A
510 PRINT " = ";
520 INPUT T1
530 IF T1=T THEN 590
540 PRINT "NO, COUNT THE SPOTS AND GIVE ANOTHER ANSWER."
541 PRINT " = ";
550 INPUT T2
560 IF T2=T THEN 590
570 PRINT "NO, THE ANSWER IS ";T
580 GOTO 600
590 PRINT "RIGHT!"
600 PRINT
601 PRINT "THE DICE ROLL AGAIN....."
610 PRINT
615 LET N=0
620 GOTO 100
900 END

56
dec/MUGWMP.BAS Normal file
View File

@ -0,0 +1,56 @@
1 REM COURTESY OF PEOPLE'S COMPUTER COMPANY
2 REM MUGWMP
3 REM *** CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL
5 RANDOMIZE
10 DIM P(4,2)
20 PRINT "THE OBJECT OF THIS GAME IS TO FIND FOUR MUGWUMPS"
30 PRINT "HIDDEN ON A 10 BY 10 GRID. HOMEBASE IS POSITION 0,0"
40 PRINT "ANY GUESS YOU MAKE MUST BE TWO NUMBERS WITH EACH"
50 PRINT "NUMBER BETWEEN 0 AND 9, INCLUSIVE. FIRST NUMBER"
60 PRINT "IS DISTANCE TO RIGHT OF HOMEBASE AND SECOND NUMBER"
70 PRINT "IS DISTANCE ABOVE HOMEBASE."
80 PRINT
90 PRINT "YOU GET 10 TRIES. AFTER EACH TRY, I WILL TELL"
100 PRINT "YOU HOW FAR YOU ARE FROM EACH MUGWUMP."
110 PRINT
240 GOSUB 1000
250 T=0
260 T=T+1
270 PRINT
275 PRINT
290 PRINT "TURN NO."T;"-- WHAT IS YOUR GUESS";
300 INPUT M,N
310 FOR I=1 TO 4
320 IF P(I,1)=-1 THEN 400
330 IF P(I,1)<>M THEN 380
340 IF P(I,2)<>N THEN 380
350 P(I,1)=-1
360 PRINT "YOU HAVE FOUND MUGWUMP";I
370 GOTO 400
380 D=SQR((P(I,1)-M)^2+(P(I,2)-N)^2)
390 PRINT "YOU ARE"INT(D*10)/10"UNITS FROM MUGWUMP"I
400 NEXT I
410 FOR J=1 TO 4
420 IF P(J,1)<>-1 THEN 470
430 NEXT J
440 PRINT
450 PRINT "YOU GOT THEM ALL IN";T;"TURNS!"
460 GOTO 580
470 IF T<10 THEN 260
480 PRINT
490 PRINT "SORRY, THAT'S 10 TRIES. HERE IS WHERE THEY'RE HIDING"
540 FOR I=1 TO 4
550 IF P(I,1)=-1 THEN 570
560 PRINT "MUGWUMP";I;"IS AT (";P(I,1);",";P(I,2);")"
570 NEXT I
580 PRINT
600 PRINT "THAT WAS FUN! LET'S PLAY AGAIN......"
610 PRINT "FOUR MORE MUGWUMPS ARE NOW IN HIDING."
630 GOTO 240
1000 FOR J=1 TO 2
1010 FOR I=1 TO 4
1020 P(I,J)=INT(10*RND(0))
1030 NEXT I
1040 NEXT J
1050 RETURN
1099 END

34
dec/POET.BAS Normal file
View File

@ -0,0 +1,34 @@
90 RANDOMIZE
100 IF I<>1 THEN 101 ELSE PRINT "MIDNIGHT DREARY";
101 IF I<>2 THEN 102 ELSE PRINT "FIREY EYES";
102 IF I<>3 THEN 103 ELSE PRINT "BIRD OR FIEND";
103 IF I<>4 THEN 104 ELSE PRINT "THING OF EVIL";
104 IF I<>5 THEN 210 ELSE PRINT "PROPHET";
105 GOTO 210
110 IF I<>1 THEN 111 ELSE PRINT "BEGUILING ME";
111 IF I<>2 THEN 112 ELSE PRINT "THRILLED ME";
112 IF I<>3 THEN 113 ELSE PRINT "STILL SITTING..."\GOTO 212
113 IF I<>4 THEN 114 ELSE PRINT "BURNED. "\GOTO 212
114 IF I<>5 THEN 210 ELSE PRINT "NEVER FLITTING";
115 GOTO 210
120 IF I<>1 THEN 121 ELSE IF U=0 THEN 210 ELSE PRINT "SIGN OF PARTING";
121 IF I<>2 THEN 122 ELSE PRINT "AND MY SOUL";
122 IF I<>3 THEN 123 ELSE PRINT "DARKNESS THERE";
123 IF I<>4 THEN 124 ELSE PRINT "SHALL BE LIFTED";
124 IF I<>5 THEN 210 ELSE PRINT "QUOTH THE RAVEN";
125 GOTO 210
130 IF I<>1 THEN 131 ELSE PRINT "NOTHING MORE";
131 IF I<>2 THEN 132 ELSE PRINT "YET AGAIN";
132 IF I<>3 THEN 133 ELSE PRINT "SLOWLY CREEPING";
133 IF I<>4 THEN 134 ELSE PRINT "...NEVERMORE";
134 IF I<>5 THEN 210 ELSE PRINT "EVERMORE.";
210 IF U=0 THEN 212 ELSE IF RND>.19 THEN 212 ELSE PRINT ",";\U=2
212 IF RND>.65 THEN 214 ELSE PRINT " ";\U=U+1\GOTO 215
214 PRINT\U=0
215 I=INT(5*RND+1)
220 J=J+1\K=K+1
230 IF U>0 THEN 240 ELSE IF INT(J/2)<>J/2 THEN 240 ELSE PRINT " ";
240 ON J GOTO 100,110,120,130,250
250 J=0\PRINT\IF K>20 THEN 270 ELSE GOTO 215
270 PRINT\U=0\K=0\GOTO 110
999 END

56
dec/STARS.BAS Normal file
View File

@ -0,0 +1,56 @@
100 REM *** STARS - PEOPLE'S COMPUTER CENTER, MENLO PARK, CA
110 PRINT "STARS - A NUMBER GUESSING GAME"
120 PRINT
130 RANDOMIZE
140 REM *** A IS LIMIT ON NUMBER, M IS NUMBER OF GUESSES
150 LET A=100
160 LET M=7
170 PRINTT "DO YOU WANT INSTRUCTIONS (1=YES 0=NO)";
180 INPUT Z
190 IF Z=0 THEN 280
200 REM *** INSTRUCTIONS ON HOW TO PLAY
210 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO";A
220 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I"
230 PRINT "WILL TYPE ONE OR MORE STARS (*). THE MORE"
240 PRINT "STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER."
250 PRINT "ONE STAR (*) MEANS FAR AWAY. SEVEN STARS (*******)"
260 PRINT "MEANS REALLY CLOSE! YOU GET";M;"GUESSES."
270 REM *** COMPUTER 'THINKS' OF A NUMBER
280 PRINT
290 PRINT
300 LET X=INT(A*RND(0)+1)
310 PRINT "OK, I AM THINKING OF A NUMBER. START GUESSING."
320 REM *** GUESSING BEGINS. HUMAN GETS M GUESSES
330 FOR K=1 TO M
340 PRINT
350 PRINT "YOUR GUESS";
360 INPUT G
370 IF G=X THEN 600
380 LET D=ABS(X-G)
390 IF D >= 64 THEN 510
400 IF D >= 32 THEN 500
410 IF D >= 16 THEN 490
420 IF D >= 8 THEN 480
430 IF D >= 4 THEN 470
440 IF D >= 2 THEN 460
450 PRINT "*";
460 PRINT "*";
470 PRINT "*";
480 PRINT "*";
490 PRINT "*";
500 PRINT "*";
510 PRINT "*";
520 PRINT
530 NEXT K
540 REM *** DID NOT GUESS NUMBER IN M GUESSES
550 PRINT
560 PRINT "SORRY, THAT'S";M;"GUESSES. THE NUMBER WAS";X
580 GOTO 280
590 REM *** WE HAVE A WINNER
600 FOR N=1 TO 50
610 PRINT "*";
620 NEXT N
630 PRINT "!!!"
640 PRINT "YOU GOT IT IN";K;"GUESSES!! LET'S PLAY AGAIN..."
650 GOTO 280
660 END

53
port/BOUNCE.BAS Normal file
View File

@ -0,0 +1,53 @@
90 DIM T(20)
100 PRINT "THIS SIMULATION LETS YOU SPECIFY THE INITIAL VELOCITY"
110 PRINT "OF A BALL THROWN STRAIGHT UP, AND THE COEFFICIENT OF"
120 PRINT "ELASTICITY OF THE BALL. PLEASE USE A DECIMAL FRACTION"
130 PRINT "COEFFICIENT (LESS THAN 1)."
131 PRINT
132 PRINT "YOU ALSO SPECIFY THE TIME INCREMENT TO BE USED IN"
133 PRINT "'STROBING' THE BALL'S FLIGHT (TRY .1 INITIALLY)."
134 PRINT
135 PRINT "TIME INCREMENT (SEC)";
136 INPUT S2
140 PRINT
150 PRINT "VELOCITY (FPS)";
160 INPUT V
165 PRINT
170 PRINT "COEFFICIENT";
180 INPUT C
184 PRINT
185 PRINT "FEET"
186 PRINT
187 S1=INT(70/(V/(16*S2)))
190 FOR I=1 TO S1
200 T(I)=V*C^(I-1)/16
210 NEXT I
220 FOR H=INT(-16*(V/32)^2+V^2/32+.5) TO 0 STEP -.5
221 IF INT(H)<>H THEN 225
222 PRINT H;
225 L=0
230 FOR I=1 TO S1
240 FOR T=0 TO T(I) STEP S2
245 L=L+S2
250 IF ABS(H-(.5*(-32)*T^2+V*C^(I-1)*T))>.25 THEN 270
260 PRINT TAB(L/S2);"O";
270 NEXT T
275 T=T(I+1)/2
276 IF -16*T^2+V*C^(I-1)*T<H THEN 290
280 NEXT I
290 PRINT
300 NEXT H
310 PRINT TAB(1);
320 FOR I=1 TO INT(L+1)/S2+1
330 PRINT ".";
340 NEXT I
350 PRINT
355 PRINT " 0";
360 FOR I=1 TO INT(L+.9995)
380 PRINT TAB(INT(I/S2));I;
390 NEXT I
400 PRINT
410 PRINT TAB(INT(L+1)/(2*S2)-2);"SECONDS"
420 PRINT
430 GOTO 135
440 END

56
port/CALNDR.BAS Normal file
View File

@ -0,0 +1,56 @@
100 REM VALUES FOR 1973; SEE NOTES
110 '
120 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I
130 D=-1 '1973 STARTS ON MON. [0=SUN.,-1=MON.,-2=TUE...]
140 S=0
150 REM: READ DAYS OF EACH MONTH
155 DIM M(12)
160 FOR N=0 TO 12 \ READ M(N) \ NEXT N
170 ''''''''
180 FOR N=1 TO 12
190 PRINT \ PRINT \ S=S+M(N-1)
200 PRINT "**";S;TAB(7);
210 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I
220 ON N GOTO 230,240,250,260,270,280,290,300,310,320,330,340
230 PRINT " JANUARY "; \GOTO 350
240 PRINT " FEBRUARY"; \GOTO 350
250 PRINT " MARCH "; \GOTO 350
260 PRINT " APRIL "; \GOTO 350
270 PRINT " MAY "; \GOTO 350
280 PRINT " JUNE "; \GOTO 350
290 PRINT " JULY "; \GOTO 350
300 PRINT " AUGUST "; \GOTO 350
310 PRINT "SEPTEMBER"; \GOTO 350
320 PRINT " OCTOBER "; \GOTO 350
330 PRINT " NOVEMBER"; \GOTO 350
340 PRINT " DECEMBER";
350 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I
360 PRINT 365-S;"**";
370 ' [366-S; ON LEAP YEARS]
380 PRINT CHR$(10) \ PRINT " S M T W";
390 PRINT " T F S"
400 PRINT
410 FOR I=1 TO 59 \ PRINT "*"; \ NEXT I
420 ''''
430 FOR W=1 TO 6
440 PRINT CHR$(10)
450 PRINT TAB(4);
460 ''
470 FOR G=1 TO 7
480 D=D+1
490 D2=D-S
500 IF D2>M(N) THEN 580
510 IF D2<=0 THEN 520 \ PRINT D2;
520 PRINT TAB(4+8*G);
530 NEXT G
540 ''
550 IF D2=M(N) THEN 590
560 NEXT W
570 ''''
580 D=D-G
590 NEXT N
600 ''''''''
610 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I
620 DATA 0,31,28,31,30,31,30,31,31,30,31,30,31
630 ' [0,31,29, ..., ON LEAP YEARS]
640 END

26
port/CHANGE.BAS Normal file
View File

@ -0,0 +1,26 @@
2 PRINT "I, YOUR FRIENDLY EDUSYSTEM COMPUTER, WILL DETERMINE"
3 PRINT "THE CORRECT CHANGE FOR ITEMS COSTING UP TO $100."
4 PRINT\PRINT
10 PRINT "COST OF ITEM";\INPUT A\PRINT "AMOUNT OF PAYMENT";\INPUT P
20 C=P-A\M=C\IF C<>0 THEN 90 \PRINT "CORRECT AMOUNT,THANK YOU"
30 GO TO 10
90 IF C>0 THEN 120 \PRINT "SORRY,YOU HAVE SHORT CHANGED ME $";A-P
100 GO TO 10
120 PRINT "YOUR CHANGE,$";C\D=INT(C/10)\IF D=0 THEN 155
150 PRINT D;"TEN DOLLAR BILL(S)"
155 C=M-(D*10)\E=INT(C/5)\IF E=0 THEN 185
180 PRINT E;"FIVE DOLLARS BILL(S)"
185 C=M-(D*10+E*5)\F=INT(C)\IF F=0 THEN 215
210 PRINT F;"ONE DOLLAR BILL(S)"
215 C=M-(D*10+E*5+F)\C=C*100\N=C\G=INT(C/50)\IF G=0 THEN 255
250 PRINT G;"ONE-HALF DOLLAR(S)"
255 C=N-(G*50)\H=INT(C/25)\IF H=0 THEN 285
280 PRINT H;"QUARTER(S)"
285 C=N-(G*50+H*25)\I=INT(C/10)\IF I=0 THEN 315
310 PRINT I;"DIME(S)"
315 C=N-(G*50+H*25+I*10)\J=INT(C/5)\IF J=0 THEN 345
340 PRINT J;"NICKEL(S)"
345 C=N-(G*50+H*25+I*10+J*5)\K=INT(C+.5)\IF K=0 THEN 380
370 PRINT K;"PENNY(S)"
380 PRINT "THANK YOU,COME AGAIN"\PRINT \PRINT \GO TO 10
999 END

49
port/CHIEF.BAS Normal file
View File

@ -0,0 +1,49 @@
10 PRINT " I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD."
20 PRINT "ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR";
30 INPUT A$
40 IF A$="YES" THEN 60
50 PRINT "SHUT UP, PALEFACE WITH WISE TONGUE."
60 PRINT " TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND"
70 PRINT "MULTIPLY BY 8. DIVIDE BY 5 AND ADD THE SAME. SUBTRACT 1."
80 PRINT "WHAT DO YOU HAVE";
85 PRINT
90 INPUT B
100 LET C = (B+1-5)*5/8*5-3
110 PRINT "I BET YOUR NUMBER WAS " C" WAS I RIGHT";
120 INPUT D$
130 IF D$="YES" THEN 510
140 PRINT "WHAT WAS YOUR ORIGINAL NUMBER";
150 INPUT K
155 LET F=K+3
160 LET G=F/5
170 LET H=G*8
180 LET I=H/5+5
190 LET J=I-1
200 PRINT "SO YOU THINK YOU'RE SO SMART, EH?"
210 PRINT "NOW WATCH...."
230 PRINT K"PLUS 3 EQUALS "F". THIS DIVIDED BY 5 EQUALS"G","
240 PRINT "THIS TIMES 8 EQUALS"H". IF WE DIVIDE BY 5 AND ADD THE SAME,"
250 PRINT "WE GET"I". MINUS 1 EQUALS"J"."
260 PRINT "NOW DO YOU BELIEVE ME";
270 INPUT Z$
290 IF Z$="YES" THEN 510
295 PRINT "YOU HAVE MADE ME MAD!!!"
300 PRINT "THERE MUST NOW BE A GREAT LIGHTNING BOLT!"
310 PRINT\PRINT
330 FOR X=30 TO 22 STEP -1
340 PRINT TAB(X) "X X"
350 NEXT X
360 PRINT TAB(21)"X XXX"
370 PRINT TAB(20) "X X"
380 PRINT TAB(19) "XX X"
390 FOR Y=20 TO 13 STEP -1
400 PRINT TAB(Y) "X X"
410 NEXT Y
420 PRINT TAB(12) "XX"
430 PRINT TAB(11) "X"
440 PRINT TAB(10) "*"
450 PRINT\PRINT "##################################"\PRINT
470 PRINT "I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!"
480 GOTO 520
510 PRINT "BYE!!!"
520 END

48
port/HURKLE.BAS Normal file
View File

@ -0,0 +1,48 @@
90 REM *** CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL
100 REM HURKLE - PEOPLE'S COMPUTER COMPANY, MEMLO PARK CA
105 RANDOM
110 N=5
120 G=10
210 PRINT
220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE"
230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A"
240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO"
250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES."
260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE"
270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE."
280 PRINT
285 A=INT(G*RND(0))
286 B=INT(G*RND(0))
310 FOR K=1 TO N
320 PRINT "GUESS #";K;
330 INPUT X,Y
340 IF ABS(X-A)+ABS(Y-B)=0 THEN 500
350 REM PRINT INFO
360 GOSUB 610
370 PRINT
380 NEXT K
410 PRINT
420 PRINT "SORRY, THAT'S";N;"GUESSES."
430 PRINT "THE HURKLE IS AT ";A;",";B
440 PRINT
450 PRINT "LET'S PLAY AGAIN, HURKLE IS HIDING."
460 PRINT
470 GOTO 285
500 REM
510 PRINT
520 PRINT "YOU FOUND HIM IN";K;"GUESSES!"
540 GOTO 440
610 PRINT "GO ";
620 IF Y=B THEN 670
630 IF Y<B THEN 660
640 PRINT "SOUTH";
650 GOTO 670
660 PRINT "NORTH";
670 IF X=A THEN 720
680 IF X<A THEN 710
690 PRINT "WEST";
700 GOTO 720
710 PRINT "EAST";
720 PRINT
730 RETURN
999 END

68
port/MATHDI.BAS Normal file
View File

@ -0,0 +1,68 @@
10 REM-MATHDICE*** (BASIC PROGRAM BEGINS AT LINE 100) WAS PROGRAMMED
11 REM-BY JIM GERRISH, FOURTH GRADE TEACHER AT THE BERNICE A. RAY
12 REM-SCHOOL, HANOVER, NEW HAMPSHIRE. LAST CHANGE: 3/21/72.
13 REM
14 REM-PROGRAM PERFORMS PICTORIAL DRILL ON ADDITION FACTS USING
15 REM-PRINTED DICE, NO READING INVOLVED. GOOD FOR BEGINNING
16 REM-ADDITION, SINCE ANSWER CAN BE DERIVED FROM COUNTING SPOTS
17 REM-DICE AS WELL AS BY MEMORIZING MATH FACTS OR AWARENESS
18 REM-OF NUMBER CONCEPTS.
19 REM-
20 PRINT"THIS PROGRAM GENERATES SUCCESSIVE PICTURES OF TWO DICE."
21 PRINT"WHEN TWO DICE AND AN EQUAL SIGN FOLLOWED BY A QUESTION"
22 PRINT"MARK HAVE BEEN PRINTED, TYPE YOUR ANSWER AND THE RETURN KEY."
23 PRINT"TO CONCLUDE THE LESSON, TYPE CTRL/C AS YOUR ANSWER."
24 PRINT
25 PRINT
100 RANDOMIZE
105 LET N=N+1
110 LET D=INT(RND(0)*6+1)
120 PRINT ".-----."
130 IF D=1 THEN 200
140 IF D=2 THEN 180
150 IF D=3 THEN 180
160 PRINT "I * * I"
170 GOTO 210
180 PRINT "I * I"
190 GOTO 210
200 PRINT "I I"
210 IF D=2 THEN 260
220 IF D=4 THEN 260
230 IF D=6 THEN 270
240 PRINT "I * I"
250 GOTO 280
260 PRINT "I I"
265 GOTO 280
270 PRINT "I * * I"
280 IF D=1 THEN 350
290 IF D=2 THEN 330
300 IF D=3 THEN 330
310 PRINT "I * * I"
320 GOTO 360
330 PRINT "I * I"
340 GOTO 360
350 PRINT "I I"
360 PRINT ".-----."
370 PRINT
375 IF N=2 THEN 500
380 PRINT " +"
381 PRINT
400 LET A=D
410 GOTO 100
500 LET T=D+A
510 PRINT " = ";
520 INPUT T1
530 IF T1=T THEN 590
540 PRINT "NO, COUNT THE SPOTS AND GIVE ANOTHER ANSWER."
541 PRINT " = ";
550 INPUT T2
560 IF T2=T THEN 590
570 PRINT "NO, THE ANSWER IS ";T
580 GOTO 600
590 PRINT "RIGHT!"
600 PRINT
601 PRINT "THE DICE ROLL AGAIN....."
610 PRINT
615 LET N=0
620 GOTO 100
900 END

56
port/MUGWMP.BAS Normal file
View File

@ -0,0 +1,56 @@
1 REM COURTESY OF PEOPLE'S COMPUTER COMPANY
2 REM MUGWMP
3 REM *** CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL
5 RANDOMIZE
10 DIM P(4,2)
20 PRINT "THE OBJECT OF THIS GAME IS TO FIND FOUR MUGWUMPS"
30 PRINT "HIDDEN ON A 10 BY 10 GRID. HOMEBASE IS POSITION 0,0"
40 PRINT "ANY GUESS YOU MAKE MUST BE TWO NUMBERS WITH EACH"
50 PRINT "NUMBER BETWEEN 0 AND 9, INCLUSIVE. FIRST NUMBER"
60 PRINT "IS DISTANCE TO RIGHT OF HOMEBASE AND SECOND NUMBER"
70 PRINT "IS DISTANCE ABOVE HOMEBASE."
80 PRINT
90 PRINT "YOU GET 10 TRIES. AFTER EACH TRY, I WILL TELL"
100 PRINT "YOU HOW FAR YOU ARE FROM EACH MUGWUMP."
110 PRINT
240 GOSUB 1000
250 T=0
260 T=T+1
270 PRINT
275 PRINT
290 PRINT "TURN NO."T;"-- WHAT IS YOUR GUESS";
300 INPUT M,N
310 FOR I=1 TO 4
320 IF P(I,1)=-1 THEN 400
330 IF P(I,1)<>M THEN 380
340 IF P(I,2)<>N THEN 380
350 P(I,1)=-1
360 PRINT "YOU HAVE FOUND MUGWUMP";I
370 GOTO 400
380 D=SQR((P(I,1)-M)^2+(P(I,2)-N)^2)
390 PRINT "YOU ARE"INT(D*10)/10"UNITS FROM MUGWUMP"I
400 NEXT I
410 FOR J=1 TO 4
420 IF P(J,1)<>-1 THEN 470
430 NEXT J
440 PRINT
450 PRINT "YOU GOT THEM ALL IN";T;"TURNS!"
460 GOTO 580
470 IF T<10 THEN 260
480 PRINT
490 PRINT "SORRY, THAT'S 10 TRIES. HERE IS WHERE THEY'RE HIDING"
540 FOR I=1 TO 4
550 IF P(I,1)=-1 THEN 570
560 PRINT "MUGWUMP";I;"IS AT (";P(I,1);",";P(I,2);")"
570 NEXT I
580 PRINT
600 PRINT "THAT WAS FUN! LET'S PLAY AGAIN......"
610 PRINT "FOUR MORE MUGWUMPS ARE NOW IN HIDING."
630 GOTO 240
1000 FOR J=1 TO 2
1010 FOR I=1 TO 4
1020 P(I,J)=INT(10*RND(0))
1030 NEXT I
1040 NEXT J
1050 RETURN
1099 END

34
port/POET.BAS Normal file
View File

@ -0,0 +1,34 @@
90 RANDOMIZE
100 IF I<>1 THEN 101\ PRINT "MIDNIGHT DREARY";
101 IF I<>2 THEN 102\ PRINT "FIREY EYES";
102 IF I<>3 THEN 103\ PRINT "BIRD OR FIEND";
103 IF I<>4 THEN 104\ PRINT "THING OF EVIL";
104 IF I<>5 THEN 210\ PRINT "PROPHET";
105 GOTO 210
110 IF I<>1 THEN 111\ PRINT "BEGUILING ME";
111 IF I<>2 THEN 112\ PRINT "THRILLED ME";
112 IF I<>3 THEN 113\ PRINT "STILL SITTING..."\GOTO 212
113 IF I<>4 THEN 114\ PRINT "BURNED. "\GOTO 212
114 IF I<>5 THEN 210\ PRINT "NEVER FLITTING";
115 GOTO 210
120 IF I<>1 THEN 121\ IF U=0 THEN 210\ PRINT "SIGN OF PARTING";
121 IF I<>2 THEN 122\ PRINT "AND MY SOUL";
122 IF I<>3 THEN 123\ PRINT "DARKNESS THERE";
123 IF I<>4 THEN 124\ PRINT "SHALL BE LIFTED";
124 IF I<>5 THEN 210\ PRINT "QUOTH THE RAVEN";
125 GOTO 210
130 IF I<>1 THEN 131\ PRINT "NOTHING MORE";
131 IF I<>2 THEN 132\ PRINT "YET AGAIN";
132 IF I<>3 THEN 133\ PRINT "SLOWLY CREEPING";
133 IF I<>4 THEN 134\ PRINT "...NEVERMORE";
134 IF I<>5 THEN 210\ PRINT "EVERMORE.";
210 IF U=0 THEN 212\ IF RND(1)>.19 THEN 212\ PRINT ",";\U=2
212 IF RND(1)>.65 THEN 214\ PRINT " ";\U=U+1\GOTO 215
214 PRINT\U=0
215 I=INT(5*RND(1)+1)
220 J=J+1\K=K+1
230 IF U>0 THEN 240\ IF INT(J/2)<>J/2 THEN 240\ PRINT " ";
240 ON J GOTO 100,110,120,130,250
250 J=0\PRINT\IF K>20 THEN 270\ GOTO 215
270 PRINT\U=0\K=0\GOTO 110
999 END

56
port/STARS.BAS Normal file
View File

@ -0,0 +1,56 @@
100 REM *** STARS - PEOPLE'S COMPUTER CENTER, MENLO PARK, CA
110 PRINT "STARS - A NUMBER GUESSING GAME"
120 PRINT
130 RANDOMIZE
140 REM *** A IS LIMIT ON NUMBER, M IS NUMBER OF GUESSES
150 LET A=100
160 LET M=7
170 PRINT "DO YOU WANT INSTRUCTIONS (1=YES 0=NO)";
180 INPUT Z
190 IF Z=0 THEN 280
200 REM *** INSTRUCTIONS ON HOW TO PLAY
210 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO";A
220 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I"
230 PRINT "WILL TYPE ONE OR MORE STARS (*). THE MORE"
240 PRINT "STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER."
250 PRINT "ONE STAR (*) MEANS FAR AWAY. SEVEN STARS (*******)"
260 PRINT "MEANS REALLY CLOSE! YOU GET";M;"GUESSES."
270 REM *** COMPUTER 'THINKS' OF A NUMBER
280 PRINT
290 PRINT
300 LET X=INT(A*RND(0)+1)
310 PRINT "OK, I AM THINKING OF A NUMBER. START GUESSING."
320 REM *** GUESSING BEGINS. HUMAN GETS M GUESSES
330 FOR K=1 TO M
340 PRINT
350 PRINT "YOUR GUESS";
360 INPUT G
370 IF G=X THEN 600
380 LET D=ABS(X-G)
390 IF D >= 64 THEN 510
400 IF D >= 32 THEN 500
410 IF D >= 16 THEN 490
420 IF D >= 8 THEN 480
430 IF D >= 4 THEN 470
440 IF D >= 2 THEN 460
450 PRINT "*";
460 PRINT "*";
470 PRINT "*";
480 PRINT "*";
490 PRINT "*";
500 PRINT "*";
510 PRINT "*";
520 PRINT
530 NEXT K
540 REM *** DID NOT GUESS NUMBER IN M GUESSES
550 PRINT
560 PRINT "SORRY, THAT'S";M;"GUESSES. THE NUMBER WAS";X
580 GOTO 280
590 REM *** WE HAVE A WINNER
600 FOR N=1 TO 50
610 PRINT "*";
620 NEXT N
630 PRINT "!!!"
640 PRINT "YOU GOT IT IN";K;"GUESSES!! LET'S PLAY AGAIN..."
650 GOTO 280
660 END