-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcpy.s
33 lines (28 loc) · 1.14 KB
/
ft_strcpy.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# **************************************************************************** #
# #
# ::: :::::::: #
# ft_strcpy.s :+: :+: :+: #
# +:+ +:+ +:+ #
# By: masboula <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/03/25 14:51:25 by masboula #+# #+# #
# Updated: 2021/03/25 14:51:28 by masboula ### ########.fr #
# #
# **************************************************************************** #
bits 64
section .text
global ft_strcpy
ft_strcpy :
push rcx
mov rcx, 0
_while :
mov dl, byte [rsi + rcx]
mov byte [rdi + rcx], dl
cmp byte [rsi + rcx], 0
je _return
inc rcx
jmp _while;
_return :
mov rax, rdi
pop rcx
ret