title: Write to file in ARM Assembly
body: <p>I'm attempting to write the integer contents of a register to a text file in ARM Assembly. 
  I have been reading with little success - I have deduced from reading the technical manual I will require some SWI instruction, but I cannot for the life of me find a concrete example of how to do this.</p>
  
  <p>Operating system is Raspbian running on Pi B model.</p>
  
  <p>Thank you in advance for any help, if you require any clarifications please let me know!</p>
  
  <p><strong>EDIT :</strong> To clarify, I am assembling and executing my code successfully using GCC. I want to store the values of my data registers to a text file.</p>
  
  <p><strong>Example :</strong> </p>
  
  <pre><code>.global main
  .func main
  
  main:
      mov r1, #19
      mov r2, #11
      add r0, r1, r2
      bx lr
  </code></pre>
  
  <p>In the above case, r0 would hold the value 30. I want to write that value to a text file.</p>