Linux kernel Analysis Experiment II: Mykernel Experimental Guidance (how the operating system works)

Source: Internet
Author: User

How does a computer work? (summary)--Three magic weapon

  • Stored program computer working model, the most basic logical structure of computer system;

  • The function call stack, the high-level language to run the foundation, only the machine language and the assembly language when the stack mechanism for the computer is not so important, but with the high-level language and functions, the stack becomes the basic function of the computer;

    • Enter

        • PUSHL%EBP

        • MOVL%ESP,%EBP

    • Leave

        • MOVL%ebp,%esp

        • POPL%EBP

    • function parameter passing mechanism and local variable storage

  • Interrupt, multi-channel program operating system base point, no interrupt mechanism program can only run from the beginning to the end of the possibility to start running other programs.

Anti-assembly

Gcc-g Generating an executable file

  

Objdump-s Obtaining Disassembly files

C Language Embedded assembly language (template):

ASM volatile (

Output:

Input:

Destruction Description Section

);

Experimental section ()

    

Summary: The code of your own hand does not know where the error caused the rotation can not be reset. Also hope to understand

    

Linux kernel Analysis Experiment II: Mykernel Experimental Guidance (how the operating system works)

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.