ESP
ESP
(OP)
If I have the directive:
.stack 1000h
How to I initialize the stack or how do I determine the ESP.
Thank you.
Texflex
.stack 1000h
How to I initialize the stack or how do I determine the ESP.
Thank you.
Texflex
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS Come Join Us!Are you a
Computer / IT professional? Join Tek-Tips Forums!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
|
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: ESP
CODE
This defines a stack for the program of 1000h bytes (or 4096 bytes). There really is not a need to initialize the stack, unless you want it to show up on a memory dump.
ESP is the stack pointer, which points at the other end of the stack and moves towards the base stack register when things are added to the stack.
Generally, though, you shouldn't have much (not any, though, there is a case or two I know of) need for touching the stack pointer or the stack base pointer. The stack is generally considered for temporary storage, has rules for how it is handled (FIFO), and instructions for handling it (PUSH, POP among others). So there isn't that much to worry about unless you need to do what is required in that case or two I mentioned.
----------
Measurement is not management.
RE: ESP
Thanks again.