At 06:51 AM 7/12/2012, Johnny Billquist wrote:
Right. But that is a limitation of the command decoder,
and have very
little to do with any other part of OS/8 date handling. The date
encoding in OS/8 itself actually worked until 2002.
What you mean is that you can set the system date information to
correspond to dates as late as 2002 if you either do it by hand (ODT)
or with some other program. However, being able to set the date to
something in 2001 doesn't help you much, because nothing that I know of
that's shipped with the OS handles dates past 1999. (Note: I don't know
if any of the OS/78 or OS/278 kits did anything here.)
For example, setting the date to 31-DEC-77 then setting the two
extended date bits on gives you:
.DATE
Monday December 31, 19 1
OK, that's still the Command Decoder. How about DIR?
.DIR 2000.*
31-Dec-101
2000 .TX 1 31-Dec-101
1 Files in 1 Blocks - 615 Free blocks
Looks like the date handling is pretty broken. Unless you're aware of
something that actually displays the right date for such things.
Oh, and the other fun aspect:
.DATE 1-JAN-77
.DIR 2000.*
01-Jan-77
2000 .TX 1 31-Dec-77
1 Files in 1 Blocks - 615 Free blocks
When you change the date, you might also be changing the creation dates
for files by one or more multiples of 8 years.
The failure to include extended date bits in directories means that
whatever date your files were created in, they're assumed to be within
eight years of the current date. Changing the date changes what the OS
thinks the creation date is for a file.
What 31-DEC-99
gives you from TECO:
.R TECO
*^B==$$
16375
(12 * 32) + 31) * 8 = 3320
(1999 - 1970) & 7 = 5
3325 DEC, 6375 OCT plus 4096 gives 16375.
You can't tell what this really means (it could be 1983, 1991, or 1999)
but that's an OS/8 failure, not TECO.
No. That is a failure in TECO. OS/8 obviously knows if it is 1975,
1983, 1991 or 1999. The information is not preserved in TECO. TECO fail.
It's also a failure in OS/8. 12 bits gives you potentially 11 years of
date range (4096 days at 365 days per year); the 14 bits they're using
could have given almost 45 years of date range if DEC had decided to
change the date format to be days since 1-jan-1970. It would have made
sense given that the current format has so many problems (can't be
compared using simple arithmetic, for example).
The problem is that OS/8 keeps two bits for the
extension of the
years, while TECO compressed that into just one bit. Loss of
information follows.
However, with only 13 bits for integers in TECO, I'm not sure how you
would go about to solve it in a reasonable way...
True, there's not much that can be done given the data type. 13 bits
packed just doesn't get you enough range.
The TECO source doesn't say anything about this limitation, but it just
ignores the high-order date bit:
CTL.B, TAD I (7777
RTL
RTL
RAL /PUT EXTENDED DATE BIT IN LINK
L7200, 7200 /CLA
CDF 10
TAD I (7666
CDF 0
JMP I (NCOM
-Rick