.TITLE DTIME, DELTA TIME CONV ; ; This routine takes a value from the logical name table ; TIMS$DEL which represents a delta time, and returns ; in the process logical name table the name TIMS$ABS, ; in system ASCII time format (24 bytes). ; NAME: .ASCID /TIMS$DEL/ LNAM: .ASCID /TIMS$ABS/ DLEN: .BLKW 1 DVALD: .LONG ^X010E000A .LONG DVAL DVAL: .BLKB 10 INTVAL: .BLKL 1 DESC: .LONG ^X010E0000 .BLKL 1 QINC: .BLKQ 1 QTIM: .BLKQ 1 TIML: .BLKL 1 TIMBD: .LONG ^X010E0018 .LONG TIMB TIMB: .BLKB 24 BLNK: .BYTE ^X20 COL: .BYTE ^A/:/ START: .WORD 0 $TRNLOG_S LOGNAM=NAME,- RSLLEN=DLEN,- RSLBUF=DVALD MOVAL DVAL,DESC+4 MOVW DLEN,DESC PUSHAL INTVAL PUSHAL DESC CALLS #2, FOR$CNV_IN_I NUM_CONV: BSBW ERROR1 EMUL INTVAL,#10000000*60, #0, QINC $GETTIM_S QTIM ADDL2 QINC, QTIM ADWC QINC+4, QTIM+4 ADD_COMP: $ASCTIM_S TIMLEN=TIML,- TIMBUF=TIMBD,- TIMADR=QTIM,- CVTFLG=#0 LOCC BLNK,#2,TIMB+10 MOVB COL,(R1) $CRELOG_S TBLFLG=#1,- ;group LOGNAM=LNAM,- EQLNAM=TIMBD BSBW ERROR2 RET .SUBTITLE ERROR_HANDLING .SAVE_PSECT .PSECT ERRORS MLEN: .BLKL 1 MADD: .LONG ^X010E0100 .LONG MAD MAD: .BLKB 256 ; ERROR1:: ERROR2:: CMPL R0,#SS$_NORMAL BNEQU ISERROR RSB ISERROR: $GETMSG_S MSGID=R0,- MSGLEN=MLEN,- BUFADR=MADD MOVW MLEN, MADD PUSHAL MADD CALLS #1, SPGPRINT RSB .RESTORE_PSECT .SUBTITLE PRINT DESCRIPTOR STRING .SAVE_PSECT .PSECT SPGPRINT FIRST_TIME: .BYTE 0 TTNAME: .ASCID /SYS$OUTPUT/ TTCHAN: .BLKL 1 ;PLACE TO PUT CHANNEL NUMBER DEVDESC: NLEN: .LONG 63 NADDR: .LONG TTYNAME TTYNAME: .BLKB 63 SPGPRINT:: .WORD ^M CMPB FIRST_TIME, #1 BEQLU NFT RET MOVB #1, FIRST_TIME BSBW INIT MOVL R5,R0 BEQLU NFT NFT: MOVL 4(AP), R1 MOVL 4(R1), R2 MOVZWL (R1), R3 $QIOW_S FUNC=#IO$_WRITEVBLK,- CHAN=TTCHAN,- P1=(R2),- P2=R3 RET INIT: $TRNLOG_S LOGNAM=TTNAME,- RSLLEN=NLEN,- RSLBUF=DEVDESC ;TRANSLATE NAME OF SYS$INPUT TO GET ;NAME OF TTY IN TTYNAME ;NAME PROBABLY BEGINS WITH 4 CHARACTERS ;THROWN IN BY THE SYSTEM TO CONFUSE ;THE ISSUE CMPB TTYNAME,#^X1B ;CHECK FOR THEM BNEQ DO_ASSIGN ;THEY ARE THERE ;DO WORK REQUIRED TO IGNORE THEM SUBL #4,NLEN ADDL #4,NADDR DO_ASSIGN: ;ASSIGN CHANNEL FOR TTY $ASSIGN_S DEVNAM=DEVDESC,- CHAN=TTCHAN MOVL R0,R5 RSB .RESTORE_PSECT .END START