Board index » delphi » FPU used in IRQ handler

FPU used in IRQ handler

Hi,

Does anybody know how to manage with FPU, to use it properly
in a IRQ handler ?
I try to save and restore the FPU context
(with FSAVE and FRSTOR in ASM instructions)
at the beginning and at the end of my IRQ handler,
but that does'nt work very well.

Thank you very much if you can help me.

Denis Fourr
apilo...@wanadoo.fr

 

Re:FPU used in IRQ handler


Quote
Denis Fourr wrote:

> Hi,

> Does anybody know how to manage with FPU, to use it properly
> in a IRQ handler ?
> I try to save and restore the FPU context
> (with FSAVE and FRSTOR in ASM instructions)
> at the beginning and at the end of my IRQ handler,
> but that does'nt work very well.

> Thank you very much if you can help me.

ive never tried this, but i looked in the manuals, and found

fstenv - store fpu environment
fldenv - load fpu environment

im not sure how to use it, it says

fstenv m14/m28

so i guess beeing on the safe side, use a 28 byte array

of coz, m stands for memory

check it out, hope it migh be any good

- Asbj?rn

Re:FPU used in IRQ handler


JRS:  In article <6ebk7g$le...@peuplier.wanadoo.fr> of Fri, 13 Mar 1998
16:47:33 in comp.lang.pascal.borland, =?iso-8859-1?q?Denis_Fourr=E9?=

Quote
<apilo...@wanadoo.fr> wrote:
>Does anybody know how to manage with FPU, to use it properly
>in a IRQ handler ?
>I try to save and restore the FPU context
>(with FSAVE and FRSTOR in ASM instructions)
>at the beginning and at the end of my IRQ handler,
>but that does'nt work very well.

See, in Web <URL: http://www.merlyn.demon.co.uk/pas-math.htm>,
<A HREF="#FloatISR">Floating-Point in Hardware ISRs</A>,
which may help.

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web <URL: http://www.merlyn.demon.co.uk/> - TP/BP/&c. FAQqish topics & links.
  Timo's TurboPascal <A HREF="ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip">FAQ</A>.
  <A HREF="http://www.merlyn.demon.co.uk/clpb-faq.txt">Mini-FAQ</A> of c.l.p.b.

Other Threads