.intel_syntax noprefix .text # String-copying routine. Strings should be null-terminated. # Input: rdi = source string base, rsi = destination string base # No check is done for buffer overflow. strcpy: movb r10b, [rdi] cmpb r10b, 0 je .end movb [rsi], r10b inc rdi inc rsi jmp strcpy .end: ret