Hello everyone,


I have debugged into the assembly language for the following simple sample,
but I never saw any instructions dealing with push eip/pop eip, which dealing
with saving/restoring the return address when function foo completes. Any
ideas?

[Code]
int foo (int a, int b)
{
return a+b;
}

int main()
{
int a1 = 100;
int b1 = a1 + 100;

a1 = foo (a1, b1);

return 0;
}
[/Code]


thanks in advance,
George

Re: EIP register by David

David
Mon Jul 21 02:44:54 CDT 2008

>I have debugged into the assembly language for the following simple sample,
>but I never saw any instructions dealing with push eip/pop eip, which dealing
>with saving/restoring the return address when function foo completes.

Pushing and popping the instruction pointer is implicit in call and
return operations - i.e. they aren't there - but are done as part of
the call/return ops.

Dave

Re: EIP register by George

George
Mon Jul 21 03:59:02 CDT 2008

Thanks Dave,


Question answered.


regards,
George