-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcpy.s
30 lines (25 loc) · 1.09 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
# **************************************************************************** #
# #
# :::::::: #
# ft_strcpy.s :+: :+: #
# +:+ #
# By: ikole <ikole@student.codam.nl> +#+ #
# +#+ #
# Created: 2020/03/09 11:36:01 by ikole #+# #+# #
# Updated: 2020/03/09 11:36:02 by ikole ######## odam.nl #
# #
# **************************************************************************** #
global _ft_strcpy
section .text
_ft_strcpy:
mov rax, -1
cmp byte[rsi], 0
jne loop
loop:
inc rax
mov r8b, [rsi + rax]
mov byte[rdi + rax], r8b
cmp byte[rsi + rax], 0
jne loop
mov rax, rdi
ret