7526 DCT Reference
compiling and linking a CFR
The CFR writer builds a function with a "main(function,*paramlist)" entry
point; compiles with the appropriate include files, and links with the
CFRAPI26.LIB library provided (and any other libraries required)
to create a CFR program file.
The 7526 DCT application program interface library,
CFRAPI26.LIB, contains:
- A CRT0 module to link with the CFR which provides for parameter
passing to the CFR, BSS initialization, stack switching, and return to the
7526 DCT Operating System. CFRCRT0.OBJ substitutes for the normal
CRT0.OBJ linked with C language code
- API modules to link with the CFR to make the
calls to the 7526 DCT APIs.
An include file CFRAPI26.H is provided for the CFR
writer which contains 7526 DCT API function prototypes,
defined constants, and return code defines.
The IBM C/2 Version 1.10 Compiler and
IBM Linker/2 Version 1.10 are supported.
The following compiler invocation command is recommended:
- cl -c -nologo -Fo -FPa -AL -Zpe -Ox -Gs -I[path]cfrapi26.h mycfr.c
- -c
- suppress automatic linking
- -nologo
- suppress logo and copyright in output stream
- -Fo
- create object file
- -FPa
- Use "Alternate" math floating point library routines
- -AL
- large model
- -Zpe
- pack structures, enables C language extensions
- -Ox
- maximum optimization
- -Gs
- 8086 8088 instruction set, no stack checking
- -I[path]cfrapi26.h
- location of include file, path optional
- mycfr.c
- CFR source file
Note:
The CFRAPI26.H must be in the path specified in the
SET INCLUDE= statement for the C compiler or in the current directory.
The following format is recommended for the link operation:
-
link mycfr+...,mycfr.exe,mycfr.map,cfrapi26.lib/NOI /MAP /DOSSEG
- mycfr+....
- list of object modules
- mycfr.exe
- output executable file name
- mycfr.map
- output map file name
- cfrapi26.lib
- 7526 CFR API library, required - supplies CFRCRT0.OBJ as a
minimum, plus modules for 7526 CFR APIs
- /NOI
- preserve case
- /MAP
- list all public symbols in the map file
- /DOSSEG
- places the CFR program segments in the proper order
Note:
Ensure that linkage is with a real mode "C" library, and
not with a protected mode library. If floating point functions are
used, the library linked must contain "Alternate" math routines (that is,
LLIBCAR).
Additionally, ensure that CFRAPI26.LIB is in the
path specified in the SET LIB= statement for the C compiler.
.