Hi guys,
I was wondering how I can print to the console the contents of the Stack?
Lets say for example that I have put into the R2 the value of 5 and then push the R2 to the stack
Is there any way by calling the printf function or by making a syscall to print the value of '5' by using the SP?
MOV R2, #5
PUSH {R2}
After those commands the SP points at the address where the 5 has been pushed right? How I can use the SP(or the memory address location that points ) as a variable for a printf function?
Any thoughts or ideas how I can implement a scenario like this?
Thanks!
I was wondering how I can print to the console the contents of the Stack?
Lets say for example that I have put into the R2 the value of 5 and then push the R2 to the stack
Is there any way by calling the printf function or by making a syscall to print the value of '5' by using the SP?
MOV R2, #5
PUSH {R2}
After those commands the SP points at the address where the 5 has been pushed right? How I can use the SP(or the memory address location that points ) as a variable for a printf function?
Any thoughts or ideas how I can implement a scenario like this?
Thanks!