Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here



If I have the directive:
.stack     1000h

How to I initialize the stack or how do I determine the ESP.

Thank you.



.stack     1000h

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.


Thank you for the answer. Something in my reading was confusing, but I did have the right answer.

Thanks again.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

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.

Join Us             Close