Reputation:
I've been recently studying the 80x86 assembly language with nasm. However, one of those codes that i've been working on pops up an error! Unfortunately, i don't understand why... Would you give me a hand?
.data and .bss
segment .data
minho dd 100
ilseob dd 200
segment .bss
extern _hello
extern _hello2
first .text with no error.
mov eax, [minho]
mov [_hello], eax
mov eax, [ilseob]
mov [_hello2], eax
second .text with an error.
mov dword[_hello], [minho]
mov dword[_hello2], [ilseob]
invalid combination of opcode and operands
Because i'm a newbie in assembly language, there might be a mistake or a mis-understanding...
Upvotes: 0
Views: 46
Reputation: 58437
mem,mem
is not a valid combination of operands for MOV
. That is, there's no variant of MOV
that moves data directly from memory to memory.
Consult the instruction set reference when you're in doubt over which operands you can use.
Upvotes: 2