delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/19/16:23:17

Date: Sun, 19 Jun 94 15:45:26 EDT
From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock)
To: morphine AT whatever DOT cs DOT jhu DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Catching disk errors
Reply-To: babcock AT cfa DOT harvard DOT edu

> 	I want my programs to be able to successfully catch I/O errors with a
> floppy disk.  This is not a problem if the disk is full, for instance, but if
> there is actually no disk in the drive then I get the DOS "Abort, Retry,
> Fail" message repeatedly on my screen.  What's the easiest way to beat DOS to
> it and have MY program be able to handle a no-disk situation?

The best thing to do is to install a real-mode critical error handler to
catch disk errors.  The real mode handler can either set a flag which the
protected mode code can examine, or it can do a real-mode callback.  I've
posted some code in the past which uses the first method.  Since this
question keeps coming up, I'll try to package it up and upload it to
omnigate. 

- Raw text -


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