当前位置:编程学习 > 汇编语言 >>

懂汇编的看看,,求解释,,,万分感激!!!

#include<iostream.h> #include<stdio.h> void main() { int x; const int a=10; cin>>x; switch(x) { case 0: cout<<"0"<<endl; break; case 1: cout<<"1"<<endl; } } 产生汇编语言是: 1: #include<iostream.h> 2: #include<stdio.h> 3: void main() 4: { 004127E0 push ebp 004127E1 mov ebp,esp 004127E3 sub esp,4Ch 004127E6 push ebx 004127E7 push esi 004127E8 push edi 004127E9 lea edi,[ebp-4Ch] 004127EC mov ecx,13h 004127F1 mov eax,0CCCCCCCCh 004127F6 rep stos dword ptr [edi] 5: int x; 6: const int a=10; 004127F8 mov dword ptr [ebp-8],0Ah 7: cin>>x; 004127FF lea eax,[ebp-4] 00412802 push eax 00412803 mov ecx,offset cin (00430288) 00412808 call istream::operator>> (0040d330) 8: switch(x) 9: { 0041280D mov ecx,dword ptr [ebp-4] 00412810 mov dword ptr [ebp-0Ch],ecx 00412813 cmp dword ptr [ebp-0Ch],0 00412817 je main+41h (00412821) 00412819 cmp dword ptr [ebp-0Ch],1 0041281D je main+5Eh (0041283e) 0041281F jmp main+79h (00412859) 10: case 0: 11: cout<<"0"<<endl; 00412821 push offset @ILT+15(endl) (00401014) 00412826 push offset string "0" (0042b08c) 0041282B mov ecx,offset cout (004302d8) 00412830 call ostream::operator<< (0040f8e0) 00412835 mov ecx,eax 00412837 call @ILT+5(ostream::operator<<) (0040100a) 12: break; 0041283C jmp main+79h (00412859) 13: case 1: 14: cout<<"1"<<endl; 0041283E push offset @ILT+15(endl) (00401014) 00412843 push offset string "4" (0042a10c) 00412848 mov ecx,offset cout (004302d8) 0041284D call ostream::operator<< (0040f8e0) 00412852 mov ecx,eax 00412854 call @ILT+5(ostream::operator<<) (0040100a) 15: } 16: } 00412859 pop edi 0041285A pop esi 0041285B pop ebx 0041285C add esp,4Ch 0041285F cmp ebp,esp 00412861 call __chkesp (00401070) 00412866 mov esp,ebp 00412868 pop ebp 00412869 ret 求谁能给出每一句的解释,,,不胜感激!!可以连续送分!!只求解释!!
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,