greenber@phri.UUCP (Ross Greenberg) (03/15/86)
A while ago I had to reformat an ATT 6300 with DOS3.1 in order to get the cluster size down to a reasonable size. That worked like a charm --- except that the clock was no longer set upon boot-up. The following should allow you to create your own "clockset" program. A version of this is coming out on one of the upcoming PC/BLUE vols. 1) Call interrupt 0x1a with AH = 0xFE. This returns the time in the registers as you expect, and the date (in the format described below) in BX 2) Do a DOS call to set the time: INT 0x21 with AH = 0x2d 3) The date is the number of days since January 1, 1984. Forget about leap-years --- seems ATT doesn't believe in them. A simle kludge to convert: year = num_days/365 num_days -= (year * 365) month = 1; while (num_days > month_tab[month]) num_days -= month_tab[month++]; year += 1984; 4) Then set up the registers as for a DOS Set date: regset.h.dl = num_days; regset.h.dh = month; regset.x.cx = year; and call DOS Int 0x21 with AH = 0x2b. Voila! You have your date and time back. -- ------ ross m. greenberg ihnp4!allegra!phri!sysdes!greenber [phri rarely makes a guest-account user a spokesperson. Especially not me.]