__asm Error C2443 (operand size conflict)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I'd like to get the stackpointer value in my C program
I tried this, but I keep getting a compiler error
What am I doing wrong

monitorStackPointer(

long value
__asm { mov value, SP
printf("%0x\n", value)


Thanks, Keith
 
Hello,

stack pointer is esp
__asm { mov value, esp } should work.

Hope this helps,
Rainer
 
I'd like to get the stackpointer value in my C program.
I tried this, but I keep getting a compiler error.
What am I doing wrong?

monitorStackPointer()
{
long value;
__asm { mov value, SP }

Keith,

The register is named "esp" in the 32-bit Intel world:

_asm mov value, esp;

Dave
 
Back
Top