I was so stupid today that I suddenly wondered why a data CPU could tell whether it was data or address.

Source: Internet
Author: User

Today, I was so stupid that I suddenly couldn't figure out why a data CPU could tell whether it was data or address, and why it could also be identified by the address and sent from the address bus, the data is identified and sent from the data bus... Okay, so in a moment, I stayed away ~~~~ Later I understood

:::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::

How does the CPU differentiate a data, for example, whether 0x20000300 is an address or data, for example, # define rcon (* 0x20000300 ))
Then rcon = 234;
In this case, why can the CPU determine that rcon is an address, and then send the corresponding bit from the address bus? 234 is a data bit and is sent from the data bus.
During compilation, the C compiler will go through the process of translating it into an assembly language. For example, rcon = 234 will be translated into LDR R1, 0x200000. Then, LDR [R1], 234, the compilerCodeAfter this translation, R1 uses addressing to issue the commands, while the addressing commands are hardware instruction sets and obtained from the hardware circuit, the address data multiplexing pin corresponding to the circuit will be selected accordingly, the corresponding internal door circuit will change, and the data will eventually be sent from the address pin.

:::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::

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.