subject

In this part you will finish writing a MIPS function. Even though we have not yet written functions, your job will be to take an existing main program that calls your function, and the skeleton of the function (the entry and exit code), fill in the function while following certain restrictions, then place the value in a specific register before the [existingl function return code. The main program will verify whether vour function performed correctly, and you will be able to alter main's variables to test other instructions The name of the function is encodertype, and its purpose will be to encode an R-type instruction. The function is called with the pieces of the instruction like this unsigned encodertype (unsigned opc, unsigned rs, unsigned rt, unsigned rd, unsigned shamt, unsigned funct); Note: while the opc value of an R-type instruction is normally 0, certain other values are possible. The actual code is quite simple if you did the in-class exercise on introduction to MIPS Bit operations. The really important part of this assignment is for you to take a good first look at what a function call looks like, and to see the first example (in main()) of the use of the stack. The starting code is in the assignment1 directory on hills. Its name is encodertype. s. You simply set reasonable values for the instruction fields using the named labels. The values currently in the code are for the instruction After calling your function, the main program outputs each field of the instruction in a message so you can check it.
Submit a copy of your program as a plain text file on canvas. The name of the program must be encodertype.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
What does the faves button do? a. users mark a web page as a favorite b. leads other readers to favor a specific page c. readers sort and align their favicons, or favorite icons d. leads users to a message board where they can post questions
Answers: 1
question
Computers and Technology, 24.06.2019 23:40
Which slide should you change so it reflects om all sides of your presentation
Answers: 1
question
Computers and Technology, 25.06.2019 06:50
Write a program that will askthe user to enter the amount of a purchase. the program should thencompute the state and county sales tax. assume the state sales tax is4 percent and the county sales tax is 2 percent. the program should displaythe amount of the purchase, the state tax, the county sales tax, the total salestax, and the total of the sale. (which is the sum of theamount of purchase plus the total sales tax). hint: use the value 0.02 torepresent 2 percent, and 0.04 to represent 4 percent.
Answers: 2
You know the right answer?
In this part you will finish writing a MIPS function. Even though we have not yet written functions,...
Questions
question
English, 29.01.2020 07:47
Questions on the website: 13722363