TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      54  TTY$LOCK - SETUP IPL AND REGISTERS

   (3)      87  TTY$SETUP_UCB - SETUP TERMINAL UCB

   (4)     123  TTY$CANCELIO - CANCEL I/O ON TERMINAL

   (5)     193  TTY$BEG_BRDCST - BEGIN BROADCAST OPERATION ON U

   (6)     232  TTY$CRE_FORK - FORK FOR UNSOLICITED DATA MESSAG

   (7)     322  TTY$PURGE_AHEAD - PURGE TYPEAHEAD BUFFER 

   (8)     350  TTY$RESTARTIO - RESTART CURRENT I/O

   (9)     384  ATTENTION - UNIT TIMEOUT, POWERFAIL ATTENTION R

   (10)    415  TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   1

V06                                                                                                                              (1)



                                     0000     1 	.TITLE	TTYSUB - TERMINAL DRIVER SUBROUTINES

                                     0000     2 	.IDENT	/V06/

                                     0000     3 ;

                                     0000     4 ; COPYRIGHT (C) 1978

                                     0000     5 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000     6 ;

                                     0000     7 ; THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

                                     0000     8 ; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

                                     0000     9 ; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

                                     0000    10 ; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

                                     0000    11 ; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

                                     0000    12 ; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

                                     0000    13 ; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

                                     0000    14 ;

                                     0000    15 ; THE INFORMATION IN THIS SOFTWARE  IS  SUBJECT TO CHANGE WITHOUT

                                     0000    16 ; NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

                                     0000    17 ; EQUIPMENT CORPORATION.

                                     0000    18 ;

                                     0000    19 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

                                     0000    20 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    21 ;

                                     0000    22 ;++

                                     0000    23 ;

                                     0000    24 ; FACILITY:

                                     0000    25 ;

                                     0000    26 ;	VAX/VMS TERMINAL DRIVER

                                     0000    27 ;

                                     0000    28 ; ABSTRACT:

                                     0000    29 ;

                                     0000    30 ;	THIS MODULE CONTAINS ROUTINES COMMON TO ALL TERMINAL DRIVER FUNCTIONS.

                                     0000    31 ;

                                     0000    32 ; AUTHOR:

                                     0000    33 ;

                                     0000    34 ;	R.HEINEN  11-AUG-1976

                                     0000    35 ;--

                                     0000    36 ;

                                     0000    37 ; EXTERNAL SYMBOLS

                                     0000    38 ;

                                     0000    39 	$CRBDEF				; DEFINE CRB

                                     0000    40 	$DYNDEF				; DEFINE DYNAMIC REGION TYPES

                                     0000    41 	$IPLDEF				; DEFINE IPL'S

                                     0000    42 	$IRPDEF				; DEFINE IRP

                                     0000    43 	$MSGDEF				; DEFINE MESSAGE TYPES

                                     0000    44 	$PCBDEF				; DEFINE PCB

                                     0000    45 	$UCBDEF				; DEFINE UCB

                                     0000    46 	$TTDEF				; DEFINE TERMINAL CHARACTERISTICS

                                     0000    47 	$TTYDEF				; DEFINE TERMINAL DRIVER SYMBOLS

                                     0000    48 	$TTYUCBDEF			; DEFINE TERMINAL DRIVER UCB SYMBOLS

                                     0000    49 	$VECDEF				; DEFINE CRB VECTOR

                                     0000    50 	TTYMACS				; DEFINE TERMINAL MACROS

                                     0000    51  

                                 00000000    52 	.PSECT	$$$115_DRIVER,LONG	; DEFINE NON-PAGED PSECT

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   2

V06             TTY$LOCK - SETUP IPL AND REGISTERS                                                                               (2)



                                     0000    54 	.SBTTL	TTY$LOCK - SETUP IPL AND REGISTERS

                                     0000    55 ;++

                                     0000    56 ; TTY$LOCK - SETUP IPL AND REGISTER CO-ROUTINE

                                     0000    57 ;

                                     0000    58 ; FUNCTIONAL DESCRIPTION:

                                     0000    59 ;

                                     0000    60 ; THIS IS A CO-ROUTINE THAT DISABLES INTERRUPTS TO THE IPL IN UCB$B_DIPL

                                     0000    61 ; AND SETS UP A POINTER TO THE UNIT STATE VECTOR.

                                     0000    62 ;

                                     0000    63 ; SUBSEQUENT RETURN CAUSES IPL TO BE RETURNED.

                                     0000    64 ;

                                     0000    65 ; INPUTS:

                                     0000    66 ;

                                     0000    67 ;	R5 = UCB ADDRESS

                                     0000    68 ;

                                     0000    69 ; OUTPUTS:

                                     0000    70 ;

                                     0000    71 ;	R1 IS DISTROYED.

                                     0000    72 ;

                                     0000    73 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     0000    74 ;	R5 = UCB ADDRESS

                                     0000    75 ;--

                                     0000    76 TTY$LOCK::				; SETUP IPL AND REGISTERS

            51            6E     D0  0000    77 	MOVL	(SP),R1			; GET RETURN ADDRESS

            6E   00000000'8F     DB  0003    78 	MFPR	#PR$_IPL,(SP)		; SET IPL TO AT LEAST DRIVER IPL

            6E         52 A5     91  000A    79 	CMPB	UCB$B_DIPL(R5),(SP)	;

                          04     1B  000E    80 	BLEQU	10$			;

                                     0010    81 	SETIPL	UCB$B_DIPL(R5)		;

            52         74 A5     9E  0014    82 10$:	MOVAB	UCB$L_TT_STATE(R5),R2	; SETUP STATE VECTOR POINTER

                          61     16  0018    83 	JSB	(R1)			; CALL CALLER BACK

                                     001A    84 	ENBINT				; ENABLE INTERRUPTS

                                 05  001D    85 	RSB				;

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   3

V06             TTY$SETUP_UCB - SETUP TERMINAL UCB                                                                               (3)



                                     001E    87 	.SBTTL	TTY$SETUP_UCB - SETUP TERMINAL UCB

                                     001E    88 ;++

                                     001E    89 ; TTY$SETUP_UCB - SETUP TERMINAL UCB

                                     001E    90 ;

                                     001E    91 ; FUNCTIONAL DESCRIPTION:

                                     001E    92 ;

                                     001E    93 ; THIS ROUTINE IS ENTERED DURING SYSTEM STARTUP TO SET UP TERMINAL UCBS.

                                     001E    94 ; THE UCB IS ZEROED EXCEPT FOR THE SPEED AND FILL COUNTS. THE CURSOR IS

                                     001E    95 ; SET TO 1 TO FORCE A CR-LF. THE HOLDING TANK IS INVALIDATED. THE FORK BLOCK

                                     001E    96 ; IS INITIALIZED.

                                     001E    97 ;

                                     001E    98 ; INPUTS:

                                     001E    99 ;

                                     001E   100 ;	R5 = UCB ADDRESS

                                     001E   101 ;

                                     001E   102 ; OUTPUTS:

                                     001E   103 ;

                                     001E   104 ;	R5 = UCB ADDRESS

                                     001E   105 ;

                                     001E   106 ;	R0-R4 ARE PRESERVED.

                                     001E   107 ;--

                                     001E   108 TTY$SETUP_UCB::				; SET UP THE UCB

                          01     BB  001E   109 	PUSHR	#^M<R0>			;

       009A C5            01     B0  0020   110 	MOVW	#1,UCB$W_TT_CURSOR(R5)	; SET BAD CURSOR TO FORCE CRLF

       0090 C5            01     AE  0025   111 	MNEGW	#1,UCB$W_TT_HOLD(R5)	; INVALIDATE HOLDING TANK

         0C A5       0141'CF     9E  002A   112 	MOVAB	W^TTY$FORK_ADDR,UCB$L_FPC(R5); SET UP FORK ADDRESS

       009C C5       00A0 C5     D0  0030   113 	MOVL	UCB$B_TT_DESPEE(R5),UCB$B_TT_SPEED(R5); SET UP TEMP CHARS

         39 A5       00A4 C5     D0  0037   114 	MOVL	UCB$B_TT_DETYPE(R5),UCB$B_DEVTYPE(R5);

         3C A5   FFFFDFFF 8F     CB  003D   115 	BICL3	#^C<TT$M_REMOTE>,UCB$L_DEVDEPEND(R5),R0; SAVE CURRENT REMOTE STATE

                          50         0045       

       00A8 C5   00002000 8F     CB  0046   116 	BICL3	#TT$M_REMOTE,UCB$L_TT_DECHAR(R5),UCB$L_DEVDEPEND(R5);

                       3C A5         004F       

         3C A5            50     C8  0051   117 	BISL	R0,UCB$L_DEVDEPEND(R5)	; KEEP PREVIOUS SETTING

         3C A5         FC 8F     8B  0055   118 	BICB3	#^C<TT$M_PASSALL!TT$M_NOECHO>,UCB$L_DEVDEPEND(R5),R0; GET PASSALL AND NOECHO 

                          50         005A       

            0E            50     F0  005B   119 	INSV	R0,#TTY$V_ST_PASALL,#2,UCB$L_TT_STATE(R5); RESET CURRENT STATE

         74 A5            02         005E       

                          01     BA  0061   120 	POPR	#^M<R0>

                                 05  0063   121 	RSB

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   4

