Please provide asm code to complete the real mode assemblylanguage program. Thanks in advance!
Write a real mode (16-bit) assembly language program that will prompt the user for the name of a file in the current directory and display its time and date on the standard output device. The file name, time and date information must be displayed on the output line in the format shown below. (The name of the file, “was last modified at “, the one-or two- digit hour (1-12),””, the two-digit minutes value (00-59 with both digits shown) followed by “a.m.” or “p.m.” as appropriate,” on “, the full name of the month (January-December), a space, the one or two-digit date (1-31), “,”, the four-digit year, “.”.) Do not clear the screen before or after displaying this information. Leading zeroes are to be displayed for the minutes value (five minutes after four o’clock is 4:05, not 4:5) but not for the date or the hour. For example, if the user entered the filename “test.txt” in response to the prompt and that file had a date of 10/08/19 and time of 00:07 (7 minutes after midnight), your output would look like this: Enter the name of a file: test.txt test.txt was last modified at 12:07 a.m. on October 8, 2019. Your program will need to run within DOSBox and use some operating system services (for example, INT 21h functions 3Dh for 716Ch) and 3Eh can be used to open and close the file and function 57h will allow you to obtain the time and date information), then format the information as specified above and write it to the standard output device. Avoid changing the file in any way by making sure to open it in read-only mode and by making sure to close the file after you obtain the time/date information. If the file in question does not exist and/or cannot be opened, your program must detect this problem and output an appropriate error message. Optional: Extra credit may be awarded if, in addition to being able to receive input from the user in response to a run- time prompt as above, your program is also able to accept command-line input using the techniques explained in Section 14.3.7 of the Irvine text (web supplement). Show transcribed image text Write a real mode (16-bit) assembly language program that will prompt the user for the name of a file in the current directory and display its time and date on the standard output device. The file name, time and date information must be displayed on the output line in the format shown below. (The name of the file, “was last modified at “, the one-or two- digit hour (1-12),””, the two-digit minutes value (00-59 with both digits shown) followed by “a.m.” or “p.m.” as appropriate,” on “, the full name of the month (January-December), a space, the one or two-digit date (1-31), “,”, the four-digit year, “.”.) Do not clear the screen before or after displaying this information. Leading zeroes are to be displayed for the minutes value (five minutes after four o’clock is 4:05, not 4:5) but not for the date or the hour. For example, if the user entered the filename “test.txt” in response to the prompt and that file had a date of 10/08/19 and time of 00:07 (7 minutes after midnight), your output would look like this: Enter the name of a file: test.txt test.txt was last modified at 12:07 a.m. on October 8, 2019. Your program will need to run within DOSBox and use some operating system services (for example, INT 21h functions 3Dh for 716Ch) and 3Eh can be used to open and close the file and function 57h will allow you to obtain the time and date information), then format the information as specified above and write it to the standard output device. Avoid changing the file in any way by making sure to open it in read-only mode and by making sure to close the file after you obtain the time/date information. If the file in question does not exist and/or cannot be opened, your program must detect this problem and output an appropriate error message. Optional: Extra credit may be awarded if, in addition to being able to receive input from the user in response to a run- time prompt as above, your program is also able to accept command-line input using the techniques explained in Section 14.3.7 of the Irvine text (web supplement).
Expert Answer
Answer to Write a real mode (16-bit) assembly language program that will prompt the user for the name of a file in the current dir…