segment register (segment selector)

Submitted by Anonymous
on May 31, 2008 - 12:18am

What I would like to know is :
1) how the value of segment register is filled? by who ?

my understanding is when compile generates the segments for a particular processes, it generates the object code and where some instructon might be loading the value...

actually seg,ent selector points to the gdt.....
how does the compiler know that which value to be put in segment selector so it points to the correct entry in GDT ?

please reply..
thanks.

which OS?

on
May 31, 2008 - 4:42am

which operating system are you talking about? the last operating system where compilers and programs had to deal with multiple segments/selectors was win3.1, i think. in 16 bit times this was necessary; with 32 bit offsets it got possible to address all of a program's memory as one segment.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.