3-350
INSTRUCTION SET REFERENCE
LDS/LES/LFS/LGS/LSSLoad Far Pointer (Continued)
Operation
IF Protected Mode
THEN IF SS is loaded
THEN IF SegementSelector = null
THEN #GP(0);
FI;
ELSE IF Segment selector index is not within descriptor table limits
OR Segment selector RPL
?
CPL
OR Access rights indicate nonwritable data segment
OR DPL
?
CPL
THEN #GP(selector);
FI;
ELSE IF Segment marked not present
THEN #SS(selector);
FI;
SS
<
SegmentSelector(SRC);
SS
<
SegmentDescriptor([SRC]);
ELSE IF DS, ES, FS, or GS is loaded with non-null segment selector
THEN IF Segment selector index is not within descriptor table limits
OR Access rights indicate segment neither data nor readable code segment
OR (Segment is data or nonconforming-code segment
AND both RPL and CPL > DPL)
THEN #GP(selector);
FI;
ELSE IF Segment marked not present
THEN #NP(selector);
FI;
SegmentRegister
<
SegmentSelector(SRC) AND RPL;
SegmentRegister
<
SegmentDescriptor([SRC]);
ELSE IF DS, ES, FS or GS is loaded with a null selector:
SegmentRegister
<
NullSelector;
SegmentRegister(DescriptorValidBit)
<
0; (*hidden flag; not accessible by software*)
FI;
FI;
IF (Real-Address or Virtual-8086 Mode)
THEN
SegmentRegister
<
SegmentSelector(SRC);
FI;
DEST
<
Offset(SRC);