Mail Archives: djgpp/1997/12/08/21:12:06
At 08:44 12/7/1997 -0500, H. Anthony Hoyt wrote:
>I know this is more of a C++ thing then an DJGPP thing but I though I
>might give the croud a shot at this.
>
>I have a Keyboard class which I want to use to take over the keyboard
>interupt 0x09. So I create an instance of _go32_dpmi_seginfo for the old
>handler and my new one. I then _Try_ to get the segment:offset address
>for my handler and then set my function as the new handler.
>Well In created a test function that shout print what key is currently
>pressed but when I run it, and hit a few keys, nothing happends. Now I've
>tried everything I could to get the new handler installed past the old one
>but I can't seem to get it right. Is it possable to override an interupt
>with a C++ class function? Or do I have to do it in regular C and bear
>with it?
First of all, read FAQ section 18.9.
Also, make sure not to use I/O functions inside the interrupt handler since
this can cause very bad stuff to happen.
I don't know whether you can have a C++ class member function as an
interrupt handler; I suspect not. If you write it as a function of its own,
not in any class, everything should be fine.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -