ARM · Assembly pseudo instructions

Publisher:平和思绪Latest update time:2015-11-17 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In the ARM assembler, there are several pseudo instructions:
*Symbol definition directive
*Data definition directives
* Assembly control directives
*Information reporting directive
*Macro instructions and other pseudo instructions
 
[Symbol definition pseudo instruction]
Define local variables LCLA, LCLL, LCLS
Define global variables GBLA, GBLL, GBLS
Assigning values ​​to variables: SETA, SETL, SETS
[ARM·Assembly pseudo instruction]
 
[Data definition pseudo instruction]
DCB
DCW/DCWU
DCD/DCDU
DCQ/DCDU
DCFS/DCFSU
DCFD/DCFDU
SPACE
FIELD
MAP
 
*DCB    expression  is used to allocate a continuous range of bytes
*DCW/DCWU   expressions are used to allocate a continuous half-word
*DCD/DCDU    expressions  are used to assign a continuous word
*DCQ/DCQU expression  is used to allocate 8 consecutive bytes
*DCFD/DCFDU   expression is used to allocate a continuous word storage unit for double-precision floating point numbers
*DCFS/DCFSU    expression   is used to allocate a continuous word storage unit for single-precision floating point numbers
*SPACE expression is used to allocate a continuous storage area and initialize it to 0. The expression is the number of bytes to be allocated.
*MAP FILED
MAP defines the first address of a structured memory table
[MAP 0x100, R0] First address 0x100+R0
FILED  defines a data field in a structured memory table
[MAP 0x30000000
 A FILED 4
 B FILED 4
 C FILED 4]
 
【Assembly control pseudo instructions】
*MACRO MEND macro name
*IF···ELSE···ENDIF [ | ]
*WHILE····WEND
*NEXIT Exit from macro
Some other pseudo instructions
*ASSERT logical expression
This condition must be met to compile
*ALIGN [expression[,offset]]
AREA Init, CODE, READONLY, ALIGN=3
*AREA segment name   attribute
The DATA segment is READWRITE by default.
CODE code segment  defaults to READONLY
*NOINIT memory unit initialized to 0
*ALIGN
*COMMON Common segment (excluding data segment and code segment)
*ENTRY
*END
*EQU (NUM EQU     100) (equivalent to #define in C language)
 
*EXPORT declares a global variable
  IMPORT          IMPORT Main (references the Main variable, but Main is not defined in this program)
  EXPORT   is the same as IMPORT, but if there is no reference in the source file, the label will not appear
*RN rename the register
temp   RN    R0
*GET/INCLUDE (equivalent to include in C language)
*INCBIN file name  (this instruction will be considered in the program)
INCBIN 2440test.bin
 
*NOP
【About tags...】
【About the number...】
 
 
【Mixed programming of C/C++ and assembly language】
After using the embedded assembler, most ARM instructions and Thumb instructions can be used directly in the C/C++ source program
In ARM C language programs, the keyword _asm is used to identify an assembly instruction.
_asm
{
intstruction[; instrucition]
····
[instruction]
}
Keywords:ARM Reference address:ARM · Assembly pseudo instructions

Previous article:ARM Shift Instructions
Next article:ARM·Embedded Hardware and Interface Development

Recommended ReadingLatest update time:2024-11-15 02:13

ARM assembly instruction set 4 - data processing instructions
Data processing instructions can be divided into data transfer instructions, arithmetic and logic operation instructions, and comparison instructions. Data transfer instructions are used to transfer data bidirectionally between registers and memory. Arithmetic and logic operation instructions perform commonly used a
[Microcontroller]
ARM cortex M4 exception handling
Troubleshooting Fault handling is a subset of exceptions. Faults are mainly caused by the following methods: Bus errors: including instruction and interrupt vector table loading and data access Internal detection error, like undefined instruction On devices containing an MPU, attempts to access unmanaged regions cause
[Microcontroller]
Understanding of ARM load domain and run domain
        Generally speaking, a program includes a read-only code segment and a readable and writable data segment. In the ARM integrated development environment, the read-only code segment and constants are called RO segments (ReadOnly); readable and writable global variables and static variables are called RW segments
[Microcontroller]
ARM Learning Notes (I) "S3C2440A Clock Initialization"
S3C2440A clock initialization: 1. Determine the system clock source (Fin) based on OM 2. Set CLKCON      The default setting is fine. If you have power consumption requirements, you can refer to the manual settings to turn off some clocks. 3. Set CLKSLOW     The default is OK, no SLOW mode is used. 4. LOCKTIME sett
[Microcontroller]
Introduction to ARM Processor Architecture
The ARM architecture is the foundation on which every ARM processor is built. The ARM architecture has evolved over time to include architectural features that address the growing need for new features, high performance, and emerging markets. For information on the latest announced version, see ARMv8 Architecture. The
[Microcontroller]
Introduction to ARM Processor Architecture
ARM Learning Memory Management Unit (MMU)
I learned a lot of knowledge today while studying MMU. I have summarized it as follows, firstly to deepen my impression and secondly to write it down in the hope that I can exchange and learn with you. 1. What is MMU?  Answer: MMU is a memory management unit. If MMU is turned on, it will convert the virtual address se
[Microcontroller]
Wireless weather data communication based on ARM microprocessor and Linux
    Automatic weather station data collectors are generally designed based on single-chip microcomputers or PC/104 bus controllers, and have the characteristics of good compatibility with PCs, low power consumption, and compact size. However, how to design an automatic weather station data collector with powerful func
[Microcontroller]
Wireless weather data communication based on ARM microprocessor and Linux
IRQ Interrupt Defense System Based on STR7 ARM Microcontroller
1 Introduction  The interrupt vector address of the ARM7TDMI system is dynamically allocated in the register of the interrupt vector controller. For example, the EIC_IVR register (interrupt vector register) and EIC_SIRn register (source interrupt register) of the enhanced interrupt controller (EIC) of the STR71x ser
[Microcontroller]
IRQ Interrupt Defense System Based on STR7 ARM Microcontroller
Latest Microcontroller Articles
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号