;; strlen.asm ;;
global strlen

section .text
strlen: ; < (string address) > (string length)
	push ebp
	mov ebp, esp

	mov eax, [ebp+8]
	xor ecx, ecx
.lp:
	cmp byte [eax+ecx], 0
	je .quit
	inc ecx
	jmp short .lp

.quit:
	mov eax, ecx
	mov esp, ebp
	pop ebp
	ret
