Question: Objective: Practice MIPS loops, conditionals, procedures, and dialog SYSCALLs. Create a MIPS program that fulfills the following specifications: use the dialog syscall (#54) to input
Objective: Practice MIPS loops, conditionals, procedures, and dialog SYSCALLs. Create a MIPS program that fulfills the following specifications: use the dialog syscall (#54) to input a string from the user call a function which counts the number of characters and number of words in the string and returns these in Sv0 and Sv1; store these in memory output (console) the string and counts to the user (see example below) repeat from 1 until the user enters a blank string or hits "cancel" additionally, use $s1 in your function so that you must save it on the stack at the top of your function and restore it before the function exits output a dialog message (syscall #59) to say goodbye before the program 1, 2. 3. 4. 5. 6, ends What to turn in: after you test your program, upload the asm file to elearning . Grading Rubric: PointsElement 10 15 20 20 15 10 10 input string from user using a dialog box write a function, saving/restoring $s1 count characters correctly count words correctly main program ends when user enters cancel or empty string Display results: string, char count, word count Program contains meaningful comments as usual Sample Run: (you should use different test data) Sample input dialog
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
