On 2012-07-12 12:11, Rick Murphy <rick at rickmurphy.net> wrote:
At 12:12 PM 7/11/2012, Richard wrote:
>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)?
>...
>Can anyone with RT-11 or OS/8 and TECO v40 verify what is described above?
As
already mentioned, this is consistent with OS/8 date code - 3 bits
of year and two of extension.
You can't enter dates later than 1999:
.DATE 31-DEC-99
.DATE
Friday December 31, 1999
.DATE 1-JAN-00
BAD DATE
.DATE 1-JAN-2000
BAD DATE
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 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.
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...
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