| <<< The MOV Instruction | Index | XCHG Instruction, Exchanging Integers >>> |
The following example shows several common types of moves that require not one, but two instructions.
; Move immediate to segment register
mov ax, DGROUP ; Load AX with immediate value
mov ds, ax ; Copy AX to segment register
; Move memory to memory
mov ax, mem1 ; Load AX with memory value
mov mem2, ax ; Copy AX to other memory
; Move segment register to segment register
mov ax, ds ; Load AX with segment register
mov es, ax ; Copy AX to segment register
| <<< The MOV Instruction | Index | XCHG Instruction, Exchanging Integers >>> |