Mail Archives: djgpp/1998/11/22/05:30:15
DJ Delorie wrote:
>
> > I've been trying to write a little keyboard-translation TSR today and
> > was looking in the FAQ; there's quite a bit there about interrupt
> > handling which has been very useful but I couldn't find very much about
> > installing an interrupt handler as a TSR. Has anyone any pointers or
> > tutorials dealing with this topic?
>
> Try v2tk/djgpptsr.zip
Right, I'm doing almost exactly the same thing, but my handler never
seems to get called.
I should explain that I'm trying to hook Int 0x15, function 0x4F, which
is supposed to be called by the Int 0x09 (keyboard interrupt) handler
from real-mode.
I just read something in the DPMI spec which may explain it; it says
that "Ordinarily, a handler installed with DPMI Function 0205H
[set_protected_mode_interrupt_vector] will only service software
interrupts that are exectuted in protected mode; real mode software
interrupts are passed to handlers installed with DOS Int 21H Function
25H issued from real mode, DPMI Int 31H Function 0201H
[set_real_mode_interrupt_vector], or by direct manipulation of the
interrupt vector table at real mode address 0000:0000." Is this the
reason that my handler is never called?
What's the best thing for me to do here? Looks like I need to set a
real-mode vector to point to a real-mode address for my handler. Do I
need to setup a real-mode callback? Or should I just make the handler
completely real-mode?
If I setup a real-mode callback, can I still chain to the old protected
mode vector using _go32_dpmi_chain_....?
Thanks for any and all help you may have to give,
=wl
--
Willy Lee uses some form of Emacs http://www.jps.net/willy2
ICQ-UIN: 7570905 "People hardly ever make use of the
freedom which they have, for example, freedom of thought; instead
they demand freedom of speech as a compensation." -- S.K.
- Raw text -