1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-20 17:58:40 +00:00

Y2K fix for DECUUO's TIME emulation.

Use RQDATE instead of .RDATE to get the full year.  The previous
version was presumably written in 1972, breaking 28 years later in
2000.  The updated version will stop working in 2052 due to TOPS-10
limiting the returned value to 15 bits.
This commit is contained in:
Lars Brinkhoff 2019-05-03 07:48:22 +02:00
parent 602b67d7b4
commit 416a55a143

View File

@ -5229,19 +5229,19 @@ THSJO1: .SUSET [.RUIND,,C]
JRST (B)
XDATE: MOVEI A,0
.RDATE B,
SYSCAL RQDATE,[2000,,B]
JRST UPUTAC
CAMN B,[-1]
JRST UPUTAC ;DATE NOT AVAILABLE
MOVE C,[440600,,B]
PUSHJ P,POOF ;YEAR
SUBI D,64. ;THIS PROGRAM WILL NOT WORK IN 28 YEARS
LDB D,[331100,,B] ;YEAR
SUBI D,64. ;THIS PROGRAM WILL NOT WORK IN 33 YEARS
MOVE A,D
IMULI A,12.
PUSHJ P,POOF ;MONTH
LDB D,[270400,,B] ;MONTH
SUBI D,1
ADD A,D
IMULI A,31.
PUSHJ P,POOF ;DAY
LDB D,[220500,,B] ;DAY
SUBI D,1
ADD A,D
XDATE1: PUSHJ P,UPUTAC