www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/11/19:15:54

Date: Wed, 11 Dec 1996 17:21:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: hars AT dutch DOT nl
cc: djgpp AT delorie DOT com
Subject: Re: DOS/BIOS direct Floppy access
In-Reply-To: <199612102145.QAA19099@delorie.com>
Message-ID: <Pine.SUN.3.91.961211171511.9242B-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019