How to display all integer values in decimal

Assignment Help Basic Computer Science
Reference no: EM13308719

For this first part of the project, yourMIPSsimprogram will accept a binary input fileinputfilenameand givenoperationdiswill output tooutputfilenamethe MIPS disassembly of the input file.

The disassembler output file will contain 4 columns of data with each column separated by onespacecharacter (' '):

  • The binary (e.g.,0's and1's) string representing the 32-bit data word at that location. For instructions you should split this into six groups of digits to represent different parts of the MIPS instruction word: a group of 6 bits, 4 groups of 5 bits, and a final group of 6 bits.
  • The address (in decimal) of that location.
  • The disassembled instructionopcode+other fields, or a signed decimal integer value, depending on whether the current location is after the BREAK instruction.
  • If you are displaying an instruction, the fourth column should contain the remaining part of the instruction, with each argument separated by a comma and then a space. (", ")

The instructions and instruction arguments should be in capital letters. Display all integer values in decimal. Immediate values should be proceeded by a "#" symbol. Be careful some instructions take signed immediate values while others take unsigned immediate values. You will have to make sure you properly display a signed or unsigned value depending on the context.

Because we will be using 'diff' to check your output versus ours, try to follow the exact output format.

Sample Data

Here is a sample program to test your disassembler with.

  • fibonacci_c: This contains the C source code for the test program. This is for your reference only.
  • fibonacci_mips: This is the compiled version of the C code in MIPS assembly. This is for your reference only.
  • fibonacci_bin:This is the assembled version of the above assembly code. It is the input to your program.
  • fibonacci_out:This is what your program should output given the above binary input file.
  • fibonacci_bin_txt: This is the txt version of the input binary file. You can use the following program to convert it to binary or use the binary file provided above.

Remember that we will also test your program with other data that you will not know of in advance. It is recommended that you construct your own sample input files with which to further test your disassembler. For your convenience we have provided a program to convert a text file of binary words into a binary file with which to test your disassembler.

  • txt2bin.cpp(click right to save) This program will convert a text file of binary words into a binary file. This program has been compiled and tested on CISE thundermachince. Because of Endian differences on different platforms, Please compile and run this program ONLY ON CISE thunder machine.
  • fibonacci_bin_txt:Running txt2bin on this file should produce the Assembler binary file for the sample data above.

Reference no: EM13308719

Questions Cloud

A small tax accounting preparation and bookkeeping practice : You have a small tax accounting preparation and bookkeeping practice. A new client enters your office and places a box of receipts and bank statements on your desk and says that she would like to have a set of financials prepared and tax retur..
Stock plus a right to receive another 25 shares : In an exchange qualifying for Sec. 351 tax-free treatment, Greta receives 100 shares of White Corporation stock plus a right to receive another 25 shares.
How economic drivers might impact strategic positioning : Explain how economic drivers might impact strategic positioning.
Compute the unit product cost of each product : Compute the unit product cost of each product. (Do not round intermediate calculations. Round your final answers to 2 decimal places)
How to display all integer values in decimal : For this first part of the project, yourMIPSsimprogram will accept a binary input fileinputfilenameand givenoperationdiswill output tooutputfilenamethe MIPS disassembly of the input file.
Global marketplace : What three foreign country entry vehicles might a firm use to enter into the global marketplace?
Federal government through its exercise of commerce power : Which of the following activities is regulated by the federal government through its exercise of the commerce power?
Drives costs at salem data services : Drives costs at Salem Data Services
State regulation may affect interstate commerce : The extent to which state regulation may affect interstate commerce:

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Compare performance-one-level split-two-level unified cache

Compare the performance (using AMAT) of a one-level split cache and a two-level unified cache system. For the one-level split cache, suppose a hit takes 2 clock cycles.

  Describe how will tsp work

How will TSP work? Transit planners require to ask questions like: First step is to assess requirement for TSP There are a variety of methods for conducting Needs Assessment.

  Write a java method which takes an integer

Write a Java method which takes an integer array parameter and locates the minimum value in the array and outputs that value using System.out.printf. Use an enhanced for loop to process the array. You only need one loop to do this!

  Describe two commercial technologies for use by small

Describe two commercial technologies for use by small or medium size businesses in effectively managing operations.

  Display the new list as well as the two old list

Display the new list as well as the two old list Thank you in advance.

  Describe the social implications of gaming

Within 500 words, describe the social implications of gaming. Besides entertainment, think of other aspect of our society that can be affected by gaming.

  What is the rationale for prohibiting nested subprograms

What is the rationale for prohibiting nested subprograms? Is it a good language design decision? What languages allow them?

  Write an instruction sequence to set the contents of memory

write an instruction sequence to set the contents of memory locations at $1000, $1010, and $1020 to 10, 11, and 12 respectively

  Brainstorming skills to determine procedure to follow

The lead investigator gives you these graphics files and tells you that at least four messages should be embedded in them. Use your problem solving and brainstorming skills to determine a procedure to follow.

  Determine the steps of the game in the algorithm format

Analyze the computational complexity of the game Concentration. To do so, determine the steps of the game in the algorithm format from Week 4 lectures and figure out how many steps it would take at maximum to finish the game.

  Write a java code which acts as a calculator

Can someone write this code for me really quick. Write a java code which acts as a calculator. I have two text fields.

  Determine the effective miss rate

For the following repeating sequence of 1w address (given in hex) and cache configurations... Assuming least recently used (LRU) replacement for associative caches,

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