4. Miscellaneous
DRIVER1$ and DRIVER2$ are only demonstration samples!!!
A usual driver should implement additional things like RM (Resource Management) mechanisms and should be APM (Advanced Power Management) aware.
Polling with a timer routine is not very nice. A "real" adapter should use special interrupts to signal a driver.
If you want to use some standard C library calls, it is necessary to place this code in front of the Init() function! To achieve this, you may put the init code in a separate library and link it as the very last specified library (thanks to Glen Self). Or you may use the #pragma statement to put the init code in a separate named segment and order the segments in the right way in the DEF file (thanks to Rüdiger Ihle).
MSC put global variables which are NOT INITIALIZED in a segment called "common". Only INITIALIZED global variables are put to the data segment! To avoid problems, initialize all global variables!!!
Ask IBM to publish the KEE (Kernel Execution Environment) specification!!! It's the new 32 bit device helper interface which is implemented in the Warp Server for e-business.
If you want to
build a LED-Switch device for the sample drivers, the following
picture should help:
The
PIN numbers are for the parallel port plug (male). The default PE
(paper empty) bit is set to 1 and can be set to ground (GND) by
pressing the switch. The standard byte of the status port is 6f (on
my machine) and 4f, if I press the switch.
You may use my sample driver1 test program and sample driver2 test program to test the driver. Both programs are written as 32 bit C programs, using the VACPP compiler. The test program for driver1 using standard C library file functions (e.g. fopen(), fclose(), ...) and the test program for driver2 using the OS/2 Kernel API file functions (e.g. DosOpen(), DosClose(), ...).
Warpstock Europe 1999 |