Get a unique, high-quality and non-plagiarized paper from us today at the most affordable price
Email us : premieredtutorials@gmail.com

an assembler

Write an assembler for the following instructions:
add, lw, sw, li, move, beq, j
Assume that: all registers are addressed by $register-name (like $s1; see your textbook for range of valid register names and numbers); the end of program is recognized by the .endinstruction, the program is loaded into memory at location 0; each label has 1 to 4 characters; there is 1 or more space between the symbols in the program.
The input to your assembler is a text file consists of 1 to 50 assembly instructions. The last instruction is .end. You can write your assembler in C++ as long as we are able to test it in the department.
The output of your program is a text file that contains the object code. The object code is represented in hex format.
Your assembler should consist of two passes.

First Pass,
During the first pass, the assembler generates a table that correlates all user-defined address symbols with their decimal equivalent value. The binary translation is done during the second pass. The content of PC (Program Counter) stores the value of the memory location assigned to the instruction or operand presently being processed. The assembler sets this counter to 0 initially. A line of symbolic code is analyzed to determine if it has a label (by the presence of a colon). If the line of code contains a label, it is stored in the address symbol table together with its decimal equivalent number specified by the content of PC. PC is then incremented by 4 and a new line of code is processed.

Second Pass,
Instructions are translated during the second pass by means of table-lookup or other procedures. There are three tables:

1. Pseudoinstruction table.
2. Instruction table.
3. Address symbol table.
t checks the pseudoinstruction table. A match with an entry sends the assembler to the corresponding subroutine. If the symbol encountered is not a pseudoinstruction, the assembler refers to the instruction table. If a match occurs, the instruction is converted to its equivalent machine code by the use of address symbol table (if needed). The implementations of tables 1 and 2 are optional. You must use a hash function for the implementation of Table 3.

Error Diagnostics,
The assembler should check for possible errors in the symbolic program and if there is an error it should print out the proper error message.

Note:
Please, name your file assemblylab.s (make sure your file extension is .s or .asm) and submit it as a text file

 

For a custom paper on the above topic, place your order now!

What We Offer:

• On-time delivery guarantee

• PhD-level writers

• Automatic plagiarism check

• 100% money-back guarantee

• 100% Privacy and Confidentiality

• High Quality custom-written paper

 

How to Place an Order 

Send the assignment details such as the instructions, due date/deadline, number of pages and college level to the customer support agent online on live chat,  fill in the assignment details at place an order or send the information to our email address premieredtutorials@gmail.com and a customer support agent will respond to you immediately. 

Once you place your order, we choose for you the best and competent writer for your assignment based on each writer’s competence in handling a subject. 

When the homework is completed, we have a quality assurance team that proofreads the assignment to ensure it meets the required rubric instructions from your professor.

After thorough review of your assignment, we send the paper to the client. In case you need any changes at this point, you can let us know so that we can handle it for you at no extra charge. 

Homework Help Website

Why we should write your Paper 

  1. Money Return guarantee
  2. 0% Plagiarism Rate
  3. Guaranteed Privacy
  4. Written from scratch by highly qualified writers 
  5. Communication at Any Time (24/7)
  6. Flexible Pricing and Great Discount Programs
  7. Timely Deliveries
  8. Free Amendments
Looking for a similar assignment and in urgent need for help? Place your order and have excellent work written by our team of professionals to ensure you acquire the best grades.

  We are here to assist you.

 

Statistics about Us

130 New Projects
235 Projects in Progress
315 Inquiries
420 Repeat clients

© 2021 Premiered Tutorials
All rights reserved. We provide online custom written papers, such as term papers, research papers, thesis papers, essays, dissertations and other custom writing services.

All papers inclusive of research material are strictly intended to be used for research and study purposes only. Premiered Tutorials does not support or condone plagiarism in any form. These custom papers should be used with proper reference.

Place an Order
error: Content is protected !!