delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/06/14:39:09

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200001061624.RAA06442@father.ludd.luth.se>
Subject: Re: The endless int31 hooking debugging continued
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Thu, 6 Jan 100 17:24:17 +0100 (MET)
Cc: djgpp AT delorie DOT com (DJGPP)
In-Reply-To: <Pine.SUN.3.91.1000106180654.22382E-100000@is> from Eli Zaretskii at "Jan 6, 0 06:15:21 pm"
X-Mailer: ELM [version 2.4ME+ PL15 (25)]
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Eli Zaretskii:
> On Thu, 6 Jan 100, Martin Str|mberg wrote:
> I think I can help you ;-)
> 
> >         movw %ss, %ax
> >         movw %ax, _org_ss
> >         movw _my_ds, %ax
> >         movw %ax, %es
> >         movw %ax, %ss
> 
> You changed SS, but left ESP at its previous value.  This is a disaster 
> waiting to happen.

Ooops (Blush)! Thanks!

> What you need to do is to save ESP in some variable before calling the 
> DPMI functions, then use that saved value inside the hook (decrement it 
> by some slack, to guard against usage inside the DPMI functions).
> 
> Or, better still, don't call any library functions from within the hook; 
> then you don't need to worry about SS and ESP.

Yes, but I need call cputs to get some debug information out.


Pettersson, Symphony 13,

							MartinS

- Raw text -


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