0

pushl $3
pushl $2
call power
addl $8, %esp
pushl %eax

pushl $2
pushl $5
call power
addl $8, %esp

where shall save the return value of function power after it`s second calling , i mean probably in %eax , but shall be overwritten the old value of %eax or it will save the new return value in other register , i want to understand

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by suxxor
0

You can push and pop it.

1. Call function first time. Answer is in EAX.
2. Push EAX.
3. Call function second time. Answer is in EAX.
4. Pop EBX (or register of your choice).

Answer to first function call is in EBX.
Answer to second function call is in EAX.

Hope this helps.

0

You can push and pop it.

1. Call function first time. Answer is in EAX.
2. Push EAX.
3. Call function second time. Answer is in EAX.
4. Pop EBX (or register of your choice).

Answer to first function call is in EBX.
Answer to second function call is in EAX.

Hope this helps.

yeah 10x , i understand it by myself i i see now with your reply that i get it really

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.