Message-Id: <199712030351.LAA10373@public.bta.net.cn> From: "Tan Pinghui" To: "Eli Zaretskii" Cc: Subject: Re: 16-bit & 32-bit mixed coding Date: Wed, 3 Dec 1997 11:52:41 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Precedence: bulk Sorry, my previous mail (and this one) is off topic, it's not related to DJGPP. My real purpose is to ask DJGPP gurus to help me to understand 386's 16-bit & 32-bit segment usage. May be the questions I asked are too general, so here are some specific questions: The code segment is 32-bit, if I set the stack segment to 16-bit and do a "push 0x1000", is the stack pointer SS:ESP or SS:SP? is the value I pushed the word 0x1000 or the double word 0x00001000? ---------- > From: Eli Zaretskii > To: Tan Pinghui > Cc: djgpp AT delorie DOT com > Subject: Re: 16-bit & 32-bit mixed coding > Date: Tuesday, December 02, 1997 8:24 PM > > > On Tue, 2 Dec 1997, Tan Pinghui wrote: > > > I'm very confused by the 386's 16-bit & 32-bit mixing coding. > > Here are some questions, please help. > > > > (1) cs selector refers to 16-bit segment, and ds/es/fs/gs selectors to > > 32-bit segments (D=1), ss to 16-bit segment, how do the instructions > > operate? the stack? the data? > > What exactly are you asking? As far as I could see, the DJGPP's > startup code sets CS, DS and SS to 32-bit segments. Is the question > at all related to how DJGPP programs set up their segment registers?