delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/09/09:36:12

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GNU pointers
Date: Wed, 8 Jul 1998 17:18:15 -0300
Organization: University of New Brunswick
Lines: 14
Message-ID: <Pine.SOL.3.96.980708171516.3501B-100000@sol.sun.csd.unb.ca>
References: <nqMo1.151$on1 DOT 1333824 AT news2 DOT voicenet DOT com>
NNTP-Posting-Host: sol-alt1.unb.ca
Mime-Version: 1.0
In-Reply-To: <nqMo1.151$on1.1333824@news2.voicenet.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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).

	Endlisnis
[I have a pyramid of wingyness]

- Raw text -


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