Im new to assembly and I've to write the memmove function in assembly x86-64, and it said :
The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.
Nevertheless, I don't find a way to save a temporary string in assembly, and that's why I am posting this.
I tried to put in rax
register, but I got a segmentation fault :
mov r8b, byte [rsi + rcx] ; rsi is source string
mov byte [rax + rcx], r8b
By the way, I'm using nasm -f elf64 memmove.asm
on my build
Thank you.