The stack is actually a continuous space in the memory, but it is special because of the stack pointer. The stack is generally divided into two types:
Keywords:ARM
Reference address:Understanding of the ARM stack
Growing upward: The stack pointer grows toward higher addresses, which is called an increasing stack.
Growing downward: The stack pointer grows toward lower addresses, which is called a descending stack.
For a stack, the end where insertion or deletion can be performed is called the top of the stack, and the other end is called the bottom of the stack. Since the stack only allows operations at one end, it operates on the principle of last in, first out. The stack pointer points to the last valid data item pushed into the stack.
Why do we say "grow upward or grow downward"? This is a matter of habit. Generally, when drawing a stack diagram, it is customary to draw the low address at the bottom and the high address at the top, as shown in the following figure:
In ARM, although both types of stacks are supported, general program compilers only support one type, that is, growing from top to bottom, satisfying the full-decreasing method (the stack grows downward by reducing the address of the memory, and the stack pointer points to the lowest address containing valid data items), so instructions such as LDMFD and STMFD are generally used.
Previous article:Analysis of LDM and STM instructions in ARM
Next article:ARM keywords for declaring functions
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- 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
MoreDaily News
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- 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
Guess you like
- 2021 ON Semiconductor Avnet RSL10 Bluetooth SoC Development and Design Competition Third Post (Revised Routine)
- Today at 10:00 AM, live broadcast with prizes: ams projection lighting (MLA) enhances communication between cars and roads
- MSP430F5529 clock multiplier setting is effective
- [RVB2601 Creative Application Development] + Unboxing
- MSP430F5538A watchdog
- [Qinheng Trial] 1. CH549EVT Product Display
- Linear relationship, linear region
- What are the necessary instructions for SIM800C transparent transmission mode?
- [2022 Digi-Key Innovation Design Competition] - [PLC based on IoT] - Material Unboxing - Raspberry Pi 400
- The relationship between computer vision and image processing, pattern recognition, and machine learning