Re: Inline assembler syntax error in Delphi 2006
- From: "Avatar Zondertau" <avatarzt@xxxxxxxxx (please reply to newsgroup)>
- Date: Thu, 29 Jun 2006 13:23:27 +0200
xor al, dword ptr [cCRC32Table + ebx]
When I tried your first solution , I get Operand type mismatch error.
Oops, should've been
xor al, byte ptr [cCRC32Table + ebx]
Please do help me on this.
Can you tell me what is the difference b/w
xor eax, DWORD [cCRC32Table][EBX*4] // Result:=eax xor Table[ebx]
Xor DWORD with element from array of DWORD
xor eax, DWORD [cCRC32Table][EBX]
// Result:=eax xor TByteArray(Table)
Xor DWORD with four elements from array of BYTE, cast to DWORD
and your second solution(
xor eax, dword ptr [cCRC32Table + ebx * 4]) denotes
// Result:=eax xor Table[ebx]
Xor DWORD with element from array of DWORD
Note that you're still using the [cCRC32Table][EBX*4] notation which is
weird and wrong. I'm surprised it compiled on Delphi 5. I assume it
denotes [cCRC32Table + EBX*4], which would be consistent with what this
seems to be meant for.
--
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
- 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):