Experimental section (the following command is available for lab building 64-bit Linux virtual machine environment, 32-bit Linux environment may be slightly different)
Use
- Gcc–s–o main.s Main.c-m32
The commands are compiled into assembly code, and the numbers in the following code should be modified to avoid being identical to others.
- int g (int x)
- {
- return x + 3;
- }
- int f (int x)
- {
- return g (x);
- }
- int main (void)
- {
- return F (8) + 1;
- }
2) According to the knowledge of this week to analyze the work process of compiling code, write a signed blog, and in the blog post "real name (and the name of the final application certificate must be consistent) + Original works reproduced please specify the source +" Linux kernel Analysis "MOOC Course/http mooc.study.163.com/course/ustc-1000029000 ", the specific requirements of the blog content are as follows:
The topic is self-prepared, and the content revolves around how the computer works;
You need to use an experiment in your blog
Blog content requires careful analysis of stack changes during the work of the assembler code
The summary section needs to clarify its understanding of how the computer works.
3) Please submit the blog post URL to the NetEase cloud classroom Mooc Platform, edited into a link can be directly clicked open.
How the computer works