pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pgubook-readers] Stack Diagram confussion


From: Ivan Nieto
Subject: [Pgubook-readers] Stack Diagram confussion
Date: Wed, 22 Nov 2017 17:00:47 -0600

In page 63, inside the 'All about functions' chapter, this diagram of the stack appears:

Imágenes integradas 1
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:

Imágenes integradas 2

%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.

Greetings.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]