x86 Assembly Language Reference Manual

Move Segment Registers (movw)

movw	sreg,r/m16
movw	r/m16, sreg


r/m16 -> Sreg

Sreg -> r/m16


movw copies the first operand to the second operand, including data from a descriptor. The descriptor table entry for the selector contains the data for the register. The DS and ES registers can be loaded with a null selector without causing an exception. Use of DS or ES however, causes a #GP(0), and no memory reference occurs.

All interrupts are inhibited until after the execution of the next instruction, after a movw into SS. Special actions and checks result from loading a segment register under Protected Mode.

movw %CS, 5(%ebx)
 movw %(%ebx), %CS