Path: utzoo!attcan!uunet!cs.utexas.edu!yale!cmcl2!adm!news From: CDCKAB%EMUVM1.BITNET@cunyvm.cuny.edu ( Karl Brendel) Newsgroups: comp.lang.pascal Subject: (R)interupt problems Message-ID: <24565@adm.BRL.MIL> Date: 20 Sep 90 17:09:56 GMT Sender: news@adm.BRL.MIL Lines: 28 In article <9009191305.aa17055@VIM.BRL.MIL>, carl david writes: >I am trying to write an interupt handler for interupt 9, the keyboard >interupt, which accepts two keystrokes, swallows the first, and >processes the second. >The problem is that when I try to chain from my second) interupt back to >the original interupt 9 handler, after doing "my thing", some stack >somewhere appears to be goofed. Have you considered avoiding reentrancy altogether by setting and clearing an appropriate flag? When you see the keystroke you want to swallow, swallow it and set a flag that says "I ate it". Return from the interrupt. When you see the next keystroke, process it, clear the flag and return (or chain). When you see any other keystroke, clear the flag and chain. (By "chain", I mean "pass the interrupt call on to whatever process you stole the interrupt from".) +-------------------------------------------------------------------------+ | Karl Brendel Centers for Disease Control | | CDCKAB@EMUVM1.BITNET Epidemiology Program Office | | InterLink/RIME: KARL BRENDEL Atlanta, GA | | GEnie: K.BRENDEL phone 404/639-2709 | | fts 236-2709 | | Home of Epi Info 5.0 | +-------------------------------------------------------------------------+