.MCALL .MODULE .MODULE RESTRM,VERSION=04,COMMENT=,IDENT=NO ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. ; Edit History: ; 001 George Stevens Overlaid version of RESORC. Created from RESORC ; Version 97 ; ; 002 Megan Gentry Added support for reporting DH line information ; Version 98 ; ; (003) 10-Sep-90 MBG Added support for reporting terminal lines owned ; by handlers. ; ; (004) 21-Jun-91 MBG Fixed trap to 4 problem in reporting DH info ; .NLIST .INCLUDE /SRC:RESPFX.MAC/ .LIST .SBTTL TTSHOW - List terminal characteristics ;+ ; This routine list terminal characteristics if running on a multi-terminal ; monitor. ;- ORIGIN RESTRM .ENABL LSB TTSHOW::.SAVRG ;Save non-volatile registers .PRINT #CRLF ;Print a BIT #SY.MTT,$SYSGN(R5) ;Got a multi-terminal monitor? BNE 10$ ;Branch if so PRINT NMT, JMP 290$ ;Else return 10$: CLR TCBHFG ;Reset the TCB Hook flag MOV #BUFF,R4 ;Point to buffer CLR @#4+AREA ;Clear out emt block offset .MTSTAT #AREA,R4 ;Get # of terminals CMP (R4)+,(R4)+ ;Point to # of tcbs MOV @R4,TCBMAX ;Fill it in .PRINT #TTHED ;Print the header CLR R4 ;Use R4 as the unit counter 20$: FORMAT #BUFFER,< [D2] >, ; MOV R0,R3 ;Save the buffer pointer MOV #MTSTAT,R2 ;Point to the status save words MOV R0,-(SP) ;Save R0 .MTGET #AREA,R2,R4 ;Get the terminal status BCC 30$ ;Branch on no error CMPB #MT.ERA,@#$EMTER ;Is it attached to another job? BEQ 40$ ;Branch if so CMPB @#$EMTER,#ER.ATH ;Terminal attached by handler? BEQ 22$ ;Yes... MOV #BLNK,R1 ;DEFAULT CMPB #MT.ERU,@#$EMTER ;Unattached terminal? BEQ 60$ ;If eq yes MOV (SP)+,R0 ;Restore R0 JMP 280$ ;Else assume that unit not configured 22$: MOV #ASCVRT,R1 ;R1 -> Conversion buffer CALL $R50AS ;Convert Rad50 to ASCII MOV (SP)+,R0 ;Restore R0 MOV #ASCVRT,R1 ;R1 -> Conversion buffer FORMAT R3,<[S]* >, MOV #-1,TCBHFG ;Indicate a TCB is hooked BR 65$ 30$: CLR R0 ;FOR SJ SAY MUST BE OWNED BY BACK 40$: BIT #SY.SJB,$SYSGN(R5) ;System jobbing? BNE 50$ ;If ne yes MOV #RESRC,R1 ;Say background TST R0 ;Foreground? BEQ 60$ ;If eq no MOV #FORE,R1 ;Say foreground BR 60$ ;Merge 50$: MOV R0,R1 ;R1=JOB# ;SD .GTJB #AREA,#BUFF,R1 ;Get info on owner ;SD MOV #BUFF+22,R1 ;Point to name ;SD 60$: MOV (SP)+,R0 ;Restore R0 ;SD FORMAT R3,<[S]>, ;SD 65$: MOV R0,R3 ;FIX R3 ;SD 70$: TSTB -(R3) ;NULL BYTE? ;SD BNE 80$ ;IF NE NO ;SD MOVB #BLANK,@R3 ;MAKE IT A BLANK ;SD BR 70$ ;CONTINUE ;SD 80$: MOV R0,R3 ;RESTORE ;SD BR 90$ ;Merge ;SD 90$: BITB #MS.SHR,$MTSTA(R2) ;Is it a shared console? BEQ 100$ ;Branch if not FORMAT R3,< S-Console> ;Say so BR 130$ ; and continue 100$: BITB #MS.CNS,$MTSTA(R2) ;Is it a console? BEQ 110$ ;Branch if not FORMAT R3,< Console > BR 130$ 110$: BIT #MT.REM,@R2 ;Is it remote? BEQ 120$ ;Branch if not FORMAT R3,< Remote > BR 130$ 120$: FORMAT R3,< Local > ;Say that it's local 130$: MOVB $MTSTA(R2),R1 ;R1 = Status word BICB #^C,R1 ;Strip to line type bits BNE 132$ ;Line is DZ or DH... FORMAT ,< DL > ;Line is a DL... BR 150$ 132$: BITB #MS.DZ,R1 ;Is line a DZ? BEQ 134$ ;Nope... FORMAT ,< DZ > ;Yes... BR 150$ 134$: BITB #MS.DH,R1 ;Is line a DH? BEQ 136$ ;Nope... FORMAT ,< DH > ;Yes... BR 150$ 136$: FORMAT ,< unk > ;Line type is unknown 150$: CLR R1 ;We verily dislike extensions of signs BISB $MTWID(R2),R1 ;Get the width FORMAT ,<[D3] >, ; and print it BIT #MT.TAB,@R2 ;Does it have hardware tabs? BEQ 160$ ;Branch if not FORMAT , BR 170$ 160$: FORMAT , 170$: BIT #MT.CRL,@R2 ;Print at end of line? BEQ 180$ ;Branch if not FORMAT , BR 190$ 180$: FORMAT , 190$: BIT #MT.FRM,@R2 ;Hardware formfeeds? BEQ 200$ ;Branch if not FORMAT , BR 210$ 200$: FORMAT , 210$: BIT #MT.BKS,@R2 ;Scope? BEQ 220$ ;Branch if not FORMAT , BR 230$ 220$: FORMAT , 230$: BITB #,$MTSTA(R2) ;Is line a DZ or DH? BNE 240$ ;Yes... FORMAT ,< N/A> ;Must be DL, speed not applicable BR 270$ ;Go print the line 240$: MOV @R2,R1 ;Get the configuration word BIC #^C,R1 ;Clear all but the line speed BITB #,$MTSTA(R2) ;Is it a DH line? BEQ 250$ ;Nope...no skewing to take place CMP R1,#5400 ;DZ 3600 baud code? BNE 250$ ;Nope... MOV #7400,R1 ;Yes, then it's really 38.4kb on DH 250$: SWAB R1 ;Put it in the low order ASL R1 ;Make it a word offset ADD #BAUD,R1 ;Get pointer to an ASCIZ string BITB #,$MTSTA(R2) ;Is it a DH line? BNE 260$ ;Yes, don't limit check CMP @R1,#B9600 ;Is it valid for DZ line? BHI 270$ ;Nope... 260$: FORMAT ,<[Z]>,<@R1> ;Put the string in the buffer 270$: .PRINT #BUFFER ;Print the line 280$: INC R4 ;Bump the unit counter CMP R4,TCBMAX ;Have we done them all? BHI 285$ ;Branch if so JMP 20$ ;Else go do another one 285$: TST TCBHFG ;Is the TCB Hooked flag set? BEQ 290$ ;Nope... .PRINT #MTYHK ;Indicate handler hooks are in use 290$: RETURN .DSABL LSB .END