home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_03_05
/
3n05054a
< prev
next >
Wrap
Text File
|
1992-03-10
|
790b
|
30 lines
Listing 1
/*****************************************************/
/* clearfpu.c */
/*****************************************************/
void
ClearFPU(void)
/*****************************************************/
/* -- Safely clear exception bits in the FPU. */
/* -- Ignore all FPU exceptions. */
/* -- Call this routine following each call to */
/* GetMessage() or PeekMessage(). */
/*****************************************************/
{
unsigned wControl;
/* Get the current control word. */
_asm fnstcw wControl;
_asm wait;
/* Ignore all exceptions. */
wControl |= 0x007f;
_asm fnclex;
_asm fldcw wControl;
}