Write a MIPS assembly language program that uses busy-waiting and memory-mapped I/O to translate a line of text, as it is being typed by the user, into a form of Pig Latin (http://en.wikipedia.org/wiki/Pig_Latin). You can assume that the typed text includes only words consisting of lower case letters, separated by spaces. Every character typed should be output as the user types it, except that words that start with a vowel (“a”, “e”, “i”, “o”, “u”) should have “way” appended to the end of the word, and words that start with any other letter should have their first letter as well as subsequent letters up to but not including the first vowel or “y” (you may assume there is at most three such letters) moved to the end of the word and “ay” appended. Note that you will only be able to recognize that a word has ended when a following space has been typed, or a newline. For example, if the user types “this is very strange” followed by the newline character, your program should output, as the user is typing, “isthay isway eryvay angestray”. Your program should terminate when the typed character is a newline (ascii code 10). (Note: in QtSpim, make sure “Enable Mapped IO” is selected under “Simulator/Settings”.)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 Write a MIPS assembly language program that uses busy-waiting and
memory-mapped I/O to translate a line of text, as it is being typed by the user, into a
form of Pig Latin (http://en.wikipedia.org/wiki/Pig_Latin). You can assume that the
typed text includes only words consisting of lower case letters, separated by spaces.
Every character typed should be output as the user types it, except that words that
start with a vowel (“a”, “e”, “i”, “o”, “u”) should have “way” appended to the end of
the word, and words that start with any other letter should have their first letter as well
as subsequent letters up to but not including the first vowel or “y” (you may assume
there is at most three such letters) moved to the end of the word and “ay” appended.
Note that you will only be able to recognize that a word has ended when a following
space has been typed, or a newline. For example, if the user types “this is very
strange” followed by the newline character, your program should output, as the user is
typing, “isthay isway eryvay angestray”. Your program should terminate when the
typed character is a newline (ascii code 10). (Note: in QtSpim, make sure “Enable
Mapped IO” is selected under “Simulator/Settings”.) 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Adjacency Matrix
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education