What exactly is the base pointer and stack pointer? To what do they point?
esp is as you say it is, the top of the stack. ebp is usually set to esp at the start of the function. Function parameters and local variables are accessed by adding and subtracting, respectively, a constant offset from ebp. All x86 calling conventions define ebp as being preserved across function calls. ebp itself … Read more