Page 52
The
near,
far, and
huge modifiers can also be use as function
type modifiers; that is, they can modify functions and function
pointers as well as data pointers. In addition, you can use the
_export,
_loadds, and
_saveregs modifiers to modify functions.
The
near,
far, and
huge function modifiers can be combine with
cdecl or
pascal, but not with
interrupt.
Functions of type
huge are useful when interfacing with code in
assembly language that doesn't use the same memory allocation
as Trubo C++.
A non-
interrupt function can be declared to be
near,
far, or
huge
in order to override the default settings for the current memory
model.
A
near function uses
near calls; a
far or
huge function uses
far call
instructions.
In the small, and compact memory models, an unqualified func-
tion defaults to type
near. In the medium and large models, an
unqualified function defaults to type
far.
A
huge function is the same as a
far function except that the DS
register is set to the data segment address of the source module
when a
huge function is entered, but left unset for a
far function.
...