0MODE7:ONERROR RUN
1PRINT'"Four short programs from Joh
n Ilsley."''" Enter 1 - 4. ESCAPE to ret
urn here"''"1. Dots"
2PRINT"2. Reactions"
3PRINT"3. Lines"
4PRINT"4. Text"
5A$=GET$
6IF A$="2"GOTO2000
7IF A$="3"GOTO3000
8IF A$="4"GOTO4000
9IF A$<>"1"RUN
10*FX4,1
20MODE7
30PRINTTAB(10,10)
40A$=GET$
50IF A$=" " PRINTTAB((POS-1),(VPOS-1)
);".";
60IF A$=" " PRINTTAB((POS-1),(VPOS+1)
);".";
70IF A$=" " PRINTTAB((POS+0),VPOS);".
";
80IF A$=" " PRINTTAB((POS-2),VPOS);".
";
90 GOTO 40
100:
110REM *******************************
*:
120:
2000REM A REACTION PROGRAM
2010Q=1000
2020MODE7
2030PRINT"Somewhere on the screen there
will be"
2040PRINT"a dot, like this ";CHR$255;"
and as soon as"
2050PRINT"you see that, you must hit a
key."'
2060PRINT"Your reaction time will then
be printed"
2070PRINT"on the screen."''"Press Space
to continue"
2080REPEATUNTILGET=32
2090MODE7
2100VDU23;8202;0;0;0;
2110A=RND(500)
2120X=RND(39)
2130Y=RND(20)
2140TIME=0
2150REPEATUNTIL TIME=(A+20)
2160PRINTTAB(X,Y);CHR$255
2170*FX15,1
2180TIME=0
2190REPEATUNTILGET<>-1
2200T=TIME
2210IF T<Q THEN Q=T:PRINT'"Your fastest
yet!":GOTO 2240
2220IF T>Q Q=Q:PRINT'"Too slow....!":GO
TO 2240
2230IF T=Q PRINT"Equal best....":GOTO22
40
2240A=TIME DIV 100 MOD 60
2250B=TIME DIV 1 MOD 100
2260PRINTTAB(0,Y+1);"You took ";A;".";B
;" seconds."
2270PRINT''"PRESS A KEY TO CONTINUE"
2280A$=GET$:GOTO 2090
2290:
2300REM ****************************
2310:
3000 MODE0
3010 X=640:Y=512
3020 MOVE X,Y
3030 *FX4,1
3040 IF INKEY(-58) Y=Y+1
3050 IF INKEY(-42) Y=Y-1
3060 IF INKEY(-26) X=X-1
3070 IF INKEY(-122) X=X+1
3080 DRAW X,Y
3090 GOTO 3030
3100:
3110REM ***************************
3120:
4000 MODE7
4010 INPUT"Enter text line:-"a$
4020 m%=2
4030 IF LEN(a$)>20 THEN m%=1
4040 IF LEN(a$)>40 THEN PRINT"Too long.
.. Max 20 or 40":GOTO 4010
4050 REM ON ERROR VDU4:REPORT:PRINTERL:
END
4060 MODE m%
4070 X=0:L=5:S=2
4080 Y=800:O=5:U=3
4090 VDU5
4100 FOR K=X TO X-L STEP -S
4110 FOR J=Y TO Y+O STEP U
4120 MOVE K,J
4130 PRINTa$
4140 NEXT:NEXT
4150 GCOL0,RND(16)
4160 MOVE K,J
4170 PRINTa$
4180 VDU4
4190 GOTO 4010