
======= Slot0: 214 B

-------------------------------------------------
1) WCH80 demo (212 B)
To use: LOAD, RUN

10 REM
20 REM HELLO FROM WCH80
30 REM PRESS RUN TO RUN
40 REM
50 PRINT ,"   WCH80 DEMO"
60 PRINT
70 LET N=0
80 PRINT "CHARACTER SET:"
90 FOR I=0 TO 255
100 PRINT CHR$(I);
110 NEXT I
120 POKE -5,17
130 POKE -4,0
140 PRINT "SOUND TEST: ";N
150 BEEP 100000,200
160 WAIT 800
170 LET N=N+1
180 IF INKEY$="" THEN GOTO 120


======= Slot1: 1001 B, free 23 B

-------------------------------------------------
2) PRINT CHARSET (57 B)
To use: LOAD 1, RUN

10 REM
20 REM PRINT CHARSET
30 REM
40 FOR I=0 TO 255
50 PRINT CHR$(I);
60 NEXT I
70 STOP

-------------------------------------------------
3) PRECISE DIVISION (197 B)
To use: LOAD 1, RUN 100

110 REM
120 REM PRECISE DIVISION
130 REM
140 PRINT "HOW MANY DECIMAL PLACES?"
150 INPUT D
160 PRINT "DIVIDEND?"
170 INPUT R
180 PRINT "DIVISOR?"
190 INPUT Y
200 LET Z=R/Y
210 LET R=R-Z*Y
220 PRINT "QUOTIENT IS ";Z;".";
230 FOR J=1 TO D
240 LET Z=10*R/Y
250 LET R=10*R-Z*Y
260 PRINT Z;
270 NEXT J
280 STOP

-------------------------------------------------
4) SQUARE ROOT (188 B)
To use: LOAD 1, RUN 300

310 REM
320 REM SQUARE ROOT
330 REM
340 PRINT "ENTER THE NUMBER"
350 INPUT X
360 LET J=0
370 LET K=J*J
380 LET D=X-K
390 IF D=0 THEN GOTO 430
400 IF D<0 THEN GOTO 450
410 LET J=J+1
420 GOTO 370
430 PRINT "THE ROOT IS ";J
440 GOTO 460
450 PRINT "THE ROOT LIES BETWEEN ";J-1;" AND ";J
460 STOP

-------------------------------------------------
5) DIE THROWING (440 B)
To use: LOAD 1, RUN 500
"\A" means: press SHIFT and A

510 REM
520 REM DIE THROWING
530 REM
540 LET A$="\A   \A"
550 LET B$="  \A"
560 LET C$="\A"
570 LET D$="    \A"
580 RANDOMISE
590 LET X=RND(6)
600 PRINT "YOUR THREW IS ";X
610 GOTO X*60+560
620 PRINT ""
630 PRINT ""
640 PRINT B$
650 PRINT ""
660 PRINT ""
670 GOTO 970
680 PRINT C$
690 PRINT ""
700 PRINT ""
710 PRINT ""
720 PRINT D$
730 GOTO 970
740 PRINT D$
750 PRINT ""
760 PRINT B$
770 PRINT ""
780 PRINT C$
790 GOTO 970
800 PRINT A$
810 PRINT ""
820 PRINT ""
830 PRINT ""
840 PRINT A$
850 GOTO 970
860 PRINT A$
870 PRINT ""
880 PRINT B$
890 PRINT ""
900 PRINT A$
910 GOTO 970
920 PRINT A$
930 PRINT ""
940 PRINT A$
950 PRINT ""
960 PRINT A$
970 PRINT "HIT NEWLINE TO THROW AGAIN"
980 PRINT "OR ANY CHAR+NEWLINE TO QUIT"
990 INPUT X$
1000 CLS
1010 WAIT(99)
1020 IF X$="" THEN GOTO 590
1030 STOP

-------------------------------------------------
6) SNOWFALL (117 B)
To use: LOAD 1, RUN 1100
Break with SPACE

1110 REM
1120 REM SNOWFALL
1130 REM
1140 RANDOMISE
1150 FOR I=0 TO 735
1160 POKE 767-I,PEEK(735-I)
1170 NEXT I
1180 FOR I=0 TO 31
1190 LET C=0
1200 IF RND(10)=1 THEN LET C=20
1210 POKE I,C
1220 NEXT I
1230 GOTO 1150


======= Slot2: 872 B, free 152 B

-------------------------------------------------
7) REACTION TIMER (153 B)
To use: LOAD 2, RUN

10 REM
20 REM REACTION TIMER
30 REM
40 PRINT "PREPARE..."
50 WAIT(1000+RND(4000))
60 POKE -3,0
70 PRINT "HIT NEWLINE"
80 INPUT C$
90 LET A=PEEK(-3)
100 PRINT "YOUR REACTION TIME IS ";A/50000;" MS"
110 STOP

-------------------------------------------------
8) RND HISTOGRAM (230 B)
To use: LOAD 2, RUN 200
"\A" means: press SHIFT and A

