Previous
Index
Next
INT 21 - DOS 2+ - GET FILE'S LAST-WRITTEN DATE AND TIME AX = 5700h BX = file handle Return: CF clear if successful CX = file's time (see #01665) DX = file's date (see #01666) CF set on error AX = error code (01h,06h) (see #01680) Notes: under DR DOS 3.41 and 5.0, this function returns 0 (no date/time) for character devices; MS-DOS returns date and time of opening SeeAlso: AX=5701h,AX=5704h"Windows95" Bitfields for file time: Bit(s) Description (Table 01665) 15-11 hours (0-23) 10-5 minutes 4-0 seconds/2 (this cannot encode odd seconds) Notes: all of these fields are 0-based Bitfields for file date: Bit(s) Description (Table 01666) 15-9 year minus 1980 (0 to 127, corresponding to 1980 to 2107) 8-5 month 4-0 day Notes: the month and day are encoded 1-based, so that if they hold zeroes they encode an invalid date. this is typically the case if the entire file date is all-zeroes. the lDOS bootimg assembler script usually initialises all file dates and times as all-zeroes. some shells (eg MS-DOS v4.01 command.com) will detect these and not display any date, others (eg FreeCOM) may display a stamp like "1980-00-00 00:00:00"