Posted on

1) Define an array with 10 unsigned integers in assembly code and write an assembly program that…

1) Define an array with 10 unsigned integers in assembly code and write an assembly program that calculates the mean of these 10 integers (truncating the result to an integer). 2) Write an assembly program that converts all lowercase letters to their corresponding upper cases. 3) Write an assembly program that calculates the following function. Assume register r0 holds the signed integer x, and register r1 saves the result. f(x)=10 if x0. 4) Translate the following C program into an assembly program. The C program finds the minimal value of three signed integers. Assume a, b, and c are stored in register r0, r1, and r3, respectively. The result min is saved in register r4. if (a<b && a<c) { min=a; } else if (b<a && b<c) { min=b; } else { min=c; } 5) Write an assembly program that finds the least common multiple (LCM) of two integers. For example, LCM(4,6)=12. 6) Write an assembly program that blinks an LED with a time interval of one second.

1) Define an array with 10 unsigned integers in assembly code and write an assembly program that calculates the mean of these 10 integers (truncating the result to an integer).
2) Write an assembly program that converts all lowercase letters to their corresponding upper cases.
3) Write an assembly program that calculates the following function. Assume register r0 holds the signed integer x, and register r1 saves the result. f(x)=10 if x<0, 0 if x=0, and 1 if x>0.
4) Translate the following C program into an assembly program. The C program finds the minimal value of three signed integers. Assume a, b, and c are stored in register r0, r1, and r3, respectively.


Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
Instant
Download

Student review: (3 ratings) 3 out of 3 people found this solution helpful.