Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hey guys, could someone please help me with all or any of these parts ? Its real

ID: 3719559 • Letter: H

Question

Hey guys, could someone please help me with all or any of these parts ? Its really urgent an I need to use MIPS instruction set to make these applications. Thanks :)

5.3 (i) Write a function int Square(int N:a0) that returns in v0, the Square of the value passed in a0

5.3 (ii) Write a MIPS assembly language program to: (a) Ask the user to enter a number to say how many numbers they want to enter (b) THEN, in a for loop, have them enter each number and calculate the sum of squares utilizing the function you wrote in 5.3 (i). (c) When the user has entered all the numbers they wanted, print the message "The sum of squares is: " and the value of the sum of squares." For example... How Many Numbers Do You Want to enter: 3 ... Enter Number: 5 ... Enter Number: 10 ...Enter Number: 20 ... The Sum Of Squares Is: 525

5.4 Write a MIPS assembly language program to transfer a block of 100 bytes in REVERSE starting at memory location “SRC + 99” to another area of memory beginning at memory location “DEST.

Explanation / Answer

5.4
  
SRC: .space 100
DEST .space 100
.globl main

main:
la $a1,SRC #$a1 = SRC
la $a2,DEST #$a2 = DEST
li $t0,100 #$t0 = 100
loop: lw $t1,0($a1) #$t1 = Mem($a1)
sw $t1,0($a2) #Mem($a2) = $t1
addi $a1,$a1,1 #$a1 = $a1 + 1
addi $a2,$a2,-1 #$a2 = $a2 - 1
addi $t0,$t0,-1 #$t0 = $t0 - 1
bgtz $t0,loop #Branch if $t0 > 0
li $v0,10
syscall