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

  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