Thread View: alt.msdos.programmer
6 messages
6 total messages
Started by PB-Systems
Tue, 09 Dec 1997 00:00
BIOS/CMOS clock
Author: PB-Systems
Date: Tue, 09 Dec 1997 00:00
Date: Tue, 09 Dec 1997 00:00
14 lines
1198 bytes
1198 bytes
Hi All, I have a problem with my BIOS-clock. The clock runs too fast. The clock of the Operating System runs too fast. If I reset the computer the time is Ok, but if the PC keeps runnings the clock will move 10 seconds (a day) into the future. A strange but irritation problem. I wrote a small program to read the BIOS clock ($0040:$006C) but this clock is the wrong one. Can anybody help me to get the right CMOS-time?! Is there a way to find it?? Thanks, Erwin Gravesteijn
Re: BIOS/CMOS clock
Author: Ernie Deel
Date: Tue, 09 Dec 1997 00:00
Date: Tue, 09 Dec 1997 00:00
28 lines
2040 bytes
2040 bytes
> I wrote a small program to read the BIOS clock ($0040:$006C) but this clock > is the wrong one. Can anybody help me to get the right CMOS-time?! Is there > a way to find it?? What you're getting is the BIOS tick count. If this count is correct, it can be used to reset the DOS clock. It's fairly easy to figure the time from the tick count, there are 65536 (2^16) ticks per hour. Int 1A, Function 02 reads the time directly from the real-time hardware clock. The returned data is in BCD format which you will have to decode. This should be the date/time that is displayed in your CMOS setup. It is possible to go directly to the hardware itself but it's rather tricky programming and there's not much point in it if the BIOS will do the job for you. The DOS clock is set on startup and maintained thereafter by the OS. This DOS clock is Y2K compliant but the timer hardware in many (if not most) PCs has some problems. A cold shutdown and re-start is often required to re-set the hardware timer after the turn of the century. Until that happens, your software will likely be showing something like Jan. 1, 1900 if you get date/time from hardware. All part of the Y2K mania. -- Ernie Deel, EFD Systems ------------------------------------------
Re: BIOS/CMOS clock
Author: Wayne D. Hoxsie Jr.
Date: Tue, 09 Dec 1997 00:00
Date: Tue, 09 Dec 1997 00:00
52 lines
2748 bytes
2748 bytes
On 9 Dec 1997 10:07:16 GMT, "PB-Systems" <pb-systems@wxs.nl> wrote:
>Hi All,
>
>I have a problem with my BIOS-clock. The clock runs too fast. The clock of
>the Operating System runs too fast. If I reset the computer the time is Ok,
>but if the PC keeps runnings the clock will move 10 seconds (a day) into
>the future. A strange but irritation problem.
>I wrote a small program to read the BIOS clock ($0040:$006C) but this clock
>is the wrong one. Can anybody help me to get the right CMOS-time?! Is there
>a way to find it??
The CMOS clock runs independently of the BIOS clock. It is actually
located on the CMOS chip and is read by the BIOS at bootup. To access
the CMOS memory locations (some of which are updated continuously by
the CMOS clock) you need to do it through the CPU I/O lines 0x70 and
0x71 using the in/out instructions. The desired address (one byte) of
the CMOS memory is accessed by writing the address to port 0x70 then
either reading from or writing to port 0x71.
The following table maps the CMOS addresses asscociated with the
realtime clock:
CMOS address Contents
~~~~~~~~~~~~ ~~~~~~~~
00H Current second
01H Second alarm
02H Current minute
03H Minute alarm
04H Current hour
05H Hour alarm
06H Day of the week
07H Day of the month
08H Month
09H Year (00-99)
0AH Clock status register A
0BH Clock status register B
0CH Clock status register C
0DH Clock status register D
32H For NON-PS/2's: Century in BCD (19 or 20)
for PS/2's, the Century byte is at 37H, and
32H and 33H are used for a CRC value for bytes
10H through 31H.
--
Wayne D. Hoxsie Jr. KB9NWK
wayne@hoxnet.com
http://www.hoxnet.com
Re: BIOS/CMOS clock
Author: Walt
Date: Wed, 10 Dec 1997 00:00
Date: Wed, 10 Dec 1997 00:00
13 lines
1466 bytes
1466 bytes
Ernie Deel wrote: <snip> > The DOS clock is set on startup and maintained thereafter by the OS. This > DOS clock is Y2K compliant but the timer hardware in many (if not most) PCs > has some problems. A cold shutdown and re-start is often required to > re-set the hardware timer after the turn of the century. Until that > happens, your software will likely be showing something like Jan. 1, 1900 > if you get date/time from hardware. All part of the Y2K mania. Actually, I think it is more like Jan. 1, 1980. At least with the early PCs, the 100 year calendar started with 1980, and not 1900. Therefore, PCs should not have a problem until 2079. :)
Re: BIOS/CMOS clock
Author: James Usmar
Date: Wed, 10 Dec 1997 00:00
Date: Wed, 10 Dec 1997 00:00
23 lines
1746 bytes
1746 bytes
Surely the long int problem is encountered before this? 2037 and a few months.. :-) In article <348E9CF9.5DF0@Early.com>, Walt <Walt@Early.com> writes >Ernie Deel wrote: ><snip> >> The DOS clock is set on startup and maintained thereafter by the OS. This >> DOS clock is Y2K compliant but the timer hardware in many (if not most) PCs >> has some problems. A cold shutdown and re-start is often required to >> re-set the hardware timer after the turn of the century. Until that >> happens, your software will likely be showing something like Jan. 1, 1900 >> if you get date/time from hardware. All part of the Y2K mania. > >Actually, I think it is more like Jan. 1, 1980. At least with the >early PCs, the 100 year calendar started with 1980, and not 1900. >Therefore, PCs should not have a problem until 2079. :) -- James Usmar
Re: BIOS/CMOS clock
Author: Walt
Date: Thu, 11 Dec 1997 00:00
Date: Thu, 11 Dec 1997 00:00
13 lines
1136 bytes
1136 bytes
James Usmar wrote: > > Surely the long int problem is encountered before this? > > 2037 and a few months.. > > :-) Damn it! I might still be alive. I thought with 2079, I would not have to ever worry about it. :-)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads