GNU Info

Info Node: (nasm.info)Section B.4.274

(nasm.info)Section B.4.274


Next: Section B.4.275 Prev: Section B.4.273 Up: Section B.4
Enter node , (file) or (file)node

B.4.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.


automatically generated by info2www version 1.2.2.9