The data segment are a segments that stores the data bit type.
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:
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.
The segment selector that locate the data segment are the DS, ES, FS, and GS segment 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 |