Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

CSCI6638 Programming assignment 3 Spring 2018 e Shell or Command Lie Interpreter

ID: 3707871 • Letter: C

Question

CSCI6638 Programming assignment 3 Spring 2018 e Shell or Command Lie Interpreter is the fundamental User interface to an Operating System. Your third pr oject is to write a simple shell - myshell that has the following properties: 1. The shell must support the following internal commands a. clr - Clear the screen. b, d . List the contents of directory c. environ - List all the environment strings d. run prog pl p2 exec's to prog passing the parameters pl p2... e. quit Quit the shell. 2. All other command line input is interpreted as program invocation, which should be done by the UNIX system0 function 3. For option d. you may either overlay the shell or overlay a forked/child process with the shell waiting until the spawned command has finished before continuing 4. The command line prompt must contain your UNIX username. Example: wp663000 >> Project Requirements 1. Design a simple command line shell that satisfies the above criteria and implement it on the alpha fdu edu UNIX platform. The source code MUST be extensively commented and appropriately structured to allow your peers to understand and easily maintain the code. Properly commented and laid out code is much easier to interpret, and it 1s in your inter ests to ensure that the person marking your project is able to understand your coding without having to perform mental gymnastics! The submission should contain only 1 source code file. The person marking your pr oject will be uilding your shell program from the source code provided. If the submitted code does not compile it cannot be marked!

Explanation / Answer

ANSWER:

1. Event-Count Mode

2. Gated Time Accumulation Mode In Event-Count Mode,

The pulse accumulator counts the number of rising or falling edges on Port T7

You can set up the pulse accumulator to select which edge to count

The counts are held in the 16-bit PACNT register – On each selected edge the PAIF flag of the PAFLG register is set

When PACNT overflows from 0xFFFF to 0x0000, the PAOVF flag of the PAFLG register is set In Gated Time Accumulation Mode the pulse accumulator counts clock cycles while in the input to Port T7 is high o