Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ecsvax.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!ecsvax!bet
From: bet@ecsvax.UUCP (Bennett E. Todd III)
Newsgroups: net.micro,net.micro.pc
Subject: Re: How does a program detect disks on a PC?
Message-ID: <473@ecsvax.UUCP>
Date: Mon, 23-Sep-85 14:05:39 EDT
Article-I.D.: ecsvax.473
Posted: Mon Sep 23 14:05:39 1985
Date-Received: Wed, 25-Sep-85 03:27:54 EDT
References: <1054@phs.UUCP>
Reply-To: duccpc!bet@ecsvax.UUCP (Bennett E. Todd III)
Followup-To: net.micro.pc
Distribution: net
Organization: Duke University Computation Center
Lines: 25
Xref: watmath net.micro:12078 net.micro.pc:5377


(I'm moving this discussion to net.micro.pc -- that's where it belongs).
It appears to me, from reading the documentation, that the correct way
to determine how many disks DOS thinks there are is through the DOS
function call Select Disk (0E hex).
	mov	ah,19h	; Current disk -- returned in AL
	int	21h
	mov	dl,al
	mov	ah,0Eh	; set disk to that in DL -- returns total
	int	21h	; number available in AL
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? Is there a correct way to find out how many disk devices
DOS knows about? And what about ... Naomi!!!

-Bennett
-- 

"Hypocrisy is the vaseline of social intercourse." (Who said that?)

Bennett Todd -- Duke Computation Center, Durham, NC 27706-7756; (919) 684-3695
UUCP: ...{decvax,seismo,philabs,ihnp4,akgua}!mcnc!ecsvax!duccpc!bet