Substitutes for x86 assembly 'call' instruction?

后端 未结 3 1003
既然无缘
既然无缘 2020-12-08 11:00

What are some alternatives to the x86 call instruction? Maybe something like a push of the return address then a jump?

Also is their a command for obtaining the curr

3条回答
  •  星月不相逢
    2020-12-08 11:41

    The call instruction actually does this for you. For example call my_func would do something like:

    push ret_address
    jmp my_func
    

    A subsequent ret call would just use the address you just pushed to jmp back in a sense. Is there a specific reason that you don't want to use call or is it not available for you? For current position in memory you can try to read the eip register (can't write to it).

提交回复
热议问题