John Wilson July 6, 2006 This is a quick and dirty demonstration module to show how to handle hardware interrupts in an E11 plug-in module written in Watcom C. The demo takes over the keyboard interrupt (IRQ1) and increments the character in the upper left corner of the screen (assuming a color display and no screen scrolling since E11 started, or else SET SCROLL SOFT in effect) on each keypress or keyrelease. This is useless, especially since there's no way out of it except pressing the reset switch, but the point is to demonstrate the mechanics of setting vectors and dismissing interrupts. A module driving a real device would use the IRQ on which that device interrupts (definitely not IRQ1), and the init code would not only set the vector, but also initialize the device and unmask its IRQ line in the 8259As (as usual for any PC driver which uses HW interrupts). Note that inp() and outp() are functions so code using them will be pretty verbose. It's better to use _asm to embed IN and OUT instructions in your code.