title: C: Return value via stack/register question
body: <p>I am new to C, and there is one thing I can not understand.
  When function returns something that is not bigger than register -- my compiler puts it in EAX.
  When I return big structure (not pointer but structure itself) -- it is returned via stack.</p>
  
  <p>My question is: how compiler knows how to call function exported by another object?
  There is a calling conventions (like stdcall) but it is about passing the arguments, not reading the returned value, right?</p>
  
  <p>There should be some rule like "If return value declared to be larger than EAX, than take it from [bp-...]". </p>
  
  <p>And one more: would it be right to say that objects I want to return, larger than register should be stored in heap and returned by pointer to prevent all than stack manipulations?</p>
  
  <p>Thanks.</p>