.TITLE GTIM Network Get/Set system time .IDENT /900411/ ; ; Copyright 1990 (c) G. Michaels Consulting Ltd. ; Edmonton, Alberta, CANADA ; ; This software is the property of G. Michaels Consulting Ltd. ; and may be used and copied freely provided this notice is ; included. ; ; G. Michaels Consulting Ltd. does not warrant that this ; software may be useful for any particular purpose. Users of ; this software do so at their own risk. G. Michaels Consulting ; Ltd. will bear no responsibility for the results of running ; this software. ; ; Description: ; ; Get the time from the master clock node MCLOCK and set the system ; clock. ; ; Modification Log: ; ; Name Date Change Description ; ; R Brown 900411 New. .PAGE ; From RSXMAC.SML .MCALL DIR$,EXST$S,STIM$C ; From NETLIB.MLB .MCALL CLSW$,CONB$$,CONW$,OPNW$ NETLUN =: 1 LNKLUN =: 2 .PSECT M$DATA,RW,D ESTAT: .WORD EX$SEV IOSB: .BLKW 2 OPNNT: OPNW$ NETLUN,,IOSB,,<1,0> CLSNT: CLSW$ NETLUN,,IOSB CONBL: CONB$$ MCLOCK,0,1, CONBLN =: . - CONBL CONNT: CONW$ LNKLUN,1,IOSB,, TIMBLK: .BLKW 8. .PAGE .PSECT M$CODE,RO,I GTIM: DIR$ #OPNNT ; Open the network BCS EXIT ; Exit if failure CMPB #IS.SUC,IOSB BNE EXIT ; Exit if not success DIR$ #CONNT ; Connect and get time BCS EXIT ; Exit if failure CMPB #IE.URJ,IOSB ; Should have been rejected by BNE EXIT0 ; remote task STIM$C TIMBLK,,M$CODE ; Set the clock BCS EXIT0 ; Exit if failure MOV #EX$SUC,ESTAT ; Flag success EXIT0: DIR$ #CLSNT ; For completeness, close net EXIT: EXST$S ESTAT ; Exit with status .END GTIM