Compile Study Notes --- (2) Basic knowledge

Source: Internet
Author: User

Today, the last time I went on to learn assembly language, mainly about the memory address space, the main board, the access port, and the storage chip.

What is the memory address space?

To solve this problem, we must first know the motherboard and interface card.

Each pc has a motherboard With core devices, including CPU, memory, peripheral chipset, and expansion slots. They are connected through the address bus + Data Bus + control bus.

What is the function of the interface card? To put it bluntly, it receives commands sent by the CPU through the bus to control external devices such as monitors and audios.

A pc has two types of memory: Random Memory RAM and read-only memory Rom.

Ram is used to store the vast majority of programs and data used by the CPU. The main random memory of the PC is generally composed of two locations of RAM, which are respectively mounted on the motherboard Ram and the ram inserted in the expansion slot.

Ram is readable and writable, but it must be stored in a live state. The content is lost after the shutdown, while the ROM can only be read and cannot be written, and the content is not lost after the shutdown. This is the difference between the two.

Put the logical connection diagram of various types of memory in a PC:


After talking about the above, we are now entering the main question, memory address space.

When the CPU controls the physical memory, it regards them as a logical memory consisting of n storage units. This is what we call the memory address space. Each physical memory occupies an address segment in this logical memory, that is, an address space, that is, the data storage space for CPU read/write.

For example:

Assume that the address segment of the memory address space in the PC is as follows:

Address Space of the primary Random storage: 0-7fffh

Memory space: 8000h-9fffh

Address space for each ROM: A000H-FFFFH

Then, if the CPU wants to write data in a memory unit with a memory address of H, the data is written into the primary random memory;

If the CPU wants to write data in the memory address of H, the data is written into the video memory and then displayed on the display;

When the CPU wants to write data in the memory unit with the memory address of c000h, no result is returned because c000h is actually a storage unit of the RoM accessor and RMO is read-only and not written.

After understanding the above content, we need to know:

The memory address space is limited by the CPU address bus width. If the address bus width is 20, the address information that can be sent is 2 to the power of 20, and the memory address space is 1 MB. Finally, the memory address space of the 8086pc is shown as follows:


The content in this article is relatively simple. It mainly refers to the basic content that needs to be learned before compilation. Continue to work hard!

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Compile Study Notes --- (2) Basic knowledge

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.