Mail Archives: djgpp/1996/12/11/19:15:54
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 -