About me
Home
Resumé
CV
Pictures

Course Work
CSE300-FA98

Teaching
Portfolio
CSE240-SP99
CSE207-FA03

Misc
eHarmony
Documents

Tools

Testing the Keyboard Interrupt

As you have probably found, testing interrupt code is a little more complex than testing regular procedures. Since you want to test your interrupt code as it will exist in a TSR, you need some type of testing module. There are a couple of tricks to help you out. First, you can create a file that has your Int09h handler, hook the interrupt and then put the instruction jmp $ in your code. This will cause your program to jump back to this instruction which will leave your program locked in this infinite loop. While it is busy just jumping around, your keyboard routine will function just fine. If you want, you can safely use int 21h calls to print debug messages to the console. If you feel that is too much modification of your interrupt handler, you can make this loop a little bigger. Have it constantly print a status message. Presumably, your int09h code is going to modify some flag or update a variable or something. Whatever it does, you can constantly print the value of this to the console. For example, if we have a flag that tells us if the last key pressed was an integer 0-9. We can keep printing this variable.

    waitForever:
        print  lastKeyVariable
        jmp    waitForever

You will see tons of updates constantly flying across your screen, but you can extract enough information to make this useful.

Last Modified: January 26, 1999 - Barry E. Mapen