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, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
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, 31.01.2020 00:03
question
Mathematics, 31.01.2020 00:03
question
History, 31.01.2020 00:03
Questions on the website: 13722363