Answer must be written in MIPS ASSEMBLYLANGUAGE
Problem 2: Write a function read_int thatmimics system call 5 (but only for non-negative integers). Thefunction needs no input parameters but should return the integergenerated by the user key presses (appropriately stored onto thestack). To read in an integer, your function should listen for andread in MMIO keyboard inputs until either (a) the user hits theenter key or (b) 10 characters have been exceeded [since thelargest possible signed 32 bit integer is 2147483647, which has 10characters]. If the user inputs an invalid character such as aletter (e.g., ‘a’) or symbol (e.g., ‘$’), your function
OR
OR