Assuming 32-bit x86, use the following function:
get_eip: mov eax, [esp]
ret
Then, to get the value of EIP in EAX, simply:
call get_eip
Assuming 32-bit x86, use the following function:
get_eip: mov eax, [esp]
ret
Then, to get the value of EIP in EAX, simply:
call get_eip