16-Bit Calling Conventions (OS/2)

Calling Conventions
There are three 16-bit calling conventions supported by IBM C and C++ Compilers: _Far16 _Cdecl,_Far16 _Fastcall, and _Far16 _Pascal.

The _Far16 _Cdecl and_Far16 _Pascal conventions are equivalent to the cdecl and pascal conventions used in other compilers. The_Far16 _Fastcall convention is equivalent to the Microsoft C Version 6.0 fastcall convention.

You can specify the calling convention for a function using keywords. For example, the following fragment uses keywords to declare the function dave as a 16-bit function using the _Far16 _Pascal calling convention:

   void _Far16 _Pascal dave(short, long);

General Rules for 16-bit Calling Conventions



Call Between 16-bit and 32-bit Code


Return Values from 16-Bit Calls
Differences Between the 16-bit Calling Conventions