in Assembly MIPS
Using the code that i have in the picture how would i swap the array elements to be reversed using a loop
For example "1,2,3,4,5,6,7,8,9,0" turns to "0,9,8,7,6,5,4,3,2,1"
Extracted text: 6 .data # 4 bytes per int so 10 ints x 4 (10 x 4 = - space 40 .asciiz "\n" 7 myArray: 40) newline: .text 10 -globl main 11 12 main: 13 $te, 10 $t1, e $t2, e li # holds 10 for the Loop to run only 10 t imes # this register will hold the counter # this register will hold the Location of the array 14 15 li 16 li 17 18 19 WHILE: 20 bge $t1, $te BREAK 21 li $v®, 5 22 syscall $ve, myArray ($t2) $t2, $t2, 4 23 SW 24 addi 25 addi $t1, $t1, 1 26 WHILE 27 BREAK: