3-404
INSTRUCTION SET REFERENCE
MOV—Move (Continued)
Operation
DEST
<
SRC;
Loading a segment register while in protected mode results in special checks and actions, as
described in the following listing. These checks are performed on the segment selector and the
segment descriptor it points to.
IF SS is loaded;
THEN
IF segment selector is null
THEN #GP(0);
FI;
IF segment selector index is outside descriptor table limits
OR segment selectorÂ’s RPL
?
CPL
OR segment is not a writable data segment
OR DPL
?
CPL
THEN #GP(selector);
FI;
IF segment not marked present
THEN #SS(selector);
ELSE
SS
<
segment selector;
SS
<
segment descriptor;
FI;
FI;
IF DS, ES, FS or GS is loaded with non-null selector;
THEN
IF segment selector index is outside descriptor table limits
OR segment is not a data or readable code segment
OR ((segment is a data or nonconforming code segment)
AND (both RPL and CPL
>
DPL))
THEN #GP(selector);
IF segment not marked present
THEN #NP(selector);
ELSE
SegmentRegister
<
segment selector;
SegmentRegister
<
segment descriptor;
FI;
FI;
IF DS, ES, FS or GS is loaded with a null selector;
THEN
SegmentRegister
<
segment selector;
SegmentRegister
<
segment descriptor;
FI;