Engineering

Please implement the following procedure in MIPS 32:############################################################# # Given an integer, convert it into a string## Pre: $a0 contains the integer that will be converted# Post: $v0 contains the address of the newly-created string#############################################################PROC_CONVERT_INT_TO_STRING:# add your solution here# loop div by 10, get remainder# EX: 42 / 10 -> rem = 2# 4 / 10 -> rem = 4# result: 24, reverse string for 42...# returnjr $raI'm given some helper procedures to help implement the above:############################################################# # This procedure will determine the number of digits in the# provided integer input via iterative division by 10.## Pre: $a0 contains the integer to evaluate# Post: $v0 contains the number of digits in that integer#############################################################PROC_FIND_NUM_DIGITS:# prologue# function bodyli $t0, 10 # load a 10 into $t0 for the divisionli $t5, 0 # $t5 will hold the counter for number of digitsmove $t6, $a0 # $t6 will hold the result of the iterative divisionNUM_DIGITS_LOOP:divu $t6, $t0 # divide the number by 10addi $t5, $t5, 1mflo $t6 # move quotient back into $t6beq $t6, $zero, FOUND_NUM_DIGITS # if the quotient was 0, $t5 stores the number of digitsj NUM_DIGITS_LOOPFOUND_NUM_DIGITS:move $v0, $t5 # copy the number of digits $t5 into $v0 to return# epilogue# return jr $ra ############################################################# # This procedure will reverse the characters in a string in-# place when given the addresses of the first and last# characters in the string.## Pre: $a0 contains the address of the first character# $a1 contains the address of the last character# Post: $a0 contains the first character of the reversed# string#############################################################PROC_REVERSE_STRING:# prologue# function body move $t0, $a0 # move the pointer to the first char into $t0move $t2, $a1 # move the pointer to the last char into $t2# Loop until the pointers cross LOOP_REVERSE: lb $t9, 0($t2) # backing up the $t2 position char into $t9lb $t8, 0($t0) # load the $t0 position char into $t8sb $t8, 0($t2) # write the begin char into $t2 positionsb $t9, 0($t0) # write the end char into $t0 position# increment and decrement the pointersaddi $t0, $t0, 1subi $t2, $t2, 1ble $t2, $t0, END_OF_REVERSE_LOOPj LOOP_REVERSEEND_OF_REVERSE_LOOP:# epilogue# return jr $ra