Often parameters to a function are pushed on the stack using pushl.
If there are several parameters, they are pushed in right to left order so that the left most parameter winds up being on top so that the called function finds them in the expected left to right order.
Example:
Suppose a function main will call the sum function:
int sum(int x, int y); int main() { int a; int b; int ans; int n; printf("Enter two integers: "); n = scanf("%d %d", &a, &b); if ( n != 2 ) { printf("Invalid input!\n"); exit(1); } ans = sum(a,b); printf("Sum is %d\n", ans); }