V06             TTY$CANCELIO - CANCEL I/O ON TERMINAL                                                                            (4)



                                     0064   123 	.SBTTL	TTY$CANCELIO - CANCEL I/O ON TERMINAL

                                     0064   124 ;++

                                     0064   125 ; TTY$CANCELIO - CANCEL I/O, DEASSIGN, AND DEALLOCATE

                                     0064   126 ;

                                     0064   127 ; FUNCTIONAL DESCRIPTION:

                                     0064   128 ;

                                     0064   129 ; THIS ROUTINE IS ENTERED TO STOP CURRENT I/O  ON A TERMINAL UNIT.

                                     0064   130 ;

                                     0064   131 ; THE ASSOCIATED CHANNEL'S READ OR WRITE I/O IS CANCELED ALONG WITH

                                     0064   132 ; A FLUSH OF CONTROL-C AST REQUESTS. 

                                     0064   133 ; IF THIS OPERATION IS DONE ON A UNIT WITH A ZERO REFERENCE COUNT, THE CONTROL

                                     0064   134 ; Y AST'S ARE FLUSHED, THE TYPEAHEAD BUFFER IS DEALLOCATED AND THE UNIT

                                     0064   135 ; IS INITED FOR THE NEXT USER.

                                     0064   136 ;

                                     0064   137 ; INPUTS:

                                     0064   138 ;

                                     0064   139 ;	R2 = NEGITIVE OF THE CHANNEL NUMBER

                                     0064   140 ;	R3 = CURRENT I/O PACKET ADDRESS

                                     0064   141 ;	R4 = PCB OF CANCELING PROCESS

                                     0064   142 ;	R5 = UCB ADDRESS

                                     0064   143 ;

                                     0064   144 ; OUTPUTS:

                                     0064   145 ;

                                     0064   146 ;	R4,R5 ARE PRESERVED

                                     0064   147 ;--

                                     0064   148 TTY$CANCELIO::				; CANCELIO TTY USAGE

            7E            56     7D  0064   149 	MOVQ	R6,-(SP)		; SAVE REGISTERS

                     00EB'CF     9F  0067   150 	PUSHAB	W^40$			; SET UP RETURN ADDRESS

            56            52     D0  006B   151 	MOVL	R2,R6			; COPY CHANNEL NUMBER

                          90     10  006E   152 	BSBB	TTY$LOCK		; SETUP IPL AND REGISTERS

         58 A5            08     E1  0070   153 	BBC	#UCB$V_BSY,UCB$W_STS(R5),10$; BR IF NOT BUSY

                          1B         0074       

         0C A3         60 A4     D1  0075   154 	CMPL	PCB$L_PID(R4),IRP$L_PID(R3); PID MATCH?

                          14     12  007A   155 	BNEQ	10$			; IF NEQ THEN NO CANCEL

         28 A3            56     B1  007C   156 	CMPW	R6,IRP$W_CHAN(R3)	; CHANNEL MATCH?

                          0E     12  0080   157 	BNEQ	10$			; IF NEQ THEN NO CANCEL

                          54     DD  0082   158 	PUSHL	R4			; SAVE PCB ADDRESS

         6C A5       0000'8F     3C  0084   159 	MOVZWL	#SS$_ABORT,UCB$W_BOFF(R5); SET STATUS

                          01E0   30  008A   160 	BSBW	TTY$STOPIO		; STOP I/O

                          54   8ED0  008D   161 	POPL	R4			; RESTORE PCB ADDRESS

                                     0090   162 ;

                                     0090   163 ; RELEASE THE CONTROL C AST BLOCKS

                                     0090   164 ;

            57       0080 C5     9E  0090   165 10$:	MOVAB	UCB$L_TT_CTRLC(R5),R7	; ADDRESS THE CONTROL C ENABLE LIST 

                 00000000'GF     16  0095   166 	JSB	G^COM$FLUSHATTNS	; FLUSH THE LIST

                                     009B   167 ;

                                     009B   168 ; SEE IF THIS IS THE LAST DEASSIGN

                                     009B   169 ;

                       50 A5     B5  009B   170 	TSTW	UCB$W_REFC(R5)		; REF COUNT 0?

                          43     12  009E   171 	BNEQ	35$			; KEEP JOB CONTROLLER AND TYPEAHEAD IF NON-ZERO

            57         7C A5     9E  00A0   172 	MOVAB	UCB$L_TT_CTRLY(R5),R7	; ADDRESS LIST HEAD FOR CONTROL Y ENABLE

                 00000000'GF     16  00A4   173 	JSB	G^COM$FLUSHATTNS	; FLUSH LIST

                          014A   30  00AA   174 	BSBW	TTY$PURGE_AHEAD		; PURGE TYPE AHEAD BUFFER

         3C A5   FFFFBFFF 8F     CB  00AD   175 	BICL3	#^C<TT$M_HOLDSCREEN>,UCB$L_DEVDEPEND(R5),-(SP); GET CURRENT HOLDSCREEN MODE

                          7E         00B5       

            54         20 A5     D0  00B6   176 	MOVL	UCB$L_CRB(R5),R4	; ADDRESS CRB

                       2C B4     16  00BA   177 	JSB	@CRB$L_INTD+VEC$L_UNITINIT(R4); RESET SPEED AND UCB

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   5

V06             TTY$CANCELIO - CANCEL I/O ON TERMINAL                                                                            (4)



                          50   8ED0  00BD   178 	POPL	R0			; GET PREVIOUS HOLD SCREEN STATE

                          0D     13  00C0   179 	BEQL	20$			; IF EQL THEN WAS OFF

                                     00C2   180 					; WAS ON

         78 A5       0000'CF     9E  00C2   181 	MOVAB	W^TTY$A_RLSCREEN,UCB$L_TT_MULTI(R5); ASSUME NOW OFF

         3C A5            0E     E0  00C8   182 	BBS	#TT$V_HOLDSCREEN,UCB$L_DEVDEPEND(R5),30$; BR IF STILL ON

                          11         00CC       

                          0B     11  00CD   183 	BRB	25$			; BR TO SET ON

         78 A5       0000'CF     9E  00CF   184 20$:	MOVAB	W^TTY$A_HLDSCREEN,UCB$L_TT_MULTI(R5); ASSUME NO ON

         3C A5            0E     E1  00D5   185 	BBC	#TT$V_HOLDSCREEN,UCB$L_DEVDEPEND(R5),30$; BR IF NOT NOW ON

                          04         00D9       

                                     00DA   186 25$:	SET_STATE MULTI			; SET MULTI ECHO STATE

         5A A5            00     E5  00DE   187 30$:	BBCC	#UCB$V_JOB,UCB$W_DEVSTS(R5),35$; RESET JOB CONTROLLER OWNERSHIP BIT

                          00         00E2       

                                     00E3   188 35$:	CLR_STATE	<CTRLO,CTRLS>	;

                          FF15'  31  00E8   189 	BRW	TTY$STARTOUTPUT		; RESTART ANY STOPPED OUTPUT

            56            8E     7D  00EB   190 40$:	MOVQ	(SP)+,R6		; RESTORE REGISTERS

                                 05  00EE   191 	RSB				; RETURN

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   6

