EasyManua.ls Logo

Commodore 1581 - Original Block-Read and Block-Write Commands

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...
mines
how
many
bytes
of
that
sector
are
read
into
a
disk
memory
buffer.
A
program
may
check
to
be
sure
it
doesn't
attempt
to
read
past
the
end
of
data
actually
loaded
into
the
buffer,
by
watching
for
the
value
of
the
file
status
variable
ST
to
change
from
0
to
64.
When
the
buffer
is
written
back
to
diskette
by
B-W,
the
first
byte
written
is
the
current
value
of
the
buffer
pointer.
Only
that
many
bytes
are
written
into
the
specified
sector.
B-R
and
B-W
may
thus
be
useful
in
working
with
custom-designed
file
structures.
FORMAT
FOR
THE
ORIGINAL
BLOCK-READ
AND
BLOCK-WRITE
COMMANDS:
PRINT#15,"BLOCK-READ";channel
#;drive
#;track
#;sector
#
abbreviated
as:
PRINT#15,UB-R";channel
#;drive
#;track
#;sector
#
and
PRINT#15,uBLOCK-WRITE";channel
#;drive
#;track
#;sector
#
abbreviated
as:
PWNT#15,"B-W";channel
#;drive
#;track
#;sector
#
where
"channel
#"
is
the
channel
number
specified
when
the
file
into
which
the
block
will
be
read
was
opened,
"drive
#"
is
the
drive
number,
and
"track
#"
and
"sector
#"
are
the
track
and
sector
numbers
containing
the
desired
block
of
data
to
be
partially
read
into
or
written
from
the
file
buffer.
-NOTE
In
a
true
BLOCK-READ,
the
first
byte
of
the
selected
sector
is
used
to
determine
how
many
bytes
of
that
sector
to
read
into
the
disk
memory
buffer.
It
thus
cannot
be
used
to
read
an
entire
sector
into
the
buffer,
as
the
first
data
byte
is
always
interpreted
as
being
the
number
of
characters
to
read,
rather
than
part
of
the
data.
Similarly,
in
a
true
BLOCK-WRITE,
when
the
buffer
is
written
back
to
diskette,
the
first
byte
written
is
the
current
value
of
the
buffer
pointer.
Only
that
many
bytes
are written
into
the
specified
sector.
It
cannot
be
used
to
rewrite
an
entire
sector
onto
diskette
unchanged,
because
the
first
data
byte
is
overwritten
by
the
buffer
pointer.
73

Table of Contents

Other manuals for Commodore 1581

Related product manuals