"In-depth understanding of computer system" 3.2 program code

Source: Internet
Author: User


Program encoding on UNIX machines using commands
Compiling code

The higher the level of the optimized compilation, the longer the compilation time, the higher the program performance
Machine-level code for machine-level programming, two abstractions are particularly important for the first machine-level program format and behavior (ISA instruction set architecture)The memory address used by the second machine-level program is the virtual address machine-level code that sees memory as a chunk of the array.

Assembler code case specific code action is only later in the chapter

After learning the register and the stack after the drawing, some parts of the book did not say the whole, searched a lot of information, perhaps these parts are back to the chapter after the relevant information link http://www.cnblogs.com/jiu0821/p/4504917.html Gives a very detailed compilation of a function and its interpretation



Where the CPU mainly contains the following objectsProgram Counter(PC): Record the address of the next instruction.Integer RegisterFiles: A total of 8, you can store some address or integer data.Condition Register: Saving the state information of arithmetic or logic instruction can realize the process control of the program.floating-point registers: Stores floating-point numbers.

Program Memory: Contains the program executable machine code, the operating system needs some information, the operating system is responsible for managing the virtual address space, translating the virtual address into the physical address of the actual processor memory


ATT differs from the Intel Assembler code style
ATT

Intel

    • Intel omitted to indicate the size of the suffix, MOV, rather than MOVL
    • Intel omits the%,ESP in front of the register name instead of the%ESP
    • Intel describes the location of the memory in different ways, "DWORD PTR [ebp+8]" instead of 8 (%EBP)






"In-depth understanding of computer system" 3.2 program code

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.