The following sections describe how to build an ADC on 16 bit Intel platforms. (MS-DOS, FlexOS, OS/2, Windows 3.x)
Linker option files are supplied which reference all the ADC modules except the user-defined module ( auxuser, auxdebug, auxdupe etc). These option files are named AUXn.LNK or AUXn.INP , where n relates to the operating system as per the above table. These option files are referenced by the AUXLINK batch files during linking. AUXLINK files are supplied for each environment supported for the ADC and are convenient tools for linking. It is important to use the correct parameters with AUXLINK, especially when the executable will later be converted for another operating system - run AUXLINK -HELP for advice.
The example link commands given in the following sections are for the example ADC AUXDEBUG . To build a different ADC replace " AUXDEBUG " with the name of your user-defined (auxuser-derived) module in the link command, or supply that name as a parameter to the appropriate AUXLINK file.
ADCs can be built using any memory model supported by DP4 program libraries: small,medium, and large for Microsoft C; and the same models plus Big model for Metaware C. Microsoft C should be used for OS/2 and Windows ADCs. Metaware C should be used for FlexOS. MS-DOS ADCs can be built with either compier. ADC modules should be compiled with the same compiler options as normal DP4 programs, except that for 16 bit Windows programs you will also want to specify the options normally used for Windows programs if you are calling Windows functions directly. A batch file called auxlink.bat is supplied for each memory model, and can be used to link ADCs for any platform by specifying the ADC number for the target platform i.e.:
| Nr | Platform |
|---|---|
| 2 | MS-DOS |
| 5 | FlexOS |
| 7 | OS/2 |
| w | Windows |
The target ADC will default to the one appropriate to host operating system if not specified. When used with the /C option the small model version of AUXLINK can build an MS-DOS ADC program that can be converted to another operating system. It is vital to specify the correct platform in this case. Although theoretically possible It is highly inadvisable to attempt to build a Unix ADC using 16 bit compilation. Such ADCs will nor work beyond release 4.520 and will only work on platforms with the I286emul program.
You are strongly recommended to use or adapt the AUXLINK file. If for some reason this is inconvenient the following information may be helpful.
Memory models supported: Small, Medium, Large
Compile all the source files (listed above):
Alternatively use the compiler batch file, MC.BAT, supplied by DP4 for each model.
Link using the Microsoft linker.
Alternatively use the AUXLINK.BAT file supplied by DP4 for use with the relevant Microsoft compiler memory model.
Memory models supported: Small, Medium, Big, Large
Compile all the modules using the hc compiler.
|
WARNING: It is vital that the HC.PRO files supplied by DP4 for your chosen Metaware compiler model(s) are referenced appropriately during Metaware compilation |
Link using the Microsoft linker:
( dosalloc.obj will be supplied with your compiler and a modified init.obj supplied by DP4)
( dosalloc.obj will be supplied with your compiler and a modified init.obj supplied by DP4.)
Alternatively use the AUXLINK.BAT file supplied by DP4 for use with the relevant Metaware compiler memory model.
The following source files comprise the FlexOS ADC:
aux5.c
auxproc.c
auxcall.c
auxcall5.c
user-defined module (for example, your adapted
auxuser.c
)
All FlexOS ADCs may be built native under FlexOS, or converted from MS-DOS.
Memory models supported: Small, Medium, Big, Large
Compile all the relevant source files using hc .
|
WARNING: It is vital that the HC.PRO files supplied by DP4 for the various Metaware compiler models are referenced appropriately during Metaware compilation |
Link native under FlexOS using the Metaware linker:
link y=hcroot5,aux5[in],auxdebug,hcowns.l86[s],hcse.l86[s]
Alternatively use the AUXLINK.BAT file supplied by DP4 for use with the Metaware compiler and relevant memory model.
The following source files comprise the OS/2 ADC:
aux7.cuser-defined module (for example, your adapted auxuser.c )
Memory models supported: Small, Medium, Large
Compile all the source files (listed above):
Alternatively use the compiler batch file ( MC.BAT ) supplied by DP4 for the each Microsoft model.
Alternatively use the AUXLINK.BAT file supplied by DP4 for use with the relevant Microsoft compiler memory model.