210 REM
220 REM RND HISTOGRAM
230 REM
240 DIM A(20)
250 RANDOMISE
260 PRINT "CALCULATING..."
270 FOR K=1 TO 5000
280 LET N=RND(20)
290 LET A(N)=A(N)+1
300 NEXT K
310 CLS
320 FOR K=1 TO 20
330 LET A(K)=A(K)/20
340 IF K<10 THEN PRINT " ";
350 PRINT K;" ";
360 IF A(K)<1 THEN GOTO 410
370 IF A(K)>29 THEN LET A(K)=29
380 FOR P=1 TO A(K)
390 PRINT "\A";
400 NEXT P
410 PRINT
420 NEXT K
430 STOP

-------------------------------------------------
9) LEAP FROGS (487 B)
To use: LOAD 2, RUN 500
The goal is to swap the frogs between the left and right sides.

510 REM
520 REM LEAP FROGS
530 REM
540 DIM P(9)
550 LET P(5)=0
560 FOR I=1 TO 4
570 LET P(I)=129
580 LET P(I+5)=128
590 NEXT I
600 LET C=0
610 CLS
620 FOR I=1 TO 9
630 PRINT CHR$(P(I));" ";
640 NEXT I
650 PRINT
660 FOR I=1 TO 9
670 PRINT I;" ";
680 NEXT I
690 PRINT "ENTER MOVE"
700 INPUT A
710 IF A=0 THEN GOTO 930
720 LET F=A/10
730 IF F=0 THEN GOTO 700
740 IF P(F)=0 THEN GOTO 700
750 LET T=A-10*F
760 IF T=0 THEN GOTO 700
770 IF P(T)>0 THEN GOTO 700
780 IF ABS(T-F)>2 THEN GOTO 700
790 LET C=C+1
800 LET P(T)=P(F)
810 LET P(F)=0
820 LET X=0
830 FOR I=1 TO 9
840 IF I=5 THEN GOTO 860
850 IF NOT P(I)=128-(I>5) THEN LET X=1
860 NEXT I
870 LET X=X+P(5)
880 IF X>0 THEN GOTO 610
890 PRINT "YOU DID IT IN ";C;" MOVES"
900 PRINT "ANOTHER GO? (Y)"
910 INPUT A$
920 IF CODE(A$)=62 THEN GOTO 550
930 PRINT "BYEBYE"
940 STOP


======= Slot3: 979 B, free 45 B

-------------------------------------------------
10) ENCODING MESSAGE (375 B)
To use: LOAD 3, RUN
Encode with number 1.., decode with negative number.
Message can contain only alphabetic characters or digits or space.

10 REM
20 REM ENCODING MESSAGE
30 REM
40 PRINT "ENTER MESSAGE:"
50 INPUT A$
60 PRINT A$
70 PRINT "ENTER >0 CODE, <0 DECODE: ";
80 INPUT T
90 PRINT T
100 RANDOMISE ABS(T)
110 IF T<0 THEN PRINT "DE";
120 PRINT "CODED MESSAGE IS:"
130 LET R=RND(36)
140 IF T<0 THEN LET R=36-R
150 IF A$="" THEN GOTO 240
160 LET B=CODE(A$)
170 LET A$=TL$(A$)
180 IF B=0 THEN GOTO 220
190 LET B=B+R-28
200 LET B=B-36*(B/36)
210 LET B=B+28
220 PRINT CHR$(B);
230 GOTO 130
240 PRINT
250 PRINT "ANOTHER MESSAGE? (Y)"
260 INPUT A$
270 IF NOT CODE(A$)=62 THEN GOTO 300
280 CLS
290 GOTO 40
300 PRINT "BYEBYE"
310 STOP

-------------------------------------------------
11) HORSE RACE (602 B)
To use: LOAD 3, RUN 400
"\letter" means: press SHIFT and letter

410 REM
420 REM HORSE RACE
430 REM
440 DIM O(4)
450 DIM D(4)
460 LET A$="\F\T\S"
470 LET B$=" \S\G\Q"
480 LET C$="\R  \E"
490 LET M=100
500 GOTO 580
510 FOR C=1 TO D
520 PRINT " ";
530 NEXT C
540 RETURN
550 FOR I=0 TO 4
560 LET D(I)=0
570 NEXT I
580 PRINT "BANK$";M
590 PRINT "BET? (0=QUIT)"
600 PRINT
610 PRINT "ODDS"
620 FOR I=1 TO 4
630 LET O(I)=RND(9)+1
640 PRINT CHR$(I+37),O(I);"/1"
650 NEXT I
660 INPUT B
670 IF B=0 THEN GOTO 990
680 PRINT "HORSE?"
690 INPUT H$
700 FOR L=1 TO 4
710 CLS
720 PRINT "LAP ";L
730 FOR I=1 TO 4
740 LET D(I)=D(I)+5+7/O(I)+RND(2*O(I)/3)
750 IF D(I)>D(0) THEN LET D(0)=D(I)
760 IF D(0)=D(I) THEN LET J=I
770 NEXT I
780 FOR I=1 TO 4
790 PRINT CHR$(I+37)
800 LET D=D(I)-D(0)+15
810 GOSUB 510
820 PRINT A$
830 GOSUB 510
840 PRINT B$
850 GOSUB 510
860 PRINT C$
870 PRINT
880 NEXT I
890 PRINT "N/L"
900 INPUT D$
910 NEXT L
920 CLS
930 PRINT "WINNER ";CHR$(J+37)
940 LET S=0
950 IF CODE(H$)=J+37 THEN LET S=1
960 LET M=M-B+S*B*O(J)
970 IF M<1 THEN GOTO 990
980 GOTO 550
990 STOP


