EasyManua.ls Logo

NEC CP/M-86 - Disk 1;0 Subroutines

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-10
GET
I/O
MAPPING
BYTE
ENTRY
FUNCTION
19
GETIOB
RETURN
AL: IOBYTE
This function returns the current value
of
the logical
to
physical
input/output
device byte (IOBYTE) in AL. This eight-bit value
is
used to associate physical
devices with
CP/M-86's
four logical devices.
SET
I/O
MAPPING
BYTE
ENTRY
CL:
10BYTE
FUNCTION
20
SETIOB
RETURN
This function uses the value in
CL
to set the value
of
the IOBYTE
stored
in the
BIOS.
Disk
I/O
Subroutines
This section describes
the
disk
I/O
subroutines, functions 8 through
18.
Disk
I/O
is always performed
through
a sequence
of
calls
to
the various disk access
subroutines.
The
subroutine sets
up
the disk
number
to
access, the cylinder (for
hard
disk), track,
and
sector
on
the disk,
and
the direct memory access
(DMA)
offset
and
segment addresses involved in the
I/O
operation. After all these
parame-
ters have been set, the
subroutine
makes a call
to
the
READ
or
WRITE
function.
The
READ
or
WRITE
function, in turn, calls either the
R_
W
_COMMON
(for
diskette)
or
R_
W
_COMMONHD
(for
hard
disk) routine to perform the actual
I/O
operation. Note
that
there
is
often a single call to
SELDSK
to
select a disk
drive, followed by a
number
of
read
or
write operations
to
the selected disk before
selecting
another
drive for subsequent operations. Similarly, there may be a call
to
set the
DMA
segment base
and
a call to set the
DMA
offset followed by several calls
which read
or
write from the selected
DMA
address before the
DMA
address is
changed. The track
and
sector subroutines are always called before the
READ
or
WRITE
operations are performed.

Table of Contents

Related product manuals