TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



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

   (3)      87  TTY$SETUP_UCB - SET UP DEVICE UCB ON SYSTEM INI

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

   (5)     178  TTY$BEG_BRDCST - BEGIN BRAODCAST OPERATION ON U

   (6)     217  TTY$SIGNAL_ATTN - SIGNAL ATTENTION FOR HANGUP,U

   (7)     318  TTY$PURGE_AHEAD - PURGE TYPEAHEAD BUFFER 

   (8)     346  ATTENTION - UNIT TIMEOUT,POWERFAIL ATTENTION RO

   (9)     368  TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   1

X05                                                                                                                              (1)



                                     0000     1 	.TITLE	TTYSUB - TERMINAL DRIVER SUBROUTINES

                                     0000     2 	.IDENT	/X05/

                                     0000     3 ;

                                     0000     4 ; COPYRIGHT (C) 1977

                                     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 	$PRDEF				; DEFINE PROCESSOR REGISTERS

                                     0000    46 	$UCBDEF				; DEFINE UCB

                                     0000    47 	$TTDEF				; DEFINE TERMINAL CHARACTERISTICS

                                     0000    48 	$TTYDEF				; DEFINE TERMINAL DRIVER SYMBOLS

                                     0000    49 	$TTYUCBDEF			; DEFINE TERMINAL DRIVER SYMBOLS

                                     0000    50 	$VECDEF				; DEFINE CRB VECTOR

                                     0000    51 	TTYMACS				; DEFINE TERMINAL MACROS

                                     0000    52  

                                 00000000    53 	.PSECT	WIONONPAGED		; DEFINE NON-PAGED PSECT

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   2

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



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

                                     0000    56 ;++

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

                                     0000    58 ;

                                     0000    59 ; FUNCTIONAL DESCRIPTION:

                                     0000    60 ;

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

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

                                     0000    63 ;

                                     0000    64 ; SUBSEQUENT RETURN CAUSES IPL TO BE RETURNED.

                                     0000    65 ;

                                     0000    66 ; INPUTS:

                                     0000    67 ;

                                     0000    68 ;	R5 = UCB ADDRESS

                                     0000    69 ;

                                     0000    70 ; OUTPUTS:

                                     0000    71 ;

                                     0000    72 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     0000    73 ;	R5 = UCB ADDRESS

                                     0000    74 ;--

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

                          52   8ED0  0000    76 	POPL	R2			; POP RETURN ADDRESS

            7E            12     DB  0003    77 	MFPR	#PR$_IPL,-(SP)		; SETUP IPL 

            6E         52 A5     91  0006    78 	CMPB	UCB$B_DIPL(R5),(SP)	;

                          04     1B  000A    79 	BLEQU	10$			; IF LEQU THEN OK

                                     000C    80 	SETIPL	UCB$B_DIPL(R5)		; DISABLE INTERRUPTS

                          52     DD  0010    81 10$:	PUSHL	R2			; SETUP DIRECT RETURN

            52         D4 A5     9E  0012    82 	MOVAB	UCB$L_TT_STATE(R5),R2	; SETUP VECTOR POINTER

                          9E     16  0016    83 	JSB	@(SP)+			; CALL CALLER BACK

                                     0018    84 	ENBINT				; ENABLE INTERRUPTS

                                 05  001B    85 	RSB				;

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   3

X05             TTY$SETUP_UCB - SET UP DEVICE UCB ON SYSTEM INI                                                                  (3)



                                     001C    87 	.SBTTL	TTY$SETUP_UCB - SET UP DEVICE UCB ON SYSTEM INIT

                                     001C    88 ;++

                                     001C    89 ; TTY$SETUP_UCB - SET UP UCB ON SYSTEM INIT

                                     001C    90 ;

                                     001C    91 ; FUNCTIONAL DESCRIPTION:

                                     001C    92 ;

                                     001C    93 ; THIS ROUTINE IS ENTERED DURING SYSTEM STARTUP TO SET UP TERMINAL UCB'S.

                                     001C    94 ;

                                     001C    95 ; INPUTS:

                                     001C    96 ;

                                     001C    97 ;	R5 = UCB ADDRESS

                                     001C    98 ;

                                     001C    99 ; OUTPUTS:

                                     001C   100 ;

                                     001C   101 ;	R5 = UCB ADDRESS

                                     001C   102 ;

                                     001C   103 ;	R0-R4 ARE PRESERVED.

                                     001C   104 ;--

                                     001C   105 TTY$SETUP_UCB::				; SET UP THE UCB

                          3F     BB  001C   106 	PUSHR	#^M<R0,R1,R2,R3,R4,R5>	;

         D4 A5            00     2C  001E   107 	MOVC5	#0,UCB$L_TT_STATE(R5),#0,#UCB$B_TT_CRFILL-UCB$L_TT_STATE,UCB$L_TT_STATE(R5)

            25            00         0022       

                       D4 A5         0024       

                          3F     BA  0026   108 	POPR	#^M<R0,R1,R2,R3,R4,R5>

                       FE A5     B6  0028   109 	INCW	UCB$W_TT_CURSOR(R5)	; SET BAD CURSOR TO FORCE CRLF

         F4 A5            01     8E  002B   110 	MNEGB	#1,UCB$W_TT_HOLD(R5)	;

                                 05  002F   111 	RSB

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   4

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



                                     0030   113 	.SBTTL	TTY$CANCELIO - CANCEL I/O ON TERMINAL

                                     0030   114 ;++

                                     0030   115 ; TTY$CANCELIO - CANCEL I/O, DEASSIGN, AND DEALLOCATE

                                     0030   116 ;

                                     0030   117 ; FUNCTIONAL DESCRIPTION:

                                     0030   118 ;

                                     0030   119 ; THIS ROUTINE IS ENTERED TO STOP CURRENT I/O ON THIS UNIT.

                                     0030   120 ;

                                     0030   121 ; ANY BROADCAST,READ OR WRITE FUNCTION IS STOPED ALONG WITH THE FLUSHING

                                     0030   122 ; OF CONTROL C AST ENABLES.

                                     0030   123 ;

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

                                     0030   125 ; Y AST'S ARE FLUSHED AND THE TYPEAHEAD BUFFER IS DEALLOCATED.

                                     0030   126 ;

                                     0030   127 ; INPUTS:

                                     0030   128 ;

                                     0030   129 ;	R2 = NEGITIVE OF THE CHANNEL NUMBER

                                     0030   130 ;	R3 = CURRENT I/O PACKET

                                     0030   131 ;	R4 = PCB OF CANCELING PROCESS

                                     0030   132 ;	R5 = UCB ADDRESS OF THE UNIT TO CANCELIO

                                     0030   133 ;

                                     0030   134 ; OUTPUTS:

                                     0030   135 ;

                                     0030   136 ;	R4,R5 ARE PRESERVED

                                     0030   137 ;--

                                     0030   138 TTY$CANCELIO::				; CANCELIO TTY USAGE

            7E            56     7D  0030   139 	MOVQ	R6,-(SP)		; SAVE REGISTERS

                       80'AF     9F  0033   140 	PUSHAB	B^40$			; SET UP RETURN ADDRESS

            56            52     D0  0036   141 	MOVL	R2,R6			; COPY CHANNEL NUMBER

                          C5     10  0039   142 	BSBB	TTY$LOCK		; SETUP IPL AND REGISTERS

         58 A5            08     E1  003B   143 5$:	BBC	#UCB$V_BSY,UCB$W_STS(R5),20$; BR IF NOT BUSY

                          1B         003F       

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

                          06     12  0045   145 	BNEQ	10$			; IF NEQ THEN NO CANCEL

         28 A3            56     B1  0047   146 	CMPW	R6,IRP$W_CHAN(R3)	; CHANNEL MATCH?

                          06     13  004B   147 	BEQL	15$			; IF EQL THEN STOP I/O

                                     004D   148 10$:	IF_NOT_STATE BRDCST,20$		; 

                          54     DD  0053   149 15$:	PUSHL	R4

                          0153   30  0055   150 	BSBW	TTY$STOPIO		; STOP I/O

                          54   8ED0  0058   151 	POPL	R4

                                     005B   152 ;

                                     005B   153 ; RELEASE THE CONTROL C AST BLOCKS

                                     005B   154 ;

            57         E0 A5     9E  005B   155 20$:	MOVAB	UCB$L_TT_CTRLC(R5),R7	; GET THE CONTROL C ENABLE

                          FF9E'  30  005F   156 	BSBW	COM$FLUSHATTNS

                                     0062   157 ;

                                     0062   158 ; SEE IF THIS IS THE LAST DEASSIGN

                                     0062   159 ;

                          50     D4  0062   160 30$:	CLRL	R0			; SET NO TYPEAHEAD BUFFER

                       50 A5     B5  0064   161 	TSTW	UCB$W_REFC(R5)		; REF COUNT 0?

                          16     12  0067   162 	BNEQ	35$			; KEEP JOB CONTROLLER AND TYPEAHEAD

            57         DC A5     9E  0069   163 	MOVAB	UCB$L_TT_CTRLY(R5),R7	; ADDRESS LIST HEAD FOR ASTS

                          FF90'  30  006D   164 	BSBW	COM$FLUSHATTNS		; FLUSH ATTENTION ASTS

                                     0070   165 ;

                                     0070   166 ; REMOVE THE TYPEAHEAD BUFFER FROM THE UCB

                                     0070   167 ;

            50         E8 A5     D0  0070   168 	MOVL	UCB$L_TT_TYPAHD(R5),R0	; GET IT

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   5

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



                       E8 A5     D4  0074   169 	CLRL	UCB$L_TT_TYPAHD(R5)	; SET NONE TO USE

                       F6 A5     94  0077   170 	CLRB	UCB$W_TT_INAHD(R5)	; SET NO CHARACTERS IN TYPEAHEAD

         5A A5            00     E5  007A   171 	BBCC	#UCB$V_JOB,UCB$W_DEVSTS(R5),35$; RESET JOB CONTROLLER BIT

                          00         007E       

                                 05  007F   172 35$:	RSB				; REENABLE INTERRUPTS

            56            8E     7D  0080   173 40$:	MOVQ	(SP)+,R6		; RESTORE REGISTERS

                          50     D5  0083   174 	TSTL	R0			; TYPEAHEAD BUFFER?

                          F8     13  0085   175 	BEQL	35$			; IF EQL THEN NO

                          FF76'  31  0087   176 	BRW	EXE$DEANONPAGED		; DEALLOCATE IT

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   6