======= Slot4: 979 B, free 45 B

-------------------------------------------------
12) LUNAR LANDER (617 B)
To use: LOAD 4, RUN
"\letter" means: press SHIFT and letter
- do not add another program with DATA/READ

10 REM
20 REM LUNAR LANDER
30 REM
40 DIM A(19)
50 FOR I=0 TO 19
60 LET A(I)=READ
70 NEXT I
80 LET V=-50
90 LET H=1500
100 LET R=7000
110 GOTO 300
120 FOR I=0 TO 3
130 FOR X=0 TO 4
140 PRINT CHR$(A(X+5*I));
150 NEXT X
160 PRINT
170 NEXT I
180 RETURN
190 PRINT "THRUST (0-99)?",
200 INPUT F
210 PRINT F
220 PRINT "DURATION (1-10)?",
230 INPUT T
240 CLS
250 IF F*T>R/10 THEN LET F=R/10*T
260 LET R=R-F*T*10
270 LET A=F-32
280 LET H=A*T**2+V*T+H
290 LET V=2*A*T+V
300 LET L=H/100
310 IF L<0 THEN LET L=0
320 IF L>12 THEN LET L=12
330 FOR I=L TO 12
340 PRINT
350 NEXT I
360 IF L>8 THEN GOSUB 120
370 PRINT ,"VELOC","HEIGHT","FUEL"
380 PRINT ,V,H,R
390 IF L<9 THEN GOSUB 120
400 IF L=0 THEN GOTO 440
410 FOR I=1 TO L-1
420 PRINT
430 NEXT I
440 IF H<0 THEN PRINT "**CRASH**"
450 FOR I=1 TO 16
460 PRINT "\A\T";
470 NEXT I
480 IF L>0 THEN GOTO 190
490 IF H<0 OR V<-99 THEN GOTO 520
500 PRINT 100+V;" PERCENT OK"
510 STOP
520 PRINT "TERRIBLE"
530 DATA 0,0,156,0,0,0,8,3,136,0,0,2,3,130,0,134,131,3,131,135
540 STOP

-------------------------------------------------
13) MAZE GENERATOR (360 B)
To use: LOAD 4, RUN 600

610 REM
620 REM MAZE GENERATOR
630 REM
640 DIM W(32)
650 PRINT
660 LET W(1)=2
670 LET W(32)=130
680 FOR I=2 TO 31
690 LET W(I)=3
700 NEXT I
710 LET X=RND(20)
720 LET W(X)=2
730 LET W(X+6)=130
740 FOR I=2 TO 5
750 LET W(X+I)=0
760 NEXT I
770 FOR L=1 TO 15
780 FOR I=1 TO 32
790 PRINT CHR$(W(I));
800 IF I=1 OR I=32 THEN GOTO 920
810 IF W(I)<3 THEN GOTO 890
820 IF W(I)>3 THEN GOTO 870
830 LET X=RND(8)
840 IF X<3 THEN LET W(I)=2
850 IF X=8 THEN LET W(I)=7
860 GOTO 920
870 LET W(I)=1+RND(2)
880 GOTO 920
890 LET X=RND(5)
900 LET W(I)=1+X/2
910 IF X=1 THEN LET W(I)=7
920 NEXT I
930 NEXT L
940 STOP


======= Slot5: 1017 B, free 7 B

-------------------------------------------------
14) TIC-TAC-TOE (618 B)
To use: LOAD 5, RUN

10 REM
20 REM TIC-TAC-TOE
30 REM
40 DIM A(9)
50 FOR J=0 TO 2
60 FOR I=1 TO 3
70 LET A(I+3*J)=28+I+4*J+2*I*(J>1)
80 NEXT I
90 NEXT J
100 LET A(4)=36
110 LET A(5)=61
120 LET A(6)=32
130 GOTO 260
140 FOR I=1 TO 9
150 IF A(I)=M+28 THEN LET A(I)=V
160 NEXT I
170 FOR I=0 TO 2
180 FOR J=1 TO 3
190 PRINT CHR$(A(J+3*I));" ";
200 NEXT J
210 PRINT
220 PRINT
230 NEXT I
240 PRINT
250 RETURN
260 LET A=0
270 LET E=0
280 PRINT "I WENT FIRST"
290 GOSUB 170
300 PRINT "ENTER MOVE"
310 INPUT R
320 CLS
330 IF R=2*(R/2) THEN LET E=-1
340 LET M=R
350 LET V=28
360 GOSUB 140
370 LET P=R
380 FOR T=1 TO 4
390 PRINT "I MOVED"
400 LET V=61
410 LET A=A+1
420 IF T=1 OR R=P+4 OR R=P-4 THEN GOTO 480
430 LET P=P+4
440 IF P>8 THEN LET P=P-8
450 LET M=P
460 GOSUB 140
470 GOTO 650
480 IF A=3 AND E THEN LET A=7
490 IF A=4 THEN LET A=6
500 LET P=P+A
510 IF P>8 THEN LET P=P-8
520 LET M=P
530 GOSUB 140
540 IF A=7 THEN GOTO 650
550 IF T=4 THEN GOTO 630
560 PRINT "YOUR MOVE"
570 INPUT R
580 CLS
590 LET M=R
600 LET V=28
610 GOSUB 140
620 NEXT T
630 PRINT "DRAW"
640 STOP
650 PRINT "I WON"
660 STOP

