[fpc-pascal] find return adress of a procedure/function

Rainer Stratmann RainerStratmann at t-online.de
Sun Apr 24 12:14:53 CEST 2011


Am Sunday 24 April 2011 11:44:18 schrieb Rainer Stratmann:
> How to find the return adress of the calling code of a procedure/function?
>
> Where in the stack is the information to the return adress?
>
> stack + - x?


asm
 mov eax , [ ebp + 4 ]
end;

eax is the return adress


> How to acess to the information in assembler?
> Is it in every processor architecture possible, for example ARM?
> (actually 80x86).
> Is it different in 32 / 64 bit?
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal





More information about the fpc-pascal mailing list