x86 Assembly Language Reference Manual

Load Machine Status Word (lmsw)

lmsw    	r/m16


r/m16 -> MSW


The machine status word (part of CR0) is loaded by lmsw from the source operand. lmsw can be used to switch to Protected Mode if followed by an intersegment jump to clear the instruction queue. lmsw cannot switch back to Real Address Mode.

lmsw is not used in application programs. It is used in operating systems.


Load the machine status word from the contents of the effective address (addressed by the EBX register plus an offset of 5):

lmsw 5(%ebx)