V06             TTY$BEG_BRDCST - BEGIN BROADCAST OPERATION ON U                                                                  (5)



                                     00EF   193 	.SBTTL	TTY$BEG_BRDCST - BEGIN BROADCAST OPERATION ON UNIT

                                     00EF   194 ;++

                                     00EF   195 ; TTY$BEG_BRDCST - BEGIN BROADCAST ON UNIT

                                     00EF   196 ;

                                     00EF   197 ; FUNCTIONAL DESCRIPTION:

                                     00EF   198 ;

                                     00EF   199 ; THIS ROUTINE IS ENTERED DIRECTLY FRON THE BROADCAST SYSTEM SERVICE TO

                                     00EF   200 ; BEGIN A BROADCAST OPERATION ON A UNIT.

                                     00EF   201 ;

                                     00EF   202 ; INPUTS:

                                     00EF   203 ;

                                     00EF   204 ;	R0 = SS$_DEVOFFLINE

                                     00EF   205 ;	R5 = UCB ADDRESS

                                     00EF   206 ;	R7 = ADDRESS OF THE INITIAL BROADCAST BLOCK TO PROCESS

                                     00EF   207 ;

                                     00EF   208 ; OUTPUTS:

                                     00EF   209 ;

                                     00EF   210 ;	R0 = STATUS OF OPERATION

                                     00EF   211 ;	R5,R7 ARE PRESERVED.

                                     00EF   212 ;--

                                     00EF   213 TTY$BEG_BRDCST::			; BEGIN BROADCAST OPERATION

                          FF0E   30  00EF   214 	BSBW	TTY$LOCK		; LOCK THE UNIT DATA BASE

                                     00F2   215 ;

                                     00F2   216 ; IF PASSALL,NOECHO, OR NO BROADCAST THEN SKIP

                                     00F2   217 ;

         3C A5   00020003 8F     D3  00F2   218 	BITL	#TT$M_PASSALL!TT$M_NOECHO!TT$M_NOBRDCST,UCB$L_DEVDEPEND(R5)

                          2A     12  00FA   219 	BNEQ	110$			; BR IF TRUE

                                     00FC   220 	CASE	TYPE=B,TTY$B_BD_WHO(R7),<20$,10$,20$> ; CASE ON BROADCAST TYPE

                       50 A5     B5  0107   221 10$:	TSTW	UCB$W_REFC(R5)		; REF COUNT #0?

                          1A     13  010A   222 	BEQL	110$			; IF EQL THEN NOT IN USE

                       16 A7     96  010C   223 20$:	INCB	TTY$B_BD_REFC(R7)	; ADJUST REF COUNT ON BUFFER

            50         00'8F     9A  010F   224 	MOVZBL	#SS$_NORMAL,R0		; SET SUCCESS

                                     0113   225 	IF_STATE BRDCST,100$		; BR IF ALREADY IN BROADCAST

            54            57     D0  0119   226 	MOVL	R7,R4			; ADDRESS BLOCK

                          FEE1'  30  011C   227 	BSBW	TTY$STRT_BRDCST		; ACTUALLY START THE BROADCAST

                          FEDE'  30  011F   228 	BSBW	TTY$STARTOUTPUT		; BEGIN OUTPUT

            50         00'8F     9A  0122   229 100$:	MOVZBL	#SS$_NORMAL,R0		; SET SUCCESS

                                 05  0126   230 110$:	RSB				; RETURN

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   7

V06             TTY$CRE_FORK - FORK FOR UNSOLICITED DATA MESSAG                                                                  (6)



                                     0127   232 	.SBTTL	TTY$CRE_FORK - FORK FOR UNSOLICITED DATA MESSAGE OR TYPEAHEAD BUFFER

                                     0127   233 ;++

                                     0127   234 ; TTY$CRE_FORK - CREATE FORK ROUTINE

                                     0127   235 ;

                                     0127   236 ; FUNCTIONAL DESCRIPTION:

                                     0127   237 ;

                                     0127   238 ; THIS ROUTINE FORKS IN THE UCB FOR EITHER OF TWO REASONS:

                                     0127   239 ;

                                     0127   240 ;	1. UNSOLICITED DATA - SEND MESSAGE TO OWNER

                                     0127   241 ;	2. NO TYPEAHEAD BUFFER - ALLOCATE ONE

                                     0127   242 ;

                                     0127   243 ; INPUTS:

                                     0127   244 ;

                                     0127   245 ;	R2 = UNIT STATE VECTOR ADDRESS

                                     0127   246 ;	R3 = CHARACTER TO BUFFER FOR TYPEAHEAD NEEDED

                                     0127   247 ;	R4 = FORK REASON STATE BIT

                                     0127   248 ;	R5 = UCB ADDRESS

                                     0127   249 ;

                                     0127   250 ; OUTPUTS:

                                     0127   251 ;

                                     0127   252 ;	R2,R5 ARE PRESERVED.

                                     0127   253 ;--

                                     0127   254 TTY$CRE_FORK::				; CREATE FORK

                                     0127   255 	IF_STATE <GETAHD,UNSOL>,10$	; IF FORK IN PROGRESS THEN NO FORK HERE

            62            54     E2  012D   256 	BBSS	R4,(R2),5$		; SET THE REASON

                          00         0130       

                       41'AF     9F  0131   257 5$:	PUSHAB	B^TTY$FORK_ADDR		; SET FORK ROUTINE ADDRESS

                 00000000'GF     17  0134   258 	JMP	G^EXE$FORK		; CREATE FORK PROCESS

            62            54     E2  013A   259 10$:	BBSS	R4,(R2),15$		; SET THEN REASON ANY WAY

                          00         013D       

                                 05  013E   260 15$:	RSB

                               0112' 013F   261 	.WORD	ATTENTION-.		; SET UP ATTENTION INTERRUPT

                                     0141   262 TTY$FORK_ADDR::

                                     0141   263 ;

                                     0141   264 ; ATTENTION FORK PROCESS

                                     0141   265 ;

            52         74 A5     9E  0141   266 10$:	MOVAB	UCB$L_TT_STATE(R5),R2	; ADDRESS UNIT STATE

                                     0145   267 ;

                                     0145   268 ; HANDLE UNSOLICTED DATA

                                     0145   269 ;

                                     0145   270 	IF_NOT_STATE <UNSOL>,70$	; BR IF NOT UNSOLICITED DATA

                                     014B   271 ;

                                     014B   272 ; SEND UNSOLICTED DATA MESSAGE

                                     014B   273 ;

            54            01     9A  014B   274 	MOVZBL	#MSG$_TRMUNSOLIC,R4	; SET MESSAGE TYPE

                       50 A5     B5  014E   275 	TSTW	UCB$W_REFC(R5)		; IF REF COUNT 0 THEN 

                          0D     13  0151   276 	BEQL	50$			; JOB CONTROLLER

            53         54 A5     D0  0153   277 	MOVL	UCB$L_AMB(R5),R3	; GET USER'S MAILBOX

                          2F     13  0157   278 	BEQL	65$			; IF EQL THEN NONE

         5A A5            02     E0  0159   279 	BBS	#UCB$V_TT_NOTIF,UCB$W_DEVSTS(R5),65$; BR IF ALREADY NOTIFIED

                          2A         015D       

                          0C     11  015E   280 	BRB	55$			; CONTINUE

            53   00000000'GF     9E  0160   281 50$:	MOVAB	G^SYS$GL_JOBCTLMB,R3	; ADDRESS JOB CONTROLLER MAILBOX

         5A A5            00     E0  0167   282 	BBS	#UCB$V_JOB,UCB$W_DEVSTS(R5),65$; BR IF NOTIFIED ALREADY

                          1C         016B       

                 00000000'GF     16  016C   283 55$:	JSB	G^EXE$SNDEVMSG		; SEND THE MESSAGE

            52         74 A5     9E  0172   284 	MOVAB	UCB$L_TT_STATE(R5),R2	; ADDRESS STATE VECTOR

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   8

