www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/15/18:35:23

From: "John S. Fine" <johnfine AT erols DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: a complication with real mode function callback.
Date: Thu, 15 Apr 1999 19:07:45 -0400
Lines: 25
Message-ID: <37167141.64FA@erols.com>
References: <7f5hap$k75$1 AT orudios DOT magnet DOT at>
Mime-Version: 1.0
X-Trace: Y6gOXVFotgHZB87uHos0Bm07JKugHhtZcPK4lVIvIpk=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 15 Apr 1999 23:09:18 GMT
X-Mailer: Mozilla 3.01 (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Mark Usher wrote:

> The definition I have for the event handler is this.
> On entry DS:DX points to the start of an event handler. The first 8 bytes
> are reserved and will be filled in by the driver.
> 0-3   Pointer to next handler code part (offset 8)
> 4-7   Pointer to previous handler (offset 0)
> 8+    Executable code

> 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 ?
> Due to the stub, wrapper etc I thought I'd better post the question for some
> more informed suggestons.

  I'm not an expert, but I think you need to allocate some real
mode space (at least 13 bytes) and set up that structure and
pass the address of that as the even handler.  In the code
portion of that you put a JMP to the callback address from
DPMI.

  I don't know any way to do it that doesn't require that
extra level of JMP.
-- 
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/

- Raw text -


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