-------------------------------------------
15) DRAWING (403 B)
To use: LOAD 5, RUN 700
 How to prepare your own image: Create a black and white image with
 a resolution of 32x24 pixels in a graphics editor. Save it to
 a Windows BMP file in "1-bit bitmap" format, with switch "Flip row order".
 Display the image in a HEX editor - you can use the F3 function in
 FAR Manager, switching to HEX mode. Read the bytes in HEX format
 sequentially, starting from offset 0x003E, and write them 4 bytes
 at a time to the Windows calculator in HEX format. Switch the mode to
 decimal format to obtain the number in decimal format for DATA. For
 example, rewrite the sequence 0F 80 03 E0 to the calculator as the HEX
 number 0F8003E0. Switch to decimal format to obtain the number 260047840.

700 REM
710 REM DRAWING
720 REM
730 FOR I=0 TO 23
740 LET C=READ
750 IF C<0 THEN PRINT CHR$(128);
760 IF NOT C<0 THEN PRINT " ";
770 LET M=2**30
780 FOR J=0 TO 30
790 IF C AND M THEN PRINT CHR$(128);
800 IF (C AND M)=0 THEN PRINT " ";
810 LET M=M/2
820 NEXT J
830 PRINT
840 NEXT I
850 IF INKEY$="" THEN GOTO 850
860 STOP
870 DATA 0, 260047840, 533719024, 536362992, 532678640, 520094192, 503316720, 201326688
880 DATA 410000432, 284704272, 837578520, 569143048, 569143048, 553369096, 537100296, 537100296
890 DATA 805904408, 269033488, 403095600, 201326688, 100663744, 62916352, 8387584, 0


======= Slot6: 901 B, free 123 B

-------------------------------------------------
16) MASTERMIND (442 B)
To use: LOAD 6, RUN

10 REM
20 REM MASTERMIND
30 REM
40 PRINT "ENTER NUMBER OF DIGITS (3-7)"
50 INPUT N
60 LET N=N-1
70 DIM A(N)
80 FOR I=0 TO N
90 LET X=RND(10)-1
100 FOR J=0 TO I
110 IF X=A(J) THEN GOTO 90
120 NEXT J
130 LET A(I)=X
140 NEXT I
150 LET G=0
160 GOTO 360
170 INPUT B$
180 IF B$="" THEN STOP
190 CLS
200 PRINT B$
210 LET R=0
220 LET C=0
230 LET G=G+1
240 FOR I=0 TO N
250 LET X=CODE(B$)-28
260 IF X=A(I) THEN LET C=C+1
270 FOR J=0 TO N
280 IF X=A(J) THEN LET R=R+1
290 NEXT J
300 LET B$=TL$(B$)
310 NEXT I
320 IF C=N+1 THEN GOTO 380
330 PRINT "NUMBERS RIGHT=";R
340 PRINT "CORRECT POSITIONS=";C
350 PRINT
360 PRINT "ENTER ";N+1;"-DIGIT GUESS"
370 GOTO 170
380 PRINT "YOU DID IT IN ";G;" GUESSES"
390 STOP

-------------------------------------------------
17) DAY OF WEEK (457 B)
To use: LOAD 6, RUN 500

500 REM
510 REM DAY OF WEEK
520 REM
530 LET D$="   SUNMONTUEWEDTHUFRISAT"
540 PRINT "ENTER DATE:"
550 PRINT "DAY",
560 INPUT D
570 IF D<1 OR D>31 THEN GOTO 560
580 PRINT D
590 PRINT "MONTH",
600 INPUT M
610 IF M<1 OR M>12 THEN GOTO 600
620 PRINT M
630 PRINT "YEAR",
640 INPUT Y
650 IF Y<1700 THEN GOTO 640
660 PRINT Y
670 LET K=0
680 IF M=1 OR M=2 THEN LET K=1
690 LET L=Y-K
700 LET O=M+12*K
710 LET P=L/100
720 LET Z=(13*(O+1))/5+(5*L)/4-P+P/4+D-1
730 LET Z=Z-7*(Z/7)+1
740 FOR I=1 TO Z*3
750 LET D$=TL$(D$)
760 NEXT I
770 PRINT "IT IS ";CHR$(CODE+(D$));
780 LET D$=TL$(D$)
790 PRINT CHR$(CODE(D$));CHR$(CODE(TL$(D$)))
800 PRINT
810 PRINT "AGAIN? (Y)"
820 INPUT A$
830 CLS
840 IF CODE(A$)=62 THEN GOTO 530
850 STOP


