int foo(int a, int b, int c) { if (a / b == c) return a % b; else return 0; }Implement this function in assembly.
int foo(int a, int b) { int i; int result = 0; for (i = 0; i < a; i++) { result = result + b; b = b >> 1; } return result; }Implement this function in assembly.
int foo(int a, int b) { if ((a <= 0) || (b <= 0)) return a + b; b = a - b; return foo(b, a) + a; }Implement this function in assembly.
sort4
in assembly, that takes four arguments and sorts them. At the end of the function, the four arguments are stored, in ascending order, at registers r0, r1, r2, r3.
Back to the list of assignments.