开发者

Confusion between higher address and lower address

I am very new to Assembly language. I was reading about MIPS architecture and I am stuck with a concept.

Confusion between higher address and lower address

In the image above,shouldn't the highest address be the last item of the stack and the lowest ad开发者_Go百科dress at the top? As the address are generated in ascending order. Thanks in advance.


The top of the stack is the position of the last element that was pushed on. Looking at that picture, the 'top' of the stack is towards the bottom, which has a lower address. The addresses are generated in decending, not ascending order.

It is called the top as a stack is a LIFO (Last In First Out) structure - the last object added is the first one removed, and is therefore 'on top'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