Mail Archives: djgpp/1998/03/08/07:06:19
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 -