PROC             Procedure definition                               Directive

Turbo Assembler version 3.20 or later:

PROC procname [[language modifier] language] [distance] ; Ideal mode
[ARG argument_list] [RETURNS item_list]
[LOCAL argument_list]
[USES item_list]
; statements
ENDP [procname]


Turbo Assembler version 3.10 or earlier:

PROC [[language modifier] language] procname [distance] ; Ideal mode
[ARG argument_list] [RETURNS item_list]
[LOCAL argument_list]
[USES item_list]
; statements
ENDP [procname]


PROC defines the start of procedure proc_name.

language modifier generates special procedure entry and exit code
that interface with Windows or the VROOM overlay manager.

language specifies which language you will be calling from to
access this procedure. This determines symbol naming conventions, the
order of any arguments on the stack, and whether the arguments will be
left on the stack when the procedure returns (procedure prolog code).

distance is NEAR or FAR and determines the type of RET instruction
that will be assembled at the end of the procedure.

argument_list describes any argument the procedure is called with.
RETURNS introduces one or more arguments that won't be popped from the
stack when the procedure returns (see ARG).

LOCAL argument_list describes the stack frame variables local to the
procedure.

USES item_list is a list of registers and/or single-token data items
to be pushed on entry and popped on exit from the procedure (see USES).


A RET statement will generate procedure epilog code appropriate for the
specified language.

You can use the /la command-line switch to include procedure prolog and
epilog code in your listing file.