Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2009, 12:26 PM
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
 
Old January 10th, 2010, 07: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!





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 06: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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.