EasyManua.ls Logo

Commodore 1541-II - Using Random Files (Advanced)

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...
EXAMPLE:
To
free
the
sector
in
which
we
wrote
our
name
in
the
Block
Write
example,
and
allocated
in
the
first
Block-Allocate
example,
we
could
use
the
following
command:
PRINT#15,"B-F";0;l;l
USING
RANDOM
FILES
(ADVANCED
USERS
ONLY)
By
combining
the
commands
in
this
chapter,
it
is
possible to
develop
a
file-
handing
program
that
uses
random
files.
What
you
need
to
know
now
is
how
to
keep
track
of
which
blocks
on
the
disk
such
a
file
has
used.
(Even
though
you
know
a
sector
has
not
been
allocated
by
your
random
file,
you
must
also
be
sure
it
wasn't
allocated
by
another
unrelated
file
on
the
diskette.)
The
most
common
way
of
recording
which
sectors
have
been
used
by
a
random
file
is
in
a
sequential
file.
The
sequential
file
stores
a
list
of
record
numbers,
with
the
track,
sector,
and
byte
location
of
each
record.
This
means
three
channels
are
needed
by
a
random
file:
one
for
the
command
channel,
one
for
the
random
data,
and
the
last
for the
sequential
data.
72

Table of Contents

Related product manuals