; **************************************************************************** ; ; ; ; ::: :::::::: ; ; ft_strcpy.s :+: :+: :+: ; ; +:+ +:+ +:+ ; ; By: cacharle +;+ +:+ +;+ ; ; +;+;+;+;+;+ +;+ ; ; Created: 2019/11/22 03:04:28 by cacharle ;+; ;+; ; ; Updated: 2019/11/22 21:18:38 by cacharle ;;; ;;;;;;;;.fr ; ; ; ; **************************************************************************** ; global _ft_strcpy ; char *ft_strcpy(char *dst, const char *src); _ft_strcpy: mov rax, rdi ; dst mov rbx, rsi ; src xor rcx, rcx FT_STRCPY_LOOP: mov dl, [rbx + rcx] mov [rax + rcx], dl inc rcx cmp byte [rbx + rcx], 0 jne FT_STRCPY_LOOP mov byte [rax + rcx], 0 ret