Chat with us, powered by LiveChat Assembler language | Writedemy

Assembler language

Assembler language

Getting Started (Items you have to review or learn to do for the project)

In order to get started on creating your assembler you must be able to have the program understand basic syntax of a text file containing a program. In this first part of the program you will deal with the basic functions of string processing and reading files. The following is a list of items to complete to help you do the project.

1) You will need to be able to read in arguments pass from the command line.

Ex: project1.exe inputfile.txt outputfile1.txt

2) You will need to be able to parse a string.

Ex: You will need to use the strtok() function in the string.h file.

3) You will need to convert all letters to lowercase letters.

4) You will need to compare a string to a list of know words.

(add, load, store, r0, r1, r2)

5) You will need to have a number in text 123 be converted to a number (integer) in the C program.

6) You will also need to be able to read and write files.

Project #1

Your assignment is to make a simple assembler for the DLX processor. We will simplify the assembler by only using the core instructions, we will not do the floating point instructions. The registers will be named as r0, r1, r2, … r29, r30, r31. We will also not allow any advance naming for saving constant or memory locations the assembly source code we write will hard code any constant and memory location to read and write to. The only advance item we will do is use a label for branching and jumping in code.

Items to turn in: a report that tells how you created your program, source code, test files and a flow chart.

Tips

It is common to run an assembler in a two pass structure. The first pass goes through the source files and finds all the labels and addresses for each instruction. You can start your program by assuming the first line of code is at memory location 0. You will make a table of label and address. On the second pass you will then convert the assembly instruction into machine code and fill in any labels using your table.

What to turn in

The following is what needs to be turned in for project 1:

Report

The report is made up of the following 4 parts:

1) The first part tells me if the project was successful or unsuccessful. If unsuccessful tell me which parts work and which parts do not work.

2) I need a documentation of each function of your code. Give me the name of the function, the inputs/outputs, and a description of what the behavior of the function is.

3) Instead of a flow chart give me a written set of steps that occur in your code design, reference the names of function calls as needed. You will write is as

Step 1 – what is done in step 1

Step 2 – what is done in step 2. If you have decisions write if X occurs go to step Y.

4) Project output. I need you to write a test file that test one instruction of each type (Load, Store, Branch, ALU, ALUi, JR, J). Write out the instructions in the test file and give me a screenshot of the output. Show the output of the encoding done by hand and compare it to the encoding of your program.

Source Code

Test Files 

(SubI r12,R20,255

start: lw r7,-16(R31)

SLT r3,r1,r9

BEQZ r1, STOP

SGTI r3,r7,-5

stop: sb 16(r11),r9

jalr r4

J start)

All of the files should be placed in one zip file. Name the file as P1_lastname.zip I do not want the files sent in an email. Post the file in blackboard under the Project 1 assignment. I will take off 20 points if I receive an email of your project.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order