title: NASM: move from memory to memory via registers
body: <p>I am difficulties moving data from memory to another memory in <code>bss</code>. My implementation somewhat works however when moving some weird characters appear in the first couple bytes and half of my string is also missing while the other half is fine. </p>
  
  <p>This is the value I get when I print out <code>message</code> == <code>�F@elcome to the new life</code></p>
  
  <p>I need all the help, what am I missing? I went over my code a hundred times.</p>
  
  <pre><code>    section .data
  hello:       db  "Hello, Welcome to the new life! Lets begin the journey.",10
  hello_len:   equ  $ - hello
  
      section .bss
  message: resb 255
  
      section .text
  
  mov rdi, hello
  mov rsi, message
  
  msg_into_message:
      cmp byte [rdi], 10          ; hello ends with a new line char
      je end_count
      mov al, byte [rdi]
      mov byte [rsi], al
      inc rsi
      inc rdi
      jmp msg_into_message
  
  end_count:
      mov [message], rsi
      ret
  
      ; Prints message
      mov rsi, message
      mov rdx, hello_len
      call pre_print
      syscall
  </code></pre>