Mail Archives: djgpp/2001/09/16/03:35:11
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 -