Question: Consider the following ARM assembly code segment. a . Accurately comment each line of code b . Describe what parameters r 0 and r 1
Consider the following ARM assembly code segment.
a Accurately comment each line of code
b Describe what parameters r and rpassed into the function are used for. c What are each of the local variables rr used for?
d What is the purpose of this function?
e Explain in detail the specific purpose of stmfd and ldmfd in this function.
globl MyFunc
text
MyFunc:
stmfd spr r r r r lr
cmp r #
ble endouter
sub r r #
mov r r
mov r #
loopstart:
ldr rr
ldr rr
cmp r r
ble nogo
mov r #
sub r r
swp r rr
str rr
nogo:
subs r r #
bne loopstart
endinner:
cmp r #
beq endouter
mov r #
mov r r
sub r r #
b loopstart
endouter:
ldmfd spr r r r r pc
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
