Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started