I want to save the contents of a SPR ( Special Purpose Register ) to a global variable. I don't have much experience in Assembly, but i tried to do it as follows :
.global __The_Global_Variable
mfspr r16, 695 #695 is the number of the SPR Register
stw r16, __The_Global_Variable #I get Syntax error at this line
I get a Syntax error, so can anyone help in that ?
I have also the following questions :
1- How to define a global variable in Assembly file ? 2- What is the correct instruction to use to store the contents of a register in a variable ?