C parameters
Posted: Sun Jul 13, 2003 11:00 pm
I know that a C compiler use the stack to pass parameters to functions.
I complie a little program with GCC using the -S option, to view the code it create and I realize that always put this two lines after a function call:
pushl $73
call _putch
addl $16, %esp <--- This,
subl $12, %esp <--- and this.
Are these two lines used to restore the stack pointer?
When a C compiler 'pop' the values passed as parameter?
Thank you
pepito
I complie a little program with GCC using the -S option, to view the code it create and I realize that always put this two lines after a function call:
pushl $73
call _putch
addl $16, %esp <--- This,
subl $12, %esp <--- and this.
Are these two lines used to restore the stack pointer?
When a C compiler 'pop' the values passed as parameter?
Thank you
pepito