The Stack and ESP in Assembly Language - What happens when you call a procedure?
ฝัง
- เผยแพร่เมื่อ 2 ต.ค. 2024
- What happens with the STACK, ESP, and EIP when a procedure is called in Assembly Language.
I don't know about you, but I am SICK of having to scrub through a 15-minute video only to find out that they didn't even answer the question I was searching for. Here is a 4-minute video that explains what happens to the Stack, ESP, and EIP when a procedure is called in Assembly Language.
I am a computer science student in my first semester at Auburn University, and this was one of the hardest concepts for me to grasp in my Assembly Language course. After spending a few hours failing to find youtube videos that helped me understand, I decided it was a good idea to make one. Hopefully it helps you understand this concept in less time than it took me. Thanks for watching!
This was one of the most thoughtful, well prepared videos on assembly I have ever seen. You have a real knack for explaining this content visually. Thank you!
it's good to mention that this could vary depending on what calling convention (__stdcall, __cdecl, __fastcall) and CPU architecture (x86, x64) you are using
The best vdo. U explained so simply and easlily. I was looking for this for months 😅
Thank you very much for this. I watched 2-3 videos prior to this one, but yours made it click. Especially because you gave multiple analogies (the deck of cards one being my favorite) to explain the same thing - this approach really makes a person understand the topic by having to think about what all the analogies have in common.
I went to a few videos, they sucked, went to copilot, it explained it nicely... but sucked, yours is good
Great video !!! Indeed there aren't other videos that explain the concept well enough, that's why I thank you a lot!! :)
What were the ESP and EBP doing through all of this?
thank you so much! although at first i kinda had a headache but rb i understand
Great video, wish you went into recursion
when you pop, does the value goes to eip by default
Best explanation ever!
I just want to say to people who don't get why SP changes : Every push and pop is implicitely modifiying SP, the person writing instruction doesn't need to manage it in this case.
Strong Vid, Bro!
This was hurting my brain yesterday but you made it click! Thanks! :)
I’m glad! Can’t tell you how much time I spent banging my head against the desk before it clicked for me
educational, although I was looking for EBP basics.
thank you, It was very hard to find a video that actually explains this correctly.
Same boat as you, mate! But this helped!
great !!
I wish you made more videos
I wish I stuck with low level programming! Started doing detection development instead. Now I make videos at www.youtube.com/@DailyDecrypt
This was a good video thank you. Do you have have any videos on what the EBP does? Thanks
Thanks a lot!
Well done. Excellent explanation
What any amazing video thanks!
Thank you so much man you save my ass!
thanks alot man
very useful
well done dude!
what happen if we push another register in to stack when program executing the call function , at that point stack pop out that we push into the stack to EIP register ? if it does what happen to program executing instruction ?
Call macro already pushes return address for you. If you push another address before call macro. It will execute it arg1 and stack will corrupt. If you want to push custom address for return,you must do push return address then jmp function location. This is which is equal to a call macro. But keep in mind there is a high change custom return address will crash program. You need to adjust that.
wow nice explanation
Very well explained thank you
Very useful thanks !
Very useful and detailed thanks !
What does add/sub esp, hexValue do?
convert the hex value to decimal value then subtract (sub) that decimal value from esp or add that decimal value to esp.