[Coco] NitrOS-9 Year 2000+ changes

Dave Philipsen dave at davebiz.com
Wed Mar 13 05:36:52 EDT 2019


At some point on January 19th, 2038 it will be 2 gigaseconds beyond January 1, 1970. January 1, 1970 is the Unix epoch zero time from which dates are calculated either in negative fashion before 1970 or positive fashion after 1970. The problem lies in the fact that many computers use a 32-bit signed offset to calculate the offset (in seconds) from ‘zero’ time. A 32-bit signed number has the range of -2,147,483,648 to +2,147,483,647. So what could happen is that some clocks will roll over from the highest possible 32-bit signed number to the lowest possible 32-bit signed number on January 19, 2038 which may cause some software to believe the date is somewhere around the year 1901 or something like that.

Dave

> On Mar 13, 2019, at 3:14 AM, Gene Heskett <gheskett at shentel.net> wrote:
> 
>> On Wednesday 13 March 2019 00:01:03 Stephen Fischer wrote:
>> 
>> Can somebody confirm that
>> 
>> Year 1999 = $63 and that the next year is:
>> 
>> Year 2000 = $00.
>> 
>> With 2019 being $13.
>> 
>> Years between $64 (100) - $FF (255) are illegal.
>> 
>> SHF
> That, generally speaking, is an artifact of the clock chips of the day. 
> None that I've encountered have ever counted in the year register, past 
> $63 or 99 decimal. The software clock modeled that behavior, so it was 
> needfull that we add, external to the 6 byte string os9 keeps in memory, 
> not 1900, but 2000 when it rolled over and was reset to 00.  That took 
> care of y2k. But there is another gotcha, the cause of which I've 
> forgotten now but 2038 is a date stuck in my ancient memory now. To 
> properly handle that, and keep the image in memory too, will require 
> another byte in the memory image IIRC.  Others, by then will maybe come 
> up with a different, better solution by then. rs disk basic will need 
> its own fix, and I didn't worry about y2k and basic as I haven't used it 
> since '87 or so. AIUI, the basic clock doesn't know about leap years or 
> such, so that will likely need a new clock subroutine installed above 
> disk basic.
> 
> Looking thru the copy of nitros9 I have here, Boisy has been there, so 
> all history and comments related to y2k have been wiped clean as the new 
> versions start in 2004 or so.  So I'm lost and 20 years later, none of 
> it rings any bells to me.  Sorry.  But the comments on clock chips, 
> because we all have got a lot of pre-1990 hardware yet should be valid. 
> Will that old pmos stuff still be going in another 18 years? It has to 
> be well up the tail end of that famous bathtub curve already.
> 
> For dw users, I even see a clock2 module that grabs the time from the 
> host pc.  One fix I just thought of might be to do a short modulo 100 
> loop by stashing the year in scratchpad, subbing 100 to see if it 
> generates a borrow, if not inc a scratchpad, and loop back to sub 100, 
> and when it fails, reload the saved year and add the incremented byte to 
> the left byte of 1900. But thats a sw clock only fix.
> 
> I'm not going to worry about as I, like a lot of us, will be gone by 
> then.  And I expect this group will by then have some younger, creative 
> people who can handle it. There are several younger minds that have come 
> on board in the last 10 years that could easily do it here already.
> 
> Cheers, Gene Heskett
> -- 
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page <http://geneslinuxbox.net:6309/gene>
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list