Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_1_19910112 - 7/ft3/monitor/stanford/ttysrv.dif
There is 1 other file named ttysrv.dif in the archive. Click here to see a list.

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 1



LINE 1, PAGE 1
1)	;[MACBETH.STANFORD.EDU]SRC:<7.FT2.MONITOR.STANFORD>TTYSRV.MAC.4, 30-Apr-88 17:06:26, Edit by A.ALDERSON
1)	; Move CTYTY out of IFE STANSW
1)	;[MACBETH.STANFORD.EDU]SRC:<7.FT2.MONITOR.STANFORD>TTYSRV.MAC.3, 30-Apr-88 16:30:37, Edit by A.ALDERSON
1)	; Fix broken comment in explanation of TDCALL macro
1)	;[MACBETH]SRC:<7.FT2.MONITOR.STANFORD>TTYSRV.MAC.2,  6-Apr-88 17:26:45, Edit by A.APPLEHACKS
1)	; FT7.2 Merge
1)	; UPD ID= 8666, RIP:<7.MONITOR>TTYSRV.MAC.16,  24-Feb-88 18:45:22 by RASPUZZI
LINE 1, PAGE 1
2)	;[SRI-NIC]SRC:<MONITOR>TTYSRV.MAC.2, 28-Nov-88 13:42:30, Edit by MKL
2)	; v7 merge
2)	;[SRI-NIC]XS:<SU-61SU>TTYSRV.MAC.2,  5-Dec-86 16:21:56, Edit by MKL
2)	;;SRC:<6-1-MONITOR>TTYSRV.MAC.7,  6-Jun-86 09:22:55, Edit by KNIGHT
2)	;; Jimmy the speed set/return code for 19200
2)	;;SRC:<6-1-MONITOR>TTYSRV.MAC.4, 21-Mar-86 10:09:22, Edit by KNIGHT
2)	;; If in DOGMENT mode (MO%AUG set in TTLOTS), translate bs to ^a
2)	;SIERRA::SRC:<6.1.MONITOR.STANFORD>TTYSRV.MAC.60,  2-Dec-86 18:01:47, Edit by GROSSMAN
2)	; Fix GTOCHR so that it releases TTY buffers when they become empty.
2)	;PS:<6-1-MONITOR>TTYSRV.MAC.58, 29-Nov-85 20:20:20, Edit by BILLW
2)	; Make SETOBF internal.
2)	;<6-1-MONITOR.FT6>TTYSRV.MAC.3, 12-Aug-85 18:13:31, Edit by WHP4
2)	;Stanford changes:
2)	; STTYP% sets page stop bit on video terminals as in earlier releases
2)	; More reasonable default TTY type for the CTY
2)	; EMACS efficiency mods - TT%WK0 bit and BLAST routine
2)	; Correctly handle binary mode CR's when data mode changes
2)	; Add TTLOTS variable to dynamic data for Stanford terminal status bits
2)	; TTIDLE offset in dynamic data for recording last TODCLK of input
2)	; Add STDDET bugchk to STADYN to catch losers who call it for a detached TTY
2)	; SOBE checks sendall buffer and makes a better attempt in returning a value
2)	; Paranoia code to make sure RELSAL only called once
2)	; TLINK% has "who is lunk" function
2)	; Better "[Link from USER, TTYn]" message
2)	; Backspace is part of all classes of characters like rubout
2)	; Support for backspace-rubout feature
2)	; TTCARX buginf to report DH11 lossage 
2)	; NTYCOF is no-op if line is detached
2)	
2)	; UPD ID= 8666, RIP:<7.MONITOR>TTYSRV.MAC.16,  24-Feb-88 18:45:22 by RASPUZZI

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 2



LINE 24, PAGE 1
1)	;[MACBETH.STANFORD.EDU]SRC:<7.FT1.MONITOR.STANFORD>TTYSRV.MAC.5, 16-Feb-88 07:14:27, Edit by A.ALDERSON
1)	; Add ";" to comment (lost in merge)
1)	;[MACBETH]SRC:<7.FT1.MONITOR.STANFORD>TTYSRV.MAC.2,  6-Feb-88 17:30:51, Edit by A.APPLEHACKS
1)	; FT7 Merge
1)	;
1)	;SIERRA::SRC:<6.1.MONITOR.STANFORD>TTYSRV.MAC.60,  2-Dec-86 18:01:47, Edit by GROSSMAN
1)	; Fix GTOCHR so that it releases TTY buffers when they become empty.
1)	;
1)	; UPD ID= 184, RIP:<7.MONITOR>TTYSRV.MAC.8,  21-Oct-87 17:25:58 by RASPUZZI
LINE 47, PAGE 1
2)	; UPD ID= 184, RIP:<7.MONITOR>TTYSRV.MAC.8,  21-Oct-87 17:25:58 by RASPUZZI


