A.5.274 RET, RETF, RETN: Return from Procedure Call
RET ; C3 [8086]
RET imm16 ; C2 iw [8086]
RETF ; CB [8086]
RETF imm16 ; CA iw [8086]
RETN ; C3 [8086]
RETN imm16 ; C2 iw [8086]
- RET, and its exact synonym RETN, pop IP or EIP from the stack and
transfer control to the new address. Optionally, if a numeric second
operand is provided, they increment the stack pointer by a further
"imm16" bytes after popping the return address.
- RETF executes a far return: after popping IP/EIP, it then pops CS,
and _then_ increments the stack pointer by the optional argument if
present.