Passing parameters and allocating local variables using the program stack