0

This is a simple strlen function with registers documented:
;in rdi - string to measure
;out rax - len
.my_strlen:
test rdi, rdi
jz ptr_error
or rcx, 0xFFFFFFFFFFFFFFFF
mov al, 0
repne scasb
mov rax, 0xFFFFFFFFFFFFFFFF
sub rax, rcx
ret
NOTE: This code assumes a "C-Style string"; that is, a NUL...