LINE 63, PAGE 1
1)	;------------------------- Autopatch Tape # 13 -------------------------
1)	;------------------------- Autopatch Tape # 12 -------------------------
1)	; *** Edit 7200 to TTYSRV.MAC by MELOHN on 18-Nov-85 (TCO 6.1.1560)
LINE 78, PAGE 1
2)	; *** Edit 7200 to TTYSRV.MAC by MELOHN on 18-Nov-85 (TCO 6.1.1560)


LINE 75, PAGE 1
1)	;PS:<6-1-MONITOR>TTYSRV.MAC.58, 29-Nov-85 20:20:20, Edit by BILLW
1)	; Make SETOBF internal.
1)	;<6-1-MONITOR.FT6>TTYSRV.MAC.3, 12-Aug-85 18:13:31, Edit by WHP4
1)	;Stanford changes:
1)	; Fix error return of ASGSHT in TTMSG% to not cause ILMNRF's (from CUCS)
1)	; ASGSHT doesn't assign short blocks for PNV's.  Avoids TTLOKB bughlts.
1)	; STTYP% sets page stop bit on video terminals as in earlier releases
1)	; More reasonable default TTY type for the CTY
1)	; EMACS efficiency mods - TT%WK0 bit and BLAST routine
1)	; Correctly handle binary mode CR's when data mode changes
1)	; Add TTLOTS variable to dynamic data for Stanford terminal status bits
1)	; TTIDLE offset in dynamic data for recording last TODCLK of input
1)	; Add STDDET bugchk to STADYN to catch losers who call it for a detached TTY
1)	; SOBE checks sendall buffer and makes a better attempt in returning a value
1)	; Make TTMSG require WHEEL or OPERATOR
1)	; Paranoia code to make sure RELSAL only called once
1)	; TLINK% has "who is lunk" function
1)	; Better "[Link from USER, TTYn]" message
1)	; Backspace is part of all classes of characters like rubout
1)	; Support for backspace-rubout feature
1)	; TTCARX buginf to report DH11 lossage 
1)	; NTYCOF is no-op if line is detached
1)	;SUMEX changes:
1)	; Initialize LOGDES terminal (in INICTY)
1)	;Pup changes:
1)	; Support for Pup network virtual terminals (PNV's)

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 3


1)	;
1)	; UPD ID= 2248, SNARK:<6.1.MONITOR>TTYSRV.MAC.62,  19-Jun-85 20:47:55 by MELOHN
LINE 88, PAGE 1
2)	; UPD ID= 2248, SNARK:<6.1.MONITOR>TTYSRV.MAC.62,  19-Jun-85 20:47:55 by MELOHN


LINE 11, PAGE 3
1)	IFN STANSW&PUPSW,<
1)		TRZ T1,200		;PN
1)	>;IFN STANSW&PUPSW
1)	IFN .-PARTBL-NLTYPS,<PRINTX %PARTBL SIZE DOES NOT AGREE WITH NLTYPS>
LINE 11, PAGE 3
2)	IFN .-PARTBL-NLTYPS,<PRINTX %PARTBL SIZE DOES NOT AGREE WITH NLTYPS>


LINE 24, PAGE 3
1)	IFN STANSW&PUPSW,<
1)		TTDDLN			;PN
1)	>;IFN STANSW&PUPSW
1)	IFN .-DDLTBL-NLTYPS,<PRINTX %DDLTBL SIZE DOES NOT AGREE WITH NLTYPS>
LINE 21, PAGE 3
2)	IFN .-DDLTBL-NLTYPS,<PRINTX %DDLTBL SIZE DOES NOT AGREE WITH NLTYPS>


LINE 40, PAGE 3
1)	IFN STANSW&PUPSW,<
1)		NW%PN			;PN
1)	>;IFN STANSW&PUPSW
1)	IFN .-LTYTAB-NLTYPS,<PRINTX %LTYTAB SIZE DOES NOT AGREE WITH NLTYPS>
LINE 34, PAGE 3
2)	IFN .-LTYTAB-NLTYPS,<PRINTX %LTYTAB SIZE DOES NOT AGREE WITH NLTYPS>


LINE 36, PAGE 5
1)	;default) is assembled in that literal location.  There is also a varient
1)	;(TDCALX), if the line type is already in an AC.
   {Skipped 1 page and 1 line}
1)	DEFINE TDCALL (DT,VECTOR,DEFLT)<
LINE 36, PAGE 5
2)	;default) is assembled in that literal location.  There is also a variant
2)	;(TDCALX) if the line type is already in an AC.
   {Skipped 1 page and 1 line}
2)	DEFINE TDCALL (DT,VECTOR,DEFLT)<

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 4



LINE 8, PAGE 6
1)	IFE STANSW&PUPSW,<
1)		CALL [..TDC1 (<VECTOR>,<FE,MC,PT,TV,CH,LH>,<DEFLT>) ](CX)
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		CALL [..TDC1 (<VECTOR>,<FE,MC,PT,TV,CH,LH,PN>,<DEFLT>) ](CX)
1)	>;IFN STANSW&PUPSW
1)	  >
LINE 8, PAGE 6
2)		CALL [..TDC1 (<VECTOR>,<FE,MC,PT,TV,CH,LH>,<DEFLT>) ](CX)
2)	  >


LINE 36, PAGE 6
1)	IFE STANSW&PUPSW,<
1)		CALL [..TDC1 (<VECTOR>,<FE,MC,PT,TV,CH,LH>,<DEFLT>) ](AC)
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		CALL [..TDC1 (<VECTOR>,<FE,MC,PT,TV,CH,LH,PN>,<DEFLT>) ](AC)
1)	>;IFN STANSW&PUPSW
1)	>
1)	
1)	^L	SUBTTL Once-Only Initialization
LINE 31, PAGE 6
2)		CALL [..TDC1 (<VECTOR>,<FE,MC,PT,TV,CH,LH>,<DEFLT>) ](AC)>
2)	
2)	
2)	^L	SUBTTL Once-Only Initialization


LINE 29, PAGE 8
1)	IFN STANSW&PUPSW,<
1)		MOVEI T3,TT.PNV		;T3/ CODE FOR PUP ETHERNET LINES
1)		HRLI T4,-NTTPNV		;SET UP PUPPAR WITH -NTTPNV,,FIRST PNV
1)		HRR T4,T2		;GET FIRST PNV
1)		MOVEM T4,PUPPAR		;STORE IT AWAY
1)		MOVEI T4,NTTPNV		;T4/ NUMBER OF PUP ETHERNET LINES
1)		CALL SETTYP
1)	>;IFN STANSW&PUPSW
1)	
1)	;INITIALIZE POINTERS TO TTBBUF
LINE 30, PAGE 8
2)	;INITIALIZE POINTERS TO TTBBUF

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 5



LINE 19, PAGE 10
1)	IFN STANSW&SUMXSW,<
1)		SUBI T2,NDLL-2		;COMPUTE LOGDES TERMINAL NUMBER
1)		MOVEM T2,LOGLNO
1)	;The number of FE lines (NTTFE) is the number of DH-11 lines plus NDLL
1)	;DL-11 lines.  NDLL is currently 5 and these lines are assigned as follows:
1)	;KLINIK, LOGDES, N/A, N/A, CTY.  Rather that waste a DH-11 port, we use one
1)	;the three unused DL-11 ports.
1)		CALL ASCTLG		;CALL COMMON ROUTINE
1)		SETONE TCJOB,(T1)	;NO JOB EVER OWNS THE LOGGING TTY
1)		MOVE T2,CTYLNO		;NOW SETUP CTY
1)		MOVE T3,CTYTYP		;RESTORE CTY LINE TYPE
1)	ASCTLG:	PUSH P,T2		;COMMON CODE TO SETUP CTY/LOGDES
1)	>;IFN STANSW&SUMXSW
1)		HRRZ T1,DDLTBL(T3)	; AND FULL LENGTH BLOCK
LINE 19, PAGE 10
2)		HRRZ T1,DDLTBL(T3)	; AND FULL LENGTH BLOCK


LINE 43, PAGE 10
1)	IFE STANSW&SUMXSW,<
1)		HRRZ T2,CTYLNO		;T2/ LINE NUMBER, T1/ ADDRESS OF BLOCK
1)	>;IFE STANSW&SUMXSW
1)	IFN STANSW&SUMXSW,<
1)		POP P,T2		;T2/ LINE NUMBER, T1/ ADDRESS OF BLOCK
1)	>;IFN STANSW&SUMXSW
1)		HLRZ T3,CTYLNO		;RECOVER LINE TYPE
LINE 30, PAGE 10
2)		HRRZ T2,CTYLNO		;T2/ LINE NUMBER, T1/ ADDRESS OF BLOCK
2)		HLRZ T3,CTYLNO		;RECOVER LINE TYPE


LINE 65, PAGE 10
1)		CALL TTSETL		;SET INITIAL VALUES IN DYNAMIC DATA
1)		SETONE TTPRM,(T1)	;DON'T DEALLOCATE THIS DYNAMIC DATA
LINE 47, PAGE 10
2)		SETONE TTPRM,(T1)	;DON'T DEALLOCATE THIS DYNAMIC DATA


LINE 4, PAGE 12
1)	IFN STANSW&SUMXSW,<
1)		CAMN T2,LOGLNO		; OR LOGTTY ASSIGN?
1)		 CAIA			;YES, DON'T SETUP OUTPUR BUFFER COUNTS
1)	>;IFN STANSW&SUMXSW
1)		CALL SETOBF		;NO, SET OUTPUT BUFFER COUNTS
LINE 4, PAGE 12
2)		CALL SETOBF		;NO, SET OUTPUT BUFFER COUNTS

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 6



