Question: Need help asap and in . asm please. Show proof of it working please. For this assignment you will create program that will ask the

Need help asap and in .asm please. Show proof of it working please. For this assignment you will create program that will ask the user for a 16 bit number (that represents a MS-
DOS File Date), and you will unpack it and display the day, month, and year to the screen.
The MS-DOS File Date is
Bit index # Num of Bits
Day 0-45
Month: 5-84
Year: 9-157
The year is stored as number of years since 1980
So 31st Dec 1999 would be store as 31,12, and 19 in binary
day month year
311219
1111111000010011
Your program will have
1. Two procedures
a. main
b. unpack
2. The main procedure will:
a. prompt the user for the 16 bit number
b. read in the number (readdec)
c. save the number in EAX
d. call unpack (with the value still in the EAX register)
e. print out the value in EAX, EBX, and ECX as day: ,month: , and year:
Day: 31, Month: 12, Year: 1999
f. exit
3. The procedure unpack
a. receives the 16 bit value from main in EAX
b. printout the integer in EAX as a 16 bit binary number (see WriteBinB)
(this is the packup MS-DOS File Date)
1111111000010011
c. uses shift and AND to pull out the value for day, month, and year
d. stores them in EAX, EBX, and ECX (respectively)
Use a good style and format your code well (e.g. indent your code correctly and consistently and
space out lines and block only as much as is needed to felicitate readability). Have a comment block
at the top of the file that includes the filename, description, course, project number, author, and data
of last modification.
Don't change any of the names or registers used, as your code will then likely fail my testing.
mmccullough 2024 Sprint
; Program MS-DOSFileTime
; Program Description: take user given time and packet up into a 16 bit string and then show value
;
; use the following
; Day 1-31-5 bits
; Month -1-12-4 bits
; Year -25-31(+1980)-7 bits
;
; GET DAY FROM USER AND PACK UP INTO MS-DOX FILE TIME FORMAT
;
; Ask user for day (1-31: 5 bits)
; get value and save this value
; Ask user for month (1-12: 4 bits)
; get value and save this value
; Ask user for year (1980-2107)2^7=128; 1980+19=1999
; get value subtract 1980 from it and save
;
; PACKUP THE DATE INTO 16 bits
; Copy year to DX (mov DX, year)
; Shift DX, to the right by 7 bits (size of bits needed for year)(shl dx,7)
; Add month to DX (add DX, month)
; Shift dx by 4 bits (size of month)(shl dx,4)
; add day to DX (add DX, day)
;
; So now the date is packed into DX as YYYY YYYM MMMD DDDD
;
; printout value as bit string (call WriteBinB)
;
; Now Verify what we just did worked (UNPACK AND PRINT)
; pull out year and print; pull out month and print; pull out day and print

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!