Mail Archives: djgpp/1998/07/09/18:10:58
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 -