Question: Please help I am very stuck in it 1. Implement a MIPS assembly function named poly which, given the values of and y in $a0

Please help I am very stuck in it 1. Implement a MIPSPlease help I am very stuck in it

1. Implement a MIPS assembly function named poly which, given the values of and y in $a0 and $a1, calculates the expression 2.3 +1:2y + 16xy?, returning the result in $v0. There is no need to check for overflows. Your implementation must be in a file with name p1.asm. It will be zipped along with all other files before submission. [10] 2. What's wrong with the following code and how it can be corrected. Briefly explain. Write your answer on a sheet of paper, scan it to a PDF file and name it p2.pdf. It will be zipped along with all other files before submission. [5] .data month: year: .text main: asciiz "March .space 4 li $80, 1998 la $t0, year sw $80, 0($t0) li $v0, 10 syscall 3. Write a MIPS assembly language recursive function max which returns the largest value in an array of integers. The function has two arguments; starting address of the array and number elements. The main function defines an array of 8 integers in data segment, and calls this recursive function to find the largest value, and then prints it on screen. Follow all MIPS conventions. Your implementation must be in a file with name p3.asm. It will be zipped with all other files before submission. [10] 4. Find the range of addresses in the MIPS text segment where instruction with code 0x1211f000 cannot be present. Write your answer on a sheet of paper, scan it to a PDF file and name it p4.pdf. It will be zipped along with all other files before submission. [10] 5. Assemble the following assembly language function by hand. Assume the first instruction of the function is at address 0x0040f000. You can assemble it using MARS, but you will not get any credit until and unless you show how the codes of all instructions were obtained. Write your answer on a sheet of paper, scan it to a PDF file and name it p5.pdf. It will be zipped with all other files before submission. 151 max: slt $t0, $a0, $a1 bne $t0,$0, retai move $v0, $a0 j done move $v0, $a1 jr $ra retai: done

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!