title: Understanding stack frame of function call in C/C++?
body: <p>I am new to C/C++ and assembly lang as well.
      This could also be very basic question.
      I am trying to understand how stack frames are built and which variables(params) are pushed to stack in what order?. 
      Some search results showed that....compiler of C/C++ decides based on operations performed within a function. for e.g if the function was suppose to just increment value by 1 of the passed int param and return (similar to ++ operator)  it would put all ..the param of the function and local variable within the function in registers and perform addition ....wondering which register is used for returned/pass by value ?....how are references returned? .....difference b/w eax, ebx,ecx and edx.</p>
  
  <p>Requesting for a book/blog/link or any kind of material to understand registers,stack and heap references are used/built and destroyed during function call's....and also how main function is stored?
  Thanks In Advance</p>