In a stack, the same end is used to insert and delete the elements. Microcontrollers Stack pointer (SP) is used to point to the top activation record on the run-time stack. This obtains the return address of the function on each frame on the stack. Pointers The Stack Pointer register will hold the address of the top location of the stack. * * Functions: 1. The plate that we put on top is the first one that we take out. Typically the stack pointer will be changed only by PUSH or POP instructions. A function is called. In it data can be added to and deleted only from the top of it. The front pointer points to the first inserted element that is still in the list. Main Stack Pointer (MSP) is the default stack pointer. Stack is very useful when you are working on large programs because when you have a large set of data in the program sometimes it gets difficult to find and erase data available in the program. That is why they are also known as double pointers. The processor provides two pointers for linking of procedures: the stack-frame base pointer and the return instruction pointer. The Cortex-M architecture implements two stacks known as the Main Stack (tracked in the msp register) and the Process Stack (tracked in the psp register). My issues : The code doesn't swap. Typical examples of pointers are start pointers, end pointers, and stack pointers. Pointers Stack Pointer : Types, Applications, and Operations of Stack Entendido! Difference between Stack and Queue In a queue, the first item we enter is the first come out.