add: makefile

This commit is contained in:
2024-08-28 15:47:11 +02:00
parent f4f9159a88
commit e4ee25979b
7 changed files with 62 additions and 36 deletions

0
src/ft_strcmp.asm Normal file
View File

19
src/ft_strcpy.asm Normal file
View File

@ -0,0 +1,19 @@
section .text
global ft_strcpy
ft_strcpy:
mov rcx, 0
loop:
mov al, [rsi + rcx]
mov [rdi + rcx], al
cmp al, 0
je out
inc rcx
jmp loop
out:
mov rax, rcx
ret

14
src/ft_strlen.asm Normal file
View File

@ -0,0 +1,14 @@
section .note.GNU-stack noalloc noexec nowrite progbits
section .text
global ft_strlen
ft_strlen:
mov rcx, 0
loop:
cmp BYTE [rdi + rcx], 0
je out
inc rcx
jmp loop
out:
mov rax, rcx
ret