OS2-DD C Character Device Driver Support Package for OS/2 1.3 and 2.0. Andreas Kaiser, Danziger Str. 4 D-7000 Stuttgart 70 Germany Fido: 2:241/7220.9 Subnet: ak@ananke.stgt.sub.org Legal Notice (I don't write legal stuff in a foreign language, sorry): ---------------------------------------------------------------------- Ich uebernehme keinerlei Gewaehrleistung fr korrekte Funktion oder irgendwelche daraus resultierenden Schaeden oder Folgeschaeden. Es liegt in der Natur von Geraetettreibern, dass dadurch die Integritaet des Systems verletzt werden kann. Licence: -------- You are free to use and modify this source, as long as you make your source and your device driver available for public according to the usualy GNU Copyleft license and send me a note for what device your driver was written. Files: ------ This driver was developed for Zortech C, but should be usable with other compilers too. dd-head.inc Device driver header. Requires some symbol definitions DD_ATTRIB Driver attributes. DD_NAME Device name, 8 characters padded with spaces. The driver source must provide an ASM file, which defines both symbols and includes this file. No more contents are required. The generated object file must be the object first file in the linker command line, since the header must be the first data in the EXE/SYS file. dd-segs.inc Device driver segment definitions. macros.inc Utility macros. lowlevel.asm Bottom layer. Contains entry point, C wrappers. for most DD helper functions, ... dd.h Device driver definitions and declarations. strategy.c Strategy routine. Dispatches device driver functions. ddebug.c Debugging code for direct video output. If you use Zortech C, the function _STI_ddebug is automatically called whenever this file is linked with the driver (= when debugging code is compiled). If you do not use Zortech C, you have to call _STI_ddebug as the first statement of DrvInit(); Set the variable video_address to 0xB8000 to get debug output on VGA, the default is 0xB0000 for a monochrome chard. Use monochrome whenever possible, you might not get init time output for BASEDEVs when the output is on VGA. d2debug.c Same as ddebug.c but for BASEDEV drivers. If you do not use Zortech C, you have to call _STI_d2debug as the first statement of DrvInitBase(); def_*.c Default driver functions, called by strategy() unless defined in the device driver source (requires linking with /NOE). demo.def Sample definition file. Usage: ------ You should already know about OS/2 device driver programming. The strategy dispatcher calls functions named DrvInit, DrvRead, ... (see dd.h) whenever the corresponding function code is received. The default versions in this library return an "Invalid Function" error indicator. These functions should return the status word (e.h. "return DONE"). Debugging support required a monochrome card. Debugging is enabled when compiling with DEBUG=1. For non-ZTC users: Don't output debugging info before DrvInit or DrvInitBase calls the appropriate _STI_ function.