LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   I need help with understand a recursive assembly program. (https://www.linuxquestions.org/questions/programming-9/i-need-help-with-understand-a-recursive-assembly-program-746920/)

joeBuffer 08-13-2009 01:20 AM

I've written it out again, and gone through it step by step and understand every little part of it, now. Thanks for your help, it really did point things out that I didn't think of.
C recursive programs are so much simpler. :D
I was right about the arguments, though ... it doesn't pushl $4, %esp for the inner functions, and it's not just the pushl %ebp, %esp and pop %ebp, either. It's just taken care of because of the way it's structured ... it's all just taken back to where it starts in _start, and then the pushl $4, %esp is used to finished up with the stack and that first pushed argument. Now it's as straightforward as I thought it was when I first saw it. :D

joeBuffer 08-16-2009 11:36 PM

I was going to add, also, that this book did end up being a good introductory book. It's easy to follow (mostly), and it's full of information. :)


All times are GMT -5. The time now is 03:40 AM.