Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site gumby.UUCP
Path: utzoo!linus!philabs!cmcl2!harvard!seismo!uwvax!gumby!dan
From: dan@gumby.UUCP
Newsgroups: net.micro,net.micro.pc
Subject: Re: How does a program detect disks on a PC?
Message-ID: <455@gumby.UUCP>
Date: Thu, 26-Sep-85 18:02:14 EDT
Article-I.D.: gumby.455
Posted: Thu Sep 26 18:02:14 1985
Date-Received: Tue, 1-Oct-85 10:01:46 EDT
References: <1054@phs.UUCP> <473@ecsvax.UUCP>
Distribution: net
Organization: U of Wisconsin CS Dept
Lines: 17
Xref: linus net.micro:10884 net.micro.pc:5156

> Unfortunately, the number DOS is returning seems to bear little
> relationship to the number of disk devices DOS currently knows about.
> Running DOS 3.10 on an IBM-PC/XT I get 5 drives. This doesn't change
> whether or not I have my ramdisk device driver installed. Does this call
> work correctly in any version of DOS? Is the number it returns useful
> for anything?

I suspect the number you are getting is the number of the highest
available drive letter.  Huh?, you ask?  As of version 3.1, DOS
reserves some extra drive letters for you to assign to pathnames
using the subst command.  The default highest drive letter is E:,
thus the number 5.  There is a command for the config.sys file to
raise or lower that number; it cannot be made lower than the number
of installed drives (including RAM drives, I think).

Check page 4-24 of the DOS 3.1 manual for a description of the 
LASTDRIVE command.