Miscellany
public text v1 · immutable .file "mystrlen.c"
.text
.globl mystrlen
.type mystrlen, @function
mystrlen:
movq $0 , %rax # set return value to 0
while:
movq (%rdi), %rsi # read bytes from memory
cmpq %rsi , 0 # compares value pointed to by first arg to zero
je end # return if value is zero
# else
incq %rax # increment return value by 1
incq %rdi # increment string pointer by 1
jmp while # return to while
end:
ret