u32 nSP;nSP = 17;nSP = 42;asm{ mov nSP, sp};printf("SP = %d\n", nSP);
And that evaluates to:
020C2F58: E3A01011 mov r1,#0x11020C2F5C: E3A0102A mov r1,#0x2a020C2F60: E1A0100D cpy r1,sp020C2F68: E59F002C ldr r0,[pc,#44]020C2F6C: EBFD3097 bl printf (0x200f1d0) ; 0x0200f1d0
Honestly, CodeWarrior, what the shit. It's a LOCAL VARIABLE. It's not a pointer, it's not volatile. I accept that I'm using inline asm there, but come on... LERN 2 OPTIMEYES PLZ.