6.2.5. `EXPORT': Exporting DLL Symbols
--------------------------------------
The `EXPORT' format-specific directive defines a global symbol to be
exported as a DLL symbol, for use if you are writing a DLL in NASM. You
still need to declare the symbol as `GLOBAL' as well as using the
`EXPORT' directive.
`EXPORT' takes one required parameter, which is the name of the
symbol you wish to export, as it was defined in your source file. An
optional second parameter (separated by white space from the first)
gives the _external_ name of the symbol: the name by which you wish the
symbol to be known to programs using the DLL. If this name is the same
as the internal name, you may leave the second parameter off.
Further parameters can be given to define attributes of the exported
symbol. These parameters, like the second, are separated by white
space. If further parameters are given, the external name must also be
specified, even if it is the same as the internal name. The available
attributes are:
* `resident' indicates that the exported name is to be kept resident
by the system loader. This is an optimisation for frequently used
symbols imported by name.
* `nodata' indicates that the exported symbol is a function which
does not make use of any initialised data.
* `parm=NNN', where `NNN' is an integer, sets the number of
parameter words for the case in which the symbol is a call gate
between 32- bit and 16-bit segments.
* An attribute which is just a number indicates that the symbol
should be exported with an identifying number (ordinal), and gives
the desired number.
For example:
export myfunc
export myfunc TheRealMoreFormalLookingFunctionName
export myfunc myfunc 1234 ; export by ordinal
export myfunc myfunc resident parm=23 nodata