CALL

By Vesper Vei
1 minute read

Table of Contents

  1. CALL (call)
    1. Basic purpose
    2. Instruction execution process
    3. Instruction formats
    4. Behavioral characteristics
    5. Common uses

CALL (call)

Basic purpose

CALL is used to invoke a function by jumping to the target location to execute code while saving the return address so execution can return to the call site when the function finishes.

Instruction execution process

  1. Push the address of the instruction following the current instruction (the return address) onto the stack

  2. Set RIP to the call target address

  3. Begin executing the new code path

Equivalent behavior (x64):

push rip_next
jmp target

Instruction formats

call rel32 ; 相对调用(最常见)
call rax ; 寄存器间接调用
call [rax] ; 内存间接调用
call qword ptr [...] ; 绝对调用

Behavioral characteristics

Common uses


Relationship Graph

Loading graph...