From: James Webb Newsgroups: comp.os.msdos.djgpp Subject: Re: Detecting connected disk drives Date: Tue, 21 Jan 1997 17:26:44 +1100 Organization: Electrical Engineering, University College UNSW ADFA Australia Lines: 29 Message-ID: <32E461A4.41C67EA6@ee.adfa.oz.au> References: NNTP-Posting-Host: 131.236.30.20 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Shawn Hargreaves wrote: > . . . or detect whether disk B really exists, but I have no idea > how to do either. . . Shawn! I have no idea if this will be useful (as I have no idea whan an Allegro is!), but if you want to stuff around with interrupts and assembly (there is heaps of chat on this newsgroup about both), try: Untried #1: Issue a BIOS interrupt INT 11H, and test bits 6 & 7 in the AX upon return. These bits indicate the number of attatched diskette drives. (00 = 1, 01 = 2, 10 = 3, and 11 = 4). OR... tried #2: (Sorry about the Intel syntax!) MOV AH,15H MOV DL,0 ;To test for drive B, use MOV DL,1 INT 13H CMP AH,0 JZ DRIVE_A_NOT_PRESENT ; ie AH = 0 if drive not present Hope this is useful! Chow, James ------------------------------------------------------------------------ "Life would be so much easier if we could just look at the source code." ------------------------------------------------------------------------