Language conventions

When you name symbols that you plan to use externally, remember to use
the language specifier for your particular language. These
requirements for variable names are:

Pascal Uppercase characters
C/C++ Name must start with underscore (_). Rest of name should
be in lowercase characters (_name)


When you specify a language in the MODEL directive or in the PROC
declaration, or declare the language in a symbol's PUBLIC (GLOBAL)
declaration, Turbo Assembler will automatically use the proper naming
conventions for that language, as follows:

■ C, CPP, and PROLOG use the C/C++ naming conventions

■ BASIC, PASCAL, FORTRAN, and NOLANGUAGE (assembler) languages use the
Pascal naming conventions

■ SYSCALL specifies C calling conventions, but without prepending
underscores to symbol names (like Pascal naming conventions)

■ STDCALL uses C calling conventions for procedures with variable
arguments, and Pascal calling conventions for procedures with fixed
arguments. It always uses the C naming convention.


The /ml command line switch tells Turbo Assembler to treat all symbol
names as case-sensitive. The /mx switch tells the assembler to treat
only external and public symbols as case-sensitive, and that all other
symbols within the source file are uppercase. When you use these two
switches together, they have a special meaning for symbols declared as
Pascal; these switches cause the symbols in question to be published
as all uppercase to the linker.


Procedure calls

Language None Basic Fortran Pascal C CPP Prolog
Arguments are L-R L-R L-R L-R R-L R-L R-L
PUSHed
(left-to-right,
right-to-left)
Who cleans up Proc Proc Proc Proc Caller Caller Caller
stack (caller,
procedure)