Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with 2, please I cant upload the whole section because there is too many screenshots Re: Fur Fla 19 Tat (9 Lal

image text in transcribed

I need help with 2, please

I cant upload the whole section because there is too many screenshots

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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 = @; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions