Contents    Page-10    Prev    Next    Page+10    Index   

Compiled Procedure

Prologue
Procedure Code
Epilogue

Prologue: (or preamble) Save registers and return address; transfer parameters.

Epilogue: (or postamble) Restore registers; transfer returned value; return.

A return statement in a procedure is compiled to:

  1. Load the returned value into a register.

  2. goto the Epilogue.