Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMP.2030 HW 2: CharType Due Date: 2/12 (Mon) 11:59 PM This assignment is to write a MIPS program to get types of input characters. Character

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

COMP.2030 HW 2: CharType Due Date: 2/12 (Mon) 11:59 PM This assignment is to write a MIPS program to get types of input characters. Character types are listed at the end in table Tabchar, with a word for a char and the next word for its type. Your program should (1) reads a line from the keyboard, (2) for each character in the input line, search Tabchar for its type and store types of individual characters on the line, and (3) echo print of the input line and print types. As an example, when the following is entered in the keyboard THISLOOP: LUR2, 3 the output from the program shall be THISLOOP 222222224 222 2141 LWU R2, 3 6 Note that each input line includes as the end-of-the-line symbol, although it may be missing. The blank type of 5 can be left out when printing character types Approaches Besides Tabchar table, buffers to store an input line and character types are to be declared .data inBuf st prompt: .asciiz outBuf: space 80 # input line "Enter a new input line. In" space 80 # char types for the input line A rough structure of the program is as follows: while (1M getline0; if (inBuflo] break, for (i=0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions