Write a disassembler that reads MIPS machine instructions

Assignment Help Computer Engineering
Reference no: EM132224081

Project - MIPS Disassembler

PROBLEM STATEMENT -

In this project, you will write a disassembler that reads MIPS machine instructions from a (simplified) binary executable file and prints each assembly language instruction to the screen.

Write your disassembler code in the provided C++ code skeleton, disassembler.cpp. All of your code will go in the disassembleInstr function. You should read and understand the rest of the code, as it will form the basis for the remaining projects. Your disassembler only needs to support the MIPS instructions listed in comments in the code skeleton.

Your disassembler must precisely match the output in the sample output files, including all whitespace and formatting. Note that all constants are in decimal representation except PC values and jump and branch targets, which are in hexadecimal.

Please use the updated "green card" provided in class and posted on TRACS. Note that the green card says the sll instruction means 'rd = rt << shamt' whereas the official MIPS standard says it means 'rd = rs << shamt'. We will follow the provided MIPS standard for all shift instructions. Make your code match the comments and output files.

ASSIGNMENT SPECIFICS -

This project is to be submitted individually, and you should be able to explain all code that you submit. You are encouraged to discuss, plan, design, and debug with fellow students.

All provided files are on TRACS. After moving the compressed tar file to your home space on zeus, the following command will extract the files:

$ tar xzvf cs3339_proj1.tgz

This will create a directory called project1 that contains several sample executables (*.mips) for testing your disassembler, the corresponding expected output files (*.dis), the disassembler code skeleton (disassembler.cpp) to which all your code must be added.

Once you have added the missing code to the .cpp file, compile the file with this command:

$ g++ -O3 disassembler.cpp -o disassembler -std=c++11

Assuming the compilation succeeded, you can run your disassembler on the provided *.mips files. For example, to disassemble test1.mips, run this command: $ ./disassembler test1.mips

To output the disassembly to a file instead of to the screen and then compare the output to the provided expected output, run these 2 commands: $ ./disassembler test1.mips > test1.out and $ diff -w test1.out test1.dis

If the diff command produces any output to the screen, then the two files are not identical and you need to change your disassembler code so that the outputs match.

Additional Requirements:

  • Your code must compile with g++ and run on zeus.cs.txstate.edu
  • Do not change any code outside of the disassembleInstr function and name block
  • Your code must be well-commented, sufficiently to prove you understand its operation
  • Make sure your code doesn't produce unwanted output such as debugging messages
  • Make sure your code is correctly indented and uses a consistent coding style
  • Do not use TAB characters for indentation! (Use a consistent # of spaces per indent level)
  • Clean up your code before submitting: i.e., make sure there are no unused variables, unreachable code, etc.

Attachment:- Assignment Files.rar

Reference no: EM132224081

Questions Cloud

What is the real interest rate : Suppose that Treasury bills are currently paying 1 percent and the expected inflation is 3 percent. What is the real interest rate?
What will the size of these payments : What will the size of these payments be if money is worth j4 = 8%?
Desire of investors for current income : Explain why this argument does/does not work in a perfect capital market with no transaction costs. Explain how this argument does/does not work in real life.
What is the yield to maturity of the? bond : What is the yield to maturity of the? bond?
Write a disassembler that reads MIPS machine instructions : CS 3339 Project - MIPS Disassembler. You will write a disassembler that reads MIPS machine instructions from a (simplified) binary executable file
Higher or lower yield than municipal bonds : Do investors in high tax brackets or those in low tax brackets benefit more from tax-exempt securities
What will your monthly payment? be : Oppenheimer Bank is offering a? 30-year mortgage with an EAR of 6.375 %. If you plan to borrow $ 250,000?, what will your monthly payment? be?
What is the common-size percentage for the dividends paid : The profit margin is 6 percent and the retention ratio is 70 percent. What is the common-size percentage for the dividends paid?
What is the common-size percentage for the net-fixed assets : What is the common-size percentage for the net-fixed assets?

Reviews

len2224081

1/29/2019 12:40:17 AM

SUBMISSION INSTRUCTIONS - At the top of the file in the name block type in your first name last name and netID. All project files are to be submitted using TRACS. Note that files are only submitted if TRACS indicates a successful submission and you should receive an email confirmation. Any special instructions or comments to the grader, including notes about features you know do not work, should be submitted in a separate text file named README.txt.

len2224081

1/29/2019 12:40:10 AM

Submit only your final disassembler.cpp file and the optional README.txt file to TRACS. Upload each file separately and do not compress them. Do not submit any additional files (i.e., no provided files or generated disassembly output). Please put your netID at the front of the filenames e.g. lbh31_dissassembler.cpp and lbh31_README.txt. You may submit your file(s) as many times as you’d like before the deadline. Only the last submission will be graded. Late assignments will incur a 10-point penalty and after the late deadline passes no assignments will be accepted. TRACS will not allow submission after the deadline, so I strongly recommend that you don’t come down to the final seconds of the assignment window.

Write a Review

Computer Engineering Questions & Answers

  Questionbubble sort is an easy sorting algorithm it works

questionbubble sort is an easy sorting algorithm. it works by repeatedly stepping throughout the list to be sorted

  Write a main program which creates a twitter and adds

Write a main program which creates a Twitter and adds a single Tweet with subject Finished Midterm and message Aced it!.

  Critically assess at least four different sources of data

Critically assess at least four different sources of data which could be used in a digital forensics investigation comparing challenges.

  Explain the synthesis of guar gum

Explain the synthesis of guar gum - Explain the life cycle and environmental impact of guar gum

  From the code of ethics reading, focus on section one

General Moral Imperatives. How do these affect you as a student. How will they affect you as you move into the professional workplace

  The comma-separated values csv file format is a delimited

the comma-separated values csv file format is a delimited data format commonly used as a portable representation of

  Discuss the exertion of one of the sources of power

Select four people currently well known in the USA media and discuss their exertion of one of the sources of power. Students must cover all four of the sources.

  List two examples of hardware features that are used

List two examples of hardware features that are used to help the OS perform its work. What are the advantages and disadvantages of relying on the hardware?

  Give a scenario that can cause lost heap-dynamic variables

Give a scenario that can cause lost heap-dynamic variables. Support your scenario with sample codes in your favorite language.

  How difficult was the download and installation of player

How difficult was the download and installation of the player? How good is the quality of the audio or video stream?

  Write the decryption algorithm in pseudo code for cbc mode

Write the decryption algorithm in pseudo code for ECB mode. Write the decryption algorithm in pseudo code for CBC mode.

  Write a bash script to translate the file permissions

Write a Bash script to translate the file permissions from octal format to symbolic format. Accept the user input interactively.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd