Intel ARCHITECTURE IA-32 User Manual Page 94

  • Download
  • Add to my manuals
  • Print
  • Page
    / 636
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 93
3-14 Vol. 3A
PROTECTED-MODE MEMORY MANAGEMENT
segment. (This flag should always be set to 1 for 32-bit code and data segments
and to 0 for 16-bit code and data segments.)
Executable code segment. The flag is called the D flag and it indicates the
default length for effective addresses and operands referenced by instruc-
tions in the segment. If the flag is set, 32-bit addresses and 32-bit or 8-bit
operands are assumed; if it is clear, 16-bit addresses and 16-bit or 8-bit
operands are assumed.
The instruction prefix 66H can be used to select an operand size other than
the default, and the prefix 67H can be used select an address size other than
the default.
Stack segment (data segment pointed to by the SS register). The flag is
called the B (big) flag and it specifies the size of the stack pointer used for
implicit stack operations (such as pushes, pops, and calls). If the flag is set,
a 32-bit stack pointer is used, which is stored in the 32-bit ESP register; if
the flag is clear, a 16-bit stack pointer is used, which is stored in the 16-bit
SP register. If the stack segment is set up to be an expand-down data
segment (described in the next paragraph), the B flag also specifies the
upper bound of the stack segment.
Expand-down data segment. The flag is called the B flag and it specifies
the upper bound of the segment. If the flag is set, the upper bound is
FFFFFFFFH (4 GBytes); if the flag is clear, the upper bound is FFFFH
(64 KBytes).
G (granularity) flag
Determines the scaling of the segment limit field. When the granularity flag is
clear, the segment limit is interpreted in byte units; when flag is set, the
segment limit is interpreted in 4-KByte units. (This flag does not affect the
granularity of the base address; it is always byte granular.) When the granu-
larity flag is set, the twelve least significant bits of an offset are not tested when
checking the offset against the segment limit. For example, when the granu-
larity flag is set, a limit of 0 results in valid offsets from 0 to 4095.
Figure 3-9. Segment Descriptor When Segment-Present Flag Is Clear
31
16
15
13
14 12
11
8
7
0
0
Available
D
P
L
TypeS
4
31
0
Available
0
Available
Page view 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 635 636

Comments to this Manuals

No comments