PROC

PROC

Syntax:
<label> PROC [EXPORT]

Operation: Define the beginning of a procedure module. At
the assembly language level, little distinction is made
between procedures and functions, so the PROC and FUNC
directives can be used interchangably. However, for each
PROC directive there must be an associated ENDP or
ENDPROC directive specifying the end of the function
declaration. The optional EXPORT command tells the assem-
bler and linker that the procedure should be visible to other
files. Although instructions and data donÕt have to be contained
in a module, it is recommended for two reasons. First, local
labels (beginning with a Ò@Ó) can be defined within a module.
These labels will be visible only within the scope of the module
definition. Second, the linker will insert MacsBug symbols
representing each module name. This makes disassembly
within MacsBug more readable.

Related Directives:
FUNC,310
MAIN,312
ENDP / ENDPROC,306
.314317