On 2012-07-11 18:12, cctalk-request at
classiccmp.org wrote:
Message: 25
Date: Wed, 11 Jul 2012 10:12:09 -0600
From: Richard<legalize at xmission.com>
To:cctalk at
classiccmp.org
Subject: TECO ^B on OS/8 and RT-11
Message-ID:<E1SozWL-0003Wk-9R at shell.xmission.com>
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?
I don't have an OS/8 system up and running right now, but OS/8 itself
only keeps dates in that format. It has two additional bits stored at
another location, which tells how the year is to be interpreted. I would
suspect that TECO8 just sets the 13th bit if the two "century" bits in
OS/8 is non-zero.
So, years higher than 1977 are actually encoded as 4096+((year-1970) mod
8). Which, incidentally, is also exactly what the documentation you
quote is saying... :-)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol