Question 2: String Manipulation (25 marks) Write a MIPS program that takes as input a string of text and then does the f

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 2: String Manipulation (25 marks) Write a MIPS program that takes as input a string of text and then does the f

Post by answerhappygod »

Question 2 String Manipulation 25 Marks Write A Mips Program That Takes As Input A String Of Text And Then Does The F 1
Question 2 String Manipulation 25 Marks Write A Mips Program That Takes As Input A String Of Text And Then Does The F 1 (230.5 KiB) Viewed 31 times
Question 2: String Manipulation (25 marks) Write a MIPS program that takes as input a string of text and then does the following. • Prints the input string. • Converts all lowercase letters to uppercase. For example a gets converted to A. • Converts all uppercase letters to lowercase. For example A gets converted to a. • Prints the manipulated string. You can assume that the input string will be comprised of words containing only alphabetic characters (a-z, A-Z) and that each word is separated by a single "space" character. The program should be able to handle strings up to 127 characters in length. Use properties of the ASCII code, in particular the manner in which char- acters are represented to solve this problem. Examples of valid input outputs are provided below. • This Is A TeST STring => tHiS is a tEst stRING • i LoVe COMP sci => I 10vE comp SCI • MiPS is tHE BEST => mIps IS The best A template file q2.asm has been provided for you. In this file, you will see that there is a hard-coded input string and there is a place for the output string. You can keep the input string as hard-coded for this example. You do not need to provide a version where the user has to type the input string via I/O. When testing your code, the TA's might modify the contents of the hard-coded input string. However, you can assume the TA's will only run your code on valid input strings as defined by the criteria above. You should use the space allocated for the output string to write in the content of your output. Then, it should be a simple matter to print it.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply