delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/08/07:06:19

Date: Sun, 8 Mar 1998 14:06:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Ned Ulbricht <nedu AT ee DOT washington DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: hdparm lets your IDE disk spin down
In-Reply-To: <34FF57C2.1B42@ee.washington.edu>
Message-ID: <Pine.SUN.3.91.980308140542.22686V-100000@is>
MIME-Version: 1.0

On Thu, 5 Mar 1998, Ned Ulbricht wrote:

> Look at int 21h, ah=32 which gets the drive parameter block for a
> specific drive. The DPB associates drive letters with assigned device
> drivers.

Can you explain how Int 21h/AH=32h helps to solve the problem of
associating a drive letter such as D: with the physical drive number
such as 81h?  2132 gives you the unit number within the device driver,
but that's not enough.

Some questions for which I cannot see (easy) solutions are:

     - How do you know what is the number of the zeroth unit number
       (usually 80h for C:, but how do you know it)?

     - What about disks which are partitions of a single drive?

     - What about disk(s) connected to secondary disk controller?

     - What about CDs and SCSI drives and other atrocities?

You could of course use the above call to get a pointer to the entire
chain of the DPB's, and then walk that chain, but that's hardly an
easy way, and I'd imagine it won't work e.g. on Windows 95.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019