These keywords provide support for mixed language programming
and for mixed memory models. Although they are not necessary for
all applications, their judicious use can significantly enhance
program performance.

Note:
The keywords __far, __interrupt, __handle,
__loadds, and __huge are ignored by default in
compilations using the Win32 (the default) memory model.
Ignore these keywords
in any compilation by specifying the -NF compiler
option.

For backwards compatibility with legacy code,
the keywords _cs, cdecl, _cdecl, far, _far, near,
_near, huge, _huge, pascal, and _pascal are also supported.
These are incompatible with the language standards, and so should be
replaced wherever found with the
versions that have two leading underscores.

__cdecl, __fortran, and __pascal

These provide support for calling functions in other languages. For more
information, see Mixing Languages.

__export

This keyword aids those programming Microsoft Windows.
__export causes the function name to be exported to the linker.

__export may also be used to designate all members of a class for
export by adding the keyword between the class and the tag name.
For example:

Digital Mars C++ supports the Microsoft specific keyword
__declspec and the related attributes dllimport, dllexport,
naked, and thread. Use __declspec along with an attribute
when declaring functions or variables, as described below.

Note:
Like other extended keywords, __declspec is
disabled with the -A (ANSI compatibility)
compiler option.

dllimport and dllexport attributes

Use dllimport and dllexport to import and export
functions and data objects to and from DLLs.

The dllimport attribute takes the place of the IMPORTS statement
in a module definition file; it indicates that a function resides in a
DLL.

The dllexport attribute takes the place of the EXPORTS statement
in a module definition file (and the __export keyword). Use it
in DLLs to indicate which functions and data objects are available to
other applications and DLLs.

The syntax for declaring a function or data object with the
dllimport or dllexport attributes is:

An __emit__ declaration is used to embed short assembly language
fragments into the body of the code. __emit__ takes a
variable number of integer arguments, representing the machine
language instructions. The compiler then inserts these instructions
into the generated code. For example, the declaration

__emit__(0xB47F, 0x89CB, 0xCD21);

and inserts these instructions into the code:

mov AH,7F
mov BX,CX
int 21

It's probably better to use the inline assembler rather than
__emit__.