The x86 mov
instruction does not support memory-to-memory moves.
Have a look at Volume 2: Instruction Set Reference, namely the MOV
instruction. There are reg <- reg
, mem <- reg
, and reg <- mem
forms, but no mem <- mem
.
To move data from memory to memory, one must either use an intermediate register, or the movs
instruction, which moves a value from address DS:ESI
to ES:EDI
. This is the reason those registers are named as such (source index, and destination index).