Reading and Tools
- Patterson & Hennessy: 2.10, 4.1–4.4
As we plan the construction of our mostly-MIPS processor, it will help to solidify your intuition on the relationship between the "high-level" assembly language of the MIPS ISA and the actual values in the instruction memory.
Find three, relatively short MIPS programs (5-20 lines). They come from work you find on the net, from your solutions to past assignments, or from example in our text. At least one should have a procedure definition and a call to that procedure. At least one should make use of an array. Otherwise, the choice is up to you.
For each program, give the corresponding sequence of integers that represent the instruction machine words. Give these numbers as decimal values and again as binary number values.
With the binary number representations, identify the "parts" of the instruction, according to whether it is an R-format, I-format, or J-format instruction.
NOTE: This is less tedious than you think. To get the corresponding machine word values, just enter the program into the MARS simulator, and examine the results after assembly.
To hand in your files:
Copy your entire hw7 directory into your handin directory. Be sure to copy the directory and its files, not just the files.