X05             TTY$BEG_BRDCST - BEGIN BRAODCAST OPERATION ON U                                                                  (5)



                                     008A   178 	.SBTTL	TTY$BEG_BRDCST - BEGIN BRAODCAST OPERATION ON UNIT

                                     008A   179 ;++

                                     008A   180 ; TTY$BEG_BRDCST - BEGIN BROADCAST ON UNIT

                                     008A   181 ;

                                     008A   182 ; FUNCTIONAL DESCRIPTION:

                                     008A   183 ;

                                     008A   184 ;

                                     008A   185 ; THIS ROUTINE IS ENTERED DIRECTLY FRON THE BROADCAST SYSTEM SERVICE TO

                                     008A   186 ; BEGIN A BROADCAST OPERATION ON A UNIT.

                                     008A   187 ;

                                     008A   188 ; INPUTS:

                                     008A   189 ;

                                     008A   190 ;	R0 = SS$_DEVOFFLINE

                                     008A   191 ;	R5 = UCB ADDRESS

                                     008A   192 ;	R7 = ADDRESS OF THE INITIAL MESSAGE BLOCK TO PROCESS

                                     008A   193 ;

                                     008A   194 ; OUTPUTS:

                                     008A   195 ;

                                     008A   196 ;	R0 = STATUS OF OPERATION

                                     008A   197 ;	R5,R7 ARE PRESERVED.

                                     008A   198 ;--

                                     008A   199 TTY$BEG_BRDCST::			; BEGIN BROADCAST OPERATION

                          FF73   30  008A   200 	BSBW	TTY$LOCK		; LOCK THE UNIT DATA BASE

         3C A5            03     D3  008D   201 	BITL	#TT$M_PASSALL!TT$M_NOECHO,UCB$L_DEVDEPEND(R5); PERM PASSALL OR NOECHO?

                          24     12  0091   202 	BNEQ	100$			; BR IF TRUE

                                     0093   203 	CASE	TYPE=B,TTY$B_BD_WHO(R7),<20$,10$,20$>

                                     009E   204 ;

                                     009E   205 ;  CHECK FOR IN USE TERMINAL

                                     009E   206 ;

                       50 A5     B5  009E   207 10$:	TSTW	UCB$W_REFC(R5)		; REF COUNT #0?

                          14     13  00A1   208 	BEQL	100$			; IF EQL THEN NOT IN USE

                       16 A7     96  00A3   209 20$:	INCB	TTY$B_BD_REFC(R7)	; ADJUST REF COUNT ON BUFFER

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

            62            07     E2  00AA   211 	BBSS	#TTY$V_ST_BRDCST,(R2),100$; IF ALREADY SET THEN EXIT, BUT SET

                          09         00AD       

            54            57     D0  00AE   212 	MOVL	R7,R4			; ADDRESS BLOCK

                          FF4C'  30  00B1   213 	BSBW	TTY$STRT_BRDCST		; ACTUALLY START THE BROADCAST

                          FF49'  31  00B4   214 	BRW	TTY$STARTOUTPUT		; BEGIN OUTPUT

                                 05  00B7   215 100$:	RSB				; RETURN

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   7

X05             TTY$SIGNAL_ATTN - SIGNAL ATTENTION FOR HANGUP,U                                                                  (6)



                                     00B8   217 	.SBTTL	TTY$SIGNAL_ATTN - SIGNAL ATTENTION FOR HANGUP,UNSOL DATA AND TYPEAHEAD

                                     00B8   218 ;++

                                     00B8   219 ; TTY$SIGNAL_ATTN - SIGNAL ATTENTION FORK ROUTINE

                                     00B8   220 ;

                                     00B8   221 ; FUNCTIONAL DESCRIPTION:

                                     00B8   222 ;

                                     00B8   223 ; THIS ROUTINE FORKS ON THE UCB FOR ANY ONE OF THREE REASONS

                                     00B8   224 ;

                                     00B8   225 ;	1. HANG-UP DETECTED - SEND MESSAGE TO OWNER

                                     00B8   226 ;	2. UNSOLICITED DATA - SEND MESSAGE TO OWNER

                                     00B8   227 ;	3. NO TYPEAHEAD BUFFER - ALLOCATE ONE

                                     00B8   228 ;

                                     00B8   229 ; THE ROUTINE PROCESSES ALL MEANINGFUL CONDITIONS OF THE THREE.

                                     00B8   230 ;

                                     00B8   231 ; INPUTS:

                                     00B8   232 ;

                                     00B8   233 ;	R2 = UNIT STATE VECTOR ADDRESS

                                     00B8   234 ;	R3 = CHARACTER TO BUFFER FOR TYPEAHEAD NEEDED

                                     00B8   235 ;	R5 = UCB ADDRESS

                                     00B8   236 ;

                                     00B8   237 ; OUTPUTS:

                                     00B8   238 ;

                                     00B8   239 ;	R2,R3,R5 ARE PRESERVED.

                                     00B8   240 ;--

                                     00B8   241 TTY$SIGNAL_ATTN::			; SIGNAL ATTENTION

                       C0'AF     9F  00B8   242 	PUSHAB	B^TTY$FORK_ADDR		; SET FORK ROUTINE ADDRESS

                          FF42'  31  00BB   243 	BRW	EXE$FORK		; CREATE FORK PROCESS

                               00DC' 00BE   244 	.WORD	ATTENTION-.		; SET UP ATTENTION AST

                                     00C0   245 TTY$FORK_ADDR::

                                     00C0   246 ;

                                     00C0   247 ; ATTENTION FORK PROCESS

                                     00C0   248 ;

            52         D4 A5     9E  00C0   249 5$:	MOVAB	UCB$L_TT_STATE(R5),R2	; ADDRESS UNIT ATTENTION

                                     00C4   250 	IF_NOT_STATE HANGUP,40$		; BR IF NOT HANGUP

                                     00CA   251 ;

                                     00CA   252 ; SEND MESSAGE

                                     00CA   253 ;

            54            06     9A  00CA   254 	MOVZBL	#MSG$_TRMHANGUP,R4	; SET MESSAGE ADDRESS

            53         54 A5     D0  00CD   255 	MOVL	UCB$L_AMB(R5),R3	; GET MAILBOX UCB

                          17     13  00D1   256 	BEQL	20$			; IF EQL THEN NO BOX

                          FF2A'  30  00D3   257 	BSBW	EXE$SNDEVMSG		; SEND THE DEVICE MESSAGE

            11            50     E8  00D6   258 	BLBS	R0,20$			; IF LOW SET THEN OK

         F3 A5            04     90  00D9   259 	MOVB	#TTY$C_DS_HANG-1,UCB$B_TT_DIAL(R5); FORCE A RESET ON FUTURE TIMER

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

            01         48 A5     78  00E1   261 	ASHL	UCB$W_UNIT(R5),#1,R3	; SET ATTENTION ON UNIT

                          53         00E5       

         04 A4            53     88  00E6   262 	BISB	R3,CRB$B_TT_ATTN(R4)	; 

                                     00EA   263 20$:	CLR_STATE <UNSOL,HANGUP,GETAHD>

                                 05  00EE   264 	RSB

                                     00EF   265 ;

                                     00EF   266 ; HANDLE UNSOLICTED DATA

                                     00EF   267 ;

            62            1A     E5  00EF   268 40$:	BBCC	#TTY$V_ST_UNSOL,(R2),70$; 

                          3B         00F2       

                                     00F3   269 ;

                                     00F3   270 ; SEND UNSOLICTED DATA MESSAGE

                                     00F3   271 ;

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   8

X05             TTY$SIGNAL_ATTN - SIGNAL ATTENTION FOR HANGUP,U                                                                  (6)



            54            01     9A  00F3   272 	MOVZBL	#MSG$_TRMUNSOLIC,R4	; SET MESSAGE TYPE

                       50 A5     B5  00F6   273 	TSTW	UCB$W_REFC(R5)		; IF REF COUNT 0 THEN 

                          0D     13  00F9   274 	BEQL	50$			; JOB CONTROLLER

            53         54 A5     D0  00FB   275 	MOVL	UCB$L_AMB(R5),R3	; GET USER'S MAILBOX

                          2D     13  00FF   276 	BEQL	70$			; IF EQL THEN NONE

         5A A5            02     E0  0101   277 	BBS	#UCB$V_TT_NOTIF,UCB$W_DEVSTS(R5),70$; BR IF ALREADY NOTIFIED

                          28         0105       

                          0C     11  0106   278 	BRB	55$			; CONTINUE

            53   00000000'EF     9E  0108   279 50$:	MOVAB	SYS$GL_JOBCTLMB,R3	; ADDRESS JOB CONTROLLER MAILBOX

         5A A5            00     E0  010F   280 	BBS	#UCB$V_JOB,UCB$W_DEVSTS(R5),70$; BR IF NOTIFIED ALREADY

                          1A         0113       

                          52     DD  0114   281 55$:	PUSHL	R2

                          FEE7'  30  0116   282 	BSBW	EXE$SNDEVMSG		; SEND THE MESSAGE

                          52   8ED0  0119   283 	POPL	R2

            0F            50     E9  011C   284 	BLBC	R0,70$			; IF FAILED THEN LEAVE DATA BASE UNCHANGED

                       50 A5     B5  011F   285 	TSTW	UCB$W_REFC(R5)		; REF COUNT 0?

                          06     12  0122   286 	BNEQ	60$			; IF NEQ THEN USER

         5A A5            01     A8  0124   287 	BISW	#UCB$M_JOB,UCB$W_DEVSTS(R5); SET NOTIFIED

                          04     11  0128   288 	BRB	70$			; LOOK TO UNSOLICTED DATA

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

                                     012E   290 ;

                                     012E   291 ; CHECK FOR TYPEAHEAD BUFFER FETCH

                                     012E   292 ;

            62            19     E5  012E   293 70$:	BBCC	#TTY$V_ST_GETAHD,(R2),80$

                          38         0131       

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

                       E8 A5     D5  0137   295 	TSTL	UCB$L_TT_TYPAHD(R5)	; ALREADY ALLOCATED?

                          2E     12  013A   296 	BNEQ	80$			; IF NEQ THEN YES

                          FEC1'  30  013C   297 	BSBW	EXE$ALONONPAGED		; 

            28            50     E9  013F   298 	BLBC	R0,80$			; IF FAILURE THEN TOUGH

         08 A2            51     B0  0142   299 	MOVW	R1,TTY$W_TA_SIZE(R2)	; SET UP SIZE

         0C A2            6241   9E  0146   300 	MOVAB	(R2)[R1],TTY$L_TA_END(R2); SET UP END POINTER

         0A A2            14     90  014B   301 	MOVB	#DYN$C_TYPAHD,TTY$B_TA_TYPE(R2);

         10 A2         10 A5     90  014F   302 	MOVB	UCB$L_FR3(R5),TTY$L_TA_DATA(R2); INSERT DATA

            54            52     D0  0154   303 	MOVL	R2,R4			; SAVE ADDRESS OF THE BUFFER

                       6A'AF     9F  0157   304 	PUSHAB	B^80$			; SET UP CO-ROUTINE RETURN

                          FEA3   30  015A   305 	BSBW	TTY$LOCK		; LOCK DATA BASE

         E8 A5            54     D0  015D   306 	MOVL	R4,UCB$L_TT_TYPAHD(R5)	; STORE ADDRESS

                          1F     10  0161   307 	BSBB	TTY$PURGE_AHEAD		; SET UP THE BLOCK

                       E8 B5     D6  0163   308 	INCL	@UCB$L_TT_TYPAHD(R5)	; POINT TO NEXT PLACE

                       F6 A5     B6  0166   309 	INCW	UCB$W_TT_INAHD(R5)	;

                                 05  0169   310 75$:	RSB				; RETURN TO CALLER

                                     016A   311 80$:	IF_NOT_STATE <UNSOL,HANGUP,GETAHD>,100$; EXIT IF DONE

                          FF4D   31  0170   312 	BRW	5$			; OTHERWISE TRY AGAIN

                                     0173   313 100$:	IF_STATE BRDCST,75$

                       ED AF     9F  0179   314 	PUSHAB	B^75$			; SET UP UNLOCK

                          FE81   30  017C   315 	BSBW	TTY$LOCK		; SET IPL AND BEGIN

                          FE7E'  31  017F   316 	BRW	TTY$STARTOUTPUT

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page   9

