MASM32 Downloads
mov ds, es
If the destination operand is a segment register (DS, ES, FS, GS, or SS), the source operand must be a validsegment selector.
In protected mode, moving a segment selector into a segment register automatically causes the segment descriptor information associated with that segment selector to be loaded into the hidden (shadow) part of the segment register. While loading this information, the segment selector and segment descriptor information is validated (see the “Operation” algorithm below). The segment descriptor data is obtained from the GDT or LDT entry for the specified segment selector.
The MOV instruction cannot be used to load the CS register. Attempting to do so results in an invalid opcode exception (#UD). To load the CS register, use the far JMP, CALL, or RET instruction.
push es pop ds
wSeg dw 40h mov es,wSeg