Date: Wed, 11 Dec 1996 23:55:24 -0500 (EST) From: Michael Phelps To: Eli Zaretskii cc: hars AT dutch DOT nl, djgpp AT delorie DOT com Subject: Re: DOS/BIOS direct Floppy access In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 11 Dec 1996, Eli Zaretskii wrote: > > On 10 Dec 1996 hars AT dutch DOT nl wrote: > > > registers.h.dh = test_drive ; // drive 0x00=A 0x01=B > ^^ > Check your references. This should be DL, not DH. > > > registers.x.ss = registers.x.sp = 0 ; > > You should also zero out the registers.x.flags field. If you don't, it > will work most of the time, but bite you one day. (Btw, it's best to use > the `__dpmi_int' library function which does all this zeroing for you.) > > I also recommend to reset the drive (Int 13h/AH=0) after every > unsuccessful call to function 02h, as some drives will report bad status > forever and ever if you don't reset them. > Thanks for catching the error. This is a documentation error for the disk access portion of the DJGPP Book project (http://www2.ari.net/flyboy/filedisk.txt). I will get around to correcting and modernizing it. ---Michael Phelps morphine AT cs DOT jhu DOT edu CH3 | N / | ______/ | / \ CH2 _____/ \__|__ // \\ / | \\ // \\______/___CH2 \\ \ / \ / \______/ \_____/ / ------ \ / \ OH \ / OH O Morphine