add other basic functions and test with them

This commit is contained in:
2025-03-29 19:54:58 +01:00
parent 76cf33dd1c
commit b6ad45ab6d
17 changed files with 311 additions and 6 deletions

View File

@ -0,0 +1,29 @@
section .text
global ft_strcpy
ft_strcpy:
test rdi, rdi
je err
test rsi, rsi
je err
push rdi
jmp loop_start
condition_check:
mov al, [rdi]
test al, al
je end
loop_start:
mov rax, [rsi]
mov [rdi], rax
lea rdi, [rdi + 1]
lea rsi, [rsi + 1]
jmp condition_check
end:
pop rax
ret
err:
xor rax, rax
ret