Question: I would appreciate some extra ideas on an assembler program: word, line and character count program. attacted is a C version that needs to be

I would appreciate some extra ideas on an assembler program: word, line and character count program. attacted is a C version that needs to be written in assembler. I would appreciate some extra ideas on an assembler program: word, line

On a Linux system, the system program wc counts the number of lines, words, and characters in a file. You will duplicate the functionality of wc as an assembler program. Additionally, many applications require that the character frequency be determined. The Huffman encoding algorithm is one such example. As part of this program, you will also need to determine the frequency of each of the characters that are processed.

For this program, you will be expected to complete the following tasks: 1. Read lines entered from the keyboard or from a file. 2. Echo each input line. 3. Output the list of words from the line that was input. 4. Allow the user to continue entering lines (i.e. allow the user to do steps 1-3 continuously) until a blank line is entered. 5. Output the total number of lines, words, and characters. 6. Output the frequency of each of the characters.

Please consider the following:

Be sure to print a title and "user-level" description at the beginning of your executed program so the user knows what the program is doing.

Be sure to label your output so it is clear what each output section is doing in relation to the assigned tasks. White spaces or other types of separators in the output will be very helpful in making the output easier to read and understand. You should also comment the code properly.

Be sure to display appropriate prompts for the user input and appropriate labels for the program output.

Provide an analysis of the program that includes the following three points:

(a) A review of the complexity of your program in terms of Big-O notation that shows your "work" in determining the complexity.

(b) A review of any interesting conclusions that might be drawn from the data produced from your program. For example, consider average word lengths or distribution of character frequencies. Typically, these types of conclusions would be drawn from running the program on several different data sets.

(c)Identification of any parts of your program that are not working correctly.

int main() //Array of char for sentence store char line [75]; //Variables for counting int countWord 0, i, countChar-0, space-0,exclam-0,period-0; int freqChar [26]; int line|en = 0; linelen = strlen(line); //set to store frequency of all alphabet for (i-o; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!