He encontrado una implementacion de strlen en ASM, podriais ayudarme a entenderla?
Enlace: http://www.betamaster.us/blog/?p=471
Saludos.
Código (asm) [Seleccionar]
; Will return the length of a null-terminated string
; The result will be written to ECX
;
; Usage:
; hello_tmp db "test",0
; ...
; ccall strlen, hello_tmp
proc strlen, strInput
mov ecx,-1
mov al,0
mov edi,[strInput]
cld
repne scasb
not ecx
dec ecx
ret
endp
Enlace: http://www.betamaster.us/blog/?p=471
Saludos.