X05             TTY$PURGE_AHEAD - PURGE TYPEAHEAD BUFFER                                                                         (7)



                                     0182   318 	.SBTTL TTY$PURGE_AHEAD - PURGE TYPEAHEAD BUFFER 

                                     0182   319 ;++

                                     0182   320 ; TTY$PURGE_AHEAD - PURGE THE CONTENTS OF THE TYPEAHEAD BUFFER

                                     0182   321 ;

                                     0182   322 ; FUNCTIONAL DESCRIPTION:

                                     0182   323 ;

                                     0182   324 ; THIS ROUTINE RESETS THE TYPEAHEAD BUFFER POINTERS TO REFLECT NO 

                                     0182   325 ; DATA PRESENT.

                                     0182   326 ;

                                     0182   327 ; INPUTS:

                                     0182   328 ;

                                     0182   329 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     0182   330 ;	R5 = UCB ADDRESS

                                     0182   331 ;

                                     0182   332 ; OUTPUTS:

                                     0182   333 ;

                                     0182   334 ;	R2,R3,R5 ARE PRESERVED.

                                     0182   335 ;--

                                     0182   336 TTY$PURGE_AHEAD::			; PURGE TYPEAHEAD

                       F6 A5     B4  0182   337 	CLRW	UCB$W_TT_INAHD(R5)	; SET NO DATA IN TYPEAHEAD BUFFER

            54         E8 A5     D0  0185   338 	MOVL	UCB$L_TT_TYPAHD(R5),R4	; GET TYPE AHEAD BUFFER ADDRESS

                          0E     13  0189   339 	BEQL	55$			; IF EQL THEN NONE

            64         10 A4     9E  018B   340 	MOVAB	TTY$L_TA_DATA(R4),TTY$L_TA_PUT(R4); RESET PUT POINTER

            64            84     D0  018F   341 	MOVL	(R4)+,(R4)		; RESET GET POINTER

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

                          03         0195       

                                     0196   343 	SET_STATE XON			; SET TO SEND XON

                                 05  0199   344 55$:	RSB

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page  10

X05             ATTENTION - UNIT TIMEOUT,POWERFAIL ATTENTION RO                                                                  (8)



                                     019A   346 	.SBTTL	ATTENTION - UNIT TIMEOUT,POWERFAIL ATTENTION ROUTINE

                                     019A   347 ;++

                                     019A   348 ; ATTENTION - UNIT TIMEOUT,POWERFAIL ATTENTION ROUTINE

                                     019A   349 ;

                                     019A   350 ; THIS ROUTINE IS ENTERED VIA THE UCB$L_FPC ON POWERFAIL OR TIMEOUT.

                                     019A   351 ; THE ACTION IS TO RESTART THE I/O IF THE POWER FAILED AND TO CANCEL IT

                                     019A   352 ; IF A TIMEOUT OCCURED.

                                     019A   353 ;

                                     019A   354 ; INPUTS:

                                     019A   355 ;

                                     019A   356 ;	R5 = UCB ADDRESS

                                     019A   357 ;

                                     019A   358 ; OUTPUTS:

                                     019A   359 ;

                                     019A   360 ;	R5 = UCB ADDRESS

                                     019A   361 ;--

                                     019A   362 ATTENTION:				; ATTENTION INTERRUPT

                          FE63   30  019A   363 	BSBW	TTY$LOCK		; SET IPL AND REGISTERS

         58 A5            05     E1  019D   364 	BBC	#UCB$V_POWER,UCB$W_STS(R5),5$; CANCEL IF NOT POWERFAIL

                          03         01A1       

                          FE5B'  31  01A2   365 	BRW	TTY$STARTOUTPUT		; RESTART OUTPUT

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

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page  11

X05             TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL                                                                  (9)



                                     01AB   368 	.SBTTL	TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL

                                     01AB   369 ;++

                                     01AB   370 ; TTY$STOPIO - HALT CURRENT OPERATION ON TERMINAL

                                     01AB   371 ;

                                     01AB   372 ; FUNCTIONAL DESCRIPTION:

                                     01AB   373 ;

                                     01AB   374 ; THIS ROUTINE IS ENTERED WHEN IT IS NECESSARY TO SHUT THE UNIT OFF.

                                     01AB   375 ; BROADCASTS,READS AND WRITES ARE STOPED.

                                     01AB   376 ;

                                     01AB   377 ; INPUTS:

                                     01AB   378 ;

                                     01AB   379 ;	UCB$W_BOFF CONTAINS THE STATUS, UCB$W_BCNT CONTAINS THE TRANSFER COUNT

                                     01AB   380 ;

                                     01AB   381 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     01AB   382 ;	R5 = UCB ADDRESS

                                     01AB   383 ;

                                     01AB   384 ; OUTPUTS:

                                     01AB   385 ;

                                     01AB   386 ;	R2 = ADDRESS OF THE UNIT STATE VECTOR

                                     01AB   387 ;	R5 = UCB ADDRESS

                                     01AB   388 ;--

                                     01AB   389 TTY$STOPIO::				; HALT OPERATION ON UNIT

                                     01AB   390 	IF_NOT_STATE BRDCST,10$		

                          FE4C'  30  01B1   391 	BSBW	TTY$STOP_BRDCST		; STOP THE BROADCAST

                                     01B4   392 10$:					;

                                     01B4   393 	IF_NOT_STATE READ,20$

                                     01BA   394 	CLR_STATE	<ESC,BADESC>

            54         4C A5     D0  01BE   395 	MOVL	UCB$L_IRP(R5),R4	; GET CURRENT PACKET

                       34 A4     D4  01C2   396 	CLRL	IRP$L_MEDIA(R4)		; SET NO TERMINATORS

                          FE38'  30  01C5   397 	BSBW	TTY$READONE		; COMPLETE READ

                                     01C8   398 20$:	IF_NOT_STATE WRITE,30$

                          FE2F'  30  01CE   399 	BSBW	TTY$WRITEDONE

                                 05  01D1   400 30$:	RSB

                                     01D2   401 	.END

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page  12

SYMBOL TABLE                                                                                                                     (9)



ATTENTION        0000019A R     03   EXE$DEANONPAGED  ********   X   03   IRP$V_PAGIO    = 00000002            

BIT...         = 00000008            EXE$FORK         ********   X   03   IRP$V_PHYSIO   = 00000008            

COM$FLUSHATTNS   ********   X   03   EXE$SNDEVMSG     ********   X   03   IRP$V_PRIVIO   = 00000009            

CRB$B_MASK       0000000E            GBL...         = 00000000            IRP$V_SWAPIO   = 00000006            

CRB$B_TT_ATTN    00000004            IPL$_ASTDEL    = 00000002            IRP$V_VIRTUAL  = 00000004            

CRB$B_TT_EXPEC   00000005            IPL$_HWCLK     = 00000018            IRP$W_ABCNT      0000003C            

CRB$B_TYPE       0000000A            IPL$_IOPOST    = 00000004            IRP$W_BCNT       00000032            

CRB$C_LENGTH     00000028            IPL$_MAILBOX   = 0000000B            IRP$W_BOFF       00000030            

CRB$K_LENGTH     00000028            IPL$_POWER     = 0000001F            IRP$W_CHAN       00000028            

CRB$L_INTD       00000014            IPL$_QUEUEAST  = 00000006            IRP$W_FUNC       00000020            

CRB$L_LINK       00000010            IPL$_SCHED     = 00000003            IRP$W_OBCNT      0000003E            

CRB$L_TT_DIAL    00000000            IPL$_SYNCH     = 00000007            IRP$W_SIZE       00000008            

CRB$L_WQBL       00000004            IPL$_TIMER     = 00000007            IRP$W_STS        0000002A            

CRB$L_WQFL       00000000            IRP$B_CARCON     00000038            IRP$W_TT_PRMPT   0000003C            

CRB$M_BSY      = 00000001            IRP$B_EFN        00000022            MSG$_ABOOPR    = 00000011            

CRB$V_BSY      = 00000000            IRP$B_PRI        00000023            MSG$_ABORT     = 00000030            

CRB$W_REFC       0000000C            IRP$B_RMOD       0000000B            MSG$_CONFIRM   = 00000031            

CRB$W_SIZE       00000008            IRP$B_TYPE       0000000A            MSG$_CONNECT   = 00000032            

DYN$C_ACB      = 00000002            IRP$C_LENGTH     0000004C            MSG$_CRUNSOLIC = 00000002            

DYN$C_ADP      = 00000001            IRP$K_LENGTH     0000004C            MSG$_DELPROC   = 00000003            

DYN$C_AQB      = 00000003            IRP$L_AST        00000010            MSG$_DELSMB    = 00000014            

DYN$C_BRDCST   = 0000001A            IRP$L_ASTPRM     00000014            MSG$_DEVOFFLIN = 00000005            

DYN$C_BUFIO    = 00000013            IRP$L_DIAGBUF    00000044            MSG$_DEVONLIN  = 00000007            

DYN$C_CEB      = 00000004            IRP$L_IOQBL      00000004            MSG$_DISCON    = 00000033            

DYN$C_CIR      = 0000001E            IRP$L_IOQFL      00000000            MSG$_EXIT      = 00000034            

DYN$C_CRB      = 00000005            IRP$L_IOSB       00000024            MSG$_INIOPR    = 00000010            

DYN$C_CXB      = 0000001B            IRP$L_IOST1      00000034            MSG$_INTMSG    = 00000035            

DYN$C_DDB      = 00000006            IRP$L_IOST2      00000038            MSG$_OPREPLY   = 00000009            

DYN$C_FCB      = 00000007            IRP$L_MEDIA      00000034            MSG$_OPRQST    = 00000008            

DYN$C_FRK      = 00000008            IRP$L_PID        0000000C            MSG$_PATHLOST  = 00000036            

DYN$C_GSD      = 00000015            IRP$L_SEGVBN     00000040            MSG$_PROTOCOL  = 00000037            

DYN$C_IDB      = 00000009            IRP$L_SEQNUM     00000048            MSG$_REJECT    = 00000038            

DYN$C_IRP      = 0000000A            IRP$L_SVAPTE     0000002C            MSG$_RESOPR    = 00000013            

DYN$C_JPB      = 0000001F            IRP$L_TT_TERM    00000038            MSG$_SMBDON    = 00000009            

DYN$C_KFH      = 00000026            IRP$L_UCB        0000001C            MSG$_SMBINI    = 00000008            

DYN$C_KFI      = 00000018            IRP$L_WIND       00000018            MSG$_SMBRSP    = 00000020            

DYN$C_LOG      = 0000000B            IRP$M_BUFIO    = 00000001            MSG$_SNDACC    = 0000000A            

DYN$C_MTL      = 00000019            IRP$M_CHAINED  = 00000020            MSG$_SNDSMB    = 00000004            

DYN$C_MVL      = 00000016            IRP$M_COMPLX   = 00000008            MSG$_SUSOPR    = 00000012            

DYN$C_NDB      = 0000001C            IRP$M_DIAGBUF  = 00000080            MSG$_THIRDPARTY= 00000039            

DYN$C_NET      = 00000017            IRP$M_FUNC     = 00000002            MSG$_TRMHANGUP = 00000006            

DYN$C_PBH      = 00000020            IRP$M_PAGIO    = 00000004            MSG$_TRMUNSOLIC= 00000001            

DYN$C_PCB      = 0000000C            IRP$M_PHYSIO   = 00000100            MSG$_XM_ATTN   = 0000000D            

DYN$C_PDB      = 00000021            IRP$M_PRIVIO   = 00000200            MSG$_XM_DATAVL = 0000000B            

DYN$C_PFL      = 00000023            IRP$M_SWAPIO   = 00000040            MSG$_XM_SHUTDN = 0000000C            

DYN$C_PIB      = 00000022            IRP$M_VIRTUAL  = 00000010            PCB$B_ASTACT     0000000C            

DYN$C_PQB      = 0000000D            IRP$S_FCODE    = 00000006            PCB$B_ASTEN      0000000D            

DYN$C_PTR      = 00000025            IRP$S_FMOD     = 0000000A            PCB$B_PRI        0000000B            

DYN$C_RVT      = 0000000E            IRP$S_MODE     = 00000002            PCB$B_PRIB       00000033            

DYN$C_SFT      = 00000024            IRP$V_BUFIO    = 00000000            PCB$B_TYPE       0000000A            

DYN$C_SSB      = 0000001D            IRP$V_CHAINED  = 00000005            PCB$B_WEFC       00000032            

DYN$C_TQE      = 0000000F            IRP$V_COMPLX   = 00000003            PCB$C_LENGTH     0000007C            

DYN$C_TYPAHD   = 00000014            IRP$V_DIAGBUF  = 00000007            PCB$K_LENGTH     0000007C            

DYN$C_UCB      = 00000010            IRP$V_FCODE    = 00000000            PCB$L_ASTQBL     00000014            

DYN$C_VCB      = 00000011            IRP$V_FMOD     = 00000006            PCB$L_ASTQFL     00000010            

DYN$C_WCB      = 00000012            IRP$V_FUNC     = 00000001            PCB$L_EFC2P      00000058            

EXE$ALONONPAGED  ********   X   03   IRP$V_MODE     = 00000000            PCB$L_EFC3P      0000005C            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page  13

SYMBOL TABLE                                                                                                                     (9)



PCB$L_EFCS       00000050            PR$_ASTLVL     = 00000013            TT$M_EIGHTBIT  = 00008000            

PCB$L_EFCU       00000054            PR$_ESP        = 00000001            TT$M_ESCAPE    = 00000008            

PCB$L_EFWM       0000004C            PR$_ICCS       = 00000018            TT$M_HOLDSCREEN= 00004000            

PCB$L_OWNER      0000001C            PR$_ICR        = 0000001A            TT$M_HOSTSYNC  = 00000010            

PCB$L_PHD        00000064            PR$_IPL        = 00000012            TT$M_LFFILL    = 00000800            

PCB$L_PHYPCB     00000018            PR$_ISP        = 00000004            TT$M_LOWER     = 00000080            

PCB$L_PID        00000060            PR$_KSP        = 00000000            TT$M_MBXDSABL  = 00010000            

PCB$L_PQB        0000004C            PR$_MAPEN      = 00000038            TT$M_MECHTAB   = 00000100            

PCB$L_SQBL       00000004            PR$_NICR       = 00000019            TT$M_NOBRDCST  = 00020000            

PCB$L_SQFL       00000000            PR$_P0BR       = 00000008            TT$M_NOECHO    = 00000002            

PCB$L_STS        00000028            PR$_P0LR       = 00000009            TT$M_NOTYPEAHD = 00000004            

PCB$L_UIC        00000020            PR$_P1BR       = 0000000A            TT$M_ODD       = 00000080            

PCB$L_WSSWP      00000024            PR$_P1LR       = 0000000B            TT$M_PAGE      = FE000000            

PCB$L_WTIME      0000002C            PR$_PCBB       = 00000010            TT$M_PARITY    = 00000040            

PCB$T_LNAME      0000006C            PR$_RXCS       = 00000020            TT$M_PASSALL   = 00000001            

PCB$V_ASTPEN   = 00000011            PR$_RXDB       = 00000021            TT$M_REMOTE    = 00002000            

PCB$V_BATCH    = 0000000E            PR$_SBIER      = 00000034            TT$M_SCOPE     = 00001000            

PCB$V_DELPEN   = 00000001            PR$_SBIFS      = 00000030            TT$M_SCRIPT    = 00000040            

PCB$V_FORCPEN  = 00000002            PR$_SBIMT      = 00000033            TT$M_TTSYNC    = 00000020            

PCB$V_HIBER    = 00000013            PR$_SBIQC      = 00000036            TT$M_WRAP      = 00000200            

PCB$V_INQUAN   = 00000003            PR$_SBIS       = 00000031            TT$S_PAGE      = 00000008            

PCB$V_LOGIN    = 00000014            PR$_SBISC      = 00000032            TT$V_CRFILL    = 0000000A            

PCB$V_NOACNT   = 0000000F            PR$_SBITA      = 00000035            TT$V_EIGHTBIT  = 0000000F            

PCB$V_PHDRES   = 00000012            PR$_SBR        = 0000000C            TT$V_ESCAPE    = 00000003            

PCB$V_PSWAPM   = 00000004            PR$_SCBB       = 00000011            TT$V_HOLDSCREEN= 0000000E            

PCB$V_RES      = 00000000            PR$_SID        = 0000003E            TT$V_HOSTSYNC  = 00000004            

PCB$V_RESPEN   = 00000005            PR$_SIRR       = 00000014            TT$V_LFFILL    = 0000000B            

PCB$V_SSFEXC   = 00000006            PR$_SISR       = 00000015            TT$V_LOWER     = 00000007            

PCB$V_SSFEXCE  = 00000007            PR$_SLR        = 0000000D            TT$V_MBXDSABL  = 00000010            

PCB$V_SSFEXCS  = 00000008            PR$_SSP        = 00000002            TT$V_MECHTAB   = 00000008            

PCB$V_SSFEXCU  = 00000009            PR$_TBIA       = 00000039            TT$V_NOBRDCST  = 00000011            

PCB$V_SSRWAIT  = 0000000A            PR$_TBIS       = 0000003A            TT$V_NOECHO    = 00000001            

PCB$V_SUSPEN   = 0000000B            PR$_TODR       = 0000001B            TT$V_NOTYPEAHD = 00000002            

PCB$V_SWPVBN   = 00000010            PR$_TXCS       = 00000022            TT$V_ODD       = 00000007            

PCB$V_WAKEPEN  = 0000000C            PR$_TXDB       = 00000023            TT$V_PAGE      = 00000019            

PCB$V_WALL     = 0000000D            PR$_USP        = 00000003            TT$V_PARITY    = 00000006            

PCB$W_APTCNT     00000034            PR$_WCSA       = 0000002C            TT$V_PASSALL   = 00000000            

PCB$W_ASTCNT     0000003C            PR$_WCSD       = 0000002D            TT$V_REMOTE    = 0000000D            

PCB$W_BIOCNT     0000003E            SS$_NORMAL       ********   X   03   TT$V_SCOPE     = 0000000C            

PCB$W_BIOLM      00000040            SS$_TIMEOUT      ********   X   03   TT$V_SCRIPT    = 00000006            

PCB$W_BYTCNT     00000042            SYS$GL_JOBCTLMB  ********   X   03   TT$V_TTSYNC    = 00000005            

PCB$W_BYTLM      00000068            TT$C_BAUD_110  = 00000003            TT$V_WRAP      = 00000009            

PCB$W_DIOCNT     00000044            TT$C_BAUD_1200 = 00000008            TT$_LA120      = 00000021            

PCB$W_DIOLM      00000046            TT$C_BAUD_134  = 00000004            TT$_LA36       = 00000020            

PCB$W_FILCNT     00000048            TT$C_BAUD_150  = 00000005            TT$_LAX        = 00000020            

PCB$W_GPGCNT     00000038            TT$C_BAUD_1800 = 00000009            TT$_UNKNOWN    = 00000000            

PCB$W_GRP        00000022            TT$C_BAUD_2000 = 0000000A            TT$_VT05       = 00000001            

PCB$W_MEM        00000020            TT$C_BAUD_2400 = 0000000B            TT$_VT52       = 00000040            

PCB$W_MTXCNT     0000000E            TT$C_BAUD_300  = 00000006            TT$_VT55       = 00000041            

PCB$W_PPGCNT     0000003A            TT$C_BAUD_3600 = 0000000C            TT$_VT5X       = 00000040            

PCB$W_PRCCNT     0000006A            TT$C_BAUD_4800 = 0000000D            TTY$BEG_BRDCST   0000008A RG    03   

PCB$W_SIZE       00000008            TT$C_BAUD_50   = 00000001            TTY$B_BD_CNT     00000015            

PCB$W_STATE      00000030            TT$C_BAUD_600  = 00000007            TTY$B_BD_IPL     00000017            

PCB$W_TMBU       00000036            TT$C_BAUD_7200 = 0000000E            TTY$B_BD_REFC    00000016            

PCB$W_TQCNT      0000004A            TT$C_BAUD_75   = 00000002            TTY$B_BD_TYPE    0000000A            

PR$_ACCR       = 00000029            TT$C_BAUD_9600 = 0000000F            TTY$B_BD_WHO     00000014            

PR$_ACCS       = 00000028            TT$M_CRFILL    = 00000400            TTY$B_TA_TYPE    0000000A            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page  14

SYMBOL TABLE                                                                                                                     (9)



TTY$CANCELIO     00000030 RG    03   TTY$L_TA_PUT     00000000            TTY$V_ST_CURSOR= 00000004            

TTY$C_BELL     = 00000007            TTY$L_WB_DATA    0000000C            TTY$V_ST_DEL   = 0000000D            

TTY$C_BLANK    = 00000020            TTY$L_WB_END     00000004            TTY$V_ST_EOL   = 00000009            

TTY$C_BS       = 00000008            TTY$L_WB_NXT     00000000            TTY$V_ST_ESC   = 00000013            

TTY$C_CR       = 0000000D            TTY$M_A        = 00003FFF            TTY$V_ST_ESC_O = 0000001B            

TTY$C_CTRLC    = 00000003            TTY$M_CH_CTRL  = 00000020            TTY$V_ST_FILL  = 00000003            

TTY$C_CTRLO    = 0000000F            TTY$M_CH_CTRL2 = 00000080            TTY$V_ST_GETAHD= 00000019            

TTY$C_CTRLQ    = 00000011            TTY$M_CH_LOWER = 00000040            TTY$V_ST_HANGUP= 00000018            

TTY$C_CTRLR    = 00000012            TTY$M_CH_SPEC  = 00000010            TTY$V_ST_MULTI = 00000006            

TTY$C_CTRLS    = 00000013            TTY$M_ST_BADESC= 00100000            TTY$V_ST_NL    = 00000015            

TTY$C_CTRLU    = 00000015            TTY$M_ST_BRDCST= 00000080            TTY$V_ST_NOECHO= 0000000F            

TTY$C_CTRLX    = 00000018            TTY$M_ST_CTRLO = 00001000            TTY$V_ST_NOFLTR= 00000012            

