ARM pseudo-instruction address reading: ADR ADRL LDR

Publisher:心灵清澈Latest update time:2012-06-26 Source: 21ic Keywords:ARM  ADR  ADRL Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. ADR pseudo-instruction --- small range address reading

The ADR pseudo-instruction reads the address value based on the PC relative offset or the address value based on the register relative offset into the register. When the assembler compiler compiles the source program, the ADR pseudo-instruction is replaced by a suitable instruction by the compiler. Usually, the compiler uses an ADD instruction or a SUB instruction to implement the function of the ADR pseudo-instruction. If it cannot be implemented with one instruction, an error will be generated and the compilation will fail.

ADR pseudo-instruction format: ADR{cond} register, expr

The value range of the address expression expr is:

When the address value is byte aligned, its fetch range is: +255 ~ 255B;

When the address value is word-aligned, the range of its fetch is: -1020 ~ 1020B;

2. ADRL pseudo-instruction ---- medium range address reading

The ADRL pseudo-instruction reads the address value based on the PC relative offset or the address value based on the register relative offset into the register. It can read a wider range of addresses than the ADR pseudo-instruction. When the assembler compiler compiles the source program, the ADRL pseudo-instruction is replaced by two appropriate instructions by the compiler. If it cannot be implemented with two instructions, an error will occur and the compilation will fail.

ADRL pseudo-instruction format: ADRL{cond} register, expr

The value range of the address expression expr is:

When the address value is byte aligned, the range of its fetch is: -64K~64K;

When the address value is word-aligned, the range of its fetch is: -256K~256K;

3. LDR pseudo-instruction-----large range of address reading

The LDR pseudo-instruction is used to load a 32-bit immediate value or an address value into a specified register. When assembling a source program, the LDR pseudo-instruction is replaced by a suitable instruction by the compiler. If the loaded constant does not exceed the range of MOV or MVN, the MOV or MVN instruction is used to replace the LDR pseudo-instruction. Otherwise, the assembler puts the constant into a literal pool and uses a program-relative offset LDR instruction to read the constant from the literal pool.

Keywords:ARM  ADR  ADRL Reference address:ARM pseudo-instruction address reading: ADR ADRL LDR

Previous article:Solution of ECG Defibrillation Simulation Generation System Based on ARM9
Next article:Select an operating system for ARM CPU

Recommended ReadingLatest update time:2024-11-16 22:50

ARMGNU pseudo-instructions
Symbol definition directive .global,.local,.set,.equ .global Makes the symbol visible to the connector and becomes a global variable available to the entire project .global symbol .local Indicates that the symbol is not visible to the outside world and is only visible to this file. .local symbol .set Assign a va
[Microcontroller]
How to choose a development system for ARM beginners
  Many ARM beginners want to have a system that they can use, but they often have a wrong understanding that the higher the processor version and the higher the performance, the better, just like many people think that ARM9 and arm7 are good. I think beginners should be rational in this regard. The choice of developmen
[Microcontroller]
Design of ECG Simulation System Based on ARM9
With the development of society, people's awareness of medical care is getting stronger and stronger, so the training of doctors has become a very important link. As a major aspect of doctor training, ECG defibrillation technology can often save people from danger in an emergency if the operation is standardized and
[Microcontroller]
Design of ECG Simulation System Based on ARM9
Very practical arm intelligent temperature measurement system application solution
  Temperature measurement and control play a vital role in today's social life. The various temperature measurement technologies currently available in the international and domestic markets cover many fields such as security inspection, market, life, fire protection, scientific research, etc. Temperature measurement
[Microcontroller]
Very practical arm intelligent temperature measurement system application solution
Application of ARM and CDMA in Remote Video Monitoring System
introduction CDMA (Code Division Multiple Access) is also known as code division multiple access. It is a technology used in wireless communications. CDMA allows all users to use the entire frequency band (1.2288Mhz) at the same time, and treats signals from other users as noise, without having to consider sign
[Microcontroller]
Application of ARM and CDMA in Remote Video Monitoring System
How to get the most out of your ARM Cortex-M3 and M4 microcontrollers
    Preface     Many embedded developers are familiar with the ARM Cortex processor architecture, but few are able to fully understand this popular architecture and take advantage of its unique features and performance. This is especially true of the new ARM Cortex-M4 processor, which boasts an enhanced architecture,
[Microcontroller]
How to get the most out of your ARM Cortex-M3 and M4 microcontrollers
Design of LCD touch screen based on ARM microprocessor
There are many types of human-computer interaction interfaces, such as keyboards, digital tube displays, liquid crystal displays, and touch screens. The main factors that determine the human-computer interaction interface mode are cost and practical application needs. In the past decade, LCD touch screens have been wi
[Microcontroller]
Design of LCD touch screen based on ARM microprocessor
Learn ARM development(9)
Last time, I finished reading the boot assembly and prepared the C operating environment. Now I will start to learn the C source code and jump from the start.S file to the file lib_arm/board.c to run. /* The boot program jumps from the assembly start.S to here to execute. Cai Junsheng 2005/07/19
[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号