【发布时间】:2011-10-08 06:05:41
【问题描述】:
这将如何从 asm 变成纯 delphi?我无法编译需要 GraphicEx 的组件,在 JPG 单元中给我一个错误,即内联汇编不支持 64 位。
function __ftol: Integer;
var
f: double;
begin
asm
lea eax, f // BC++ passes floats on the FPU stack
fstp qword ptr [eax] // Delphi passes floats on the CPU stack
end;
Result := Trunc(f);
end;
【问题讨论】:
-
ftol 通常包含在链接到使用 bcc32 编译的 .obj 文件时。这就是这里发生的事情吗?
标签: delphi assembly delphi-xe2 basm graphicex