Java转汇编代码的分析。特别困惑。请大家支招解决方法

Java转汇编代码的分析。特别困惑。请大家支招

byte map[32]={0,0……0};
int len=strlen(string);
for(int i=0;i<len;i++)
map[(string[i])>>3] |= 1<<( (string[i]) &7)

下面是汇编代码,map和string都是byte型的变量。
PrepareMap PROC,
string:PTR BYTE,
map:PTR BYTE

local i:byte
mov esi,string
mov eax,map
mov i,0

For:
     SHRD ebx,[esi+i],3
     AND [eax+i],7
     SHRD edx,[eax+i],1
     OR [eax+ebx],edx
     inc i

loop For



我这是直接按照代码翻译过来的,但是有错误,谁懂能帮我看看纠正下嘛。
------解决方案--------------------
你应该:

  lea esi,string
  lea edi,map
for:
  movzx ecx,byte ptr [esi]
  inc esi
  jecxz done
  mov edx,1
  mov eax,ecx
  and ecx,7
  shr eax,3
  shl edx,cl
  or [edi+eax],edx
  jmp for
done: