-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcat.s
40 lines (31 loc) · 1.13 KB
/
ft_strcat.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
34
35
36
37
38
39
40
# **************************************************************************** #
# #
# ::: :::::::: #
# ft_strcat.s :+: :+: :+: #
# +:+ +:+ +:+ #
# By: alaulom <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/01/07 13:50:45 by alaulom #+# #+# #
# Updated: 2016/01/20 16:40:11 by alaulom ### ########.fr #
# #
# **************************************************************************** #
;char *ft_strcat(char *s1, char *s2);
global _ft_strcat
section .text
_ft_strcat:
push rdi
cmp rsi, 0
je _ret
_s1:
cmp byte[rdi], 0
je _s2
inc rdi
jmp _s1
_s2:
cmp byte[rsi], 0
je _ret
movsb
jmp _s2
_ret:
pop rax
ret