To
read
back
the data from tape, you
must first press REWIND
on
the Recorder
to
rewind
the
tape
to
the
point where the data
file
started.
(You'll have to
disconnect
the REMote
plug to
gain
manual control of
the
recorder. When you have rewound the
tape
to the start-
ing
point,
reconnect the
REMote
plug.)
Type NEW
to clear
out the old program and
enter
these lines:
100
A=0: B=0: C=0
110
INPUT
#
A.B.C
120 PRINT "THE DATA HAS
BEEN
READ FROM THE
TAPE."
130 PRINT
"A=
M
;A
t
M
B="
;B,
M
C=
"
;C
Now
press
PLAY
on the
Recorder
and
typeRUN.
If the
data from the
earlier program was stored and
read
properly, the Computer should
display
:
THE
DATA HAS
BEEN
READ FROM THE TAPE
A=
1 B=
2 C= 3
READY
>-
Line
100
sets our
variables
to
zero. If the data is not
read
properly, A, B and C will be
output as zero.
Line
110
causes the Recorder to
start,
loading three
numbers into
the variables A, B and C.
When the
three numbers
have
been read, the
Recorder
motion is stopped.
Line
120
prints
a reassuring
message.
This is important
when
the Computer is using an
external device
such as a Tape
Recorder.
Print messages are
also
valuable
as
prompting
instructions to
the
user regarding the
control of
the Recorder. For
example,
before the
Computer
executes
a
PRINT # statement,
we
can have it print a
message
telling the user
to
put
the Recorder in
the Record mode.
Line
130
prints the data that was
read
from the tape.
NOTE:
If the Recorder
is not in the
PLAY mode
(with proper
connections made) when it
executes
an INPUT #
statement, the
Computer
will keep trying to read
the
tape
until it
gets
something. You have no
keyboard control of
the
Computer during such an input
operation,
so it is effectively locked-up.
The only way to
unlock it
is to press the Reset
button
located
in
the expansion port on
the left rear corner
of the
Keyboard. This will
terminate
the
entire
program,
but will not erase
it.
222
No
unusual punctuation is required
to separate
the
variables
on an INPUT # statement
—
just
the
Ordiaary:.cQ««iaas. ..-•„.--
---
:
,
-
:
"