EasyManua.ls Logo

Commodore 1541 - Random Files; Track Number; Total Block

Commodore 1541
80 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...
6.
RANDOM
FILES
Sequential
files
are
Tine
when
you're
just
working
with
a
continuous
stream
of
data,
but
some
jobs
require
more
ihan
that.
For
example,
with
a
large
mailing
list,
you
would
not
want
to
have
to
scan
through
the
entire
list
to Find
a
person's
record.
For
this
you
need
some
kind
of
random
access
method,
some
way
to
get
to
any
record
in
side
a
Tile
without
having
to
read
through
the
entire
file
first.
There
arc
actually
two
different
types
of
random
access
files
an
the
Commodore
disk
drive.
The
relative
files
discussed
in
the
next
chapter
are
more
convenient
for
data
handling
operations,
although
the
random
files
in
this
chapter
have
uses
of
their
own,
especially
when
working
with
machine
language.
Random
files
on
the
Commodore
disk
drive reach
the individual
256-byic
blocks
of
data
stored
on
the
disk.
As
was
mentioned
in
the
first
chapter,
there
are a
total
of
6S3
blocks
on
the
diskette,
of
which
664
are
free
on
a
blank
diskette.
The
diskette
is
divided
into
tracks,
which
are
laid
out
as
concentric
circles
on
the
surface
of
the
diskette.
There
are
35
different
tracks,
starting
with
track
1
at
the
outside,
of
the
diskette
to
track
3 5 at
the
center,
Track
18
is
used
for the
directory,
and
ihe
DOS
fills
up
the
diskette
from
the
center
outward.
Each
track
is
subdivided
into
blocks.
Because
there
is
more
room
on
the
outer
tracks,
theie
are
more
blocks
there.
The
outer
tracks
contain
21
blocks
each,
white
the
inner
ones
only
have
17
blocks
each.
The
table
below
shows
the
number
of
blocks
per
track.
Table
6.1:
Track
and
Block
Format
TRACK
NUMBER
1
SO 17
18
to
24
25
to
30
31 to
35
BLOCK
RANGE
0to20
Ota
18
Oto
17
Oto
16
TOTAL
BLOCK
2]
19
IS
17
The
DOS
contains
commands
for
reading
and
writing
directly
lo
any
track
and
block
on
the
diskette.
There
are
also
commands
for
checking
to
see
which
blocks
are
available,
and
for
marking
off
used
blocks.
These
commands
arc
transmitted
through
the
command
channel
(channel^
]5),
and
tell
the
disk
what
to
do
with
the
data.
The
data
must
be read
later
through
one
of
the
open
data
channels.

Other manuals for Commodore 1541

Related product manuals