From: "John S. Fine" 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/