cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/01/02:46:22

Date: Tue, 1 Jun 1999 09:43:52 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: leroy <leroy AT hitech DOT net DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: DJGPP - real mode procedures.
In-Reply-To: <37533A3A.B6A84588@hitech.net.au>
Message-ID: <Pine.SUN.3.91.990601094329.19912M-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 Tue, 1 Jun 1999, leroy wrote:

> I have a variable called stack that is initialised like so
> int stack[] = {0x10};
> 
> I then call the function
> __dpmi_simulate_real_mode_procedure_retf_stack(&r, 4, &stack);

This is wrong.  You need to pass either "stack" or "&stack[0]" as the
last parameter.

If that doesn't help, please post a short complete test program that
can be compiled and used to find out what's wrong.

> I'm not so sure how the values for the stack should be passed, so I did
> some assumed values, like 4.  Is this right?

No, 4 is not entirely correct, since "pop dx" only takes 2 bytes (but
I don't think this should matter in your case).

I would really advise to read the relevant parts of the DPMI spec if
you want to mess with low-level stuff like this.  Every `__dpmi_xxx'
function has its corresponding DPMI call that is described in the spec
with much more detail.

- Raw text -


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