mirror of
https://github.com/PDP-10/its.git
synced 2026-01-21 02:08:50 +00:00
Fix bug in programs when system time not set.
- DATE - DATSRV - TIME
This commit is contained in:
parent
dc666df443
commit
07b9e0f539
@ -74,6 +74,11 @@ START: MOVE P,[-40,,PDL]
|
||||
|
||||
; gather ye rosebuds
|
||||
GATHER: .RDATI RTIME,
|
||||
CAMN RTIME,[-1]
|
||||
.VALUE [ASCIZ /:
|
||||
System time not set. Run PDSET.
|
||||
|
||||
:KILL
/]
|
||||
.RLPDT PDTIM, ; also RYEAR into RYEAR
|
||||
TLNE RYEAR,400000 ; if not leap year, after 2/28, back up a day
|
||||
SUBI PDTIM,SPD
|
||||
@ -40,6 +40,11 @@ GO: .OPEN TTY,.+1
|
||||
1,,'TTY
|
||||
PTTY [SIXBIT / @/]
|
||||
.RDATE T,
|
||||
CAMN T,[-1]
|
||||
.VALUE [ASCIZ /:
|
||||
System time not set. Run PDSET.
|
||||
|
||||
:KILL
/]
|
||||
LDB A,[360400,,T] ; First digit of year
|
||||
IMULI A,10.
|
||||
LDB B,[300400,,T] ; Second digit of year
|
||||
@ -134,4 +139,4 @@ CONSTANTS
|
||||
|
||||
ASAV: 0
|
||||
|
||||
END GO
|
||||
END GO
|
||||
@ -69,6 +69,10 @@ RETRY: MOVEI A,10.
|
||||
CAIG B,
|
||||
JSR AUTPSY ; Timed out...
|
||||
SERVE: .RDATE DATE,
|
||||
CAMN DATE,[-1]
|
||||
JRST [ SEND [SIXBIT /TIME @/]
|
||||
SEND [SIXBIT /UNSET@/]
|
||||
JRST CRLF ]
|
||||
LDB A,[360400,,DATE] ; First digit of year
|
||||
IMULI A,10.
|
||||
LDB B,[300400,,DATE] ; Second digit of year
|
||||
@ -111,7 +115,7 @@ CAL2: ADDI A,5 ; Century starts on a Saturday
|
||||
AND B,DATE
|
||||
TLO B,'@
|
||||
SEND B
|
||||
.IOT NETO,[15] ; CR
|
||||
CRLF: .IOT NETO,[15] ; CR
|
||||
.IOT NETO,[12] ; LF
|
||||
.NETS NETO, ; Force the output.
|
||||
.CLOSE NETO, ; Disconnect.
|
||||
Loading…
x
Reference in New Issue
Block a user