What is the role of stack in a microprocessor?

后端 未结 10 895
-上瘾入骨i
-上瘾入骨i 2020-12-10 08:34

What is the role of stack in a microprocessor?

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 08:59

    Stack is used to store and retrieve return addresses during function calls. Its put to good use during nested function calls or recursive function calls. It is also used to transfer arguments to a function.

    On a microprocessor it is also used to store the status register contents before a context switch.

    cheers

提交回复
热议问题