Richard wrote:
According to the documentation for TECO v40:
^B <CTRL/B> (caret/B) is equivalent to the current date
via the following equations:
OS/8: ^B = (((month*32)+day)*8)+((year-1970)&7)+k
where k = 4096 if year>1977
and k=0 otherwise
RT-11: ^B = (((month*32)+day)*32)+year-1972
RSTS/E: ^B = ((year-1970)*1000)+day within year
RSX-11: ^B = ((year-1900)*16+month)*32+day
VAX/VMS: ^B = ((year-1900)*16+month)*32+day
TOPS-10: ^B = (((year-1964)*12+month-1)*31+day-1)
Notice how the year is added as the least significant bits for OS/8
and RT-11.
For OS/8, you only get *3* bits for the year plus a high 4K bit set if
the year is out of range? Does this mean years higher than 1977 are
encoded as 4096+(year-1977)?
For RT-11, notice how year-1972 is packed into *5* bits (0..31), so
years after 1972+31=2003 start carrying over into the bits for the month
and day.
Can anyone with RT-11 or OS/8 and TECO v40 verify what is described above?
First an obvious observation. The committee which approved the bit
structure for the date in RT-11 did not seem to be thinking very clearly.
It is one of the few areas which are disappointing in RT-11. The 5 bits
for the year should have been specified first, then the month followed
finally by the day in the lowest 5 bits. Then at least until 2099, the
date value would have been an obvious value - assuming a clever
programmer did not steal the high order bit to save a word in
some of the programs - which was done in PIP.
Obviously, ALL of the operating systems will or already
have problems with the date and will or already have
broken the above algorithms.
I think that OS/8 has already been answered.
For RT-11, after 2003, those 5 year bits are reused, so the RT-11
development
team finally published (around 1989) how the dates after 2003 would be
kept - at least until 2099. If you understand the RT-11 value, then there
are still 2 bits left in the 16 bit word for the date at the high end.
Starting
on January 1st, 2004, bit 14 is set and added to the 5 low order bits for
the year - in bit position 5 of course - so that if bit 14 is set, 32
years are
added to the low order 5 bits for the year. Starting on January 1st, 2036,
bit 15 is set (bit 14 is unset) and 64 years are added to the low order
5 bits
for the year. Starting on January 1st, 2068, both bits 14 and 15 will
be set
and 96 years are added to the low order 5 bits for the year.
Naturally, the above finally breaks on January 1st, 2100 and a second word
to hold the extra year bits will be required for the next 128 year cycle -
or some other method will be required.
There has been some discussion as to how all of the operating systems
will handle dates over the next few hundred years, but thus far there does
not seem to be much interest. For myself, I have proposed adding a second
word to RT-11 to hold the extra year values, but nothing specific has been
agreed to or even suggested by any one else except by the developer of RUST.
Note that an extra word for the resident portion of RT-11 is the trivial
aspect.
Where the extra bits are held for file and tape directories is the
critical problem.
In addition, I suggest that other date and time information be supported in
file directories and one of the bits in the first word (the low order
bit might
be best) for the status of a file label in a file structured RT-11 device)
be set to note that any additional words in a file label are for the
date and
time of:
(a) File Creation
(b) File Modification
(c) File Access
(d) File Backup
(e) Anything else that is appropriate.
Note that bit 14 in that status word is already being used for the READ
ONLY
status and has been implemented in the RT-11 operating system since 1989
for V05.05 of RT-11. The only problem is that PIP still does not set or
clear that bit and DIR does not display the status. ALSO, RUST has
a problem if that bit is ever set - or so I understand - and the problem
may be serious enough to cause RUST to crash.
Since RT-11 seems unlikely to have another release after V05.07 except
for hobby users and I have not heard from anyone else that they are
considering
spending the time to work on another release - unless there is some other
RT-11 addict lurking that has not added their thoughts - I doubt there is
anyone else who might consider spending the time on RT-11 at this point.
Note that the last release in 1998 of V05.07 of RT-11 was 15 years ago
which was 25 years after the first release of RT-11 in 1973 (as far as any
records I have). Perhaps, on the 50 year anniversary in 10 years there
could be a V05.08 for RT-11????????????????????
I have requested suggestions and a discussion for RT-11 and some
co-ordination
with all of the other operating systems. I request that again!
Jerome Fine