View Single Post
  #1 (permalink)  
Old April 1st, 2007, 02:43 AM
alexj_chn alexj_chn is offline
Registered User
 
Join Date: Mar 2007
Location: Shanghai, , China.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Questions about the pointer registers

I'm a new learner of assembly language. When I learned about the pointer registers of Intel IA-32 processors, I've got the questions below:

1)In Intel IA-32 Platform, the processor usually have EBP as "Stack data pointer" and ESP as "Stack pointer", what's the difference between these two registers?

2)I have read the assembly source below:
...
pushl $buffer
pushl $output
call printf
addl $8, %esp
...
Why add 0x8 to register ESP after call "printf"?

Can anybody do me a fever? Thanks.