The Stack and ESP in Assembly Language - What happens when you call a procedure?

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

ความคิดเห็น • 45

  • @ArunaSrivastava-xb5eq
    @ArunaSrivastava-xb5eq ปีที่แล้ว +13

    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!

  • @pavolpanisz3251
    @pavolpanisz3251 2 ปีที่แล้ว +8

    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.

  • @techtechlearn3438
    @techtechlearn3438 2 ปีที่แล้ว +3

    Great video !!! Indeed there aren't other videos that explain the concept well enough, that's why I thank you a lot!! :)

  • @kellyshields3392
    @kellyshields3392 11 หลายเดือนก่อน +1

    This was hurting my brain yesterday but you made it click! Thanks! :)

    • @Boneplayer123
      @Boneplayer123  11 หลายเดือนก่อน +3

      I’m glad! Can’t tell you how much time I spent banging my head against the desk before it clicked for me

  • @elecmayte4267
    @elecmayte4267 ปีที่แล้ว

    thank you, It was very hard to find a video that actually explains this correctly.

  • @sayanhalder6470
    @sayanhalder6470 6 หลายเดือนก่อน

    The best vdo. U explained so simply and easlily. I was looking for this for months 😅

  • @alexandrumarcel3696
    @alexandrumarcel3696 5 หลายเดือนก่อน

    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

  • @ZettaiKatsu2013
    @ZettaiKatsu2013 8 หลายเดือนก่อน +2

    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.

  • @hodayfa000h
    @hodayfa000h 3 หลายเดือนก่อน +2

    I went to a few videos, they sucked, went to copilot, it explained it nicely... but sucked, yours is good

    • @Boneplayer123
      @Boneplayer123  3 หลายเดือนก่อน +2

      Thanks! It's my only instructional video and only made it because I too couldn't find it anywhere else. Glad it was useful!

  • @idermonh3645
    @idermonh3645 2 หลายเดือนก่อน

    omg no other video I found explained it well like him

  • @miguelmendez241
    @miguelmendez241 4 หลายเดือนก่อน

    Best explanation ever!

  • @faustopo7883
    @faustopo7883 หลายเดือนก่อน

    hola amigo soy hispano hablante, gracias por tu video me sirvio un montón, me podes decir porfavor que emulador, o que usas para ejecutar el codigo ensamblador?

  • @robsawyer8034
    @robsawyer8034 8 หลายเดือนก่อน

    Well done. Excellent explanation

  • @AD-wg8ik
    @AD-wg8ik 3 หลายเดือนก่อน

    Yes this definitely helped visualize. Thanks

  • @effsixteenblock50
    @effsixteenblock50 9 หลายเดือนก่อน +1

    What were the ESP and EBP doing through all of this?

  • @kyledrewes6552
    @kyledrewes6552 ปีที่แล้ว

    This was a good video thank you. Do you have have any videos on what the EBP does? Thanks

  • @hansqid
    @hansqid ปีที่แล้ว

    thank you so much! although at first i kinda had a headache but rb i understand

  • @gristlelollygag
    @gristlelollygag 7 หลายเดือนก่อน

    Great video, wish you went into recursion

  • @tsunningwah3471
    @tsunningwah3471 11 หลายเดือนก่อน

    when you pop, does the value goes to eip by default

  • @TheStudentOfNumbers
    @TheStudentOfNumbers 15 วันที่ผ่านมา

    Why is 406F on 19 in the stack

  • @besmo1
    @besmo1 22 วันที่ผ่านมา

    Thanks a lot mate!

  • @rigbyb
    @rigbyb 2 ปีที่แล้ว

    Very well explained thank you

  • @deedewald1707
    @deedewald1707 3 ปีที่แล้ว

    Very useful and detailed thanks !

  • @ezaki6576
    @ezaki6576 ปีที่แล้ว

    well done dude!

  • @gtamta4190
    @gtamta4190 2 ปีที่แล้ว

    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 ?

    • @MFXScript
      @MFXScript 2 ปีที่แล้ว

      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.

  • @AKKJ420
    @AKKJ420 5 หลายเดือนก่อน

    I wish you made more videos

    • @Boneplayer123
      @Boneplayer123  5 หลายเดือนก่อน

      I wish I stuck with low level programming! Started doing detection development instead. Now I make videos at www.youtube.com/@DailyDecrypt

  • @gurpreetkhamba5399
    @gurpreetkhamba5399 ปีที่แล้ว

    educational, although I was looking for EBP basics.

  • @MFXScript
    @MFXScript 2 ปีที่แล้ว

    What any amazing video thanks!

  • @tobiasschwarz6021
    @tobiasschwarz6021 ปีที่แล้ว

    Strong Vid, Bro!

  • @edevaaao
    @edevaaao 3 ปีที่แล้ว

    Very useful thanks !

  • @-boiadeiro-
    @-boiadeiro- 2 ปีที่แล้ว

    wow nice explanation

  • @ion4497
    @ion4497 ปีที่แล้ว +1

    great !!

  • @rty1955
    @rty1955 18 วันที่ผ่านมา

    Assembly language will vary from CPU to CPU. Not all CPUs even have a stack, therefore no useless opcodes for a stack are needed. i have been a mainframe assembly programmer for over 50 years and NEVER found the need for a silly stack. In fact mainframes never had or needed one. The intel platform is very limited to amount and usage of resisters not to mention a slew of special purpose registers and all the op codes needed to tickle these registers, The mainframe uses 16 general purpose registers since the 1960s. Use any register for math, pointers, etc.

  • @nandorbacso4625
    @nandorbacso4625 2 ปีที่แล้ว

    What does add/sub esp, hexValue do?

    • @Baebon6259
      @Baebon6259 10 หลายเดือนก่อน

      convert the hex value to decimal value then subtract (sub) that decimal value from esp or add that decimal value to esp.

  • @vortex_7574
    @vortex_7574 3 ปีที่แล้ว

    Same boat as you, mate! But this helped!

  • @emilyem9685
    @emilyem9685 3 ปีที่แล้ว

    Thanks a lot!

  • @mqasimkhan6920
    @mqasimkhan6920 ปีที่แล้ว

    thanks alot man

  • @phanhoangnam699
    @phanhoangnam699 2 ปีที่แล้ว

    very useful

  • @SlavaMoskalenko81
    @SlavaMoskalenko81 หลายเดือนก่อน

    So basically assembly stack is not far from what you can see in the debugger of any other language (java, C#, python, js). What a surprise!!!

  • @echohuang3158
    @echohuang3158 2 ปีที่แล้ว

    Thank you so much man you save my ass!