delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/22/05:30:15

Message-ID: <3657E72D.99420240@jps.net>
Date: Sun, 22 Nov 1998 02:27:57 -0800
From: Willy Lee <willy2 AT jps DOT net>
Organization: WombatSoft
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: TSRs with DJGPP?
References: <365693BC DOT 6B54EC5C AT jps DOT net> <199811211417 DOT JAA18338 AT envy DOT delorie DOT com>
NNTP-Posting-Host: 209.239.204.105
X-NNTP-Posting-Host: 209.239.204.105
Lines: 44
X-NNTP-Posting-Host: 209.63.114.134
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019