摘要 |
A code generator together with a pre-compiled library of proprietary printer functions having entry points accessible by a link editor. The code generator obtains design parameters for a printer driver, the design parameters including parameters relating to input functionality, output functionality, user interface functionality, and print data processing functionality. In addition, the code generator obtains a pointer to a printer port function that interfaces directly to a printer port. Preferably, the code generator also obtains an other pointer to an other function that uses a port or an operating system function to access a system resource. Thereafter, the code generator generates source code in a high-level language such as C or C++, with the source code implementing the design parameters by including calls to appropriate ones of the functions in the pre-compiled library, and by including a call to the system function such as a printer port function that causes printer data to be output to the printer port. The source code also preferably includes a call to the other function that accesses the system resource. Thereafter, the generated source code may be compiled by a standard compiler into a compiled object, and the compiled object can be linked by a link editor with the pre-compiled library of functions, so as to yield an executable which implements desired printer functionality.
|