(Try on visual studio)
int Temp()
{
_asm
{
mov eax, 10
}
}
main()
{
int x = Temp();
cout<<x; //10
}
With the understanding that a micro-controller register is used for returning values, think what happens when you return primitive datatypes, pointers, references etc., from functions and how the function behaves!!
No comments:
Post a Comment