www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/11/17:57:33

Date: Tue, 12 Nov 1996 11:42:48 +0000
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: DJGPP pointers
To: Ely Wilson <fletch AT netdoor DOT com>
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
References: <Pine DOT GSO DOT 3 DOT 94 DOT 961111132053 DOT 20921A-100000 AT netdoor DOT com>

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.

- Raw text -


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