The form of the LDR pseudo-instruction is "LDR Rn,=expr". The following example illustrates its usage.
COUNT EQU
……
LDR
MOV
STR
COUNT is a variable we defined, with the address 0x40003100. This definition method is very common in assembly language, and if you have used a single-chip microcomputer, you should be familiar with this usage.
LDR
MOV
Here is another example
; Assign the value of COUNT to R0
LDR
LDR
The pseudo-instruction LDR
Two uses of LDR
1) LDR pc, =MyHandleIRQ means putting the MyHandleIRQ symbol into the pc register
2) LDR PC, MyHandleIRQ means reading the value at the address represented by the MyHandleIRQ symbol in the memory, and the memory needs to be read one more time.
In the code:
start:
@MyHandleIRQ:
MyHandleIRQ:
at the "previous error line". If it is changed to "ldr pc,MyHandleIRQ", when an interrupt comes, interrupt processing cannot be performed.
The other situation is correct. Please pay attention to it:
start:
MyHandleIRQ:
@MyHandleIRQ:
@
@
@
@
Because when an interrupt comes, it is necessary to go to MyHandleIRQ to get OS_CPU_IRQ_ISR, which means fetching the memory one more time.
Previous article:I found that some netizens are wrong about the ldr instruction in ARM.
Next article:ARM MOV and LDR instruction relationship
Recommended ReadingLatest update time:2024-11-24 00:31
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- How to solve the design problem of irregular PCB?
- I am poor and I want to earn some download points
- EEWORLD University Hall----Live Replay: Develop AI Intelligent Robots Based on TI's Newly Released Robotics SDK
- The 2022 provincial competition questions are out
- Wireless data transmission network for pipeline monitoring based on ZigBee technology
- [NXP Rapid IoT Review] In the second week, I can finally open Rapid IoT Studio!
- I can't see the comments since yesterday.
- Siemens Industrial Automation Data Collection (September 20, 2019)
- FPGA realizes pipeline structure FFT processor
- Multicast Network Design Based on C6000 DSP NDK