Date: Tue, 31 Jul 2001 16:51:22 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Christian Merz cc: djgpp AT delorie DOT com Subject: Re: ds==ss why? In-Reply-To: <3b66ad7a$0$414$7d5a4a58@news.compuserve.de> 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 Tue, 31 Jul 2001, Christian Merz wrote: > can I change the behavior of gcc concerning that ds==ss? Not easily. GCC generates 32-bit code which assumes a flat address space with no segmentation, so it uses 32-bit addresses to reference variables on the stack and in the data section. To make this work, the DJGPP startup code loads DS and SS with the same selector, and assumes that these selectors stick. If you break this assumption, programs will start crashing high and low, unless you modify the GCC code-generating back-end to produce instructions with 48-bit addresses that include the selector as well as the offset.