delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/21/09:46:48

From: "Andrew Fairburn" <a DOT j DOT fairburn AT durham DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: HELP - dpmi_allocate_real_mode_callback
Date: Wed, 21 Nov 2001 14:37:14 -0000
Organization: University of Durham, Durham, UK
Lines: 28
Message-ID: <9tge0v$7ne$1@sirius.dur.ac.uk>
NNTP-Posting-Host: secom189.dur.ac.uk
X-Trace: sirius.dur.ac.uk 1006353247 7918 129.234.207.189 (21 Nov 2001 14:34:07 GMT)
X-Complaints-To: usenet AT durham DOT ac DOT uk
NNTP-Posting-Date: Wed, 21 Nov 2001 14:34:07 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MSMail-Priority: Normal
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

im trying to use this callback command but it keeps returning the segment
(to be used by the real mode programme to call a func in a protected mode)
as a 16 bit number, i think it should be returning an 8 bit number as the
returned number seems to be out of addressable memory range(SIGSEGV is the
returned error on exec). The code im using folows:-

void rcv(void);
long tempr[0x032];
static __dpmi_regs r;
static __dpmi_raddr realret;

r.x.si = (long)rcv;  /*gets protected mode offset*/
r.x.ds = _my_cs();   /*gets protected mode code segment*/
r.x.ax = 0x0303;   /*int31H function number*/
r.x.es = _my_ds();  /*gets data segment*/
r.x.di = (long)tempr;  /*gets array data offset */

if(__dpmi_allocate_real_mode_callback( rcv, &r, &realret) == -1) exit(32);

rcv is the function trying to be called....

this return 0xfdbc for the segment address into the raddr struct......is teh
function executing wrong?

Thanx,
Andy.


- Raw text -


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