Question: MASM Assembly Language x86 Processor - Random_Screen_Location (Chapter 5, Pr 7) Hello Chegg experts, this is one of my programming assignments for MASM assembly language
MASM Assembly Language x86 Processor -
Random_Screen_Location (Chapter 5, Pr 7)
Hello Chegg experts, this is one of my programming assignments for MASM assembly language x86 Processor.
I desperately need your help on this!! Also use Irvine32 library.
Here is the assignment:

DOS_file_time (Chapter 7, Supplied)
Suppose the time field of a file directory entry uses bits 0-4 for 2-second increments, bits 5-10 for minutes, and bits 11-15 for hours (24-hour clock). Write a procedure named ShowFileTime that receives a binary file time value in the AX register and displays the time in hh:mm:ss format. For example, the binary 0001 0010 0000 0111 indicates a time of 02:16:14, in hh:mm:ss format:
00010 010000 00111 |
For simplicity, we want to input 4-digit hexadecimal and show its binary to verify. For this, you can call ReadHex and WriteBinB. Then you can call your ShowFileTime to display the file time. You may call WriteDec, WriteChar, and consider prefixed zeros. Run your program; the screen will be like this:
C:\Teaching\CSCI241\KipIrvine\SixthEdition\Prog_Ex_SM\ch07\Debug>project Please enter 16-bit hexadecimal (4-digit, e.g., 1207): A103 Your equivalent binary is 1010 0001 0000 0011 Your DOS file time is 20:08:06 C:\Teaching\CSCI241\KipIrvine\SixthEdition\Prog_Ex_SM\ch07\Debug>project Please enter 16-bit hexadecimal (4-digit, e.g., 1207): 1207 Your equivalent binary is 0001 0010 0000 0111 Your DOS file time is 02:16:14 |
Any reusable helper procedure is preferred, such as displaying a leading zero character if the value of hours, minutes, or seconds less than 10, else displaying an original two digits.
-----------------
Thank you in advance...
DOS_file_time (Chapter 7, Supplied) upposa the time fiald of a file diractory entry uses bits 0-4 for 2-second incraments, bits 5-10 far minutes, and bits 11-15 for haurs (24-hour clack) Writa a procaclune namad ShowFilaTime that roceivas a binary fle time value in tha AX ragister and displays the time in hh mmss format. For example, the binary 0001 0010 0000 0111 indicates a time of 02:16 14, in hh:mm:ss fonmat 00010 010000 00111 For simplicity, we want ta input 4 digt hexadecimal and show i screen will be like this its binary to verify . For this, you can call ReadHex and WriteBinB. Then you can call your ShaowfileTime to display the file time. You may call WriteDec, WriteChar, and consider prefixed zeros. Run your program; the Please enter 16-bit hexadecinal (1-digit,e.g. 1207) A103 Yo r equivalent binary 1 101D DDD! DDDD 0011 Your DO8 fine tin i 20:08:06 " 20,08:06 0001 0000001112 P16dB"sents r 16-bit hezadBG inal 4-digit, ULU UDUU e.g., 1207): 1207 Any reusable helper proccdure is proferred, such as displaying a leading zera character if the value of haurs, minutes, ar seconds less than 1D, dlse displaying an ariginal twa digit Advanced discussion (not required A possible issue is display of invalid hours, minutes, and seconds. For a real wond app. you do need to check hours 0 to 23, mnutes 0 to 59, and seconds 0 to 59 from the the user input. Since purpoge of this is to practice shift and rotate instructions, you can simply ignore the erar chacking without caring about these 19p top
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
