Coding Conventions and Techniques
Writing a trusted kernel-mode component is not the same as writing an application program. This section presents some basic conventions and techniques to make it easier to code in this environment.
First of all, here are some general guidelines to follow when writing a driver.
Avoid the use of assembly language in a driver. It makes the code hard to read, nonportable, and difficult to maintain. The C programming language is only a small step away from assembly language, anyway. Further, the HAL macros provide the only safe mechanism to access I/O device registers. Therefore, the use of assembly language in a driver should be extremely rare. Be sure to isolate such code into its own module. ...