Answer the question
In order to leave comments, you need to log in
What can be improved in this feature?
Good afternoon!
There is a function to check strings on nasm. Please tell me if it can be improved somehow
strcmp: ; stdcall
push ebp
mov ebp, esp
push ecx
push edx
xor ecx, ecx
mov eax, [ebp + 8]
mov ebx, [ebp + 12]
.loop:
mov dh, [eax + ecx]
mov dl, [ebx + ecx]
cmp dh, dl
jne .end_not_equal
test dh, dh
jz .end_equal
inc ecx
jmp .loop
.end:
pop edx
pop ecx
mov esp, ebp
pop ebp
ret
.end_not_equal:
mov eax, 0
jmp .end
.end_equal:
mov eax, 1
jmp .end
Answer the question
In order to leave comments, you need to log in
can it be improved somehow?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question