[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PROC             Initiate Procedure Definition                 MASM Directive

  name      PROC      [distance]
  statements
  name      ENDP

    Marks the beginning of a procedure.

       Notes:     Name must be unique.

                  Distance may be either NEAR (within the same segment) or
                  FAR (not within the same segment). NEAR is assumed if no
                  distance is specified.

                  Nested procedures are allowed.

                  The procedure should contain at least 1 RET, since a RET
                  is not automatically generated for the user at the end
                  of the procedure, as in other programming languages.

                  The name has the same attributes that a label has,
                  enabling the ability to call, jump, or loop using the
                  name as a destination.

See Also: ENDP NEAR FAR RET
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson