[b]Edit, nevermind I figured out that movsb automatically adjusts ESI and EDI[/b]
I just started coding assembly so please excuse my ignorance.
Below is some sample code to copy "hello world" from one variable to another.
I have built and linked this code with no issues and checked that it is working in gdb and it works fine.
My question is, if movsb moves 1 byte at a time and it copies and does not remove the characters from the original HelloWorld buffer, how does this code know it should point to the next byte in the string, when it repeats the movsb?
Look forward to hearing your responses.
.ascii "Hello World"
.lcomm Destination, 50
movl $Destination, %edi
movl $11, %ecx
movl $1, %eax
movl $0, %ebx
0 · ·