Mail Archives: djgpp/1998/01/12/06:32:55
Eli Zaretskii wrote:
>
> On Mon, 12 Jan 1998, Petr Mrazek wrote:
>
> > I need to port program which uses harderr, hardretn and hardresume
> > functions. How to write harderr I think I know (this is FAQ, isn't it?).
> > But how to write these two others I don't know.
>
> This is a minefield! The DPMI spec explcicitly disallows to terminate a
> DPMI program from within an Int 24h handler. Therefore, most DPMI servers
> trap Int 24h and silently fail the call that caused it. For those which
> don't, the DJGPP startup code installs a handler for Int 24h that does the
> same.
That's probably right!!
>
> In other words, for all practical purposes, your DJGPP program already
> behaves as if `harderr' were called, and as if it calls `hardresume' with
> a fail code when the handler is called. And changing this behavior is
> AFAIK not easy and will probably get you into problems with the ways
> different DPMI servers deal with this issue.
>
> I would therefore suggest not to mess with this at all. If the original
> code only wants to trap the ubiquitous "Abort, Retry, Fail?" prompt, then
> DJGPP already does it for you. But if the application really needs to
> take any path other than Fail, it is in general not possible in DPMI.
That's false!! cos I've done it!
it's very simple but I don't know what'll happen if the program exits
in the handler.
I've write a function but it doesn't respect the BC standard. There's
only one function that trap the interrupt. Your handler only have to ask
for an answer and return the code FAIL,etc... I don't have it under my
hand but i'll bring it to you soon!!
--
^ ^ ^
| | |
+-+-+ Fabrice ILPONSE
| <fabrice AT asim DOT lip6 DOT fr>
|
|
-
- Raw text -