delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/06/14:20:42

Date: Mon, 6 Dec 1999 17:54:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Gareth Williams <ghw2002tii AT hotmail DOT com>
cc: prashant_news AT yahoo DOT com, djgpp AT delorie DOT com
Subject: Re: Setting a variable's selector? - Clarification - I hope.
In-Reply-To: <19991206154415.3773.qmail@hotmail.com>
Message-ID: <Pine.SUN.3.91.991206174753.21836C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 6 Dec 1999, Gareth Williams wrote:

> I am guessing (going to try) the 
> __dpmi_simulate_real_mode_procedure_retf_stack function is the only way to 
> get a stack to my real mode function, and again to get it back.

If the real-mode procedure accepts arguments, then yes, you should use 
__dpmi_simulate_real_mode_procedure_retf_stack.  Warning: this function 
has a known bug (corrected in v2.03), but it is usually harmless, so 
unless you have trouble, you can safely forget about it.

> Then can I 
> use _go32_dpmi_allocate_dos_memory to allocate the array needed for the 
> pnpbios to return data in?  (I pass a pointer to the structure/array it 
> returns the data there.)

I'm not sure I understand all the details.  Why don't you use the 
transfer buffer?

Also, make sure the pointer you pass on the stack looks to the real-mode 
procedure as a real-mode far pointer (i.e., two 16-bit words, and in the 
right order).

- Raw text -


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