www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/16/03:35:11

Date: Sun, 16 Sep 2001 09:31:59 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Mark & Candice White <mhewii AT home DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: addressing question
In-Reply-To: <r6Yo7.112292$K6.46105123@news2>
Message-ID: <Pine.SUN.3.91.1010916092730.7026I-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 16 Sep 2001, Mark & Candice White wrote:

> GCC and its dos port DJGPP are made for flat mem models
> where ds,es,fs,gs,ss all point to the same mem, and cs is all so
> the same phisical mem.

This is not true: the DJGPP run-time environment is not flat, it's 
segmented.  However, the main (data/code) segment is very large and can 
grow as needed, to become as large as the underlying DPMI host allows.

So as long as you stay with ``normal'' C code, you can make-believe that 
you are running in a flat address space.  But as soon as you try to 
access conventional memory or some memory-mapped device, you will 
discover the segmented nature of the DJGPP address space which will force 
you to use _farpeekb, dosmemput, movedata, and other similar functions 
that set either FS or GS to point to another segment.

- Raw text -


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