Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > BOOK: Professional Assembly Language
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Assembly Language
This is the forum to discuss the Wrox book Professional Assembly Language by Richard Blum; ISBN: 9780764579011
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Assembly Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 16th, 2009, 11:26 AM
Registered User
 
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default A question about %esp and %ebp

At pages 132+, are explained the CALLs.

I've not understood if we can use only the register %esp instead of using the %ebp register also.

I understand that %ebp is really useful to restore the original %esp at the time of calling the function. But, if I've a simple function, can I not use %ebp?

Thank you
Reply With Quote
  #2 (permalink)  
Old January 10th, 2010, 06:35 AM
Authorized User
 
Join Date: Jan 2010
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Markon View Post
At pages 132+, are explained the CALLs.

I've not understood if we can use only the register %esp instead of using the %ebp register also.

I understand that %ebp is really useful to restore the original %esp at the time of calling the function. But, if I've a simple function, can I not use %ebp?

Thank you
Hi,

If you read the very start of the book - it explains the registers there.

EBP is the Extended Base Pointer. It is used for calculating the data variables on the stack.

ESP is the Extended Stack Pointer. It is used for positioning reads and writes from the stack. For instance, during a POP the ESP register is changed whereas EBP remains the same!

So, be careful when modifying these registers as they hold very important information!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
question maheshraju ASP.NET 2.0 Basics 3 March 13th, 2008 08:54 AM
i want to know about ESP & EBP popuri_krishna Assembly Language 1 June 10th, 2007 10:21 AM
Question Ashwini Classic ASP Databases 1 January 4th, 2006 05:55 AM
How do you save .esp & .jpeg file to clients cpu? GraphicArmy Forum and Wrox.com Feedback 5 May 7th, 2004 10:30 AM



All times are GMT -4. The time now is 09:39 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.