Date: Tue, 1 Jun 1999 09:43:52 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: leroy cc: djgpp AT delorie DOT com Subject: Re: DJGPP - real mode procedures. In-Reply-To: <37533A3A.B6A84588@hitech.net.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.