ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 08 May 2017 My Price 9.00

C Language program to ARM assembly language program

Convert the following C Language program to ARM assembly language program by hand coding. The program essentially computes two different totals of numbers with even and odd values. The ARM assembly program should work on the KEIL simulator and give the correct result for any size array.

Register assignments: assign myArray to R0, assign tmp to R1, assign even_sum to R2, assign odd_sum to R3. ( You may use temporary registers as you see fit)

C Program:

int * myArray = {23,54,32,11,71,45,68,99};

int num = 8;

main ()

{

int tmp = 0;

int even_sum = 0;

int odd_sum = 0;

for (i = 0; i < num; i++)

{

tmp = myArray[i];

if (tmp % 2 == 0)

even_sum = even_sum + tmp;

else

odd_sum = odd_sum + tmp;

}

}

Answers

(11)
Status NEW Posted 08 May 2017 03:05 AM My Price 9.00

-----------

Not Rated(0)