Question: Question 1 : Consider the following ARM assembly code segment. a . Accurately comment each line of code b . Describe what parameters (
Question : Consider the following ARM assembly code segment.
a Accurately comment each line of code
b Describe what parameters mathrmr and r passed into the function are used for.
c What are each of the local variables mathrmrmathrmr used for?
d What is the purpose of this function?
e Explain in detail the specific purpose of stmfd and "Idmfd" in this function.
globl MyFunc
text
MyFunc:
stmfd spr r r r r lr
cmp rl #l
ble end outer
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 loop start
endinner:
cmp r #
beq endouter
mov r #
mov r r
sub r r #
b loop start
end outer:
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
