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 00:00
Match each vocabulary word to its definition.1. desktoppicture used to represent acomputer application2. domainnetwork protectionsoftware code that can be viewed,3. iconmodified, and redistributed for freethe background screen on acomputer monitor4. url5. blogan online journalthe part of an internet address that6. firewallrefers to a group of computers on anetworkonline database of web pages7. intranetnetwork for use by an individual8. open address of a web page or9. wikiresource
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Suppose an astronomer discovers a large, spherical-shaped body orbiting the sun. the body is composed mostly of rock, and there are no other bodies sharing its orbit. what is the best way to categorize this body? a. planet b. moon c. comet d. asteroid
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
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, 09.12.2021 19:40
question
Mathematics, 09.12.2021 19:50
Questions on the website: 13722362