Memory Segmentation
Four registers are used to refer to four segments on the 16-bit x86 segmented memory architecture. DS (data segment), CS (code segment), SS (stack segment), and ES (extra segment). Another 16-bit register can act as an offset into a given segment, and so a logical address on this platform is written segment:offset, typically in hexadecimal notation. In real mode, in order to calculate the physical address of a byte of memory, one left-shifts the contents of the appropriate register 4 bits, and then adds the offset.
For example the logical address 7522:F139 yields the 20-bit physical address:
Note that this process leads to aliasing of memory, such that any given physical address may have multiple logical representations. This means that comparison of pointers in different segments is a complicated process.
In protected mode, the GDT and LDT are used for this purpose.
Since segments refer to successive 16-byte areas of memory, 16 bytes is known as a "paragraph".
Read more about this topic: Intel Memory Model
Famous quotes containing the word memory:
“Twenty or thirty years ago, in the army, we had a lot of obscure adventures, and years later we tell them at parties, and suddenly we realize that those two very difficult years of our lives have become lumped together into a few episodes that have lodged in our memory in a standardized form, and are always told in a standardized way, in the same words. But in fact that lump of memories has nothing whatsoever to do with our experience of those two years in the army and what it has made of us.”
—Václav Havel (b. 1936)