-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memset.s
33 lines (28 loc) · 1.09 KB
/
ft_memset.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_memset.s :+: :+: :+: #
# +:+ +:+ +:+ #
# By: edelangh <edelangh@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2015/03/24 14:40:20 by edelangh #+# #+# #
# Updated: 2015/03/24 14:55:04 by edelangh ### ########.fr #
# #
# **************************************************************************** #
section .text
global _ft_memset
; rdi rsi rdx
_ft_memset:
push rbp
mov rbp, rsp
mov rbx, rdi
mov rax, rsi
mov rcx, rdx
cmp rdi, 0
je end
rep stosb
end:
mov rax, rbx
mov rsp, rbp
pop rbp
ret