Mail Archives: djgpp/1998/11/22/09:27:17
On Sun, 22 Nov 1998, Willy Lee wrote:
> 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.
Int 15h is a software interrupt, and these are NOT reflected to protected
mode. You need to install a real-mode handler.
> 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?
See the FAQ for the instructions on how to install a real-mode handler.
If something's unclear there, ask specific questions. In general, a
callback should be enough, unless it isn't fast enough for your needs
(since a callback involves a mode switch).
> If I setup a real-mode callback, can I still chain to the old protected
> mode vector using _go32_dpmi_chain_....?
No, this function is for chaining to protected-mode interrupts only.
There is no function in the library for chaining to real-mode interrupts,
you will need either to modify the register structure passed to your
real-mode handler, before it returns; or call the previous handler from
your handler using the _go32_... functions that simulate far procedure
calls (look them up in the library reference).
- Raw text -