Question: A computer with a register file. but without PUSH and POP instructions, is to be used to implement a stack without FULL and EMPTY flags.

 A computer with a register file. but without PUSH and POP

A computer with a register file. but without PUSH and POP instructions, is to be used to implement a stack without FULL and EMPTY flags. The computer does have the following register indirect modes: Register indirect + increment: Decrement + register indirect: LDX R2 R1 R2+ M[R] LDY R2 R1 RR-1 RR1 + 1 R2 + M[R] STX R2 R1 M[R] =R2 R1+R1+1 STY R2 R1 RRI-1 M[R] R2 LDZ R2 R1 LDT R2 RI R1R1+1 R2 + MR11 R2 - M[R] RIRI-1 STZ R2 R1 R1+R1+1 M[R] =R2 STT R2 R M[R] R2 R1+R 1-1 The stack is organized such that SP always points empty.desation on the stack. The first item in the stack is stored in location 1000. The last item should be in location 1500. Show how these instructions can be used to provide the equivalent of PUSH and POP by using the instructions and register R3 as the stack pointer. Use R4 as DR. Don't forget the control statements and write initial value of stack pointer. A computer with a register file. but without PUSH and POP instructions, is to be used to implement a stack without FULL and EMPTY flags. The computer does have the following register indirect modes: Register indirect + increment: Decrement + register indirect: LDX R2 R1 R2+ M[R] LDY R2 R1 RR-1 RR1 + 1 R2 + M[R] STX R2 R1 M[R] =R2 R1+R1+1 STY R2 R1 RRI-1 M[R] R2 LDZ R2 R1 LDT R2 RI R1R1+1 R2 + MR11 R2 - M[R] RIRI-1 STZ R2 R1 R1+R1+1 M[R] =R2 STT R2 R M[R] R2 R1+R 1-1 The stack is organized such that SP always points empty.desation on the stack. The first item in the stack is stored in location 1000. The last item should be in location 1500. Show how these instructions can be used to provide the equivalent of PUSH and POP by using the instructions and register R3 as the stack pointer. Use R4 as DR. Don't forget the control statements and write initial value of stack pointer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Accounting Questions!