Imagine I have the following simple C program:
int main() { int a=5, b= 6, c; c = a +b; return 0; }
Now, I would like to know the address of
For x86:
int test() { __asm { mov eax, [esp] } } __declspec(noinline) int main() // or whatever noinline feature your compiler has { int a = 5; int aftertest; aftertest = test()+3; // aftertest = disasms to 89 45 F8 mov dword ptr [a],eax. printf("%i", a+9); printf("%x", test()); return 0; }