In page 63, inside the 'All about functions' chapter, this diagram of the stack appears:
And for my understanding, and from my lecture of the code. I think that this diagram have the Base Number and Power attributes in reverse order. The stack should look like this:
Power <--- 12(%ebp) B, Number <--- 8(%ebp) Ret Addr <--- 4(%ebp) Old %ebp <--- (%ebp) Current Res <--- -4(%ebp)
This is the code:
%ebx should contain the Base Number and %ecx should contain the power.
I just want to know if the way I am understanding this is correct.