EasyManua.ls Logo

Commodore 1541-II - Page 61

Commodore 1541-II
104 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Get#
may
be
especially
useful
in
recovering
damaged
files,
or
files
with
unknown
contents.
The
Basic
reserved
variable
ST
(the
file
STatus
variable)
can
be
used
to
indicate
when
all
of
a
properly-closed
file
has
been
read.
500
GET#2,S$
510
SU
=
ST:REM
REMEMBER
FILE
STATUS
520
PRINT
S$;
530
IF
SU
=
0
THEN
500:REM
IF
THERE'S
MORE
TO
BE
REAL
540
IF
SUO64
THEN
PRINT
"STATUS
ERROR:
ST
=
";SU
Copying
ST
into
SU
is
often
an unneccessary
precaution,
but
must
be
done
if
any
other
file-handling
statement
appears
between
the
one
which
read
from
the
file
and
the
one
that
loops
back
to
read
again.
For
example,
it
would
be
required
if
line
520
was
changed
to
520PRINT#l,S$;
Otherwise,
the
file
status
checked
in
line
530
would
be
that
of
the
write
file,
not
the
read
file.
POSSIBLE
VALUES
OF
THE
FILE
STATUS
VARIABLE
t4ST",
IFST
=
0
1
2
4
8
16
32
64
128
AND
THEIR
MEANINGS
THEN
All
is
OK
Receiving
device
was
not
available
(time
out
on
talker)
Transmitting
device
was
not
available
(time
out
on
listener)
Cassette
data
file
block
was
too
short
Cassette
data
file
block
was
too
long
Unrecoverable
read
error
from
cassette,
verify
error
Cassette
checksum
error—one
or
more
faulty
characters
were
read
End
of
file
reached
(EOI
detected)
Device
not
present,
or
end
of
tape
mark
found
on
cassette
53

Table of Contents

Related product manuals