From mboxrd@z Thu Jan 1 00:00:00 1970 From: torek@elf.torek.net (Chris Torek) Date: Wed, 13 Dec 2017 16:24:35 -0800 (PST) Subject: [TUHS] Date madness In-Reply-To: <1513203404.29181.for-standards-violators@oclsc.org> Message-ID: <201712140024.vBE0OZQC079168@elf.torek.net> The 780 had only the Time Of Day Register (mfpr $TODR,reg), but it covered more than a year's worth of "time of day": http://h41379.www4.hpe.com/wizard/wiz_1450.html http://rbur004.github.io/MacVAX/VAX-IPR/IPL_CLOCK.html so the standard trick was to assume that the computer had been booted within a year or so, and use the file system time plus the TODR value to compute the correct time. Various MicroVAXen may have added CMOS clock chips, and I vaguely recall dealing wth BCD-encoded time on another VAX, perhaps the 8800. I wrote some clock-chip driver code for the 4BSD SPARC port and tried to consolidate the general issues of dealing with multiple chip registers, two and four digit year encoding, BCD vs decimal, and so on. Chris