Thursday, 15 April 2010

visual c++ - Copy ASM data to C++ variable -



visual c++ - Copy ASM data to C++ variable -

i'm trying store values (int) of ebp+8and ebp+12 in 2 c++ variables. code:

int a; int b; __asm { mov &a, [ebp+12] mov &b, [ebp+8] }

but throwing syntax errors. proper way accomplish this?

i didn't remember that, michael said, can't mov straight memory memory. solved doing:

mov eax, [ebp+12] mov a, eax

visual-c++ assembly

No comments:

Post a Comment