About
The data segment are a segments that stores the data bit type.
Articles Related
Usage
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.
Management
Segment Selector
The segment selector that locate the data segment are the DS, ES, FS, and GS segment register.
Register
The DS, ES, FS, and GS registers registers contains the segment selector for their respective data segment.
General Purpose Register | Name | Use |
---|---|---|
EBX | Base | Pointer to data in the DS segment |
Stream Operations | ||
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 |