Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!isgate!krafla!frisk From: frisk@rhi.hi.is (Fridrik Skulason) Newsgroups: comp.sys.ibm.pc Subject: Re: Interrupting An Interrupt Chain Message-ID: <1600@krafla.rhi.hi.is> Date: 28 Mar 90 12:01:13 GMT References: <26909@ut-emx.UUCP> <322@pallas.athenanet.com> <2129@darkstar.ucsc.edu> Reply-To: frisk@rhi.hi.is (Fridrik Skulason) Organization: University of Iceland (RHI) Lines: 45 In article <2129@darkstar.ucsc.edu> mee@ucscb.UCSC.EDU (Kevin Kahl) writes: >Why not adopt a particular convention for each interrupt that has >applications where it is necessary to block the rest of the chain? >For example, why not have a global flag that is set when a TSR >detects its hotkey? All subsequent programs which obey the convention >would then do anything that they needed to (except use the same hotkey) >and then pass control along. Consider the following case when one most certainly does not want any previous interrupt handler to interfere: In many countries a TSR program is used to remap the keyboard in order to provide access to the national characters needed there. For example, here in Iceland when the '/' key is pressed, I want the TSR routine to insert a special character (thorn) into the keyboard buffer. If the TSR routine then passed control to the original INT 9 handler, the character '/' would also be inserted. Of course 'a global flag' would solve the problem, but as the original INT 9 rouine is in ROM, this would require a ROM change - hardly a practical solution. No, I just will have to use the following code, which makes the computer forget that the keypress ever occurred.... IN AL,61H MOV AH,AL OR AL,80H OUT 61H,AL XCHG AH,AL JMP SHORT $+2 OUT 61H,AL CLI MOV AL,20H OUT 20H,AL MOV AX,9102H INT 15H POP AX POP DS IRET -- Fridrik Skulason University of Iceland | Technical Editor of the Virus Bulletin (UK) | Reserved for future expansion E-Mail: frisk@rhi.hi.is Fax: 354-1-28801 |