<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 10 May 1984 13:16:01-PDT (Thu)
From   : hplabs!sdcrdcf!sdcsvax!sdccsu3!loral!simard@Ucb-Vax.ARPA
Subject: Re: BIOS Techniques, a question.

       The disk parameter block (DPB) whose address is returned ih
       the HL pair when SELDSK is called contains a pointer to the
       disk parameter header which defines the characteristics
       of the current drive which  are to apply to all further calls to
       SECTRAN, SETSEC (indirectly), READ and WRITE,
       until SELDSK is called again.  As long as the
       DPH/DPB data agree with the disk currently accessed, CP/M will
       be happy.  The only error indications that the BIOS returns
       to the BDOS (main body of CPM) is success (A=0) or failure
       (A<>0) from READ or WRITE, or that SELDSK was asked to select
       an invalid logical drive (HL returned = 0).  If you can determine
       what kind of disk is installed in a physical drive dynamically,
       the check should be placed in SELDSK.  The pointer in the
       DPB to the appropriate DPH would then be set by SELDSK
       to reflect the outcome of the
       check as well as set up the driver for the disk controller
       as appropriate.  If that is not possible,
       then you might want to implement multiple
       logical drives for each physical drive (for example, if your system
       has two physical drives, A: and B: could be SS/SD, C: and D: could
       be the same drives, but SS/DD, etc.).  The operator would select
       the drive according to the type of disk installed. 

       Note: I am referring to DPB's and DPH's from memory.  I
       may have them reversed.  What I refer to as DPB is the
       16-byte block unique to each logical drive, containing
       pointers to the applicable DPH, sector translation table,
       allocation and check vectors, and whose address is returned by
       SELDSK.  The DPH in the above is the
       data set defining the size, reserved tracks, block size,
       etc., and which may be shared by numerous logical drives.
       
       Ray Simard
       Loral Instrumentation, San Diego, CA.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>