Date: Thu, 2 Dec 1999 13:25:08 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Prashant TR cc: Gareth Williams , DJGPP Mailing list Subject: Re: Setting a variable's selector? In-Reply-To: <014a01bf3cb6$f7733420$3af838ca@home-computer> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 2 Dec 1999, Prashant TR wrote: > >This is not necessarily true: in protected mode, at least in > >principle, you can set up a selector to span any range of addresses in > >the 4GB address space. The code in ROM does have an address, so it > >can be inluded. > > I meant that you cannot write something there in the ROM. I understood the original message to mean that some chunk of writable memory should be set up to be part of the same selector as the read-only code in ROM. > And btw, Eli, are you talking about are the .text, .data and .bss > segments (or sections). What I said is true for any segment in protected mode. But note that I was talking about segments and selectors, not about sections. .text, .data and .bss are sections, not segments. In the DJGPP run-time memory layout, .data and .bss (and also the stack and the heap) are accessed via one selector, and .text via another. (However, both these selectors have the same base address and the same limit, so they basically point to the same memory, albeit with different access rights.)