Author: Robert Sample
Posted: Wed Sep 07, 2016 7:35 pm (GMT 5.5)
2-s complement arithmetic has no bearing on the TOD clock. OA48941 shows this, saying in part:
If 2-s complement arithmetic were being used, CFFFFFFF FFFFFFFF would NOT roll over to D0000000 00000000.
From the POP manual, page 4-41:
and page 4-43:
I've written a COBOL TOD translator, and your D14F0580 A6DE7000 represents September 7, 2016 at 12:33:19.628736 AM (which probably does not include the GMT offset
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth
Posted: Wed Sep 07, 2016 7:35 pm (GMT 5.5)
2-s complement arithmetic has no bearing on the TOD clock. OA48941 shows this, saying in part:
Quote: |
In the reported problem, iconv() calls the Unicode Services, conversion information service, CUNLINFO or CUN4LINF, during a character conversion and receives RC8 RSNB when the create time of the UCCB time is D0000000 0000000 or greater. An identical request does not fail when the time is CFFFFFFF FFFFFFFF (12/15/2015 13:24:57.238527) or less. |
From the POP manual, page 4-41:
Quote: |
Time-of-Day Clock The time-of-day (TOD) clock provides a high-resolution measure of real time suitable for the indication of date and time of day. The cycle of the clock is approxi- mately 143 years. A single TOD clock is shared by all CPUs in the configuration. Format The TOD clock is a 104-bit register. It is a binary counter with the format shown in the following illustration. The TOD clock nominally is incremented by adding a one in bit position 51 every microsecond. In models having a higher or lower resolution, a different bit position is incremented at such a frequency that the rate of advancing the clock is the same as if a one were added in bit position 51 every microsecond. The resolution of the TOD clock is such that the incrementing rate is comparable to the instruction execution rate of the model. When incrementing of the clock causes a carry to be propagated out of bit position 0, the carry is ignored, and counting continues from zero. The program is not alerted, and no interruption condition is generated as a result of the overflow. |
Quote: |
Setting the clock replaces the values in all bit posi- tions from bit position 0 through the rightmost posi- tion that is incremented when the clock is running. However, on some models, the rightmost bits starting at or to the right of bit 52 of the specified value are ignored, and zeros are placed in the corresponding positions of the clock. Zeros are also placed in posi- tions to the right of bit position 63 of the clock. |
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth