Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please provide code ready to run Write a command line interpreter for the computer to be described in a later assignment. This command line interpreter

Please provide code ready to run

image text in transcribed

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 a parameter and it is missing, the interpreter should tell the user that a parameter is required and then output the prompt and wait for a command. The same holds if a 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 of available 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 irn a file "directory. will list the files stored in the current directory. Do this by system("Is");. 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago

Question

=+j Explain IHRMs role in global HR research.

Answered: 1 week ago

Question

=+j Describe an effective crisis management program.

Answered: 1 week ago