Mail Archives: djgpp/1997/12/02/22:53:09
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 <eliz AT is DOT elta DOT co DOT il>
> To: Tan Pinghui <tanph AT bj DOT col DOT com DOT cn>
> 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?
- Raw text -