[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Weird IIgs Rom 01 bug
- Subject: Re: Weird IIgs Rom 01 bug
- From: Gregory Weston <uce@splook.com>
- Date: Wed, 20 Oct 2004 08:11:41 GMT
- Newsgroups: comp.sys.apple2
- Organization: Comcast Online
- References: <w7ldd.34071$pi7.27371@bignews4.bellsouth.net> <5nmdd.34673$pi7.25157@bignews4.bellsouth.net>
- User-agent: MT-NewsWatcher/3.4 (PPC Mac OS X)
- Xref: g2news1.google.com comp.sys.apple2:5192
In article <5nmdd.34673$pi7.25157@bignews4.bellsouth.net>,
"Jayson Smith"
<nospamratguyspambegone@nospamplease.bellsouth.ihatespam.net> wrote:
> I have just managed to shed some light on this.
> Probably the real problem is that the peek/poke interface the original
> Applesoft program offered to the clock and other battery ram settings was a
> bit simplified. I'm now betting that the real cause of the date rollover
> bug is a byte rollover. This is confirmed by the fact that Apple aparently
> knew about this eventuality when they programmed the control panel. In the
> clock setting menu, the years 00-39 correspond to 2000-2039, and the years
> 40-99 correspond to 1940-1999. Therefore, you can't even set the clock to
> the year 2040 normally in the control panel. If you set it to the last day
> of the year 2039 and let it roll over, it'll go on into the year 2040, where
> about a month and five days later it'll mess up big time.
> The weird thing is that aparently the clock will go earlier than 1904. An
> attempt, using my own program, to set the clock to 1/1/1900 00:00:00 was
> completely successful. No idea how much further back the clock would go.
> So it looks like the GS clock has a total range of 01/01/1900 00:00:00 to
> 02/06/2040 06:28:15. However, the range which can be set in the control
> panel is only 01/01/1940 00:00:00 to 12/31/2039 23:59:59.
The original time routines for the Mac, which didn't change until after
the IIgs shipped, tracked the time and date as an integer number of
seconds starting from midnight, 1/1/1904. Apparently (and
unsurprisingly) the IIgs does the same thing. You've found the point of
integer overflow.
--
Change account to gw when responding by mail.