ARM's 8 instruction suffixes:
ia (increase after) is transmitted first, then address + 4
ib (increase before) first address +4, then transmit
da (decrease after) first transmit, then address -4
db (decrease before) first address -4, then transmit
fd (full decrease) full decrease stack
ed (empty decrease) empty decrease stack
fa (full add) full increment stack
ea (empty add) empty increment stack
For example:
stmia sp, {r0 - r12}
Store r0 into the memory pointed to by sp (assumed to be 0x30001000); then the address + 4 (that is, pointing to 0x30001004), store r1 into this address; then the address + 4 again (pointing to 0x30001008), store r2 into this address... until the content of r12 is put into (0x3001030), and the instruction is completed.
4 stack structures:
Empty stack: The stack pointer points to an empty space. Each time you store something, you can store it directly and then move the stack pointer one space. When you take something out, you need to move it one space before you can take it out.
Full stack: The stack pointer points to the last data in the stack. Each time you store data, you need to move the stack pointer one grid before storing it. When you take data out, you can take it out directly and then move the stack pointer.
Stack growth: When the stack pointer moves, the stack moves in the direction of increasing address.
Decrement stack: A stack that moves in the direction of decreasing address when the stack pointer moves
ARM has four types of stack structures:
1. Full reduction stack: push (move the pointer first and then push, the pointer moves in the direction of decreasing address); pop (pop first, the stack pointer moves to the direction of increasing address).
2. Full stack: push (move the pointer first and then push, the pointer moves in the direction of increasing address); pop (pop first, the stack pointer moves to the direction of decreasing address).
3. Empty minus stack: push (first enter the stack, the stack pointer moves in the direction of decreasing address); pop (move the pointer first and then pop, the stack pointer moves in the direction of increasing address)
4. Empty stack: push (first enter the stack, the stack pointer moves in the direction of increasing address); pop (move the pointer first and then pop, the stack pointer moves in the direction of decreasing address)
Note: You don’t need to worry about which stack structure to use when using it. As long as you use the same stack structure for pushing and popping, there will be no error.
Remark:
ARM uses full reduction stack by default
Previous article:Explanation of common knowledge points of ARM pseudo-instructions
Next article:Detailed explanation of ARM's 37 registers and exception handling mechanism
Recommended ReadingLatest update time:2024-11-15 14:27
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Prize-winning live broadcast: A wireless connection solution for both near and far distances. You are invited to watch at 10:00 am on March 25 (Thursday)!
- Application introduction of lock-in amplifier 1
- EEWORLD University Hall--Follow Grant Imahara to Tokyo to explore human-machine integration technology
- How to solder this chip component on the PCB board?
- AT32F425-Evaluation Report-Keil Development Environment Construction 01
- MicroPython Hands-on (13) - RGB tri-color light on the control board
- [2022 Digi-Key Innovation Design Competition] Material Unboxing - STM32H745I-DISCO
- Today at 10:00 AM, live broadcast with prizes: ADI's smoke detector integrated solution based on ADPD188BI
- Transfer: Cortex-M development from the perspective of files (2) - Link files
- 【GD32E503 Review】——05.LCD Part 1: Testing the screen refresh speed