Instruction manual

APPLE II Speed Typing Test
With Input Time Clock
So,
you think you are a pretty fast typist! Care
to
take a
Speed Typing Test on your APPLE?
The qiuck brwn fpx jumped ovre ...
John Broderick, CPA
8635
Shagrock
Dallas,
TX
75238
)
)
The speed typing
test
is a must for
all APPLEliers, like myself, who consider
themselves expert typists. However, I
did
not
set out
to
write
a typing test, but
to make
an
input subroutine (GOSUB
8400) which
puts
the user under the
pressure
of
a
time
clock.
Try the program below:
2000 call-936:
2010
VV
=
10:
rem set VTAB
2020
TI=
1:
rem set TAB
2030 GOSUB 8400
2040 GOTO 2000
You should hear and see the time at
the
bottom
of
the screen
with
the seconds
and tenths
of
seconds flying by as you
type in an alpha-numeric string.
Subroutine 8400 reads the keyboard
in line 8434
with
K equal
to
the ASCII
number. Line 8447
subtracts
159 from
ASCII so
that
now K is equal
to
the posi-
tion
of
the equivalent character in string
A$
(line 8406). So you can see that we
are slowly building up
two
words in
W$
at line 8447 by adding, to the end
of
string
W$,
the next letter coming in on
the keyboard until the ASCII equivalent
of
carriage return
(141)
is detected
at
line
8444.
Now when the princess
falls
into
the snake pit,
if
she
doesn't
make the
right
decision
fast enough the snakes
will probably get her.
December, 1979
WRInEN
BY
JOHN
BRO[.{RICK
DALLAS.
TEXAS
14
REM
JUNE
21,
1979
SUBROUTINE
8400
IS
A
SELF
CONTAINED
INPUT
TIME
CLOCK
16
REM
DEFINE
VV=VTJlB
& n=TAB
THEN
GOSUB8400-
THIS
roES
THE
S.AME
AS
AN
ORDINARY
I
'-'PUT
101$
20
REf"
COPYWRITED-CAN
NOT
BE
SOLD
BUT
CAN
BE
GIVEN
AWAY
40
DIM
TYPE$(250):
CALL
-936:
POKE
33,36
80
INPUT
"DO
YOU
H1SH
TO
MAKE
UP
YO
UR
OWN
TEST
SENTENCE
YIN?"
,
TYPE$
84
IF TYPE$I"Y"
THEN
90:
PRINT
:
PRI
NT
"ENTER
TEST
SENTENCE
NOH
":
PRINT:
PRINT:
INPUT
TYPE$
:
GOTO
100
90
TYPES="NOW
IS
THE
TIME
FOR
ALL
G
000
MEN
TO
COME
TO
THE
AID
OF
TH
EI R
COUN
T
RY
"
100
CALL
-936:
PRINT
:ERR=O:
PRINT
"YOO
ARE
TAKING
A
SPEED
TYPING
T
EST"
120
PRINT:
PRINT
"TYPE
THE
NEXT
SEN
TENCE
APPEARING
ON
THE
SCREEN
A
S
FAST
AS
YOU
CAN"
130
FOR
1=1
TO
4000:
NEXT
I:
REM
135
REM
---
BODY
OF
PROGRftM
----
140
CALL
-936:E
RR=O
150
VV=l3:
REM
SET
SUBROUT
VUB
160
n=l:
REM
SET
SUBROUT
TAB
170
VTAB
(9):
TAB
1:
PRINT
TYPES
:
GOSUB
MOO
180
VTAB
(16):
TAB
1
200
IF
W$=TYPE$
THEN
510:
REM
204
REM
COMPUTE
ERRORS
210-410
210
FOR
1=
LEN{WS)
TO
LEN{TYPE$
):\oI${I+1)=S${1,1):
NEXT
I
220
FOR
1=1
TO
LEN{TYPES):
IF
I)
LEN{WS)
THEN
ERR=ERR+1:
IF
I)LEN{W$)
THEN
NEXT
I
230
IF
WS{I,I)#TYPE${I,I)
THEN
ERR=ERR+1:
NEXT
I
400
PRINT:
PRINT:
CALL
-198:
PRINT
" "
;E
RR;" E
PRORS
HIT
RETU
RN":
GOTO
520
MICRO
--
The
6502
Journal
410
CALL
-198:
PRINT"
";ERR;"
EPRO
RS";"
HIT
RETURN"
500
REM
-
COMPUTE
101
PM
501
T={
X*23)+J
:L=
LEN{
TYPES): IF
L<l
THEN
520
502
L=L-{ERR*6):
IF
L(?
THEN
GOTO
506
503WPM={L*12*20)/T
506
VTPB
(24):
TAB
30:
PRINT
IoIP~;
"
WPM":
VTPB
(16):
TAB
1:
RETURN
510
PRINT"
CORRECT
- HIT
RETURN"
:
PRINT:
PIlINT :
PRINT
:
520
GOSUB
500:
INPUT
W$:IoIPM=O:
GOTO
140:
REM
8400
REM
-SUBROUTINE
TO
INPUT
VIA
KEYBOARD
TO
RETAIN
AND
I
NPUT
WORD
IN
101$
8405
IF
SIoIITCH=l
THEN
8407
:SWITCH=
1:
DIM
\~$(255),A${70),BS{2)
:BS=u
II
8406
A$="
#S1.&'
{)*+,-./0123456789:;
'=?@ABCOEFGHIJKLMNOPQRSTU~XYZ
1m
"
8407 Y=T:
POKE
-16336,0:101$="
":
X=O:J=O
8410
FOR
U=l
TO
250
8412
REt,'
USER.
AREA
HERE
X=SECONDS
SO
USER
CAN
TEST
X LIKE
IF
X=12
THEN
RETURN
8430
J=J+
1:
IF
J(23
THEN
8434
:X=
X+1
:J=O
8431
FOR
BB=l
TO
3:KK=
PEEK
(-16336
)_
PEEK
(-16336):
NEXT
BB:
GOTO
8434
8434
VTAB
(24):
TAB
13:U=U-1:
PRINT
X;"."
;J*10/23;"
SECONDS";:
K=
PEEK
(-16384)
8437 IF
K#136
THEN
8444:Y=Y-1
8438
VTAB
(VV):
TJlB
TT+Y-1:
PRINT
S${
1,1)
8440
W${
1)=W${
1,
LEN{WS)-l)
8441
VTAS
(l3):
TJlB
1:
PRINT
W$
8442
POKE
-16368,0:
NEXT
U
8444
IF
K=141
THEN
8540:
IF
K<J60
THEN
NEXT
U
8447 K=K-159:W$(Y)=A${K,K)
8461
POKE
-16368,0:
VUE
(VV):
TAB
PRINT
W$:Y=Y+1:
NEXT
U
8540
tIl:
CALL
-756:
RETURN
19:69