Question: A computer with a register ile, but without PUSH and POP instructions, is to be used to implement a stack. The computer does have the
A computer with a register ile, but without PUSH and POP instructions, is to be used to implement a stack. The computer does have the following register indirect addressing modes:
![Register indirect + increment: LD Rj Ri ST Rj Ri Decrement + register indirect: LD Rj Ri ST Rj Ri Rj+M[Ri]](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1704/5/7/0/9336599b0353eae91704570929561.jpg)
Show how these instructions can be used to provide the equivalent of PUSH and POP by using the instructions and register R6 as the stack pointer.
Register indirect + increment: LD Rj Ri ST Rj Ri Decrement + register indirect: LD Rj Ri ST Rj Ri Rj+M[Ri] RiRi+1 M[Ri] - Rj RiRi+1 RiRi -1 Rj - M[Ri] Ri Ri-1 M[Ri] - Rj
Step by Step Solution
3.43 Rating (156 Votes )
There are 3 Steps involved in it
LDI R6 TOSAD Load R6 with address o... View full answer
Get step-by-step solutions from verified subject matter experts
