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 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 MSDOS File Date is
Bit index # Num of Bits
Day
Month:
Year:
The year is stored as number of years since
So st Dec would be store as and in binary
day month year
Your program will have
Two procedures
a main
b unpack
The main procedure will:
a prompt the user for the 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: Month: Year:
f exit
The procedure unpack
a receives the bit value from main in EAX
b printout the integer in EAX as a bit binary number see WriteBinB
this is the packup MSDOS File Date
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 eg 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 Sprint
; Program MSDOSFileTime
; Program Description: take user given time and packet up into a bit string and then show value
;
; use the following
; Day bits
; Month bits
; Year bits
;
; GET DAY FROM USER AND PACK UP INTO MSDOX FILE TIME FORMAT
;
; Ask user for day : bits
; get value and save this value
; Ask user for month : bits
; get value and save this value
; Ask user for year ;
; get value subtract from it and save
;
; PACKUP THE DATE INTO bits
; Copy year to DX mov DX year
; Shift DX to the right by bits size of bits needed for yearshl dx
; Add month to DX add DX month
; Shift dx by bits size of monthshl dx
; 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
