6.6.1 Intel 80x86 standard routine prolog / epilog

Standard entry code for procedures and functions is as follows on the 80x86 architecture:

   pushl   %ebp
   movl    %esp,%ebp

The generated exit sequence for procedure and functions looks as follows:

   leave
   ret  $xx

Where xx is the total size of the pushed parameters.

To have more information on function return values take a look at section 6.1, page 391.