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]

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

1 Expert Approved Answer
Step: 1 Unlock

LDI R6 TOSAD Load R6 with address o... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Logic And Computer Design Fundamentals Questions!