(Adapted from 10.6) Rewrite the PUSH and POP routines such that the stack on which they operate
holds elements that take up two memory locations each.
The problem assumes that each element of the value being pushed on the stack is 32-bits.
For the PUSH, assume bits [15:0] of that value to be pushed are in R0 and bits [31:16] are in R1.
For the POP, bits [15:0] will be popped into R0 and bits [31:16] will be popped into R1.
Also assume the lower order bits of the number being pused or popped are located in the smaller
address in memroy. For example if the two memory locations to be used to store the number are
x2FFF and x2FFE, bits [15:0] will be stored in x2FFE and [31:16] will be stored in x2FFF.
ADD R6, R6, #-2
STR R0, R6, #0
STR R1, R6, #1
LDR R0, R6, #0
LDR R1, R6, #1
ADD R6, R6, #2
Consider the following LC-3 assembly language program. Assumming that the memory locations
DATA get filled before the program executes, what is the relationship between the final values at
DATA and the initial values at DATA?
R1, R1, #0
R1, R1, #9
R2, R0, #0
R3, R1, #0
R4, R4, #0
R2, R2, #1
R3, R3, #-1
R1, R1, #-1
R5, R2, #0
R5, R5, #1
R6, R2, #1
R4, R5, R6
R4, R2, #0
R5, R2, #1
R4, R2, #1
R5, R2, #0
The final values at DATA will be sorted in ascending order.
During the initiation of the interrupt service routine, the N, Z, and P condition codes are saved on the