[comp.sys.ibm.pc.misc] How to determine what type of drive?

ts@uwasa.fi (Timo Salmi) (11/30/90)

In article <1990Nov29.145358.14577@cbnewsm.att.com> mds1@cbnewsm.att.com (marc.d.sayre) writes:
>
>I have been reading a lot of books about dos bios etc and know
>about bios calls and dos calls. I know how to get information of the
>boot block fat table etc etc. But how in the hell do you determine
>without having a floppy in your drive, what type of drive you are dealing
>with?? Usually you can read this of the floppy disk if it already has been
>formatted.

If you program in Turbo Pascal you might find the /pc/ts/tspas22.arc
Turbo Pascal units collection of use in your problem.

The wares are available by anonymous ftp from chyde.uwasa.fi, Vaasa,
Finland, 128.214.12.3, or by using our mail server (use the latter
if, and only if you don't have anonymous ftp).  If you are not
familiar with anonymous ftp or mail servers, I am prepared send
prerecorded instructions on request.  (If you don't get the
instructions from me within a few days, it will mean that your email
address cannot be reached by a simple email reply, and you wouldn't
be able to utilize the mail server anyway.)

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

fisher@sc2a.unige.ch (11/30/90)

In article <1990Nov29.145358.14577@cbnewsm.att.com>, mds1@cbnewsm.att.com (marc.d.sayre) writes:
> 
> I have been reading a lot of books about dos bios etc and know
> about bios calls and dos calls. I know how to get information of the
> boot block fat table etc etc. But how in the hell do you determine
> without having a floppy in your drive, what type of drive you are dealing
> with?? Usually you can read this of the floppy disk if it already has been
> formatted.
> 
> I 've been wanting to know this for a while and therefor are posting this to
> all ms-dos wizzards out there!!!!

I've been using a program by Russell Nelson (1988) called "df" for some time
now.  It shows the drive usage for all drives.  As it comes in C source, I
know it uses a dos data structure known as the "list of lists", containing
pointers to "drive info" tables.  Maybe these tables contain what you're
looking for.

For more information about these tables, you should check the famous "list
of interrupts" available at many sites.  If you'd like to have this "df"
program, e-mail me a note.

Markus Fischer, Dpt. of Anthropology, Geneva CH

fisher@sc2a.unige.ch (11/30/90)

In article <1990Nov30.105321.322@sc2a.unige.ch>, fisher@sc2a.unige.ch writes:
> I've been using a program by Russell Nelson (1988) called "df" for some time
> now.  It shows the drive usage for all drives.  As it comes in C source, I
> know it uses a dos data structure known as the "list of lists", containing
> pointers to "drive info" tables.  Maybe these tables contain what you're
> looking for.

Stupid of me!  What you're really looking for is the program called "infoplus".
Gives you all sort of system information, and on page 13 the description of
all drives...  Oh yes, and it comes with pascal source.

Sorry for the double follow-up.

Markus Fischer, Dpt. of Anthropology, Geneva CH

nee@cf_su14.Salomon.Com (Robert Nee) (12/01/90)

You may be able to get this information from INT 13h
service 8.  This returns the number of heads, sectors,
and tracks for a given drive.  From this information
you can determine what type of drive is installed.
I don't remember exactly how to use this call but
you should be able to find documentation on it somewhere.

To determine the drive try use

Tracks	Sectors	Type
------	-------	----
80	18	3 1/2 (1.44MB)
80	15	5 1/4 (1.2 MB)
80	9	3 1/2 (720 KB)
40	9	5 1/4 (360 KB)

Hope this help.

Robert F. Nee