这里使用VS2010进行试验
我们写一个最简单的C程序:
#include
int main() {
printf("Hello World\n");
return 0;
}
编译链接...然后按下F10启动调试
再按下Alt + 8
于是,对应汇编代码就出现了
Enjoy it!
附:(Hello World的对应汇编码)
--- d:\develop\c\helloworld\helloworld\helloworld.c ---------------------------- #include int main() { 00B01380 push ebp 00B01381 mov ebp,esp 00B01383 sub esp,0C0h 00B01389 push ebx 00B0138A push esi 00B0138B push edi 00B0138C lea edi,[ebp-0C0h] 00B01392 mov ecx,30h 00B01397 mov eax,0CCCCCCCCh 00B0139C rep stos dword ptr es:[edi] printf("Hello World\n"); 00B0139E mov esi,esp 00B013A0 push offset string "Hello World\n" (0B0573Ch) 00B013A5 call dword ptr [__imp__printf (0B082B0h)] 00B013AB add esp,4 00B013AE cmp esi,esp 00B013B0 call @ILT+295(__RTC_CheckEsp) (0B0112Ch) return 0; 00B013B5 xor eax,eax } 00B013B7 pop edi 00B013B8 pop esi 00B013B9 pop ebx 00B013BA add esp,0C0h 00B013C0 cmp ebp,esp 00B013C2 call @ILT+295(__RTC_CheckEsp) (0B0112Ch) 00B013C7 mov esp,ebp 00B013C9 pop ebp 00B013CA ret