next up previous contents index
Next: The Mouse unit Up: Functions and Procedures Previous: Functions and Procedures

Emms

   

Declaration:

Procedure Emms ;

Description:

Emms sets all floating point registers to empty. This procedure must be called after you have used any MMX instructions, if you want to use floating point arithmetic. If you just want to move floating point data around, it isn't necessary to call this function, the compiler doesn't use the FPU registers when moving data. Only when doing calculations, you should use this function.

Errors:

None.

See also:

Programmer's guide

Example:
Program MMXDemo;

uses mmx;

var
   d1 : double;
   a : array[0..10000] of double;
   i : longint;

begin
   d1:=1.0;
{$mmx+}
   { floating point data is used, but we do _no_ arithmetic }
   for i:=0 to 10000 do
     a[i]:=d2;  { this is done with 64 bit moves }
{$mmx-}
   emms;   { clear fpu }
   { now we can do floating point arithmetic again }
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998