X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Mario Cossi" Newsgroups: comp.os.msdos.djgpp Subject: lengthy interrupt routines Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: Date: Tue, 22 Jun 2004 14:14:01 GMT NNTP-Posting-Host: 217.172.194.163 X-Complaints-To: newsmaster AT tin DOT it X-Trace: news3.tin.it 1087913641 217.172.194.163 (Tue, 22 Jun 2004 16:14:01 MET DST) NNTP-Posting-Date: Tue, 22 Jun 2004 16:14:01 MET DST Organization: TIN To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I am working on an embedded application on a DOS box which has to respond to an interrupt. The amount of processing required to respond to the interrupt is fairly large and requires a number of non-reentrant DOS/BIOS calls. To address this problem I had the interrupt routine do the bare minimum, storing some data in a circular buffer, then I sprinkled my code with something like: if (gotEvent ()) serveEvent (); Ugly, but served its purpose. Now I added in the app a few calls to an external math library that makes some heavy processing and response time to the interrupts is no longer acceptable. The obvious solution would be to go and "cure" the library with the same "if (gotEvent ())..." stuff, but I would rather not as the library is being developed elsewhere and is changed pretty often. Any clue? Thanks in advance -m