clean: fix indentation

This commit is contained in:
starnakin 2024-09-03 10:28:47 +02:00
parent a5ccf7df95
commit 3632b34e40
4 changed files with 47 additions and 49 deletions

View File

@ -1,22 +1,21 @@
section .note.GNU-stack noalloc noexec nowrite progbits
section .text
global ft_strcmp
section .text
global ft_strcmp
ft_strcmp:
mov rcx, 0
loop:
mov dl, [rsi + rcx]
mov bl, [rdi + rcx]
ft_strcmp:
mov rcx, 0
loop:
mov dl, [rsi + rcx]
mov bl, [rdi + rcx]
cmp bl, 0
je out
cmp bl, 0
je out
cmp bl, dl
jne out
cmp bl, dl
jne out
inc rcx
jmp loop
out:
sub bl, dl
movsx rax, bl
ret
inc rcx
jmp loop
out:
sub bl, dl
movsx rax, bl
ret

View File

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

View File

@ -1,13 +1,13 @@
section .text
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
ft_strlen:
mov rcx, 0
loop:
cmp BYTE [rdi + rcx], 0
je out
inc rcx
jmp loop
out:
mov rax, rcx
ret

View File

@ -1,7 +1,6 @@
section .text
global ft_write
ft_write:
mov rax, 1
syscall
ret
section .text
global ft_write
ft_write:
mov rax, 1
syscall
ret