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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:00, ashleyd198308
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
image
Computers and Technology, 23.06.2019 15:10, cathyjuan
What role did women fill during world war ii?
Answers: 1
image
Computers and Technology, 24.06.2019 00:20, danielmartinez024m
The guy wire bd exerts on the telephone pole ac a force p directed along bd. knowing the p must have a 720-n component perpendicular to the pole ac, determine the magnitude of force p and its component along line ac.
Answers: 2
image
Computers and Technology, 24.06.2019 02:30, cardsqueen
Which option completes the explanation for conflict of interest in an organization
Answers: 1
You know the right answer?
In this part you will finish writing a MIPS function. Even though we have not yet written functions,...

Questions in other subjects:

Konu
Mathematics, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01
Konu
English, 11.09.2020 04:01
Konu
Mathematics, 11.09.2020 04:01