Question: For the next three questions, refer to this assembly program, and assume little endian. Note that each instruction takes 4 - bytes. Address | Code
For the next three questions, refer to this assembly program, and assume little endian. Note that each instruction takes bytes.
Address Code
x main: MOVS R #x
x BEQ end
x loop: BL fun
xC CMP R #x
x BGT loop
x end: B end
x fun: SUB r #x
xC PUSH LR
x BL fun
x POP LR
x BX LR
xC fun: MOV R #x
x MOVT R #x
x LSL R R #
x ADD R R
xC STR RR
x BX LR
Note: LSL means "Logical Shift Left." The line of code at address x is taking the value in R shifting the bits to the left times, then placing the result in R Shifting to the left n times is the same as multiplying by n
For this question, use the same code above
Assume PC is currently set to: x
On the next time step in other words, after the instruction at PC x executes what will the contents of the following registers be
enter all bits for each, written in hexadecimal with x included.
PC:
LR:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
