ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/20/19:35:51

Sender: nate AT cartsys DOT com
Message-ID: <371D1690.C1D587E1@cartsys.com>
Date: Tue, 20 Apr 1999 17:06:40 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: a complication with real mode function callback.
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990420124140 DOT 4017A-100000 AT is>
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:
> 
> On Thu, 15 Apr 1999, Mark Usher wrote:
> 
> > How can I be sure of reserving exactly 8 bytes at the start of my event
> > handler that I pass with go32_dpmi_allocate_real_mode_callback_retf ?
> 
> I have never tried anything like that, but I think this is
> impossible.  The first bytes of the callback are used by the callback
> code itself, and the callback is created by the DPMI server.
> 
> So the only feasible way to achieve this would be to bypass the
> callback and _go32_dpmi_allocate_real_mode_callback_retf entirely, and
> instead to write your own real-mode handler in assembly.

Someone else suggested the idea, which I think makes a lot of sense, of
allocating a tiny buffer which has the magic 8 bytes followed by a jmp.

The opcode for `jmp far' is 0xea.  Then 'seg:ofs' as a longword.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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