Reference Guide

102 Chapter 4
Assembler Directives and Pseudo-Operations
.PROC and .PROCEND Directives
.PROC and .PROCEND Directives
The .PROC and .PROCEND directives bracket the instructions within a
procedure.
Syntax
.PROC
Lines of Code
.PROCEND
Discussion
The .PROC directive signifies that the next instruction is the first
instruction of a procedure. The .PROCEND directive signifies that the
previous instruction was the last instruction of the procedure. Switching
spaces or subspaces within a procedure is not permitted.
Every procedure must contain a .CALLINFO directive and normally
contains an .ENTER and .LEAVE pseudo-operation. The only exception to
the latter rule occurs in procedures that are either compiler-generated or
created by programmers who are writing their own entry and exit code
sequences. In this case, you must use the .ENTRY and .EXIT compiler
directives.
NOTE Because the .ENTER and .LEAVE pseudo-operations guarantee that the
stack unwind process works correctly, you should consistently use these
directives rather than writing your own entry and exit code sequences.