X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Eph Newsgroups: comp.os.msdos.djgpp Subject: calling a RM function which is placed below 1 MB Date: Wed, 23 Jul 2008 05:21:53 -0700 (PDT) Organization: http://groups.google.com Lines: 35 Message-ID: NNTP-Posting-Host: 80.70.169.36 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1216815713 9856 127.0.0.1 (23 Jul 2008 12:21:53 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Wed, 23 Jul 2008 12:21:53 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: d77g2000hsb.googlegroups.com; posting-host=80.70.169.36; posting-account=jZZPxgoAAAAqQ_zmNV7SH4j6l4lfRyOd User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 abgpro01 (NetCache NetApp/6.0.6) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hey, I've problems to get a call to __dpmi_simulate_real_mode_procedure_retf_stack working correctly. My problem is, that I need to call a 16Bit real Mode function placed in Memory below 1MB, which expects three parameters to be placed on the RM Stack.(see comments in the code). Below the code, how I tried to use the function: --------------- __dpmi_regs regs; struct { unsigned long u1; unsigned long u2; unsigned long u3; } stack; memset(&stack, 0, sizeof(stack)); stack.u1 = parm1; // expected at bp[14] stack.u2 = parm2; // expected at bp[10] stack.u3 = parm3; // expected at bp[06] memset(®s, 0, sizeof(__dpmi_regs)); regs.x.cs = seg; // segment of the function entry regs.x.ip = ofs; // offset of the function entry __dpmi_simulate_real_mode_procedure_retf_stack(®s, sizeof(stack) / 2, &stack); --------------- What am I doing wrong? Can anyone please point it out! Ciao Ephraim