======= Slot7: 870 B, free 154 B

-------------------------------------------------
18) SQUARE ROOT (425 B)
To use: LOAD 7, RUN

10 REM
20 REM SQUARE ROOT
30 REM
40 PRINT "INPUT NUMBER"
50 INPUT A
60 CLS
70 PRINT "SQUARE ROOT OF ";A;" IS"
80 LET U=174
90 LET L=0
100 LET F=0
110 LET D=0
120 LET N=(U+L)/2
130 IF (N-1)**2<A AND (N+1)**2>A THEN GOTO 170
140 IF N**2>A THEN LET U=N
150 IF N**2<A THEN LET L=N
160 GOTO 120
170 IF N**2>A THEN LET N=N-1
180 LET E=100*(A-N**2)
190 IF E<2 THEN GOTO 350
200 LET F=(E/N)/2
210 LET Q=F**2
220 LET E=E-2*N*F
230 IF E>0 THEN GOTO 270
240 LET F=F-1
250 LET E=100*(A-N**2)
260 GOTO 210
270 LET E=10*E-Q/10
280 IF E<0 THEN GOTO 240
290 LET D=(E/N)/2
300 LET H=E-(2*F*D)/2
310 IF H>0 THEN GOTO 340
320 LET D=D-1
330 GOTO 300
340 LET D=(H/N)/2
350 PRINT N;".";F;D
360 STOP

-------------------------------------------------
19) SIMPLE SIMON (443 B)
To use: LOAD 7, RUN 400

410 REM
420 REM SIMPLE SIMON
430 REM
440 DIM A(30)
450 LET J=-1
460 RANDOMISE
470 DIM P(7)
480 FOR I=0 TO 7
490 LET P(I)=2**(7-I)
500 NEXT I
510 LET X=RND(26)+37
520 CLS
530 PRINT "NEXT CHAR IS"
540 FOR L=0 TO 7
550 LET V=PEEK(3584+L+8*X)
560 FOR K=0 TO 7
570 LET G=(V AND P(K))=0
580 PRINT CHR$(-128*G);
590 NEXT K
600 PRINT
610 NEXT L
620 IF X=15 THEN GOTO 770
630 LET J=J+1
640 IF J=31 THEN GOTO 820
650 LET A(J)=X
660 PRINT "PRINT ENTIRE SEQUENCE"
670 INPUT A$
680 PRINT A$
690 FOR I=0 TO J
700 LET X=CODE(A$)
710 IF NOT A(I)=X THEN GOTO 750
720 LET A$=TL$(A$)
730 NEXT I
740 GOTO 510
750 LET X=15
760 GOTO 540
770 PRINT "SORRY IT WAS:"
780 FOR I=0 TO J
790 PRINT CHR$(A(I));
800 NEXT I
810 STOP
820 PRINT "I GIVE UP"
830 STOP


======= Slot8: 1002 B, free 22 B

-------------------------------------------------
20) KING HAMMURABI (831 B)
To use: LOAD 8, RUN

10 REM
20 REM KING HAMMURABI
30 REM
40 LET A$="ACRES "
50 LET B$="BUSHELS "
60 LET M$="HOW MANY "
70 RANDOMISE
80 LET H=100
90 LET S=3000
100 LET A=1000
110 LET Y=0
120 PRINT "YOUR POPULATION: ";H
130 PRINT B$;"OF GRAIN: ";S
140 PRINT A$;"OF LAND: ";A
150 PRINT
160 LET L=5+RND(20)
170 PRINT "PRICE IS ";L;" ";B$;"PER ACRE"
180 PRINT M$;A$;"TO BUY? ";
190 INPUT V
200 IF V*L>S THEN LET V=S/L
210 PRINT V
220 IF V>0 THEN GOTO 280
230 PRINT M$;A$;"TO SELL? ";
240 INPUT V
250 IF V>A THEN LET V=A
260 PRINT V
270 LET V=-V
280 LET A=A+V
290 LET S=S-L*V
300 PRINT M$;B$;"FOR FOOD? ";
310 INPUT F
320 IF F>S THEN LET F=S
330 PRINT F
340 LET S=S-F
350 PRINT M$;B$;"FOR SEED? ";
360 INPUT P
370 IF P>S THEN LET P=S
380 LET S=S-P
390 IF P>2*A THEN LET P=2*A
400 IF P>25*H THEN LET P=25*H
410 LET R=RND(S/2)-1
420 LET C=RND(10*P)
430 LET S=S+C-R
440 LET D=H-F/10
450 IF D<1 THEN LET D=0
460 LET N=H/10+RND(H/10)-1
470 LET H=H-D+N
480 LET T=0
490 IF RND(6)=3 THEN LET T=H/8+RND(H/5)
500 LET H=H-T
510 CLS
520 LET Y=Y+1
530 PRINT "YEAR ";Y;" OF YOUR REIGN"
540 IF R>0 THEN PRINT "RATS ATE ";R;" ";B$
550 IF N>0 THEN PRINT N;" BABIES BORN"
560 IF D>0 THEN PRINT D;" PEOPLE STARVED"
570 IF T>0 THEN PRINT T;" DIED OF PLAGUE"
580 IF H>0 THEN GOTO 120
590 PRINT "GAME OVER"
600 STOP

