delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/09/27/08:44:57

Date: Fri, 27 Sep 1996 14:39:27 +0200 (MET DST)
From: Mark Habersack <grendel AT ananke DOT amu DOT edu DOT pl>
Reply-To: grendel AT ananke DOT amu DOT edu DOT pl
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Function to return phys drive
In-Reply-To: <Pine.SUN.3.91.960926184644.17397B-100000@is>
Message-ID: <Pine.NEB.3.95.960927143336.24686D-100000@ananke.amu.edu.pl>
MIME-Version: 1.0

On Thu, 26 Sep 1996, Eli Zaretskii wrote:

>Thanks.  However, I don't want to use undocumented calls unless we cannot 
>do without them.  What about the `Get DPB' call (Int 21h/AH=32h)?  Can't 
>I use the "unit number in the device driver" field there?
No, actually you can't. I have checked that first HD drive is 'unit No 2' in
the drive on DOS 7 and 'unit No 1' on DOS 3.30 (on my system - with one FDD
and 2 HDDs). So it seems that this information is useless - it looks like in
DOS 7 there was ONE driver for all block devices while DOS 3.30 (an maybe
other versions also) has separate drivers for FDD and HDD. The call I use in
getphysdrive() exists in all DOSish systems but I'm not sure as to NT -
probably it is also supported in the NT DOS sub-system.

>Anyway, unless `sync' crashes or causes warning/error messages in some 
>environment, I won't be hard-pressed to either use undocumented DOS/BIOS 
>calls nor put too complicated code into that function.  If a simple 
>enough way exists to compute the drive ID, adding it will be worthwhile.
>
I think that getphysdrive() is quite simple, though...

---------------------------------------------------------------------------
You can't brush me under the carpet, you can't hide me under the stairs,
The custodian of your private fears, your leading actor of yesteryear,
Who as you crawled out of the alleys of obscurity, sentenced to rejection
 in the morass of anonymity. You who I directed with a lover's will, you
 who I let hypnotise the lens. You who I let bathe in the spotlights glare.
You who wiped me from your memory like a greasepaint mask, just like a
 greasepaint mask...
-------------------- http://ananke.amu.edu.pl/~grendel -------------------

- Raw text -


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