Reference Guide

Chapter 4 81
Assembler Directives and Pseudo-Operations
.ENTER and .LEAVE Pseudo-Operations
.ENTER and .LEAVE Pseudo-Operations
The .ENTER and .LEAVE pseudo-operations mark a procedure's entry
and exit points. They instruct the Assembler to generate procedure entry
and exit code sequences based on the information provided in the
.CALLINFO directive.
Syntax
.ENTER
Lines of code
.LEAVE
Discussion
The .ENTER pseudo-operation marks an entry point for the current
procedure. Every procedure that follows the standard procedure-calling
convention must contain one .ENTER pseudo-operation. The calling
conventions are described in the documents under the topic PA-RISC
Architecture at URL: http://www.software.hp.com/STK/. The .LEAVE
pseudo-operation marks a procedure's exit point. Every procedure that
follows the procedure-calling convention must contain one .LEAVE
pseudo-operation. See “.ENTRY and .EXIT Directives” on page 83 for
exceptions.
When the Assembler encounters an .ENTER pseudo-operation, it
generates an entry code sequence according to the parameters in the
.CALLINFO directive for that procedure. Similarly, when the Assembler
encounters a .LEAVE pseudo-operation, it generates an exit code
sequence according to the parameters in the .CALLINFO directive for
that procedure.