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.
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'.
精彩评论