Could someone please explain how DWordSwapAsm works without a return statement? I've ran the program with breakpoints and i
gets changed even though there's no return value in that function.. how does this work?
NOTE: I don't want help with the assembly code, just the function itself.
template <typename T>
inline T DWordSwapAsm( T dw )
{
__asm
{
mov eax, dw
bswap eax
}
}
int _tmain(int argc, _TCHAR* argv[])
{
int i = 10;
i = DWordSwapAsm( i );
return 0;
}