19 lines
305 B
NASM
19 lines
305 B
NASM
section .text
|
|
global ft_strcmp
|
|
|
|
ft_strcmp:
|
|
mov rax, rdi
|
|
mov rbx, rsi
|
|
loop:
|
|
mov al, [rax]
|
|
mov bl, [rbx]
|
|
cmp al, bl
|
|
jne out
|
|
cmp al, 0
|
|
je out
|
|
inc rax
|
|
inc rbx
|
|
jmp loop
|
|
out:
|
|
sub rax, rbx
|
|
ret |