# The Stack

As mentioned earlier, A7 functions as the stack pointer. The stack ( user and system stack ) is stored in the "system memory": you should not worry about the size: it should always be more than enough. You may have noticed, if you jumped to the instruction summary at first: there are no push/pop instructions! That's because they're not necessary, MOVE will do both jobs for us.
For example, if we want to push D0.W (with this I mean D0, the lower 16 bits) we just MOVE.W D0,-(A7). And to pop it back, just MOVE.W (A7)+,D0. Remember that when popping a word, the upper 16 bits in D0 are still there.
When you want to push more than one register at the same time, for example in the beginning of a subroutine, it may be a bit time consuming to type all the move instructions. There is a shortcut: MOVEM. With this instruction you can push (or just copy) many registers at once. If you want to push D0-D4 and A0-A2 for example, you just movem d0-d4/a0-a2,-(a7) and then movem (a7)+,d0-d4/a0-a2.
Another way to put things on the stack is with the PEA instruction. It pushes an effective address on the stack, used when pushing pointers. This will decrease A7 with 4 (the size of a pointer).

####