[alt.hackers] PC interrupt hacking

imp@Solbourne.COM (Warner Losh) (06/06/90)

Has anybody done any really strange interrupt hacking on a PC or
PC-oid?

I just got done hacking something together for my Rainbow to let TCC
run on it unmodified.

The problem: INT 18 is unused on a PC.  It is the one ROM bios routine
on the Rainbow.  the rainbow also has a MFU watchdog timer that causes
a system reset if the interrupts are off more than 100ms (or so).
When TCC establishes its interrupt routine, it causes the interrupts
to be turned off (indirectly), and the system resets.

So, what I did was to trap the Get Vector and Set Vector functions of
DOS.  I also have my own INT 18 handler that calls ROM when the call
is from "Low memory" or the ROMs, but calls the routine that has been
set in the Set Vector "call" to dos.  It works great.  Fun stuff I
tell you.  Now when DOS calls the ROMs to do its stuff, they do their
stuff.  When TCC calls its INT 18 handlers, TCC's INT 18 handler gets
called and everybody is happy.  Aren't TSR's wonderful?

Anybody done anything similar?

Warner Losh		imp@Solbourne.COM