IUP Computer Science
CO 300   Assembly Language
Spring 1988

Program #3    (due 4 March 1988)


    Modify program #2 (Counting Days) so that it does the following things in addition to the tasks required for program #2.

1.  Add statements to check the numbers entered for the starting and ending month numbers.  Verify that these numbers are between 1 and 12 (still allow entry of 0 for the starting month to terminate the loop).  If an entered number is not valid, display an error message, such as
Not a valid month, starting over
and start the loop over by asking for the starting month.

2. Add statements to do either of the following.

a.  Verify that the day numbers for the starting and ending dates are valid.  That is, make sure the day numbers are between 1 and the last day of the month.  If a day number is not valid, display an error message, such as
Invalid day, starting over
and start the loop over by asking for the starting month.

b.  Change the display that reports the difference in days between the two dates.  Instead of just showing the number of days, the display should have the form
From "month name" "day" to "month name" "day" there are XX days
For example, if the starting and ending dates are 1/19 and 3/10, the display would be
From January 19 to March 10 there are 51 days
    Make clear in the comments for your program which of the options you are choosing from change #2.  If you wrote program #2 in uppercase, use lowercase letters for the changed statements.   If you wrote program #2 in lowercase, use uppercase letters for the changed statements.  If you wish to get extra credit, you may do both 2a and 2b.  Make it clear in the comments if you are doing this.

    Hand in a .LIS listing of your program and a PHOTO log of the run of your program.  During the run, enter sufficient pairs of dates to demonstrate that your program works and that the changes work.