[fpc-pascal] ASM code conversion from Delphi

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Apr 29 14:39:57 CEST 2009

On 29 Apr 2009, at 14:23, Roland Turcan wrote:

> Delphi:
>  mov  DWord ptr TCPUIDData (edi).r_eax,eax

By using this:
   mov  DWord ptr TCPUIDData ([edi]).r_eax,eax

As far as I can tell from the manuals posted at http://docs.embarcadero.com/products/rad_studio/ 
, the fact that Delphi accepts your code is a bug in Delphi. Your  
original instruction would mean that you type cast the register "edi"  
to TCPUIDData, which does not make sense.

Still, this Delphi incompatibility has been fixed recently in FPC, so  
both ways will work in 2.4.0: http://bugs.freepascal.org/view.php?id=9327


More information about the fpc-pascal mailing list