Date: Tue, 10 Nov 1998 10:27:44 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: KECSKEMÉTI BALÁZS cc: djgpp AT delorie DOT com Subject: Re: a bunch of not so newbie questions ( i think ) In-Reply-To: <7240rt$bdj$1@pollux.matav.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id DAA04995 Reply-To: djgpp AT delorie DOT com On Sun, 8 Nov 1998, KECSKEMÉTI BALÁZS wrote: > 1) What's in the segment registers under DJGPP? Protected-mode selectors. DS holds the selector for the data segment, CS holds the selector for the code segment, etc. > I guess that there is a constant value, because i > measured that pointers under DJGPP are 32 bits. They are constant as long as the code produced by GCC runs (interrupts and exceptions change that), and as long as you don't change them in your code. The segmented architecture of x86 is still with you, even in protected mode, it's just that there's much less reason to change segments, since they are so large. But sometimes, like when accessing DOS memory, you need to use a different selector even in protected mode. > 2) If i allocate some (DOS) memory in an external assembly > function, then how do i access it in the C program? This is in the FAQ (section 18.4). You need to use special functions like _farpeekb or dosmemget/dosmemput. The FAQ (v2/faq211b.zip from the same place you get DJGPP) explains a whole lot more details about this. > Anyway, what's a page fault _exactly? What are the possible > causes of it? This is explained in section 12.2 of the FAQ.