subject

Write and test a MIPS assembly language program that 1. Prompts the user for a machine code of a MIPS instruction, i. e. a 32-bit binary represented in hexadecimal. Obviously, the input must be a string of 8 hexadecimal digits (the prefix '0x' is not required).
1.a If the input was an empty string exit the program.
2. Checks for the validity of the input and print an error message if an invalid string was inputted (e. g. too long, too short, contain invalid characters, etc..). The error message should tell the user the cause of the error.
3. Checks if the opcode of the instruction is one of the following:
a. Arithmetic and logical (i. e. the opcode is 0)
b. Data transfer (lw and sw only)
4. If the opcode was not one of those prints out a message telling the user that the opcode was not recognized.
5. If the opcode was recognized print out the followings:
a. Instruction format.
b. The field name and the value of each field in the instruction in hexadecimal.
For example, if the input string was '8e300008' the program should print
Instruction format:
Opcode: 0x23
Rs: 0x11
Rt: 0x10
Imm: 0x0008
6. Go back to step 1.
Run the program and test the inputs for at least one valid instruction for each instruction category listed above, and a few invalid input strings. Refer to the syllabus for submission requirements for MIPS programming assignments.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
question
Computers and Technology, 24.06.2019 02:10
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Write the pseudo code for this problem based on what you learned from the video. the purpose is to design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. the conversion formula is as follows: miles = kilometers x 0.6214
Answers: 3
You know the right answer?
Write and test a MIPS assembly language program that 1. Prompts the user for a machine code of a MI...
Questions
question
Mathematics, 11.06.2021 18:30
question
Social Studies, 11.06.2021 18:30
question
English, 11.06.2021 18:30
question
Mathematics, 11.06.2021 18:30
Questions on the website: 13722363