Calculating time Solution

Calculating time Solution

In this project you are going to build and test an assembly language program to determine the time units based on user input. The user will input the number of hours, minutes, and seconds. Your output will be the time converted to the (just) seconds, the time converted to (just) minutes and seconds, and the time converted to hours, minutes, and seconds. After outputing the values, your program will ask if the user wishes to run the program again. If ‘y’ or ‘Y’, the program will loop back for another user entry and program output, while ‘n’ or ‘N’ will exit the program. Any invalid character will .
For a user input of 2 hours, 23 minutes, and 41 seconds, the number of seconds is:
(2 * 3600) + (23 * 60) + (1 * 41) = 8621 seconds
Computing the time in minutes and seconds:
(2 * 60) + (23 * 1) = 143 minutes 41 seconds
Of course, the original time in hours, minutes and seconds is:
2 hours, 23 minutes, 41 seconds
Sample user interaction for these values (user input in italics):
Enter the time in hours minutes seconds 2 23 41
Time is 8621 seconds
Time is 143 minutes, 41 seconds
Time is 2 hours 23 minutes, 41 seconds
Do you want to repeat (y/n)? y
Enter the time in hours minutes seconds 3 79 351
Time is 15891 seconds
Time is 264 minutes, 51 seconds
Time is 4 hours 24 minutes, 51 seconds
Do you want to repeat (y/n)? Q
Involid input, please re-enter (y/n) N (then exit the program)
Hand in: A listing of your program, along with a hard copy of the program’s execution.
Email your source code to your instructor.
Powered by