V06             TTY$CRE_FORK - FORK FOR UNSOLICITED DATA MESSAG                                                                  (6)



            0F            50     E9  0176   285 	BLBC	R0,65$			; IF FAILED THEN LEAVE DATA BASE UNCHANGED

                       50 A5     B5  0179   286 	TSTW	UCB$W_REFC(R5)		; REF COUNT 0?

                          06     12  017C   287 	BNEQ	60$			; IF NEQ THEN USER

         5A A5            01     A8  017E   288 	BISW	#UCB$M_JOB,UCB$W_DEVSTS(R5); SET NOTIFIED

                          04     11  0182   289 	BRB	65$			; LOOK TO UNSOLICTED DATA

         5A A5            04     A8  0184   290 60$:	BISW	#UCB$M_TT_NOTIF,UCB$W_DEVSTS(R5); SET NOTIFIED

                                     0188   291 65$:	CLR_STATE <UNSOL>

                                     018C   292 ;

                                     018C   293 ; CHECK FOR TYPEAHEAD BUFFER FETCH

                                     018C   294 ;

                                     018C   295 70$:	IF_NOT_STATE <GETAHD>,80$

                     0088 C5     D5  0192   296 	TSTL	UCB$L_TT_TYPAHD(R5)	; ALREADY ALLOCATED?

                          41     12  0196   297 	BNEQ	75$			; IF NEQ THEN YES

            51       004E 8F     3C  0198   298 	MOVZWL	#TTY$C_TYPAHDSIZ,R1	; ALLOCATE THE TYPEAHEAD BUFFER

                 00000000'GF     16  019D   299 	JSB	G^EXE$ALONONPAGED		; 

            54            52     D0  01A3   300 	MOVL	R2,R4			; COPY BLOCK ADDRESS

            52         74 A5     9E  01A6   301 	MOVAB	UCB$L_TT_STATE(R5),R2	; ADDRESS STATE VECTOR

            2C            50     E9  01AA   302 	BLBC	R0,75$			; IF FAILURE THEN TOUGH

         08 A4            51     B0  01AD   303 	MOVW	R1,TTY$W_TA_SIZE(R4)	; SET UP SIZE

         0C A4            6441   9E  01B1   304 	MOVAB	(R4)[R1],TTY$L_TA_END(R4); SET UP END POINTER

         0A A4            14     90  01B6   305 	MOVB	#DYN$C_TYPAHD,TTY$B_TA_TYPE(R4);

         10 A4         10 A5     90  01BA   306 	MOVB	UCB$L_FR3(R5),TTY$L_TA_DATA(R4); INSERT DATA

                                     01BF   307 	DSBINT	UCB$B_DIPL(R5)		; LOCK TERMINAL DATA BASE

       0088 C5            54     D0  01C6   308 	MOVL	R4,UCB$L_TT_TYPAHD(R5)	; STORE ADDRESS

                          2A     10  01CB   309 	BSBB	TTY$PURGE_AHEAD		; SET UP THE BLOCK

                     0088 D5     D6  01CD   310 	INCL	@UCB$L_TT_TYPAHD(R5)	; POINT TO NEXT PLACE

                     0092 C5     B6  01D1   311 	INCW	UCB$W_TT_INAHD(R5)	;

            62            18     E4  01D5   312 	BBSC	#TTY$V_ST_GETAHD,(R2),90$; CLEAR STATE AND BR

                          0B         01D8       

                                     01D9   313 75$:	CLR_STATE <GETAHD>

                                     01DD   314 80$:	DSBINT	UCB$B_DIPL(R5)		; LOCK OUT TERMINAL INTERRUPTS

                                     01E4   315 90$:	IF_NOT_STATE <UNSOL,GETAHD>,100$; EXIT IF DONE

                                     01EA   316 	ENBINT				; LOWER IPL

                          FF51   31  01ED   317 	BRW	10$			; AND TRY AGAIN

                          FE0D'  30  01F0   318 100$:	BSBW	TTY$STARTOUTPUT		; BEGIN NEXT STATE

                                     01F3   319 	ENBINT

                                 05  01F6   320 	RSB

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page   9

V06             TTY$PURGE_AHEAD - PURGE TYPEAHEAD BUFFER                                                                         (7)



                                     01F7   322 	.SBTTL TTY$PURGE_AHEAD - PURGE TYPEAHEAD BUFFER 

                                     01F7   323 ;++

                                     01F7   324 ; TTY$PURGE_AHEAD - PURGE THE CONTENTS OF THE TYPEAHEAD BUFFER

                                     01F7   325 ;

                                     01F7   326 ; FUNCTIONAL DESCRIPTION:

                                     01F7   327 ;

                                     01F7   328 ; THIS ROUTINE RESETS THE TYPEAHEAD BUFFER POINTERS TO REFLECT NO 

                                     01F7   329 ; DATA PRESENT.

                                     01F7   330 ;

                                     01F7   331 ; INPUTS:

                                     01F7   332 ;

                                     01F7   333 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     01F7   334 ;	R5 = UCB ADDRESS

                                     01F7   335 ;

                                     01F7   336 ; OUTPUTS:

                                     01F7   337 ;

                                     01F7   338 ;	R2,R3,R5 ARE PRESERVED.

                                     01F7   339 ;--

                                     01F7   340 TTY$PURGE_AHEAD::			; PURGE TYPEAHEAD

                     0092 C5     B4  01F7   341 	CLRW	UCB$W_TT_INAHD(R5)	; SET NO DATA IN TYPEAHEAD BUFFER

            54       0088 C5     D0  01FB   342 	MOVL	UCB$L_TT_TYPAHD(R5),R4	; GET TYPE AHEAD BUFFER ADDRESS

                          0E     13  0200   343 	BEQL	55$			; IF EQL THEN NONE

            64         10 A4     9E  0202   344 	MOVAB	TTY$L_TA_DATA(R4),TTY$L_TA_PUT(R4); RESET PUT POINTER

            64            84     D0  0206   345 	MOVL	(R4)+,(R4)		; RESET GET POINTER

            62            16     E5  0209   346 50$:	BBCC	#TTY$V_ST_TYPFUL,(R2),55$; TYPE AHEAD FULL AND INPUT STOPPED?

                          03         020C       

                                     020D   347 	SET_STATE XON			; SET TO SEND XON

                                 05  0210   348 55$:	RSB

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  10

V06             TTY$RESTARTIO - RESTART CURRENT I/O                                                                              (8)



                                     0211   350 	.SBTTL	TTY$RESTARTIO - RESTART CURRENT I/O

                                     0211   351 ;

                                     0211   352 ;++

                                     0211   353 ; TTY$RESTARTIO - RESTART CURRENT I/O

                                     0211   354 ;

                                     0211   355 ; FUNCTIONAL DESCRIPTION:

                                     0211   356 ;

                                     0211   357 ; THIS ROUTINE IS USED DURING BROADCAST AND POWERFAIL TO RESTART THE

                                     0211   358 ; CURRENT READ OR WRITE I/O.

                                     0211   359 ;

                                     0211   360 ; INPUTS:

                                     0211   361 ;

                                     0211   362 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     0211   363 ;	R5 = UNIT UCB ADDRESS

                                     0211   364 ;

                                     0211   365 ; OUTPUTS:

                                     0211   366 ;

                                     0211   367 ;	R2,R5 ARE PRESERVED.

                                     0211   368 ;--

                                     0211   369 TTY$RESTARTIO::				; RESTART THE I/O

                                     0211   370 	IF_NOT_STATE READ,10$		; BR IF READ NOT IN PROGRESS

                                     0217   371 	IF_STATE <PASALL,NOECHO>,30$	; CONTINUE IF PASSALL, NOECHO

         78 A5       0002'CF     9E  021E   372 	MOVAB	W^TTY$A_CTRLU+2,UCB$L_TT_MULTI(R5); SET MULTIPLE STATE

                                     0224   373 	SET_STATE <CTRLR,MULTI>		; FORCE CONTROL R

         68 A5            10     C1  0229   374 	ADDL3	#TTY$L_RB_DATA,UCB$L_SVAPTE(R5),@UCB$L_SVAPTE(R5)

                       68 B5         022D       

                          15     11  022F   375 	BRB	30$			; CONTINUE

                                     0231   376 10$:	IF_NOT_STATE WRITE,30$		; IF NOT WRITE THEN CONTINUE

                                     0237   377 	IF_STATE WRTALL,30$		; IF PASSALL THEN NO RESTART

                       6E A5     B4  023D   378 	CLRW	UCB$W_BCNT(R5)		; RESET BYTE COUNT

         68 A5            0C     C1  0240   379 	ADDL3	#TTY$L_WB_DATA,UCB$L_SVAPTE(R5),@UCB$L_SVAPTE(R5)

                       68 B5         0244       

                                     0246   380 30$:	IF_NOT_STATE BRDCST,40$		; BR IF NOT BROADCAST

                     0098 C5     94  024C   381 	CLRB	UCB$B_TT_BRDPT(R5)	; RESET POINTER TO START FROM BEGINNING

                                 05  0250   382 40$:	RSB				; CONTINUE

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  11

