How does EBP work? Whats it used for? menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Flushie's Avatar Master Sergeant
    Reputation
    -13
    Join Date
    May 2010
    Posts
    72
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How does EBP work? Whats it used for?

    Okay so I am wondering how EBP (Extended Base Pointer) works? I know it has something to do with stack frames, but what exactly is that?

    How does EBP work? Whats it used for?
  2. #2
    Kirth's Avatar Active Member
    Reputation
    58
    Join Date
    Nov 2007
    Posts
    274
    Thanks G/R
    2/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's 32bit register pointing to the current stack frame. You'll find it mainly in the cdecl calling convention (function parameters are pushed on the stack in a right-to-left order). If you don't know what the stack is, I'm well wondering why you're even asking about EBP.



  3. #3
    Flushie's Avatar Master Sergeant
    Reputation
    -13
    Join Date
    May 2010
    Posts
    72
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know what the stack is, I now know a little more about how it works, I am looking at something else and wondering about this...

    push ebp
    mov ebp, esp

    So EBP points to the return address of the caller that EBP, EBP+4 equals a paramater and ebp-4 would be like a local variable, correct if wrong...

    Why would you want to move ESP to ebp?? Why not just use ESP, i am confused.

  4. #4
    danielrhodea's Avatar Master Sergeant
    Reputation
    11
    Join Date
    Apr 2010
    Posts
    107
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it pushes ebp onto the stack so it can be retrieved after the operation has been completed (somewhere following it should pop ebp from the stack) otherwise they should have just set ebp to esp and ignored, I'm sure iret works the same as pop ebp ret although my asm is a little rusty

Similar Threads

  1. How does PixelSearch work for item names?
    By krims0nknite in forum Diablo 3 Bots Questions & Requests
    Replies: 1
    Last Post: 06-12-2012, 08:17 PM
  2. [Question]Suspended-how does it work?
    By Eyesofhatred in forum World of Warcraft General
    Replies: 0
    Last Post: 08-21-2008, 08:45 AM
  3. How does "Playeritems" work?
    By thijsd in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 07-12-2008, 02:21 PM
  4. how does fishbuddy work??
    By Zanatons in forum World of Warcraft General
    Replies: 1
    Last Post: 08-26-2006, 07:56 PM
  5. auto-it? how does it work
    By Krazzee in forum World of Warcraft General
    Replies: 4
    Last Post: 06-22-2006, 02:28 AM
All times are GMT -5. The time now is 03:39 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search