EasyManua.ls Logo

Commodore Plus 4 - Page 348

Commodore Plus 4
464 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...
336
Using
Peripheral
Devices
Direct-access
programming
requires
opening
two
channels
to
the
disk
drive.
The
first
is
the
command
channel,
which
is
opened
with
OPEN
fUenumber,device,lB
where
Jilenumber
is
the
logical
file
number
to associate
with
the
command
channel
and
device
is
the
disk
drive's
device
number.
The
second
is
a
direct-access
channel,
which
is
opened
with
OPEN
fUenumber,deviGe,chajmei;'#bu£fei/'
where
filenumber
is
the
logical
file
number
to
associate
with
the
direct-access
channel,
device
is
the
disk
drive's
device
number,
and
channel
is
a
data
channel
to
use
for
direct
access
(2-14).
The
1541
has
several
internal
buffers.
Four
of
these
are
used
for
direct-access
programming.
You
need
not
specify
which
one
to
use.
Alternatively,
you
may
do
so
by
using
buffer
equal
to
0
through
3.
The
1541
memory
corresponding
to
each
buffer
is
as
follows:
Buffer
1541
Memory
Used
0
$0300-$03FF
1
$0400-$04FF
2
$0500-$05FF
3
$0600-$06FF
Each
channel
opened
must
be
closed,
following
its
use,
with
CLOSE
filenumber
The
diskette
is
organized
into
tracks
and
sectors.
There
are
35
tracks,
num
bered
1
to
35,
on
a
1541
format
diskette.
The
number
of
sectors
within
a
track
varies
according
to
the
following:
Tracks
Number
of
Sectors
1-17
18-24
25-30
31-35
21
19
18
17
The
sectors
are
numbered
starting
with
zero.
Hence,
for
example,
the
sectors
on
track
1
are
numbered
0-20.