Summarize the meaning of several special symbols in ARM instructions
Special symbols corresponding to the meaning of instructions
= DCB allocates a continuous byte storage unit and initializes it with the specified data
& DCD allocates a continuous word storage unit and initializes it with the specified data
% SPACE allocates a continuous storage unit
^ MAP defines the first address of a structured memory table
# FILED defines a data field of a structured memory table (often used together with MAP, one defines the starting address and the other defines the length)
* EQU defines an equivalent character name for a constant, label, etc. in a program, similar to #define in C language
! Address Update
[ Equivalent to IF
| Equivalent to ELSE
] Equivalent to ENDIF
Common data definition pseudo instructions are as follows:
— DCB is used to allocate a continuous byte storage unit and initialize it with specified data.
— DCW ( DCWU ) is used to allocate a contiguous half-word storage unit and initialize it with the specified data.
— DCD ( DCDU ) is used to allocate a continuous block of word memory locations and initialize them with specified data.
— DCFD ( DCFDU ) is used to allocate a continuous word storage unit for double-precision floating-point numbers and initialize it with the specified data.
— DCFS ( DCFSU ) is used to allocate a continuous word storage unit for single-precision floating-point numbers and initialize it with the specified data.
— DCQ ( DCQU ) is used to allocate a continuous storage unit of 8 bytes and initialize it with the specified data.
— SPACE is used to allocate a continuous storage unit
— MAP is used to define the first address of a structured memory table
— FIELD is used to define the data field of a structured memory table
1. DCB syntax format: label DCB expression The DCB directive is used to allocate a continuous byte storage unit and initialize it with the expression specified in the directive. The expression can be a number or a string of 0 to 255. DCB can also be replaced by "=".
Usage example: STr DCB “ This is a test !”; allocates a continuous byte storage unit and initializes it.
2. DCW (or DCWU) Syntax format: label DCW (or DCWU) expression The DCW (or DCWU) pseudo-instruction is used to allocate a continuous half-word storage unit and initialize it with the expression specified in the pseudo-instruction. The expression can be a program label or a numeric expression. The word storage unit allocated by DCW is half-word aligned, while the word storage unit allocated by DCWU is not strictly half-word aligned. [page]
Usage example: Datatest DCW 1, 2, 3; allocate a continuous half-word storage unit and initialize it.
3. Syntax format of DCD (or DCDU): label DCD (or DCDU) expression The DCD (or DCDU) directive is used to allocate a continuous word storage unit and initialize it with the expression specified in the directive. The expression can be a program label or a numeric expression. DCD can also be replaced by "&". The word storage unit allocated by DCD is word-aligned, while the word storage unit allocated by DCDU is not strictly word-aligned.
Usage example: DataTest DCD 4, 5, 6; allocate a continuous word storage unit and initialize it.
4. DCFD (or DCFDU) Syntax format: Label DCFD (or DCFDU) Expression The DCFD (or DCFDU) directive is used to allocate a continuous word storage unit for double-precision floating-point numbers and initialize it with the expression specified in the directive. Each double-precision floating-point number occupies two word units. The word storage units allocated by DCFD are word-aligned, while the word storage units allocated by DCFDU are not strictly word-aligned.
Example: FDataTest DCFD 2E115, -5E7; Allocate a continuous word storage unit and initialize it to the specified double precision number.
5. DCFS (or DCFSU) Syntax format: Label DCFS (or DCFSU) Expression The DCFS (or DCFSU) directive is used to allocate a continuous word storage unit for single-precision floating-point numbers and initialize it with the expression specified in the directive. Each single-precision floating-point number occupies one word unit. The word storage unit allocated by DCFS is word-aligned, while the word storage unit allocated by DCFSU is not strictly word-aligned.
Example: FDataTest DCFS 2E5, -5E - 7; allocates a continuous word storage unit and initializes it to the specified single-precision number.
6. DCQ (or DCQU) Syntax format: Label DCQ (or DCQU) Expression The DCQ (or DCQU) directive is used to allocate a continuous storage area of 8 bytes and initialize it with the expression specified in the directive. The storage unit allocated by DCQ is word-aligned, while the storage unit allocated by DCQU is not strictly word-aligned.
Example: DataTest DCQ 100; Allocate a continuous storage unit and initialize it to the specified value.
7. SPACE Syntax format: label SPACE expression The SPACE directive is used to allocate a continuous storage area and initialize it to 0. The expression is the number of bytes to be allocated. SPACE can also be replaced by "%".
Usage example: DataSpace SPACE 100; allocate 100 consecutive bytes of storage units and initialize them to 0.
8. MAP syntax format: MAP expression {, base register} The MAP directive is used to define the first address of a structured memory table. MAP can also be replaced by "^". The expression can be a label or a mathematical expression in the program. The base register is an optional option. When the base register option does not exist, the value of the expression is the first address of the memory table. When the option exists, the first address of the memory table is the sum of the value of the expression and the base register. The MAP directive is usually used in conjunction with the FIELD directive to define a structured memory table.
Usage example: MAP 0x100, R0; defines the value of the first address of the structured memory table to be 0x100 + R0.
9. FILED Syntax format: label FIELD expression The FIELD directive is used to define a data field in a structured memory table. FILED can also be replaced by "#". The value of the expression is the number of bytes occupied by the current data field in the memory table. The FIELD directive is often used in conjunction with the MAP directive to define a structured memory table. The MAP directive defines the first address of the memory table, and the FIELD directive defines each data field in the memory table, and can specify a label for each data field for reference by other instructions. Note that the MAP and FIELD directives are only used to define data structures and do not actually allocate storage units.
Usage example: MAP 0x100; define the value of the first address of the structured memory table to be 0x100. A FIELD 16; define the length of A to be 16 bytes and the position to be 0x100 B FIELD 32; define the length of B to be 32 bytes and the position to be 0x110 S FIELD 256; define the length of S to be 256 bytes and the position to be 0x13
Previous article:System design of X86 to ARM binary translation and execution function based on SoC
Next article:Mainstream 32-bit MCU strategy series: Why learn STM32?
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Introducing Delta's new sensor product: Area Sensor
- 5 Key Points to Remember in Embedded Programming
- Application of Field Effect Transistor
- 100 examples of single-chip C language programming training based on 8051+Proteus simulation
- Where can I find the development environment for the domestically produced aerospace-grade CPU of the BM3803MGRH model?
- GD32E231 DIY Contest Brushless Motor Driver
- Analysis of the top ten popular microprocessor and memory new products in 2006
- TI DLP Pico micro-projection technology makes smart speakers more powerful
- Detailed explanation of PCB routing and signal integrity issues
- Design and implementation of temperature controller based on single chip microcomputer and fuzzy control