Difference between revisions of "Assembler:Commands:MOV"
Jump to navigation
Jump to search
Line 47: | Line 47: | ||
mov qword ptr [rax],0 | mov qword ptr [rax],0 | ||
+ | |||
+ | mov rax,SomeSymbol | ||
+ | |||
+ | mov rax,[SomeSymbol] | ||
+ | |||
+ | mov SomeSymbol,rax | ||
+ | |||
+ | mov [SomeSymbol],rax | ||
Revision as of 04:45, 14 March 2017
command mov size destination, source
Sets the destination to the source.
Copies the second operand (source operand) to the first operand (destination operand). The source operand can be an immediate value, general-purpose register, segment register, or memory location; the destination register can be a general-purpose register, segment register, or memory location. Both operands must be the same size, which can be a byte, a word, or a doubleword.
Command Parameters
Parameter | Description |
---|---|
size OPTIONAL | The size of the operand to move (based on registery size if not given) |
destination | The destination operand |
source | The source operand |
Examples
mov eax,0
mov rax,-1
mov [eax],0x9
mov [rax],1
mov [rax],rsi
mov eax,[rax]
mov rax,[rax]
mov byte ptr [rax],0
mov word ptr [rax],0
mov dword ptr [rax],0
mov qword ptr [rax],0
mov rax,SomeSymbol
mov rax,[SomeSymbol]
mov SomeSymbol,rax
mov [SomeSymbol],rax