The assignment will be graded out of 100 points. Submit your source code for each task, in files called task1.s, task2.s, and so on. Each source file should include ONLY the functions that you are defining for that task, not the main program. Submit your solutions to Blackboard before the deadline. You will be able to revise your answers until the deadline with no penalty.
IMPORTANT: By submitting your answers, you are certifying that you have followed the UTA standards of academic integrity, and that these answers have been exclusively your own work. All students enrolled in this course are expected to adhere to the UT Arlington Honor Code:
I pledge, on my honor, to uphold UT Arlington's tradition of academic integrity, a tradition that values hard work and honest effort in the pursuit of academic excellence. I promise that I will submit only work that I personally create or contribute to group collaborations, and I will appropriately reference any work from other sources. I will follow the highest standards of integrity and uphold the spirit of the Honor Code.
int foo(int a, int b) { if (a == b) return 0; return b - a + 10; }Implement this function in assembly.
int foo(int a, int b) { int result = 0; int i; for (i = 20; i <= 30; i++) { if (i == 24) result += 20; else if (i == 27) result = result * 2; else result = result + a + 3*b; } return result; }Implement this function in assembly.
int foo(int a, int b) { if (a > b) return 0; if (a == b) return b; return a + foo(a+1, b); }Implement this function in assembly.
int foo(int a, int b) { int c = a+3; int d = c*5; int e = c+d; int f = e*d; int g = f - c; return a+b+c+d+e+f+g; }Implement this function in assembly.
int foo(int a) { int result = 0; if (a <= 0) return 0; while(a > 0) { int b = a % 2; a = a / 2; result += b; } return result; }Implement this function in assembly.
foo
in assembly that:
Back to the list of assignments.