Wait were you plainly using r13 in your source? And what allows you to safely use r18?
If you really need to use the Global Variable registers (and you don't wanna look ahead at further addresses), then store the register value to a negative area of the stack unless you have a function call in your code, the make a stack frame
I apologize if I'm missing something really obvious here
EDIT Nvm just saw the source of ur new code
If you really need to use the Global Variable registers (and you don't wanna look ahead at further addresses), then store the register value to a negative area of the stack unless you have a function call in your code, the make a stack frame
I apologize if I'm missing something really obvious here
EDIT Nvm just saw the source of ur new code