Re: Inline assembler syntax error in Delphi 2006
- From: "Avatar Zondertau" <avatarzt@xxxxxxxxx (please reply to newsgroup)>
- Date: Thu, 29 Jun 2006 11:53:32 +0200
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
This is weird. The absence of '*4' and the TByteArray cast in the
comment suggest that the intention is to access individual bytes of the
array. However, the use of EAX instead of AL or AH makes the access to
the table 32-bit.
Something is wrong here. The correct version would probably be one of
these:
xor al, dword ptr [cCRC32Table + ebx]
xor eax, dword ptr [cCRC32Table + ebx * 4]
Here the first one is more consistent with the comment.
--
The Fastcode Project: http://www.fastcodeproject.org/
.
- References:
- Re: Inline assembler syntax error in Delphi 2006
- From: Avatar Zondertau
- Re: Inline assembler syntax error in Delphi 2006
- Prev by Date: Re: Inline assembler syntax error in Delphi 2006
- Next by Date: Re: Inline assembler syntax error in Delphi 2006
- Previous by thread: Re: Inline assembler syntax error in Delphi 2006
- Next by thread: Re: Inline assembler syntax error in Delphi 2006
- Index(es):
Relevant Pages
|