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

  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