LINE 23, PAGE 12
1)	IFN SUMXSW,<
1)		CAME T2,LOGLNO		;ASSIGNING LOGTTY OR
1)	>;IFN SUMXSW
1)		TXZ Q1,TT%ALK!TT%PGM	;YES - DISALLOW TALK LINKS AND PAGE MODE
LINE 19, PAGE 12
2)		CAMN T2,CTYLNO		;Assigning CTY?
2)		TXZ Q1,TT%ALK!TT%PGM	;YES - DISALLOW TALK LINKS AND PAGE MODE


LINE 18, PAGE 28
1)	TTYDEA::
1)	IFE STANSW&PUPSW,<
1)		TDCALL S,<<TV,TVTDET>>
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL S,<<TV,TVTDET>,<PN,PNVCLZ>>
1)	>;IFN STANSW&PUPSW
1)		NOP
LINE 18, PAGE 28
2)	TTYDEA::TDCALL S,<<TV,TVTDET>>
2)		NOP


LINE 17, PAGE 32
1)	IFN STANSW&PUPSW,<
1)		CAIE T1,TT.PNV		; PUP NVT?
1)	>;IFN STANSW&PUPSW
1)		CAIN T1,TT.TVT		; NVT?
LINE 17, PAGE 32
2)		CAIN T1,TT.TVT		; NVT?


LINE 17, PAGE 35
1)	IFN STANSW&PUPSW,<
1)		TDCALL D,<<PN,R>>,<RETSKP> ;WE SHOULDN'T GET HERE, BUT JUST IN CASE
1)		 JRST TTCBF9		;WE GO USE THE GOOD CODE
1)	>;IFN STANSW&PUPSW
1)		JE TTFLO,(T2),R		;DO NOTHING UNLESS FLUSHING OUTPUT
LINE 17, PAGE 35
2)		JE TTFLO,(T2),R		;DO NOTHING UNLESS FLUSHING OUTPUT

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 7



LINE 40, PAGE 35
1)	IFN STANSW&PUPSW,<
1)		TDCALL D,<<PN,RSKP>>	;PNVCOB WILL RELEASE OUTPUT BUFFER FOR PNV
1)	>;IFN STANSW&PUPSW
1)		CALL TTRLBF		;RELEASE BUFFERS
LINE 36, PAGE 35
2)		CALL TTRLBF		;RELEASE BUFFERS


LINE 47, PAGE 35
1)	IFE STANSW&PUPSW,<
1)		TDCALL D,<<TV,TVTCOB>>	;CLEAR NVT OUTPUT BUFFER (SEND SYNCH)
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL D,<<TV,TVTCOB>,<PN,PNVCOB>>
1)	>;IFN STANSW&PUPSW
1)		CALLRET CHKBKO		;PERHAPS FORK WAITING FOR OBUF EMPTY
LINE 40, PAGE 35
2)		TDCALL D,<<TV,TVTCOB>>	;CLEAR NVT OUTPUT BUFFER (SEND SYNCH)
2)		CALLRET CHKBKO		;PERHAPS FORK WAITING FOR OBUF EMPTY


LINE 21, PAGE 41
1)	IFE STANSW&PUPSW,<
1)		IFSKP. <RETSKP>		;NO, RETURN OK
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		IFSKP.
1)		  TDCALL D,<<PN,PNVDOB>> ;WAIT FOR TIMING MARK REPLY IF PUP NVT
1)		   RETSKP		;OUTPUT FINISHED, SKIP RETURN
1)		  RET			;MUST RETRY, SINGLE RETURN
1)		ENDIF.
1)	>;IFN STANSW&PUPSW
1)	
1)	;CHARACTERS ARE PRESENT. DISMISS UNTIL THEY ARE GONE
LINE 21, PAGE 41
2)		IFSKP. <RETSKP>		;NO, RETURN OK
2)	
2)	;CHARACTERS ARE PRESENT. DISMISS UNTIL THEY ARE GONE

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 8



LINE 20, PAGE 49
1)		GTOKM (.GOTBR,<B,C>,[RETBAD ()]) ;DO GETOK IF NECESSARY AND RETBAD IF ERROR
LINE 20, PAGE 49
2)	IFN NICSW,<
2)		PUSH P,B
2)		HRRZ B,C		;CHECK IF 19200
2)		CAIN B,^D19200		;?
2)		 HRRI C,^D134
2)		HLRZ B,C		;CHECK IF 19200
2)		CAIN B,^D19200		;?
2)		 HRLI C,^D134
2)		POP P,B
2)	>;IFN NICSW	
2)		GTOKM (.GOTBR,<B,C>,[RETBAD ()]) ;DO GETOK IF NECESSARY AND RETBAD IF ERROR


LINE 17, PAGE 50
1)	IFE STANSW&PUPSW,<
1)		TDCALL S,<<MC,RSKP>,<PT,RSKP>,<TV,RSKP>> ;SKIP IF SPEED NOT KNOWN
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL S,<<MC,RSKP>,<PT,RSKP>,<TV,RSKP>,<PN,RSKP>>
1)	>;IFN STANSW&PUPSW
1)		 SKIPA C,TTSPWD(B)	;GET SPEED SETTING
1)	TTRSP2:	SETO C,			;NO. ASSUME UNKNOWN
1)		UMOVEM C,C		;RETURN IT TO THE CALLER
LINE 17, PAGE 50
2)		TDCALL S,<<MC,RSKP>,<PT,RSKP>,<TV,RSKP>> ;SKIP IF SPEED NOT KNOWN
2)		 SKIPA C,TTSPWD(B)	;GET SPEED SETTING
2)	TTRSP2:	SETO C,			;NO. ASSUME UNKNOWN
2)	IFN NICSW,<
2)		PUSH P,B		;SAVE A TEMP
2)		HRRZ B,C		;IS IT 134?
2)		CAIN B,^D134		;?
2)		 HRRI C,^D19200		;YES, THEN REALLY 19200
2)		HLRZ B,C
2)		CAIN B,^D134		;?
2)		 HRLI C,^D19200		;YES, THEN REALLY 19200	
2)		POP P,B
2)	>;IFN NICSW
2)		UMOVEM C,C		;RETURN IT TO THE CALLER

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 9



LINE 35, PAGE 58
1)	IFE STANSW,<
1)		TDCALX T4,<<TV,TVRRH>,<LH,LHRRH>,<MC,MCRRH>,<CH,CHRRH>>,<JRST DEFRRH>
1)	>;IFE STANSW
1)	IFN STANSW,<
1)	IFN PUPSW,<
1)		TDCALX T4,<<TV,TVRRH>,<LH,LHRRH>,<MC,MCRRH>,<CH,CHRRH>,<PN,PNRRH>>,<JRST DEFRRH>
1)	>;IFN PUPSW
1)	>;IFN STANSW
1)		 RETBAD <>,<CALL NWTTDB>
LINE 35, PAGE 58
2)		TDCALX T4,<<TV,TVRRH>,<LH,LHRRH>,<MC,MCRRH>,<CH,CHRRH>>,<JRST DEFRRH>
2)		 RETBAD <>,<CALL NWTTDB>


LINE 3, PAGE 64
1)	;	   1=> don't honor XON/XOFF
1)	
1)	TTXSET::SKIPE T3		;WANT TO DO OUTPUT STOP?
LINE 3, PAGE 64
2)	;           1= don't honor XON/XOFF
2)	
2)	TTXSET::SKIPE T3		;WANT TO DO OUTPUT STOP?


LINE 37, PAGE 74
1)	IFE STANSW&PUPSW,<
1)	 	TDCALL S,<<FE,TTMSSN>,<MC,MCCKSA>,<TV,TVMSNT>,<CH,RSKP>,<LH,LTSALL>> ;SKIP TO SEND
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL S,<<FE,TTMSSN>,<MC,MCCKSA>,<TV,TVMSNT>,<CH,RSKP>,<LH,LTSALL>,<PN,PNVSND>>	;SKIP TO SEND
1)	>;IFN STANSW&PUPSW
1)		 JRST TTMS50		;SKIP THIS LINE
LINE 37, PAGE 74
2)		TDCALL S,<<FE,TTMSSN>,<MC,MCCKSA>,<TV,TVMSNT>,<CH,RSKP>,<LH,LTSALL>> ;SKIP TO SEND
2)		 JRST TTMS50		;SKIP THIS LINE


LINE 32, PAGE 75
1)	IFE STANSW&PUPSW,<
1)		  TDCALL S,<<FE,TTMSAL>,<MC,MCCKSA>,<PT,TTMSNO>,<TV,TVMSNT>,<CH,RSKP>,<LH,LTSALL>>;
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL S,<<FE,TTMSAL>,<MC,MCCKSA>,<PT,TTMSNO>,<TV,TVMSNT>,<CH,RSKP>,<LH,LTSALL>,<PN,PNVSND>>;
1)	>;IFN STANSW&PUPSW
1)		   JRST TTMS21		;DON'T DO THIS LINE. GO ON TO NEXT LINE
LINE 32, PAGE 75
2)		  TDCALL S,<<FE,TTMSAL>,<MC,MCCKSA>,<PT,TTMSNO>,<TV,TVMSNT>,<CH,RSKP>,<LH,LTSALL>>;
2)		   JRST TTMS21		;DON'T DO THIS LINE. GO ON TO NEXT LINE

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 10




