views:

55

answers:

2

I am using Microsoft Visual C++ 2010.

If I have a function like this:

const char* blah(void);

and I want to call it like this:

__asm {
    call blah;
    ...
}

How do I get the return value of the function in the assembly?

+1  A: 

See for instance http://msdn.microsoft.com/en-us/library/k2b2ssfy(VS.80).aspx.

Oli Charlesworth
That doesn't help me know what asm instructions to use to get the return value.
Frozen
What are you looking for that isn't **the differences between the calling conventions, how arguments are passed, and how values are returned by functions**.
Ben Voigt
+2  A: 

The return value is in the EAX register.

Tergiver