TTY$C_CTRLY    = 00000019            TTY$M_ST_CTRLR = 00000400            TTY$V_ST_PASALL= 0000000E            

TTY$C_CTRLZ    = 0000001A            TTY$M_ST_CTRLS = 00000004            TTY$V_ST_PROMPT= 00000011            

TTY$C_DELETE   = 0000007F            TTY$M_ST_CURSOR= 00000010            TTY$V_ST_READ  = 0000000B            

TTY$C_DOLLAR   = 00000024            TTY$M_ST_DEL   = 00002000            TTY$V_ST_SENDLF= 00000005            

TTY$C_DS_ACTIVE= 00000001            TTY$M_ST_EOL   = 00000200            TTY$V_ST_SKIPLF= 00000017            

TTY$C_DS_ATTN1 = 00000002            TTY$M_ST_ESC   = 00080000            TTY$V_ST_TYPFUL= 00000016            

TTY$C_DS_ATTN2 = 00000003            TTY$M_ST_ESC_O = 08000000            TTY$V_ST_UNSOL = 0000001A            

TTY$C_DS_ATTN3 = 00000004            TTY$M_ST_FILL  = 00000008            TTY$V_ST_WRITE = 00000008            

TTY$C_DS_HANG  = 00000005            TTY$M_ST_GETAHD= 02000000            TTY$V_ST_WRTALL= 00000010            

TTY$C_DS_HANG2 = 00000006            TTY$M_ST_HANGUP= 01000000            TTY$V_ST_XOFF  = 00000001            

TTY$C_DS_IDLE  = 00000000            TTY$M_ST_MULTI = 00000040            TTY$V_ST_XON   = 00000000            

TTY$C_DS_RESET = 00000007            TTY$M_ST_NL    = 00200000            TTY$WRITEDONE    ********   X   03   

TTY$C_ESCAPE   = 0000001B            TTY$M_ST_NOECHO= 00008000            TTY$W_BD_SIZE    00000008            

TTY$C_FC_N_SET = 00000004            TTY$M_ST_NOFLTR= 00040000            TTY$W_RB_ORGHOR  0000000C            

TTY$C_FC_READ  = 00000000            TTY$M_ST_PASALL= 00004000            TTY$W_RB_SIZE    00000008            

TTY$C_FC_SETC  = 00000003            TTY$M_ST_PROMPT= 00020000            TTY$W_RB_TIMOS   0000000E            

TTY$C_FC_SETM  = 00000002            TTY$M_ST_READ  = 00000800            TTY$W_TA_SIZE    00000008            

TTY$C_FC_WRITE = 00000001            TTY$M_ST_SENDLF= 00000020            TTY$W_WB_SIZE    00000008            

TTY$C_FF       = 0000000C            TTY$M_ST_SKIPLF= 00800000            UCB$B_AMOD       00000053            

TTY$C_HIGHIPL  = 00000016            TTY$M_ST_TYPFUL= 00400000            UCB$B_CEX        00000077            

TTY$C_LF       = 0000000A            TTY$M_ST_UNSOL = 04000000            UCB$B_CM1        0000004A            

TTY$C_LOWA     = 00000061            TTY$M_ST_WRITE = 00000100            UCB$B_CM2        0000004B            

TTY$C_LOWZ     = 0000007B            TTY$M_ST_WRTALL= 00010000            UCB$B_DEVCLASS   00000038            

TTY$C_NL       = 00000080            TTY$M_ST_XOFF  = 00000002            UCB$B_DEVTYPE    00000039            

TTY$C_ONE      = 00000031            TTY$M_ST_XON   = 00000001            UCB$B_DIPL       00000052            

TTY$C_PLUS     = 0000002B            TTY$PURGE_AHEAD  00000182 RG    03   UCB$B_DX_SCTCNT  FFFFFFFE            

TTY$C_SCRIPT   = 00000060            TTY$Q_BD_LINK    00000000            UCB$B_DX_SPARE   FFFFFFFF            

TTY$C_TAB      = 00000009            TTY$READONE      ********   X   03   UCB$B_ERTCNT     00000070            

TTY$C_TYPAHDSIZ= 0000004E            TTY$SETUP_UCB    0000001C RG    03   UCB$B_ERTMAX     00000071            

TTY$C_VT       = 0000000B            TTY$SIGNAL_ATTN  000000B8 RG    03   UCB$B_ESCAPE     0000004B            

TTY$C_XOFF     = 00000013            TTY$STARTOUTPUT  ********   X   03   UCB$B_FEX        00000076            

TTY$C_XON      = 00000011            TTY$STOPIO       000001AB RG    03   UCB$B_FIPL       0000000B            

TTY$C_ZERO     = 00000030            TTY$STOP_BRDCST  ********   X   03   UCB$B_LOCSRV     0000003C            

TTY$FORK_ADDR    000000C0 RG    03   TTY$STRT_BRDCST  ********   X   03   UCB$B_OFFNDX     00000090            

TTY$LOCK         00000000 RG    03   TTY$S_A        = 0000000E            UCB$B_OFFRTC     00000091            

TTY$L_BD_DATA    00000018            TTY$V_A        = 00000000            UCB$B_REMSRV     0000003D            

TTY$L_BD_FORK    0000000C            TTY$V_CH_CTRL  = 00000005            UCB$B_SECTORS    0000003C            

TTY$L_BD_MIN     00000028            TTY$V_CH_CTRL2 = 00000007            UCB$B_SLAVE      00000074            

TTY$L_BD_UCB     00000010            TTY$V_CH_LOWER = 00000006            UCB$B_SPR        00000075            

TTY$L_RB_DATA    00000010            TTY$V_CH_SPEC  = 00000004            UCB$B_STATE      00000052            

TTY$L_RB_NXT     00000000            TTY$V_ST_BADESC= 00000014            UCB$B_TRACKS     0000003D            

TTY$L_RB_UVA     00000004            TTY$V_ST_BRDCST= 00000007            UCB$B_TT_BRDPT   FFFFFFFC            

TTY$L_TA_DATA    00000010            TTY$V_ST_CTRLO = 0000000C            UCB$B_TT_CRFILL  FFFFFFF9            

TTY$L_TA_END     0000000C            TTY$V_ST_CTRLR = 0000000A            UCB$B_TT_DIAL    FFFFFFF3            

TTY$L_TA_GET     00000004            TTY$V_ST_CTRLS = 00000002            UCB$B_TT_ESC     FFFFFFF2            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page  15

SYMBOL TABLE                                                                                                                     (9)



UCB$B_TT_ESC_O   FFFFFFFD            UCB$M_CANCEL   = 00000008            UCB$V_ONLINE   = 00000004            

UCB$B_TT_FILL    FFFFFFF8            UCB$M_DEADMO   = 00000400            UCB$V_POWER    = 00000005            

UCB$B_TT_LFFILL  FFFFFFFA            UCB$M_DELMBX   = 00000002            UCB$V_PRMMBX   = 00000000            

UCB$B_TT_LINE    FFFFFFF1            UCB$M_DIAGBUF  = 00000002            UCB$V_SEGFLO   = 00000002            

UCB$B_TT_SPARE   FFFFFFF0            UCB$M_DX_WRITE = 00000008            UCB$V_TIM      = 00000000            

UCB$B_TT_SPEED   FFFFFFFB            UCB$M_ECC      = 00000001            UCB$V_TIMOUT   = 00000006            

UCB$B_TYPE       0000000A            UCB$M_ERLOGIP  = 00000004            UCB$V_TT_NOTIF = 00000002            

