Mail Archives: djgpp/1996/07/01/01:31:22
> Basically I want to write a program that traps a HW interrupt while a
> DPMI32 program is running.
Two ways.
1) Write your trap program which grabs the HW interrupts, then have it
system/spawn the program you want to watch. Nice, simple, and easy
to unload. This is similar to the way the debuggers do it - they
hook Int 31 and watch what the child asks DPMI to do for them. See
dbgcom.c for details on the hooking.
2) Write a DJGPP TSR. This can be done with CWSDPMI and the tools you
already have. Basically you hook whatever HW/SW ints you want, then
you call the simulate interrupt call with the dos TSR call (the
amount of memory to keep should be just the PSP plus whatever amount
of transfer buffer you might need (usually zero, since you can use
the last 128 bytes of the psp as a mini real mode buffer, if needed).
You can't unload it, and you have to put up with the entire CWSDPMI
footprint always resident. This may also work under other DPMI
providers but I haven't tested it. I did test TSRs with CWSDPMI.
- Raw text -