Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with 1, please Re: Fur Fla 19 Tat (9 Lal Bis SEC C Sol B Un CC MNC Fle G90 Ho Go
I need help with 1, please
Re: Fur Fla 19 Tat (9 Lal Bis SEC C Sol B Un CC MNC Fle G90 Ho Go COL M Un Syl Un + c O File D:XECE371 HW3.pdf N ECE371_HW3.pdf 1 / 2 100% + + Problem 1 [40 points). [Refer SD 6.3.7] A). Write a function in Clanguage for int find(int arr[], int num, int size), num specifies the number to be found in an array and size specifies the number of elements in the array, and arr specifies the base address of the array. The function should return the index number of the first entry in the array that holds nun. If no array entry is nun, it should return the value-1. B).Convert the function into ARM assembly code Problem 2 [20 points). [Refer SD 6.3.7] Consider the ARM assembly code below. func1, func2, and func3 are non-leaf functions, func4 is a leaf function. The code is not shown for each function, but the comments indicate which registers are used within each function. @x60401800 funci . . . # funci uses R4-R18 0x00401020 BL func2 @x89401180 func2... # func2 uses R2-RS 0x8940117C BL func3 0x804e1400 func3 ... # func3 uses R3, R7-R9 @x00401704 BL func4 0x00403008 funct. .. # funct uses R11 -R12 @x89403118 MOV PC, LR A How many words (4 bytes) are the stack frames of each function? B. Sketch the stack after func4 is called. Clearly indicate which registers are stored where on the stack and mark each of the stack frames. Give values where possible. , Problem 3 [40 points). [Refer SD 6.3.7] Consider the following code snippet. void setArray(int num) { int i; int array(10); for (i = @; iStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started