Simple puts() function in x64 assembly
Your loop uses 2 jumps (je/jmp) on every iteration!  Jumping is expensive, so a solution that needs only 1 jump (jne) will be more effective.

strlen:
  xor rdx, rdx
  dec rdx          ; This compensates for the INC that is happening first.
.next:
  inc rdx
  cmp byte [rsi + rdx], 0
  jne .next
  ret




Do keep things logically together. There's no point in setting RAX before the call to strlen.

puts:
  ; string passed through rsi
  call strlen      ; Result is in RDX

  mov rax, 1
  syscall