Of course this should not be a replacement for the original LEN().
It's to show you how to get the string-len of a dynamic string inside your own ASM-Block.
'---------------------------------------------------------------------------
' PBLEN Ermittelt Länge eines dynamischen Strings in PB (wie LEN())
FUNCTION String_Len(sNum AS STRING) AS DWORD
!mov edi,sNum ;get the pointer to the string information
!mov edi,[edi] ;get the pointer to the string contents
!mov edx,[edi-4] ;edx now has len of sNum
!mov function,edx ;write answer to function
END FUNCTION
'---------------------------------------------------------------------------