Convert the code below into corresponding ARM CORTEX-M3 instructions int runningSum(double * input) { int i =
Fantastic news! We've Found the answer you've been seeking!
Question:
Convert the code below into corresponding ARM CORTEX-M3 instructions
int runningSum(double * input) {
int i = 1;
double sum = input[0];
double max = sum;
while (input[i] != -1) {
sum += input[i];
i++;
max = Max(sum, max);
}
return sum;
}
int Max(int first, int sec) {
if (first > sec)
return first;
else
return sec;
}
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date: