Plese help with this problem . I need part a) only. This is from the revised 4th
ID: 3552296 • Letter: P
Question
Plese help with this problem . I need part a) only. This is from the revised 4th edition of the books. THANK YOU...
Assume that the stack and the static data segments are empty and that the stack and global pointers start at address 0 Times 7fff fffc and 0 Times 1000 8000, respectively. Assume the calling conventions as specified in and that function inputs are passed using registers $a0-$a3 and returned in register $r0. Assume that leaf functions may only use saved registers. int my_ global = 100; main() { int x = 10; int y = 20: int z : z = my_function (int x, int y) {int my _ function (int x. int y} { return x -y + my_ global: { int my_ global = 100: main() { int z: my_global + = 1; z = leaf _ function {my _ global}: { int leaf _ function { return x + 1; }Explanation / Answer
.data theArray: .space 160 .text main: li $a3, 10 # Sets a3 to 10 li $a4, 20 # Sets a4 to 20 li $a2,100 #Sets a2 to 100 subi $a1, $a3, $a4 addi $r2, , $a2,$a1