FUNC

FUNC

Syntax:
<label> FUNC [EXPORT]

Operation: Define the beginning of a function 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 FUNC directive
there must be an associated ENDF or ENDFUNC directive
specifying the end of the function declaration. The optional
EXPORT command tells the assembler and linker that the
function should be visible to other files. Although instruc-
tions and data don’t have to be contained in a module, it is
recommended for two reasons. First, local labels (begin-
ning 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:
PROC,315
MAIN,312
ENDF / ENDFUNC,304
.309311