怎么把它变成偏移量的那种,而不是直接来个数组下标?
怎么把它变成偏移量的那种,而不是直接来个数组下标?
a[1] = 5; 009B1519 mov eax,4 009B151E shl eax,0 009B1521 mov dword ptr a[eax],5 a[2] = 5; 009B1529 mov ecx,4 009B152E shl ecx,1 009B1530 mov dword ptr a[ecx],5
这是我现在的汇编代码
怎么把它变成下面的 代码呢

a[1] = 5; 009B1519 mov eax,4 009B151E shl eax,0 009B1521 mov dword ptr [ebp+eax-1ch ], 5 a[2] = 5; 009B1529 mov ecx,4 009B152E shl ecx,1 009B1530 mov dword ptr [ebp+ecx-1ch ],5
就是把它变成偏移量的那种,而不是直接来个下标
这两个都是我在VS反汇编里打开的样子