Re: Inline assembler syntax error in Delphi 2006



Menaka wrote:
I have changed The delphi 5 code
xor eax, DWORD [cCRC32Table][EBX] // Result:=eax xor TByteArray(Table)
[ebx]
to Delphi 2006 as
xor eax, DWORD ptr [cCRC32Table + EBX]

Please tell me whether this is correct

If CRC32table is an array of 32-bit entries, this is not correct. You want:

xor eax, DWORD ptr [cCRC32Table + EBX * 4]

Cheers,
Nicholas Sherlock

--
http://www.sherlocksoftware.org
.



Relevant Pages

  • Re: Inline assembler syntax error in Delphi 2006
    ... xor eax, DWORD ptr [cCRC32Table + EBX] ... The absence of '*4' and the TByteArray cast in the ...
    (borland.public.delphi.language.basm)
  • Re: Single multiplication
    ... PUSH EBX ... XOR EDX, EDX ... FMUL dword ptr ... > keep res in the FPU stack and thereby save a load and a write per loop. ...
    (borland.public.delphi.language.basm)