delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/27/07:00:37

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Segment and Offset of Variables -- HOW?
Date: 27 Mar 2003 11:48:31 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 24
Message-ID: <b5uoef$k86$1@nets3.rz.RWTH-Aachen.DE>
References: <n2n48vcfklse00bgdpdeu53ps2ep1bq5cv AT 4ax DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1048765711 20742 137.226.32.75 (27 Mar 2003 11:48:31 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 27 Mar 2003 11:48:31 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Radical wrote:

> I wish to know how I would obtain the Address of a Variable,
> such that it can also be broken down into its Segment and
> Offset,

The answer has been given to you, and it is that your question is
meaningless.  Addresses of variables in DJGPP don't *have* such a
thing as a segment and an offset in the meaning you're asking for.

If you want to port a piece of code from some 16-bit compiler to DJGPP
that uses this, you have to find out

1) whether they're really still needed after moving to 32-bit mode
2) what their usage actually means

and then modify those code sections to work in DJGPP.

The FAQ explains this in more detail, as usual.  Check section 17.7, e.g.:
17.7 What should I do with those "near" and "far" declarations?

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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