Procedures Used for Stack Unwind Directives

Procedures are bound by the .proc and .endp directives. See the Procedure Directives section for more information about these directives. Procedures are section-sensitive. The assembler interprets stack unwind directives according to the procedure in which they appear.

Procedures contain prologue and body regions that are divided by headers. These headers are specified using the .prologue and .body directives.

The .prologue directive introduces a prologue region within a procedure. Each prologue region must be introduced by the .prologue directive.

The .body directive separates the procedure prologue from the main body of the procedure. You can use the .body directive more than once within procedures with multiple body regions.

For language specific data, use the .handlerdata directive followed by handler data allocations with the .endp directive after the handler data allocations. The assembler places the handler data in the .xdata section.

See the Stack Unwind Directives Usage Guidelines section  for more information about using this directive.

These directives may not be currently supported by all assemblers.

Example below, Procedure Format in a Code Sequence, illustrates the format of a procedure with two prologues, two body regions, and language specific data.

 

Example: Procedure Format in a Code Sequence

.proc name,...  //start of procedure

.prologue       //instructions in first prologue

.body           //instructions in first body region

.prologue       //instructions in second prologue

.body           //instructions in second body region

.handlerdata    //data allocations go to .xdata section

.endp name,...  //end of procedure