EasyManua.ls Logo

Commodore 1581 - Using Random Files

Commodore 1581
138 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...
When
the
user
selects
a
particular
sub-directory
area,
it
then
becomes
the
default
working
area.
Accesses
to
the
disk
for
directories,
loading
files,
saving
files,
etc.,
will
all
be
done
within
this
area.
Files
outside
of
the
selected
area
are
effectively
invisible.
File
and
local
BAM
information
for
sub-directories
are
stored
within
the
sub-directory
areas
themselves.
The
information
is
stored
on
the
first
allocated
track
of
the
partition
area,
and
has
the
same
format
as
track
40.
When
creating
partitions
and
sub-directories
within
sub-directories
it
is
the
responsibility
of
the
user
to
make
sure
that
he
doesn't
overwrite
this
information!
The
DOS
only
checks
to
make
sure
that
you
don't
attempt
to
overwrite
this
information
for
the
ROOT
directory
(track
40).
It is
up
to
the
user
to
make
sure
that
this
information
isn't
corrupted
in
the
sub-directories.
Partitioned
areas
can
be
freed
up
simply
by
SCRATCHING
the
partition
file
entry
in
the
appropriate
directory.
If
the
partition
was
being
used
as
a
sub-directory,
all
of
the
files
in that
sub-directory
will
be
lost.
USING
RANDOM
FILES
By
combining
the
commands
in
this
chapter,
it
is
possible
to
develop
a
file-handling
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.
79

Table of Contents

Other manuals for Commodore 1581

Related product manuals