ARM study notes 4 - load and store instructions

Publisher:不染尘埃Latest update time:2020-02-19 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Word data transfer instruction

Function: Used to transfer single data into or out of a register.

  1. LDR instruction

    1.1. Function

      Read a 32-bit field from memory to the target register according to the address mode determined by . If the address determined by the addressing mode in the instruction is not word-aligned, the read value must be circularly shifted right.

    1.2 Syntax format

      LDR{} ,

    1.3 Parameter Description

       determines which general register to use as the destination register

       determines the I, P, U, W, Rn and bits in the instruction encoding

  2. STR instruction

    2.1. Function

      Write a 32-bit word of data to the memory location specified in the instruction

    2.2 Syntax format

      STR{} ,


2. Byte data transfer instruction (LDRB/STRB)

  1. LDRB instruction

    1.1. Function

      Read an 8-bit byte into the destination register in the instruction according to the address mode determined by

    1.2. Syntax format LDR{}B ,

  2. STRB instruction

    2.1. Function

      Take the specified 8-bit byte from the register and put it into the lower 8 bits of the memory unit specified in the instruction, and fill its high bits with 0

    2.2 Syntax format STR{}B ,


3. Half-word data transfer instruction (LDRH/STRH)

  1. LDRH

    1.1. Function

      Read a 16-bit halfword from memory into the destination register.

    1.2 Syntax format

      LDR{}H ,

  2. STRH

    2.1. Function

      Take the 16-bit half word from the register and put it into the lower 16 bits of the memory unit specified in the instruction, and fill its high bits with 0

    2.2 Syntax format

      STR{}H ,


4. User mode word data transfer instructions

  1. LDRT

    1.1. Function

      In user mode, read a 32-bit word from memory to the destination register according to the address mode determined by

    1.2 Syntax format

      LDR{}T ,

    1.3 Parameter Description

      : Use post-indexed address mode addressing

  2. STRT

    2.1. Function

      Write a 32-bit word of data to the memory location specified in the instruction

    2.2 Syntax format

      STR{}T ,


5. User mode byte data transfer instructions

  1. LDRBT instruction

    1.1. Function

      Read an 8-bit byte into the destination register in the instruction according to the addressing mode

    1.2 Syntax format

      LDR{}BT ,

  2. STRBT instruction

    2.1. Function

      Write an 8-bit byte of data to the memory location specified in the instruction

    2.2 Syntax format

      STR{}BT ,,


6. Signed byte/half-word data transfer instructions

  1. LDRSB instruction

    1.1. Function

      Read an 8-bit byte into the destination register in the instruction according to the address mode determined by

    1.2 Syntax format

      LDR{}SB ,

  2. LDRSH instruction

    2.1. Function

      Read a 16-bit halfword into the destination register in the instruction according to the address mode determined by

    2.2 Syntax format

      LDR{}SH ,

Keywords:ARM Reference address:ARM study notes 4 - load and store instructions

Previous article:ARM Study Notes 5 - Program Status Register
Next article:ARM Study Notes 3 - Data Processing Instructions

Recommended ReadingLatest update time:2024-11-15 17:26

ARM's abnormal interrupt mechanism
When we use computers, we type on the keyboard and the computer responds to us. Why is this? How does the processor respond to peripheral requests? In fact, this is all achieved through the processor's interrupt mechanism. What kind of interrupt mechanism is ARM? Let's discuss it together! In the ARM processor, the e
[Microcontroller]
Changxue multifunctional ARM7 experimental box LED water light resources detailed explanation
1. Single color running light test Hardware preparation: 1 8P DuPont line Wiring instructions: Use an 8P DuPont line to connect P019~P026 of the ARM core board to JP15 of the single-color water light module on the bottom board. Jumper Description: None They are: P019-I1, P020-I2, P021-I3, P022-I4, P023-I5, P0
[Microcontroller]
Changxue multifunctional ARM7 experimental box LED water light resources detailed explanation
Part 4: RIGOL Oscilloscope Disassembly: Main Control Chip (ARM) and Peripheral Chip Display
After looking at the main control chip (FPGA) and some peripheral chips, let's take a look at another main control chip. We can see that this is an iMAX283 chip from Freescale. I searched Baidu for an introduction to this chip. If you are interested, you can take a look. i.MX283 is a low-power, high-performance multime
[Test Measurement]
Part 4: RIGOL Oscilloscope Disassembly: Main Control Chip (ARM) and Peripheral Chip Display
ARM Processor Programming Model
1. ARM adopts RISC architecture RISC does not simply reduce the number of instructions, but focuses on how to make the computer structure simpler and more reasonable to increase the computing speed, giving priority to the simplest instructions with the highest frequency of use.   2. The ARM processor has a total o
[Microcontroller]
ARM Processor Programming Model
Framework of multifunctional integrated communication control system based on ARM9 and embedded Linux system
    This paper introduces the framework design of a multifunctional integrated communication control system based on the ARM9 hardware platform and embedded Linux system and the functions of each module. The system is written in C language that complies with the POSIX. 1 standard, which realizes the acquisition, analy
[Microcontroller]
Framework of multifunctional integrated communication control system based on ARM9 and embedded Linux system
ARM processor ~ interrupts and exceptions
Interrupts and exceptions definition Except for User and System, all working modes in ARM are exception modes. The exceptions here are broad and include the following three situations: External Interrupt (External Interrupt) Changing the program execution flow due to reasons external to the CPU is an asynchronous ev
[Microcontroller]
ARM processor ~ interrupts and exceptions
ARM assembly and C language mutual calling experiment
4.7 Experiment on calling assembly and C languages  4.7.1 Experimental Purpose       Read the S3C2410 startup code and observe the processor startup process;      Learn to use the MDK integrated development environment auxiliary window to analyze and judge the debugging process and results;      Learn to write,
[Microcontroller]
Keil ARM software Debug review
The program uses the assembly code that was successfully compiled before. Then use the following script to debug the script /*** Use Configuration !disalbe! Wizard in Context Menu ***/  /*Name: DebugINRam.ini*/    FUNC void Setup (void)  {      // o Program Entry Point, .AXF File download Address      PC = 0x0
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号