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 11:30
To hide gridline when you display or print a worksheet
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
question
Computers and Technology, 24.06.2019 01:00
Mastercard managers are motivated to increase (1) the number of individuals who have and use a mastercard credit card, (2) the number of banks and other clents who issue mastercards to customers and/or employees, and (3) the number of locations that accept mastercard payments. discuss how mastercard could use its data warehouse to it expand each of these customer bases.
Answers: 3
question
Computers and Technology, 24.06.2019 11:00
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
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
Mathematics, 12.02.2020 01:55
Questions on the website: 13722363