Assembly Language Help (alang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Define a Procedure Prototype
◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Syntax: label PROTO [distance] [langtype] [, [parameter]:tag]...
See also: Procedure Diagram, PROC, INVOKE, EXTERNDEF, TYPEDEF
Description:
Defines a prototype for a subsequent procedure. Informs the
assembler about how many and what kind of arguments should be
expected in a procedure definition. This allows the assembler
to perform type checking on arguments.
If you define a prototype for all stack-based procedures defined
with the PROC directive, you can place procedure prototypes in a
separate include file. This is recommended when using procedures
in a library file.
Parameter Description
label Defines name for the procedure. Must exactly match
<label> in PROC definition.
distance NEAR, FAR, NEAR16, NEAR32, FAR16, or FAR32.
Indicates the call distance of this procedure.
If you choose NEAR or FAR, the assembler will
select 16- or 32-bit NEAR and FAR depending on
the processor directive in effect. If you do not
specify this option, the assembler determines the
distance from the memory model and processor type.
NEAR is the default if you do not use the .MODEL
directive.
langtype Any valid language type. Determines naming style
and calling convention.
See: ◄language type►
parameter Procedure parameter. The assembler translates
argument references into a direct reference to the
stack location. Separate multiple arguments with
commas.
tag Either a qualified type or VARARG. VARARG
allows a variable number of arguments to be passed
as a comma separated list to <argument>. If VARARG
is used, it must be applied to the last parameter
of the PROC directive. VARARG is only allowed with
the C, SYSCALL, and STDCALL language types.
See: ◄qualified type►
-♦-