转载自:http://www.cnblogs.com/tactoth/archive/2009/09/27/1574772.html
不懂
最近口干,不喜多言,代码说话:
Call |
_cdecl | _stdcall |
int r=func(3,4); 00411AEE push 4 00411AF0 push 3 00411AF2 call func (4111E5h) 00411AF7 add esp,8 00411AFA mov dword ptr [r],eax | int r=func(3,4); 00411AEE push 4 00411AF0 push 3 00411AF2 call func (4111EAh)
00411AF7 mov dword ptr [r],eax |
Implementation |
_cdecl | _stdcall |
int _cdecl func(int i, int j) { 004113C0 push ebp 004113C1 mov ebp,esp 004113C3 sub esp,0C0h 004113C9 push ebx 004113CA push esi 004113CB push edi 004113CC lea edi,[ebp-0C0h] 004113D2 mov ecx,30h 004113D7 mov eax,0CCCCCCCCh 004113DC rep stos dword ptr es:[edi] return i+j; 004113DE mov eax,dword ptr [i] 004113E1 add eax,dword ptr [j] } 004113E4 pop edi 004113E5 pop esi 004113E6 pop ebx 004113E7 mov esp,ebp 004113E9 pop ebp 004113EA ret | int _stdcall func(int i, int j) { 004113C0 push ebp 004113C1 mov ebp,esp 004113C3 sub esp,0C0h 004113C9 push ebx 004113CA push esi 004113CB push edi 004113CC lea edi,[ebp-0C0h] 004113D2 mov ecx,30h 004113D7 mov eax,0CCCCCCCCh 004113DC rep stos dword ptr es:[edi] return i+j; 004113DE mov eax,dword ptr [i] 004113E1 add eax,dword ptr [j] } 004113E4 pop edi 004113E5 pop esi 004113E6 pop ebx 004113E7 mov esp,ebp 004113E9 pop ebp 004113EA ret 8 |