- mov %esp,%ebx # The current sp marks start of new frame.
- push %ebp # fp in save location S0
- sub $8,%esp # Ensure 3 slots are allocated, one above.
- mov %ebx,%ebp # Switch to new frame.
+ push %ebp # Dummy for return address
+ push %ebp # fp in save location S1
+ mov %esp,%ebp # The current sp marks start of new frame.
+ sub $4,%esp # Ensure 3 slots are allocated, two above.