For small asm functions, it is often beneficial to use macros, in terms of speed and flexibility. In some cases it produces less binary than making the equivalent procedure call.
zstring a[]="ABCDE"
sys n
macro StrLen(z,le)
{
addr eax,z
mov ecx,eax
{
cmp byte [eax],0
jz exit
inc eax
repeat
}
sub eax,ecx
mov le,eax
}
StrLen(a,n)
print n