Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
RET Instructions
 Detail Key Example                    Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Title:    Return from Procedure                 Flags: O D I T S Z A P C
                                                         ═════════════════
  Syntax:   RET [number]                                      -none-
            RETN [number]
            RETF [number]
 
  See also: CALL, PROC, IRET, INVOKE, OPTION EPILOGUE
 
  Description:
 
     Returns from a procedure by transferring control to an address
     popped from the top of the stack. A constant operand can be given
     indicating the number of additional bytes to release.
 
     The constant is normally used to adjust the stack for arguments
     pushed before the procedure was called. The size of a return (near
     or far) is the size of the procedure in which the RET is defined
     with the PROC directive.
 
     Use RETN to specify a near return; use RETF to specify a far
     return. A near return pops a word into IP. A far return pops a
     word into IP and then pops a word into CS. After the return, the
     number of bytes given in the operand (if any) is added to SP.
                                    -♦-