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

  Problem descriptionyou are working as an engineer for a

problem descriptionyou are working as an engineer for a materials manufacturing research lab and have been asked to

  Use the internet or strayer databases to research the

use the internet or strayer databases to research the advantages features and common examples of oop and edp. note you

  Problem1 the fibonacci numbers are defined by the

problem1 the fibonacci numbers are defined by the sequencef1 1 f2 1 fn fn-1 fn-2.reformulate that asfold1 1 fold21

  Write two page paper describing xml and json what are they

write two page paper describing xml and json. what are they? why do we need them? are there certain applications that

  Question 1write a recursive method nmbdigits which takes an

question 1write a recursive method nmbdigits which takes an integer value as parameter and returns the number of digits

  Write a paper on mcdonaldsethics and social responsibility

write a paper on mcdonalds.ethics and social responsibility at mcdonaldspaper includesabout mcdonaldscorporate social

  Application development and programming

application development and programming languagesprogramming languages have evolved since the first generation

  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

  Your task for this project is to design a website by using

your task for this project is to design a website by using php and mysqlto order pizzafunctional requirementsa website

  Objectives1login to unix system and logout2learn features

objectives1.login to unix system and logout2.learn features of the vi editor and to use online help man pages. gain

  Determine if a word is a palindrome using a doubly link

determine if a word is a palindrome. using a doubly link list read in a word character by character store each

  Question 1 an accumulator is a procedure that is called

question 1 an accumulator is a procedure that is called repeatedly with a single numeric argument and accumulates its

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