fpc/tests/webtbs/tw4450.pp
peter 19eaf660c2 * more flexibel support for typecasting to different sizes
fixes tw4450
      

git-svn-id: trunk@1544 -
2005-10-20 11:13:49 +00:00

22 lines
244 B
ObjectPascal
Executable File

{ %cpu=i386 }
{$ifdef fpc}{$asmmode intel}{$endif}
Type
float=single;
var
f : float;
begin
f:=4.0;
asm
lea eax,f
fld SizeOf(float) ptr [eax]
fsqrt
fstp SizeOf(float) ptr [eax]
end;
writeln(f);
if trunc(f)<>2 then
halt(1);
end.