Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I know how to pass parameters to a user-defined function and how to create local variables inside such function. But what I want is to create local variables for the main function.

So the main function is the first thing that executes when the program starts, but what is the initial value of esp when main starts executing? i.e what is on top of the stack when main starts executing, is it the command line arguments?

If I want to create local variables inside main, should I save the value of esp into ebp and then increment esp by how much data I need just like I do inside of a user-defined function?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
242 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...