www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/11/10/02:01:21

Date: Wed, 9 Nov 1994 21:03:54 -0600 (CST)
From: ALAN L HIGHTOWER <alh AT engr DOT engr DOT uark DOT edu>
Subject: Re: A question about writing interrupt handler in gcc
To: djgpp AT sun DOT soe DOT clarkson DOT edu

Ok, heres a run down of the problem I am having, hopefully someone knows 
the master key to unlock all of my troubles. :)

I have a handler that catches irqs off a Gravis UltraSound.  My main 
problem centers around the timer.  Using MSC v6.0, the handler keeps up 
with the UltraSound perfectly, even all the way up to the GUS's maximum 
timer resolution of one tic per 80us, or 12500 times a second.  However, 
using djgpp I hit the max at about 100 times a second.

    I'm using the dpmi chain pm int vector to establish the handler, 
and doing nothing more than checking the type of int and calling the 
appropriate function.  In the timers case, simply incrementing a var.
As far as the functionality of the handler/irq, it works like a charm, 
dma transfers are successfully done via an irq driven system, and voice 
related functions are performed correctly, its just the response of the 
irq or handler itself really lags.   
 
    I have also noticed an incredible performance hit when using the 
outportb instructions to do just about anything.  In the MSC version, a 
simple function to inb a voices real linear position could be called 
thousands of times a second and never skip a single address in its 
reports of where the voice was.  On djgpp, the same code takes a lot 
longer to execute, and in a continuous loop, jumps speratically like it 
isn't able to keep up its polling as fast as the same voice was running. 
I am using cli/sti where needed.  How much of a hit is reasonable to 
expect?

If anyone has any insight, please let me know, tnx

- Raw text -


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