V06             ATTENTION - UNIT TIMEOUT, POWERFAIL ATTENTION R                                                                  (9)



                                     0251   384 	.SBTTL	ATTENTION - UNIT TIMEOUT, POWERFAIL ATTENTION ROUTINE

                                     0251   385 ;++

                                     0251   386 ; ATTENTION - UNIT TIMEOUT, POWERFAIL ATTENTION ROUTINE

                                     0251   387 ;

                                     0251   388 ; THIS ROUTINE IS ENTERED VIA THE UCB$L_FPC ON POWERFAIL OR TIMEOUT.

                                     0251   389 ; THE ACTION IS TO RESTART THE I/O IF THE POWER FAILED AND TO CANCEL IT

                                     0251   390 ; IF A TIMEOUT OCCURED.

                                     0251   391 ;

                                     0251   392 ; INPUTS:

                                     0251   393 ;

                                     0251   394 ;	R5 = UCB ADDRESS

                                     0251   395 ;

                                     0251   396 ; OUTPUTS:

                                     0251   397 ;

                                     0251   398 ;	R5 = UCB ADDRESS

                                     0251   399 ;--

                                     0251   400 ATTENTION:				; ATTENTION INTERRUPT

                          FDAC   30  0251   401 	BSBW	TTY$LOCK		; SET IPL AND REGISTERS

         58 A5            05     E5  0254   402 	BBCC	#UCB$V_POWER,UCB$W_STS(R5),50$; CANCEL IF NOT POWERFAIL

                          05         0258       

                                     0259   403 ;

                                     0259   404 ; POWER FAILED WHILE THIS UNIT WAS WAITING FOR AN INTERRUPT.

                                     0259   405 ;

                          B6     10  0259   406 	BSBB	TTY$RESTARTIO		; RESTART ANY INPROGRESS I/O

                          FDA2'  31  025B   407 	BRW	TTY$STARTOUTPUT		; BEGIN THE I/O AGAIN

                                     025E   408 ;

                                     025E   409 ; ACTUAL HARDWARE TIMEOUT

                                     025E   410 ;

                                     025E   411 50$:	IF_NOT_STATE BRDCST,60$		; IF NOT BROADCAST THEN STOP OTHER I/O

                          FD99'  30  0264   412 	BSBW	TTY$STOP_BRDCST		; FLUSH THE UNITS'S BROADCASTS

         6C A5       0000'8F     3C  0267   413 60$:	MOVZWL	#SS$_TIMEOUT,UCB$W_BOFF(R5); SET STATUS CODE

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  12

V06             TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL                                                                 (10)



                                     026D   415 	.SBTTL	TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL

                                     026D   416 ;++

                                     026D   417 ; TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL

                                     026D   418 ;

                                     026D   419 ; FUNCTIONAL DESCRIPTION:

                                     026D   420 ;

                                     026D   421 ; THIS ROUTINE IS ENTERED WHEN IT IS NECESSARY TO STOP THE UNIT.

                                     026D   422 ;

                                     026D   423 ; INPUTS:

                                     026D   424 ;

                                     026D   425 ;	UCB$W_BOFF CONTAINS THE STATUS, UCB$W_BCNT CONTAINS THE TRANSFER COUNT

                                     026D   426 ;

                                     026D   427 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     026D   428 ;	R5 = UCB ADDRESS

                                     026D   429 ;

                                     026D   430 ; OUTPUTS:

                                     026D   431 ;

                                     026D   432 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     026D   433 ;	R5 = UCB ADDRESS

                                     026D   434 ;--

                                     026D   435 TTY$STOPIO::				; HALT OPERATION ON UNIT

                                     026D   436 	IF_NOT_STATE READ,20$

                                     0273   437 	CLR_STATE	<ESC,BADESC>

            54         4C A5     D0  0277   438 	MOVL	UCB$L_IRP(R5),R4	; GET CURRENT PACKET

                       34 A4     D4  027B   439 	CLRL	IRP$L_MEDIA(R4)		; SET NO TERMINATORS

                          FD7F'  30  027E   440 	BSBW	TTY$READONE		; COMPLETE READ

                                     0281   441 	IF_NOT_STATE XOFF,30$		; IF XOFF STATE NOT SET THEN DONE

                          FD77'  31  0286   442 	BRW	TTY$STARTOUTPUT		; OUTPUT THE XOFF

                                     0289   443 20$:	IF_NOT_STATE WRITE,30$

                          FD6E'  31  028F   444 	BRW	TTY$WRITEDONE

                                 05  0292   445 30$:	RSB

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  13

V06             TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL                                                                 (11)



                                     0293   447 	.END

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  14

SYMBOL TABLE                                                                                                                    (11)



ATTENTION        00000251 R     03   EXE$ALONONPAGED  ********   X   03   IRP$V_FUNC     = 00000001            

BIT...         = 00000008            EXE$FORK         ********   X   03   IRP$V_MBXIO    = 0000000A            

COM$FLUSHATTNS   ********   X   03   EXE$SNDEVMSG     ********   X   03   IRP$V_MODE     = 00000000            

CRB$B_MASK       0000000E            GBL...         = 00000000            IRP$V_PAGIO    = 00000002            

CRB$B_TT_ATTN    00000004            IPL$_ASTDEL    = 00000002            IRP$V_PHYSIO   = 00000008            

CRB$B_TT_EXPEC   00000005            IPL$_HWCLK     = 00000018            IRP$V_PRIVIO   = 00000009            

CRB$B_TYPE       0000000A            IPL$_IOPOST    = 00000004            IRP$V_SWAPIO   = 00000006            

CRB$C_LENGTH     00000038            IPL$_MAILBOX   = 0000000B            IRP$V_VIRTUAL  = 00000004            

CRB$K_LENGTH     00000038            IPL$_POWER     = 0000001F            IRP$W_ABCNT      0000003C            

CRB$L_INTD       00000014            IPL$_QUEUEAST  = 00000006            IRP$W_BCNT       00000032            

CRB$L_INTD2      00000038            IPL$_SCHED     = 00000003            IRP$W_BOFF       00000030            

CRB$L_LINK       00000010            IPL$_SYNCH     = 00000007            IRP$W_CHAN       00000028            

CRB$L_TT_DIAL    00000000            IPL$_TIMER     = 00000007            IRP$W_FUNC       00000020            

CRB$L_WQBL       00000004            IRP$B_CARCON     00000038            IRP$W_OBCNT      0000003E            

CRB$L_WQFL       00000000            IRP$B_EFN        00000022            IRP$W_SIZE       00000008            

CRB$M_BSY      = 00000001            IRP$B_PRI        00000023            IRP$W_STS        0000002A            

CRB$V_BSY      = 00000000            IRP$B_RMOD       0000000B            IRP$W_TT_PRMPT   0000003C            

CRB$W_REFC       0000000C            IRP$B_TYPE       0000000A            MSG$_ABOOPR    = 00000011            

CRB$W_SIZE       00000008            IRP$C_LENGTH     0000004C            MSG$_ABORT     = 00000030            

DYN$C_ACB      = 00000002            IRP$K_LENGTH     0000004C            MSG$_ACCRSP    = 00000021            

DYN$C_ADP      = 00000001            IRP$L_AST        00000010            MSG$_CONFIRM   = 00000031            

DYN$C_AQB      = 00000003            IRP$L_ASTPRM     00000014            MSG$_CONNECT   = 00000032            

DYN$C_BRDCST   = 0000001A            IRP$L_DIAGBUF    00000044            MSG$_CRUNSOLIC = 00000002            

DYN$C_BUFIO    = 00000013            IRP$L_IOQBL      00000004            MSG$_DELPROC   = 00000003            

DYN$C_CEB      = 00000004            IRP$L_IOQFL      00000000            MSG$_DELSMB    = 00000014            

DYN$C_CRB      = 00000005            IRP$L_IOSB       00000024            MSG$_DEVOFFLIN = 00000005            

DYN$C_CXB      = 0000001B            IRP$L_IOST1      00000034            MSG$_DEVONLIN  = 00000007            

DYN$C_DDB      = 00000006            IRP$L_IOST2      00000038            MSG$_DISCON    = 00000033            

DYN$C_DPT      = 0000001E            IRP$L_MEDIA      00000034            MSG$_EXIT      = 00000034            

DYN$C_FCB      = 00000007            IRP$L_PID        0000000C            MSG$_INIOPR    = 00000010            

DYN$C_FRK      = 00000008            IRP$L_SEGVBN     00000040            MSG$_INTMSG    = 00000035            

DYN$C_GSD      = 00000015            IRP$L_SEQNUM     00000048            MSG$_OPREPLY   = 00000009            

DYN$C_IDB      = 00000009            IRP$L_SVAPTE     0000002C            MSG$_OPRQST    = 00000008            

DYN$C_IRP      = 0000000A            IRP$L_TT_TERM    00000038            MSG$_PATHLOST  = 00000036            

DYN$C_JPB      = 0000001F            IRP$L_UCB        0000001C            MSG$_PROTOCOL  = 00000037            

DYN$C_KFH      = 00000026            IRP$L_WIND       00000018            MSG$_REJECT    = 00000038            

DYN$C_KFI      = 00000018            IRP$M_BUFIO    = 00000001            MSG$_RESOPR    = 00000013            

DYN$C_LOG      = 0000000B            IRP$M_CHAINED  = 00000020            MSG$_SCANBAD   = 00000028            