UCB$B_VERTSZ     0000003F            UCB$M_INT      = 00000002            UCB$V_TT_ODD   = 00000005            

UCB$C_LENGTH     00000074            UCB$M_INTTYPE  = 00000080            UCB$V_TT_PARTY = 00000004            

UCB$C_LOGLNK   = 00000001            UCB$M_JOB      = 00000001            UCB$V_TT_SPEED = 00000000            

UCB$K_LENGTH     00000074            UCB$M_MOUNTING = 00000200            UCB$V_TT_TIMO  = 00000001            

UCB$L_AMB        00000054            UCB$M_NOCNVRT  = 00000004            UCB$V_VALID    = 0000000B            

UCB$L_ASTQBL     00000010            UCB$M_NT_BFROVF= 00000004            UCB$W_BCNT       0000006E            

UCB$L_ASTQFL     0000000C            UCB$M_NT_BREAK = 00000020            UCB$W_BCR        00000092            

UCB$L_CPID       0000005C            UCB$M_NT_NAME  = 00000010            UCB$W_BOFF       0000006C            

UCB$L_CRB        00000020            UCB$M_NT_NONTR = 00000040            UCB$W_BUFQUO     00000018            

UCB$L_DDB        00000024            UCB$M_NT_SDP   = 00000008            UCB$W_BYTESTOGO  0000003E            

UCB$L_DEVCHAR    00000034            UCB$M_ONLINE   = 00000010            UCB$W_CHARGE     0000004A            

UCB$L_DEVDEPEND  0000003C            UCB$M_POWER    = 00000020            UCB$W_CYLINDERS  0000003E            

UCB$L_DPC        0000007C            UCB$M_PRMMBX   = 00000001            UCB$W_DA         00000088            

UCB$L_DUETIM     0000005C            UCB$M_TIM      = 00000001            UCB$W_DC         0000008A            

UCB$L_DX_BFPNT   FFFFFFF4            UCB$M_TIMOUT   = 00000040            UCB$W_DEVBUFSIZ  0000003A            

UCB$L_DX_BUF     FFFFFFF0            UCB$M_TT_NOTIF = 00000004            UCB$W_DEVSTS     0000005A            

UCB$L_DX_RXDB    FFFFFFF8            UCB$M_TT_ODD   = 00000020            UCB$W_DSTADDR    00000018            

UCB$L_EMB        00000078            UCB$M_TT_PARTY = 00000010            UCB$W_DX_BCR     FFFFFFFC            

UCB$L_FIRST      00000014            UCB$M_TT_SPEED = 0000000F            UCB$W_EC1        0000008C            

UCB$L_FPC        0000000C            UCB$M_TT_TIMO  = 00000002            UCB$W_EC2        0000008E            

UCB$L_FQBL       00000004            UCB$M_VALID    = 00000800            UCB$W_ERRCNT     00000072            

UCB$L_FQFL       00000000            UCB$S_LNKPRI   = 00000002            UCB$W_FUNC       00000084            

UCB$L_FR3        00000010            UCB$S_LTYPE    = 00000002            UCB$W_MB_SEED    FFFFFFFC            

UCB$L_FR4        00000014            UCB$S_TT_ODD   = 00000001            UCB$W_MSGCNT     00000016            

UCB$L_IOQBL      00000044            UCB$S_TT_PARTY = 00000001            UCB$W_MSGMAX     00000014            

UCB$L_IOQFL      00000040            UCB$S_TT_SPEED = 00000004            UCB$W_NT_CHAN    0000007C            

UCB$L_IRP        0000004C            UCB$T_PARTNER    0000000C            UCB$W_OFFSET     00000086            

UCB$L_LINK       0000002C            UCB$V_BACKP    = 00000005            UCB$W_REFC       00000050            

UCB$L_LOGADR     00000064            UCB$V_BSY      = 00000008            UCB$W_SIZE       00000008            

UCB$L_MAXBLOCK   00000080            UCB$V_CANCEL   = 00000003            UCB$W_SRCADDR    0000001A            

UCB$L_MEDIA      00000088            UCB$V_DEADMO   = 0000000A            UCB$W_STS        00000058            

UCB$L_NT_DATSSB  00000074            UCB$V_DELMBX   = 00000001            UCB$W_TT_CURSOR  FFFFFFFE            

UCB$L_NT_INTSSB  00000078            UCB$V_DIAGBUF  = 00000001            UCB$W_TT_HOLD    FFFFFFF4            

UCB$L_OPCNT      00000060            UCB$V_DX_WRITE = 00000003            UCB$W_TT_INAHD   FFFFFFF6            

UCB$L_OWNUIC     0000001C            UCB$V_ECC      = 00000000            UCB$W_UNIT       00000048            

UCB$L_PID        00000028            UCB$V_ERLOGIP  = 00000002            UCB$W_VPROT      0000001A            

UCB$L_RQBL       00000004            UCB$V_INT      = 00000001            VEC$B_DATAPATH   00000013            

UCB$L_RQFL       00000000            UCB$V_INTTYPE  = 00000007            VEC$B_NUMREG     00000012            

UCB$L_SVAPTE     00000068            UCB$V_JOB      = 00000000            VEC$L_ADP        00000014            

UCB$L_SVPN       00000064            UCB$V_LNKPRI   = 00000006            VEC$L_IDB        00000008            

UCB$L_TTCHAR     0000003C            UCB$V_LTYPE    = 00000000            VEC$L_INITIAL    0000000C            

UCB$L_TT_BRDCST  FFFFFFE4            UCB$V_MOUNTING = 00000009            VEC$L_TT_DISC    00000020            

UCB$L_TT_CTRLC   FFFFFFE0            UCB$V_MSGACK   = 00000004            VEC$L_TT_ILINE   00000018            

UCB$L_TT_CTRLY   FFFFFFDC            UCB$V_MSGFLO   = 00000003            VEC$L_TT_STRTIO  0000001C            

UCB$L_TT_MULTI   FFFFFFD8            UCB$V_NOCNVRT  = 00000002            VEC$M_MAPLOCK  = 00008000            

UCB$L_TT_RDUE    FFFFFFEC            UCB$V_NT_BFROVF= 00000002            VEC$M_PATHLOCK = 00000080            

UCB$L_TT_STATE   FFFFFFD4            UCB$V_NT_BREAK = 00000005            VEC$Q_DISPATCH   00000000            

UCB$L_TT_TYPAHD  FFFFFFE8            UCB$V_NT_NAME  = 00000004            VEC$S_DATAPATH = 00000007            

UCB$L_VCB        00000030            UCB$V_NT_NONTR = 00000006            VEC$S_MAPREG   = 0000000F            

UCB$M_BSY      = 00000100            UCB$V_NT_SDP   = 00000003            VEC$V_DATAPATH = 00000000            

TTYSUB          - TERMINAL DRIVER SUBROUTINES                    21-AUG-1978 23:58:43   VAX-11 MACRO X0.3-11               Page  16

SYMBOL TABLE                                                                                                                     (9)



VEC$V_MAPLOCK  = 0000000F            

VEC$V_MAPREG   = 00000000            

VEC$V_PATHLOCK = 00000007            

VEC$W_MAPREG     00000010            

W              = 00000001            

X              = 00000000            

Z              = 00000001            





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$            FFFFFFFF      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

WIONONPAGED      000001D2      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

7030. BYTES LEFT IN FREE MEMORY POOL.

2228. BYTES OF RECLAIMED MEMORY.

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

11 MLB DIR RDS - 1074 GETS TO DEFINE 25 MACROS. 81 INTER. FILE WRITES. 