-------------------------------------------------
21) PRIME NUMBERS (169 B)
To use: LOAD 8, RUN 700

710 REM
720 REM PRIME NUMBERS
730 REM
740 DIM A(90)
750 LET R=1
760 LET A(1)=2
770 PRINT 2,
780 FOR X=3 TO 460
790 FOR Y=1 TO R
800 IF X/A(R)>A(R) THEN GOTO 830
810 IF X=(X/A(Y))*A(Y) THEN GOTO 860
820 NEXT Y
830 LET R=R+1
840 LET A(R)=X
850 PRINT X,
860 LET X=X+1
870 NEXT X
880 STOP


======= Slot9: 1020 B, free 4 B

-------------------------------------------------
22) CASTLE DOORS (1018 B)
To use: LOAD 9, RUN

10 REM
20 REM CASTLE DOORS
30 REM
40 RANDOMISE
50 LET B=RND(300)
60 LET C=RND(50)
70 GOSUB 730
80 IF C<1 THEN GOTO 650
90 PRINT "4=OPEN DOOR 5=FIGHT WIZARD"
100 LET A=0
110 LET D=RND(8)
120 LET E=RND(30)
130 LET G=RND(60)
140 LET H=RND(10)
150 INPUT O
160 CLS
170 IF O=5 THEN GOTO 650
180 IF D=1 THEN LET A=RND(10)
190 IF D=1 THEN LET A$="ZOMBIE"
200 IF D=2 THEN LET A=RND(20)
210 IF D=2 THEN LET A$="WITCH"
220 IF D=3 THEN LET A=RND(30)
230 IF D=3 THEN LET A$="CYCLOP"
240 IF D=4 THEN LET A=RND(40)
250 IF D=4 THEN LET A$="GARGOYLE"
260 IF D=5 THEN LET A=RND(50)
270 IF D=5 THEN LET A$="DRAGON"
280 IF D>5 THEN GOTO 590
290 PRINT "YOU SEE ";A$
300 GOSUB 730
310 PRINT "1=FIGHT 2=BRIBE 3=RUN"
320 INPUT N
330 CLS
340 IF N=2 THEN GOTO 480
350 IF N=3 THEN GOTO 560
360 IF C<A THEN GOTO 650
370 GOSUB 730
380 PRINT "ATTACK STRENGTH?"
390 INPUT Q
400 CLS
410 IF Q>C THEN LET Q=C
420 IF Q<A THEN LET C=C-Q
430 IF Q<A THEN PRINT "YOU LOST"
440 IF Q<A THEN GOTO 70
450 LET C=C+G
460 PRINT "YOU WON"
470 GOTO 70
480 PRINT "BRIBE STRENGTH?"
490 INPUT P
500 CLS
510 IF P<E THEN PRINT "BRIBE REFUSED"
520 IF P<E THEN GOTO 290
530 LET C=C-P+G
540 PRINT "BRIBE ACCEPTED"
550 GOTO 70
560 PRINT "YOU GOT AWAY"
570 LET C=C-H
580 GOTO 70
590 IF D=6 THEN PRINT "SAVE PRINCESS"
600 IF D=6 THEN LET C=C+50
610 IF D=7 THEN PRINT "FAIRY MAGIC POTION"
620 IF D=7 THEN LET C=C*2
630 IF D=8 THEN PRINT "NOTHING"
640 GOTO 70
650 PRINT
660 IF C>B OR C=B THEN PRINT "WIZARD DEFEATED-YOU WIN"
670 IF C<B OR C<A THEN PRINT "YOU DEFEATED-GAME OVER"
680 PRINT
690 PRINT "PLAY AGAIN? (Y)"
700 INPUT A$
710 IF CODE(A$)=62 THEN GOTO 50
720 STOP
730 PRINT
740 PRINT "YOUR STRENGTH IS ";C
750 PRINT
760 RETURN


======= Slot10: 958 B, free 66 B

-------------------------------------------------
23) ACEY DEUCEY (In-Between) (644 B)
Player wins if third card lies between two cards.
To use: LOAD 10, RUN

