1.C语言的汇编表示-函数的定义与调用
学习需具备知识---汇编相关知识

2、第一个C程序
1.创建项目--Win32 console application
2.创建文件--source file --new--C++ source file
3.入口程序
4.构建-F7
5.运行-F5


int plus1(int x,int y)
{
return 0;
}
1:
2: int plus1(int x,int y)
3: {
00401020 push ebp
00401021 mov ebp,esp
00401023 sub esp,40h
00401026 push ebx
00401027 push esi
00401028 push edi
00401029 lea edi,[ebp-40h]
0040102C mov ecx,10h
00401031 mov eax,0CCCCCCCCh
00401036 rep stos dword ptr [edi]
4: return 0;
00401038 xor eax,eax
5: }
0040103A pop edi
0040103B pop esi
0040103C pop ebx
0040103D mov esp,ebp
0040103F pop ebp
00401040 ret
上面函数的汇编代码要背下来,后面的课程会围绕这些学习。


VC++6.0使用:
打断点:F9
调试:F5
编译:ctrl+F7
执行:ctrl + F5
调试执行下一步:F10
停止调试:shift + F5

浙公网安备 33010602011771号