User`s manual

BL1600 System Development s 35
Dynamic C Libraries
Functions specific to the BL1600 can be found in the software libraries
supplied with Dynamic C. These libraries are maintained in source code
so they can be easily modified or augmented by the user. The BL1600
functions are in the BL16XX.LIB, CPLC.LIB, DRIVERS.LIB, AASC.LIB,
and SERIAL.LIB libraries.
Whenever unresolved calls to functions remain after an application is
compiled, Dynamic C scans all the source libraries for functions with that
name. When found, the functions are extracted from the library and are
compiled with the application. The libraries are scanned until no more
unresolved names are found, so library functions can call other library
functions and their order of appearance in the library is not important.
Dynamic C also accesses a library in the EPROM on the BL1600 board.
This library is in machine language and the library functions can be called
directly from a program. This library has the advantage that the code does
not need to be downloaded, reducing the compile time, particularly for the
standard version of Dynamic C with its slower communication rate. The
EPROM library version is used if the same function appears in both the
EPROM library and the source library.
Use the following preprocessor command to replace a function in the
EPROM library.
#KILL func1, func2, func3 . . .
This causes the specified functions in the EPROM library to be ignored.
Replaceable functions in the EPROM library have a period (.) in their
name. The KILL directive will change the period to an underscore (
_
),
causing a search for a legal C name to occur. Your own version of the
function can then be added to the program or taken from one of the
libraries.
The Dynamic C SAMPLES\BL16XX subdirectory provides sample pro-
grams to illustrate the software described in this chapter.