You are required to write a c program to translate lc-3s

Assignment Help Application Programming
Reference no: EM13380271

You are required to write a C program to translate LC-3's AND and ADD assembly language instructions into machine code. The detailed requirements are as below:

1. The assembly instructions are stored in a file. Each line of the file stores exactly oneinstruction. The name of the file should be provided to the program as a command line argument.

2. For this part, it should be assumed that the operands of the instructions only use the"register" addressing mode. That is, the values of all the operands are stored in registers.

3. It should be assumed that (a) the instructions are valid AND or ADD instructions, (b)there is exactly one space separating the opcode and the operands of the instruction, (c) the operands are separated by exactly one comma ",", and, (d) all the characters in the instruction are lower case letters.

4. The machine code should be displayed as a 4-digit hexadecimal number.

5. Name this program as part1.c

Here is an example of the execution of the program. In this example, the name of the file containing the instructions is source1. The contents of source1 are: add r1,r2,r3 and r0,r4,r5

The execution of the program is shown below. The command line argument is marked in red.

$ ./part1 source1

1283

5105

Reference no: EM13380271

Questions Cloud

Based on the following background information and project : based on the following background information and project requirements complete a project making use of opnetbackground
You can are required to research into one of the : you can are required to research into one of the following topics on data security or computer-network security and
Step 1construct a diagram using rationaleto map the : step 1.construct a diagram using rationaleto map the arguments about a moral claim that you have identified in the
Expand your program in part 1 to allow the operand : expand your program in part 1 to allow the operand use the immediate addressing mode. that is the value of
You are required to write a c program to translate lc-3s : you are required to write a c program to translate lc-3s and and add assembly language instructions into machine code.
Taskyou are to plan and then code the next version of the : taskyou are to plan and then code the next version of the cp1200 catering calculator as described in the following
1 which of the following is not true with regards to : 1. which of the following is not true with regards to thefollowing statement?namejohndoeampserial123456ampsystemma.
1 your senior manager catches up with you after your : 1 your senior manager catches up with you after your project status meeting to tell you that your project has been
Create a program which operates as a generic simple json : create a program which operates as a generic simple json parser. simple json is our version of json that only supports

Reviews

Write a Review

Application Programming Questions & Answers

  In this project you will create an application to run in

in this project you will create an application to run in the amazon ec2 service and you will also create a client that

  Imagine that your company has decided to expand to the web

imagine that your company has decided to expand to the web. you want to reuse some data entry code that has been

  1 here is a short program it prints out the value of a

1. here is a short program. it prints out the value of a variable x. ernie and bert disagree about what will be printed

  If the user wants to read the input from a file then the

if the user wants to read the input from a file then the output will also go into a different file. if the user wants

  Question 1we are given the following knowledge base of

question 1we are given the following knowledge base of travel informationnbspbycaraucklandhamilton.

  Basic requirementsscreen one has three edittext views and

basic requirementsscreen one has three edittext views and one button.the edittext views allow you to enter a students

  Create a application using the mvc architecture no

create a application using the mvc architecture. no scripting elements are allowed in jsp

  Rtl sa is a company which develops bespoke solutions for

rtl sa is a company which develops bespoke solutions for the rubber industry. they produce both rubber compound which

  Design a program that models the worms behavior in the

design a program that models the worms behavior in the subsequent scenarioa worm is moving toward an apple. each time

  Problem build a class for a type called fractionnbspthis

problem build a class for a type called fraction.nbspthis class is used to show a ration of two integers.nbsp include

  Part - 1 object-oriented designwrite a program that allows

part - 1 object-oriented designwrite a program that allows an instructor to keep a grade book. each students has scores

  Soda vending machine designnbsp design a soda vending

soda vending machine designnbsp design a soda vending machine that can deliver three kinds of soda a b and c. allnbsp

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