32-bit x86 assembly programming: Difference between revisions

Content deleted Content added
No edit summary
Fredrik (talk | contribs)
m diffrent -> different
Line 80:
Each segment-register points to a descriptor. Each descriptor points to a well defined data area. If the descriptor that GS points defines its data area to starts at 0x000A0010, and to end at 0x000C0000, and the EAX-register contains the value 0x0001C234, then the combination GS:EAX will point to 0x000BC244.
 
The GDT and LDT contains ''descriptors'' that points to data areas that has diffrentdifferent properities. Most often, there is one null-descriptor, 2 data descriptors, 2 code descriptors and a multiply of TSS-descriptors.
Most often, the code- and data-descriptors points to an area in the memory that starts at 0 and ends at 4 gigabytes. This way, descriptors and segment registers becomes almost invisible for the application programmer. This is called ''flat memory''-model. In flat memory, segment registers lose their importance. Only offset-registers is used to point out the addresses.