delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/12/06:32:55

From: Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: hardretn and others
Date: Mon, 12 Jan 1998 11:44:47 +0100
Organization: Universites Paris VI/Paris VII - France
Lines: 45
Message-ID: <34B9F41F.2538@trash.lip6.fr>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980112114122 DOT 1820R-100000 AT is>
NNTP-Posting-Host: asim.lip6.fr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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