Mail Archives: djgpp/1995/12/20/01:52:17
On Tue, 19 Dec 1995, Justin Ward wrote:
> I have this program that uses BIOS calls to read the sectors of a
> disk. biosdisk() works just fine, except when there's some disk error
> (disk not in drive, read error, write error, write protected disk,
> etc). I have a feeling the error arises because when there's a disk
> error, int 0x13 (I think) is called. And of course this makes a whole
> big mess of anything running in protected mode. So, how can I fix this
Most probably, your assumption that Int 13h is making a mess out of
protected mode is wrong, and the real problem is how does your program
handle disk errors. DJGPP programs don't usually have any trouble
whatsoever with Int 13h, or else they'd crash each time you read or write
to a disk file. Moreover, `biosdisk' itself calls Int 13h from protected
mode, and it does work.
Handling errors which happen in Int 13h calls is a bit tricky. It is
described in the Interrupt list
(ftp://ftp.coast.net/SimTel/msdos/info/inter48?.zip), under the various
Int 13h functions. Or you can post a part of your pogram which deals
with this together with an explanation of how does it fail and in what
circumstances exactly, and somebody will have an answer for you.
- Raw text -