Question: Q7 Why must a RET instruction be used to return from a subroutine? Why won't a BR instruction work instead? a. If R6 is the
Why must a RET instruction be used to return from a subroutine? Why won't a BR instruction work instead? a. If R6 is the stack pointer and contains the value x4002, and the value to be pushed onto the stack, what will be the content after this push routine? PUSH ADD R6, R6, # - 1 STR R0, R6, #0 b. If R6 is the stack pointer, and the stack grows towards wrong with the following pop routine? POP LDR R0, R6, #0 ADD R6, R6, #-1 Why must a RET instruction be used to return from a subroutine? Why won't a BR instruction work instead? a. If R6 is the stack pointer and contains the value x4002, and the value to be pushed onto the stack, what will be the content after this push routine? PUSH ADD R6, R6, # - 1 STR R0, R6, #0 b. If R6 is the stack pointer, and the stack grows towards wrong with the following pop routine? POP LDR R0, R6, #0 ADD R6, R6, #-1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
