Analyze assembly code to understand how a computer works

Source: Internet
Author: User

Zhou Yuyong Original works reproduced please specify the source

"Linux kernel Analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000 Disassemble the C code into assembly code, and then analyze how the computer worksThe following is a simplified assembly code for C code C code compiled into assembler code
1 g:2 PUSHL%EBP3 movl%esp,%EBP4Movl8(%EBP),%eax5Addl $6,%eax6 popl%EBP7     ret8 F:9 PUSHL%EBPTen movl%esp,%EBP OneSUBL $4,%esp AMovl8(%EBP),%eax - movl%eax, (%ESP) -     Pagerg the     Leave -     ret - Main: - PUSHL%EBP + movl%esp,%EBP -SUBL $4,%esp +MOVL $4, (%ESP) A     PagerF atAddl $2,%eax -     Leave -     ret

Analysis of stack changes during the working process of assembly code

Summary: The EIP tells the CPU which instruction to execute, and by executing a specific sequence of instructions, the computer can do the specific calculation work

Analyze assembly code to understand how a computer works

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.