Memory Segment - Data Segment (DS) - (ES, FS, GS)
The availability of four data segments permits efficient and secure access to different types of data structures.
For example, four separate data segments might be created:
- one for the data structures of the current module,
- another for the data exported from a higher-level module,
- a third for a dynamically created data structure,
- and a fourth for data shared with another program.
To access additional data segments, the application program must load segment selectors for these segments into the DS, ES, FS, and GS registers, as needed.
|General Purpose Register||Name||Use|
|EBX||Base||Pointer to data in the DS segment|
|ESI||Source Index||Pointer to data in the segment pointed to by the DS register; source pointer for string operations, Used as a pointer to a source in stream operations|
|EDI||Destination Index||Pointer to data (or destination) in the segment pointed to by the ES register; destination pointer for string operations, Used as a pointer to a destination in stream operations|