10 REM
20 REM ACEY DEUCEY
30 REM
40 RANDOMISE
50 LET Q=100
60 GOTO 120
70 PRINT "HIT NEWLINE (Y=BREAK)"
80 INPUT A$
90 IF CODE(A$)=62 THEN STOP
100 CLS
110 LET Q=Q+M
120 PRINT "YOU HAVE ";Q;" DOLLARS"
130 IF Q>0 THEN GOTO 190
140 PRINT "YOU ARE TAPPED OUT."
150 PRINT "PLAY AGAIN? (Y)"
160 INPUT A$
170 IF CODE(A$)=62 THEN GOTO 50
180 STOP
190 PRINT "HERE ARE 2 CARDS:"
200 LET A=RND(13)+1
210 LET B=RND(13)+1
220 IF A<B THEN GOTO 260
230 LET C=B
240 LET B=A
250 LET A=C
260 LET C=A
270 GOSUB 500
280 LET C=B
290 GOSUB 500
300 PRINT
310 LET M=2
320 IF A=B THEN GOTO 480
330 IF M>Q THEN LET M=Q
340 IF A+1=B THEN GOTO 450
350 PRINT "YOUR BET? (1-";Q;")"
360 INPUT M
370 IF M<1 THEN LET M=1
380 IF M>Q THEN LET M=Q
390 PRINT "NEXT CARD IS ";
400 LET D=RND(13)+1
410 LET C=D
420 GOSUB 500
430 PRINT
440 IF D>A AND D<B THEN GOTO 480
450 PRINT "YOU LOSE ";M
460 LET M=-M
470 GOTO 70
480 PRINT "YOU WIN ";M
490 GOTO 70
500 IF C<11 THEN PRINT C,
510 IF C=11 THEN PRINT "JACK",
520 IF C=12 THEN PRINT "QUEEN",
530 IF C=13 THEN PRINT "KING",
540 IF C=14 THEN PRINT "ACE",
550 RETURN

-------------------------------------------------
24) CHEESE NIBBLER (312 B)
To use: LOAD 10, RUN 600

600 REM
610 REM CHEESE NIBBLER
620 REM
630 DIM A(29)
640 LET N=30
650 CLS
660 FOR J=0 TO 2
670 FOR K=0 TO 9
680 LET B=A(K+10*J)
690 IF B=0 THEN PRINT "\A";
700 IF B=1 THEN PRINT " ";
710 NEXT K
720 IF J=0 THEN PRINT " THIS IS THE CHEESE."
730 IF J=1 THEN PRINT " HIT NEWLINE TO LET"
740 IF J=2 THEN PRINT " THE MOUSE NIBBLE IT."
750 NEXT J
760 PRINT ,"   (SPACE TO BREAK)"
770 INPUT A$
780 LET B=RND(30)-1
790 IF A(B)=1 THEN GOTO 780
800 LET A(B)=1
810 LET N=N-1
820 IF N>0 AND A$="" THEN GOTO 650
830 STOP


======= Slot11: 1021 B, free 3 B

-------------------------------------------------
25) RPN CALCULATOR (734 B)
To use: LOAD 11, RUN

10 REM
20 REM RPN CALCULATOR
30 REM
40 DIM R(5)
50 CLS
60 PRINT "V ";R(5)
70 PRINT "U ";R(4)
80 PRINT "T ";R(3)
90 PRINT "Z ";R(2)
100 PRINT "Y ";R(1)
110 PRINT "X ";R(0)
120 PRINT "ENTER INTEGER OR - + * / ** X"
130 LET X=0
140 INPUT A$
150 IF A$="" THEN STOP
160 LET C=CODE(A$)
170 LET A$=TL$(A$)
180 IF C=220 THEN GOTO 320
190 IF C=221 THEN GOTO 430
200 IF C=222 THEN GOTO 490
210 IF C=223 THEN GOTO 510
220 IF C=226 THEN GOTO 530
230 IF C=61 THEN GOTO 550
240 IF C<28 OR C>37 THEN GOTO 140
250 LET X=C-28
260 GOSUB 590
270 FOR I=0 TO 4
280 LET R(5-I)=R(4-I)
290 NEXT I
300 LET R(0)=X
310 GOTO 50
320 LET C=CODE(A$)
330 IF C<28 OR C>37 THEN GOTO 370
340 GOSUB 590
350 LET X=-X
360 GOTO 270
370 LET R(0)=R(1)-R(0)
380 FOR I=1 TO 4
390 LET R(I)=R(I+1)
400 NEXT I
410 LET R(5)=0
420 GOTO 50
430 LET C=CODE(A$)
440 IF C<28 OR C>37 THEN GOTO 470
450 GOSUB 590
460 GOTO 270
470 LET R(0)=R(1)+R(0)
480 GOTO 380
490 LET R(0)=R(1)*R(0)
500 GOTO 380
510 LET R(0)=R(1)/R(0)
520 GOTO 380
530 LET R(0)=R(1)**R(0)
540 GOTO 380
550 LET X=R(0)
560 LET R(0)=R(1)
570 LET R(1)=X
580 GOTO 50
590 LET C=CODE(A$)
600 IF C<28 OR C>37 THEN RETURN
610 LET A$=TL$(A$)
620 LET X=X*10+C-28
630 GOTO 590

-------------------------------------------------
26) HEX MANDELBROT (285 B)
To use: LOAD 11, RUN 700

