Procedure Directives

The .proc and .endp directives combine code belonging to the same procedure. The .proc directive marks the beginning of a procedure, and the .endp directive marks the end of a procedure. A single procedure may consist of several disjointed blocks of code. Each block should be individually bracketed with these directives. Name operands within a procedure can be used only for that specific procedure.

The .proc directive declares a symbol as a function. The .proc directive does not define the symbol by assigning it a value. Symbols must be defined as a label within the procedure. When name is defined, it is automatically assigned a "function" type.

The following code sequence shows the basic format of a procedure:

.proc name,...

  name:           //label

...               //instructions in procedure

.endp name, ...

Where:

name

Represents one or more entry points of the procedure. Each entry point has a different name. The assembler ignores the name operands of the .endp directive.