DYN$C_MTL      = 00000019            IRP$M_COMPLX   = 00000008            MSG$_SCANRSP   = 00000029            

DYN$C_MVL      = 00000016            IRP$M_DIAGBUF  = 00000080            MSG$_SMBDON    = 00000009            

DYN$C_NDB      = 0000001C            IRP$M_FUNC     = 00000002            MSG$_SMBINI    = 00000008            

DYN$C_NET      = 00000017            IRP$M_MBXIO    = 00000400            MSG$_SMBRSP    = 00000020            

DYN$C_PBH      = 00000020            IRP$M_PAGIO    = 00000004            MSG$_SNDACC    = 0000000A            

DYN$C_PCB      = 0000000C            IRP$M_PHYSIO   = 00000100            MSG$_SNDSMB    = 00000004            

DYN$C_PDB      = 00000021            IRP$M_PRIVIO   = 00000200            MSG$_SUSOPR    = 00000012            

DYN$C_PFL      = 00000023            IRP$M_SWAPIO   = 00000040            MSG$_THIRDPARTY= 00000039            

DYN$C_PIB      = 00000022            IRP$M_VIRTUAL  = 00000010            MSG$_TIMEOUT   = 0000003A            

DYN$C_PQB      = 0000000D            IRP$Q_NT_PRVMSK  0000003C            MSG$_TRMHANGUP = 00000006            

DYN$C_PTR      = 00000025            IRP$S_FCODE    = 00000006            MSG$_TRMUNSOLIC= 00000001            

DYN$C_RVT      = 0000000E            IRP$S_FMOD     = 0000000A            MSG$_XM_ATTN   = 0000000D            

DYN$C_SFT      = 00000024            IRP$S_MODE     = 00000002            MSG$_XM_DATAVL = 0000000B            

DYN$C_SSB      = 0000001D            IRP$V_BUFIO    = 00000000            MSG$_XM_SHUTDN = 0000000C            

DYN$C_TQE      = 0000000F            IRP$V_CHAINED  = 00000005            PCB$B_ASTACT     0000000C            

DYN$C_TYPAHD   = 00000014            IRP$V_COMPLX   = 00000003            PCB$B_ASTEN      0000000D            

DYN$C_UCB      = 00000010            IRP$V_DIAGBUF  = 00000007            PCB$B_PRI        0000000B            

DYN$C_VCB      = 00000011            IRP$V_FCODE    = 00000000            PCB$B_PRIB       00000033            

DYN$C_WCB      = 00000012            IRP$V_FMOD     = 00000006            PCB$B_TYPE       0000000A            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  15

SYMBOL TABLE                                                                                                                    (11)



PCB$B_WEFC       00000032            PCB$W_MEM        00000020            TT$V_HOSTSYNC  = 00000004            

PCB$C_LENGTH     0000007C            PCB$W_MTXCNT     0000000E            TT$V_LFFILL    = 0000000B            

PCB$K_LENGTH     0000007C            PCB$W_PPGCNT     0000003A            TT$V_LOWER     = 00000007            

PCB$L_ASTQBL     00000014            PCB$W_PRCCNT     0000006A            TT$V_MBXDSABL  = 00000010            

PCB$L_ASTQFL     00000010            PCB$W_SIZE       00000008            TT$V_MECHTAB   = 00000008            

PCB$L_EFC2P      00000058            PCB$W_STATE      00000030            TT$V_NOBRDCST  = 00000011            

PCB$L_EFC3P      0000005C            PCB$W_TMBU       00000036            TT$V_NOECHO    = 00000001            

PCB$L_EFCS       00000050            PCB$W_TQCNT      0000004A            TT$V_NOTYPEAHD = 00000002            

PCB$L_EFCU       00000054            PR$_IPL          ********   X   03   TT$V_ODD       = 00000007            

PCB$L_EFWM       0000004C            SS$_ABORT        ********   X   03   TT$V_PAGE      = 00000019            

PCB$L_OWNER      0000001C            SS$_NORMAL       ********   X   03   TT$V_PARITY    = 00000006            

PCB$L_PHD        00000064            SS$_TIMEOUT      ********   X   03   TT$V_PASSALL   = 00000000            

PCB$L_PHYPCB     00000018            SYS$GL_JOBCTLMB  ********   X   03   TT$V_READSYNC  = 00000012            

PCB$L_PID        00000060            TT$C_BAUD_110  = 00000003            TT$V_REMOTE    = 0000000D            

PCB$L_PQB        0000004C            TT$C_BAUD_1200 = 00000008            TT$V_SCOPE     = 0000000C            

PCB$L_SQBL       00000004            TT$C_BAUD_134  = 00000004            TT$V_SCRIPT    = 00000006            

PCB$L_SQFL       00000000            TT$C_BAUD_150  = 00000005            TT$V_TTSYNC    = 00000005            

PCB$L_STS        00000028            TT$C_BAUD_1800 = 00000009            TT$V_WRAP      = 00000009            

PCB$L_UIC        00000020            TT$C_BAUD_2000 = 0000000A            TT$_LA36       = 00000020            

PCB$L_WSSWP      00000024            TT$C_BAUD_2400 = 0000000B            TT$_LAX        = 00000020            

PCB$L_WTIME      0000002C            TT$C_BAUD_300  = 00000006            TT$_UNKNOWN    = 00000000            

PCB$T_LNAME      0000006C            TT$C_BAUD_3600 = 0000000C            TT$_VT05       = 00000001            

PCB$V_ASTPEN   = 00000011            TT$C_BAUD_4800 = 0000000D            TT$_VT52       = 00000040            

PCB$V_BATCH    = 0000000E            TT$C_BAUD_50   = 00000001            TT$_VT55       = 00000041            

PCB$V_DELPEN   = 00000001            TT$C_BAUD_600  = 00000007            TT$_VT5X       = 00000040            

PCB$V_FORCPEN  = 00000002            TT$C_BAUD_7200 = 0000000E            TTY$A_CTRLU      ********   X   03   

PCB$V_HIBER    = 00000013            TT$C_BAUD_75   = 00000002            TTY$A_HLDSCREEN  ********   X   03   

PCB$V_INQUAN   = 00000003            TT$C_BAUD_9600 = 0000000F            TTY$A_RLSCREEN   ********   X   03   

PCB$V_LOGIN    = 00000014            TT$M_ALTRPAR   = 00000020            TTY$BEG_BRDCST   000000EF RG    03   

PCB$V_NETWRK   = 00000015            TT$M_CRFILL    = 00000400            TTY$B_BD_CNT     00000015            

PCB$V_NOACNT   = 0000000F            TT$M_EIGHTBIT  = 00008000            TTY$B_BD_IPL     00000017            

PCB$V_NODELET  = 00000017            TT$M_ESCAPE    = 00000008            TTY$B_BD_REFC    00000016            

PCB$V_PHDRES   = 00000012            TT$M_HOLDSCREEN= 00004000            TTY$B_BD_TYPE    0000000A            

PCB$V_PSWAPM   = 00000004            TT$M_HOSTSYNC  = 00000010            TTY$B_BD_WHO     00000014            

PCB$V_PWRAST   = 00000016            TT$M_LFFILL    = 00000800            TTY$B_TA_TYPE    0000000A            

PCB$V_RES      = 00000000            TT$M_LOWER     = 00000080            TTY$CANCELIO     00000064 RG    03   

PCB$V_RESPEN   = 00000005            TT$M_MBXDSABL  = 00010000            TTY$CRE_FORK     00000127 RG    03   

PCB$V_SSFEXC   = 00000006            TT$M_MECHTAB   = 00000100            TTY$C_BELL     = 00000007            

PCB$V_SSFEXCE  = 00000007            TT$M_NOBRDCST  = 00020000            TTY$C_BLANK    = 00000020            

PCB$V_SSFEXCS  = 00000008            TT$M_NOECHO    = 00000002            TTY$C_BS       = 00000008            

PCB$V_SSFEXCU  = 00000009            TT$M_NOTYPEAHD = 00000004            TTY$C_CR       = 0000000D            

PCB$V_SSRWAIT  = 0000000A            TT$M_ODD       = 00000080            TTY$C_CTRLC    = 00000003            

PCB$V_SUSPEN   = 0000000B            TT$M_PAGE      = FE000000            TTY$C_CTRLO    = 0000000F            

PCB$V_SWPVBN   = 00000010            TT$M_PARITY    = 00000040            TTY$C_CTRLQ    = 00000011            

PCB$V_WAKEPEN  = 0000000C            TT$M_PASSALL   = 00000001            TTY$C_CTRLR    = 00000012            

