delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/09/18:10:58

Date: Thu, 9 Jul 1998 19:17:40 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Endlisnis <s257m AT unb DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: GNU pointers
In-Reply-To: <Pine.SOL.3.96.980708171516.3501B-100000@sol.sun.csd.unb.ca>
Message-ID: <Pine.SUN.3.91.980709191654.15312C-100000@is>
MIME-Version: 1.0

On Wed, 8 Jul 1998, Endlisnis wrote:

> On Wed, 8 Jul 1998, Mark Bidewell wrote:
> ->Does GNU have a way to synthesize pointer addresses (segment : offset) for
> ->their component parts?
> 	If you have 
> void* p;
> short seg = (short)(((int)p>>4)&0xFFFF);
> short off = (short)((int)p & 0xF);
> 
> 	I believe that will do the trick.  (But only if your original
> address was below 1M).

This will NOT work in DJGPP, exactly because all the addresses of the 
variables in DJGPP programs are *above* the 1MB mark.

- Raw text -


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