Can anyone tell me why this code works in Delphi 7, but in version 10.4 it has a memory error?
procedure ChatPrintf(ChatPrintMSG: PChar);
var
ChatPrint: Cardinal;
procedure ChatPrintASM(ChatPrintMSG: PChar); assembler;
asm
lea edx, [ChatPrintMSG]
push edx
call [ChatPrint]
pop edx
end;
begin
ChatPrint := $009E0C30;
ChatPrintASM(ChatPrintMSG);
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
ChatPrintf('it: works');
end;