The role of IO port

Source: Internet
Author: User

In the ARM architecture, the movement of data from memory to CPU can only be done by LDR/STR instructions. And MOV can only move data between registers, or move the number of immediate to register, and the length of the data can not exceed 8 bits

The following are examples of specific applications:

1. LDR R0,=label is used to load an immediate number or an address value into the specified register

1.1 If the label is an immediate number: LDR r0,=0x123; deposit 0X123 in R0

1.2 If name is an identifier: LDR r0,=label_1; The address value pointed to by Label_1 is stored in r0

2. LDR R0,[R1]; Save the value in R1 to R0

3. LDR r1,[r2, #16]; to save (r2+16) The contents of the address in R1

4. LDR R1,[R2], #4; Save the contents of the R2 address in R1, while R2=r2+4

A. STR R1,[R2]; Save the value in R1 to the address specified by R2

B. STR r1,[r2, #4]; Save the value in R1 to the address specified by r2+4

c. STR R1,[R2], #4; Save the value in R1 to the address specified by R2, and R2=r2+4

The role of IO port

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.