Stack Operations Illustration, PUSH and POP
Since the diagram in our Module doesn’t seem to be too clear on how it works, so here’s a better diagram.
- Program Counter (PC) has to move downward in both cases (PUSH or POP), since it will need to move to the next code.
- Stack Pointer (SP) moves up in PUSH, while it moves down in POP.
Please do not hesitate to correct me if I’m wrong.
Reply