Mail Archives: djgpp/1997/03/18/07:27:28
On Tue, 18 Mar 1997, Mike Weber wrote:
> How do pointers work in djgpp? Are they just offsets in the
> current ldt descriptor?
They are offsets from a descriptor pointed to by a selector (DS for data,
CS for code, SS for stack).
> If they are, is there anyway to change the
> segment you are in( without using dpmi stuff)?
If you need to acces data in another segment, allocate a selector for it
and use `_farptr' functions or `movedata'.
> Also if you can change
> the segment, I'm assuming you can change from the current ldt to the
> gdt.
I don't think you can do that on ring-3 programs (which is how DJGPP
programs normally run).
> Sorry -- one last thing -- is there a way to associate a
> segment to a pointer?
Please tell more: which pointer do you need to associate with a segment
(I presume you mean ``selector'') and how do you need to use that
selector?
- Raw text -