Not surprisingly, the display driver model of Windows 1.x/2.x/3.x and OS/2 1.x/2.x was quite similar. This was in sharp contrast to the drivers for just about every other device; while disks or network adapters already had existing drivers in DOS, the drivers for Windows GDI had to be written from scratch. When the Presentation Manager was created, Microsoft recycled much of the existing Windows driver model.
Both in OS/2 and Windows, displays and printers both used the same basic driver model. The driver model was designed with a C-callable interface, but traditionally only printer drivers were written in C, while display drivers were written in assembler.
Viewed from a modern perspective, the Windows and OS/2 driver model was byzantine, overly complex, with drivers being difficult to write and nearly impossible to fully debug. The drivers could implement nearly the entire graphics engine, and even the most basic driver had to implement significant functionality. This included rendering memory bitmaps (device contexts), which seems bizarre in hindsight. Continue reading