I found that the ESP register is the current stack pointer and EBP is the base pointer for the current stack frame. However, I don't understand these definitions (I am just starting to learn how to code in assembler).
What I understand is that ESP points towards the stack itself and EBP points towards whatever is on top of the stack1. But these are just my guesses and they are most likely incorrect. Otherwise, what would a statement like the following mean?
MOV EBP, ESP
Footnote 1: Editor's note: Yes, that's incorrect. In standard terminology, the "top of the stack" is where ESP points, even though it's the lowest address in the stack frame. By analogy to a stack data structure that grows upward, even though the callstack on x86 (like most ISAs) grows downward.