Date: Sun, 16 Sep 2001 09:31:59 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Mark & Candice White cc: djgpp AT delorie DOT com Subject: Re: addressing question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.