Write a command line interpreter for the computer

Assignment Help Computer Engineering
Reference no: EM132081454

You need to write a command line interpreter for the computer to be described in a later assignment. This command line interpreter will function as a simple operating system for the rest of the project. This must be written in the C programming language (NOT C++) and must run in the LINUX environment without any added compiler options.

The interpreter should do the following:

1. The command interpreter should output an appropriate welcome message and a prompt and wait for the user to type a command line.

The command interpreter will process the command and call the function which carries out the command. Commands will consist of single word commands followed by zero or more parameters.

If a command requires an parameter and it is missing, the interpreter should tell the user that an parameter is required and then output the prompt and wait for a command. The same holds if an parameter is provided that is not required.

For now, each command (except Help, Directory, and Exit) should be a stub which simply states that it has been reached. These commands will be programmed in later phases. NOTE: Your program MUST check for the presence/absence of parameters!

2. For this phase, do not use any precompiled routines to break up the line into pieces. You may only use loops and comparisons. That is, do not use strtok (or any of its variants). In later phases you may use these. If in doubt, don't use it!

3. The command interpreter should not be menu driven, and should recognize the following commands (only the commands indicated by* need to be implemented, but all should be recognized):

load filename : will call the load function to load the specified file.

execute : will call the computer simulation program to execute the program that was previously loaded in memory.

debug : will allow you to execute in debug mode.

dump start end : will call the dump function, passing the values of start and end. Start and end will be hexadecimal values.

*help: will print out a list ofavailable commands. If an unrecognized command is typed at the command
level, a message to type help should be displayed.

assemble filename : will assemble an SIC assembly language program into a load module and store it in a file.

*directory : will list the files stored in the current directory. Do this by system("ls"); . You will need
the directive #include .

*exit: will exit from the simulator.

NOTE: The* is not part of the command!!!

You may want to have the interpreter recognize the first few characters of the command, e.g., enter "dir" for directory. Do not make up your own versions of the commands -- use what is listed above.

Reference no: EM132081454

Questions Cloud

What does future look like for small retailers in america : What does the future look like for small retailers in America? How can they compete with retailing giants like Wal-Mart?
Discuss three alternative price-increase strategies : However, you are concerned about the consequences of an open price increase. Discuss three alternative price-increase strategies that address your concerns."
Define characteristics of the input variables : List all of the input variables, including the state variables. HINT: Consider the state of the Queue like we did in our class example with state.
What is the service that ebay provides its members : What is the service that eBay provides its members? How has eBay differentiated itself from competitors?
Write a command line interpreter for the computer : Write a command line interpreter for the computer to be described in a later assignment.
Marketing communications more effective : Can you explain to me the various methods used to make marketing communications more effective?
Implement a stack in javascript : The Pop function should always return the element on the top of the stack and at the same time removing it from the top of the stack.
What are some threats the national kidney foundation : What are some threats The National Kidney Foundation faces with its competitors
When using non-store retailing methods versus traditional br : When using non-store retailing methods versus traditional brick and mortar retailing what are the plus and minuses.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Design a pseudocode algorithm

design a pseudocode algorithm you would write for a simple task like making a turkey sandwich, as well as three simple control structures that could be used to create this algorithm. What do you think is the most difficult part of creating the alg..

  Describe three role required to provide and use web services

Explain the ultimate goal of Web services. Describe the three roles required to provide and use Web services. What is UDDI? What is SOAP?

  Create web page that plays the rock, paper-scissors game

CSE 001 - Fall 2016 - Creation of a web page that plays the Rock, Paper, Scissors game with the user - The computer should choose randomly from the 3 choices of rock, paper, or scissors randomly and not cheat by using the user's selection to make t..

  Program the user types an item number and a quantity

I need a program for a mail-order company. The program uses a data-entry screen in which the user types an item number and a quantity. Write each record to a file. Save program as MailOrderWrite.java

  Compare and contrast two models of conceptualizing addiction

Compare and contrast two models of conceptualizing addiction. Describe the models, how they are synergistic, or how they take competing views.

  Implement register to resolve war and waw dependences

Now assume that register renaming is implemented to resolve WAR and WAW dependences. Determine the number of clock cycles it takes to execute.

  Write an application with three buttons

Write an application with three buttons labeled Red, Green, and Blue that changes the background color of a panel in center of the frame to red, green or blue.

  What visual effect would result by changing horizontal gaps

Write the lines of code that will define a compound border using three borders. Use a line border on the inner edge, an etched border on the outer edge.

  Define monomeric and polymorphic type systems

Define monomeric and polymorphic type systems. Check in the Pascal manual if procedures and functions can be overloaded.

  Create an app called blogs in the project

Create an app called blogs in the project, with a model called Blog-Post. The model should have fields like title, text, and date_added.

  How are css, dhtml and xml associated

Find out an article or a resource about CSS, DHTML or XML. Include the URL of the original article or resource and summarize it.

  Discuss the primary data center will be located at atlanta

Discuss the primary data center will be located at the Atlanta location. Each location should be protected from intrusions that are not limited to state change.

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