delphi中怎么把9位hex数写进内存?

来源:百度知道 编辑:UC知道 时间:2024/06/07 20:16:37
如果 hex := 01581668255817C825
怎么把它放进内存
fabao := '01'+inttohex(tox,4)+inttohex(toy,4)+inttohex(nowx,4)+inttohex(nowy,4);
asm
push fabao
end
delphi里面的hex是字符串型的了。所以没成功。
结果不对。请问应该怎么做?

高分求结果

你必须先想好你这9个字节在内存中如何布局。
由于我们的程序编译为32位长的Win32程序,在栈上存储9字节数据应该保留12字节的空间
asm
push Word($00);
push Word($01);
push Word(tox);
push Word(toy);
push Word(nowx);
push Word(nowy);
end;