LINE 13, PAGE 118
1)	TTHNGU::
1)	IFN STANSW&SUMXSW,<
1)		CAME T2,LOGLNO		;IS THIS THE LOGTTY OR
1)	>;IFN STANSW&SUMXSW
1)		CAMN 2,CTYLNO		;IS THIS THE CTY?
1)		RET			;YES. DON'T HANG IT UP
LINE 13, PAGE 118
2)	TTHNGU::CAMN 2,CTYLNO		;IS THIS THE CTY?
2)		RET			;YES. DON'T HANG IT UP


LINE 30, PAGE 118
1)	IFE STANSW&PUPSW,<
1)		TDCALL S,<<FE,TTHU2>,<MC,MCHNGU>,<TV,TVTDTS>,<CH,CTHNGU>,<LH,LTHNGU>>;
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL S,<<FE,TTHU2>,<MC,MCHNGU>,<TV,TVTDTS>,<CH,CTHNGU>,<LH,LTHNGU>,<PN,PNVCLX>>;
1)	>;IFN STANSW&PUPSW
1)		RET
LINE 26, PAGE 118
2)		TDCALL S,<<FE,TTHU2>,<MC,MCHNGU>,<TV,TVTDTS>,<CH,CTHNGU>,<LH,LTHNGU>>;
2)		RET


LINE 16, PAGE 140
1)	IFN STANSW&PUPSW,<
1)		TDCALL D,<<PN,PNVXOF>>,<RETSKP>	;SPECIAL XOFF FOR PUP
1)		 RET
1)	>;IFN STANSW&PUPSW
1)		MOVEI 1,TTOPFC		;PUT SPECIAL FUNCTION CODE IN OUTPUT
LINE 16, PAGE 140
2)		MOVEI 1,TTOPFC		;PUT SPECIAL FUNCTION CODE IN OUTPUT


LINE 19, PAGE 142
1)	IFN STANSW&PUPSW,<
1)	TCOU6A:				;COME HERE IF PUP BUFFER WAS FILLED BY SENDALL
1)	>;IFN STANSW&PUPSW
1)		CALL TCOUBF		;YES, BLOCK IF POSSIBLE
LINE 19, PAGE 142
2)		CALL TCOUBF		;YES, BLOCK IF POSSIBLE

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 11



LINE 16, PAGE 143
1)	IFN STANSW&PUPSW,<
1)		TDCALL D,<<PN,PNVDMP>>,<RETSKP> ;CAN WE START OUTPUT NOW?
1)		 RETSKP			;BUFFER DUMPED, GO TRY AGAIN
1)	>;IFN STANSW&PUPSW
1)		SETONE TTBKO,(T2)	;NOTE BLOCK FOR OUTPUT EVENT
LINE 16, PAGE 143
2)		SETONE TTBKO,(T2)	;NOTE BLOCK FOR OUTPUT EVENT


LINE 4, PAGE 144
1)	IFN STANSW&PUPSW,<
1)	CKPNOU:	STKVAR <LNPORT,LNCHAR,LNNUMB>
1)		MOVEM T3,LNCHAR		;SAVE CHARACTER
1)		MOVE T3,TTYPUP(T2)	;GET CONNECTION INFORMATION
1)		MOVEM T3,LNPORT		;SAVE IT
1)		DYNST T3		;GET LINE NUMBER
1)		MOVEM T3,LNNUMB		;SAVE LINE NUMBER
1)		CALL ULKTTY		;UNLOCK THE TTY
1)		HDISMS(^D300)		;BLOCK, STAY IN BALANCE SET
1)		MOVE T2,LNNUMB		;GET STATIC LINE NUMBER
1)		CALL LCKTTY		;LOCK UP THE TTY
1)		IFNSK.
1)		  CALL ULKTTY		;UNLOCK THE LINE JUST IN CASE
1)	          MOVE T2,LNNUMB	;GET BACK LINE NUMBER
1)	          CALL TCOU7		;GET SPECIAL MESSAGE BLOCK
1)		  HLLOM TTDEV(T2)	;INDICATE ABANDONED FOR PUP CODE
1)		  MOVE T1,LNCHAR	;RESTORE CHARACTER
1)		  MOVE T3,LNPORT	;?? IS THIS NECESSARY ?? - MRC
1)		  RET			;OUTPUT NOT POSSIBLE
1)		ENDIF.
1)		MOVE T1,LNCHAR		;RESTORE CHARACTER
1)		HRRZ T3,LNPORT		;GET OLD PORT NUMBER
1)		HRRZ T4,TTYPUP(T2)	;GET PORT NUMBER OF CURRENT CONNECTION
1)		CAIE T4,(T3)		;SAME CONNECTION?
1)		 RET			;NO, OUTPUT NOT POSSIBLE
1)		RETSKP
1)	
1)		ENDSV.
1)	
1)	;HERE FROM THE PUP SERVICE TO BLOCK.
1)	; T1/ SCHEDULER TEST
1)	; T2/ DYNAMIC DATA POINTER
1)	; T3/ CHARACTER
1)	
1)	TCOU5A:	CALL CKPNOU		;SEE IF OUTPUT POSSIBLE, RETURN CHAR IN T1
1)		 RET
1)	>;IFN STANSW&PUPSW
1)	

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 12


