Delphi 4 and Assembler
Posted on 2005-04-21
I need to use a CRC routine to do a reverse 16 bit CRC calculation. I've been given a copy of the pascal code for this but when I compile it using Delphi 4, I get an "Invalid Register Combination" error in the assembler section. I don't know assembler and how it's supposed to interact with Delphi, so I'm hoping the solution to the problem is relatively straight forward.
However I know that some people have been able to compile this in Delphi 6 with no problems, so I might need to convert this code to Delphi. Can anyone help me with this?
The fragment of code:
mov bl, cChar
mov bh, 0
les di, DWORD PTR [lpCRCValue]
xor bx, es:[di] <-- invalid register combination
and bx, 00FFh
shl bx, 1
mov ax, es:[di] <-- invalid register combination
shr ax, 8
xor ax, WORD PTR [CRC16R_tab[bx]] <-- invalid register combination
mov es:[di], ax