delorie.com/archives/browse.cgi | search |
Date: | Thu, 29 May 2003 22:29:05 -0400 |
Message-Id: | <200305300229.h4U2T5vd031704@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | killer DOT lightspeed AT bigpond DOT com |
CC: | djgpp-workers AT delorie DOT com |
In-reply-to: | <3ED6C0EB.3080403@bigpond.com> (message from Ben Peddell on Fri, |
30 May 2003 12:24:43 +1000) | |
Subject: | Re: uclock() still out by 1 in 65536 |
References: | <4wyBa.45993$1s1 DOT 615094 AT newsfeeds DOT bigpond DOT com> <200305300208 DOT h4U28vDV031441 AT envy DOT delorie DOT com> <3ED6C0EB DOT 3080403 AT bigpond DOT com> |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Please keep djgpp-workers on the recipient list. > >If the count's wrong, it's a bug. The question is - are we *supposed* > >to be counting to 65535, or 65536? IIRC there are some oddities in > >how the timer works. > > > > > > > Well, the code programs a count of 65535: > > outportb (0x43, 0x34); > outportb (0x40, 0xFF); > outportb (0x40, 0xFF); > > whilst it assumes a count of 65536: > > rv = ((uclock_t)tics << 16) | (msb << 8) | lsb; > > I'll check it on the real PIT, and get back to you. No, my question was whether a count of 65535 was required to get the total tic count correct for a day.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |