Reset floating point registers.
Source position: mmx.pp line 54
procedure emms; |
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. The following code demonstrates this:
Program MMXDemo; uses mmx; var d : double; a : array[0..10000] of double; i : longint; begin d:=1.0; {$mmx+} { floating point data is used, but we do _no_ arithmetic } or:=0 to 10000 do a[i]:=d; { this is done with 64 bit moves } {$mmx-} emms; { clear fpu } { now we can do floating point arithmetic again } end.
|
Reset floating point registers - AMD version. |