Search for question
Question

2. Write an ARM program that implements the following recursive function that calculates the sum of all integers from 1 to a given number. Test the program by passing 10 to x. The result of sum should be stored in register R0. Take a screenshot of the content in RO after the program executes. (10 pt) int sum (int x) { if (x == 1) else return 1; } return x + sum (x - 1);

Fig: 1