Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!caen!spool.mu.edu!uunet!nwnexus!apex!rennyk From: rennyk@apex.com (Renny K) Newsgroups: comp.os.msdos.programmer Subject: Re: Insert disk message... Message-ID: <1991Jun19.230431.9963@apex.com> Date: 19 Jun 91 23:04:31 GMT References: <$d4Hl83l@cs.psu.edu> Reply-To: rennyk@apex.UUCP (Renny K) Distribution: comp Organization: Apex Computer Co., Redmond WA Lines: 34 In article campbell@cutmcvax.cs.curtin.edu.au (Trevor George Campbell CC361) writes: >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 >>into drive B and to hit RETURN even if there is already a disk in the >>drive. > >I suspect NOT as DOS always thinks (and makes it look like) there are 2 floppy >disks on a machine with only one real physical drive. I'm not sure if there >is a way to detect if only one floppy or two are available (system config. >byte / and interrupt (?? int 11h) spring to mind as possabilities. From memory >there is a byte or two that tell how many drives are attached), although >you would have to check these and then write you program to (itself) do the >redirecting of all requests to drive B to drive A (ie: change the filename's >that you open)... > Yes there is a way to do this. DOS keeps track of which disk is currently in effect (i.e. which logical drive is being used A: or B:) in a location in the BIOS area in low memory. I don't know off hand what the location is. E-mail me if you'd like me to look it up, or if you have any references try them. (Peter Norton's Programmer's Guide is good). Renny -- ------------------------------------------------------------------------------- Renny Koshy rennyk@apex.com Apex Computer, Redmond, WA.