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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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