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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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