EasyManua.ls Logo

NEC CP/M-86 - Page 84

NEC CP/M-86
280 pages
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...
Basic
I/O
System
(BIOS) Functions
5-12
SELECT
DISK
DRIVE
ENTRY
CL: Disk Drive
OOH-OFFH
FUNCTION
9
SELDSK
RETURN
BX:DPH
Address
This function selects the disk drive given by register
CL
for further operations.
Register
CL
can
contain
a value ranging from 0 for Drive A
to
15
for Drive P.
Recall, however,
that
the
APC
is
configured
to
support
diskette drives
A-D
(OH-
3H)
and
hard
disk drives
E-H
(4H-7H) only.
SELDSK
returns the base address
of
the selected drive's Disk Parameter
Header
(DPH)
in BX.
On
entry to
SELDSK
it
is possible to determine whether it is the first time the
specified disk has been selected. Register
DL,
bit 0 (least significant bit) is zero
if
the
drive has not been previously selected. This information can be used to set
up
a
dynamic disk definition table.
This routine does
not
change the contents
of
the header
and
associated tables.
For
hard
disk the routine checks SYSUNITID for the
hard
disk unit number.
For
both
diskette
and
hard
disk,
if
the call attempts to select a nonexistent drive,
SELDSK
returns
OOH
in BX as
an
error indicator.
Although
this
operation
must
return
the header address
on
each call, it is advisable
to
postpone
the actual physical disk select operation until
an
I/O
function (seek,
read,
or
write) is performed. This
is
due to the fact
that
disk select operations
may
take place without a subsequent disk
operation
and
thus disk access may be
substantially slower.

Table of Contents

Related product manuals