Mail Archives: djgpp/1997/03/16/08:16:47
On Fri, 14 Mar 1997, Daryl Cooper wrote:
> can anyone tell me how to get a selector:offset pair from a pointer in
> c. I need this for some lowlevel ASM stuff, and it would be really
> helpfull if anyone could help me with this, Thanx
For a pointer to an ordinary DJGPP variable, a call to _my_ds() will
get you the selector, and the offset is just the address itself.
However, AFAIK, almost no low-level programming requires to know the
selector of a pointer, so please explain more about what are you
trying to accomplish, because you might go in the wrong direction.
- Raw text -