710 REM
720 REM HEX MANDELBROT
730 REM
740 LET S=1024
750 LET U=100
760 LET V=85
770 LET H=4*S
780 FOR Y=-11 TO 12
790 LET D=Y*V
800 FOR X=-20 TO 11
810 LET C=X*U
820 LET A=C
830 LET B=D
840 FOR I=0 TO 15
850 LET E=A*A/S
860 LET F=B*B/S
870 LET T=E-F+C
880 LET G=A*B/S
890 LET B=G+G+D
900 LET A=T
910 IF (A*A/S+B*B/S)>H THEN GOTO 950
920 NEXT I
930 PRINT " ";
940 GOTO 960
950 PRINT CHR$(28+I);
960 NEXT X
970 PRINT
980 NEXT Y
990 IF INKEY$="" THEN GOTO 990
1000 STOP


======= Slot12: 924 B, free 100 B

-------------------------------------------------
27) FLAPPYS SONG (922 B)
To use: LOAD 12, RUN

10 REM
20 REM FLAPPYS SONG
30 REM
40 PRINT "PLAYING FLAPPYS SONG..."
50 LET G4=39200
60 LET B4=49388
70 LET C5=52325
80 LET D5=58733
90 LET E5=65926
100 LET F5=69846
110 LET FS5=73999
120 LET G5=78399
130 LET A5=88000
140 LET B5=98777
150 LET C6=104650
160 LET D6=117466
170 LET R=0
180 LET L2=533
190 LET L2D=800
200 LET L4=267
210 LET L4D=400
220 LET L8=133
230 LET N=READ
240 LET L=READ
250 BEEP N,L
260 GOTO 230
270 DATA R,L2,E5,L8,R,L8,C5,L4
280 DATA R,L4,E5,L8,R,L8,C5,L4
290 DATA R,L4,E5,L8,R,L8,G5,L8
300 DATA R,L8,G5,L8,E5,L8,C5,L8
310 DATA E5,L8,D5,L4D,R,L8,F5,L8
320 DATA R,L8,B4,L4,R,L4,D5,L8
330 DATA R,L8,G4,L4,R,L4,D5,L8
340 DATA R,L8,F5,L8,R,L8,F5,L8
350 DATA D5,L8,B4,L8,D5,L8,C5,L4D
360 DATA R,L4D,A5,L2D,R,L4,F5,L8
370 DATA R,L8,F5,L8,R,L8,R,L8
380 DATA A5,L8,F5,L8,A5,L8,F5,L8
390 DATA A5,L8,D6,L8,C6,L8,B5,L8
400 DATA D6,L8,C6,L8,A5,L8,G5,L4
410 DATA E5,L4,C5,L4,R,L4,E5,L4
420 DATA C5,L4,R,L4,E5,L4,C5,L4
430 DATA G5,L8,FS5,L8,A5,L8,G5,L8
440 DATA F5,L8,E5,L8,D5,L4,B4,L8
450 DATA G5,L8,F5,L4,D5,L4,B4,L8
460 DATA G5,L8,F5,L4,D5,L4,B4,L8
470 DATA G5,L8,F5,L4,B5,L8,A5,L8
480 DATA G5,L8,F5,L8,E5,L8,D5,L8
490 DATA C5,L4,R,L4,B4,L4,C5,L4
500 DATA R,L4,B4,L4,C5,L4,R,L2


======= Slot13: 501 B, free 11 B

28) MATCHES (499 B)
To use: LOAD 13, RUN
"\letter" means: press SHIFT and letter

10 REM
20 REM MATCHES
30 REM
40 RANDOMISE
50 LET M=18+RND(12)
60 PRINT "WHO TAKES LAST ONE LOSES."
70 PRINT
80 FOR L=1 TO 4
90 FOR K=1 TO M
100 IF L=1 THEN PRINT "\E";
110 IF L>1 THEN PRINT "\Q";
120 NEXT K
130 PRINT
140 NEXT L
150 PRINT
160 PRINT M;" MATCHES, YOUR TURN"
170 IF M=1 THEN GOTO 380
180 PRINT "HOW MUCH? (1-3, 0=QUIT)"
190 INPUT T
200 IF T=M THEN GOTO 380
210 IF T<1 THEN STOP
220 IF T>3 OR T>M THEN GOTO 190
230 LET M=M-T
240 IF M=1 THEN GOTO 360
250 LET C=RND(3)
260 IF RND(6)=1 THEN GOTO 290
270 LET R=M-4*(M/4)
280 IF NOT R=1 THEN LET C=R+3-4*((R+3)/4)
290 IF C>M THEN LET C=M
300 LET M=M-C
310 IF M=0 THEN GOTO 360
320 CLS
330 PRINT "YOU TOOK ";T
340 PRINT "I TOOK ";C
350 GOTO 70
360 PRINT "YOU WON"
370 GOTO 390
380 PRINT "I WON"
390 PRINT "PLAY AGAIN? (Y)"
400 INPUT A$
410 IF NOT CODE(A$)=62 THEN STOP
420 CLS
430 GOTO 50
