restructure fs
This commit is contained in:
20
std/baseline/str_cmp.asm
Normal file
20
std/baseline/str_cmp.asm
Normal file
@@ -0,0 +1,20 @@
|
||||
global str_cmp
|
||||
|
||||
section .text
|
||||
str_cmp:
|
||||
xor rdx, rdx
|
||||
.loop:
|
||||
mov al, [rsi + rdx]
|
||||
mov bl, [rdi + rdx]
|
||||
inc rdx
|
||||
cmp al, bl
|
||||
jne .not_equal
|
||||
cmp al, 0
|
||||
je .equal
|
||||
jmp .loop
|
||||
.not_equal:
|
||||
mov rax, 0
|
||||
ret
|
||||
.equal:
|
||||
mov rax, 1
|
||||
ret
|
||||
Reference in New Issue
Block a user