2024-02-24 07:40:53 +00:00
|
|
|
global ft_strcpy
|
|
|
|
|
|
|
|
ft_strcpy:
|
|
|
|
xor rax, rax
|
|
|
|
.loop:
|
|
|
|
cmp byte [rsi + rax], 0
|
|
|
|
je .done
|
2024-02-26 01:38:45 +00:00
|
|
|
mov dl, byte [rsi + rax]
|
|
|
|
mov byte [rdi + rax], dl
|
2024-02-24 07:40:53 +00:00
|
|
|
inc rax
|
|
|
|
jmp .loop
|
|
|
|
.done:
|
2024-02-26 01:38:45 +00:00
|
|
|
mov byte [rdi + rax], 0
|
2024-02-24 07:40:53 +00:00
|
|
|
mov rax, rdi
|
|
|
|
ret
|