Question: Please provide me with a written solution to facilitate my learning please. Thank you so much! ( a ) Suppose register r 2 holds the

Please provide me with a written solution to facilitate my learning please. Thank you so much!
(a) Suppose register r 2 holds the address 0x40000000, and we execute the following
instruction.
STMIA r2!,{r4,r3,r0,lr}
Write the memory address that now holds the value which was in registers r4,r3,
r0 and lr respectively. What is the value of register r2 after the execution?
(10 Marks)
(b) For the following ARM instructions, write the corresponding equivalent THUMB
instructions.
(i) LDRB r2,[r3], #1
(ii) LDMFD sp!,{r2-r4, r15}
(iii) ADDS r2, r2, r1, ASR#4
(iv) STRH r3,[r4], # -4
(8 Marks)
(c) Functions and subroutines are written in C and Assembly respectively. They are
called upon one another and must follow the ARM Application Procedure Call
Standard (AAPCS). A function int z(int a, int b, int c, int d, int e, int f ) is written
in C. How would this function be called from an assembly program?
(7 Marks)
Please provide me with a written solution to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!