1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
4 <TITLE>80386 Programmer's Reference Manual -- Opcode LMSW
</TITLE>
7 <B>up:
</B> <A HREF=
"c17.htm">
8 Chapter
17 --
80386 Instruction Set
</A><BR>
9 <B>prev:
</B><A HREF=
"LLDT.htm"> LLDT Load Local Descriptor Table Register
</A><BR>
10 <B>next:
</B><A HREF=
"LOCK.htm"> LOCK Assert LOCK# Signal Prefix
</A>
14 <H1>LMSW -- Load Machine Status Word
</H1>
17 Opcode Instruction Clocks Description
19 0F
01 /
6 LMSW r/m16
10/
13 Load r/m16 in machine status word
25 MSW := r/m16; (*
16 bits is stored in the machine status word *)
30 LMSW loads the machine status word (part of CR0) from the source
31 operand. This instruction can be used to switch to Protected Mode; if so,
32 it must be followed by an intrasegment jump to flush the instruction
33 queue. LMSW will not switch back to Real Address Mode.
35 LMSW is used only in operating system software. It is not used in
38 <H2>Flags Affected
</H2>
42 <H2>Protected Mode Exceptions
</H2>
44 #GP(
0) if the current privilege level is not
0; #GP(
0) for an illegal
45 memory operand effective address in the CS, DS, ES, FS, or GS
46 segments; #SS(
0) for an illegal address in the SS segment; #PF(fault-code)
49 <H2>Real Address Mode Exceptions
</H2>
51 Interrupt
13 if any part of the operand would lie outside of the effective
52 address space from
0 to
0FFFFH
54 <H2>Virtual
8086 Mode Exceptions
</H2>
56 Same exceptions as in Real Address Mode; #PF(fault-code) for a page
61 The operand-size attribute has no effect on this instruction. This
62 instruction is provided for compatibility with the
80286;
80386 programs
63 should use
<A HREF=
"MOVRS.htm">MOV
</A> CR0, ... instead.
67 <B>up:
</B> <A HREF=
"c17.htm">
68 Chapter
17 --
80386 Instruction Set
</A><BR>
69 <B>prev:
</B><A HREF=
"LLDT.htm"> LLDT Load Local Descriptor Table Register
</A><BR>
70 <B>next:
</B><A HREF=
"LOCK.htm"> LOCK Assert LOCK# Signal Prefix
</A>