- Write a program in MIPS to find the largest element of anarray, the array size should be less than or equal to 10.
Has to be extremely basic, cannot use stuff like move.Very basic.
Here is what I already have and I am stuck.
.datamyarray: .word 0,0,0,0,0,0,0,0,0,0invalid: .asciiz \"Number is invalid, store a number in the array that is from 0-10.\n\"large: .asciiz \"The largest element is \"colon: .asciiz \" :\t\"enter: .asciiz \"Store a value in the array \".textmain:li $v0, 4la $a0, enter #asking the user to input how many numbers they would like to entersyscallli $v0, 5syscall #user inputadd $s1, $v0, $0 #declaring v0 to s1blt $s1, $0, error #if # isn't +bgt $s1, 10, error #if # is greater than 10beq $s1, $0, error #if # is 0add $s0, $s1, $s2addi $s0, $s1, -50la $s6, myarraysw $t0, 32($s6)swap:add $t0, $a1, $0loop:beq $t0, $t1, doneaddi $s0, $s0, 4add $s2, $s2, $t5j loopdone: li $v0, 4la $a0, largesyscall#need to print biggest array here#li $v0, 10syscallerror:li $v0, 4la $a0, invalidsyscallj main