Mips Assembly Language Problem Problem 2 Write Function Readint Mimics System Call 5 Non N Q37218967

Mips Assembly Language Problem

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 shouldreturn -1 to

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.