1)	TCOU5:	TDCALL D,<<PT,CKPTOU>,<MC,CKMCOU>,<LH,LTTCOU>>,RETSKP ;SEE IF OUTPUT POSSIBLE
LINE 4, PAGE 144
2)	TCOU5:	TDCALL D,<<PT,CKPTOU>,<MC,CKMCOU>,<LH,LTTCOU>>,RETSKP ;SEE IF OUTPUT POSSIBLE


LINE 54, PAGE 144
1)	IFN STANSW&PUPSW,<
1)		LOAD T3,TLTYP,(T2)	;GET LINE TYPE
1)		CAIE T3,TT.PNV		;PUP NVT?
1)		IFSKP.
1)		  SKIPN INSKED		;ARE WE IN THE SCHEDULER?
1)		  IFSKP.
1)		    OKSKED		;YES, MATCH THE NOSKED ABOVE
1)		    SETOM TCOERR	;SET OUTPUT ERROR FLAG
1)		    RET			;RETURN TO CALLER
1)		  ENDIF.
1)		  PUSH P,T1		;SAVE BYTE
1)		  CHNOFF DLSCHN		;NO TTY SCANNING, PNVBUF SETS UP TTOIN/TTOOUT
1)		  CALL PNVBUF		;GET A PNV BUFFER, BYTE POINTER IN T3
1)		  IFNSK.
1)		    POP P,T3		;RESTORE BYTE INTO T3
1)		    CHNON DLSCHN	;REALLOW TTY SCANNING
1)		    OKSKED		;REALLOW SCHEDULING
1)		    SKIPN NSKED		;NO. ARE WE NOSKED?
1)		     JUMPN T1,TCOU5A	;JUMP IF WE HAVE A BONA FIDE SCHEDULER TEST
1)		    SETOM TCOERR	;YES. INDICATE ERROR FOR SCHEDULER
1)		    RET			;AND RETURN TO CALLER
1)		  ENDIF.
1)		  TMNN <TTHPO,TTSAL>,(T2) ;SENDALL OUTPUT WAITING?
1)		  IFSKP.
1)		    CALL PNVSAL		;LOAD SENDALL INTO BUFFER
1)		    CHNON DLSCHN	;BUFFER FULL, REALLOW TTY SCANNING
1)		    MOVE T3,TTOCT(T2)	;GET BYTE COUNT FOR STRTOU
1)		    CALL STRTOU		;START OUTPUT ON THIS LINE, GO OKSKED
1)		    POP P,T1		;RESTORE CHARACTER
1)		    JRST TCOU6A		;GO BLOCK FOR OUTPUT TO FINISH
1)		  ENDIF.
1)		  POP P,T1		;RESTORE CHARACTER
1)		  JRST TCOU4		;CONTINUE WITH OUTPUT CODE
1)		ENDIF.
1)	>;IFN STANSW&PUPSW
1)		LOAD 3,TTNOU,(2)	;GET NUMBER TO ASSIGN
LINE 16, PAGE 144
2)		LOAD 3,TTNOU,(2)	;GET NUMBER TO ASSIGN

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 13



LINE 19, PAGE 157
1)	IFE STANSW&PUPSW,<
1)		TDCALL D,<<PT,TCIPTY>,<TV,TVTIGA>,<CH,CTHTCI>>
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL D,<<PT,TCIPTY>,<TV,TVTIGA>,<CH,CTHTCI>,<PN,PNVIBE>>
1)	>;IFN STANSW&PUPSW
1)		SETZRO TTWFG,(T2)	;CLEAR WAIT RESTARTED FLAG
LINE 19, PAGE 157
2)		TDCALL D,<<PT,TCIPTY>,<TV,TVTIGA>,<CH,CTHTCI>>
2)		SETZRO TTWFG,(T2)	;CLEAR WAIT RESTARTED FLAG


