请朋友帮帮忙,这段C代码如何改成DELPHI的?谢谢!
static char szAction[100];
void Action(int index)
{
memset(szAction, 0, sizeof(szAction));
index = index > Contract? Contract : index < AddSP? AddSP: index;
strcpy(szAction, szActionList[index]);
__asm{
pushad
mov ebx, 0x754ea4
mov ecx, dword ptr ds:[ebx]
push offset szAction
mov ebx, 0x430FD0
call ebx
popad
}
}
请朋友帮帮忙,这段C代码如何改成DELPHI的?谢谢!
[解决办法]
var
Form1: TForm1;
szAction:string[100];
implementation
{$R *.dfm}
procedure action(index:integer);
begin
szaction:='';
if index>contract then
index:=contract
else if index<AddSP then
index:=AddSP
else index:=index;
saaction:=szactionlist[index];
ASM
pushad
mov ebx, 0x754ea4
mov ecx, dword ptr ds:[ebx]
push offset szAction
mov ebx, 0x430FD0
call ebx
popad
END;
end;