NEC CP/M-86 System Reference Manual page 121

Advanced personal computer
Table of Contents

Advertisement

BIOS Disk Definition Tables
Given
n
disk drives, the DPHs are arranged in a table whose first row of 16 bytes
corresponds to Drive 0, and whose last row corresponds to drive
n-1.
The table
appears as follows.
DPBASE
00
XLTOO
0000
0000
0000
DIRBUF
DBPOO
CSVOO
ALVOO
01
XLT01
0000
0000
0000
DIRBUF
DBP 01
CSV01
ALV01
(and so forth through)
The label DPBASE defines the offset of the DPH table relative to the beginning of
the operating system.
A responsibility of the SELDSK subroutine, defined in Chapter 5, is to return the
offset of the DPH from the beginning of the operating system for the selected drive.
The following sequence of operations returns the table offset, with a value ofOOOOH
returned if the selected drive does not exist.
NDISKS
EQU
8
;NUMBER OF DISK DRIVES
SELDSK:
;SELECT DISK N GIVEN BY CL
MOV
BX,OOOOH
;READY FOR ERR
CMP
CL,NDISKS
;N BEYOND MAX DISKS?
JNB
RETURN
;RETURN IF SO
;0
<=
N
<
NDISKS
MOV
CH,O
;DOUBLE (N)
MOV
BX,CX
;BX
=
N
MOV
CL,4
;READY FOR
*
16
SHL
BX,CL
;N
=
N
*
16
MOV
CX,OFFSET DPBASE
ADD
BX,CX
;DPBASE
+
N
*
16
RETURN:
RET
;BX - .DPH (N)
7-3

Advertisement

Table of Contents
loading

Table of Contents