Function Prologue and Epilogue in C

There are lots of resources out there that explain this: Function prologue (Wikipedia) x86 Disassembly/Calling Conventions (WikiBooks) Considerations for Writing Prolog/Epilog Code (MSDN) to name a few. Basically, as you somewhat described, “the stack” serves several purposes in the execution of a program: Keeping track of where to return to, when calling a function Storage … Read more