diff options
Diffstat (limited to 'ft_strcpy.s')
| -rw-r--r-- | ft_strcpy.s | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ft_strcpy.s b/ft_strcpy.s index 820d970..1857933 100644 --- a/ft_strcpy.s +++ b/ft_strcpy.s @@ -1,27 +1,27 @@ -# **************************************************************************** # -# # -# ::: :::::::: # -# ft_strcpy.s :+: :+: :+: # -# +:+ +:+ +:+ # -# By: cacharle <marvin@42.fr> +#+ +:+ +#+ # -# +#+#+#+#+#+ +#+ # -# Created: 2019/11/22 03:04:28 by cacharle #+# #+# # -# Updated: 2019/11/22 21:18:38 by cacharle ### ########.fr # -# # -# **************************************************************************** # +; **************************************************************************** ; +; ; +; ::: :::::::: ; +; ft_strcpy.s :+: :+: :+: ; +; +:+ +:+ +:+ ; +; By: cacharle <marvin@42.fr> +;+ +:+ +;+ ; +; +;+;+;+;+;+ +;+ ; +; Created: 2019/11/22 03:04:28 by cacharle ;+; ;+; ; +; Updated: 2019/11/22 21:18:38 by cacharle ;;; ;;;;;;;;.fr ; +; ; +; **************************************************************************** ; -.globl _ft_strcpy +global _ft_strcpy -# char *ft_strcpy(char *dst, const char *src); +; char *ft_strcpy(char *dst, const char *src); _ft_strcpy: - mov rax, rdi # dst - mov rbx, rsi # src + 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 ptr [rbx + rcx], 0 + cmp byte [rbx + rcx], 0 jne FT_STRCPY_LOOP - mov byte ptr [rax + rcx], 0 + mov byte [rax + rcx], 0 ret |
