14.1.2 Selecting a Calling Convention

The Cmacro calling-convention option specifies the high-level–language calling convention that the application will use. You can select the calling convention by defining the value of the ?PLM option. The values for the calling conventions are described as follows:

Value Convention Description

0 Standard C The caller pushes the rightmost argument onto the stack first, the leftmost last. The caller pops the arguments off the stack after control is returned.
1 Pascal The caller pushes the leftmost argument onto the stack first, the rightmost last. The called function pops the arguments off the stack.

You can set the ?PLM value by using the = directive. The statement has the following form:

?PLM = 1

The default is the Pascal calling convention. That convention is required for functions called by Windows.