Translate a program in symbolic assembly code

Assignment Help Computer Engineering
Reference no: EM133370814

Problem Description:

An Assembler translates a program in symbolic assembly code into native machine code. Make a mini-Assembler for a 32-bit MIPS processor. Your program should accept input lines from the user until HALT is read. With each line, translate the line into MIPS machine code. Print the total memory space needed for the completed program.

To make the parsing easier, there is one instruction per line, and each token is separated by spaces (no commas, parentheses or labels). You should convert all input to upper case. You do not need to check for illegal codes or registers. If a <shift_amount>, <immediate>, or <branch_address> is too large for the field, mask off the bits you need.

The form for all assembly lines will be:

  • <code> <rd> <rs> <rt> (for codes ADD, AND)
  • <code> <rd> <rt> <shift_amount> (for codes SRL, SLL)
  • <code> <rt> <rs> <immediate> (for codes ADDI, ANDI)
  • BEQ <rs> <rt> <branch_address>
  • LW <rt> immediate <rs>
  • SW <rt> immediate <rs>

Your Assembler should accept the following subset of the complete ISA:

  • Functions: ADD, ADDI, AND, ANDI, BEQ, LW, SW, SRL, SLL
  • Registers: $zero, $v0-1, $a0-3, $t0-9, $s0-7
  • Immediates and shift amounts should be read in decimal
  • Branch addresses should be read as a decimal offset from PC+4 (positive or negative). That is, you don't need to address arithmetic, just use the immediate given.

Reference no: EM133370814

Questions Cloud

Develop a project plan for conducting a qualitative risk : develop a project plan for conducting a qualitative risk analysis to analyze identified risks, threats, and vulnerabilities in the client's environment.
Describe the process you take to ensure your client : Describe the process you take to ensure your client's information is stored according to workplace policy and procedures. How is client information kept secure
What performance and workload measurement issues : What performance and workload measurement issues should the company consider at the present time? What capacity planning issues should the company consider
Identify incidents where a microorganism was used : Search the internet to identify incidents where a microorganism was used to inject someone. Present the incident that you found to the class.
Translate a program in symbolic assembly code : Translate a program in symbolic assembly code into native machine code. Make a mini-Assembler for a 32-bit MIPS processor. Your program should accept input
What do you see as advantages and disadvantages associated : you advocate for inducing lactation so that the baby can be breastfed? What do you see as the advantages and disadvantages associated with inducing lactation?
Design wireframes and storyboard and interactivity diagram : Design the wireframes and storyboard, interactivity diagram, object dictionary, and necessary scripts for an interactive program for customers of Friar Farm
Calculate and display the power of user-entered base : calculate and display the power of user-entered base and exponential values. The result must be displayed with the precision of two decimal-points
Define this type of lighting used during her reading : Define this type of lighting used during her reading of the letter Why do you think the director used this lighting while Diana read the letter?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write an applet that draws the house shown

Write an applet that draws the house shown. When the user clicks on the STOP sign, audio of your choice should play.

  Write a program that prints out the even numbers

Write a program in C++ that prints out the even numbers between 1 and 21 using WHILE loop.

  Discuss possible ec2 designs that can be used for company

Discuss possible EC2 designs that can be used for the company. Discuss your rationale for your EC2 recommendations and remember to keep cost

  Describes the findings of other researchers

Write a review of the literature that describes the findings of other researchers related to a specific topic in the Project Management field.

  Create three new threads

Create three new threads (besides the already existing main thread) and synchronizes them in such a way that each thread displays it's thread id in turn

  Then reverse the order of the encrypted string determine

a string over a finite set sum is a finite sequence of elements from sum. show that the following procedure defines a

  Develop an outline for a proposed project that would meet

As a result, your manager has given you the responsibility to develop an outline for a proposed project that would meet this upcoming need for arranging and conducting a two-day training session.

  Determine if a list has two consecutive elements

Write a Prolog rule(s) to determine if a list has two consecutive elements both having a specified value.

  Implement a finite state machine and a circuit

Implement a finite state machine and a circuit that allows a user to enter a list of numbers into a register file, and then press a button to determine

  Write a program to determine which customers must be served

Write a program to determine which customers must be served from each field stations.

  There are five factors to consider when assessing the

there are five factors to consider when assessing the growing impact of it in business firms both today and over the

  How cloud makes dlp more difficult

What do you think about how cloud makes DLP (Data Loss Prevention) more difficult?

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