- 论坛徽章:
- 0
|
似乎不行啊
1: #include <stdio.h>
2:
3: void test()
4: {
00401020 push ebp
00401021 mov ebp,esp
00401023 sub esp,44h
00401026 push ebx
00401027 push esi
00401028 push edi
00401029 lea edi,[ebp-44h]
0040102C mov ecx,11h
00401031 mov eax,0CCCCCCCCh
00401036 rep stos dword ptr [edi]
5: int t;
6:
7: scanf("%d", &t);
00401038 lea eax,[ebp-4]
0040103B push eax
0040103C push offset string "%d" (0042201c)
00401041 call scanf (004010d0)
00401046 add esp,8
8: (&t)[3] = t;
00401049 mov ecx,dword ptr [ebp-4]
0040104C mov dword ptr [ebp+8],ecx
9: }
0040104F pop edi
00401050 pop esi
00401051 pop ebx
00401052 add esp,44h
00401055 cmp ebp,esp
00401057 call __chkesp (00401130)
0040105C mov esp,ebp
0040105E pop ebp
0040105F ret
11: int main()
12: {
00401080 push ebp
00401081 mov ebp,esp
00401083 sub esp,44h
00401086 push ebx
00401087 push esi
00401088 push edi
00401089 lea edi,[ebp-44h]
0040108C mov ecx,11h
00401091 mov eax,0CCCCCCCCh
00401096 rep stos dword ptr [edi]
13: int m;
14:
15: test();
00401098 call @ILT+10(test) (0040100f)
16: printf("%d\n", m);
0040109D mov eax,dword ptr [ebp-4]
004010A0 push eax
004010A1 push offset string "m=%d\n" (00422020)
004010A6 call printf (00401170)
004010AB add esp,8
17: }
004010AE pop edi
004010AF pop esi
004010B0 pop ebx
004010B1 add esp,44h
004010B4 cmp ebp,esp
004010B6 call __chkesp (00401130)
004010BB mov esp,ebp
004010BD pop ebp
004010BE ret |
这是VC上的汇编代码
[ 本帖最后由 紫牧 于 2007-9-8 14:00 编辑 ] |
|