CSC 174 - Computer Organization and Assembly Language

Dr. R. M. Siegfried

Assignment #13 - Formatting the time

Due Wednesday, May 11, 2016

Write a procedure that gets the time and prints it out in the following format:

1:40:05PM

Don't forget to make sure that you display a lead zero if the number of minutes or seconds is less than 10. And remember, 0 hours is 12 AM, 12 hours is 12 PM and if hours is greater than 12, substract 12 and print PM.

You should write a main program whose only task is to call this procedure.

As in the earlier assignment, use the GetMSeconds library procedure.

[Back to the Assignment Index]