Selecting the Code Segment to Execute

In order for it to fetch instructions from an area of memory, the programmer must inform the processor what code segment the instructions are to be fetched from. This is accomplished by loading a 16-bit value (a selector) into the Code Segment (CS) register. In Real Mode, this value represents the upper 16 bits of the 20 bit start address of the segment in memory. In Protected Mode, the value loaded into a segment register is interpreted as illustrated in Figure 8-1 on page 134.

Figure 8-1. Segment Selector

Any of the following actions loads a value into the CS segment register, causing the processor to begin ...

Get The Unabridged Pentium 4 IA32 Processor Genealogy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.