title: Shellcode using metasm to read a file and and write it to stdout
body: <p>So I have the below. Have been gleeming what I can off various tutorials on the web but am stuck now with the important of reading the file and writing it to stdout</p>
  <pre><code>_start:
      jmp call_shellcode
  shellcode:
      ; Call sys_open
      pop rsi
      mov rax, 2
      mov rdi, rsi
      mov rsi, 0
      mov rdx, 0
      syscall
  
     ; Call sys_read on the file handle and read it into rsp
     ; Call sys_write to write the contents from rsp to stdout (1)
    
      ; Call sys_exit
      mov rax, 60
      mov rdi, 99
      syscall
  call_shellcode:
      call shellcode
      db '/var/random.txt',0
  </code></pre>