The language details of this calling convention are the same as for all other calling conventions. _System has the additional restriction that an unprototyped _System function with a variable number of arguments will not work.
To use this linkage convention, use the _System keyword in the declaration of the function. You can make _System the default linkage by specifying the /Ms compiler option.
The following rules apply to the _System calling convention:
For functions that return aggregates greater than four bytes in size, the address to place the return values is passed as a hidden parameter, and the addresss is passed back in EAX.
int fred(int, int, short);
would appear as:
_fred@12
in the object module.
Note: When building export or import lists in module definition files, the decorated version of the name should be used. This is automatically handled when using #pragma export and #pragma import.
![]()
_System Calling Convention in OS/2