Translates a subset of mips instruction set to machine code

Assignment Help Computer Engineering
Reference no: EM131401091

In this part of the project, we will be writing an assembler that translates a subset of the MIPS instruction set to machine code. Our assembler is a two-pass assembler similar to the one described in lecture. However, we will only assemble the .text segment. At a high level, the functionality of our assembler can be divided as follows:

Pass 1: Reads the input (.s) file. Comments are stripped, pseudoinstructions are expanded, and the address of each label is recorded into the symbol table. Input validation of the labels and pseudoinstructions is performed here. The output is written to an intermediate (.int) file .

Pass 2: Reads the intermediate file and translates each instruction to machine code. Instruction syntax and arguments are validated at this step. The relocation table is generated, and the instructions, symbol table, and relocation table are written to an object (.out) file.

The Instruction Set

Please consult the MIPS Green Sheet for register numbers, instruction opcodes, and bitwise formats. Our asembler will support the following registers: $zero, $at, $v0, $a0 - $a3, $t0 - $t3, $s0 - $s3, $sp, and $ra. The name $0 can be used in lieu of $zero. Other register numbers (eg. $1, $2, etc.) are not supported.

Implementation Steps

Step 0: Obtaining the Files

Step 1: Building Blocks

Step 2: SymbolTable

Step 3: Pseudoinstruction expansion

Step 4: Instruction Translation

Step 5: Putting It All Together

Step 6: Testing (NO, DO NOT JUST SKIP THIS SECTION.)

How Tests Are Run

CUnit performs the following actions when running a test suite:

1. Runs the suite initialization function. In the above code, this function is called init_suite.

2. Runs all of the tests you added to the suite. In the above example, this runs only the function named simple_sample_test.

3. Runs the suite cleanup function. In the above code, this function is called clean_suite.

Attachment:- Assignment File.rar

Reference no: EM131401091

Questions Cloud

How many calories does the burger have : A new burger containing 28 grams of fat is introduced. According to this model, its residual for calories is +33 How many calories does the burger have?
Human resource aspects-enablers of value chain management : This week you will consider the human resource aspects and enablers of value chain management. It is widely accepted there is a distinct, measurable and positive relationship between employee satisfaction and customer satisfaction.
Describes how the post gave you new perspectives : Provide positive feedback that describes how the post gave you new perspectives on how to support and encourage a creative environment in the workplace.
Draw the current waveform for each circuit : Draw the current waveform for each circuit in Figure 11-60 when there is a 10 V peak sinusoidal voltage at the anode. Neglect the forward voltage of the PUT.
Translates a subset of mips instruction set to machine code : In this part of the project, we will be writing an assembler that translates a subset of the MIPS instruction set to machine code. Our assembler is a two-pass assembler similar to the one described
Introduction to financial management resources : This assignment will familiarize you with various terms used in finance and financial management. After completing this assignment, you will understand:
Saras sarasvathy full case study-questions : Part 1 of this assignment involves identifying the market for this product. Utilizing the five questions that are provided under Problem 1: Identifying the market as a guide, prepare a 1 page assessment of how you will determine the market for thi..
Write the equation of the line of regression : Create a scatterplot of Calories vs. Fat.- Interpret the value of R2 in this context.- Write the equation of the line of regression.
What is corporate governance and what is its purpose : BUS 330- What is corporate governance and what is its purpose? Is it better or worse for shareholders if the board of directors of a company is comprised mainly of outsiders? Please explain your reasoning.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Constructing truth table of converter circuit

Construct the truth table of the converter circuit using character a , b, c and d (d represents Least Significant Bit) in order to denote the literals input of BCD. Use w, x, y and z (z as Least Significant Bit) in order to represent the output li..

  Fiber used in the desktop to the lan closet switch

What type of transmission do most people use at home or work?fiber used in the desktop to the LAN closet switch?

  Back-propagation neural network

Company hires your team in order to develop the back-propagation neural network(s) for predicting next-week trend of five stocks (that is, go up, go down, or remain same).

  Concept of aloha

A large population of the ALOHA users manage to produce the 50 requests/sec., involving both the originals and retransmissions. Time is slotted in units of 40 msec. State the chance of success on the first attempt?

  What are some ways that you could help link your

1. what are some ways that you could help link your organizations business metrics to your it department? which

  State how you would recover an actual set s

Prove accuracy of your greedy algorithm by stating and proving the loop invariant.State how you would recover an actual set S.

  Bit binary counter utilizing ltl.

State the three bit counter utilizing the LTL. The following are the properties we may wish to try and prove are valid given the specification of the three bit counter. Eventually the counter reaches 111.

  What is the aim of a firewall

Name and explain two of the network devices used to create a network. What is the purpose of a firewall?

  Why vista a better choice for home or office computing

Investigate net for information about some of the new features offered by Vista over previous operating systems or operating systems on other computing environments.

  Program that stores and converts a number

Write down a program that stores and converts a number entered in Roman numerals to an integer value. Your program should consist of a class named Roman.

  Prepare functional specifications for the companys use of

you are to select one business thatnbspdoes not alreadynbsphave a websitenbspand develop an internet strategy for it.

  Fixing errors in software to control the security

While reading the code top-down, we always try to use our expectations regarding the application domain in order to predict what major functional elements of the code will be.

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