Are you trying to get the address of the assembly function you are writing or the calling function?
Take a look at this
x86 assembly language[
^]
To get the address of your method push eip (32-bit) or push rip (64-bit) as the first instruction of your assembly routine. Then pop it into eax to examine it.
You can't really calculate the calling functions address based on the address pushed on the stack. The calling function may have done any number of things with the stack, including
allocating memory[
^]. All you can get is the address if the instruction to execute upon return from your routine - and thats only true if your function and the calling function have the same notion of how this should operate.
Thats why we talk about
calling convention[
^] of a function/method.
regards
Espen Harlinn