Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It means the instruction is referencing memory in the Data Segment - and can pretty much be ignored on modern OSes, since they run with a flat address space model (code, data and stack segments all refer to the same memory range, and memory protection is handled with paging).</p> <h2>EDIT:</h2> <p>A little elaboration - note that, to keep things simple, this is in the context of 32bit protected mode running Windows.</p> <p>A <em>segment register</em> (CS,DS,SS,ES,FS,GS) holds a <code>selector</code> pointing to a <code>descriptor</code>. There's two descriptor tables: global (<a href="http://en.wikipedia.org/wiki/Global_Descriptor_Table" rel="noreferrer">GDT</a>) and local (<a href="http://en.wikipedia.org/wiki/Local_Descriptor_Table" rel="noreferrer">LDT</a>), and the selector has a bit indicating which to use. Windows (almost?) exclusively uses the global table.</p> <p>A <em>descriptor</em> is <strong>basically</strong> a <em>{beginning-address, size}</em> pair - there's more to it, but that's outside the scope of this post.</p> <p>Windows uses a <a href="http://en.wikipedia.org/wiki/Flat_memory_model" rel="noreferrer">Flat Memory Model</a>: each process has a 4GB address space starting at memory address 0, and uses <a href="http://en.wikipedia.org/wiki/Virtual_memory#Paged_virtual_memory" rel="noreferrer">paging</a> to isolate processes from eachother.</p> <p>Since processes have this flat view of the world, they run with all segments using {0, 4GB} descriptors - and thus, instead of allocating per-process descriptors, Windows can use only a few global descriptors and have all processes use those.</p> <h2>EDIT 2:</h2> <p>The <a href="http://en.wikipedia.org/wiki/Portable_Executable" rel="noreferrer">Portable Executable</a> format defines <code>sections</code>, which are unrelated to the x86 <code>segments</code> - even if there's some conceptual overlap. The PE EXEs can have pretty much any section layout you wish, but the normal is to split into (at least) code (read/execute), data (read/write), resources (readonly?). Splitting the executable into sections makes it possible to apply x86 page-level memory protection to the memory ranges.</p> <h2>EDIT 3:</h2> <p>While the normal segments don't change per-process, Windows uses the <code>FS</code> register to point to the per-<em>thread</em> <a href="http://en.wikipedia.org/wiki/Win32_Thread_Information_Block" rel="noreferrer">TIB</a> structure.</p> <h2>EDIT 4:</h2> <p>See <a href="http://pdos.csail.mit.edu/6.828/2005/readings/i386/s05_01.htm" rel="noreferrer">this</a> for an overview. This is from an old document on the 80386, but the information still applies.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload