Project 3
Requirements Specfication
Instead of prompting the user for
the name of the file, you can have the user put the
file on the command line prompt and use the procedure ParseCmd
(See Chapter 17) instead.
Write an assembly language program that will do the following:
- Print your name and SSAN.
- Prompt the user to enter the name of a file.
- Open the file.
- Read the characters in the file.
- Keep a count of the frequency that each character occurs in an array.
- Print out the number of occurances for each character, if the occurance was greater than 0.
- Print out a histogram for that number of occurrances.
- The number of occurances will range from zero to some number.
- If the number of occurances is greater than 20, only print 20 '*' in the
histogram and terminate the line with a '+'.
- All characters must be accounted for, even if it is a special character.
- Make sure the columns line up correctly as shown!
Program Header Comment Block
Use the following comment block at the beginning of your source code:
;; Filename: third.asm
;; Name: Ima Student
;; SSAN: 123-45-6789 (Could be XXX-XX-6789)
;; Date: 27 Sep 99
;; Course/section: CMSC-211 0301
;; Description: (Your psuedocode goes here)
;; Notes: (As needed, such has how to assembly)
Sample output
My name is Bill Gates and my SSAN s 666-66-6666
Enter the name of a file: 123.txt
<space> - 23: ********************+
a - 5: *****
b - 6: ******
c - 2: **
d - 1: *
e - 3: ***
The part in red is what is typed in when the program executes. The
green part is what your program will compute and display. This will
change if the part in red is changed at runtime.
CSEE |
211 |
211 F'99 |
lectures |
news |
help
Monday, 06-Dec-1999 14:20:28 EST