Date: Tue, 12 Nov 1996 11:42:48 +0000 From: Bill Currie Subject: Re: DJGPP pointers To: Ely Wilson Cc: djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <328862B8.3F63@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: Ely Wilson wrote: > > On Mon, 11 Nov 1996, Eli Zaretskii wrote: > > > > I need to know what EXACTLY is REALLY stored in pointers..is it a 32bit > > > > It is an offset into a segment pointed by a selector. > > So, is a pointer a selector AND an offset, or just a 32bit offset into a > 4G selector...in which case, how the heck am I supposed to make use of > pointers which use a 16bit base and 16bit offset...i suppose I could calc > the effective addx, huh? Anyhow, which is it? Sel AND offset or jyust an > offset? Thank you for replying, but I'm still not totally clear on this. > > - pleXus - Offset only (32 bit NEAR pointers). Also, the base of the segment can be anywhere in 4GB (this CAN be found using the appropriate dpmi funcion). If you are accessing dos memory, your best bet is to use dosmem*(), or the _far*() functions with _dos_ds as the selector. See the libc docs for more details. Bill -- Leave others their otherness.