memory - Assembler: How are segments used in 32bit systems? -
from know, in days of 16bit pc's had segment registers contain address of each type of segment , access offset ss:[edi], take value contained in edi offset stack segment.
now know in 32bit systems, have gdt (global descriptor table) , ldt (local descriptor table), segments contain index table , offset calculated point right memory address.
is understanding correct?
push dword ptr ss:[ebp+8] ; basicbof.00401000
so statement such mean on 32bit os (xp sp2)?
segment registers contain selectors. each selector index in either global or local descriptor table, plus security level requested.
for example:
mov ds, 0x0000
will put selector 0 table 0 (gdt), level 0 access ds. (this special register, used null pointer testing).
the tables contain base + length information each selector, no longer limited 64k (but might 0 4gb).
the best way learn these reading (freely available) intel processor documents.
edit: link
Comments
Post a Comment