Hi there, I was wondering If anyone can help me with this. I want to print or write to a file and save the values of the registers running a simple Hello world program for example. Can somebody guide me what I need to know so I can do that? Or print to the monitor the values for example of the R0-R4? Any help or thoughts? Can I do this combining C or C++? Many thanks!!
You should explain what you want to achieve with your dump of the registers. Maybe you try to achieve something else where a different approach is more suitable. Since you are talking about C, C++ the registers are assigned by the compiler so each little change in the code or compiler settings might lead to the same data being stored in a different register. Only by writing assembler you can control directly which register you use. Basically you can dump the registers using a debugger by single stepping through the assembler instructions and copy the current register value. Keep in mind that a simple looking prinft/cout contains lots of assembler instructions which might use your registers.