delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/29/03:47:35

From: Lars Erdmann <lars DOT erdmann AT arcor DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Hooking protected mode interrupts
Date: Thu, 30 May 2002 08:01:05 +0200
Organization: Arcor
Lines: 30
Message-ID: <3CF5C021.A8111DF9@arcor.de>
References: <3CF4EF43 DOT BC5325C9 AT arcor DOT de> <1659-Tue28May2002210430+0300-eliz AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: dialin-212-144-128-001.arcor-ip.net
Mime-Version: 1.0
X-Trace: newsread1.arcor-online.net 24750 NG bGFycy5lcmRtYW5u
X-Complaints-To: abuse AT arcor-online DOT net
NNTP-Posting-Date: Wed, 29 May 2002 06:04:31 +0000 (UTC)
X-Mailer: Mozilla 4.61 [de] (OS/2; U)
X-Accept-Language: de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

thanks for the info.
I just don't use a stack in the interrupt handler, only global vars.
Getting a size of a function is not that difficult in C, you can get
size by subtracting address of following function from address of the
function to lock (there are some helpers in the Allegro library).

Many thanks for clarifying that the wrapper functions ARE locked in
memory.

Lars

Eli Zaretskii schrieb:
> 
> > From: Lars Erdmann <lars DOT erdmann AT arcor DOT de>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Wed, 29 May 2002 17:09:55 +0200
> >
> > I have successfully hooked a protected mode interrupt.
> > Now I have read in some note, that the protected mode wrapper that is
> > obtained via _go32_dpmi_alloc_iret_wrapper (or so) or via
> > _go32_chain_protected_mode_interrupt_vector (or so) is not locked by
> > djgpp.
> 
> No, that's not true: the wrapper code is locked, but the code and the
> data of your handler are not.  In particular, locking the stack is
> difficult, as is locking code of a C function.
> 
> See section 18.9 of the DJGPP FAQ list for more details.

- Raw text -


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