delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/29/21:50:26

Date: Thu, 30 Mar 2000 05:22:13 +0600 (LKT)
From: Kalum Somaratna aka Grendel <kalum AT lintux DOT cx>
X-Sender: root AT darkstar DOT grendel DOT net
To: DJ Delorie <djgpp AT delorie DOT com>
Subject: Re: Allegro and interrupts
In-Reply-To: <38E25F10.BA510A01@tiscalinet.it>
Message-ID: <Pine.LNX.4.10.10003300517560.1077-100000@darkstar.grendel.net>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 29 Mar 2000 night DOT walker AT tiscalinet DOT it wrote:

> I must call sin() inside an timer function (i can't use a LUT, would
> be too inaccurate...) I don't know how can i lock the function code
> (without knowing the size)

IMHO the code executed in a timer interrupt function should be as little
as possible (like setting a flag) and should not hog up too much cpu,
otherwise the whole system will slow down 

Slow instructions like sin should IMHO not be used in a interrupt
function, BTW rather than use the sin in the interrupt function, cant you
set a flag which will indicate that the interrupt function has been called
and then execute the sin code in your main loop,....

Grendel

Hi, I'm a signature virus. plz set me as your signature and help me spread
:)

- Raw text -


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