Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!ralf From: ralf+@cs.cmu.edu (Ralf Brown) Newsgroups: comp.os.msdos.programmer Subject: Re: Insert disk message... Message-ID: <13283@pt.cs.cmu.edu> Date: 5 Jun 91 03:33:33 GMT References: <$d4Hl83l@cs.psu.edu> Distribution: comp Organization: School of Computer Science, Carnegie Mellon Lines: 33 In article <$d4Hl83l@cs.psu.edu> melling@cs.psu.edu (Michael D Mellinger) writes: }Is there a way to avoid the "Insert disk in B drive message..." when I }change the A drive to B from within my MS C(6.0) program on a single }floppy system? Right now it always prompts the user to insert a disk There is a DOS call for DOS 3.2 and up. For earlier versions, you'll need to poke a byte in low memory (0050h:0004h if memory serves). INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP AX = 440Eh BL = drive number (00h=default,01h=A:,etc) Return: CF set on error AX = error code (01h,0Fh) (see AH=59h) CF clear if successful AL = 00h block device has only one logical drive assigned 1..26 the last letter used to reference the drive (1=A:,etc) SeeAlso: AX=440Fh,INT 2F/AX=122Bh ----------21440F----------------------------- INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP AX = 440Fh BL = physical drive number (00h=default,01h=A:,etc)) Return: CF set on error AX = error code (01h,0Fh) (see AH=59h) CF clear if successful drive now responds to next logical drive number Note: maps logical drives to physical drives, similar to DOS's treatment of a single physical floppy drive as both A: and B: SeeAlso: AX=440Eh,INT 2F/AX=122Bh -- {backbone}!cs.cmu.edu!ralf ARPA: RALF@CS.CMU.EDU FIDO: Ralf Brown 1:129/53 BITnet: RALF%CS.CMU.EDU@CARNEGIE AT&Tnet: (412)268-3053 (school) FAX: ask DISCLAIMER? Did | It isn't what we don't know that gives us trouble, it's I claim something?| what we know that ain't so. --Will Rogers