The third edition of Assembly language (Wang Shuang) reading notes

Source: Internet
Author: User

Tag: Operation while running compilation relative angle in memory div strong

Objective

Speaking of reading a compilation, someone will always ask: what is the meaning of reading a compendium? Does reading the assembly help me with my development work? ... I think reading the assembly is to let us better have the knowledge of the principle of computer work, not just blindly strategically advantageous position. In the case of IDE and Linux gcc, why do we try to use GCC to compile links and generate executable programs instead of running them with the run program? The reason is that we want to explore the nature of the program's operation.

And the assembly is a way to help us better understand how the program "run up" language, it is closest to machine language the only language that the computer can recognize, in-depth data in memory unit storage, directly to the memory unit operation, naturally involving CPU-related operations and other computer core components, believe that read it, We have a more in-depth understanding of the operating system.

CPU and data

  Since the final run of the program is CPU, so we use assembly language programming, it is best to consider the problem from the perspective of the CPU, this talk about memory, three bus, memory address space concept.

    • Memory
      • To get the CPU to work, you have to provide instructions and data to the CPU, and where do these things exist? In memory, which is what we often call memory, the memory is divided into multiple storage units, sequential numbering, to facilitate the CPU from the inside out, put data.
    • Three bus lines
      • The purpose of the three bus is to let the CPU know where to put the data, and to do this, tell the CPU: where and what.
      • Address bus: Transmits the address to the CPU, telling the CPU where to operate
      • Control bus: Tell the CPU whether to read data or write data
      • Data bus: Transferring data
    • Memory address space
      • What does memory address space mean? Because our number of address buses is certain, that means we can get the address value is also limited, for example: the number of address bus is 10, then the number from 0 to 1024 memory units can be addressed to, and in the future address will be helpless. These 1024 addressable memory units constitute the memory address space.
      • The memory address space is a logical memory because it maps different hardware memory in a single space, occupies different address segments, and in fact the memory location of the hardware is discrete.
      • While we operate on the memory address space, we actually operate on the corresponding physical memory.

  

The third edition of Assembly language (Wang Shuang) reading notes

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.