O'Reilly logo

The Unabridged Pentium 4 IA32 Processor Genealogy by Bob Colwell, Tom Shanley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Data Segments

Selecting and Accessing a Data Segment

The post-286 processors have four data segment registers: DS, ES, FS and GS. They identify up to four separate data segments (in memory) that can be accessed by the currently executing program.

To access data within one of the four data segments, the programmer must first load a 16-bit value into the respective data segment register. In Real Mode, the value in a data segment register specifies the upper 16 bits of the 20 bit memory start address of the data segment. In Protected Mode, the value selects a segment descriptor in either the GDT or LDT. Figure 9-1 on page 160 illustrates the format of a data segment descriptor. The example

 mov ax, 4f36 ;load ds register mov ds, ax ; mov al, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required