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.
Operating system is Raspbian running on Pi B model.
Thank you in advance for any help, if you require any clarifications please let me know!
EDIT : 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.
Example :
.global main
.func main
main:
mov r1, #19
mov r2, #11
add r0, r1, r2
bx lr
In the above case, r0 would hold the value 30. I want to write that value to a text file.