LINE 13, PAGE 160
1)		  TXNE T1,MO%BSP	;BACKSPACE STAYS AS ITSELF?
1)		   SKIPA T1,[.CHBSP]	;SET = YES.
1)		    MOVEI T1,.CHDEL	;CLEAR = NO.  TRANSLATE TO RUBOUT
1)		  RET
LINE 13, PAGE 160
2)	IFE NICSW,<	  
2)		  TXNE T1,MO%BSP	;BACKSPACE STAYS AS ITSELF?
2)		   SKIPA T1,[.CHBSP]	;SET = YES.
2)		    MOVEI T1,.CHDEL	;CLEAR = NO.  TRANSLATE TO RUBOUT
2)	>;IFE NICSW
2)	IFN NICSW,<
2)		  IFXN. T1,MO%BSP	;BACKSPACE STAYS AS ITSELF?
2)		    MOVEI T1,[.CHBSP]	;SET = YES.
2)		  ELSE.
2)		    IFXN. T1,MO%AUG	;DOGMENT MODE?
2)		      MOVEI T1,.CHCNA	;YES, THEN TRANSLATE TO CTRL-A
2)		    ELSE.
2)		      MOVEI T1,.CHDEL	;CLEAR = NO.  TRANSLATE TO RUBOUT
2)		    ENDIF.
2)		  ENDIF.
2)	>;IFN NICSW
2)		  RET


LINE 25, PAGE 170
1)	IFN STANSW&PUPSW,<
1)		JN TTPDT,(C),R		;NO PSI INTERRUPT IF USER-INVOKED DETACH
1)	>;IFN STANSW&PUPSW
1)		MOVE B,C		;YES. B/ADDRESS OF DYNAMIC DATA
LINE 25, PAGE 170
2)		MOVE B,C		;YES. B/ADDRESS OF DYNAMIC DATA

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 14



LINE 45, PAGE 172
1)	TTHU0:	
1)	IFE STANSW&PUPSW,<
1)		TDCALL S,<<FE,TTHU2>,<TV,TVTDTS>>
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL S,<<FE,TTHU2>,<TV,TVTDTS>,<PN,PNVCLX>>
1)	>;IFN STANSW&PUPSW
1)		RET
LINE 45, PAGE 172
2)	TTHU0:	TDCALL S,<<FE,TTHU2>,<TV,TVTDTS>>
2)		RET


LINE 23, PAGE 178
1)	TTXFP1:
1)	IFN STANSW&PUPSW,<	
1)		TDCALL D,<<PN,PNVXOF>>	;DO SPECIAL PNV XOFF ROUTINE
1)	>;IFN STANSW&PUPSW
1)		SETONE TTSFG,(T2)	;PAUSE
1)		RETSKP
LINE 23, PAGE 178
2)	TTXFP1:	SETONE TTSFG,(T2)	;PAUSE
2)		RETSKP


LINE 24, PAGE 189
1)	IFE STANSW&PUPSW,<
1)		TDCALL S,<<FE,RSKP>,<PT,TTC7S2>,<TV,TTC7SN>,<MC,TTC7MC>,<CH,TTC7MC>,<LH,TTC7LT>>;
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL S,<<FE,RSKP>,<PT,TTC7S2>,<TV,TTC7SN>,<MC,TTC7MC>,<CH,TTC7MC>,<LH,TTC7LT>,<PN,TTCPNL>>;	 
1)	>;IFN STANSW&PUPSW
1)		 JRST [	JUMPL T1,TTC7SK	;IF NEG, GO START A JOB
LINE 24, PAGE 189
2)		TDCALL S,<<FE,RSKP>,<PT,TTC7S2>,<TV,TTC7SN>,<MC,TTC7MC>,<CH,TTC7MC>,<LH,TTC7LT>>;
2)		 JRST [	JUMPL T1,TTC7SK	;IF NEG, GO START A JOB


LINE 13, PAGE 198
1)	IFE STANSW&PUPSW,<
1)		TDCALL D,<<PT,STRTO2>,<MC,MCSTRO>,<TV,TVTCSO>,<LH,LTSTRO>,<CH,CTHSTO>>
1)	>;IFE STANSW&PUPSW
1)	IFN STANSW&PUPSW,<
1)		TDCALL D,<<PT,STRTO2>,<MC,MCSTRO>,<TV,TVTCSO>,<LH,LTSTRO>,<CH,CTHSTO>,<PN,PNVSOU>>
1)	>;IFN STANSW&PUPSW
1)		 TRNA			;NORMAL START
LINE 13, PAGE 198
2)		TDCALL D,<<PT,STRTO2>,<MC,MCSTRO>,<TV,TVTCSO>,<LH,LTSTRO>,<CH,CTHSTO>>

; TTYSRV.MAC.1 & <MONITOR>TTYSRV.MAC.3 24-Feb-89 1916	PAGE 15


2)		 TRNA			;NORMAL START


LINE 29, PAGE 205
1)	IFN STANSW&SUMXSW,<
1)		CAMN B,LOGLNO		; OR THE LOGTTY?
1)		 CAIA			;CTY OR LOGTTY, DON'T DETACH
1)	>;IFN STANSW&SUMXSW
1)		CALL TTJBDT		;DETACH THE JOB
LINE 29, PAGE 205
2)		CALL TTJBDT		;DETACH THE JOB