Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call _IntfCopy procedure using Delphi's inline assembler

Tags:

delphi

procedure _IntfCopy is defined in System.pas:

procedure _IntfCopy(var Dest: IInterface; const Source: IInterface);

Just wondering if it is possible to call _IntfCopy procedure using Delphi inline assembler:

procedure Test;
asm
  ...
  call _IntfCopy;
end;

That always resulted to E2003 Undeclared identifier: '_IntfCopy' during compiling.

A simple coding:

var a, b: IInterface;
begin
  a := b;
end;

produce in Delphi assembler:

mov eax,$0042481c
mov edx,[$00424820]
call @IntfCopy

But I couldn't find a way to write inline Delphi assembler to do IInterface reference via assignment operator.

like image 986
Chau Chee Yang Avatar asked Jan 24 '26 09:01

Chau Chee Yang


1 Answers

The magic incantation is:

call System.@IntfCopy
like image 120
David Heffernan Avatar answered Jan 27 '26 00:01

David Heffernan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!