Questions tagged [stack-pointer]

Anything related to stack-pointer operations. The stack pointer (SP) is a special purpose register found on most microprocessors or microprocessors cores (such as those inside microcontrollers or multicore CPUs) used to hold the address of the top of the hardware stack.

Filter by
Sorted by
Tagged with
0
votes
0answers
62 views

Arduino reboots or Hangs Up: Memory/Stack problem?

Using an Arduino Uno. Code runs fine for long periods of time and then either reboots or hangs up. Sometimes problem happens soon after power up. I have been researching causes on Stack Exchange, and ...
0
votes
2answers
32 views

8085 : Storing data in stack

In 8085 whatever address the stack pointer holds, we always start storing bytes from one less than this address . Eg. If SP holds 2008H. We will store 16-bit data at 2007 and 2006H. Why don't we store ...
0
votes
2answers
166 views

ZiLOG Z80 Stack Pointer Location in Memory?

I am trying to design a board for a Z80 based computer, and am having trouble designing the memory map. I have found that the Program Counter defaults to address ...
1
vote
1answer
47 views

When does the stack pointer get copied from flash to SP on startup?

I'm trying to track down a problem on a MKV31F256 micro. The firmware immediately jumps to the hard fault handler on startup. I'm able to set a breakpoint on the first assembly instruction in the ...
6
votes
1answer
4k views

Main Stack Pointer(MSP) vs Process Stack Pointer(PSP)

I was reading the STM32 Programming manual and somewhere on "page 18 " i see these two kind of stack pointers. I always think that there is only ONE stack and therefore only ONE stack pointer to that ...
1
vote
1answer
144 views

bootloaders “reset memory mapping”

im looking into bootloaders and how they work this picture from application note by atmel for their SAM series bootloader "AP-Note_AT04189" so Stack pointer and reset? Stack pointer is an address of ...
-3
votes
2answers
834 views

Manually storing the stack pointer rather than using push and pop (Assembly)

What will be the instruction sequence that implements PUSH R4? A: SUB SP, SP, #4 STR R4, [SP, #0] B: ...
0
votes
1answer
450 views

Confusion on pop for recursive assembly code

I'm confused on what happens during POP. When POP LR happens does that change the PC to the location of ...
1
vote
1answer
2k views

What happens If the interrupt occurs during the execution of HALT instruction?

Consider the following program segment on a hypothetical processor . I have this question in my course CS201. Suppose this processor has 32 bits Load/Store operations, ALU operations is 16 bits and ...
1
vote
3answers
978 views

Why is MSP430's Stack Poniter(SP) always alligned to even address?

While I was reading through the MSP430's User's guide, I came to know that its stack pointer is alligned to even address. (Read Pg.189 of http://www.ti.com/lit/ug/slau208m/slau208m.pdf) Why is it so ...