Procedures

Overview

The details of procedures are detailed in procedures. This file touches on the most relevant instruction classes.

CALL and RET

Like JMP instructions, call allows specifying a direct or indirect operand. call pushes the address of the instruction following it onto the stack and updates the PC to the operand. ret reverts these steps.

Instruction Operands Description
call Label Procedure call
call *Operand Procedure call
ret Return from call

LEAVE

leave parallels the ret instruction. It is equivalent to the following two instructions:

movq %rbp, %rsp
popq %rbp
Powered by Forestry.md