PCB$V_WALL     = 0000000D            TT$M_READSYNC  = 00040000            TTY$C_CTRLS    = 00000013            

PCB$W_APTCNT     00000034            TT$M_REMOTE    = 00002000            TTY$C_CTRLU    = 00000015            

PCB$W_ASTCNT     0000003C            TT$M_SCOPE     = 00001000            TTY$C_CTRLX    = 00000018            

PCB$W_BIOCNT     0000003E            TT$M_SCRIPT    = 00000040            TTY$C_CTRLY    = 00000019            

PCB$W_BIOLM      00000040            TT$M_TTSYNC    = 00000020            TTY$C_CTRLZ    = 0000001A            

PCB$W_BYTCNT     00000042            TT$M_WRAP      = 00000200            TTY$C_DELETE   = 0000007F            

PCB$W_BYTLM      00000068            TT$S_PAGE      = 00000008            TTY$C_DOLLAR   = 00000024            

PCB$W_DIOCNT     00000044            TT$V_ALTRPAR   = 00000005            TTY$C_DS_ACTIVE= 00000001            

PCB$W_DIOLM      00000046            TT$V_CRFILL    = 0000000A            TTY$C_DS_ATTN1 = 00000002            

PCB$W_FILCNT     00000048            TT$V_EIGHTBIT  = 0000000F            TTY$C_DS_ATTN3 = 00000009            

PCB$W_GPGCNT     00000038            TT$V_ESCAPE    = 00000003            TTY$C_DS_HANG  = 0000000A            

PCB$W_GRP        00000022            TT$V_HOLDSCREEN= 0000000E            TTY$C_DS_IDLE  = 00000000            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  16

SYMBOL TABLE                                                                                                                    (11)



TTY$C_DS_RESET = 0000000B            TTY$M_ST_NOECHO= 00008000            TTY$W_RB_ORGHOR  0000000C            

TTY$C_ESCAPE   = 0000001B            TTY$M_ST_NOFLTR= 00040000            TTY$W_RB_SIZE    00000008            

TTY$C_FC_N_SET = 00000004            TTY$M_ST_PASALL= 00004000            TTY$W_RB_TIMOS   0000000E            

TTY$C_FC_READ  = 00000000            TTY$M_ST_PROMPT= 00020000            TTY$W_TA_SIZE    00000008            

TTY$C_FC_SETC  = 00000003            TTY$M_ST_READ  = 00000800            TTY$W_WB_SIZE    00000008            

TTY$C_FC_SETM  = 00000002            TTY$M_ST_SENDLF= 00000020            UCB$B_AMOD       00000053            

TTY$C_FC_WRITE = 00000001            TTY$M_ST_SKIPLF= 00800000            UCB$B_CEX        00000077            

TTY$C_FF       = 0000000C            TTY$M_ST_TYPFUL= 00400000            UCB$B_CM1        0000004A            

TTY$C_HIGHIPL  = 00000016            TTY$M_ST_UNSOL = 02000000            UCB$B_CM2        0000004B            

TTY$C_LF       = 0000000A            TTY$M_ST_WRITE = 00000100            UCB$B_DEVCLASS   00000038            

TTY$C_LOWA     = 00000061            TTY$M_ST_WRTALL= 00010000            UCB$B_DEVTYPE    00000039            

TTY$C_LOWZ     = 0000007B            TTY$M_ST_XOFF  = 00000002            UCB$B_DIPL       00000052            

TTY$C_NL       = 00000080            TTY$M_ST_XON   = 00000001            UCB$B_DX_SCTCNT  000000A6            

TTY$C_ONE      = 00000031            TTY$PURGE_AHEAD  000001F7 RG    03   UCB$B_ERTCNT     00000070            

TTY$C_PLUS     = 0000002B            TTY$Q_BD_LINK    00000000            UCB$B_ERTMAX     00000071            

TTY$C_SCRIPT   = 00000060            TTY$READONE      ********   X   03   UCB$B_ESCAPE     0000004B            

TTY$C_TAB      = 00000009            TTY$RESTARTIO    00000211 RG    03   UCB$B_FEX        00000076            

TTY$C_TYPAHDSIZ= 0000004E            TTY$SETUP_UCB    0000001E RG    03   UCB$B_FIPL       0000000B            

TTY$C_VT       = 0000000B            TTY$STARTOUTPUT  ********   X   03   UCB$B_LOCSRV     0000003C            

TTY$C_XOFF     = 00000013            TTY$STOPIO       0000026D RG    03   UCB$B_OFFNDX     00000094            

TTY$C_XON      = 00000011            TTY$STOP_BRDCST  ********   X   03   UCB$B_OFFRTC     00000095            

TTY$C_ZERO     = 00000030            TTY$STRT_BRDCST  ********   X   03   UCB$B_REMSRV     0000003D            

TTY$FORK_ADDR    00000141 RG    03   TTY$S_A        = 0000000E            UCB$B_SECTORS    0000003C            

TTY$LOCK         00000000 RG    03   TTY$V_A        = 00000000            UCB$B_SLAVE      00000074            

TTY$L_BD_DATA    00000018            TTY$V_CH_CTRL  = 00000005            UCB$B_SPR        00000075            

TTY$L_BD_FORK    0000000C            TTY$V_CH_CTRL2 = 00000007            UCB$B_STATE      00000052            

TTY$L_BD_MIN     00000028            TTY$V_CH_LOWER = 00000006            UCB$B_TRACKS     0000003D            

TTY$L_BD_UCB     00000010            TTY$V_CH_SPEC  = 00000004            UCB$B_TT_BRDPT   00000098            

TTY$L_RB_DATA    00000010            TTY$V_ST_BADESC= 00000014            UCB$B_TT_CRFILL  0000009D            

TTY$L_RB_NXT     00000000            TTY$V_ST_BRDCST= 00000007            UCB$B_TT_DECRF   000000A1            

TTY$L_RB_UVA     00000004            TTY$V_ST_CTRLO = 0000000C            UCB$B_TT_DELFF   000000A2            

TTY$L_TA_DATA    00000010            TTY$V_ST_CTRLR = 0000000A            UCB$B_TT_DESPEE  000000A0            

TTY$L_TA_END     0000000C            TTY$V_ST_CTRLS = 00000002            UCB$B_TT_DETYPE  000000A4            

TTY$L_TA_GET     00000004            TTY$V_ST_CURSOR= 00000004            UCB$B_TT_DIAL    00000096            

TTY$L_TA_PUT     00000000            TTY$V_ST_DEL   = 0000000D            UCB$B_TT_ESC     00000095            

TTY$L_WB_DATA    0000000C            TTY$V_ST_EOL   = 00000009            UCB$B_TT_ESC_O   00000099            

TTY$L_WB_END     00000004            TTY$V_ST_ESC   = 00000013            UCB$B_TT_FILL    00000097            

TTY$L_WB_NXT     00000000            TTY$V_ST_ESC_O = 0000001A            UCB$B_TT_LFFILL  0000009E            

TTY$M_A        = 00003FFF            TTY$V_ST_FILL  = 00000003            UCB$B_TT_LINE    00000094            

TTY$M_CH_CTRL  = 00000020            TTY$V_ST_GETAHD= 00000018            UCB$B_TT_SPEED   0000009C            

TTY$M_CH_CTRL2 = 00000080            TTY$V_ST_MULTI = 00000006            UCB$B_TYPE       0000000A            

TTY$M_CH_LOWER = 00000040            TTY$V_ST_NL    = 00000015            UCB$B_VERTSZ     0000003F            

TTY$M_CH_SPEC  = 00000010            TTY$V_ST_NOECHO= 0000000F            UCB$C_LENGTH     00000074            

TTY$M_ST_BADESC= 00100000            TTY$V_ST_NOFLTR= 00000012            UCB$C_LOGLNK   = 00000001            

TTY$M_ST_BRDCST= 00000080            TTY$V_ST_PASALL= 0000000E            UCB$K_LENGTH     00000074            

TTY$M_ST_CTRLO = 00001000            TTY$V_ST_PROMPT= 00000011            UCB$L_AMB        00000054            

TTY$M_ST_CTRLR = 00000400            TTY$V_ST_READ  = 0000000B            UCB$L_ASTQBL     00000010            

TTY$M_ST_CTRLS = 00000004            TTY$V_ST_SENDLF= 00000005            UCB$L_ASTQFL     0000000C            

TTY$M_ST_CURSOR= 00000010            TTY$V_ST_SKIPLF= 00000017            UCB$L_CPID       0000005C            

TTY$M_ST_DEL   = 00002000            TTY$V_ST_TYPFUL= 00000016            UCB$L_CRB        00000020            

