Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!ukc!rde From: rde@ukc.ac.uk (R.D.Eager) Newsgroups: comp.sys.ibm.pc Subject: Re: Date not advancing at midnight on my clone Message-ID: <2666@eagle.ukc.ac.uk> Date: Sun, 8-Mar-87 12:43:17 EST Article-I.D.: eagle.2666 Posted: Sun Mar 8 12:43:17 1987 Date-Received: Mon, 9-Mar-87 19:12:19 EST References: <4728@shemp.ucla-cs.UCLA.EDU> <4740007@hpvcla.HP.COM> Reply-To: rde@ukc.ac.uk (R.D.Eager) Organization: U of Kent at Canterbury, Canterbury, UK Lines: 42 I had this problem on MS-DOS 2.11 on a British PC clone. I also managed to fix it, but the nature of the fix means that it works ONLY for one version (and OEM implementation) of DOS. The BIOS time of day call (INT 1AH) is what DOS uses to get the time. This is used by the DOS kernel only to get the time of day. The call returns the time in CX/DX, and a flag (indicating date rollover) in AX. This flag is nonzero if the day has rolled over since the last call, and by definition is returned ONCE ONLY after a given midnight. Now, the real problem is that the OEM portion of DOS may also call the INT 1AH function, and many implementations do this to provide a timeout on disk access in order to make up for the lack of door latch status on IBM style floppy drives. The details don't matter, but a call from one of these just after midnight clears the rollover flag so that the DOS kernel never sees it. My solution was messy (and doesn't handle the case of an idle machine being left for a weekend), but it does work. First, scan thru the DOS file IO.SYS or IBMBIO.COM, looking to INT 1AH calls. Find the one that seems to do something with AX on return. Figure out from this code (easier than it sounds) the word where DOS obviously keeps the day number. Second, write a little intercept (TSR) routine for INT 1AH. Do nothing on the way in, but on the way out check AX. If it is nonzero, clear it and increment the DOS day number yourself. This WORKS. But, you need a different version for different versions and flavours of DOS (because the day number isn't always in the same place). It's a good idea to put some checks in to stop it being used on the wrong version and zapping some other word. -- Bob Eager rde@ukc.UUCP rde@ukc ...!mcvax!ukc!rde Phone: +44 227 66822 ext 7589