Blocking and Deblocking
1-2
The
SELDSK
entry
point
clears the host buffer flag whenever a new disk
is
logged
in.
Note
that
although
the
SELDSK
entry
point
computes
and
returns the Disk
Parameter
Header
address, it does
not
physically select the
host
disk
at
this
point
(it
is
selected
later
at
READHST
or
WRITEHST).
Further,
SETTRK,
SETSEC,
and
SETDMA
simply store the values,
but
do
not
take any
other
action
at
this point.
SECTRAN
performs-a trivial function
of
returning the physical sector number.
The
principal entry points are
READ
and
WRITE. These subroutines take the place
of
your
previous
READ
and
WRITE
operations.
For
hard
disk, the
READ
and
WRITE
operations actually move
data
from
or
to a
work
buffer.
The
work buffer
is
located
on
the
hard
disk
adapter
board
starting
at
location
9CaaaH.
This buffer
is
used by the CBIOS only
and
is
not
accessible to the
user for either programs
or
data.
The
actual
physical read or write takes place
at
either
WRITEHST
or
READHST,
where all values have been prepared: hstdsk
is
the host disk number, hsttrk
is
the host
track
number,
and
hstsec
is
the
host
sector
number
(which may require translation
to
a physical sector number). You must insert code
at
this
point
which performs the
full
host
sector read into,
or
write
out
of, the buffer
at
hstbuj
of
length hstsiz. All
other
mapping functions are performed by the algorithms.
See the listing
of
the CBIOS
on
the
CP
/M-86
Program
Development Aids diskette
for the sector blocking/deblocking algorithm for the APC.