-1

Assembly Command mov [r8], [rax]

Also In a computer system, what does having interrupts get you? If you do not have interruptions, what would be your other option?

1 Answers1

1

mov cannot be use to move data memory to memory : see this for all the possible combination with the mov opcode.

you can do that instead:

mov rax, [rax]
mov [r8], rax

also your code contained a second flaw: mov [r8], [rax] do not indicate the size of operation.

LTBS46
  • 215
  • 10
  • Another way how to copy 1,2,4 or 8 bytes from memory addressed by `r8` to memory addressed by `rax` is `mov rsi,r8` `mov rdi,rax` and then either `movsb`, `movsw`, `movsd` or `movsq`.. – vitsoft Dec 15 '21 at 18:57