. , , 32- Windows, , 16- , .
When using a 32-bit type pointer, 32-bit systems can access the full virtual address space; therefore fs, Windows contains the key to special structures, such as TEB and PEB. However, in a strict sense with a flat memory model, there is no need for register segments.
Examples (for Windows, 32 bit):
mov eax, dword ptr fs:[18h] ; pointer to TEB
mov eax, dword ptr fs:[30h] ; pointer to PEB
In many modern systems cs, dsthey will refer, for example, to the same area.
source
share