M
micronet
Unregistered / Unconfirmed
GUEST, unregistred user!
请各位大哥帮我把以下的代码翻译为delphi版的!
//--------------------------------------------------------
unsigned char *tbl64k = 0x054E50E8;//64k字节的代码转换表
unsigned char *tbl32b = 0x0070B887;//32字节的中间计算表
unsigned char *pData = (unsigned char *)recvPack.data;
unsigned selSeg;
for(int i=0; i<recvPack.dataLen-3; i++)
{
selSeg = (tbl32b[i%32]^(recvPack.packNo & 0x0ff))<<8;
for(int j=0; j<0x100; j++)
if (tbl64k[selSeg + j] == pData) break;
pData = j;
}
//--------------------------------------------------------
unsigned char *tbl64k = 0x054E50E8;//64k字节的代码转换表
unsigned char *tbl32b = 0x0070B887;//32字节的中间计算表
unsigned char *pData = (unsigned char *)recvPack.data;
unsigned selSeg;
for(int i=0; i<recvPack.dataLen-3; i++)
{
selSeg = (tbl32b[i%32]^(recvPack.packNo & 0x0ff))<<8;
for(int j=0; j<0x100; j++)
if (tbl64k[selSeg + j] == pData) break;
pData = j;
}