Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!ihnp4!zehntel!dual!qantel!intelca!hplabs!sri-unix!Info-IBMPC@USC-ISIB.ARPA
From: Info-IBMPC@USC-ISIB.ARPA
Newsgroups: net.micro.pc
Subject: [: MSDOS 2.0 clock problems]
Message-ID: <12527@sri-arpa.UUCP>
Date: Mon, 1-Oct-84 02:51:24 EDT
Article-I.D.: sri-arpa.12527
Posted: Mon Oct 1 02:51:24 1984
Date-Received: Thu, 4-Oct-84 10:05:28 EDT
Lines: 54
From: Info-IBMPC Digest
From:
Date: Fri, 28 Sep 84 22:47:46 pdt
Subject: MSDOS 2.0 clock problems
To: info-ibmpc@usc-isib
Lauren - I have seen explanations for the date rollover problem in several
publications and have fixed it in a couple of ways. The best explanation I
have found for this appeared in the May 1 issue of PC Magazine in the PC
Tutor section, page 415. I'll paraphrase here:
...Apparently this is what happens. When the time rolls
over at 24:00, the timer interrupt routine sets an
overflow flag in memory at 0040:0070. When you call the
time-of-day routine (INT 1Ah) to read the time, this
routine resets the overflow flag to zero.
The time-of-day routine returns the overflow flag in
the AL register. When the DATE program calls on this
routine, DATE is smart enough to increment the date when
it finds the overflow flag on.
The disk-dirver routines that are in the DOS (not in
the BIOS) also use the time-of-day clock. They might
use it to time out the disk drive appropriately or to
check for read errors. Unfortunately, these routines do
not change the date to the next date even though they are
told that the overflow flag is set. And once these
routines are run, the overflow flag is reset to zero.
If this happens before you ask for the date, the DATE
routine won't be told to change to the next day.
This certainly is a bug! And there's no simple way
to fix the software. The simplest answer might be to
create a new clock driver for PC-DOS 2.0 that does two
things:
First, the driver must substitute a new routine in
place of the time-of-day interrupt routine (INT 1Ah).
This new routine would not reset the overflow flag
unless the routine was called with an argument of 2.
(Presently, there are only arguments of 0 for setting
the flag and 1 for reading it.) Thus AH=2 would involve
reading the clock and also resetting the overflow flag.
Second, when the new clock driver is called for
reading the time or date, it will call the new
time-of-day routine with an argument of 2. Hence, the
overflow flag will be reset only when a program is
called that is able to change the date....
I have seen a public domain driver called CLOCKFIX.SYS (with an
associated .DOC file) that apparently does something similar. It seems
to work.
Hope this helps. --Bill Blue {ihnp4, sdcsvax!bang}!crash!bblue
-------