delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/18/07:27:28

Date: Tue, 18 Mar 1997 15:08:47 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Mike Weber <mweber AT cc DOT gatech DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: ptrs in djgpp
In-Reply-To: <332e15c5.216592@news>
Message-ID: <Pine.SUN.3.91.970318150420.17465f-100000@is>
MIME-Version: 1.0

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 -


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