From: locke AT mcs DOT net (Peter Johnson) Newsgroups: comp.os.msdos.djgpp Subject: Re: NT4 DPMI BUG (303h, Allocate Real-Mode Callback)--ATTN: DJ Deloie, Shawn Hargreaves, Eli Zaretskii Date: Fri, 3 Dec 1999 23:59:24 -0600 Organization: BiLogic Productions Lines: 25 Message-ID: References: NNTP-Posting-Host: isr4186.urh.uiuc.edu X-Newsreader: MicroPlanet Gravity v2.12 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article , locke AT mcs DOT net says... > As the location of data variables in DJGPP is obviously not controllable > at build time, I devised the following workaround that should probably be > included in src/libc/dpmi/api/d0303.s: > > 1) Get a selector from DPMI (function 0000h) > 2) Get the base address of the DS selector (DPMI function 0006h) > 3) Set the base address of the selector allocated in 1) to the value > found in 2) plus the offset of the registers variable (ARG2). > 4) Set the limit of the selector allocated in 1) to 32h (the size of the > dpmi registers structure). > 5) Pass the created selector and offset 0 as ES:EDI to 303h > > Obviously, this selector should be saved somewhere so d0304.s can free > it. Also, it would make sense to use this workaround only if the offset is >64k (otherwise its just a waste of selectors). -- Peter Johnson locke AT mcs DOT net :Windows: Where do you want to go today? :Linux: Where do you want to go tomorrow? :FreeBSD: Are you guys coming or what?