The #pragma seg16 directive specifies that a data object will
be shared between 16-bit and 32-bit processes.
>>---#---pragma--seg16--(--identifier--)--><
It causes the compiler to lay out the identifier in memory so that it does not cross a 64K boundary. The identifier can then be used in a 16-bit program.
The identifier can be a typedef or a data object . For
example:
typedef struct foo foostr; #pragma seg16(foostr) foostr quux;
uses the typedef foostr to declare quux as an object addressable by a 16- bit program.
You can also use the compiler options to perform the equivalent of a #pragma seg16 for all variables in the program.
Note: If #pragma seg16 is used on variables of a structure type , the pointers inside that structure are not automatically qualified as usable by 16-bit programs. If you want the pointers in the structure qualified as such, you must declare them using the _Seg16 type qualifier.