TTY$M_ST_EOL   = 00000200            TTY$V_ST_UNSOL = 00000019            UCB$L_DDB        00000024            

TTY$M_ST_ESC   = 00080000            TTY$V_ST_WRITE = 00000008            UCB$L_DEVCHAR    00000034            

TTY$M_ST_ESC_O = 04000000            TTY$V_ST_WRTALL= 00000010            UCB$L_DEVDEPEND  0000003C            

TTY$M_ST_FILL  = 00000008            TTY$V_ST_XOFF  = 00000001            UCB$L_DPC        00000080            

TTY$M_ST_GETAHD= 01000000            TTY$V_ST_XON   = 00000000            UCB$L_DUETIM     0000005C            

TTY$M_ST_MULTI = 00000040            TTY$WRITEDONE    ********   X   03   UCB$L_DX_BFPNT   0000009C            

TTY$M_ST_NL    = 00200000            TTY$W_BD_SIZE    00000008            UCB$L_DX_BUF     00000098            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  17

SYMBOL TABLE                                                                                                                    (11)



UCB$L_DX_RXDB    000000A0            UCB$M_TT_ODD   = 00000080            UCB$W_DIRSEQ     00000088            

UCB$L_EMB        00000078            UCB$M_TT_PARTY = 00000040            UCB$W_DSTADDR    00000018            

UCB$L_FIRST      00000014            UCB$M_TT_SPEED = 0000003F            UCB$W_DX_BCR     000000A4            

UCB$L_FPC        0000000C            UCB$M_TT_TIMO  = 00000002            UCB$W_EC1        00000090            

UCB$L_FQBL       00000004            UCB$M_UNLOAD   = 00001000            UCB$W_EC2        00000092            

UCB$L_FQFL       00000000            UCB$M_VALID    = 00000800            UCB$W_ERRCNT     00000072            

UCB$L_FR3        00000010            UCB$S_LNKPRI   = 00000002            UCB$W_FUNC       0000007E            

UCB$L_FR4        00000014            UCB$S_LTYPE    = 00000002            UCB$W_MB_SEED    FFFFFFFC            

UCB$L_IOQBL      00000044            UCB$S_TT_ODD   = 00000001            UCB$W_MSGCNT     00000016            

UCB$L_IOQFL      00000040            UCB$S_TT_PARTY = 00000001            UCB$W_MSGMAX     00000014            

UCB$L_IRP        0000004C            UCB$S_TT_SPEED = 00000006            UCB$W_NT_CHAN    0000007C            

UCB$L_LINK       0000002C            UCB$T_PARTNER    0000000C            UCB$W_OFFSET     0000008A            

UCB$L_LOGADR     00000064            UCB$V_BACKP    = 00000005            UCB$W_REFC       00000050            

UCB$L_MAXBLOCK   00000084            UCB$V_BSY      = 00000008            UCB$W_SIZE       00000008            

UCB$L_MEDIA      0000008C            UCB$V_CANCEL   = 00000003            UCB$W_SRCADDR    0000001A            

UCB$L_NT_DATSSB  00000074            UCB$V_DEADMO   = 0000000A            UCB$W_STS        00000058            

UCB$L_NT_INTSSB  00000078            UCB$V_DELMBX   = 00000001            UCB$W_TT_CURSOR  0000009A            

UCB$L_OPCNT      00000060            UCB$V_DIAGBUF  = 00000001            UCB$W_TT_DESIZE  000000A5            

UCB$L_OWNUIC     0000001C            UCB$V_DX_WRITE = 00000003            UCB$W_TT_HOLD    00000090            

UCB$L_PID        00000028            UCB$V_ECC      = 00000000            UCB$W_TT_INAHD   00000092            

UCB$L_RQBL       00000004            UCB$V_ERLOGIP  = 00000002            UCB$W_UNIT       00000048            

UCB$L_RQFL       00000000            UCB$V_INT      = 00000001            UCB$W_VPROT      0000001A            

UCB$L_SVAPTE     00000068            UCB$V_INTTYPE  = 00000007            VEC$B_DATAPATH   00000013            

UCB$L_SVPN       00000064            UCB$V_JOB      = 00000000            VEC$B_NUMREG     00000012            

UCB$L_TTCHAR     0000003C            UCB$V_LNKPRI   = 00000006            VEC$C_LENGTH     00000024            

UCB$L_TT_BRDCST  00000084            UCB$V_LTYPE    = 00000000            VEC$K_LENGTH     00000024            

UCB$L_TT_CTRLC   00000080            UCB$V_MOUNTING = 00000009            VEC$L_ADP        00000014            

UCB$L_TT_CTRLY   0000007C            UCB$V_MSGACK   = 00000004            VEC$L_IDB        00000008            

UCB$L_TT_DECHAR  000000A8            UCB$V_MSGFLO   = 00000003            VEC$L_INITIAL    0000000C            

UCB$L_TT_MULTI   00000078            UCB$V_NOCNVRT  = 00000002            VEC$L_START      0000001C            

UCB$L_TT_RDUE    0000008C            UCB$V_NT_BFROVF= 00000002            VEC$L_UNITDISC   00000020            

UCB$L_TT_STATE   00000074            UCB$V_NT_BREAK = 00000005            VEC$L_UNITINIT   00000018            

UCB$L_TT_TYPAHD  00000088            UCB$V_NT_NAME  = 00000004            VEC$M_MAPLOCK  = 00008000            

UCB$L_VCB        00000030            UCB$V_ONLINE   = 00000004            VEC$M_PATHLOCK = 00000080            

UCB$M_BACKP    = 00000020            UCB$V_POWER    = 00000005            VEC$Q_DISPATCH   00000000            

UCB$M_BSY      = 00000100            UCB$V_PRMMBX   = 00000000            VEC$S_DATAPATH = 00000007            

UCB$M_CANCEL   = 00000008            UCB$V_SEGFLO   = 00000002            VEC$S_MAPREG   = 0000000F            

UCB$M_DEADMO   = 00000400            UCB$V_TIM      = 00000000            VEC$V_DATAPATH = 00000000            

UCB$M_DELMBX   = 00000002            UCB$V_TIMOUT   = 00000006            VEC$V_MAPLOCK  = 0000000F            

UCB$M_DIAGBUF  = 00000002            UCB$V_TT_NOTIF = 00000002            VEC$V_MAPREG   = 00000000            

UCB$M_DX_WRITE = 00000008            UCB$V_TT_ODD   = 00000007            VEC$V_PATHLOCK = 00000007            

UCB$M_ECC      = 00000001            UCB$V_TT_PARTY = 00000006            VEC$W_MAPREG     00000010            

UCB$M_ERLOGIP  = 00000004            UCB$V_TT_SPEED = 00000000            W              = 00000001            

UCB$M_INT      = 00000002            UCB$V_TT_TIMO  = 00000001            X              = 00000000            

UCB$M_INTTYPE  = 00000080            UCB$V_UNLOAD   = 0000000C            Z              = 00000001            

UCB$M_JOB      = 00000001            UCB$V_VALID    = 0000000B            

UCB$M_MOUNTING = 00000200            UCB$W_BCNT       0000006E            

UCB$M_NOCNVRT  = 00000004            UCB$W_BCR        00000096            

UCB$M_NT_BFROVF= 00000004            UCB$W_BOFF       0000006C            

UCB$M_NT_BREAK = 00000020            UCB$W_BUFQUO     00000018            

UCB$M_NT_NAME  = 00000010            UCB$W_BYTESTOGO  0000003E            

UCB$M_ONLINE   = 00000010            UCB$W_CHARGE     0000004A            

UCB$M_POWER    = 00000020            UCB$W_CYLINDERS  0000003E            

UCB$M_PRMMBX   = 00000001            UCB$W_DA         0000008C            

UCB$M_TIM      = 00000001            UCB$W_DC         0000008E            

UCB$M_TIMOUT   = 00000040            UCB$W_DEVBUFSIZ  0000003A            

UCB$M_TT_NOTIF = 00000004            UCB$W_DEVSTS     0000005A            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 20:59:57   VAX-11 MACRO X0.3-11               Page  18

PROGRAM SECTION SYNOPSIS                                                                                                        (11)







PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            FFFFFFFE      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

$$$115_DRIVER    00000293      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

7142. BYTES LEFT IN FREE MEMORY POOL.

2122. BYTES OF RECLAIMED MEMORY.

OBJ$:TTYSUB,LIS$:TTYSUB/-SP=EXECML$/ML,SRC$:TTYSUB

12 MLB DIR RDS - 1060 GETS TO DEFINE 25 MACROS. 83 INTER. FILE WRITES. 

