Google
 

Trailing-Edge - PDP-10 Archives - bb-x141b-bb - rsxt20.l20
There are no other files named rsxt20.l20 in the archive.
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57
TABLE OF CONTENTS

     8-  342	LOW CORE -- TRAP VECTORS
     9-  456	LOW CORE -- COMMON GLOBAL DATA
    10-  596	LOW CORE -- KLINIK DATA BASE
    11-  630	LOW CORE -- COMMIUNICATIONS REGION DATA BASE
    12-  665	LOW CORE -- QUEUED PROTOCOL DATA BASE
    13-  771	LOW CORE -- KEEP-ALIVE DATA BASE
    14-  785	LOW CORE -- CORE MANAGER DATA BASE
    15-  821	LOW CORE -- CLOCK REQUEST LIST
    17-  862	LOW CORE -- TERMINAL SERVICE DATA BASE
    18-  920	LOW CORE -- PDP-11 CTY SERVICE DATA BASE
    19-  935	LOW CORE -- TERMINAL DRIVER DATA BASE
    20-  955	LOW CORE -- DATA LINE SCANNER DATA BASE
    21-  985	LOW CORE -- DH-11 DATA BASE
    31- 1058	LOW CORE -- FLOPPY DRIVER DATA BASE
    32- 1074	LOW CORE -- DISC DRIVER DATA BASE
    33- 1095	LOW CORE -- FE DRIVER DATA BASE
    34- 1134	LOW CORE -- CD-11 DRIVER DATA BASE
    35- 1179	LOW CORE -- LP-20 DRIVER DATA BASE
    36- 1266	LOW CORE -- STD (SYSTEM TASK DIRECTORY)
    37- 1388	LOW CORE -- ATL (ACTIVE TASK LIST)
    38- 1460	LOW CORE -- TPD (TASK PARTITION DIRECTORY)
    39- 1521	LOW CORE -- DEVICE QUEUE POINTERS
    40- 1574	LOW CORE -- LOGICAL UNIT TABLES
    41- 1688	LOW CORE -- KL10 HARDWARE ENVIRONMENT DATA
    42- 1746	LOW CORE -- INITLM (INITIALIZATION)
    43- 1775	LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS
    44- 1896	LOW CORE -- CRASH ROUTINE
    45- 2001	LOW CORE -- I/O PAGE SNAPSHOT
    46- 2052	EXEC MODULE ONE -- TITLE PAGE
    47- 2114	EXEC MODULE ONE -- SYSTEM NOTES
    48- 2169	EXEC MODULE ONE -- GLOSSARY
    48- 2194	MACRO CALLS (MCALL)
    49- 2206	EXEC MODULE ONE -- SYMBOLIC DEFINITIONS
    65- 2788	EXEC MODULE ONE -- NUL TASK
    67- 2893	EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS
    68- 3159	EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST
    75- 3550	EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM
    80- 3963	SECONDARY PROTOCOL -- COPYRIGHT STATEMENT
    81- 4026	SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE
    82- 4300	POWERFAIL HANDLER -- COPYRIGHT STATEMENT
    83- 4351	POWERFAIL -- POWER DOWN
    84- 4437	POWERFAIL -- POWER UP ENTRY
    85- 4486	POWERFAIL -- POWER FAIL RESTART
    86- 4558	DTE DIRECTIVES -- COPYRIGHT STATEMENT
    87- 4619	DTE20 EMT DISPATCH DECODER
    88- 4698	$DORBL -- RING THE KL-10 DOORBELL
    89- 4729	$DTEOF -- TURN THE DTE20 OFF
    90- 4765	$DTEON -- TURN THE DTE20 ON
    91- 4896	$DPMYG -- DEPOSIT INTO MY GENERAL SECTION
    92- 4943	$EXMYG -- EXAMINE MY GENERAL SECTION
    93- 4979	$EXMYN -- EXAMINE MY SECTION FOR PROCESSOR N
    94- 5013	$DPMYN -- DEPOSIT INTO MY SECTION FOR COMM WITH PROCESSOR N
    95- 5047	$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION
    96- 5082	$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME
    97- 5116	$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION
    98- 5213	$PRVDP -- PRIVILEDGED DEPOSIT
    99- 5244	$PRVEX -- PRIVILEDGED EXAMINE
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57
TABLE OF CONTENTS

   100- 5283	$RWDRG -- READ/WRITE DIAGNOSTIC REGISTER
   101- 5322	CESCHK -- CHECK FOR CLOCK ERROR STOP
   102- 5345	ASIGN LUN -- COPYRIGHT STATEMENT
   103- 5382	DIRECTIVE -- ASSIGN LUN
   104- 5488	GET LUN INFO -- COPYRIGHT STATEMENT
   105- 5524	DIRECTIVE -- GET LUN INFORMATION
   106- 5593	GET TIME PARAMETERS -- COPYRIGHT STATEMENT
   107- 5629	DIRECTIVE -- GET TIME PARAMETERS
   108- 5702	SIGNIFICANT EVENT DIRECTIVES -- COPYRIGHT STATEMENT
   109- 5744	DIRECTIVE -- CLEAR EVENT FLAG
   110- 5794	DIRECTIVE -- SET EVENT FLAG
   111- 5844	DIRECTIVE -- DECLARE SIGNIFICANT EVENT
   112- 5905	DIRECTIVE -- READ EVENT FLAG
   113- 5953	DIRECTIVE -- READ ALL EVENT FLAGS
   114- 5996	DIRECTIVE -- WAITFOR SINGLE EVENT FLAG
   115- 6059	DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS
   116- 6151	DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT
   117- 6189	MARK TIME -- COPYRIGHT STATEMENT
   118- 6225	DIRECTIVE -- MARK TIME
   119- 6326	CANCEL MARK TIME -- COPYRIGHT STATEMENT
   120- 6363	DIRECTIVE -- CANCEL MARK-TIME REQUESTS
   121- 6424	EXIT -- COPYRIGHT STATEMENT
   122- 6461	DIRECTIVE -- TASK EXIT
   123- 6506	QUEUE I/O -- COPYRIGHT STATEMENT
   124- 6544	DIRECTIVE -- QUEUE I/O
   125- 6872	SEND AND RECEIVE -- COPYRIGT STATEMENT
   126- 6913	DIRECTIVE -- SEND DATA
   127- 6969	DIRECTIVE -- SEND AND REQUEST OR RESUME
   129- 7190	DIRECTIVE -- RECEIVE DATA
   130- 7227	DIRECTIVE -- RECEIVE DATA OR EXIT
   131- 7268	DIRECTIVE -- RECEIVE DATA OR SUSPEND
   132- 7410	SPECIFY SST TABLE -- COPYRIGHT STATEMENT
   133- 7446	DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK
   134- 7501	SPECIFY AST SERVICE -- COPYRIGHT STATEMENT
   135- 7537	DIRECTIVE -- SPECIFY POWER FAIL AST
   136- 7595	REQUEST AND EXECUTE -- COPYRIGHT STATEMENT
   137- 7631	DIRECTIVE -- TASK SCHEDULING -- REQUEST
   138- 7757	GET TASK PARAMETERS -- COPYRIGHT STATEMENT
   139- 7793	DIRECTIVE -- GET TASK PARAMETERS
   140- 7882	GET PARTITION PARAMETERS -- COPYRIGHT STATEMENT
   141- 7919	DIRECTIVE -- GET PARTITION PARAMETERS
   142- 8019	CLOCK HANDLER -- COPYRIGHT STATEMENT
   143- 8061	CLOCK TICK RECOGNITION
   144- 8127	QUEUED PROTOCOL DRIVER -- COPYRIGHT STATEMENT
   147- 8344	QUEUED PROTOCOL DRIVER -- PROTOCOL PACKET SERVICE DISPATCH
   148- 8383	QUEUED PROTOCOL DRIVER -- DISPATCH TABLE
   149- 8421	QUEUED PROTOCOL DRIVER -- UNRECOGNIZED FUNCTION
   150- 8431	QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE REMOTE TERMINALS
   151- 8442	QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE SENDALL AND XOFF PROCESSING
   152- 8455	QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE SENDALLS
   153- 8479	QUEUED PROTOCOL -- DIALUP
   154- 8499	QUEUED PROTOCOL DRIVER -- HANGUP
   155- 8550	QUEUED PROTOCOL DRIVER -- ACKNOWLEDGE DEVICE
   156- 8562	QUEUED PROTOCOL DRIVER -- SET LINE ALLOCATION
   157- 8576	QUEUED PROTOCOL DRIVER -- SET LINE SPEED
   158- 8633	QUEUED PROTOCOL DRIVER -- STOP LINE INPUT
   159- 8664	QUEUED PROTOCOL DRIVER -- BREAK-THROUGH WRITE
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57
TABLE OF CONTENTS

   160- 8681	QUEUED PROTOCOL DRIVER -- XOFF
   161- 8709	QUEUED PROTOCOL DRIVER -- XON
   162- 8741	QUEUED PROTOCOL DRIVER -- HERE IS INITIAL STATUS
   163- 8792	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   164- 8807	QUEUED PROTOCOL DRIVER -- STRING DATA
   165- 8840	QUEUED PROTOCOL DRIVER -- LINE NUMBER - CHARACTER
   166- 8885	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   167- 8909	QUEUED PROTOCOL DRIVER -- FLUSH DEVICE OUTPUT QUEUE
   168- 8928	QUEUED PROTOCOL DRIVER -- RECIEVE KLINIK PARAMETERS
   169- 8948	QUEUED PROTOCOL DRIVER -- SET/CLEAR HOST DEBUG MODE
   170- 8963	QUEUED PROTOCOL DRIVER -- SENDALL
   171- 9112	QUEUED PROTOCOL DRIVER -- COPY BUFFER
   172- 9156	QUEUED PROTOCOL DRIVER -- MAP DH-11 TO DM-11
   173- 9185	QUEUED PROTOCOL DRIVER -- FIND LINE SPEED
   174- 9218	QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME
   175- 9253	QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME
   176- 9343	DTE-20 DRIVER -- COPYRIGHT STATEMENT
   177- 9387	DTE-20 DRIVER -- DTE-20 INTERRUPT HEAD
   178- 9463	DTE-20 DRIVER -- TO-10 DONE SERVICE
   179- 9567	DTE-20 DRIVER -- TO-11 DONE SERVICE
   180- 9683	DTE-20 DRIVER -- DOORBELL SERVICE
   181- 9820	DTE-20 DRIVER -- START TO ELEVEN DIRECT TRANSFER
   182- 9888	DTE-20 DRIVER -- START TO ELEVEN INDIRECT TRANSFER
   183- 9958	DTE-20 DRIVER -- UPDATE AND TRANSMIT FRONT-END KEEP-ALIVE COUNT
   184- 9993	DTE-20 DRIVER -- START TO TEN QUEUE
   185-10054	DTE-20 DRIVER -- SEND STATUS TO TEN
   186-10089	DTE-20 DRIVER -- GET A BUFFER FOR INCOMING TRANSFER
   187-10140	DTE-20 DRIVER -- START BYTE TRANSFER
   188-10166	DTE-20 DRIVER -- LOAD TO-11 QUEUE NODE
   189-10193	TERMINAL DRIVER -- COPYRIGHT STATEMENT
   190-10381	TERMINAL DRIVER -- DEFINITIONS
   193-10652	TERMINAL DRIVER -- TTINI (TTY QUEUE SERVICE)
   194-10692	TERMINAL DRIVER -- TIMEOUT SERVICE
   195-10711	TERMINAL DRIVER -- ACK ALL SERVICE
   196-10728	TERMINAL DRIVER -- QUEUED PROTOCOL KEEP-ALIVE SERVICE
   197-10818	TERMINAL DRIVER -- GENERAL ERROR LOGGING
   198-10831	TERMINAL DRIVER -- CTY SERVICE
   199-10879	TERMINAL DRIVER -- CTY I/O DONE SERVICE
   200-10893	TERMINAL DRIVER -- CTY INPUT SERVICE
   201-10910	TERMINAL DRIVER -- CTY OUTPUT SERVICE
   202-10939	TERMINAL DRIVER -- $DHOUT (DH-11 OUTPUT INTERRUPT)
   203-10982	TERMINAL DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)
   205-11053	TERMINAL DRIVER -- STNXT (START NEXT OUTPUT OPERATION)
   206-11100	TERMINAL DRIVER -- .DHSTO (START DH-11 OUTPUT)
   207-11129	TERMINAL DRIVER -- $TTOUT (DL11 OUTPUT INTERRUPT)
   208-11160	TERMINAL DRIVER -- .DLSTO (START DL-11 OUTPUT)
   209-11187	TERMINAL DRIVER -- .TTACK (ACKNOWLEDGE A TTY LINE)
   210-11234	TERMINAL DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)
   211-11312	TERMINAL DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)
   212-11347	TERMINAL DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)
   213-11463	TERMINAL DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)
   214-11525	TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)
   216-11748	TERMINAL DRIVER -- $TTINP (DL-11 INPUT INTERRUPT)
   217-11781	TERMINAL DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)
   218-11886	TERMINAL DRIVER -- .DLINT (DL-11E DATASET INTERRUPT SERVICE)
   219-11952	TERMINAL DRIVER -- TTCTY (CTY SERVICE)
   220-12099	TERMINAL DRIVER -- DHSAV (DH-11 REGISTER SAVE/RESTORE CO-ROUTINE)
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57
TABLE OF CONTENTS

   221-12158	TERMINAL DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROLLER)
   222-12192	TERMINAL DRIVER -- .DHSPZ (ZERO INPUT SPEED OF A LINE)
   223-12220	TERMINAL DRIVER -- .DHSPR (RESET TO DEFAULT AUTO-BAUD SPEED)
   224-12267	TERMINAL DRIVER -- .DHSPF (FLAG AUTO-BAUD REPORT)
   225-12296	TERMINAL DRIVER -- .DHSPD (SET LINE SPEED)
   226-12338	TERMINAL DRIVER -- $DMINT (DM-11/BB MODEM CONTROL INTERRUPT)
   227-12448	TERMINAL DRIVER -- .STTYD (DIALUP/HANGUP SERVICE)
   228-12492	TERMINAL DRIVER -- .DMHUP (DM-11 HANGUP)
   229-12521	TTY DRIVER -- .DMUHU (UN-HANGUP DM11)
   230-12548	TERMINAL DRIVER -- .STPDM (STOP DM-11/BB SCAN)
   231-12577	TERMINAL DRIVER -- .DLHUP (DL-11E HANGUP)
   232-12629	TERMINAL DRIVER -- .DLTMO (DL-11E MODEM CONTROL TIMEOUT)
   233-12765	TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)
   234-12952	TERMINAL DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)
   235-13047	TERMINAL DRIVER -- .TTFDI (INPUT CONTROL SERVICE)
   236-13085	TERMINAL DRIVER -- .TTERL (TERMINAL ERROR LOGGING)
   237-13142	TERMINAL DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)
   238-13194	TERMINAL DRIVER -- .TTSTP (STOP TERMINAL OUTPUT)
   239-13219	TERMINAL DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)
   240-13286	TERMINAL DRIVER -- .TTRST (RESET A TERMINAL LINE)
   241-13343	TERMINAL DRIVER -- CHECK INPUT XOFF DELAY
   242-13371	TERMINAL DRIVER -- .TTICK (INPUT BUFFER CHECKS)
   243-13406	TERMINAL DRIVER -- .TTQDS (QUEUED PROTOCOL INPUT DISABLE SERVICE)
   244-13451	TERMINAL DRIVER -- .TTIXC (INPUT CONTROL CHECKS)
   245-13484	TERMINAL DRIVER -- .TTDIS (DISABLE INPUT FROM LINE)
   246-13567	TERMINAL DRIVER -- .TTENB (ENABLE INPUT FOR LINE)
   247-13642	TERMINAL DRIVER -- .TTBTW (BREAK-THROUGH WRITE FUNCTION)
   248-13698	TERMINAL DRIVER -- BLDPKT (BUILD A TERMINAL PACKET)
   249-13734	TERMINAL DRIVER -- .TTSW2 (FIND OFFSET INTO "STSW2" TABLE)
   250-13756	TERMINAL DRIVER -- .TFXON (FORCE AN XON FOR A LINE)
   252-13801	SYSTEM COMMON SUBROUTINES -- COPYRIGHT STATEMENT
   254-13887	SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)
   255-13907	SCOMM MODULE -- .CEFN   (CONVERT EFN)
   256-13978	SCOMM MODULE -- .CKDEL  (CLOCK DELETE)
   258-14060	SCOMM MODULE -- ..ERLG	(ERROR LOGGING)
   259-14114	SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)
   260-14170	SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)
   261-14288	SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)
   262-14329	SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)
   263-14347	SCOMM MODULE -- DIV216   (DIV R2 BY 16)
   264-14375	SCOMM MODULE -- ..NDEL	(NODE DELETE)
   265-14402	SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)
   266-14441	SCOMM MODULE -- ..NADD	(NODE ADD)
   267-14470	SCOMM MODULE -- ..PICK	(PICK A NODE)
   268-14515	SCOMM MODULE -- ..ENB0	(ENABLE TASK SWITCHING)
   269-14558	SCOMM MODULE -- ..FSTD	(FIND STD ENTRY)
   270-14609	SCOMM MODULE -- ..ALCB/..ALC2	(ALLOCATE CORE)
   271-14701	SCOMM MODULE -- ..DECB/..DECN/..DEC2 (DEALLOCATE CORE)
   272-14798	SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)
   273-14819	SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)
   274-14950	SCOMM MODULE -- ..STPT	(STOP TTY)
   275-15028	SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 QUEUE)
   276-15069	SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)
   277-15116	SCOMM MODULE -- ..STFC	(STORE FUNCTION)
   278-15172	SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)
   279-15253	SCOMM MODULE -- ..STQ	(STORE IN TO 10 QUEUE)
   280-15319	SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57
TABLE OF CONTENTS

   282-15556	SCOMM MODULE -- ..SWED	(START AND WAIT FOR EXAMINE/DEPOSIT)
   283-15609	SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)
   284-15634	SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)
   285-15661	SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)
   286-15687	SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)
   287-15841	SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)
   288-15938	SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL)
   289-16023	SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL)
   291-16125	END
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1113  03-APR-86 18:57  PAGE 1


      1						.TITLE	RSXFC	-- RSX20F PARAMETER FILE (TOPS-20 SYSTEM DEFINITION)
      2						.IDENT	/013100/
      3					;
      4					;                             COPYRIGHT (C) 1977, 1978, 1985 BY
      5					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      6					;				ALL RIGHTS RESERVED
      7					;
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21					; VERSION 13-10
     22					;
     23					; ALAN D. PECKHAM  19-APR-77
     24					;
     25					; MODIFIED BY:
     26					;
     27					;		R. BELANGER -- ELIMINATE 1090T "ARPA" CONFIGURATTION
     28					;		R. BELANGER -- ADD 1091 CONFIGURATION
     29					;
     30					; FUNCTION: THIS MODULE PROVIDES THE PARAMETERS FOR ASSEMBLY OF RSX20F FOR
     31					;  THE TOPS-20 SYSTEM.
     32					;
     33					; EQUATED SYMBOLS
     34					;
     35		000001 				$TOP20	=1	; DEFINE TOPS-20 OPTION
     36
     37		000001 				$LP20	=1	; INCLUDE LP20 DRIVER
     38		000002 				L$$P20	=2	; INCLUDE 2 LP-20'S
     39		000001 				$CD11	=1	; INCLUDE CD11 CARD READER DRIVER
     40		000001 				$RP04	=1	; INCLUDE RP04 DISK DRIVER
     41		000001 				$FE	=1	; INCLUDE FE PSEUDO-DEVICE DRIVER
     42		000001 				$F11	=1	; INCLUDE FILES-11 ACP
     43		000001 				$DH11	=1	; INCLUDE DH11 DRIVER
     44		000010 				D$$H11	=8.	; INCLUDE 8 DH-11'S
     45		000001 				$DBDTE	=1	; INCLUDE DTE20 DEBUGGING CODE
     46		000001 				$DTE	=1	; INCLUDE DTE20 DTE DRIVER
     47		000001 				R$$11D	=1	; RSX-11D BASE
     48
     49					.IF DF	$T1091
     50						$TOP10	=1	; DEFINE TOPS-10 BASE FOR 1091
     51					.ENDC			; $T1091
     52
     53					.IF DF	$TOP10
     54					.IF NDF	$T1091
     55						$DTA	=1	; INCLUDE DECTAPE DRIVER FOR TOPS-10
     56					.IFF
     57						$RX11	=1	; INCLUDE FLOPPY DRIVER FOR TOPS-10/1091
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1113  03-APR-86 18:57  PAGE 1-1


     58					.ENDC			; $T1091
     59					.ENDC			; $TOP10
     60
     61					.IF DF	$TOP20
     62		000001 				$RX11	=1	; INCLUDE FLOPPY DRIVER
     63					.ENDC			; $TOP20
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1113  03-APR-86 18:57  PAGE 2


     65
     66						.TITLE	RSX20F	-- RESIDENT EXECUTIVE (SYSTEM DEFINITION)
     67						.IDENT	/015500/
     68						.ENABL	AMA
     69						.LIST	MEB
     70						.NLIST	CND
     71					;
     72					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
     73					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     74					;			ALL RIGHTS RESERVED
     75					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     76					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     77					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     78					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     79					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     80					;
     81					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     82					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     83					;       CORPORATION.
     84					;
     85					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     86					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     87					;
     88					; R.  MCLEAN   19-MAR-75
     89					;
     90					;	VERSION 15-50
     91					;
     92					; MODIFIED BY:
     93					;
     94					;
     95					;
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1113  03-APR-86 18:57  PAGE 3


     97					;
     98					; SET VERSION OF RSX20F EXEC HERE
     99					;
    100		000015 			RSX$$V	=	15		; VERSION 15
    101		000050 			RSX$$E	=	50		; EDIT 50
    102					;
    103					; RELEASE VERSION
    104					;
    105		000126 			RSX$$K	=	'V		; KEY FOR RELEASE-TYPE
    106									; "X" -- EXPERIMENTAL
    107									; "Y" -- FIELD/LOAD TEST
    108									; "V" -- RELEASE
    109		000000 			RSX$$F	=	0		; DEFINE FORM AS NULL
    118		000102 			RSX$$F	=	'B		; TOPS-20 FORM OF THE EXEC.
    123					;
    124					; DTE-20 REGISTER OFFSETS
    125					;
    126		000036 			DAG3	=36
    127		000034 			STATD	=34
    128		000032 			DAG2	=32
    129		000030 			DAG1	=30
    130		000022 			T11AD	=22
    131		000020 			T10AD	=20
    132		000016 			T11BC	=16
    133		000010 			TNAD1	=10
    134		000012 			TNAD2	=12
    135		000006 			DXWD1	=6
    136		000004 			DXWD2	=4
    137		000002 			DXWD3	=2
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1113  03-APR-86 18:57  PAGE 4


    139					;+
    140					; MACRO TO SET IDENT FOR EXEC MODULES.
    141					; FORMAT OF CALL IS:
    142					;	IDENT$	VERSION,EDIT
    143					; OR
    144					;	IDENT$	VERSION,EDIT,RSX$$F
    145					; IF MODULE CODING CHANGES WITH DIFFERENT FORMS
    146					;-
    147
    148						.MACRO	IDENT$ VER,EDT,FRM,NUM
    149						.IF	B,NUM
    150						.IF	B,FRM
    151						IDENT$	\VER,\EDT,0,0
    152						.IFF
    153						.IF	EQ,<FRM-'A>
    154						IDENT$	\VER,\EDT,A,0
    155						.IFF
    156						.IF	EQ,<FRM-'B>
    157						IDENT$	\VER,\EDT,B,0
    158						.IFF
    159						IDENT$	\VER,\EDT,E,0
    160						.ENDC
    161						.ENDC
    162						.ENDC
    163						.MEXIT
    164						.IFF
    165						.IF	GE,VER-10
    166						.IF	GE,EDT-10
    167						.LIST
    168						.IDENT	/'FRM'VER'EDT'0/
    169						.NLIST
    170						.IFF
    171						.LIST
    172						.IDENT	/'FRM'VER'0'EDT'0/
    173						.NLIST
    174						.ENDC
    175						.IFF
    176						.IF	GE,EDT-10
    177						.LIST
    178						.IDENT	/'FRM'0'VER'EDT'0/
    179						.NLIST
    180						.IFF
    181						.LIST
    182						.IDENT	/'FRM'0'VER'0'EDT'0/
    183						.NLIST
    184						.ENDC
    185						.ENDC
    186						.ENDC
    187						.ENDM	IDENT$
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1113  03-APR-86 18:57  PAGE 6


    190
    191						.TITLE	LC -- LOW CORE FOR RSX20F
    192	000000					IDENT$	15,05,RSX$$F
						.IDENT	/B15050/
    193					;
    194					;
    195					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
    196					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
    197					;			ALL RIGHTS RESERVED.
    198					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
    199					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
    200					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
    201					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
    202					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
    203					;
    204					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
    205					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
    206					;       CORPORATION.
    207					;
    208					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
    209					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
    210					;
    211					;		MODULE: LOW CORE
    212					;
    213					;		VERSION: 15-05
    214					;
    215					;		AUTHOR: R. MCLEAN
    216					;
    217					;		DATE: 19 JUL 75
    218					;
    219					;
    220					;	THIS MODULE CONTAINS:
    221					;
    222					;	1 -- CODE TO SERVICE LOW CORE TRAPS AND ERRORS
    223					;	2 -- TRAP VECTORS
    224					;	3 -- SYSTEM COMMON DATABASE
    225					;	4 -- INITIALIZATION CODE
    226					;	5 -- PATCH SPACE
    227					;
    228					; MODIFICATIONS:
    229					;
    230					;	NO.	DATE		PROGRAMMER	PURPOSE
    231					;	---	----		----------	-------
    232					;	001	03-FEB-77	R. BELANGER	ADD DL11E INTERRUPT VECTORS
    233					;	002	15-MAR-77	R. BELANGER	LIMIT SIZE OF PATCH SPACE
    234					;						TO 40 BYTES AND DEFINE SYMBOL .PAT..
    235					;	003	18-AUG-77	R. BELANGER	DIFFERENTIATE BETWEEN DTE-20
    236					;						BUS TIMEOUTS AND OTHERS
    237					;	004	28-AUG-77	R. BELANGER	LOAD CRASH CODE INTO 0 AND 2
    238					; TCO 4.2212	08-MAR-79	R. BELANGER	INTEGRATE SYTEM COMMON DATABASE
    239					; TCO 4.2217	19-MAR-79	R. BELANGER	SNAPSHOT EBUS PARITY ERRORS
    240					; TCO 4.2245	10-APR-79	R. BELANGER	ADD FRAMING ERROR LOGGING
    241					; TCO 4.2263	29-MAY-79	R. BELANGER	PAD DECTAPE DRIVER DATABASE
    242					; TCO 4.2309	25-JUN-79	R. BELANGER	ADD BELL 212A MODEM SUPPORT
    243					; TCO 4.2314	29-JUN-79	R. BELANGER	SNAPSHOT I/O PAGE ON CRASH
    244					; TCO 4.2333	16-JUL-79	R. BELANGER	ADD KL10 HARDWARE DATA
    245					; TCO 5.1004	12-SEP-79	R. BELANGER	ADD NON-CONTIGUOUS DEVICE SUPPORT
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 6-1


    246					; TCO 5.1008	11-OCT-79	R. BELANGER	ADD EBUS PARITY ERROR AND DEX ERROR LOGGING
    247					; TCO 5.1009	15-0CT-79	R. BELANGER	ADD RH-11 ERROR LOGGING
    248					; TCO 5.1015	25-OCT-79	R. BELANGER	ADD TERMINAL INPUT CONTROL TABLE
    249					; TCO 4.1.1035	16-NOV-79	R. BELANGER	ADD QUEUE ARBITRATION
    250					; TCO 4.1.1066	10-JAN-80	R. BELANGER	ROUND-ROBIN DEFERRED ACKS
    251					; TCO 4.1.1091	12-FEB-80	R. BELANGER	FIX MISSING DM-11/BB'S
    252					; TCO 4.1.1092	25-FEB-80	R. BELANGER	LOCAL INPUT CONTROL
    253					; TCO 4.1.1104	05-MAR-80	R. BELANGER	CHANGE KEEP-ALIVE
    254					; TCO 4.1.1121	19-MAR-80	R. BELANGER	SUPPORT BLOCKED DTE-20
    255					; TCO 4.1.1137	-5-APR-80	R. BELANGER	REDEFINE PATCH SPACE TO UNUSED VECTORS
    256					;						REMOVE DEFERRED ACK SUPPORT
    257					;
    258					;17-DEC-82  TCO 6.1509	D. WEAVER
    259					;	FIX CONDITIONAL GENERATION OF ATL SO THAT A NODE'S BACKWARD POINTER
    260					;	DOESN'T POINT TO ITSELF.
    261					;19-JAN-83  TCO 6.1508	D. WEAVER
    262					;	ADD WORD .KLCPU TO GET THE CPU NUMBER OF THE KL WE ARE RUNNING ON
    263					;	SO WE CAN DO WARM RESTART ON SMP SYSTEMS (USED BY KLINIT)
    264					;15-MAR-83  TCO 6.1543  D.WEAVER
    265					;	ADD TABLE .KLMF2 WHICH IS A TABLE OF RETRY COUNTERS FOR EACH
    266					;	MF20 CONTROLLER.  MEMCON WILL NOW TRY TO FORCE THE CONTROLLER
    267					;	FOR N RETRIES BEFORE DELETING IT.
    268					;22-MAR-83  TCO 6.1657	D. WEAVER
    269					;	ADD WORD ABCHAR TO GET THE LAST AUTOBAUD CHARACTER TYPED (DEBUGGING)
    270					;09-JUN-83  TCO 6.1675	D. WEAVER
    271					;	MOVE .ERCOD FROM KLINIT INTO THE FRONT-END STATUS BLOCK FOR WARM
    272					;	RESTART AND RENAME IT TO .ERRCD.  ALSO MOVE KLPCRG FROM KLINIT TO
    273					;	THE STATUS BLOCK AND RENAME IT TO BE .ERRPC.
    274					;       REMOVE AUTO-TAKE FLAG AS IT IS NOT LONGER VALID.
    275					;12-JUN-83  TCO 6.1724	D. WEAVER
    276					;	ADD COPYRIGHT TO LOW CORE AFTER THE FE STATUS BLOCK.
    277					;
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 7


    279					;
    280					;
    281					; MACRO LIBRARY CALLS
    282					;
    283						.MCALL	.CRASH,MFPS,CALL
    284						.MCALL	.PUDEN,.STDEN,.ATLEN
    285						.MCALL	$DEF,F11DF$
    286						.MCALL	.TPDEN,.PUDEN,.DQPEN
    287
    288	000000					$DEF
    289	000000					F11DF$
    290
    291						.MACRO	RSXVR$ KEY,FRM,VER,EDT,NUM
    292						.IF	B,NUM
    293						.IF	NB,FRM
    294						RSXVR$	\KEY,\FRM,\VER,\EDT,0
    295						.IFF
    296						RSXVR$	\KEY,200,\VER,\EDT,0
    297						.ENDC
    298						.MEXIT
    299						.IFF
    300						.IF	GE,VER-10
    301						.IF	GE,EDT-10
    302						.ASCIZ	<KEY><FRM>\'VER'-'EDT'\<200>
    303						.IFF
    304						.ASCIZ	<KEY><FRM>\'VER'-0'EDT'\<200>
    305						.ENDC
    306						.IFF
    307						.IF	GE,EDT-10
    308						.ASCIZ	<KEY><FRM>\0'VER'-'EDT'\<200>
    309						.IFF
    310						.ASCIZ	<KEY><FRM>\0'VER'-0'EDT'\<200>
    311						.ENDC
    312						.ENDC
    313						.ENDC
    314						.ENDM	RSXVR$
    315					;
    316					;	MACRO FOR GENERATING LOW CORE
    317					;
    318						.MACRO	PSW	PRI,TRPADR,UNIT
    319						.IF	B,<TRPADR>
    320						 .WORD	.-LOWCOD+1
    321						.IFF
    322						 .WORD	TRPADR
    323						.ENDC		; IFB <TRPADR>
    324						.IF	B,<UNIT>
    325						 .WORD	0+<40*PRI>+4000
    326						.IFF
    327						 .WORD	UNIT+<40*PRI>+4000
    328						.ENDC		; IFB <UNIT>
    329						.ENDM		; PSW
    330					;
    331						.MACRO	DHPSW	U
    332						 .WORD	$DMINT		; DM-11/BB #'U INTERRUPT
    333						 .WORD	U+<40*6>+4000
    334						 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
    335						 .WORD	<40*6>+4000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 7-1


    336						 .WORD	$DHINP		; DH-11 #'U INPUT INTERRUPT
    337						 .WORD	U+<40*6>+4000
    338						 .WORD	$DHOUT		; DH-11 #'U OUTPUT INTERRUPT
    339						 .WORD	U+<40*6>+4000
    340						.ENDM
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 8
LOW CORE -- TRAP VECTORS

    342						.SBTTL	LOW CORE -- TRAP VECTORS
    343
    344		000000'			LOWCOD==.
    345	000000					PSW	6		; ILLEGAL INTERRUPT
	000000	000001 				 .WORD	.-LOWCOD+1
	000002	004300 				 .WORD	0+<40*6>+4000
    346					;
    347	000004					PSW	7,COMTRP,0	; TRAP TO 4 (TIMEOUT)
	000004	011562'				 .WORD	COMTRP
	000006	004340 				 .WORD	0+<40*7>+4000
    348					;
    349	000010					PSW	7,COMTRP,2	; RESERVED INSTRUCTION
	000010	011562'				 .WORD	COMTRP
	000012	004342 				 .WORD	2+<40*7>+4000
    350					;
    351	000014					PSW	6,COMTRP,4	; T BIT OR BPT TRAP
	000014	011562'				 .WORD	COMTRP
	000016	004304 				 .WORD	4+<40*6>+4000
    352					;
    353	000020					PSW	6,COMTRP,6	; IOT TRAP
	000020	011562'				 .WORD	COMTRP
	000022	004306 				 .WORD	6+<40*6>+4000
    354					;
    355	000024					PSW	7,.PWRDN	; POWER FAIL (POWER DOWN)
	000024	020164'				 .WORD	.PWRDN
	000026	004340 				 .WORD	0+<40*7>+4000
    356					;
    357	000030					PSW	7,EMTTRP,STXDX	; EMT TRAP
	000030	013266'				 .WORD	EMTTRP
	000032	004340 				 .WORD	STXDX+<40*7>+4000
    358					;
    359	000034					PSW	6,.DRSRN	; TRAP TRAP
	000034	013602'				 .WORD	.DRSRN
	000036	004300 				 .WORD	0+<40*6>+4000
    360					;
    361	000040				.PAT1.::			; [4.1.1137] PATCH SPACE -- 20 BYTES
    362		000004 				.REPT	4
    363						PSW	6		; ILLEGAL INTERRUPTS
    364						.ENDR
	000040	000041 				 .WORD	.-LOWCOD+1
	000042	004300 				 .WORD	0+<40*6>+4000
	000044	000045 				 .WORD	.-LOWCOD+1
	000046	004300 				 .WORD	0+<40*6>+4000
	000050	000051 				 .WORD	.-LOWCOD+1
	000052	004300 				 .WORD	0+<40*6>+4000
	000054	000055 				 .WORD	.-LOWCOD+1
	000056	004300 				 .WORD	0+<40*6>+4000
    365					;
    366	000060					PSW	6,$TTINP,0	; TTY LINE 0 INPUT (CTY)
	000060	037220'				 .WORD	$TTINP
	000062	004300 				 .WORD	0+<40*6>+4000
    367	000064					PSW	6,$TTOUT,0	; TTY LINE 0 OUTPUT (CTY)
	000064	035074'				 .WORD	$TTOUT
	000066	004300 				 .WORD	0+<40*6>+4000
    368					;
    369		000002 				.REPT	2.
    370						PSW	6		; ILLEGAL TRAPS
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 8-1
LOW CORE -- TRAP VECTORS

    371						.ENDR
	000070	000071 				 .WORD	.-LOWCOD+1
	000072	004300 				 .WORD	0+<40*6>+4000
	000074	000075 				 .WORD	.-LOWCOD+1
	000076	004300 				 .WORD	0+<40*6>+4000
    372					;
    373	000100					PSW	6,.KW11S	; CLOCK INTERRUPT
	000100	036236'				 .WORD	.KW11S
	000102	004300 				 .WORD	0+<40*6>+4000
    374					;
    375		000002 				.REPT	2
    376						PSW	6		; ILLEGAL INTERRUPT
    377						.ENDR
	000104	000105 				 .WORD	.-LOWCOD+1
	000106	004300 				 .WORD	0+<40*6>+4000
	000110	000111 				 .WORD	.-LOWCOD+1
	000112	004300 				 .WORD	0+<40*6>+4000
    378					;
    379	000114					PSW	7,.PARER	; PARITY ERROR
	000114	012040'				 .WORD	.PARER
	000116	004340 				 .WORD	0+<40*7>+4000
    380					;
    381	000120				.PAT2.::			; [4.1.1137] PATCH SPACE -- 74 BYTES
    382		000017 				.REPT	15.
    383						PSW	6		; ILLEGAL INTERRUPT
    384						.ENDR
	000120	000121 				 .WORD	.-LOWCOD+1
	000122	004300 				 .WORD	0+<40*6>+4000
	000124	000125 				 .WORD	.-LOWCOD+1
	000126	004300 				 .WORD	0+<40*6>+4000
	000130	000131 				 .WORD	.-LOWCOD+1
	000132	004300 				 .WORD	0+<40*6>+4000
	000134	000135 				 .WORD	.-LOWCOD+1
	000136	004300 				 .WORD	0+<40*6>+4000
	000140	000141 				 .WORD	.-LOWCOD+1
	000142	004300 				 .WORD	0+<40*6>+4000
	000144	000145 				 .WORD	.-LOWCOD+1
	000146	004300 				 .WORD	0+<40*6>+4000
	000150	000151 				 .WORD	.-LOWCOD+1
	000152	004300 				 .WORD	0+<40*6>+4000
	000154	000155 				 .WORD	.-LOWCOD+1
	000156	004300 				 .WORD	0+<40*6>+4000
	000160	000161 				 .WORD	.-LOWCOD+1
	000162	004300 				 .WORD	0+<40*6>+4000
	000164	000165 				 .WORD	.-LOWCOD+1
	000166	004300 				 .WORD	0+<40*6>+4000
	000170	000171 				 .WORD	.-LOWCOD+1
	000172	004300 				 .WORD	0+<40*6>+4000
	000174	000175 				 .WORD	.-LOWCOD+1
	000176	004300 				 .WORD	0+<40*6>+4000
	000200	000201 				 .WORD	.-LOWCOD+1
	000202	004300 				 .WORD	0+<40*6>+4000
	000204	000205 				 .WORD	.-LOWCOD+1
	000206	004300 				 .WORD	0+<40*6>+4000
	000210	000211 				 .WORD	.-LOWCOD+1
	000212	004300 				 .WORD	0+<40*6>+4000
    385					;
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 8-2
LOW CORE -- TRAP VECTORS

    389	000214					PSW	6		; DECTAPE INTERRUPT
	000214	000215 				 .WORD	.-LOWCOD+1
	000216	004300 				 .WORD	0+<40*6>+4000
    391					;
    392		000002 				.REPT	2.
    393						PSW	6		; ILLEGAL INTERRUPT
    394						.ENDR
	000220	000221 				 .WORD	.-LOWCOD+1
	000222	004300 				 .WORD	0+<40*6>+4000
	000224	000225 				 .WORD	.-LOWCOD+1
	000226	004300 				 .WORD	0+<40*6>+4000
    395					;
    396	000230					PSW	4,$CDINT	; CARD READER INTERRUPT
	000230	000000G				 .WORD	$CDINT
	000232	004200 				 .WORD	0+<40*4>+4000
    397					;
    398	000234				.PAT3.::			; [4.1.1137] PATCH SPACE -- 20 BYTES
    399		000004 				.REPT	4.
    400						PSW	6		; ILLEGAL INTERRUPT
    401						.ENDR
	000234	000235 				 .WORD	.-LOWCOD+1
	000236	004300 				 .WORD	0+<40*6>+4000
	000240	000241 				 .WORD	.-LOWCOD+1
	000242	004300 				 .WORD	0+<40*6>+4000
	000244	000245 				 .WORD	.-LOWCOD+1
	000246	004300 				 .WORD	0+<40*6>+4000
	000250	000251 				 .WORD	.-LOWCOD+1
	000252	004300 				 .WORD	0+<40*6>+4000
    402					;
    403	000254					PSW	4,.DBINT	; RH-11 (RP04/RP06) INTERRUPT
	000254	000000G				 .WORD	.DBINT
	000256	004200 				 .WORD	0+<40*4>+4000
    404					;
    405	000260					PSW	6		; ILLEGAL INTERRUPT
	000260	000261 				 .WORD	.-LOWCOD+1
	000262	004300 				 .WORD	0+<40*6>+4000
    406					;
    408	000264					PSW	6,$DXINT	; RX-11 INTERRUPT
	000264	000000G				 .WORD	$DXINT
	000266	004300 				 .WORD	0+<40*6>+4000
    412					;
    413	000270					PSW	6		; ILLEGAL INTERRUPT
	000270	000271 				 .WORD	.-LOWCOD+1
	000272	004300 				 .WORD	0+<40*6>+4000
    414	000274					PSW	6		; ILLEGAL INTERRUPT
	000274	000275 				 .WORD	.-LOWCOD+1
	000276	004300 				 .WORD	0+<40*6>+4000
    415					;
    416	000300					PSW	6,$TTINP,1	; DL-11E # 0 INPUT (KLINIK) INTERRUPT
	000300	037220'				 .WORD	$TTINP
	000302	004301 				 .WORD	1+<40*6>+4000
    417	000304					PSW	6,$TTOUT,1	; DL-11E # 0 OUTPUT (KLINIK) INTERRUPT
	000304	035074'				 .WORD	$TTOUT
	000306	004301 				 .WORD	1+<40*6>+4000
    418					;
    419	000310					PSW	6		; ILLEGAL INTERRUPT
	000310	000311 				 .WORD	.-LOWCOD+1
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 8-3
LOW CORE -- TRAP VECTORS

	000312	004300 				 .WORD	0+<40*6>+4000
    420	000314					PSW	6		; ILLEGAL INTERRUPT
	000314	000315 				 .WORD	.-LOWCOD+1
	000316	004300 				 .WORD	0+<40*6>+4000
    421					;
    422		000000 				U=0
    423						.IRP	U,<0,1,2,3,4,5,6,7>
    424						DHPSW	U
    425					;
    426						.ENDR
	000320	040766'				 .WORD	$DMINT		; DM-11/BB #0 INTERRUPT
	000322	004300 				 .WORD	0+<40*6>+4000
	000324	000325 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000326	004300 				 .WORD	<40*6>+4000
	000330	036400'				 .WORD	$DHINP		; DH-11 #0 INPUT INTERRUPT
	000332	004300 				 .WORD	0+<40*6>+4000
	000334	034422'				 .WORD	$DHOUT		; DH-11 #0 OUTPUT INTERRUPT
	000336	004300 				 .WORD	0+<40*6>+4000
	000340	040766'				 .WORD	$DMINT		; DM-11/BB #1 INTERRUPT
	000342	004301 				 .WORD	1+<40*6>+4000
	000344	000345 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000346	004300 				 .WORD	<40*6>+4000
	000350	036400'				 .WORD	$DHINP		; DH-11 #1 INPUT INTERRUPT
	000352	004301 				 .WORD	1+<40*6>+4000
	000354	034422'				 .WORD	$DHOUT		; DH-11 #1 OUTPUT INTERRUPT
	000356	004301 				 .WORD	1+<40*6>+4000
	000360	040766'				 .WORD	$DMINT		; DM-11/BB #2 INTERRUPT
	000362	004302 				 .WORD	2+<40*6>+4000
	000364	000365 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000366	004300 				 .WORD	<40*6>+4000
	000370	036400'				 .WORD	$DHINP		; DH-11 #2 INPUT INTERRUPT
	000372	004302 				 .WORD	2+<40*6>+4000
	000374	034422'				 .WORD	$DHOUT		; DH-11 #2 OUTPUT INTERRUPT
	000376	004302 				 .WORD	2+<40*6>+4000
	000400	040766'				 .WORD	$DMINT		; DM-11/BB #3 INTERRUPT
	000402	004303 				 .WORD	3+<40*6>+4000
	000404	000405 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000406	004300 				 .WORD	<40*6>+4000
	000410	036400'				 .WORD	$DHINP		; DH-11 #3 INPUT INTERRUPT
	000412	004303 				 .WORD	3+<40*6>+4000
	000414	034422'				 .WORD	$DHOUT		; DH-11 #3 OUTPUT INTERRUPT
	000416	004303 				 .WORD	3+<40*6>+4000
	000420	040766'				 .WORD	$DMINT		; DM-11/BB #4 INTERRUPT
	000422	004304 				 .WORD	4+<40*6>+4000
	000424	000425 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000426	004300 				 .WORD	<40*6>+4000
	000430	036400'				 .WORD	$DHINP		; DH-11 #4 INPUT INTERRUPT
	000432	004304 				 .WORD	4+<40*6>+4000
	000434	034422'				 .WORD	$DHOUT		; DH-11 #4 OUTPUT INTERRUPT
	000436	004304 				 .WORD	4+<40*6>+4000
	000440	040766'				 .WORD	$DMINT		; DM-11/BB #5 INTERRUPT
	000442	004305 				 .WORD	5+<40*6>+4000
	000444	000445 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000446	004300 				 .WORD	<40*6>+4000
	000450	036400'				 .WORD	$DHINP		; DH-11 #5 INPUT INTERRUPT
	000452	004305 				 .WORD	5+<40*6>+4000
	000454	034422'				 .WORD	$DHOUT		; DH-11 #5 OUTPUT INTERRUPT
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 8-4
LOW CORE -- TRAP VECTORS

	000456	004305 				 .WORD	5+<40*6>+4000
	000460	040766'				 .WORD	$DMINT		; DM-11/BB #6 INTERRUPT
	000462	004306 				 .WORD	6+<40*6>+4000
	000464	000465 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000466	004300 				 .WORD	<40*6>+4000
	000470	036400'				 .WORD	$DHINP		; DH-11 #6 INPUT INTERRUPT
	000472	004306 				 .WORD	6+<40*6>+4000
	000474	034422'				 .WORD	$DHOUT		; DH-11 #6 OUTPUT INTERRUPT
	000476	004306 				 .WORD	6+<40*6>+4000
	000500	040766'				 .WORD	$DMINT		; DM-11/BB #7 INTERRUPT
	000502	004307 				 .WORD	7+<40*6>+4000
	000504	000505 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000506	004300 				 .WORD	<40*6>+4000
	000510	036400'				 .WORD	$DHINP		; DH-11 #7 INPUT INTERRUPT
	000512	004307 				 .WORD	7+<40*6>+4000
	000514	034422'				 .WORD	$DHOUT		; DH-11 #7 OUTPUT INTERRUPT
	000516	004307 				 .WORD	7+<40*6>+4000
    427		000040 				U=<20-D$$H11>*4
    428					;
    429	000520				.PAT4.::			; [4.1.1137] PATCH SPACE -- 200 BYTES
    430		000040 				.REPT	U
    431						PSW	6		; ILLEGAL INTERRUPT
    432						.ENDR
	000520	000521 				 .WORD	.-LOWCOD+1
	000522	004300 				 .WORD	0+<40*6>+4000
	000524	000525 				 .WORD	.-LOWCOD+1
	000526	004300 				 .WORD	0+<40*6>+4000
	000530	000531 				 .WORD	.-LOWCOD+1
	000532	004300 				 .WORD	0+<40*6>+4000
	000534	000535 				 .WORD	.-LOWCOD+1
	000536	004300 				 .WORD	0+<40*6>+4000
	000540	000541 				 .WORD	.-LOWCOD+1
	000542	004300 				 .WORD	0+<40*6>+4000
	000544	000545 				 .WORD	.-LOWCOD+1
	000546	004300 				 .WORD	0+<40*6>+4000
	000550	000551 				 .WORD	.-LOWCOD+1
	000552	004300 				 .WORD	0+<40*6>+4000
	000554	000555 				 .WORD	.-LOWCOD+1
	000556	004300 				 .WORD	0+<40*6>+4000
	000560	000561 				 .WORD	.-LOWCOD+1
	000562	004300 				 .WORD	0+<40*6>+4000
	000564	000565 				 .WORD	.-LOWCOD+1
	000566	004300 				 .WORD	0+<40*6>+4000
	000570	000571 				 .WORD	.-LOWCOD+1
	000572	004300 				 .WORD	0+<40*6>+4000
	000574	000575 				 .WORD	.-LOWCOD+1
	000576	004300 				 .WORD	0+<40*6>+4000
	000600	000601 				 .WORD	.-LOWCOD+1
	000602	004300 				 .WORD	0+<40*6>+4000
	000604	000605 				 .WORD	.-LOWCOD+1
	000606	004300 				 .WORD	0+<40*6>+4000
	000610	000611 				 .WORD	.-LOWCOD+1
	000612	004300 				 .WORD	0+<40*6>+4000
	000614	000615 				 .WORD	.-LOWCOD+1
	000616	004300 				 .WORD	0+<40*6>+4000
	000620	000621 				 .WORD	.-LOWCOD+1
	000622	004300 				 .WORD	0+<40*6>+4000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 8-5
LOW CORE -- TRAP VECTORS

	000624	000625 				 .WORD	.-LOWCOD+1
	000626	004300 				 .WORD	0+<40*6>+4000
	000630	000631 				 .WORD	.-LOWCOD+1
	000632	004300 				 .WORD	0+<40*6>+4000
	000634	000635 				 .WORD	.-LOWCOD+1
	000636	004300 				 .WORD	0+<40*6>+4000
	000640	000641 				 .WORD	.-LOWCOD+1
	000642	004300 				 .WORD	0+<40*6>+4000
	000644	000645 				 .WORD	.-LOWCOD+1
	000646	004300 				 .WORD	0+<40*6>+4000
	000650	000651 				 .WORD	.-LOWCOD+1
	000652	004300 				 .WORD	0+<40*6>+4000
	000654	000655 				 .WORD	.-LOWCOD+1
	000656	004300 				 .WORD	0+<40*6>+4000
	000660	000661 				 .WORD	.-LOWCOD+1
	000662	004300 				 .WORD	0+<40*6>+4000
	000664	000665 				 .WORD	.-LOWCOD+1
	000666	004300 				 .WORD	0+<40*6>+4000
	000670	000671 				 .WORD	.-LOWCOD+1
	000672	004300 				 .WORD	0+<40*6>+4000
	000674	000675 				 .WORD	.-LOWCOD+1
	000676	004300 				 .WORD	0+<40*6>+4000
	000700	000701 				 .WORD	.-LOWCOD+1
	000702	004300 				 .WORD	0+<40*6>+4000
	000704	000705 				 .WORD	.-LOWCOD+1
	000706	004300 				 .WORD	0+<40*6>+4000
	000710	000711 				 .WORD	.-LOWCOD+1
	000712	004300 				 .WORD	0+<40*6>+4000
	000714	000715 				 .WORD	.-LOWCOD+1
	000716	004300 				 .WORD	0+<40*6>+4000
    433					;
    434	000720					PSW	6,$TTINP,4	; DL-11E # 3 INPUT (DN20 #2)
	000720	037220'				 .WORD	$TTINP
	000722	004304 				 .WORD	4+<40*6>+4000
    435	000724					PSW	6,$TTOUT,4	; DL-11E # 3 OUTPUT (DN20 #2)
	000724	035074'				 .WORD	$TTOUT
	000726	004304 				 .WORD	4+<40*6>+4000
    436					;
    437	000730					PSW	6,$TTINP,3	; DL-11E # 2 INPUT (DN20 #1)
	000730	037220'				 .WORD	$TTINP
	000732	004303 				 .WORD	3+<40*6>+4000
    438	000734					PSW	6,$TTOUT,3	; DL-11E # 2 OUTPUT (DN20 #1)
	000734	035074'				 .WORD	$TTOUT
	000736	004303 				 .WORD	3+<40*6>+4000
    439					;
    440	000740					PSW	6,$TTINP,2	; DL-11E # 1 INPUT (DN20 #0)
	000740	037220'				 .WORD	$TTINP
	000742	004302 				 .WORD	2+<40*6>+4000
    441	000744					PSW	6,$TTOUT,2	; DL-11E # 1 OUTPUT (DN20 #0)
	000744	035074'				 .WORD	$TTOUT
	000746	004302 				 .WORD	2+<40*6>+4000
    442					;
    444	000750					PSW	4,$LPINT,1	; LP-20 #1 INTERRUPT
	000750	000000G				 .WORD	$LPINT
	000752	004201 				 .WORD	1+<40*4>+4000
    445	000754					PSW	4,$LPINT,0	; LP-20 #0 INTERRUPT
	000754	000000G				 .WORD	$LPINT
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 8-6
LOW CORE -- TRAP VECTORS

	000756	004200 				 .WORD	0+<40*4>+4000
    450					;
    451		000004 				.REPT	4
    452						PSW	7,.DTINT	; DTE-20 # 0 INTERRUPT VECTORS
    453						.ENDR
	000760	030442'				 .WORD	.DTINT
	000762	004340 				 .WORD	0+<40*7>+4000
	000764	030442'				 .WORD	.DTINT
	000766	004340 				 .WORD	0+<40*7>+4000
	000770	030442'				 .WORD	.DTINT
	000772	004340 				 .WORD	0+<40*7>+4000
	000774	030442'				 .WORD	.DTINT
	000776	004340 				 .WORD	0+<40*7>+4000
    454					;
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 9
LOW CORE -- COMMON GLOBAL DATA

    456						.SBTTL	LOW CORE -- COMMON GLOBAL DATA
    457
    458	001000				.FESTB::
    459	001000	004176 				.WORD	<.LCEND-.FESTB>/2 ; [4.2333] WORD SIZE OF THIS STATUS BLOCK
    460	001002				.EXEND::
    461	001002	000000 	000000 			.LIMIT			; DEFINE LIMITS OF THE FRONT-END
    462									; FIRST WORD LOW LIMIT
    463									; SECOND WORD IS HIGH LIMIT
    464					;
    465					;	CURRENT TASK POINTER (POINTS TO ACTIVE TASK LIST NODE OF CURRENT TASK
    466					;
    467
    468	001006				.CRTSK::
    469	001006	000000 				.WORD	0
    470
    471	001010				.COMEF::
    472	001010	000000 	000000 			.WORD	0,0		; COMMON EVENT FLAGS
    473
    474	001014				.SERFG::
    475	001014	000000 				.WORD	0		; SIG EVENT FLAG
    476	001016				.SEWFL::
    477	001016	000000 				.WORD	0		; SIG EVENT WAIT FLAG
    478	001020				SPSAV::
    479	001020	000000 				.WORD	0		; SAVE AREA FOR STACK
    480					;
    481	001022				PARSAV::
    482	001022					.BLKW	2		; SAVE AREA FOR PARITY ERROR REGISTERS
    483									; (USED BY LC)
    484					;
    485					;	.PFAIL INDICATES POWER FAIL IN PROGRESS
    486					;	IT IS USED ONLY TO INDICATE TO PRI7 TASKS THAT
    487					;	POWER FAIL UNDERWAY AND A RETURN TO THE PROGRAM
    488					;	SHOULD NOT OCCUR
    489					;
    490	001026				.PFAIL::
    491	001026	000000 				.WORD	0
    492	001030				.PFIOW::
    493	001030	000000 				.WORD	0		; POWER FAIL RECOVERY FLAG
    494	001032				PWRXSP::
    495	001032	000000 				.WORD	0		; BUFFER FOR STACK POINTER
    496	001034				CROBAR::
    497	001034	000000 				.WORD	0		; POWER-UP CROBAR TIMER
    498	001036				.VERNO::
    499	001036					RSXVR$	RSX$$K,RSX$$F,RSX$$V,RSX$$E ; RSX20F VERSION NUMBER.
	001036	   126 	   102 	   061 		.ASCIZ	<126><102>\15-50\<200>
	001041	   065 	   055 	   065
	001044	   060 	   200 	   000
    500						.EVEN
    501	001050				.CKASS::
    502	001050	000000 				.WORD	0		; AST ADDRESS FOR CURRENT TASK (CLOCK)
    503	001052				.PFASS::
    504	001052	000000 				.WORD	0		; AST ADDRESS FOR CURRENT TASK (POWER FAIL)
    505
    506	001054					.BLKW	20
    507					;
    508	001114				.MSIZE::
    509	001114	001600 				.WORD	1600		; MEMORY SIZE
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 9-1
LOW CORE -- COMMON GLOBAL DATA

    510	001116				EMTSTK::
    511	001116	000000 				.WORD	0		; EMT SAVED DURING EMT STACK
    512	001120				TRPASV::
    513	001120	000000 				.WORD	0		; SAVED PS OF EMT/TRAP
    514
    515					;
    516					;	THE NEXT TWO BYTES MUST BE KEPT TOGETHER IN THEIR CURRENT ORDER !!!!
    517					;
    518
    519	001122				.NOERR::
    520	001122	000401 				.WORD	401		; DO NOT RECOGNIZE KL ERROR IF NON-ZERO
    521		001123'			.NOHLT	==	.NOERR+1	; DO NOT PANIC IF KL HALTS IF NON-ZERO
    522
    523	001124				.TKTN::
    524	001124	000000 				.WORD	0		; NON ZERO IF TKTN REQUIRED
    525	001126				.KLITK::
    526	001126	000000 				.WORD	0		; KL ATTENTION REQUEST
    527
    528	001130				.KLERQ::
    529	001130	000000 				.WORD	0		; KLERR SNAPSHOT INTERLOCK
    530
    531	001132				.KLIWD::
    532	001132	000000 				.WORD	0		; KL WORD TO DETERMINE BOOT PARAMETERS
    533
    534	001134				.TICKS::
    535	001134	000000 				.WORD	0		; CLOCK TICK COUNTER
    536	001136				.CLKSW::
    537	001136	000000 				.WORD	0		; CLOCK OVERFLOW SWITCH
    538	001140				.DATE::
    539	001140				.DATE3::
    540	001140	000000 				.WORD	0		; FRONT-END DATE VALID FLAG
    541									; FRONT-END DATE IS VALID IF .NE. 0
    542	001142				.YEAR::
    543	001142	003673 				.WORD	1979.		; DECIMAL YEAR
    544	001144				.DAY::
    545	001144	   000 				.BYTE	0.		; DAY OF MONTH
    546	001145				.MON::
    547	001145	   000 				.BYTE	0.		; MONTH OF YEAR
    548	001146				.DST::
    549	001146	   000 				.BYTE	0		; DAYLIGHT SAVING TIME FLAG
    550	001147				.DOW::
    551	001147	   000 				.BYTE	0		; DAY OF WEEK INDEX
    552	001150				.SSM::
    553	001150	000000 	000400 			.WORD	0,400		; ELAPSED TIME IN SECONDS SINCE MIDNIGHT
    554	001154				.TKPS::
    555	001154	000074 				.WORD	.CYLTM		; CLOCK RATE IN JIFFIES
    556
    557	001156				.SYUIC::
    558	001156	002405 				.WORD	5.*400+5.	; SYSTEM UIC [5,5]
    559	001160				.BTPRM::
    560	001160	000000 				.WORD	0		; BOOT PARAMETER
    561	001162				.BTSCH::
    562	001162	000000 				.WORD	0		; CHARACTER SAVED -- FOR SECONDARY PROTOCOL
    563	001164				.ACKAL::
    564	001164	000001 				.WORD	1		; ACK ALL SWITCH
    565	001166				.KLERW::
    566	001166	000000 				.WORD	0		; KL WORD FOR ERROR REPORTING BY SETSPD
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 9-2
LOW CORE -- COMMON GLOBAL DATA

    567	001170				.FEMOD::
    568	001170	000001 				.WORD	1		; FRONT END CONSOLE MODE FLAG
    569	001172				.KLRLD::
    570	001172	   000 				.BYTE	0		;KL RELOAD FLAG
    571	001173				.KLFCF::
    572	001173	   001 				.BYTE	1		;KL FAULT CONTINUATION FLAG
    573	001174				.KLFLG::
    574	001174	000000 				.WORD	0		; FLAG FOR PARSER TO INDICATE STATE OF KL10
    575	001176				.KLCPU::
    576	001176	   000 				.BYTE	0		;CPU NUMBER FOR WARM RESTART
    577	001177				.KLMON::
    578	001177	   000 				.BYTE	0		;CODE FOR MONITOR THAT IS RUNNING (NOT USED)
    579
    580					;	THESE ARE THE CODES FOR DIFFERENT MONITORS: (SAME AS GETTAB)
    581
    582		000001 				.MNT10=1	;TOPS10
    583		000002 				.MNITS=2	;ITS
    584		000003 				.MNTNX=3	;TENEX
    585		000004 				.MNT20=4	;TOPS20
    586
    587		000001 				MF2RTY=1		;RETRY EACH CONTROLLER ONCE
    588		000004 				MF2NUM==4.		;NUMBER OF MF20 CONTROLLERS
    589
    590	001200				.KLMF2::			;RETRY COUNTERS FOR MF20 CONTROLLERS
    591		000004 				.REPT MF2NUM
    592						.BYTE	MF2RTY		;RETRY COUNT BEFORE WE GIVE UP ON MF20
    593						.ENDR
	001200	   001 				.BYTE	MF2RTY		;RETRY COUNT BEFORE WE GIVE UP ON MF20
	001201	   001 				.BYTE	MF2RTY		;RETRY COUNT BEFORE WE GIVE UP ON MF20
	001202	   001 				.BYTE	MF2RTY		;RETRY COUNT BEFORE WE GIVE UP ON MF20
	001203	   001 				.BYTE	MF2RTY		;RETRY COUNT BEFORE WE GIVE UP ON MF20
    594						.EVEN			;BACK TO A WORD BOUNDRY
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 10
LOW CORE -- KLINIK DATA BASE

    596						.SBTTL	LOW CORE -- KLINIK DATA BASE
    597					;
    598					;	NOTE --
    599					;	THE NEXT 32 BYTES MUST REMAIN CONTIGUOUS AND IN THE SAME ORDER
    600					;
    601
    602	001204				.KLNPB::
    603	001204	000026 				.WORD	KLNPLN		; KLINIK PARAMETER BLOCK LENGTH
    604									; BUFFER FOR PARAMETER SAVE STARTS HERE
    605	001206				.KLNLB::			;
    606	001206				.KLNBC::
    607	001206	000024 				.WORD	KLNPLN-2	; BYTE COUNT FOR TRANSFER
    608	001210				.KLNFT::
    609	001210	000000 				.WORD	0		; KLINIK ENABLE START TIME --
    610									;	SECONDS SINCE MIDNIGHT
    611	001212				.KLNFD::
    612	001212	   000 	   000 	   000 		.BYTE	0,0,0,0		; KLINIK ENABLE START DATE
	001215	   000
    613	001216				.KLNTT::
    614	001216	000000 				.WORD	0		; KLINIK ENABLE END TIME --
    615									;	 SECONDS SINCE MIDNIGHT
    616	001220				.KLNTD::
    617	001220	   000 	   000 	   000 		.BYTE	0,0,0,0		; KLINIK ENABLE END DATE
	001223	   000
    618	001224				.KLNMD::
    619	001224	   000 	   000 			.BYTE	0,0		; KLINIK MODE FLAGS
    620					.EVEN				;
    621		000016 			KLNLGL==.-.KLNFT		; KLINIK EVENT LOG BUFFER LENGTH IN BYTES
    622		001226'			.KLNPE==.
    623	001226				.KLNPW::
    624	001226	000000 	000000 	000000 		.WORD	0,0,0		; ASCII PASSWORD FOR KLINIK
    625					.EVEN
    626		000026 			KLNPLN==.-.KLNBC		; SAVE BUFFER LENGTH IN BYTES
    627	001234				.KLNSW::
    628	001234	   000 	   000 			.BYTE	0,0		; KLINIK LINE STATUS BYTES
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 11
LOW CORE -- COMMIUNICATIONS REGION DATA BASE

    630						.SBTTL	LOW CORE -- COMMIUNICATIONS REGION DATA BASE
    631
    632					;
    633					;	POINTERS TO COMMUNICATIONS AREA
    634					;
    635	001236				COMBSE::
    636	001236	000000 				.WORD	0	; BASE OF COMMUNICATION AREA
    637	001240				PRMEMN::
    638	001240	000000 				.WORD	0	; MY PROCESSOR NUMBER
    639	001242				DEPOF::
    640	001242	000000 				.WORD	0	; DEPOSIT OFFSET FROM EXAMINE
    641					;
    642					;
    643					;	PROCESSOR IDENTIFICATION TABLE
    644					;
    645					;	PROTBL FORMAT:
    646					;
    647					; 		DTENM -- ADDRESS OF DTE-20 TO ACCESS THIS PROCESSOR
    648		000000 			DTENM=0
    649					;		 EMYN -- ADDRESS TO COMMUNICATE TO PROCESSOR 0
    650		000002 			EMYN==2
    651					;		 DMYN -- ADDRESS TO COMMUNICATE TO PROCESSOR 0 (WRITE)
    652		000004 			DMYN==4
    653					;		 EHSG -- ADDRESS FROM GENERAL
    654		000006 			EHSG==6
    655					;		 EHSM -- ADDRESS FROM SPECIFIC
    656		000010 			EHSM==10
    657
    658	001244				PROTBL::
    659	001244	174400 				.WORD	174400	; DTENM
    660	001246	000000 				.WORD	0	; EMYN
    661	001250	000000 				.WORD	0	; DMYN
    662	001252	000000 				.WORD	0	; EHSG
    663	001254	000000 				.WORD	0	; EHSM
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 12
LOW CORE -- QUEUED PROTOCOL DATA BASE

    665						.SBTTL	LOW CORE -- QUEUED PROTOCOL DATA BASE
    666
    667	001256				.CRQZ::
    668	001256	000000 				.WORD	0		; CURRENT QUEUE SIZE
    669	001260				.CPFN::
    670	001260	000000 				.WORD	0		; CURRENT FUNCTION IN TO 10 QUEUE
    671	001262				.CPDV::
    672	001262	000000 				.WORD	0		; CURRENT DEVICE IN TO 10 QUEUE
    673	001264				.CRSZ::
    674	001264	000000 				.WORD	0		; CURRENT SIZE OF TO10 QUEUE
    675	001266				.CRPB::
    676	001266	000000 				.WORD	0		; CURRENT BUFFER POINTER IN TO10 QUEUE
    677	001270				.CRHD::
    678	001270	000000 				.WORD	0		; HEAD OF CURRENT TO10 QUEUE
    679	001272				.CRSB::
    680	001272	000000 				.WORD	0		; POINTER TO CURRENT FUNCTION SIZE
    681
    682	001274				DTEMSK::
    683	001274	000000 				.WORD	0		; DTE DEVICE EVENT FLAG MASK
    684	001276				DTEADR::
    685	001276	000000 				.WORD	0		; DTE DEVICE INDIRECT FLAG ADDRESS
    686
    687	001300				TO11NP::
    688	001300	000000 				.WORD	0		; NODE POINTER FOR NODE
    689	001302				TO11HD::
    690	001302	000000 				.WORD	0		; COUNT OF BYTES IN THIS QUEUE
    691	001304				TO11FN::
    692	001304	000000 				.WORD	0		; TO ELEVEN FUNCTION CODE
    693	001306				TO11DV::
    694	001306	000000 				.WORD	0		; TO ELEVEN DEVICE NUMBER
    695	001310				TO11SP::
    696	001310	000000 				.WORD	0		; SPACE
    697	001312				TO11FW::
    698	001312	000000 				.WORD	0		; FIRST WORD OF FUNCTION
    700	001314				TO11GW::
    701	001314	177777 				.WORD	-1		; GUARD WORD FOR DTE20
    702	001316				TO11AS::
    703	001316	000000 				.WORD	0		; ADDRESS SAVE
    704	001320				TO11BS::
    705	001320	000000 				.WORD	0		; BYTE COUNT SAVE
    706	001322				TO10SZ::
    707	001322	000000 				.WORD	0		; BYTE COUNT OF XFER
    708	001324				TO10AS::
    709	001324	000000 				.WORD	0
    711
    712	001326				STSTT::
    713	001326	000001 	000000 	000000 		.WORD	1,0,0		; TO 10 STATUS
    714
    715		001332'			TO10QC==STSTT+4			; TO 10 QUEUE COUNT
    716		001333'			TO11QC==STSTT+5			; TO 11 QUEUE COUNT
    717
    718	001334	001334'			TO10Q:: .WORD	.		; LISTHEAD FOR TO 10 QUEUE
    719	001336	001334'				.WORD	.-2
    720
    721	001340				EQSZ::
    722	001340	000000 				.WORD	0		; ELEVEN QUEUE SIZE
    723
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 12-1
LOW CORE -- QUEUED PROTOCOL DATA BASE

    724	001342				TO11Q::
    725	001342	000000 				.WORD	0		; TO 11 QUEUE
    726	001344				STATI::
    727	001344					.BLKW	3		; STATUS/SCRATCH WORD FOR EXAMINES/DEPOSITS
    728	001352				DEXST::
    729	001352	000000 				.WORD	0		; DEXDONE TIMEOUT
    730	001354				DEXTM3::
    731	001354	000000 				.WORD	0		; EXAMINE WORD 3 (TEMP STORAGE) TO BE
    732	001356				DEXTM2::
    733	001356	000000 				.WORD	0		; EXAMINE WORD 2 -USED ONLY BECAUSE EXAMINE
    734	001360				DEXTM1::
    735	001360	000000 				.WORD	0		; EXAMINE WORD 1 - OR DEPOSIT MAY FAIL AND MUST BE REDONE
    736	001362				.PRADR::
    737	001362	000000 				.WORD	0		; ADDRESS OF PRIV OFFSET TABLE ENTRY
    738	001364				.PRSTA::
    739	001364	174434 				.WORD	174434		; PRIVILEDGED DTE20 STATUS WORD
    740	001366				.PRDTE::
    741	001366	174400 				.WORD	174400		; FIRST DTE ADDRESS OF PRIVILEDGED DTE20
    742	001370				.PRDCT::
    743	001370	000000 				.WORD	0		; DOORBELL COUNTER FOR KLINIT.
    744					;
    745					;	THE NEXT TWO BYTES MUST REMAIN CONTIGUOUS AND IN THE SAME ORDER
    746					;
    747	001372				.DXRTY::
    748	001372	   001 				.BYTE	1		; [5.1008] DEX ERROR PROCESSING FLAG (SEE BELOW)
    749	001373				.EBRTY::
    750	001373	   001 				.BYTE	1		; [5.1008] EBUS PARITY ERROR PROCESSING FLAG
    751									;		+1 -- NO EBUS PARITY ERROR
    752									;		 0 -- RETRY SUCCEEDED
    753									;		-1 -- RETRY FAILED
    754					;
    755					;	THE NEXT TWO WORDS MUST REMAIN CONTIGUOUS AND IN THE SAME ORDER
    756					;
    757	001374				.EBPEQ::
    758	001374	000000 				.WORD	0		; [4.2217] CONTAINS POINTER TO DTE-20 EBUS PARITY
    759									;	       SNAPSHOT IF ALLOCATION WAS SUCCESSFUL
    760	001376				.EBPEC::
    761	001376	000000 				.WORD	0		; [5.1008] COUNT OF NODES IN THIS QUEUE (MAX = 2)
    762
    763	001400				.PRPSE::
    764	001400	   000 				.BYTE	0		; PROTOCOL PAUSE FLAG
    765	001401				TOXQIP::
    766	001401	   000 				.BYTE	0		; [4.1.1035] TO 10 QUEUE IN PROGRESS FLAG
    767						.EVEN
    768	001402				.DTBLK::
    769	001402	000000 				.WORD	0		; [4.1.1121] HOLDS RE-ENTRY POINT TO START BLOCKED TRANSFER
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 13
LOW CORE -- KEEP-ALIVE DATA BASE

    771						.SBTTL	LOW CORE -- KEEP-ALIVE DATA BASE
    772
    773	001404				KPAL0::
    774	001404	000000 	000000 	000000 		.WORD	0,0,0		; 10 KEEP ALIVE
    775	001412				OKPAL0::
    776	001412	000000 				.WORD	0		; SAVED KEEP ALIVE
    777	001414				KPAL1::
    778	001414	000000 				.WORD	0		; [4.1.1104] 11 KEEP ALIVE
    779	001416				.KPAC::
    780	001416	000005 				.WORD	5		; COUNTER FOR KEEP-ALIVE.
    781	001420				.KACFL::
    782	001420	000001 				.WORD	1		; [4.2107] FLAG TO ALLOW XCT 71
    783									; [4.2107] OR DUMP/RELOAD ON KEEP-ALIVE CEASE
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 14
LOW CORE -- CORE MANAGER DATA BASE

    785						.SBTTL	LOW CORE -- CORE MANAGER DATA BASE
    786
    787		076000 				.BGBST==76000		; START OF BIG BUFFER
    788		002000 				.BGLEN==2000		; LENGTH OF BIG BUFFER
    789
    790					;
    791					;	POOL FREE CORE AREA
    792					;
    793	001422				.BGBUF::
    794	001422	076000 				.WORD	.BGBST		; BIG BUFFER SPACE (1000 EACH)
    795	001424	002000 				.WORD	.BGLEN
    796
    797	001426				.FREPL::
    798	001426	000000 				.WORD	0		; FREE POOL BASE ADDRESS
    799	001430	000000 				.WORD	0		; FREE POOL SIZE IN BYTES
    800
    801	001432				.POLLH::
    802	001432	001436'				.WORD	.POLST		; HEAD OF POOL
    803	001434	002336'				.WORD	.POLND		; END OF POOL
    804
    805	001436				.POLST::
    806	001436	001476'				.WORD	.+40
    807	001440	001432'				.WORD	.POLLH
    808	001442					.BLKW	14.
    809
    810		000015 				.REPT	15
    811						.WORD	.+40
    812						.WORD	.-40
    813						.BLKW	14.
    814						.ENDR
	001476	001536'				.WORD	.+40
	001500	001440'				.WORD	.-40
	001536	001576'				.WORD	.+40
	001540	001500'				.WORD	.-40
	001576	001636'				.WORD	.+40
	001600	001540'				.WORD	.-40
	001636	001676'				.WORD	.+40
	001640	001600'				.WORD	.-40
	001676	001736'				.WORD	.+40
	001700	001640'				.WORD	.-40
	001736	001776'				.WORD	.+40
	001740	001700'				.WORD	.-40
	001776	002036'				.WORD	.+40
	002000	001740'				.WORD	.-40
	002036	002076'				.WORD	.+40
	002040	002000'				.WORD	.-40
	002076	002136'				.WORD	.+40
	002100	002040'				.WORD	.-40
	002136	002176'				.WORD	.+40
	002140	002100'				.WORD	.-40
	002176	002236'				.WORD	.+40
	002200	002140'				.WORD	.-40
	002236	002276'				.WORD	.+40
	002240	002200'				.WORD	.-40
	002276	002336'				.WORD	.+40
	002300	002240'				.WORD	.-40
    815
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 14-1
LOW CORE -- CORE MANAGER DATA BASE

    816	002336				.POLND::
    817	002336	001432'				.WORD	.POLLH
    818	002340	002300'				.WORD	.-40
    819	002342					.BLKW	14.
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 15
LOW CORE -- CLOCK REQUEST LIST

    821						.SBTTL	LOW CORE -- CLOCK REQUEST LIST
    822
    823					;
    824					;	CLOCK LIST (LIST OF ENTRIES IN THE CLOCK QUEUE TO RECEIVE
    825					;	EVENT FLAGS SET ON COMPLETION OF CLOCK TIMER
    826					;
    827		000007 			.CLKSZ==7.	; CLOCK QUEUE SIZE
    828		000014 			C.SZ=14		; CLOCK ENTRY SIZE LOCAL DEFINITION (NOTE: IS A GLOBAL VAR.)
    829
    830	002376				.CLKBA::
    831	002376	007202'				.WORD	TTYTSK
    832	002400	000000 				.WORD	0
    833	002402	000074 				.WORD	.CYLTM
    834	002404	000074 				.WORD	.CYLTM
    835	002406	000100 				.WORD	EF.TMO
    836	002410	007222'				.WORD	TTYTSK+A.EF
    837		000074 				.REPT	.CLKSZ-2*C.SZ
    838						.WORD	0
    839						.ENDR
	002412	000000 				.WORD	0
	002414	000000 				.WORD	0
	002416	000000 				.WORD	0
	002420	000000 				.WORD	0
	002422	000000 				.WORD	0
	002424	000000 				.WORD	0
	002426	000000 				.WORD	0
	002430	000000 				.WORD	0
	002432	000000 				.WORD	0
	002434	000000 				.WORD	0
	002436	000000 				.WORD	0
	002440	000000 				.WORD	0
	002442	000000 				.WORD	0
	002444	000000 				.WORD	0
	002446	000000 				.WORD	0
	002450	000000 				.WORD	0
	002452	000000 				.WORD	0
	002454	000000 				.WORD	0
	002456	000000 				.WORD	0
	002460	000000 				.WORD	0
	002462	000000 				.WORD	0
	002464	000000 				.WORD	0
	002466	000000 				.WORD	0
	002470	000000 				.WORD	0
	002472	000000 				.WORD	0
	002474	000000 				.WORD	0
	002476	000000 				.WORD	0
	002500	000000 				.WORD	0
	002502	000000 				.WORD	0
	002504	000000 				.WORD	0
	002506	000000 				.WORD	0
	002510	000000 				.WORD	0
	002512	000000 				.WORD	0
	002514	000000 				.WORD	0
	002516	000000 				.WORD	0
	002520	000000 				.WORD	0
	002522	000000 				.WORD	0
	002524	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 15-1
LOW CORE -- CLOCK REQUEST LIST

	002526	000000 				.WORD	0
	002530	000000 				.WORD	0
	002532	000000 				.WORD	0
	002534	000000 				.WORD	0
	002536	000000 				.WORD	0
	002540	000000 				.WORD	0
	002542	000000 				.WORD	0
	002544	000000 				.WORD	0
	002546	000000 				.WORD	0
	002550	000000 				.WORD	0
	002552	000000 				.WORD	0
	002554	000000 				.WORD	0
	002556	000000 				.WORD	0
	002560	000000 				.WORD	0
	002562	000000 				.WORD	0
	002564	000000 				.WORD	0
	002566	000000 				.WORD	0
	002570	000000 				.WORD	0
	002572	000000 				.WORD	0
	002574	000000 				.WORD	0
	002576	000000 				.WORD	0
	002600	000000 				.WORD	0
    840	002602				.CLKEA::
    841	002602	000000 				.WORD	0		; END OF CLOCK LIST
    842
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 17
LOW CORE -- TERMINAL SERVICE DATA BASE

    862						.SBTTL	LOW CORE -- TERMINAL SERVICE DATA BASE
    863
    864	002604				.INHDM::
    865	002604	000001 				.WORD	1		; INBIBIT/ENABLE REMOTE LINES (0)=ENABLE
    866	002606				.ABCNT::
    867	002606	000000 				.WORD	0		; COUNT OF AUTO BAUDED LINES
    868	002610				.ABFLG::
    869	002610	000000 				.WORD	0		; FLAG FOR "SETSPD"
    870					;
    871					;	SENDALL MESSAGE POINTERS
    872					;
    873	002612				.SNDLP::
    874	002612	000000 				.WORD	0		; POINTER TO SENDALL BUFFER IN USE
    875	002614				.SNDBF::
    876	002614	000000 	000000 	000000 		.WORD	0,0,0,0		; SENDALL BUFFER RING
	002622	000000
    877	002624				.SNDCN::
    878	002624	000000 	000000 	000000 		.WORD	0,0,0,0		; SENDALL TTY COUNT (THIS AND ABOVE MUST BE TOGETHER)
	002632	000000
    879	002634				.CRSND::
    880	002634	000000 				.WORD	0		; CURRENT SENDALL NODE POINTER -- USED BY ..STTY
    881	002636				.BRKCH::
    882	002636	000034 				.WORD	'\-100		; BREAK CHARACTER (^\)
    883	002640				.TTP11::
    884	002640	000000 				.WORD	0		; TTY PDP11 INPUT IN PROGRESS
    885	002642				.CTYPT::
    886	002642				CTYPTR::
    887	002642	003004'				.WORD	DLTBL		; CONSOLE TTY TABLE POINTER
    888	002644				.KLNPT::
    889	002644				KLNPTR::
    890	002644	003014'				.WORD	DLETBL		; KLINIK LINE POINTER
    891	002646				$UNIT::
    892	002646	000000 				.WORD	0		; DH-11 UNIT NUMBER IF CTY
    893	002650				$BTMSK::
    894	002650	000000 				.WORD	0		; MASK TO START CONSOLE TTY (DH-11)
    895	002652				DMTMP::
    896	002652	000000 				.WORD	0		; TEMPORARY STORAGE FOR DM-11/BB CONTROLLER NUMBER
    897	002654				DHTMP::
    898	002654	000000 				.WORD	0		; TEMPORARY STORAGE FOR DH-11 CONTROLLER NUMBER
    899	002656				DLTMP::
    900	002656	000000 				.WORD	0		; TEMPORARY STORAGE FOR DL-11 CONTROLLER NUMBER
    901	002660				DHSTSV::
    902	002660	000000 				.WORD	0		; DH-11 TABLE POINTER SAVE
    903	002662				.TTELQ::
    904	002662	000000 				.WORD	0		; [4.2245] TERMINAL ERROR LOGGING QUEUE POINTER
    905					;
    906					;	THE NEXT TWO WORDS MUST REMAIN CONTIGUOUS AND IN THE SAME ORDER
    907					;
    908	002664				.TTELC::
    909	002664	000000 				.WORD	0		; [5.1008] COUNT OF NODES IN THIS QUEUE
    910	002666				.TTELB::
    911	002666	000000 				.WORD	0		; [4.2245] TEMPORARY BUFFER FOR ERROR LOGGING
    912					;
    913					;	THE NEXT TWO BYTES MUST REMAIN CONTIGUOUS AND IN THE SAME ORDER
    914					;
    915	002670				TMOCNT::
    916	002670	   012 				.BYTE	^D10		; [4.2309] TERMINAL TIMEOUT COUNTER
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 17-1
LOW CORE -- TERMINAL SERVICE DATA BASE

    917	002671	   026 				.BYTE	^D22		; [4.2309] MODEM TIMEOUT COUNTER
    918						.EVEN
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 18
LOW CORE -- PDP-11 CTY SERVICE DATA BASE

    920						.SBTTL	LOW CORE -- PDP-11 CTY SERVICE DATA BASE
    921
    922	002672				CTYSTS::
    923		000020 				.REPT	16.		; CONSOLE TTY STATUS BLOCK
    924						.WORD	0
    925						.ENDR
	002672	000000 				.WORD	0
	002674	000000 				.WORD	0
	002676	000000 				.WORD	0
	002700	000000 				.WORD	0
	002702	000000 				.WORD	0
	002704	000000 				.WORD	0
	002706	000000 				.WORD	0
	002710	000000 				.WORD	0
	002712	000000 				.WORD	0
	002714	000000 				.WORD	0
	002716	000000 				.WORD	0
	002720	000000 				.WORD	0
	002722	000000 				.WORD	0
	002724	000000 				.WORD	0
	002726	000000 				.WORD	0
	002730	000000 				.WORD	0
    926	002732				CNT::
    927	002732	000000 				.WORD	0
    928	002734				BYCNT::
    929	002734	000000 				.WORD	0
    930	002736				CRADR::
    931	002736	000000 				.WORD	0
    932	002740				TTPKT::
    933	002740	000000 				.WORD	0		; I/O PACKET ADDRESS
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 19
LOW CORE -- TERMINAL DRIVER DATA BASE

    935						.SBTTL	LOW CORE -- TERMINAL DRIVER DATA BASE
    936
    937					;
    938					;	TTY TABLES
    939					;
    940					; CONTROLLER IMPURE DATA TABLES (INDEXED BY CONTROLLER (UNIT) NUMBER)
    941					;
    942
    943	002742				DMTBL::
    944	002742	170500 	003054'			.WORD	170500,DHTBL		; DM11BB TABLE
    945	002746	170510 	003254'			.WORD	170510,16.*8.+DHTBL
    946	002752	170520 	003454'			.WORD	170520,16.*8.*2.+DHTBL
    947	002756	170530 	003654'			.WORD	170530,16.*8.*3.+DHTBL
    948	002762	170540 	004054'			.WORD	170540,16.*8.*4.+DHTBL
    949	002766	170550 	004254'			.WORD	170550,16.*8.*5.+DHTBL
    950	002772	170560 	004454'			.WORD	170560,16.*8.*6.+DHTBL
    951	002776	170570 	004654'			.WORD	170570,16.*8.*7.+DHTBL
    952	003002	000000 				.WORD	0			; [5.1004] END OF TABLE MARKER
    953		003004'			DMTBE==.
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 20
LOW CORE -- DATA LINE SCANNER DATA BASE

    955						.SBTTL	LOW CORE -- DATA LINE SCANNER DATA BASE
    956
    957					;	THE DATA LINE SCANNER TABLE IS ORGANIZED AS FOLLOWS:
    958					;	THE DL-11'S ARE FIRST IN THE TABLE AND THE DL-11C (CTY) IS UNIT 0,
    959					;	THE DL-11E(S) FOLLOW AND BEGIN AT UNIT 1. THE DH-11'S FOLLOW THE
    960					;	DL-11E'S
    961					;
    962					;	ALL TERMINALS HAVE A FOUR WORD ENTRY IN THE FOLLOWING FORMAT:
    963					;
    964					;	+----------------------------------+
    965					;	!    OUTPUT THREAD LIST POINTER    !
    966					;	+----------------------------------+
    967					;	!	EXTERNAL PAGE POINTER	   !
    968					;	+----------------------------------+
    969					;	!	 TERMINAL SPEED WORD	   !
    970					;	+----------------------------------+
    971					;	!	 TERMINAL STATUS WORD	   !
    972					;	+----------------------------------+
    973
    974	003004				TTTBL::					; START OF DATA LINE SCANNER TABLE
    975	003004				DLTBL::
    976	003004	000000 	177560 	000000 		.WORD	0,177560,0,TT.CTY	; TERMINAL STATUS FOR DL-11C
	003012	000002
    977	003014				DLETBL::				; DL-11E TABLE
    978	003014	000000 	175610 	000000 		.WORD	0,175610,0,TT.RMT	; DL-11E # 0 (KLINIK)
	003022	000100
    979	003024	000000 	175630 	000000 		.WORD	0,175630,0,TT.RMT	; DL-11E # 1
	003032	000100
    980	003034	000000 	175640 	000000 		.WORD	0,175640,0,TT.RMT	; DL-11E # 2
	003042	000100
    981	003044	000000 	175650 	000000 		.WORD	0,175650,0,TT.RMT	; DL-11E # 3
	003052	000100
    982		000005 			DLCNT	==.-DLTBL/8.			; NUMBER OF DL-11'S
    983		000004 			DLECNT	==.-DLETBL/8.			; NUMBER OF DL-11E'S
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 21
LOW CORE -- DH-11 DATA BASE

    985						.SBTTL	LOW CORE -- DH-11 DATA BASE
    986
    987	003054				DHTBL::
    988		000020 				.REPT	16.
    989						.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
    990						.ENDR
	003054	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003062	000000
	003064	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003072	000000
	003074	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003102	000000
	003104	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003112	000000
	003114	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003122	000000
	003124	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003132	000000
	003134	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003142	000000
	003144	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003152	000000
	003154	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003162	000000
	003164	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003172	000000
	003174	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003202	000000
	003204	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003212	000000
	003214	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003222	000000
	003224	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003232	000000
	003234	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003242	000000
	003244	000000 	160020 	016003 		.WORD	0,160020,16003,0	; DH-11 MUX CONRTOLLER 0
	003252	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 22
LOW CORE -- DH-11 DATA BASE

    992		000020 				.REPT	16.
    993						.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
    994						.ENDR
	003254	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003262	000000
	003264	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003272	000000
	003274	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003302	000000
	003304	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003312	000000
	003314	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003322	000000
	003324	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003332	000000
	003334	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003342	000000
	003344	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003352	000000
	003354	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003362	000000
	003364	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003372	000000
	003374	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003402	000000
	003404	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003412	000000
	003414	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003422	000000
	003424	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003432	000000
	003434	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003442	000000
	003444	000000 	160040 	016003 		.WORD	0,160040,16003,0	; DH-11 MUX CONTROLLER 1
	003452	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 23
LOW CORE -- DH-11 DATA BASE

    996		000020 				.REPT	16.
    997						.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
    998						.ENDR
	003454	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003462	000000
	003464	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003472	000000
	003474	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003502	000000
	003504	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003512	000000
	003514	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003522	000000
	003524	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003532	000000
	003534	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003542	000000
	003544	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003552	000000
	003554	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003562	000000
	003564	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003572	000000
	003574	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003602	000000
	003604	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003612	000000
	003614	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003622	000000
	003624	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003632	000000
	003634	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003642	000000
	003644	000000 	160060 	016003 		.WORD	0,160060,16003,0	; DH-11 MUX CONTROLLER 2
	003652	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 24
LOW CORE -- DH-11 DATA BASE

   1000		000020 				.REPT	16.
   1001						.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
   1002						.ENDR
	003654	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003662	000000
	003664	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003672	000000
	003674	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003702	000000
	003704	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003712	000000
	003714	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003722	000000
	003724	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003732	000000
	003734	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003742	000000
	003744	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003752	000000
	003754	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003762	000000
	003764	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	003772	000000
	003774	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	004002	000000
	004004	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	004012	000000
	004014	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	004022	000000
	004024	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	004032	000000
	004034	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	004042	000000
	004044	000000 	160100 	016003 		.WORD	0,160100,16003,0	; DH-11 MUX CONTROLLER 3
	004052	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 25
LOW CORE -- DH-11 DATA BASE

   1004		000020 				.REPT	16.
   1005						.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
   1006						.ENDR
	004054	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004062	000000
	004064	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004072	000000
	004074	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004102	000000
	004104	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004112	000000
	004114	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004122	000000
	004124	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004132	000000
	004134	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004142	000000
	004144	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004152	000000
	004154	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004162	000000
	004164	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004172	000000
	004174	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004202	000000
	004204	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004212	000000
	004214	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004222	000000
	004224	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004232	000000
	004234	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004242	000000
	004244	000000 	160120 	016003 		.WORD	0,160120,16003,0	; DH-11 MUX CONTROLLER 4
	004252	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 26
LOW CORE -- DH-11 DATA BASE

   1008		000020 				.REPT	16.
   1009						.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
   1010						.ENDR
	004254	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004262	000000
	004264	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004272	000000
	004274	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004302	000000
	004304	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004312	000000
	004314	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004322	000000
	004324	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004332	000000
	004334	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004342	000000
	004344	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004352	000000
	004354	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004362	000000
	004364	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004372	000000
	004374	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004402	000000
	004404	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004412	000000
	004414	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004422	000000
	004424	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004432	000000
	004434	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004442	000000
	004444	000000 	160140 	016003 		.WORD	0,160140,16003,0	; DH-11 MUX CONTROLLER 5
	004452	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 27
LOW CORE -- DH-11 DATA BASE

   1012		000020 				.REPT	16.
   1013						.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
   1014						.ENDR
	004454	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004462	000000
	004464	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004472	000000
	004474	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004502	000000
	004504	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004512	000000
	004514	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004522	000000
	004524	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004532	000000
	004534	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004542	000000
	004544	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004552	000000
	004554	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004562	000000
	004564	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004572	000000
	004574	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004602	000000
	004604	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004612	000000
	004614	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004622	000000
	004624	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004632	000000
	004634	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004642	000000
	004644	000000 	160160 	016003 		.WORD	0,160160,16003,0	; DH-11 MUX CONTROLLER 6
	004652	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 28
LOW CORE -- DH-11 DATA BASE

   1016		000020 				.REPT	16.
   1017						.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
   1018						.ENDR
	004654	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004662	000000
	004664	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004672	000000
	004674	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004702	000000
	004704	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004712	000000
	004714	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004722	000000
	004724	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004732	000000
	004734	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004742	000000
	004744	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004752	000000
	004754	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004762	000000
	004764	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	004772	000000
	004774	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	005002	000000
	005004	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	005012	000000
	005014	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	005022	000000
	005024	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	005032	000000
	005034	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	005042	000000
	005044	000000 	160200 	016003 		.WORD	0,160200,16003,0	; DH-11 MUX CONTROLLER 7
	005052	000000
   1019
   1020		000200 			DHCNT	==.-DHTBL/8.			; COUNT OF DH-11'S
   1021		000205 			TTCNT	==.-TTTBL/8.			; NUMBER OF ENTRIES OF DATA LINE SCANNER TABLE
   1022		005054'			TTYEND==.
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 29
LOW CORE -- DH-11 DATA BASE

   1024					;
   1025					; TERMINAL INPUT CONTROL TABLE, ONE WORD PER LINE
   1026					;
   1027	005054				.TTS2F::
   1028	005054	000000 				.WORD	0		; [5.1015] FLAG FOR CLOCK SERVICE
   1029	005056				.S2IDC::
   1030	005056	000000 				.WORD	0		; [4.1.1092] CURRENT COUNT OF LOCALLY DISABLED LINES
   1031	005060				.S2ITP::
   1032	005060	003004'				.WORD	TTTBL		; [4.1.1092] TABLE POSITION OF LAST LOCALLY ENABLED LINE
   1033	005062				.IBFLO::
   1034	005062	001600 				.WORD	1600		; [4.1.1092] INPUT BUFFER LOW THRESHOLD
   1035	005064				.IBFOK::
   1036	005064	002000 				.WORD	2000		; [4.1.1092] INPUT BUFFER OK THRESHOLD
   1037	005066				STSW2::
   1038	005066					.BLKW	TTCNT		; [5.1015] STATUS BLOCK FOR EACH LINE
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 31
LOW CORE -- FLOPPY DRIVER DATA BASE

   1058						.SBTTL	LOW CORE -- FLOPPY DRIVER DATA BASE
   1059
   1060	005500				DXRTC::
   1061	005500	000000 				.WORD	0		; ERROR RETRY COUNT FOR CURRENT UNIT
   1062	005502				DXCNT::
   1063	005502	000000 				.WORD	0		; BYTE COUNT
   1064	005504				DXBUF::
   1065	005504	000000 				.WORD	0		; CURRENT ADDRESS POINTER
   1066	005506				DXVCB::
   1067	005506					.BLKW	6
   1068	005522				DXUNIT::
   1069	005522	000000 				.WORD	0		; CURRENT UNIT
   1070	005524				DXPKT::
   1071	005524	000000 				.WORD	0		; I/O PACKET ADDRESS
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 32
LOW CORE -- DISC DRIVER DATA BASE

   1074						.SBTTL	LOW CORE -- DISC DRIVER DATA BASE
   1075
   1076	005526				RPRTC::
   1077	005526	000000 				.WORD	0		; RETRY COUNT FOR CURRENT OPERATION
   1078	005530				RPRNA::
   1079	005530	000000 				.WORD	0		; ADDRESS OF RNA
   1080	005532				RPBUF::
   1081	005532	000000 	000000 			.WORD	0,0		; BUFFER ADDRESS
   1082	005536				RPCNT::
   1083	005536	000000 				.WORD	0		; SIZE
   1084	005540				RPUNIT::
   1085	005540	000000 				.WORD	0		; CURRENT UNIT
   1086	005542				RPCW2::
   1087	005542	000000 				.WORD	0
   1088	005544				.RPELQ::
   1089	005544	000000 				.WORD	0		; [5.1009] RH-11 ERROR LOGGING QUEUE LISTHEAD
   1090	005546				.RPELC::
   1091	005546	000000 				.WORD	0		; [5.1009] RH-11 ERROR LOGGING QUEUE COUNT
   1092	005550	000020 			.RHPB::	.WORD	20
   1093	005552				.RHSN::	.BLKW	10
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 33
LOW CORE -- FE DRIVER DATA BASE

   1095						.SBTTL	LOW CORE -- FE DRIVER DATA BASE
   1096
   1097	005572				FETBL::
   1098	005572	000000 				.WORD	0		; ENTRY FOR FE0:
   1099	005574	000000 				.WORD	0		; ENTRY FOR FE1:
   1100	005576	000000 				.WORD	0		; ENTRY FOR FE2:
   1101	005600	000000 				.WORD	0		; ENTRY FOR FE3:
   1102	005602				NODADR::
   1103	005602	000000 				.WORD	0
   1104	005604				ADRSAV::
   1105	005604	000000 				.WORD	0		; ADDRESS SAVED
   1106	005606				BYTESA::
   1107	005606	000000 				.WORD	0		; COUNT
   1108	005610				STSWD::
   1109	005610	000000 	000000 			.WORD	0,0		; STATUS WORDS
   1110	005614				TO10PK::
   1111	005614	000000 				.WORD	0		; -11 REQUEST TO -10
   1112	005616					.BLKB	20
   1113	005636				DNBLK::
   1114	005636	000000 				.WORD	0		; RESPONSE TO -10 REQUEST
   1115	005640				DNFCN::
   1116	005640	000000 				.WORD	0
   1117	005642	000000 	000000 			.WORD	0,0
   1118	005646				DNSTS::
   1119	005646	000000 	000000 			.WORD	0,0
   1120	005652	000000 				.WORD	0
   1121	005654				BLKTT::
   1122	005654					.BLKW	20
   1123	005714				.RPUNT::
   1124	005714	000000 				.WORD	0		; RP UNIT NUMBER FOR RPADR ETC.
   1125	005716				.FEACT::
   1126	005716	000000 				.WORD	0		; FE DEVICE AVAILABLE FOR DB ACCESS WHEN .NE. 0
   1127	005720				.RPADR::
   1128	005720	000000 	000000 			.WORD	0,0		; !!!!RPADR AND RPSIZ MUST BE IN THIS ORDER
   1129	005724				.RPSIZ::
   1130	005724	000000 	000000 			.WORD	0,0		; !!!
   1131
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 34
LOW CORE -- CD-11 DRIVER DATA BASE

   1134						.SBTTL	LOW CORE -- CD-11 DRIVER DATA BASE
   1135
   1136		177160 				CDST==177160		; CONTROL AND STATUS REGISTER ADDRESS
   1137		177162 				CDCC==177162		; COLUMN COUNT REGISTER ADDRESS
   1138		177164 				CDBA==177164		; BUS ADDRESS REGISTER ADDRESS
   1139		177166 				CDDB==177166		; DATA BUFFER REGISTER ADDRESS
   1140
   1141	005730				CREVFG::
   1142	005730	005732'				.WORD	CRCEVF		; ADDRESS OF CR TASK'S EVENT FLAGS
   1143	005732				CRCEVF::
   1144	005732					.BLKW	1		; CURRENT EVENT FLAGS
   1145	005734				CRHUNG::
   1146	005734	000000 				.WORD	0		; # TIMES CR WAS CAUGHT SNOOZING
   1147	005736				.CRPFL::
   1148	005736	000000 				.WORD	0		; POWER FAIL FLAG FOR CARD READER
   1149					;
   1150	005740				CRSTBH::
   1151	005740					.BLKW	1		; HEADER WORD (UNIT/BYTE COUNT) OF STATUS BLOCK
   1152	005742				CRSTBK::
   1153	005742					.BLKW	2+1+<<CDDB+2-CDST>/2> ; STATUS RETURN BLOCK TO -10
   1154		000016 			CRSTLN==.-CRSTBK
   1155					;
   1156	005760				CRBUFH::
   1157	005760					.BLKW	1		; HEADER WORD (UNIT/BYTE COUNT) OF DATA BUFFER
   1158	005762				CRBUFF::
   1159	005762					.BLKW	80.		; DATA BUFFER FROM CD-11
   1160		000240 			CRBFLN==.-CRBUFF
   1161	006222	000000 				.WORD	0		; FOR OVERRUN
   1162					;
   1163					; CR DEVICE STATUS TABLE
   1164					;
   1165	006224				CRTBL::
   1166		006224'			CRTHD==.			; THREADED LIST POINTER (FOR ..STCR)
   1167	006224	000000 				.WORD	0
   1168		006226'			CREXP==.			; EXTERNAL PAGE ADDR OF CD-11
   1169	006226	177160 				.WORD	CDST
   1170		006230'			CRSTS==.			; STATUS BITS
   1171	006230	000000 				.WORD	0
   1172	006232	000000 				.WORD	0		; (NOT USED)
   1173					;
   1174		000010 			CRSIZE==.-CRTBL
   1175
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 35
LOW CORE -- LP-20 DRIVER DATA BASE

   1179						.SBTTL	LOW CORE -- LP-20 DRIVER DATA BASE
   1180
   1181		175400 				LPEXPA==175400		; EXTERNAL PAGE ADDRESS OF LPCSRA
   1182		000020 				LPEXPZ==20		; SIZE OF  EXTERNAL PAGE ADDRESSES IN BYTES
   1183
   1184					;
   1185					; MISCELLANEOUS VARIABLES
   1186					;
   1187	006234				LPUNIT::
   1188	006234					.BLKW	1		; LP UNIT # FROM PS ON INTERRUPT
   1189					;
   1190	006236				LPEVFG::
   1191	006236	006240'				.WORD	LPCEVF		; ADDRESS OF WHERE TO SET EVENT FLAGS FOR LP TASK
   1192					;
   1193	006240				LPCEVF::
   1194	006240					.BLKW	1		; CURRENT EVENT FLAGS
   1195					;
   1196	006242				LPHUNG::
   1197	006242	000000 				.WORD	0		; COUNT OF # TIMES LP WAS HUNG
   1198					;
   1199	006244				.LPPFL::
   1200	006244	000000 				.WORD	0		; POWER FAIL FLAG
   1201					;
   1202	006246				LPSTBH::
   1203	006246					.BLKW	1		; HEADER WORD (UNIT/BYTE COUNT)
   1204	006250				LPSTBK::
   1205	006250					.BLKB	4+2+2+LPEXPZ	; STATUS RETURN BLOCK TO -10
   1206						.EVEN
   1207		000030 			LPSTLN==.-LPSTBK
   1208					;
   1209					;
   1210					; LP DEVICE STATUS TABLE
   1211					;  ONE ENTRY FOR EVERY LP, SIZE= LPSIZE
   1212					;
   1213	006300				LPTBL::
   1214		000000 			$$$UNI=0			; START WITH UNIT 0
   1215		000002 				.REPT	L$$P20		; MAKE ONE FOR EACH LP
   1216					;
   1217					LPSTS==	0			; MISC STATUS BITS: *** MUST BE ZERO ***
   1218						.WORD	$$$UNI
   1219					LPCSA==	2			; EXTERNAL PAGE ADDRESS FOR THIS LP
   1220						.WORD	LPEXPA+<20*$$$UNI>
   1221					LPTHD==	4			; POINTER TO THREADED OUTPUT QUEUE
   1222									; ZERO IF NO QUEUE
   1223						.WORD	0
   1224					LPITH==	6			; INTERRUPT-LEVEL THREAD POINTER
   1225									; POINTS TO CURRENT BUFFER BEING
   1226									; OUTPUT AT INTERRUPT LEVEL
   1227						.WORD	0
   1228					;
   1229					$$$UNI=$$$UNI+1
   1230						.ENDR
	006300	000000 				.WORD	$$$UNI
	006302	175400 				.WORD	LPEXPA+<20*$$$UNI>
	006304	000000 				.WORD	0
	006306	000000 				.WORD	0
	006310	000001 				.WORD	$$$UNI
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 35-1
LOW CORE -- LP-20 DRIVER DATA BASE

	006312	175420 				.WORD	LPEXPA+<20*$$$UNI>
	006314	000000 				.WORD	0
	006316	000000 				.WORD	0
   1231		000010 			LPSIZE==<.-LPTBL>/L$$P20	; SIZE OF EACH ENTRY
   1232					;
   1233					; SECOND (PARALLEL) LP TABLE-- INDEXES ARE FROM LPTBL
   1234					;
   1235	006320				LPTBL2::
   1236		000010 				.REPT	LPSIZE*L$$P20/2	; MAKE SPACE
   1237						.WORD	0
   1238						.ENDR
	006320	000000 				.WORD	0
	006322	000000 				.WORD	0
	006324	000000 				.WORD	0
	006326	000000 				.WORD	0
	006330	000000 				.WORD	0
	006332	000000 				.WORD	0
	006334	000000 				.WORD	0
	006336	000000 				.WORD	0
   1239					;
   1240		000020 			LPMCB==	0+LPTBL2-LPTBL		; MULTI-CHARACTER BUFFER (TWO BYTES)
   1241		000022 			LPCSM==	2+LPTBL2-LPTBL		; ACCUMULATED CHECKSUM (LOW BYTE IS TRASH)
   1242		000024 			LPRTY==	4+LPTBL2-LPTBL		; RETRY COUNTER
   1243					;
   1244					; THIRD (PARALLEL) LP TABLE-- INDEXES ARE ALSO FROM LPTBL
   1245					;
   1246	006340				LPTBL3::
   1247		000010 				.REPT	LPSIZE*L$$P20/2	; MAKE SPACE
   1248						.WORD	0
   1249						.ENDR
	006340	000000 				.WORD	0
	006342	000000 				.WORD	0
	006344	000000 				.WORD	0
	006346	000000 				.WORD	0
	006350	000000 				.WORD	0
	006352	000000 				.WORD	0
	006354	000000 				.WORD	0
	006356	000000 				.WORD	0
   1250					;
   1251		000040 			LPRMA==	0+LPTBL3-LPTBL		; RAM/VFU DATA ADDRESS
   1252		000042 			LPRMZ==	2+LPTBL3-LPTBL		; RAM/VFU DATA BUFFER SIZE
   1253		000044 			LPRMC==	4+LPTBL3-LPTBL		; CURRENT POINTER INTO RAM/VFU DATA
   1254					;
   1255					; POINTERS TO LPTBL BY UNIT NUMBER
   1256					;
   1257	006360				LPUTBL::
   1258		000000 			$$$UNI=0
   1259		000002 				.REPT	L$$P20		; ONE PER LP
   1260						.WORD	LPTBL+<$$$UNI*LPSIZE>
   1261					$$$UNI=$$$UNI+1
   1262						.ENDR
	006360	006300'				.WORD	LPTBL+<$$$UNI*LPSIZE>
	006362	006310'				.WORD	LPTBL+<$$$UNI*LPSIZE>
   1263
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 36
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

   1266						.SBTTL	LOW CORE -- STD (SYSTEM TASK DIRECTORY)
   1267
   1268					;
   1269					;	SYSTEM TASK DIRECTORY
   1270					;
   1271	006364				.STDTA::
   1272	006364	006372'				.WORD	.STDTB		; STD ALPHA TABLE ADDRESS
   1273	006366				.STDTC::
   1274	006366	000044 				.WORD	36.		; STD ALPHA TABLE MAX SIZE *2
   1275	006370				.STDTZ::
   1276	006370	000024 				.WORD	24		; STD "SIZE" (2N-2)
   1277					;
   1278	006372				.STDTB::
   1280	006372	006776'				.WORD	STDCDR		; CARD READER ENTRY
   1282	006374	006436'				.WORD	STDDTE		; DTE CLOCK ENTRY
   1287	006376	006476'				.WORD	STDFED		; FE DRIVER
   1290	006400	006536'				.WORD	STDDX		; FLOPPY DRIVER
   1293	006402	006576'				.WORD	STDF11		; F11ACP
   1296	006404	006736'				.WORD	STDLPT		; LP20
   1298	006406	007076'				.WORD	STDQPR		; QUEUE'D PROTOCOL
   1300	006410	006636'				.WORD	STDRPT		; RP04 ENTRY
   1302	006412	007036'				.WORD	STDTTY		; TTY ENTRY
   1304	006414	006676'				.WORD	STDINS		; INSTALL
   1306	006416	000000 	000000 	000000 		.WORD	0,0,0,0,0,0,0
	006424	000000 	000000 	000000
	006432	000000
   1326	006434	000000 				.WORD	0
   1328					;
   1329					;
   1330					;
   1331	006436				STDDTE::
   1332	006436					.STDEN	DTE20,DTETPD,SF.TA!SF.FX!SF.ST,200,0,DTEHD,0,0,0,0,0,0
	006436	016045 	146260 			.RAD50	"DTE20"
	006442	007622'				.WORD	DTETPD
	006444	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006446	   200 	   000 			.BYTE	200,0
	006450	025304'				.WORD	DTEHD
	006452	000000 				.WORD	0
	006454	000000 				.WORD	0
	006456	000000 				.WORD	0
	006460	000000 				.WORD	0
	006462	006462'				.WORD	.
	006464	006462'				.WORD	.-2
	006466	000000 				.WORD	0
	006470	000000 				.WORD	0
	006472	000000 				.WORD	0
	006474	000000 				.WORD	0
   1334					;
   1335	006476				STDFED::
   1336	006476					.STDEN	FE....,FETPD,SF.TA!SF.FX!SF.ST,176,0,FEHD,0,0,0,0,0,0
	006476	023144 	131574 			.RAD50	"FE...."
	006502	007642'				.WORD	FETPD
	006504	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006506	   176 	   000 			.BYTE	176,0
	006510	000000G				.WORD	FEHD
	006512	000000 				.WORD	0
	006514	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 36-1
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

	006516	000000 				.WORD	0
	006520	000000 				.WORD	0
	006522	006522'				.WORD	.
	006524	006522'				.WORD	.-2
	006526	000000 				.WORD	0
	006530	000000 				.WORD	0
	006532	000000 				.WORD	0
	006534	000000 				.WORD	0
   1344					;
   1345	006536				STDDX::
   1346	006536					.STDEN	DX....,DXTPD,SF.TA!SF.FX!SF.ST,176,0,DXHD,0,0,0,0,0,0
	006536	016334 	131574 			.RAD50	"DX...."
	006542	007762'				.WORD	DXTPD
	006544	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006546	   176 	   000 			.BYTE	176,0
	006550	000000G				.WORD	DXHD
	006552	000000 				.WORD	0
	006554	000000 				.WORD	0
	006556	000000 				.WORD	0
	006560	000000 				.WORD	0
	006562	006562'				.WORD	.
	006564	006562'				.WORD	.-2
	006566	000000 				.WORD	0
	006570	000000 				.WORD	0
	006572	000000 				.WORD	0
	006574	000000 				.WORD	0
   1349					;
   1350	006576				STDF11::
   1352	006576					.STDEN	F11ACP,F11TPD,SF.ST,220,<<DX0PEN-.PUDBA>/U.SZ>,145400,7700,0,145400,145400,0,5
	006576	025167 	003310 			.RAD50	"F11ACP"
	006602	010022'				.WORD	F11TPD
	006604	100000 				.WORD	SF.ST
	006606	   220 	   011 			.BYTE	220,<DX0PEN-.PUDBA>/U.SZ
	006610	145400 				.WORD	145400
	006612	007700 				.WORD	7700
	006614	000000 				.WORD	0
	006616	145400 				.WORD	145400
	006620	145400 				.WORD	145400
	006622	006622'				.WORD	.
	006624	006622'				.WORD	.-2
	006626	000000 				.WORD	0
	006630	000000 				.WORD	0
	006632	000005 				.WORD	5
	006634	000000 				.WORD	0
   1362					;
   1363	006636				STDRPT::
   1364	006636					.STDEN	RP....,RPTPD,SF.TA!SF.FX!SF.ST,176,0,RPHD,0,0,0,0,0,0
	006636	071434 	131574 			.RAD50	"RP...."
	006642	010002'				.WORD	RPTPD
	006644	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006646	   176 	   000 			.BYTE	176,0
	006650	000000G				.WORD	RPHD
	006652	000000 				.WORD	0
	006654	000000 				.WORD	0
	006656	000000 				.WORD	0
	006660	000000 				.WORD	0
	006662	006662'				.WORD	.
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 36-2
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

	006664	006662'				.WORD	.-2
	006666	000000 				.WORD	0
	006670	000000 				.WORD	0
	006672	000000 				.WORD	0
	006674	000000 				.WORD	0
   1367					;
   1368	006676				STDINS::
   1369	006676					.STDEN	.INST.,INSTPD,SF.FX!SF.ST,200,0,INSHD,0,0,INSTAL,INSTK-16,0,0
	006676	130166 	074774 			.RAD50	".INST."
	006702	007602'				.WORD	INSTPD
	006704	100002 				.WORD	SF.FX!SF.ST
	006706	   200 	   000 			.BYTE	200,0
	006710	000000G				.WORD	INSHD
	006712	000000 				.WORD	0
	006714	000000 				.WORD	0
	006716	000000G				.WORD	INSTAL
	006720	177762G				.WORD	INSTK-16
	006722	006722'				.WORD	.
	006724	006722'				.WORD	.-2
	006726	000000 				.WORD	0
	006730	000000 				.WORD	0
	006732	000000 				.WORD	0
	006734	000000 				.WORD	0
   1372					;
   1373	006736				STDLPT::
   1374	006736					.STDEN	LPDRV,LPTPD,SF.TA!SF.FX!SF.ST,176,0,LPHD,0,0,0,0,0,0
	006736	046604 	071760 			.RAD50	"LPDRV"
	006742	007702'				.WORD	LPTPD
	006744	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006746	   176 	   000 			.BYTE	176,0
	006750	000000G				.WORD	LPHD
	006752	000000 				.WORD	0
	006754	000000 				.WORD	0
	006756	000000 				.WORD	0
	006760	000000 				.WORD	0
	006762	006762'				.WORD	.
	006764	006762'				.WORD	.-2
	006766	000000 				.WORD	0
	006770	000000 				.WORD	0
	006772	000000 				.WORD	0
	006774	000000 				.WORD	0
   1377					;
   1378	006776				STDCDR::
   1379	006776					.STDEN	CDDRV,CDRTPD,SF.TA!SF.FX!SF.ST,210,0,CRHD,0,0,57252,55130-16,0,0
	006776	011544 	071760 			.RAD50	"CDDRV"
	007002	007722'				.WORD	CDRTPD
	007004	100003 				.WORD	SF.TA!SF.FX!SF.ST
	007006	   210 	   000 			.BYTE	210,0
	007010	000000G				.WORD	CRHD
	007012	000000 				.WORD	0
	007014	000000 				.WORD	0
	007016	057252 				.WORD	57252
	007020	055112 				.WORD	55130-16
	007022	007022'				.WORD	.
	007024	007022'				.WORD	.-2
	007026	000000 				.WORD	0
	007030	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 36-3
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

	007032	000000 				.WORD	0
	007034	000000 				.WORD	0
   1381					;
   1382	007036				STDTTY::
   1383	007036					.STDEN	TTYDRV,TTYTPD,SF.TA!SF.FX!SF.ST,177,0,TTYHD,0,0,0,0,0,0
	007036	100071 	015746 			.RAD50	"TTYDRV"
	007042	007662'				.WORD	TTYTPD
	007044	100003 				.WORD	SF.TA!SF.FX!SF.ST
	007046	   177 	   000 			.BYTE	177,0
	007050	032554'				.WORD	TTYHD
	007052	000000 				.WORD	0
	007054	000000 				.WORD	0
	007056	000000 				.WORD	0
	007060	000000 				.WORD	0
	007062	007062'				.WORD	.
	007064	007062'				.WORD	.-2
	007066	000000 				.WORD	0
	007070	000000 				.WORD	0
	007072	000000 				.WORD	0
	007074	000000 				.WORD	0
   1384					;
   1385	007076				STDQPR::
   1386	007076					.STDEN	QDPROT,QPRTPD,SF.TA!SF.FX!SF.ST,176,0,BTPHD,0,0,0,0,0,0
	007076	065360 	071354 			.RAD50	"QDPROT"
	007102	007742'				.WORD	QPRTPD
	007104	100003 				.WORD	SF.TA!SF.FX!SF.ST
	007106	   176 	   000 			.BYTE	176,0
	007110	016262'				.WORD	BTPHD
	007112	000000 				.WORD	0
	007114	000000 				.WORD	0
	007116	000000 				.WORD	0
	007120	000000 				.WORD	0
	007122	007122'				.WORD	.
	007124	007122'				.WORD	.-2
	007126	000000 				.WORD	0
	007130	000000 				.WORD	0
	007132	000000 				.WORD	0
	007134	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 37
LOW CORE -- ATL (ACTIVE TASK LIST)

   1388						.SBTTL	LOW CORE -- ATL (ACTIVE TASK LIST)
   1389
   1390					;
   1391					;	ACTIVE TASK LISTHEAD
   1392					;
   1393	007136				.ATLLH::
   1394	007136	007142'				.WORD	DTETSK		; FORWARD POINTER IN ACTIVE TASK LIST
   1395	007140	007542'				.WORD	NULTSK		; NULL TASK
   1396					;
   1397					;
   1398	007142				DTETSK::
   1399	007142					.ATLEN	TTYTSK,.ATLLH,DTESP,0,200,DTEHD,TS.RUN,0,STDDTE,0,0,0,0,0,0,0
	007142	007202'				.WORD	TTYTSK
	007144	007136'				.WORD	.ATLLH
	007146	025564'				.WORD	DTESP
	007150	000000 				.WORD	0
	007152	000200 				.WORD	200
	007154	025304'				.WORD	DTEHD
	007156	   010 	   000 			.BYTE	TS.RUN,0
	007160	006436'				.WORD	STDDTE
	007162	000000 	000000 			.WORD	0,0
	007166	000000 	000000 	000000 		.WORD	0,0,0,0
	007174	000000
	007176	000000 				.WORD	0
	007200	000000 				.WORD	0
   1400		007142'				PRVTSK==DTETSK
   1401					;
   1402	007202				TTYTSK::
   1403	007202					.ATLEN	RPTSK,PRVTSK,TTYSP,0,177,TTYHD,TS.RUN,0,STDTTY,0,0,0,0,0,0,0
	007202	007242'				.WORD	RPTSK
	007204	007142'				.WORD	PRVTSK
	007206	033034'				.WORD	TTYSP
	007210	000000 				.WORD	0
	007212	000177 				.WORD	177
	007214	032554'				.WORD	TTYHD
	007216	   010 	   000 			.BYTE	TS.RUN,0
	007220	007036'				.WORD	STDTTY
	007222	000000 	000000 			.WORD	0,0
	007226	000000 	000000 	000000 		.WORD	0,0,0,0
	007234	000000
	007236	000000 				.WORD	0
	007240	000000 				.WORD	0
   1404		007202'				PRVTSK==TTYTSK
   1405					;
   1407	007242				RPTSK::
   1408	007242					.ATLEN	LPTSK,PRVTSK,RPSTK,0,176,RPHD,TS.RUN,0,STDRPT,0,0,0,0,0,0,0
	007242	007302'				.WORD	LPTSK
	007244	007202'				.WORD	PRVTSK
	007246	000000G				.WORD	RPSTK
	007250	000000 				.WORD	0
	007252	000176 				.WORD	176
	007254	000000G				.WORD	RPHD
	007256	   010 	   000 			.BYTE	TS.RUN,0
	007260	006636'				.WORD	STDRPT
	007262	000000 	000000 			.WORD	0,0
	007266	000000 	000000 	000000 		.WORD	0,0,0,0
	007274	000000
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 37-1
LOW CORE -- ATL (ACTIVE TASK LIST)

	007276	000000 				.WORD	0
	007300	000000 				.WORD	0
   1409		007242'				PRVTSK==RPTSK
   1413					;
   1415	007302				LPTSK::
   1416	007302					.ATLEN	CDTSK,PRVTSK,LPSTK,0,176,LPHD,TS.RUN,0,STDLPT,0,0,0,0,0,0,0
	007302	007342'				.WORD	CDTSK
	007304	007242'				.WORD	PRVTSK
	007306	000000G				.WORD	LPSTK
	007310	000000 				.WORD	0
	007312	000176 				.WORD	176
	007314	000000G				.WORD	LPHD
	007316	   010 	   000 			.BYTE	TS.RUN,0
	007320	006736'				.WORD	STDLPT
	007322	000000 	000000 			.WORD	0,0
	007326	000000 	000000 	000000 		.WORD	0,0,0,0
	007334	000000
	007336	000000 				.WORD	0
	007340	000000 				.WORD	0
   1417		007302'				PRVTSK==LPTSK
   1422	007342				CDTSK::
   1423	007342					.ATLEN	DTTSK,PRVTSK,CRSTK,CDRTPD,176,CRHD,TS.RUN,0,STDCDR,0,0,0,0,0,0,0
	007342	007402'				.WORD	DTTSK
	007344	007302'				.WORD	PRVTSK
	007346	000000G				.WORD	CRSTK
	007350	007722'				.WORD	CDRTPD
	007352	000176 				.WORD	176
	007354	000000G				.WORD	CRHD
	007356	   010 	   000 			.BYTE	TS.RUN,0
	007360	006776'				.WORD	STDCDR
	007362	000000 	000000 			.WORD	0,0
	007366	000000 	000000 	000000 		.WORD	0,0,0,0
	007374	000000
	007376	000000 				.WORD	0
	007400	000000 				.WORD	0
   1424		007342'				PRVTSK==CDTSK
   1428					;
   1434	007402				DTTSK::
   1436					;
   1438	007402				FETSK::
   1439	007402					.ATLEN	DXTSK,PRVTSK,FESTK,0,176,FEHD,TS.RUN,0,STDFED,0,0,0,0,0,0,0
	007402	007442'				.WORD	DXTSK
	007404	007342'				.WORD	PRVTSK
	007406	000000G				.WORD	FESTK
	007410	000000 				.WORD	0
	007412	000176 				.WORD	176
	007414	000000G				.WORD	FEHD
	007416	   010 	   000 			.BYTE	TS.RUN,0
	007420	006476'				.WORD	STDFED
	007422	000000 	000000 			.WORD	0,0
	007426	000000 	000000 	000000 		.WORD	0,0,0,0
	007434	000000
	007436	000000 				.WORD	0
	007440	000000 				.WORD	0
   1440		007402'				PRVTSK==FETSK
   1444					;
   1446	007442				DXTSK::
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 37-2
LOW CORE -- ATL (ACTIVE TASK LIST)

   1447	007442					.ATLEN	QPRTSK,PRVTSK,DXSTK,0,176,DXHD,TS.RUN,0,STDDX,0,0,0,0,0,0,0
	007442	007502'				.WORD	QPRTSK
	007444	007402'				.WORD	PRVTSK
	007446	000000G				.WORD	DXSTK
	007450	000000 				.WORD	0
	007452	000176 				.WORD	176
	007454	000000G				.WORD	DXHD
	007456	   010 	   000 			.BYTE	TS.RUN,0
	007460	006536'				.WORD	STDDX
	007462	000000 	000000 			.WORD	0,0
	007466	000000 	000000 	000000 		.WORD	0,0,0,0
	007474	000000
	007476	000000 				.WORD	0
	007500	000000 				.WORD	0
   1448		007442'				PRVTSK==DXTSK
   1452					;
   1453	007502				QPRTSK::
   1454	007502					.ATLEN	NULTSK,PRVTSK,.BTSTK,0,1,BTPHD,TS.RUN,0,STDQPR,0,0,0,0,0,0,0
	007502	007542'				.WORD	NULTSK
	007504	007442'				.WORD	PRVTSK
	007506	016542'				.WORD	.BTSTK
	007510	000000 				.WORD	0
	007512	000001 				.WORD	1
	007514	016262'				.WORD	BTPHD
	007516	   010 	   000 			.BYTE	TS.RUN,0
	007520	007076'				.WORD	STDQPR
	007522	000000 	000000 			.WORD	0,0
	007526	000000 	000000 	000000 		.WORD	0,0,0,0
	007534	000000
	007536	000000 				.WORD	0
	007540	000000 				.WORD	0
   1455		007502'				PRVTSK==QPRTSK
   1456					;
   1457	007542				NULTSK::
   1458	007542					.ATLEN	.ATLLH,PRVTSK,NTKXSP,0,0,NULHD,TS.RUN,0,0,0,0,0,0,0,0,0
	007542	007136'				.WORD	.ATLLH
	007544	007502'				.WORD	PRVTSK
	007546	012752'				.WORD	NTKXSP
	007550	000000 				.WORD	0
	007552	000000 				.WORD	0
	007554	012472'				.WORD	NULHD
	007556	   010 	   000 			.BYTE	TS.RUN,0
	007560	000000 				.WORD	0
	007562	000000 	000000 			.WORD	0,0
	007566	000000 	000000 	000000 		.WORD	0,0,0,0
	007574	000000
	007576	000000 				.WORD	0
	007600	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 38
LOW CORE -- TPD (TASK PARTITION DIRECTORY)

   1460						.SBTTL	LOW CORE -- TPD (TASK PARTITION DIRECTORY)
   1461
   1462					;
   1463					;	TASK PARTITION DIRECTORY
   1464					;
   1465	007602				.TPDBA::
   1467					;
   1468	007602				INSTPD::
   1469	007602					.TPDEN	INSTPD,INSHD,0,0,TF.OU
	007602	000000 	000000 			.WORD	0,0
	007602	035203 	077604 			.RAD50	"INSTPD"
	007606	000000G				.WORD	INSHD
	007610	000000 				.WORD	0
	007612	000000 				.WORD	0
	007614	000002 				.WORD	TF.OU
	007616	007616'				.WORD	.
	007620	007616'				.WORD	.-2
   1471					;
   1472	007622				DTETPD::
   1473	007622					.TPDEN	DTETPD,DTEHD,0,0,TF.OU
	007622	000000 	000000 			.WORD	0,0
	007622	016045 	077604 			.RAD50	"DTETPD"
	007626	025304'				.WORD	DTEHD
	007630	000000 				.WORD	0
	007632	000000 				.WORD	0
	007634	000002 				.WORD	TF.OU
	007636	007636'				.WORD	.
	007640	007636'				.WORD	.-2
   1475					;
   1476	007642				FETPD::
   1477	007642					.TPDEN	FETPD,FEHD,0,0,TF.OU
	007642	000000 	000000 			.WORD	0,0
	007642	023134 	062240 			.RAD50	"FETPD"
	007646	000000G				.WORD	FEHD
	007650	000000 				.WORD	0
	007652	000000 				.WORD	0
	007654	000002 				.WORD	TF.OU
	007656	007656'				.WORD	.
	007660	007656'				.WORD	.-2
   1479					;
   1480	007662				TTYTPD::
   1481	007662					.TPDEN	TTYTPD,TTYHD,0,0,TF.OU
	007662	000000 	000000 			.WORD	0,0
	007662	100071 	077604 			.RAD50	"TTYTPD"
	007666	032554'				.WORD	TTYHD
	007670	000000 				.WORD	0
	007672	000000 				.WORD	0
	007674	000002 				.WORD	TF.OU
	007676	007676'				.WORD	.
	007700	007676'				.WORD	.-2
   1483					;
   1484	007702				LPTPD::
   1485	007702					.TPDEN	LPTPD,LPHD,0,0,TF.OU
	007702	000000 	000000 			.WORD	0,0
	007702	046624 	062240 			.RAD50	"LPTPD"
	007706	000000G				.WORD	LPHD
	007710	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 38-1
LOW CORE -- TPD (TASK PARTITION DIRECTORY)

	007712	000000 				.WORD	0
	007714	000002 				.WORD	TF.OU
	007716	007716'				.WORD	.
	007720	007716'				.WORD	.-2
   1488					;
   1489	007722				CDRTPD::
   1490	007722					.TPDEN	CDRTPD,CRHD,0,0,TF.OU
	007722	000000 	000000 			.WORD	0,0
	007722	011562 	077604 			.RAD50	"CDRTPD"
	007726	000000G				.WORD	CRHD
	007730	000000 				.WORD	0
	007732	000000 				.WORD	0
	007734	000002 				.WORD	TF.OU
	007736	007736'				.WORD	.
	007740	007736'				.WORD	.-2
   1492					;
   1493	007742				QPRTPD::
   1494	007742					.TPDEN	QPRTPD,BTPHD,0,0,TF.OU
	007742	000000 	000000 			.WORD	0,0
	007742	066322 	077604 			.RAD50	"QPRTPD"
	007746	016262'				.WORD	BTPHD
	007750	000000 				.WORD	0
	007752	000000 				.WORD	0
	007754	000002 				.WORD	TF.OU
	007756	007756'				.WORD	.
	007760	007756'				.WORD	.-2
   1501					;
   1502	007762				DXTPD::
   1503	007762					.TPDEN	DXTPD,DXHD,0,0,TF.OU
	007762	000000 	000000 			.WORD	0,0
	007762	016324 	062240 			.RAD50	"DXTPD"
	007766	000000G				.WORD	DXHD
	007770	000000 				.WORD	0
	007772	000000 				.WORD	0
	007774	000002 				.WORD	TF.OU
	007776	007776'				.WORD	.
	010000	007776'				.WORD	.-2
   1506					;
   1507	010002				RPTPD::
   1508	010002					.TPDEN	RPTPD,RPHD,0,0,TF.OU
	010002	000000 	000000 			.WORD	0,0
	010002	071424 	062240 			.RAD50	"RPTPD"
	010006	000000G				.WORD	RPHD
	010010	000000 				.WORD	0
	010012	000000 				.WORD	0
	010014	000002 				.WORD	TF.OU
	010016	010016'				.WORD	.
	010020	010016'				.WORD	.-2
   1511					;
   1512	010022				F11TPD::
   1513	010022					.TPDEN	F11TPD,145400,12400,0,0
	010022	000000 	000000 			.WORD	0,0
	010022	025167 	077604 			.RAD50	"F11TPD"
	010026	145400 				.WORD	145400
	010030	012400 				.WORD	12400
	010032	000000 				.WORD	0
	010034	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 38-2
LOW CORE -- TPD (TASK PARTITION DIRECTORY)

	010036	010036'				.WORD	.
	010040	010036'				.WORD	.-2
   1515					;
   1516	010042				GENTPD::
   1517	010042					.TPDEN	GEN,100000,45400,0,0
	010042	000000 	000000 			.WORD	0,0
	010042	026226 				.RAD50	"GEN"
	010046	100000 				.WORD	100000
	010050	045400 				.WORD	45400
	010052	000000 				.WORD	0
	010054	000000 				.WORD	0
	010056	010056'				.WORD	.
	010060	010056'				.WORD	.-2
   1518					;
   1519	010062				.TPDEA::		;END OF TPD
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 39
LOW CORE -- DEVICE QUEUE POINTERS

   1521						.SBTTL	LOW CORE -- DEVICE QUEUE POINTERS
   1522
   1523					;
   1524					;	DEVICE QUEUE POINTERS
   1525					;
   1526		000020 			Q.SZ=20		; QUEUE ENTRY SIZE (NOTE:IS A GLOBAL VAR.)
   1527
   1528		000001 				D.CCTY==1	; DEVICE CODE FOR CTY
   1529	010062				.DQPBA::
   1530	010062					.DQPEN	TTTBL,8.,..STTY,..STPT,IGNO,IGNO,0,TTCNT
	010062	003004'				.WORD	TTTBL
	010064	000010 				.WORD	8.
	010066	046164'				.WORD	..STTY
	010070	046400'				.WORD	..STPT
	010072	012364'				.WORD	IGNO
	010074	012364'				.WORD	IGNO
	010076	000000 				.WORD	0
	010100	000205 				.WORD	TTCNT
   1531
   1532		000002 				D.CDL1==2	; DEVICE CODE FOR DL-11
   1533	010102				.DQDL1::
   1534	010102					.DQPEN	DLTBL,8.,..STTY,..STPT,IGNO,IGNO,0,DLCNT
	010102	003004'				.WORD	DLTBL
	010104	000010 				.WORD	8.
	010106	046164'				.WORD	..STTY
	010110	046400'				.WORD	..STPT
	010112	012364'				.WORD	IGNO
	010114	012364'				.WORD	IGNO
	010116	000000 				.WORD	0
	010120	000005 				.WORD	DLCNT
   1535
   1536		000003 				D.CDH1==3	; DEVICE CODE FOR DH-11 (1)
   1537	010122				.DQDH0::
   1538	010122					.DQPEN	DHTBL,8.,..STTY,..STPT,IGNO,IGNO,0,DHCNT
	010122	003054'				.WORD	DHTBL
	010124	000010 				.WORD	8.
	010126	046164'				.WORD	..STTY
	010130	046400'				.WORD	..STPT
	010132	012364'				.WORD	IGNO
	010134	012364'				.WORD	IGNO
	010136	000000 				.WORD	0
	010140	000200 				.WORD	DHCNT
   1539
   1540		000004 				D.CDLS==4	; DEVICE CODE FOR DATA LINE SCANNER (1)
   1541	010142				.DQDLS::
   1542	010142					.DQPEN	TTTBL,8.,..STTY,..STPT,IGNO,IGNO,0,TTCNT
	010142	003004'				.WORD	TTTBL
	010144	000010 				.WORD	8.
	010146	046164'				.WORD	..STTY
	010150	046400'				.WORD	..STPT
	010152	012364'				.WORD	IGNO
	010154	012364'				.WORD	IGNO
	010156	000000 				.WORD	0
	010160	000205 				.WORD	TTCNT
   1543
   1544		000005 				D.CLPT==5	; DEVICE CODE FOR LPT
   1545	010162				.DQLPT::
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 39-1
LOW CORE -- DEVICE QUEUE POINTERS

   1546	010162					.DQPEN	LPTBL,8.,..STLP,..SPLP,IGNO,..AKLP,0,2
	010162	006300'				.WORD	LPTBL
	010164	000010 				.WORD	8.
	010166	000000G				.WORD	..STLP
	010170	000000G				.WORD	..SPLP
	010172	012364'				.WORD	IGNO
	010174	000000G				.WORD	..AKLP
	010176	000000 				.WORD	0
	010200	000002 				.WORD	2
   1547
   1548		000006 				D.CCDR==6	; DEVICE CODE FOR CDR
   1549	010202				.DQCDR::
   1550	010202					.DQPEN	CRTBL,8.,..STCR,IGNO,IGNO,..AKCR,0,1
	010202	006224'				.WORD	CRTBL
	010204	000010 				.WORD	8.
	010206	000000G				.WORD	..STCR
	010210	012364'				.WORD	IGNO
	010212	012364'				.WORD	IGNO
	010214	000000G				.WORD	..AKCR
	010216	000000 				.WORD	0
	010220	000001 				.WORD	1
   1551
   1552		000007 				D.CCLK==7	; DEVICE CODE FOR CLOCK
   1553	010222					.DQPEN	0,0,IGNO,IGNO,IGNO,IGNO,0,1
	010222	000000 				.WORD	0
	010224	000000 				.WORD	0
	010226	012364'				.WORD	IGNO
	010230	012364'				.WORD	IGNO
	010232	012364'				.WORD	IGNO
	010234	012364'				.WORD	IGNO
	010236	000000 				.WORD	0
	010240	000001 				.WORD	1
   1554
   1555		000010 				D.FEPD==10	; PSEUDO DEVICE FOR FE
   1556	010242					.DQPEN	FETBL,2.,.FEST,IGNO,IGNO,.FEACK,0,4
	010242	005572'				.WORD	FETBL
	010244	000002 				.WORD	2.
	010246	000000G				.WORD	.FEST
	010250	012364'				.WORD	IGNO
	010252	012364'				.WORD	IGNO
	010254	000000G				.WORD	.FEACK
	010256	000000 				.WORD	0
	010260	000004 				.WORD	4
   1557
   1558
   1559	010262				.DQPEA::			; END OF DEVICE QUEUE POINTER TABLE
   1560		000010 			.DQPSZ==.DQPEA-.DQPBA/Q.SZ	; SIZE OF DEVICE QUEUE POINTER TABLE
   1561
   1562					;
   1563					;	NOTE -- THESE PSUEDO-DEVICES ARE OUTPUT-ONLY AND
   1564					;		ARE ASSOCIATED WITH ERROR LOGGING
   1565					;
   1566		000200 				D.CCPU==200		; PSEUDO DEVICE PDP10 CPU
   1567		000201 				D.CKLE==201		; KL ERROR PSEUDO DEVICE
   1568		000202 				D.CDTE==202		; [5.1008] DTE-20 PSEUDO DEVICE CODE
   1569		000203 				D.CRJP==203		; [5.1009] RH-11/RJP-04/06 PSEUDO DEVICE CODE
   1570		000204 				D.CDMB==204		; [4.1.1091] DM-11/BB CONFIGURATION CODE
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 39-2
LOW CORE -- DEVICE QUEUE POINTERS

   1571		000205 				D.CLOG==205		; ASCII 'PARSER.LOG'
   1572		000210 				D.CKLN==210		; KLINIK PSEUDO-DEVICE
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 40
LOW CORE -- LOGICAL UNIT TABLES

   1574						.SBTTL	LOW CORE -- LOGICAL UNIT TABLES
   1575
   1576					;
   1577					;	LOGICAL UNIT TABLE
   1578					;
   1579	010262				.PUDBA::			; START OF LOGICAL UNIT TABLE
   1580					;
   1581		000001 				L.TTY==1	; LOGICAL UNIT 1
   1582	010262				TTPEN::
   1583	010262					.PUDEN	TT,0,0,UC.REC!UC.CCL!UC.TTY,0,0,80.,TTPEN,TTYTSK,0,0,0
	010262	   124 	   124 			.ASCII	"TT"
	010264	   000 				.BYTE	0
	010265	   000 				.BYTE	0
	010266	000007 				.WORD	UC.REC!UC.CCL!UC.TTY
	010270	000000 				.WORD	0
	010272	000000 				.WORD	0
	010274	000120 				.WORD	80.
	010276	000000 				.WORD	0
	010300	010262'				.WORD	TTPEN
	010302	007202'				.WORD	TTYTSK
	010304	010304'				.WORD	.
	010306	010304'				.WORD	.-2
	010310	000000 				.WORD	0
	010312	   005 	   005 			.BYTE	5,5
	010314	000000 				.WORD	0
	010316	177777 				.WORD	-1
	010320	135600 				.RAD50	/0/
	010322	000000 				.WORD	0
	010324	000000 				.WORD	0
	010326	000000 				.WORD	0
	010330	000000 				.WORD	0
   1584					;
   1585		000002 				L.RP4==2
   1586						;DVCH=CH.OFF+CH.NAT*400+CH.OFF+CH.NAT
   1587		110220 				DVCH=110220
   1588						;FW=UF.TL!UF.RH
   1589		000300 				FW=300
   1590						;C1=UC.MNT!UC.F11!UC.DIR
   1591		140010 				C1=140010
   1592						;C1DB=UC.MNT!UC.F11!UC.DIR!UC.ETB
   1593		140110 				C1DB=140110
   1594					;
   1596	010332				RPPEN::
   1597	010332					.PUDEN	DB,0,FW,C1DB,0,0,512.,RPPEN,RPTSK,DVCH,F11,0
	010332	   104 	   102 			.ASCII	"DB"
	010334	   000 				.BYTE	0
	010335	   300 				.BYTE	FW
	010336	140110 				.WORD	C1DB
	010340	000000 				.WORD	0
	010342	000000 				.WORD	0
	010344	001000 				.WORD	512.
	010346	000000 				.WORD	0
	010350	010332'				.WORD	RPPEN
	010352	007242'				.WORD	RPTSK
	010354	010354'				.WORD	.
	010356	010354'				.WORD	.-2
	010360	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 40-1
LOW CORE -- LOGICAL UNIT TABLES

	010362	   005 	   005 			.BYTE	5,5
	010364	110220 				.WORD	DVCH
	010366	177777 				.WORD	-1
	010370	025167 				.RAD50	/F11/
	010372	000000 				.WORD	0
	010374	000000 				.WORD	0
	010376	000000 				.WORD	0
	010400	000000 				.WORD	0
   1598					; THIS IS DONE TO KEEP .PUDEN MACROS SHORTER THAN 80 CHARS
   1599		010376'			.=.-4
   1600	010376	000002 				.WORD	2
   1601	010400	050700 				.WORD	50700		; RP SIZE IS 140000. BLOCKS
   1602	010402				.RP1PE::
   1603	010402					.PUDEN DB,1,FW,C1DB,0,0,512.,.RP1PE,RPTSK,DVCH,F11,0
	010402	   104 	   102 			.ASCII	"DB"
	010404	   001 				.BYTE	1
	010405	   300 				.BYTE	FW
	010406	140110 				.WORD	C1DB
	010410	000000 				.WORD	0
	010412	000000 				.WORD	0
	010414	001000 				.WORD	512.
	010416	000000 				.WORD	0
	010420	010402'				.WORD	.RP1PE
	010422	007242'				.WORD	RPTSK
	010424	010424'				.WORD	.
	010426	010424'				.WORD	.-2
	010430	000000 				.WORD	0
	010432	   005 	   005 			.BYTE	5,5
	010434	110220 				.WORD	DVCH
	010436	177777 				.WORD	-1
	010440	025167 				.RAD50	/F11/
	010442	000000 				.WORD	0
	010444	000000 				.WORD	0
	010446	000000 				.WORD	0
	010450	000000 				.WORD	0
   1604		010446'				.=.-4
   1605	010446	000002 				.WORD	2
   1606	010450	050700 				.WORD	50700
   1607	010452				.RP2PE::
   1608	010452					.PUDEN DB,2,FW,C1DB,0,0,512.,.RP2PE,RPTSK,DVCH,F11,0
	010452	   104 	   102 			.ASCII	"DB"
	010454	   002 				.BYTE	2
	010455	   300 				.BYTE	FW
	010456	140110 				.WORD	C1DB
	010460	000000 				.WORD	0
	010462	000000 				.WORD	0
	010464	001000 				.WORD	512.
	010466	000000 				.WORD	0
	010470	010452'				.WORD	.RP2PE
	010472	007242'				.WORD	RPTSK
	010474	010474'				.WORD	.
	010476	010474'				.WORD	.-2
	010500	000000 				.WORD	0
	010502	   005 	   005 			.BYTE	5,5
	010504	110220 				.WORD	DVCH
	010506	177777 				.WORD	-1
	010510	025167 				.RAD50	/F11/
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 40-2
LOW CORE -- LOGICAL UNIT TABLES

	010512	000000 				.WORD	0
	010514	000000 				.WORD	0
	010516	000000 				.WORD	0
	010520	000000 				.WORD	0
   1609		010516'				.=.-4
   1610	010516	000002 				.WORD	2
   1611	010520	050700 				.WORD	50700
   1612	010522				.RP3PE::
   1613	010522					.PUDEN DB,3,FW,C1DB,0,0,512.,.RP3PE,RPTSK,DVCH,F11,0
	010522	   104 	   102 			.ASCII	"DB"
	010524	   003 				.BYTE	3
	010525	   300 				.BYTE	FW
	010526	140110 				.WORD	C1DB
	010530	000000 				.WORD	0
	010532	000000 				.WORD	0
	010534	001000 				.WORD	512.
	010536	000000 				.WORD	0
	010540	010522'				.WORD	.RP3PE
	010542	007242'				.WORD	RPTSK
	010544	010544'				.WORD	.
	010546	010544'				.WORD	.-2
	010550	000000 				.WORD	0
	010552	   005 	   005 			.BYTE	5,5
	010554	110220 				.WORD	DVCH
	010556	177777 				.WORD	-1
	010560	025167 				.RAD50	/F11/
	010562	000000 				.WORD	0
	010564	000000 				.WORD	0
	010566	000000 				.WORD	0
	010570	000000 				.WORD	0
   1614		010566'				.=.-4
   1615	010566	000002 				.WORD	2
   1616	010570	050700 				.WORD	50700
   1617	010572				.RP4PE::
   1618	010572					.PUDEN DB,4,FW,C1DB,0,0,512.,.RP4PE,RPTSK,DVCH,F11,0
	010572	   104 	   102 			.ASCII	"DB"
	010574	   004 				.BYTE	4
	010575	   300 				.BYTE	FW
	010576	140110 				.WORD	C1DB
	010600	000000 				.WORD	0
	010602	000000 				.WORD	0
	010604	001000 				.WORD	512.
	010606	000000 				.WORD	0
	010610	010572'				.WORD	.RP4PE
	010612	007242'				.WORD	RPTSK
	010614	010614'				.WORD	.
	010616	010614'				.WORD	.-2
	010620	000000 				.WORD	0
	010622	   005 	   005 			.BYTE	5,5
	010624	110220 				.WORD	DVCH
	010626	177777 				.WORD	-1
	010630	025167 				.RAD50	/F11/
	010632	000000 				.WORD	0
	010634	000000 				.WORD	0
	010636	000000 				.WORD	0
	010640	000000 				.WORD	0
   1619		010636'				.=.-4
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 40-3
LOW CORE -- LOGICAL UNIT TABLES

   1620	010636	000002 				.WORD	2
   1621	010640	050700 				.WORD	50700
   1622	010642				.RP5PE::
   1623	010642					.PUDEN DB,5,FW,C1DB,0,0,512.,.RP5PE,RPTSK,DVCH,F11,0
	010642	   104 	   102 			.ASCII	"DB"
	010644	   005 				.BYTE	5
	010645	   300 				.BYTE	FW
	010646	140110 				.WORD	C1DB
	010650	000000 				.WORD	0
	010652	000000 				.WORD	0
	010654	001000 				.WORD	512.
	010656	000000 				.WORD	0
	010660	010642'				.WORD	.RP5PE
	010662	007242'				.WORD	RPTSK
	010664	010664'				.WORD	.
	010666	010664'				.WORD	.-2
	010670	000000 				.WORD	0
	010672	   005 	   005 			.BYTE	5,5
	010674	110220 				.WORD	DVCH
	010676	177777 				.WORD	-1
	010700	025167 				.RAD50	/F11/
	010702	000000 				.WORD	0
	010704	000000 				.WORD	0
	010706	000000 				.WORD	0
	010710	000000 				.WORD	0
   1624		010706'				.=.-4
   1625	010706	000002 				.WORD	2
   1626	010710	050700 				.WORD	50700
   1627	010712				.RP6PE::
   1628	010712					.PUDEN DB,6,FW,C1DB,0,0,512.,.RP6PE,RPTSK,DVCH,F11,0
	010712	   104 	   102 			.ASCII	"DB"
	010714	   006 				.BYTE	6
	010715	   300 				.BYTE	FW
	010716	140110 				.WORD	C1DB
	010720	000000 				.WORD	0
	010722	000000 				.WORD	0
	010724	001000 				.WORD	512.
	010726	000000 				.WORD	0
	010730	010712'				.WORD	.RP6PE
	010732	007242'				.WORD	RPTSK
	010734	010734'				.WORD	.
	010736	010734'				.WORD	.-2
	010740	000000 				.WORD	0
	010742	   005 	   005 			.BYTE	5,5
	010744	110220 				.WORD	DVCH
	010746	177777 				.WORD	-1
	010750	025167 				.RAD50	/F11/
	010752	000000 				.WORD	0
	010754	000000 				.WORD	0
	010756	000000 				.WORD	0
	010760	000000 				.WORD	0
   1629		010756'				.=.-4
   1630	010756	000002 				.WORD	2
   1631	010760	050700 				.WORD	50700
   1632	010762				.RP7PE::
   1633	010762					.PUDEN DB,7,FW,C1DB,0,0,512.,.RP7PE,RPTSK,DVCH,F11,0
	010762	   104 	   102 			.ASCII	"DB"
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 40-4
LOW CORE -- LOGICAL UNIT TABLES

	010764	   007 				.BYTE	7
	010765	   300 				.BYTE	FW
	010766	140110 				.WORD	C1DB
	010770	000000 				.WORD	0
	010772	000000 				.WORD	0
	010774	001000 				.WORD	512.
	010776	000000 				.WORD	0
	011000	010762'				.WORD	.RP7PE
	011002	007242'				.WORD	RPTSK
	011004	011004'				.WORD	.
	011006	011004'				.WORD	.-2
	011010	000000 				.WORD	0
	011012	   005 	   005 			.BYTE	5,5
	011014	110220 				.WORD	DVCH
	011016	177777 				.WORD	-1
	011020	025167 				.RAD50	/F11/
	011022	000000 				.WORD	0
	011024	000000 				.WORD	0
	011026	000000 				.WORD	0
	011030	000000 				.WORD	0
   1634		011026'				.=.-4
   1635	011026	000002 				.WORD	2
   1636	011030	050700 				.WORD	50700
   1638		000003 				L.DT0==3
   1650					;
   1651		000005 				L.DX0==5
   1652	011032				DX0PEN::
   1653	011032					.PUDEN	DX,0,FW,C1,0,0,512.,DX0PEN,DXTSK,DVCH,F11,0
	011032	   104 	   130 			.ASCII	"DX"
	011034	   000 				.BYTE	0
	011035	   300 				.BYTE	FW
	011036	140010 				.WORD	C1
	011040	000000 				.WORD	0
	011042	000000 				.WORD	0
	011044	001000 				.WORD	512.
	011046	000000 				.WORD	0
	011050	011032'				.WORD	DX0PEN
	011052	007442'				.WORD	DXTSK
	011054	011054'				.WORD	.
	011056	011054'				.WORD	.-2
	011060	000000 				.WORD	0
	011062	   005 	   005 			.BYTE	5,5
	011064	110220 				.WORD	DVCH
	011066	177777 				.WORD	-1
	011070	025167 				.RAD50	/F11/
	011072	000000 				.WORD	0
	011074	000000 				.WORD	0
	011076	000000 				.WORD	0
	011100	000000 				.WORD	0
   1654		011100'			.=.-2
   1655	011100	000756 				.WORD	494.
   1656		000006 				L.DX1==6
   1657	011102				DX1PEN::
   1658	011102					.PUDEN	DX,1,FW,C1,0,0,512.,DX1PEN,DXTSK,DVCH,F11,0
	011102	   104 	   130 			.ASCII	"DX"
	011104	   001 				.BYTE	1
	011105	   300 				.BYTE	FW
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 40-5
LOW CORE -- LOGICAL UNIT TABLES

	011106	140010 				.WORD	C1
	011110	000000 				.WORD	0
	011112	000000 				.WORD	0
	011114	001000 				.WORD	512.
	011116	000000 				.WORD	0
	011120	011102'				.WORD	DX1PEN
	011122	007442'				.WORD	DXTSK
	011124	011124'				.WORD	.
	011126	011124'				.WORD	.-2
	011130	000000 				.WORD	0
	011132	   005 	   005 			.BYTE	5,5
	011134	110220 				.WORD	DVCH
	011136	177777 				.WORD	-1
	011140	025167 				.RAD50	/F11/
	011142	000000 				.WORD	0
	011144	000000 				.WORD	0
	011146	000000 				.WORD	0
	011150	000000 				.WORD	0
   1659		011150'			.=.-2
   1660	011150	000756 				.WORD	494.
   1663					;
   1664	011152				LP0PUD::
   1665	011152					.PUDEN	LP,0,0,UC.REC!UC.CCL,0,0,132.,LP0PUD,LPTSK,0,0,0
	011152	   114 	   120 			.ASCII	"LP"
	011154	   000 				.BYTE	0
	011155	   000 				.BYTE	0
	011156	000003 				.WORD	UC.REC!UC.CCL
	011160	000000 				.WORD	0
	011162	000000 				.WORD	0
	011164	000204 				.WORD	132.
	011166	000000 				.WORD	0
	011170	011152'				.WORD	LP0PUD
	011172	007302'				.WORD	LPTSK
	011174	011174'				.WORD	.
	011176	011174'				.WORD	.-2
	011200	000000 				.WORD	0
	011202	   005 	   005 			.BYTE	5,5
	011204	000000 				.WORD	0
	011206	177777 				.WORD	-1
	011210	135600 				.RAD50	/0/
	011212	000000 				.WORD	0
	011214	000000 				.WORD	0
	011216	000000 				.WORD	0
	011220	000000 				.WORD	0
   1668					;
   1669	011222				FE0PUD::
   1670	011222					.PUDEN	FE,0,UF.RH,C1,0,0,512.,FE0PUD,FETSK,DVCH,T20,0
	011222	   106 	   105 			.ASCII	"FE"
	011224	   000 				.BYTE	0
	011225	   200 				.BYTE	UF.RH
	011226	140010 				.WORD	C1
	011230	000000 				.WORD	0
	011232	000000 				.WORD	0
	011234	001000 				.WORD	512.
	011236	000000 				.WORD	0
	011240	011222'				.WORD	FE0PUD
	011242	007402'				.WORD	FETSK
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 40-6
LOW CORE -- LOGICAL UNIT TABLES

	011244	011244'				.WORD	.
	011246	011244'				.WORD	.-2
	011250	000000 				.WORD	0
	011252	   005 	   005 			.BYTE	5,5
	011254	110220 				.WORD	DVCH
	011256	177777 				.WORD	-1
	011260	101036 				.RAD50	/T20/
	011262	000000 				.WORD	0
	011264	000000 				.WORD	0
	011266	000000 				.WORD	0
	011270	000000 				.WORD	0
   1672					;
   1673	011272				SY0PUD::
   1675	011272					.PUDEN	SY,0,0,0,0,0,0,DX0PEN,0,0,0,0
	011272	   123 	   131 			.ASCII	"SY"
	011274	   000 				.BYTE	0
	011275	   000 				.BYTE	0
	011276	000000 				.WORD	0
	011300	000000 				.WORD	0
	011302	000000 				.WORD	0
	011304	000000 				.WORD	0
	011306	000000 				.WORD	0
	011310	011032'				.WORD	DX0PEN
	011312	000000 				.WORD	0
	011314	011314'				.WORD	.
	011316	011314'				.WORD	.-2
	011320	000000 				.WORD	0
	011322	   005 	   005 			.BYTE	5,5
	011324	000000 				.WORD	0
	011326	177777 				.WORD	-1
	011330	135600 				.RAD50	/0/
	011332	000000 				.WORD	0
	011334	000000 				.WORD	0
	011336	000000 				.WORD	0
	011340	000000 				.WORD	0
   1677
   1685	011342				.PUDEA::
   1686							; END OF LOGICAL UNIT ABLE
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 41
LOW CORE -- KL10 HARDWARE ENVIRONMENT DATA

   1688						.SBTTL	LOW CORE -- KL10 HARDWARE ENVIRONMENT DATA
   1689
   1690
   1691	011342				.CPUSN::
   1692	011342	000000 				.WORD	0		; [4.2333] KL10 CPU SERIAL NUMBER
   1693									; [4.2333] .EQ. 0 ==> MUST BE READ
   1694									; [4.2333] .LT. 0 ==> CAN'T BE READ
   1695									; [4.2333] .GT. 0 ==> ALREADY READ
   1696	011344				.HRDWR::
   1697	011344	000000 				.WORD	0		; [4.2333] HARDWARE OPTION BIT MASK
   1698
   1699		000001 				H.KUDF==BIT0		; [4.2333] UNDEFINED
   1700		000002 				H.KMOS==BIT1		; [4.2333] MOS MASTER OSCILLATOR
   1701		000004 				H.KEXT==BIT2		; [4.2333] EXTENDED ADDRESING
   1702		000010 				H.KCHN==BIT3		; [4.2333] INTERNAL CHANNELS
   1703		000020 				H.KCAC==BIT4		; [4.2333] CACHE
   1704		000040 				H.KPWR==BIT5		; [4.2333] LINE FREQUENCY
   1705									; [4.2333] .EQ. 0 ==> 60 HZ.
   1706									; [4.2333] .NE. 0 ==> 50 HZ.
   1707					;
   1708					; LOCATIONS TO STORE PC AND FLAGS FOR WARM RESTART VIA "SAVE PC" COMMAND
   1709					; TO PARSER
   1710					;
   1711	011346				.ERRPC::
   1712	011346	000000 	000000 	000000 		.WORD	0,0,0		; KL PC REGISTER GOES HERE
   1713	011354				.ERRCD::
   1714	011354	000000 	000000 	000000 		.WORD	0,0,0		; KL FLAGS AND ERRCOD GO HERE
   1715					;
   1716					; WARM RESTART (FAULT CONTINUATION) ERROR CODES
   1717					;
   1718		000001 				ERRCES==1		; CLOCK ERROR STOP
   1719		000002 				ERREPE==2		; EBUS PARITY ERROR
   1720		000003 				ERRDEX==3		; DEPOSIT EXAMINE ERROR
   1721		000004 				ERRCST==4		; KEEP ALIVE STOPPED
   1722		000005 				ERRPTO==5		; PROTOCOL TIMEOUT
   1723		000006 				ERRFME==6		; FAST MEMORY PARITY ERROR
   1724		000007 				ERRCPE==7		; CRAM PARITY ERROR
   1725		000010 				ERRDPE==10		; DRAM PARITY ERROR
   1726		000011 				ERRTSP==11		; KL HALTED
   1727		000012 				ERRTRR==12		; TEN REQUESTED REBOOT
   1728
   1729	011362				.MISC::
   1730	011362	   000 				.BYTE	0		; MISC. , SEE BELOW FOR BIT DEFINETIONS
   1731
   1732		000002 				M.PARQ==BIT1		; USED IN TTYDRR WHEN PARSER IS REQUESTED
   1733						.EVEN
   1734	011364				ABCHAR::
   1735	011364	000000 				.WORD	0		; [6.1567] LAST AUTO BAUD CHARACTER
   1736	011366	000000 			.RHPD::	.WORD	0
   1737	011370				.PFDBG::
   1738	011370	000000 				.WORD	0		;[**]
   1739	011372				.IODBG::
   1740	011372	000000 				.WORD	0		;[**]
   1741		011374'				.LCEND==.		; [4.2333] DEFINE THE END OF THE STATUS BLOCK
   1742	011374				CPYRGT::
   1743	011374	   103 	   117 	   120 		.ASCII	/COPYRIGHT (C) 1984 DIGITAL EQUIPMENT CORPORATION/
	011377	   131 	   122 	   111
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 41-1
LOW CORE -- KL10 HARDWARE ENVIRONMENT DATA

	011402	   107 	   110 	   124
	011405	   040 	   050 	   103
	011410	   051 	   040 	   061
	011413	   071 	   070 	   064
	011416	   040 	   104 	   111
	011421	   107 	   111 	   124
	011424	   101 	   114 	   040
	011427	   105 	   121 	   125
	011432	   111 	   120 	   115
	011435	   105 	   116 	   124
	011440	   040 	   103 	   117
	011443	   122 	   120 	   117
	011446	   122 	   101 	   124
	011451	   111 	   117 	   116
   1744						.EVEN
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 42
LOW CORE -- INITLM (INITIALIZATION)

   1746						.SBTTL	LOW CORE -- INITLM (INITIALIZATION)
   1747
   1748					;
   1749					;	INITIALIZATION CODE ALSO DOUBLES AS
   1750					;	EMERGENCY STACK AREA FOR CRASH
   1751					;
   1752	011454				INITLM::
   1753	011454	013700 	001004'			MOV	.EXEND+2,R0	; GET ABSOLUTE EXEC LIMIT
   1754	011460	062700 	000003 			ADD	#3,R0		; ROUND UP TO NEXT 4 BYTES
   1755	011464	042700 	000003 			BIC	#3,R0		; SO
   1756	011470	010037 	001426'			MOV	R0,.FREPL	; SET BASE OF FREE POOL
   1757	011474	012701 	075774 			MOV	#.BGBST-4,R1	; END OF FREE POOL MINUS 10 BYTES
   1758	011500	160001 				SUB	R0,R1		; COMPUTE SIZE OF FREE POOL
   1759	011502	005020 				CLR	(R0)+		; INDICATE NO LINKS
   1760	011504	010110 				MOV	R1,@R0		; SET FREE POOL SIZE
   1761	011506	010137 	001430'			MOV	R1,.FREPL+2	; HERE TOO
   1762	011512	013700 	001422'			MOV	.BGBUF,R0
   1763	011516	005020 				CLR	(R0)+
   1764	011520	012710 	002000 			MOV	#.BGLEN,@R0
   1765	011524	105237 	001123'			INCB	.NOERR+1	; SET FORCED STOP
   1766	011530	010706 				MOV	PC,SP		; SET UP THE STACK
   1767	011532	012737 	000200 	001014'		MOV	#EV.PF,.SERFG+0	; SET POWER FAIL
   1768	011540	012737 	004000 	177776 		MOV	#4000,@#PS	; ENABLE INTERRUPTS
   1769	011546	012746 	014040'			MOV	#ASXE1,-(SP)
   1770	011552	162706 	000006 			SUB	#6,SP		; SET UP INITIAL TO TEN Q
   1771	011556	000137 	047366'			JMP	INIAN		; GO DO IT
   1772						;
   1773	011562				EMGSTK::			; EMERGENCY STACK AREA
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 43
LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS

   1775						.SBTTL	LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS
   1776					;
   1777					;	TRAPS HANDLED HERE ARE:
   1778					;
   1779					;	TRAP TO 4 (DEVICE OR MEMORY TIMEOUT AND 11 CATCH ALL)
   1780					;	TRAP TO 10 (ILLEGAL INSTRUCTION)
   1781					;	T-BIT AND BPT TRAPS
   1782					;	IOT INSTRUCTION
   1783					;	TRAP INSTRUCTION
   1784					;
   1785					;	ILLEGAL INTERRUPTS TRAP HERE.  THEY ARE DETERMINED
   1786					;	BY PLACING AN ODD ADDRESS IN UNUSED TRAP VECTORS
   1787					;	WHEN THE PROCESSOR TRAPS TO AN ILLEGAL TRAP VECTOR IT WIL
   1788					;	PUT THE ILLEGAL (ODD) ADDRESS IN THE PC AND TRAP TO 4
   1789					;	THIS WILL THEN ALLOW THE FIELD SERVICE PEOPLE TO
   1790					;	DETERMINE WHAT LOCATION THE PROCESSOR HAS PICKED
   1791					;	TO DO AN ILLEGAL TRAP
   1792					;
   1793					;
   1794					;	GENERALLY THESE TRAPS LIKE THE OTHERS THAT TRAP TO UN ATTACHED
   1795					;	TRAP VECTORS ARE FATAL.  THESE HAVE BEEN SEPARATED OUT
   1796					;	BECAUSE THEY ARE PROBABLY PROGRAM ERRORS AND NOT
   1797					;	HARDWARE ERRORS.  IT IS POSSIBLE THAT IF THESE ARE
   1798					;	SEPARATED FROM HARDWARE TRAPS THAT IT WILL BE POSSIBLE
   1799					;	TO PROVIDE SOME PROGRAM DEBUGGING BY IDENTIFICATION OF
   1800					;	THESE SPECIFIC TYPES.
   1801					;
   1802					;	HARDWARE/SOFTWARE ERROR TRAPS HANDLED HERE ARE:
   1803					;
   1804					;	1. TRAP TO UNASSIGNED TRAP VECTOR
   1805					;	2. PARITY ERROR
   1806					;	3. RESERVED INSTRUCTION TRAP
   1807					;	4. IOT TRAP
   1808					;
   1809					;	STACK SUMMARY:
   1810					;			0(SP) -- TRAP PC
   1811					;			2(SP) -- TRAP PS
   1812					;
   1813						.ENABL	LSB
   1814	011562				COMTRP:
   1815	011562	013737 	177776 	001120'		MOV	PS,TRPASV	; SAVE THE COMTRP PS
   1816	011570	042737 	177760 	001120'		BIC	#177760,TRPASV	; MASK OFF PRIORITY BITS
   1817	011576	022706 	001000 			CMP	#1000,SP	; LEGAL STACK?
   1818	011602	103403 				BLO	10$		; YES -- NOT RED VIOLATION
   1819	011604	012706 	011562'			MOV	#EMGSTK,SP	; NO -- BETTER RESCUE STACK
   1820	011610	000451 				BR	30$		; THEN CRASH SYSTEM
   1821						;
   1822	011612				10$:
   1823	011612	010546 				MOV	R5,-(SP)
   1824	011614	032766 	000340 	000004 		BIT	#340,4(SP)	; EXEC?
   1825	011622	001044 				BNE	30$		; YES -- CRASH
   1826									; FIND THE TRAP VECTOR
   1827	011624	013705 	001006'			MOV	.CRTSK,R5	; FIND THE CURRENT TASK
   1828	011630	001441 				BEQ	30$		; [DSW-DEBUG] NONE, JUST CRASH
   1829	011632	016505 	000016 			MOV	A.TD(R5),R5	; FIND STD POINTER
   1830	011636	016505 	000030 			MOV	S.SS(R5),R5	; FIND THE SST VECTOR
   1831	011642	001410 				BEQ	CMNABO		; NONE -- CRASH
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 43-1
LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS

   1832	011644	063705 	001120'			ADD	TRPASV,R5	; FIND WHICH VECTOR
   1833	011650					MFPS	@R5,R5		; FIND THE ADDRESS
	011650	011505 				MOV	@R5,R5
   1834	011652	001404 				BEQ	CMNABO		; NONE FOUND -QUIT
   1835	011654	012637 	001116'			MOV	(SP)+,EMTSTK	; SAVE R5 FOR COMMON TRAP
   1836	011660	000137 	013556'			JMP	.SSTCO
   1837						;
   1838	011664				CMNABO::
   1839	011664	013705 	001006'			MOV	.CRTSK,R5	; FIND THE CURRENT TASK
   1840	011670	013765 	001120'	000024 		MOV	TRPASV,A.FM+0(R5) ;SET THE REASON FOR ABORT
   1841	011676	112765 	000004 	000014 		MOVB	#TS.TKN,A.TS(R5) ;SET TASK STATUS TO ABORT
   1842	011704	005237 	001124'			INC	.TKTN		; SET TKTN FLAG
   1843	011710	026527 	000006 	010022'		CMP	A.PD(R5),#F11TPD ;FILES 11 TPD?
   1844	011716	001003 				BNE	20$		; NO -- TKTN WILL WORK
   1845	011720					.CRASH	FTA		; YES -- CAN'T GET TKTN IN
	011720	000004 				IOT
	011722	   106 	   124 	   101 		.ASCIZ	/FTA/
	011725	   000
   1846						;
   1847	011726				TRPXIT:
   1848	011726				20$:
   1849	011726	012605 				MOV	(SP)+,R5	; RESTORE R5
   1850	011730	000137 	015062'			JMP	..INTX		; RETURN
   1851						;
   1852	011734				30$:
   1853	011734	013705 	001120'			MOV	TRPASV,R5	; DO COMMON CRASH PROCEDURE
   1854	011740	000175 	011744'			JMP	@CRSTB(R5)	; CRASH
   1855						.DSABL	LSB
   1856					;
   1857	011744				CRSTB:
   1858	011744	011754'				.WORD	TRP4
   1859	011746	012024'				.WORD	RESERV
   1860	011750	012032'				.WORD	BPTTRP
   1861	011752	012070'				.WORD	IOTTRP
   1862					;
   1863	011754				TRP4:
   1864	011754	012705 	000004 			MOV	#4,R5		; POINT TO TRAP VECTOR
   1865	011760	011546 				MOV	(R5),-(SP)	; SAVE IT
   1866	011762	012715 	012002'			MOV	#10$,(R5)	; SET UP TEMPORARY VECTOR
   1867	011766	005777 	167372 			TST	@.PRSTA		; WAS IT THE DTE20??
   1868	011772	012615 				MOV	(SP)+,(R5)	; NO -- OTHER BUS TIMEOUT
   1869	011774					.CRASH	T04
	011774	000004 				IOT
	011776	   124 	   060 	   064 		.ASCIZ	/T04/
	012001	   000
   1870						;
   1871	012002				10$:				; HERE ON DTE-20 BUS TIMEOUT
   1872	012002	022626 				CMP	(SP)+,(SP)+	; GET RID OF SECOND TRAP PS, PC
   1873	012004	012615 				MOV	(SP)+,(R5)	; RESTORE TRAP VECTOR
   1874	012006	032737 	004000 	001012'		BIT	#EF.PFR,.COMEF+2 ; POWERFAIL IN PROGRESS??
   1875	012014	001344 				BNE	TRPXIT		; YES -- IGNORE TRAP
   1876	012016					.CRASH	DTD		; NO -- DTE20 IS DEAD
	012016	000004 				IOT
	012020	   104 	   124 	   104 		.ASCIZ	/DTD/
	012023	   000
   1877						;
   1878	012024				RESERV:
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 43-2
LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS

   1879	012024					.CRASH	RES
	012024	000004 				IOT
	012026	   122 	   105 	   123 		.ASCIZ	/RES/
	012031	   000
   1880						;
   1881	012032				BPTTRP:
   1882	012032					.CRASH	TBT
	012032	000004 				IOT
	012034	   124 	   102 	   124 		.ASCIZ	/TBT/
	012037	   000
   1883						;
   1884	012040				.PARER:
   1885	012040	012700 	172100 			MOV	#.PARRG,R0	; SET UP POINTER TO REGISTERS
   1886	012044	012737 	012062'	000004 		MOV	#20$,@#4	; SET UP TO POINT TO CRASH MESSAGE ON NXM
   1887	012052	012701 	001022'			MOV	#PARSAV,R1	; SET UP SAVE AREA POINTER
   1888	012056				10$:
   1889	012056	012021 				MOV	(R0)+,(R1)+
   1890	012060	000776 				BR	10$
   1891						;
   1892	012062				20$:
   1893	012062					.CRASH	MPE		; MEMORY PARITY ERROR
	012062	000004 				IOT
	012064	   115 	   120 	   105 		.ASCIZ	/MPE/
	012067	   000
   1894						;
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 44
LOW CORE -- CRASH ROUTINE

   1896						.SBTTL	LOW CORE -- CRASH ROUTINE
   1897					;
   1898					;	CRASH -- SUBROUTINE THAT WILL NOT RETURN TO SAVE THE
   1899					;	INFORMATION NECESSARY WHEN THE MACHINE ENTERS AN UNRECOVERABLE
   1900					;	STATE THAT REQUIRES RE-LOAD.  CRASH ATTEMPTS TO SAVE ALL THE
   1901					;	VOLATILE REGISTERS THAT MIGHT BE NECESSARY TO DEBUG
   1902					;	THE SOFTWARE OR HARDWARE WHEN THE PDP-11 SYSTEM CRASHES.
   1903					;
   1904					;	STACK SUMMARY:
   1905					;
   1906					;			0(SP) -- IOT TRAP PC
   1907					;			2(SP) -- IOT TRAP PS
   1908					;
   1909	012070				IOTTRP:
   1910	012070	005737 	011372'			TST	.IODBG		;[**]
   1911	012074	001413 				BEQ	5$		;[**]
   1912	012076	010546 				MOV	R5,-(SP)	;[**]
   1913	012100	012705 	012366'			MOV	#CMSG,R5	;[**]
   1914	012104					CALL	20$		;[**]
	012104	004737 	012276'			JSR	PC,20$
   1915	012110	012705 	012402'			MOV	#TTTMSG,R5	;[**]
   1916	012114					CALL	20$		;[**]
	012114	004737 	012276'			JSR	PC,20$
   1917	012120	012605 				MOV	(SP)+,R5	;[**]
   1918	012122	000442 				BR	10$		;[**]
   1919	012124	005237 	011372'		5$:	INC	.IODBG		;[**]
   1920	012130	016605 	000002 			MOV	2(SP),R5	; TRAP PC POINTS TO THE CRASH CODE TEXT
   1921	012134	010637 	001020'			MOV	SP,SPSAV	; SAVE SP
   1922	012140	012706 	011562'			MOV	#EMGSTK,SP	; SET UP THE EMERGENCY STACK POINTER
   1923	012144					CALL	.IOSNP		; [4.2314] SNAPSHOT THE I/O PAGE
	012144	004737 	012406'			JSR	PC,.IOSNP
   1924	012150	010546 				MOV	R5,-(SP)
   1925	012152	012705 	012366'			MOV	#CMSG,R5	; SET UP THE CRASH MESSAGE POINTER
   1926	012156					CALL	20$		; PRINT THE MESSAGE
	012156	004737 	012276'			JSR	PC,20$
   1927	012162	011605 				MOV	(SP),R5		; CRASH CODE POINTER TO R5
   1928	012164	010446 				MOV	R4,-(SP)	; SAVE R4
   1929	012166	005004 				CLR	R4		; CLEAR R4
   1930	012170	012524 				MOV	(R5)+,(R4)+	; SAVE THE CRASH CODE
   1931	012172	011524 				MOV	(R5),(R4)+	;
   1932	012174	013705 	001022'			MOV	PARSAV,R5	; GET PARITY ERROR DATA
   1933	012200	006205 				ASR	R5		; POSITION IT
   1934	012202	006205 				ASR	R5		;
   1935	012204	006205 				ASR	R5		;
   1936	012206	006205 				ASR	R5		;
   1937	012210	006205 				ASR	R5		;
   1938	012212	150544 				BISB	R5,-(R4)	; SAVE IT IN HIGH BYTE
   1939	012214	012604 				MOV	(SP)+,R4	; RESTORE REGISTERS
   1940	012216	012605 				MOV	(SP)+,R5	; CRASH CODE POINTER TO R5
   1941	012220					CALL	20$		; PRINT THE CRASH CODE
	012220	004737 	012276'			JSR	PC,20$
   1942					;
   1943					; CLOSED LOOP TO RING THE KL DOORBELL AND REQUEST A RELOAD.  IN RESPONSE TO
   1944					; THIS REQUEST, THE KL10 WILL "PUSH THE ELECTRONIC SWITCH" IN THE BM873 ROM.
   1945					; THIS WILL:
   1946					;
   1947					;	1. FORCE A "POWERFAIL" TRAP
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 44-1
LOW CORE -- CRASH ROUTINE

   1948					;	2. DUMP AN RELOAD THE FRONT-END
   1949					;
   1950					; NOTE THAT THE FRONT-END CPU MUST BE RUNNING FOR THE CONTEXT SAVE OF THE
   1951					; POWERFAIL TRAP TO COMPLETE PROPERLY.
   1952					;
   1953	012224	005037 	011372'			CLR	.IODBG		;[**]
   1954	012230				10$:
   1955	012230	012737 	000006 	000004 		MOV	#6,@#4		; FORCE AN EARLY HALT IF NXM
   1956	012236	005037 	000006 			CLR	@#6
   1957	012242	013705 	001366'			MOV	.PRDTE,R5	; FIND DTE20
   1958	012246	062705 	000006 			ADD	#6,R5		; POINT TO DEXWD1
   1959	012252	012725 	000004 			MOV	#LOAD11,(R5)+
   1960	012256	012725 	010000 			MOV	#DEP,(R5)+
   1961	012262	012725 	000022 			MOV	#22,(R5)+	; REQUEST RELOAD
   1962	012266	012777 	000400 	167070 		MOV	#TO10DB,@.PRSTA	; RING BELL
   1963	012274	000755 				BR	10$
   1964						;
   1965	012276				20$:				;
   1966	012276	105737 	001234'			TSTB	.KLNSW+0	; IS KLINIK ACTIVE??
   1967	012302	003402 				BLE	30$		; NOT THAT WE CARE...
   1968	012304	111537 	175616 			MOVB	(R5),@#PRB1	; YES -- PRINT A CHARACTER ON KLINIK LINE
   1969	012310				30$:				;
   1970	012310	112537 	177566 			MOVB	(R5)+,@#PRB0	; PRINT THE SAME CHARACTER ON THE CTY
   1971	012314				40$:				;
   1972	012314	105737 	177564 			TSTB	@#PRS0		; IS THE CTY DONE???
   1973	012320	100375 				BPL	40$		; NO -- WAIT SOME MORE
   1974	012322	105737 	001234'			TSTB	.KLNSW+0	; YES -- IS KLINIK ACTIVE??
   1975	012326	003403 				BLE	50$		; NO -- NOT THAT WE CARE...
   1976	012330	105737 	175614 			TSTB	@#PRS1		; YES -- IS THE KLINIK LINE FINISHED??
   1977	012334	100367 				BPL	40$		; NO -- WAIT SOME MORE
   1978	012336				50$:				;
   1979	012336	105715 				TSTB	(R5)		; MESSAGE DONE??
   1980	012340	001356 				BNE	20$		; NO -- CONTINUE THE MESSAGE
   1981	012342	005737 	011370'			TST	.PFDBG		; [**]
   1982	012346	001406 				BEQ	IGNO		;[**]
   1983	012350	112737 	000120 	177566 		MOVB	#'P,@#PRB0	;[**]
   1984	012356	105737 	177564 		60$:	TSTB	@#PRS0		;[**]
   1985	012362	100375 				BPL	60$		;[**]
   1986	012364				IGNO::
   1987	012364					RETURN			; YES -- RETURN TO CALLER
	012364	000207 				RTS	PC
   1988					;
   1989					;
   1990					;
   1991					;	AFTER THE SYSTEM HALTS THE PDP-10 WILL EVENTUALLY REALIZE
   1992					;	THAT THE PDP11 HAS CRASHED AND ATTEMPT TO
   1993					;	RELOAD IT.
   1994					;
   1995	012366				CMSG:
   1996	012366	   015 	   012 	   061 		.ASCIZ	<15><12>"11-HALT"<15><12>
	012371	   061 	   055 	   110
	012374	   101 	   114 	   124
	012377	   015 	   012 	   000
   1997	012402				TTTMSG:
   1998	012402	   124 	   124 	   124 		.ASCIZ	/TTT/			;[**]
	012405	   000
   1999						.EVEN
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 45
LOW CORE -- I/O PAGE SNAPSHOT

   2001						.SBTTL	LOW CORE -- I/O PAGE SNAPSHOT
   2002
   2003					;+
   2004					; .IOSNP -- SNAPHOT THE I/O PAGE INTO THE GEN PARTITION
   2005					;
   2006					; THIS SUBROUTINE IS INVOKED WHENEVER RSX-20F REQUESTS A RELOAD.
   2007					; THE CONTENT OF ALL REGISTERS IN THE I/O PAGE (160000 - 177776) ARE
   2008					; LOADED INTO THE GEN PARTITION (100000 - 107776).  NON-EXISTENT REGISTERS
   2009					; CONTAIN "123456" IN THE DUMP.
   2010					;
   2011					; INPUTS:
   2012					;
   2013					;	NONE.
   2014					;
   2015					; OUTPUTS:
   2016					;
   2017					;	THE I/O PAGE IS LOADED INTO 100000 THRU 107776.
   2018					;
   2019					; NOTE:
   2020					;
   2021					;	THIS ROUTINE MUST BE CALLED AT BR6, OR HIGHER.
   2022					;-
   2023
   2024		007777 				IOPSIZ = <177776-160000>/2
   2025
   2026	012406				.IOSNP:
   2027	012406	010046 				MOV	R0,-(SP)	;;; [4.2314] SAVE REGISTERS
   2028	012410	010146 				MOV	R1,-(SP)
   2029	012412	010246 				MOV	R2,-(SP)
   2030	012414	013746 	000004 			MOV	@#4,-(SP)	;;; [4.2314] SAVE TRAP-AT-4 VECTOR
   2031	012420	012737 	012462'	000004 		MOV	#30$,@#4	;;; [4.2314] SET ALTERNATE VECTOR
   2032	012426	012700 	160000 			MOV	#160000,R0	;;; [4.2314] BASE OF I/O PAGE
   2033	012432	012701 	100000 			MOV	#100000,R1	;;; [4.2314] BASE OF GEN PARTITION
   2034	012436	012702 	007777 			MOV	#IOPSIZ,R2	;;; [4.2314] I/O PAGE SIZE
   2035	012442				10$:
   2036	012442	012021 				MOV	(R0)+,(R1)+	;;; [4.2314] SAVE THE I/O PAGE
   2037	012444				20$:
   2038	012444	077202 				SOB	R2,10$		;;; [4.2314] LOOP TILL DONE
   2039	012446	012637 	000004 			MOV	(SP)+,@#4	;;; [4.2314] RESTORE VECTOR
   2040	012452	012602 				MOV	(SP)+,R2	;;; [4.2314] AND REGISTERS
   2041	012454	012601 				MOV	(SP)+,R1
   2042	012456	012600 				MOV	(SP)+,R0
   2043	012460					RETURN			;;; [4.2314] TO CALLER
	012460	000207 				RTS	PC
   2044	012462				30$:
   2045	012462	012721 	123456 			MOV	#123456,(R1)+	;;; [4.2314] MARK NON-EXISTENT REGISTER
   2046	012466	032626 				BIT	(SP)+,(SP)+	;;; [4.2314] RESET STACK
   2047	012470	000765 				BR	20$		;;; [4.2314] AND CONTINUE
   2048						;
LC -- LOW CORE FOR RSX20F	MACRO M1113  03-APR-86 18:57  PAGE 46
LOW CORE -- I/O PAGE SNAPSHOT

   2050
   2051						.TITLE	SCH	- TASK SCHEDULER & GLOBAL DEFS
   2052						.SBTTL	EXEC MODULE ONE -- TITLE PAGE
   2053	012472					IDENT$	15,05,RSX$$F
						.IDENT	/B15050/
   2054					;
   2055					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   2056					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2057					;			ALL RIGHTS RESERVED.
   2058					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2059					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2060					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2061					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2062					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2063					;
   2064					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2065					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2066					;       CORPORATION.
   2067					;
   2068					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2069					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2070					;
   2071					;
   2072					;		MODULE: EXEC MODULE ONE
   2073					;
   2074					;		VERSION: 15-05
   2075					;
   2076					;		AUTHOR:  R. MCLEAN
   2077					;
   2078					;		DATE: 19 MAR 75
   2079					;
   2080					;
   2081					;	THIS MODULE CONTAINS:
   2082					;
   2083					;	1 -- SYSTEM NOTES,
   2084					;	2 -- GLOSSARY,
   2085					;	3 -- SYMBOLIC DEFINITIONS,
   2086					;	4 -- NUL TASK.
   2087					;
   2088					; MODIFICATIONS:
   2089					;
   2090					;	NO.	DATE		PROGRAMMER	PURPOSE
   2091					;	---	----		----------	-------
   2092					;	001	18-OCT-76	A. PECKHAM	ADDITIONAL .KLIWD FLAGS
   2093					;	002	20-OCT-76	A. PECKHAM	FIX FOR F11 PARTITION
   2094					;						LOAD REQUEST FAILURE.
   2095					;	003	03-FEB-77	R. BELANGER	CHANGED KLR EVENT FLAG
   2096					;						ADDED KLD EVENT FLAG
   2097					;	004	04-MAR-77	R. BELANGER	ADDED CODE IN NULL TASK
   2098					;						TO INVOKE TIME OF DAY TASK
   2099					;	005	07-MAR-77	A. PECKHAM	REMOVE BUG FROM DOWN MESSAGE CODE.
   2100					;	006	01-JUL-77	R. BELANGER	ADD KLINIK EVENT LOGGING CODES.
   2101					;	007	18-AUG-77	R. BELANGER	ADD POWER RESTART IN PROGRESS FLAG
   2102					;	008	05-OCT-77	R. BELANGER	ADD COMM REGION INVALID FLAG
   2103					;	009	27-MAY-78	R. BELANGER	DEFINE PROTOCOL TIMEOUT FLAG FOR "TKTN"
   2104					;  TCO 4.1.1035	16-NOV-79	R. BELANGER	CHANGES TO SUPPORT QUEUE ARBITRATION
   2105					;  TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 46-1
EXEC MODULE ONE -- TITLE PAGE

   2106					;  TCO 5.1127	08-AUG-80	S. LEAPLINE	MAKE SNDMSG GLOBAL FOR HOST DEBUG
   2107					;	010	27-MAR-81	S. LEAPLINE	REMOVE "RSUM" AND "SPND"
   2108					;
   2109					;11-JUL-83  TCO 6.1721	D.WEAVER
   2110					;	CHANGE THE %DECSYSTEM-XX NOT RUNNING MESSAGES TO EVEN PARITY AND AT
   2111					;	THE SAME TIME MAKE THEM UPPER AND LOWER CASE.
   2112					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 47
EXEC MODULE ONE -- SYSTEM NOTES

   2114						.SBTTL	EXEC MODULE ONE -- SYSTEM NOTES
   2115					;+
   2116					; PROCESSOR PRIORITIES
   2117					;
   2118					; PERIPHERIAL DEVICE INTERRUPT SERVICE ROUTINES RUN AT PROCESSOR PRIORITY
   2119					; LEVELS FOUR THRU SEVEN (4-7).  ALSO, PARTS OF THE SOFTWARE THAT CANNOT BE
   2120					; INTERRUPTED ARE ALSO RUN AT PRIORITY SEVEN (PRI=7).  THESE UNINTERRUPTABLE
   2121					; PERIODS ARE AS SHORT AS POSSIBLE.
   2122					;
   2123					; PRIORITY LEVELS ZERO THRU THREE (0-3) ARE USED BY THE SYSTEM AS OPERATION
   2124					; INDICATORS.  I.E., THERE ARE NO "SOFTWARE INTERRUPTS", AND THEREFORE, THERE
   2125					; IS NO PRECEDENCE IMPLIED (OR ENVOKED) BY LEVELS ZERO THRU THREE.
   2126					;
   2127					; LEVEL ZERO (PRI=0) IS USED EXCLUSIVELY FOR TASK EXECUTION.
   2128					;
   2129					; LEVELS ONE, TWO, AND THREE ARE USED FOR "SYSTEM LEVEL" EXECUTION.
   2130					;
   2131					; LEVEL TWO (PRI=2) IS USED FOR THE RECOGNITION OF "SYSTEM EVENTS".
   2132					; THESE EVENTS ARE INDICATED IN THE "SYSTEM EVENT RECOGNITION" FLAG
   2133					; '.SERFG' AND ARE RECOGNIZED (SERVICED) ONLY WHEN RETURNING TO
   2134					; TASK EXECUTION (VIZ., FROM AN INTERRUPT, OR FROM A DIRECTIVE).
   2135					; SYSTEM EVENTS ARE (1) SIGNIFICANT EVENT DECLARATIONS, (2) CLOCK
   2136					; TICKS, AND (3) POWER FAILURE RECOVERIES.
   2137					;
   2138					; LEVEL THREE (PRI=3) IS USED FOR EXECUTION OF ROUTINES WHICH CANNOT BE
   2139					; INTERRUPTED BY SIGNIFICANT-EVENT OR CLOCK-TICK RECOGNITION, BUT CAN BE
   2140					; INTERRUPTED BY PERIPHERIAL DEVICE INTERRUPTS
   2141					;  IN THESE CASES, THE LEVEL
   2142					; MAY BE SET TO THREE BY ANY MEANS, BUT MUST BE LOWERED TO ZERO BY
   2143					; TRANSFERRING CONTROL TO '..INTX' TO ALLOW RECOGNITION OF "SYSTEM
   2144					; EVENTS THAT MIGHT HAVE OCCURED WHILE RUNNING AT PRI=3.
   2145					; THE SYSTEM TRACE (DEBUGGING) ROUTINE  RUNS AT PRI=7.
   2146					;
   2147					;
   2148					;
   2149					; FORMAT OF PROCESSOR STATUS (PS) WORD
   2150					;
   2151					;	C CPP RXX XLL LTN ZVC
   2152					;
   2153					;	CC	CURRENT MODE (00:KERNEL, 11:USER)
   2154					;	PP	PREVIOUS MODE (00:KERNEL, 11:USER)
   2155					;	R	REGISTER CLEAR (BIT ALWAYS CLEAR)
   2156					;	XXX	UNUSED BITS
   2157					;	LLL	PROCESSOR PRIORITY LEVEL
   2158					;	T	TRACE BIT
   2159					;	N	CONDITION CODE -- NEGATIVE
   2160					;	Z	CONDITION CODE -- ZERO
   2161					;	V	CONDITION CODE -- OVERFLOW
   2162					;	C	CONDITION CODE -- CARRY
   2163					;
   2164					; KEY TEXT IN THIS LISTING IS DELIMITED BY LINES CONATINING A ";+" AND A ";-"
   2165					; AS THE FIRST TWO CHARACTERS OF A SOURCE LINE.  A ";+" LINE  DEFINES THE
   2166					; BEGINNING OF A BLOCK OF KEY TEXT, AND A ";-" LINE DEFINES THE END.
   2167					;-
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 48
EXEC MODULE ONE -- GLOSSARY

   2169						.SBTTL	EXEC MODULE ONE -- GLOSSARY
   2170					;+
   2171					;
   2172					;
   2173					; ATL -- ACTIVE TASK LIST
   2174					;
   2175					; CKL -- CLOCK LIST
   2176					;
   2177					; DTL -- DTE20 LIST
   2178					;
   2179					; MRL -- MEMORY REQUEST LIST
   2180					;
   2181					; PUD -- PHYSICAL UNIT DEVICE TABLE
   2182					;
   2183					; DEQUE -- DOUBLE ENDED QUEUE.  FORWARD AND BACKWARD CIRCULAR LINKAGES.
   2184					;
   2185					; EXTERNAL PAGE -- 4K PAGE OF REAL MEMORY SPACE (760000-777776) CONTAINING
   2186					; CPU & PERIPHERIAL DEVICE CONTROL & STATUS REGISTERS (THE DEVICE PAGE).
   2187					;
   2188					; ISR -- INTERRUPT SERVICE ROUTINE
   2189					;
   2190					;
   2191					; STD -- SYSTEM TASK DIRECTORY
   2192					;-
   2193
   2194						.SBTTL	MACRO CALLS (MCALL)
   2195
   2199						.MCALL	.ENB0,.INH0,.ENB6,.INH6,.INH,.ENB,.INH5,.ENB5,.CRASH,RQST$
   2200						.MCALL	DIR$,CLEF$S,QIOW$,WTSE$,WTSE$S,.STKM,$DEF
   2201						.MCALL	CALL,RETURN,DTON$S,MFPS,MTPS,MTPI,MFPI,.DQPEN,DECL$S,CMKT$S
   2202						.MCALL	MRKT$,WTLO$,WSIG$S,WTLO$C,CLEF$C,QIOSY$,MRKT$S
   2203	012472					QIOSY$
   2204	012472					$DEF
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 49
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2206						.SBTTL	EXEC MODULE ONE -- SYMBOLIC DEFINITIONS
   2207					;
   2208					; EXTERNAL PAGE DEFINITIONS
   2209					;
   2210		177776 			PS==177776	;PROCESSOR STATUS WORD
   2211		177546 			LKS==177546	;KW11L CLOCK
   2212		177560 			KBS0==177560	;CTY TTY
   2213		177562 			KBB0==177562	;CTY BUFFER (INPUT)
   2214		177564 			PRS0==177564	;CTY OUTPUT STATUS
   2215		177566 			PRB0==177566	;CTY OUTPUT BUFFER
   2216		175610 			KBS1==175610
   2217		175612 			KBB1==175612
   2218		175614 			PRS1==175614
   2219		175616 			PRB1==175616
   2220		173000 			.BM873==173000	;START OF BOOTSTRAP
   2221		172100 			.PARRG==172100	;PARITY ERROR REGISTER 0
   2222					;
   2223		000340 			PR7==340	;PRIORITY 7
   2224		000340 			PRI7==340
   2225		000100 			.INTEN==000100	;INTERRUPT ENABLE BIT
   2226					;
   2227		172360 			KPAR0=172360	;KERNEL PAGE ADDRESS REG 0
   2228		172362 			KPAR1=172362	;REG 1
   2229		172364 			KPAR2=172364	;REG 2
   2230		172366 			KPAR3=172366	;REG 3
   2231		172370 			KPAR4=172370	;REG 4
   2232		172372 			KPAR5=172372	;REG 5
   2233		172374 			KPAR6=172374	;REG 6
   2234		172376 			KPAR7=172376	;REG 7
   2235					;
   2236		172300 			KPDR0=172300	;KERNEL PAGE DESCRIPTOR REGISTER 0
   2237		172302 			KPDR1=172302	;REG 1
   2238		172304 			KPDR2=172304	;REG 2
   2239		172306 			KPDR3=172306	;REG 6
   2240		172310 			KPDR4=172310	;REG 4
   2241		172312 			KPDR5=172312	;REG 5
   2242		172314 			KPDR6=172314	;REG 6
   2243		172316 			KPDR7=172316	;REG 7
   2244					;
   2245		177640 			UPAR0=177640	;USER PAGE ADDRESS REG 0
   2246		177642 			UPAR1=177642	;REG 1
   2247		177644 			UPAR2=177644	;REG 2
   2248		177646 			UPAR3=177646	;REG 3
   2249		177650 			UPAR4=177650	;REG 4
   2250		177652 			UPAR5=177652	;RRG 5
   2251		177654 			UPAR6=177654	;REG 6
   2252		177656 			UPAR7=177656	;REG 7
   2253					;
   2254		177600 			UPDR0=177600	;USER PAGE DESCRIPTOR REG 0
   2255		177602 			UPDR1=177602	;REG 1
   2256		177604 			UPDR2=177604	;REG 2
   2257		177606 			UPDR3=177606	;REG 3
   2258		177610 			UPDR4=177610	;REG 4
   2259		177612 			UPDR5=177612	;REG 5
   2260		177614 			UPDR6=177614	;REG 6
   2261		177616 			UPDR7=177616	;REG 7
   2262					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 49-1
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2263		000046 			$DSW==46	;DIRECTIVE STATUS WORD
   2264		000050 			.FSRPT==50	;FCS POINTER
   2265		000054 			N.OVPT==54	;FCP OVERLAY POINTER
   2266					;
   2267					;
   2268					; SYSTEM TRACE (T-BIT) DEBUGGING AID CONDITIONAL DEFINITIONS
   2269					;
   2270		000020 			TBIT==20	;TRACE BIT IN PS
   2271					;
   2272		000000 			STXAS==0	;SIGNIFICANT EVENT RECOGNITION (ATL SCAN) TRACE SWITCH
   2273		000000 			STXCS==0	;CLOCK TICK RECOGNITION TRACE SWITCH
   2274		000000 			STXDX==0	;DIRECTIVE EXECUTION TRACE SWITCH
   2275					;
   2276					; PRIVLEDGED TASK EVENT FLAG BIT MASKS
   2277					;
   2278		000001 			EF.DTE==1	;EVENT FLAG FOR DTE20 DOORBELL (UNUSED)
   2279		000001 			E.DTE==1.
   2280		000002 			EF.CLK==2	;EVENT FLAG FOR CLOCK (UNUSED)
   2281		000002 			E.CLK==2.
   2282		000004 			EF.TTY==4	;EVENT FLAG FOR TTY INPUT COMPLETE (UNUSED)
   2283		000003 			E.TTY==3.
   2284		000010 			EF.NIR==10	;EVENT FLAG TO SIGNAL QIO REQUEST ENTERED (DRIVERS)
   2285		000004 			E.NIR==4.
   2286		000020 			EF.IOD==20	;EVENT FLAG TO SIGNAL QIO REQUEST DONE (DRIVERS)
   2287		000005 			E.IOD==5.
   2288		000040 			EF.BOV==40	;EVENT FLAG TO SIGNAL NOT ENOUGH NODE SPACE (UNUSED)
   2289		000006 			E.BOV==6.
   2290		000100 			EF.TMO==100	;EVENT FLAG TO SIGNAL TIMOUT REQUEST FOR TTY (TTYDRR & SCOMM)
   2291		000007 			E.TMO==7.
   2292		000200 			EF.RQM==200	;REQUEST MCR (TTYDRR)
   2293		000010 			E.RQM==8.
   2294		000400 			EF.WFM==400	;WAIT FOR MARK TIME (UNUSED)
   2295		000011 			E.WFM==9.
   2296		001000 			EF.RKR==1000	; +++003 REQUEST KLINIK RING SERVICE (TTYDRR)
   2297		000012 			E.RKR==10.	; +++003
   2298		002000 			EF.RKH==2000	; +++003 REQUEST KLINIK HANG-UP SERVICE (TTYDRR)
   2299		000013 			E.RKH==11.	; +++003
   2300		004000 			EF.RSS==4000	; +++009 REQUEST SETSPD FOR AUTOBAUD (TTYDRR)
   2301		000014 			E.RSS==12.	; +++009
   2302					;
   2303					; RESERVED LOCAL EVENT FLAG BIT MASKS (25. - 32.)
   2304					;
   2305		100000 			EF.SND==100000	;SEND ALL FINISHED
   2306		000040 			E.FSND==32.
   2307					;
   2308					; RESERVED GLOBAL EVENT FLAG BIT MASKS (57. - 64.)
   2309					;
   2310		100000 			EF.PR1==100000	; [4.1.1105] PRIMARY PROTOCOL RUNNING FLAG
   2311		000100 			E.FPR1==64.
   2312		040000 			EF.CTC==040000	; [4.1.1105] ^C FLAG
   2313		000077 			E.FCTC==63.
   2314		020000 			EF.PR2==020000	;SECONDARY PROTOCOL RUNNING FLAG
   2315		000076 			E.FPR2==62.
   2316		010000 			EF.RKP==010000	; +++003 KLINIK PARAMETERS RECIEVED (QPRDTE, SAVE)
   2317		000075 			E.FRKP==61.
   2318		004000 			EF.PFR==004000	; +++007 POWER FAIL RESTART IN PROGRESS (SCOMM, KLINIT)
   2319		000074 			E.FPFR==60.
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 49-2
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2320		002000 			EF.CRI==002000	; +++008 COMM REGION IS INVALID (BOOT, TKTN)
   2321		000073 			E.FCRI==59.
   2322		001000 			EF.FCP==001000	; FAULT CONTINUATION IN PROGRESS (BOOT)
   2323		000072 			E.FFCP==58.
   2324					;
   2325					; COMMON NODE DEFINITONS
   2326					;
   2327		000000 			N.FP==0		;FORWARD POINTER
   2328		000002 			N.BP==2		;BACKWARD POINTER
   2329		000010 			N.PR==10	;PRIORITY BYTE
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 50
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2331					; TPD -- TASK PARTITION DIRECTORY
   2332					;
   2333					; THE "TPD" IS A FIXED LIST OF ENTRIES DESCRIBING EACH PARTITION IN A
   2334					; SYSTEM.
   2335					;  CONSISTING OF ENTRIES OF THE FOLLOWING FORMAT:
   2336					;
   2337		000000 			T.PN==00 ; WD. 00 (B 00) -- PARTITION NAME (FIRST HALF)
   2338						 ; WD. 01 (B 02) -- PARTITION NAME (SECOND HALF)
   2339		000004 			T.BA==04 ; WD. 02 (B 04) -- BASE ADDRESS OF PARTITION (IN BYTES)
   2340		000006 			T.PZ==06 ; WD. 03 (B 06) -- SIZE OF PARTITION (IN BYTES)
   2341		000010 			T.FW==10 ; WD. 04 (B 10) -- PARTITION FLAGS WORD
   2342		000012 			T.HP==12 ; WD. 05 (B 12) -- 1/64 TH OF BASE ADR OF FIRST HOLE, OR ZERO IF NO HOLES.
   2343		000014 			T.RF==14 ; WD. 06 (B 14) -- MRL LISTHEAD (FORWARD LINKAGE)
   2344		000016 			T.RB==16 ; WD. 07 (B 16) -- MRL LISTHEAD (BACKWARD LINKAGE)
   2345					;
   2346		000020 			T.SZ==20		;SIZE (IN BYTES) OF TPD ENTRIES
   2347					;
   2348					;
   2349					;	FLAGS WORD BIT DEFINITIONS:
   2350					;
   2351		000002 			TF.OU==000002	;[01] SET IF OCCUPIED USER CONTROLLED PARTITION.
   2352					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 51
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2354					;
   2355					;	TASK HEADER DEFINITIONS
   2356					;
   2357		000000 			H.CSP==0		;CURRENT STACK POINTER (UNUSED)
   2358		000002 			H.HSZ==2		;LENGTH OF HEADER
   2359		000046 			H.DSW==46		;DIRECTIVE STATUS WORD SAVE AREA
   2360		000050 			H.FCP==50		;FCP SAVE AREA
   2361		000052 			H.FOR==52		;FORTRAN SAVE AREA
   2362		000054 			H.OVL==54		;OVERLAY SAVE AREA
   2363		000074 			H.IPS==74		;INITIAL PS
   2364		000076 			H.IPC==76		;INITIAL PC
   2365		000100 			H.ISP==100		;INITIAL SP
   2366		000106 			H.TKVA==106		;TASK SST VECTOR ADDRESS
   2367		000130 			H.LUT==130		;LOGICAL UNIT TABLE SIZE
   2368					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 52
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2370					;
   2371					; STD -- SYSTEM TASK DIRECTORY
   2372					;
   2373					; THE SYSTEM TASK DIRECTORY IS A MEMORY RESIDENT DIRECTORY OF ALL TASKS
   2374					; THAT HAVE BEEN INSTALLED INTO A SYSTEM THAT ARE NOT PREMANENTLY RESIDENT.
   2375					;  THIS DIRECTORY CONSISTS OF TWO
   2376					; PARTS: (1) A FIXED SIZE AREA OF ONE WORD FOR EACH TASK THAT COULD
   2377					; BE INSTALLED AT ANY TIME, AND (2) AN STD ENTRY FOR EACH TASK THAT IS
   2378					; INSTALLED.  THE FIXED SIZED AREA IS CALLED THE "ALPHA TABLE AREA", AND
   2379					; PROVIDES SPACE FOR AN ALPHABETICALLY ORDERED CONTIGUOUS LIST POINTERS
   2380					; TO STD ENTRIES (TO FACILLATE BINARY SEARCH FOR STD ENTRY BY TASK NAME).
   2381					; EACH STD ENTRY IS OF THE FOLLOWING FORMAT:
   2382					;
   2383		000000 			S.TN==00 ; WD. 00 (B 00) -- TASK NAME (6 CHAR IN RADIX-50, 2 WORDS)
   2384						 ; WD. 01 (B 02) -- (SECOND HALF OF TASK NAME)
   2385		000004 			S.TD==04 ; WD. 02 (B 04) -- DEFAULT TASK PARTITION (TPD ADDRESS)
   2386		000006 			S.FW==06 ; WD. 03 (B 06) -- FLAGS WORD
   2387		000010 			S.DP==10 ; WD. 04 (B 10) -- DEFAULT PRIORITY (BYTE)
   2388		000011 			S.DI==11 ;        (B 11) -- SYSTEM DISK INDICATOR (BYTE)
   2389		000012 			S.BA==12 ; WD. 05 (B 12) -- 1/64 TH OF BASE ADDRESS OF LOAD IMAGE
   2390		000014 			S.LZ==14 ; WD. 06 (B 14) -- SIZE OF LOAD IMAGE
   2391		000016 			S.TZ==16 ; WD. 07 (B 16) -- MAX TASK SIZE
   2392		000020 			S.PC==20 ; WD. 10 (B 20) -- INITIAL PC OF TASK
   2393		000022 			S.SP==22 ; WD. 11 (B 22) -- INITIAL SP OF TASK
   2394		000024 			S.RF==24 ; WD. 12 (B 24) -- SEND AND REQUEST QUEUE FORWARD PTR
   2395		000026 			S.RB==26 ; WD. 13 (B 26) -- SEND AND REQUEST QUEUE BACKWARD PTR
   2396		000030 			S.SS==30 ; WD. 14 (B 30) -- SST VECTOR TABLE ADDRESS
   2397		000032 			S.DL==32 ; WD. 15 (B 32) -- LOAD IMAGE FIRST BLOCK NUMBER (32-BITS)
   2398						 ; WD. 16 (B 34)    (SECOND HALF OF DISK ADDRESS)
   2399					;
   2400		000036 			S.SZ==36		;SIZE OF STD ENTRY
   2401					;
   2402					;
   2403					;
   2404					;	FLAGS WORD BIT DEFINITIONS:
   2405					;
   2406		000001 			SF.TA==000001	;[00] SET WHEN TASK IS ACTIVE
   2407		000001 			SF.PT==000001	;[00] SET WHEN TASK IS PRIVILEDGED (ACTIVE FOR NOW)
   2408		000002 			SF.FX==000002	;[01] SET WHEN TASK IS FIXED IN MEMORY
   2409		000004 			SF.EX==000004	;[02] SET WHEN TASK IS TO BE REMOVED ON EXIT
   2410		040000 			SF.IR==040000	;[14] SET WHEN INSTALL IS REQUESTED
   2411		100000 			SF.ST==100000	;[15] SET WHEN TASK IS SYSTEM TASK
   2412					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 53
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2414					;
   2415					; ATL -- ACTIVE TASK LIST
   2416					;
   2417					; THE "ATL" IS A PRIORITY ORDERED DEQUE OF "ATL" NODES FOR ACTIVE TASKS
   2418					; THAT HAVE MEMORY ALLOCATED FOR THEIR EXECUTION.  THE TASKS REPRESENTED
   2419					; BY ENTRIES IN THE ATL ARE EITHER MEMORY RESIDENT, OR A REQUEST FOR THEIR
   2420					; LOADING HAS BEEN QUEUED.  THE LISTHEAD FOR THIS DEQUE IS IN THE SYSTEM
   2421					; COMMUNICATIONS AREA (SCOM), AND THE NODES ARE OF THE FOLLOWING FORMAT:
   2422					;
   2423						 ; WD. 00 (B 00) -- FORWARD LINKAGE
   2424						 ; WD. 01 (B 02) -- BACKWARD LINKAGE
   2425		000004 			A.SP==04 ; WD. 02 (B 04) -- STACK POINTER (R6) OF RUNNING TASK
   2426						 ;			WHEN TASK IS NOT CURRENT TASK
   2427		000006 			A.PD==06 ; WD. 03 (B 06) -- TASK'S RUN PARTITION (TPD ADDRESS)
   2428		000010 			A.RP==10 ; WD. 04 (B 10) -- TASK'S RUN PRIORITY (BYTE)
   2429		000012 			A.HA==12 ; WD. 05 (B 12) -- 1/64TH REAL ADR OF LOAD IMAGE
   2430		000014 			A.TS==14 ; WD. 06 (B 14) -- TASK STATUS (BYTE)
   2431		000015 			A.FB==15 ; WD. 06 (B 15) -- TASK FLAGS BYTE
   2432		000016 			A.TD==16 ; WD. 07 (B 16) -- SYSTEM TASK DIRECTORY (STD) ENTRY ADDRESS
   2433		000020 			A.EF==20 ; WD. 10 (B 20) -- TASK'S EVENT FLAGS (1-32)
   2434						 ; WD. 11 (B 22) -- (SECOND HALF OF TASK'S EVENT FLAGS)
   2435		000024 			A.FM==24 ; WD. 12 (B 24) -- TASK'S EVENT FLAGS MASKS (64-BITS)
   2436						 ; WD. 13 (B 26) -- (SECOND WORD OF FLAGS MASK)
   2437						 ; WD. 14 (B 30) -- (THIRD WORD OF FLAGS MASK)
   2438						 ; WD. 15 (B 32) -- (FOURTH WORD OF FLAGS MASK)
   2439		000034 			A.PF==34 ; WD. 16 (B 34) -- POWER FAIL AST TRAP ADDRESS
   2440					;
   2441		000036 			A.SZ==36		;SIZE OF ATL
   2442					;
   2443					; TASK STATUS VALUES ARE DESCRIBED AT 'ASXDT'
   2444					;
   2445					; BEFORE EXECUTION , THE FIRST THREE
   2446					; FLAGS MASK WORDS ARE USED AS FOLLOWS:
   2447					;
   2448					;	A.FM+0 -- ADDRESS OF TASK LOAD I/O REQUEST DEQUE LISTHEAD,
   2449					;	A.FM+2 -- ADDRESS OF TASK LOAD I/O REQUEST NODE,
   2450					;
   2451					; MRL -- MEMORY REQUIRED LIST
   2452					;
   2453					; THE "MRL" IS A PRIORITY ORDERED DEQUE OF "ATL" NODES FOR ACTIVE TASKS
   2454					; THAT REQUIRE MEMORY IN A PARTITION.  EACH PARTITION HAS ITS OWN MRL.
   2455					; WHENEVER A NON-FIXED TASK RUNNING IN A PARTITION EXITS, AN
   2456					; ATTEMPT IS MADE TO ASSIGN MEMORY TO THE FIRST (HIGHEST PRIORITY)
   2457					; TASK IN THE LIST.  IF MEMORY IS FOUND, THE TASK'S NODE IS
   2458					; MOVED FROM THE "MRL" TO THE "ATL" DEQUE.  THE MRL LISTHEAD IS IN
   2459					; THE TPD ENTRY FOR THE CORRESPONDING PARTITION.
   2460					;
   2461					;
   2462					;	FLAGS BYTE BIT DEFINITIONS
   2463					;
   2464		000200 			AF.PP==200	;[07] SET WHEN TASK IS PRIMARY PROTOCOL TASK
   2465					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 54
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2467					;
   2468					; CKL -- CLOCK TABLE
   2469					;
   2470					; THE CLOCK LIST IS A TABLE CONSISTING OF ONE ENTRY FOR EACH OPERATION
   2471					; SCHEDULED TO BE PERFORMED AT SOME FUTURE TIME.  A "SCHEDULE DELTA-
   2472					; TIME" EACH ENTRY (IF ANY) OF THE CLOCK QUEUE IS DECREMENTED
   2473					; AT EACH CLOCK TICK UNTIL THE ENTRY "COMES DUE", AT WHICH TIME THE
   2474					; INDICATED OPERATION IS PERFORMED.  CLOCK TABLE ENTRIES ARE OF
   2475					; FOLLOWING FORMAT.
   2476					;
   2477		000000 			C.AT==00 ; WD. 00 -- ATL NODE ADDRESS OF REQUESTOR
   2478		000002 			C.AS==02 ; WD. 02 -- AST TRAP ADDRESS OF REQUESTOR
   2479		000004 			C.SD==04 ; WD. 02 -- SCHEDULE DELTA IN TICKS (16-BITS)
   2480		000006 			C.RS==06 ; WD. 03 -- RESCHEDULE DELTA IN TICKS (16-BITS)
   2481		000010 			C.FM==10 ; WD. 04 -- FLAG MASK (BIS SRC)
   2482		000012 			C.FA==12 ; WD. 05 -- FLAGS WORD ADR (BIS DST ADR)
   2483					;
   2484		000014 			C.SZ==14 ; SIZE OF CLOCK TABLE ENTRY
   2485					;
   2486					;
   2487		000074 			.CYLTM==60.	;CYCLE TIME OF CLOCK
   2488					;
   2489		000005 			.KALSC==5	;TIMEOUT INTERVAL FOR KL10
   2490					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 55
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2492					;
   2493					; DTE -- DTE TABLE
   2494					;
   2495					; THE DTE LIST IS A TABLE CONSISTING OF ONE ENTRY FOR EACH OPERATION
   2496					; SCHEDULED TO BE PERFORMED AT SOME FUTURE TIME WHEN THE DTE20
   2497					; INTERRUPTS.  THE DTE20 TABLE ENTRIES ARE OF THE FOLLOWING
   2498					; FORMAT.
   2499					;
   2500		000000 			D.AT==00 ; WD. 00 -- ATL NODE ADDRESS OF REQUESTOR
   2501		000002 			D.FM==02 ; WD. 01 -- FLAG MASK (BIS SRC)
   2502		000004 			D.FA==04 ; WD. 02 -- FLAGS WORD ADR (BIS DIST ADR)
   2503					;
   2504		000006 			D.SZ==06 ; SIZE OF DTE20 TABLE ENTRY
   2505					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 56
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2507					;
   2508					;	KLI PARAMETER WORD DEFINITIONS (.KLIWD)
   2509					;
   2510		000001 			KL.LRM==1		;LOAD RAMS
   2511		000002 			KL.CFM==2		;CONFIGURE MEMORY
   2512		000004 			KL.LVB==4		;LOAD VBOOT
   2513		000010 			KL.VBN==10		;VBOOT START AT START+1
   2514		000020 			KL.VBD==20		;DUMP MONITOR
   2515		000040 			KL.SPF==40		;START AT LOC 70 (AFTER POWER FAIL)
   2516		000100 			KL.LCA==100		; +001 LOAD CACHE
   2520		000400 			KL.CFL==400		; +001  IF = 0, CONFIGURE FROM FILE
   2521		001000 			KL.KAC==1000		; [4.2107] KEEP-ALIVE-CEASED ERROR
   2522		002000 			KL.DEF==2000		; OPERATOR ACTUATED REBOOT
   2523		004000 			KL.REQ==4000		; KLINIT REQUESTED
   2524		010000 			KL.ABO==10000		; KLINIT CANCELED
   2525					;
   2526					; ALL BITS 0 IMPLIES ASK QUESTIONS TO CONTROL LOADING
   2527					;
   2528					;
   2529					;	PARAMETER DEFINITIONS FOR KL ERROR WORD
   2530					;
   2531		000001 			KS.TSP==1		;TEN STOPPED (HALTED)
   2532		000002 			KS.CES==2		;CLOCK ERROR STOP
   2533		000004 			KS.EPE==4		;E BOX PARITY ERROR
   2534		000010 			KS.DEX==10		;DEPOSIT EXAMINE ERROR
   2535		000020 			KS.CST==20		;KEEP ALIVE STOPPED
   2536		000040 			KS.TRR==40		;TEN REQUEST'S RE-BOOT
   2537		000100 			KS.PFT==100		;POWER FAIL RESTART
   2538		000200 			KS.PTO==200		; +++012 PROTOCOL TIMEOUT
   2539		000400 			KS.FME==400		;FAST MEMORY PARITY ERROR
   2540		001000 			KS.CPE==1000		;CRAM PARITY ERROR
   2541		002000 			KS.DPE==2000		;DRAM PARITY ERROR
   2542		004000 			KS.FCF==4000		;FAULT-CONTNUATION FAILED
   2543					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 57
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2545					;
   2546					; PUD -- PHYSICAL UNIT DEVICE TABLE
   2547					;
   2548					; THE "PUD" IS A FIXED LIST OF ENTRIES DESCRIBING EACH PHYSICAL DEVICE-
   2549					; UNIT IN A SYSTEM.
   2550					;  CONSISTS OF ENTRIES OF THE FOLLOWING FORMAT:
   2551					;
   2552		000000 			U.DN==00 ; WD. 00 (B 00) -- DEVICE NAME (2 ASCII CHARS)
   2553		000002 			U.UN==02 ; WD. 01 (B 02) -- UNIT NUMBER (BYTE)
   2554		000003 			U.FB==03 ;        (B 03) -- FLAGS (BYTE)
   2555		000004 			U.C1==04 ; WD. 02 (B 04) -- CHARACTERISTICS WORD ONE (DEVICE INDEPENDENT INDICATORS)
   2556		000006 			U.C2==06 ; WD. 03 (B 06) -- CHARACTERISTICS WORD TWO (DEVICE DEPENDENT INDICATORS
   2557		000010 			U.C3==10 ; WD. 04 (B 10) -- CHARACTERISTICS WORD THREE (DEVICE DEPENDENT INDICATORS)
   2558		000012 			U.C4==12 ; WD. 05 (B 12) -- CHARACTERISTICS WORD FOUR (SIZE OF BLOCK, BUFFER, LINE)
   2559		000014 			U.AF==14 ; WD. 06 (B 14) -- ATTACH FLAG (ATL NODE ADDRESS OF ATTAC HING TASK
   2560		000016 			U.RP==16 ; WD. 07 (B 16) -- REDIRECT POINTER
   2561		000020 			U.HA==20 ; WD. 10 (B 20) -- HANDLER TASK ATL NODE ADDRESS
   2562		000022 			U.RF==22 ; WD. 11 (B 22) -- UNIT REQUEST DEQUE LISTHEAD (FWD PNTR)
   2563		000024 			U.RB==24 ; WD. 12 (B 24) -- UNIT REQUEST DEQUE LISTHEAD (BKG PNTR)
   2564					;
   2565					; PHYSICAL UITS ARE CONSIDERED "VOLUMES" BY THE FILES SYSTEM, AND THE
   2566					; REMAINDER OF THE PUD ENTRY IS A "VOLUME CONTROL BLOCK".
   2567					;
   2568		000026 			U.VA==26 ; WD. 13 (B 26) -- ADDRESS OF VOLUME CONTROL BLOCK EXTENSION
   2569		000030 			U.UI==30 ; WD. 14 (B 30) -- USER IDENTIFICATION CODE (UIC)
   2570		000030 			U.PC==30 ;        (B 30) -- UIC PROGRAMMER CODE
   2571		000031 			U.GC==31 ;        (B 31) -- UIC GROUP CODE
   2572		000032 			U.VP==32 ; WD. 15 (B 32) -- VOLUME PROTECTION WORD
   2573		000032 			U.CH==32 ;        (B 32) -- CHARACTERISTICS FLAGS
   2574						 ;        (B 33) -- RESERVED BYTE
   2575		000034 			U.AR==34 ; WD. 16 (B 34) -- ACCESS RIGHTS FLAGS WORD
   2576		000036 			U.DACP==36;WD. 20 (B 36) -- DEFAULT ACP NAME, RAD50 (FIRST WORD)
   2577		000040 			U.ACP==40 ; WD. 20 (B 40) -- STD ENTRY ADDRESS OF CURRENT ACP
   2578		000042 			U.TF==42 ; WD. 21 (B 42) -- TERMINAL FLAGS WORD
   2579		000042 			U.PR==42 ;        (B 42) -- TERMINAL PRIVILEDGE WORD
   2580		000043 			U.FO==43 ;        (B 43) -- TERMINAL FORMS BYTE
   2581		000044 			U.LBH==44 ; WD. 22 (B 44) -- HIGH ORDER - TOTAL # OF BLOCKS FOR DEVICE
   2582		000046 			U.LBN==46 ; WD. 24 (B46) -- LOW ORDER TOTAL # OF BLOCKS FOR DEVICE
   2583		000050 			U.SZ==50		;SIZE (IN BYTES OF PUD ENTRIES
   2584					;
   2585					;	FLAGS BYTE DEFINITIONS
   2586					;
   2587		000040 			UF.RD==040		; **************TEMP*********
   2588		000200 			UF.RH==200	; [7] SET WHEN HANDLER TASK IS DECLARED RESIDENT
   2589		000100 			UF.TL==100	; [6] SET WHEN HANDLER TASK RECOGNIZES LOAD AND RECORD
   2590		000040 			UF.OFL==040	; [5] SET WHEN DEVICE IS OFFLINE
   2591					;
   2592					;	BIT DEFINITIONS FOR CHARACTERISTICS WORD ONE
   2593					;
   2594		000001 			UC.REC==000001	;[00] SET IF RECORD ORIENTED DEVICE (VIZ., TT,LP, CR)
   2595		000002 			UC.CCL==000002	;[01] SET IF CARRIAGE CONTROL DEVICE (VIZ., TT LP)
   2596		000004 			UC.TTY==000004	;[02] SET IF TTY DEVICE (VIZ., KSR, LA30)
   2597		000010 			UC.DIR==000010	;[03] SET IF DEVICE IS A DIRECTORY DEVICE
   2598		000020 			UC.SDI==000020	;[04] SET  IF DEVICE IS A SINGLE DIRECTORY DEVICE
   2599		000040 			UC.SQD==000040	;[05] SET IF DEVICE IS A SEQUENTIAL DEVICE
   2600		000100 			UC.ETB==000100  ;[06] SET IF DEVICE IS EIGHTEEN BIT MODE
   2601		000400 			UC.INB==000400	;+003 [08] SET IF THE DEVICE IS INTERMEDIATE BUFFERED
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 57-1
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2602		001000 			UC.SWL==001000	;[09] SET IF THE DEVICE IS SOFTWARE WRITE LOCKED
   2603		002000 			UC.ISP==002000	;[10] SET IF DEVICE IS INPUT SPOOLED
   2604		004000 			UC.0SP==004000	;[11] SET IF DEVICE IS OUTPUT SPOOLED
   2605		010000 			UC.PSE==010000	;[12] SET IF DEVICE IS PSEUDO DEVICE
   2606		020000 			UC.COM==020000	;[13] SET IF DEVICE IS COMMUNICATIONS CHANNEL
   2607		040000 			UC.F11==040000	;[14] SET IF DEVICE IS FILES-11
   2608		100000 			UC.MNT==100000	;[15] SET IF DEVICE IS MOUNTABLE
   2609					;
   2610					;	BIT DEFINITIONS FOR CHARACTERISTICS WORD TWO
   2611					;
   2612		000200 			CH.OFF==200	;VOLUME IS OFF-LINE
   2613		000100 			CH.FOR==100	;VOLUME IS FOREIGN
   2614		000040 			CH.UNL==40	;DISMOUNT PENDING
   2615		000020 			CH.NAT==20	;ATTACH/DETACH NOT PERMITTED
   2616		000010 			CH.NDC==10	;DEVICE CONTROL FUNCTIONS NOT PERMITTED
   2617		000001 			CH.LAB==1	;VOLUME IS LABELED TAPE
   2618					;
   2619					;	BIT DEFINITIONS FOR TERMINAL PRIVILEDGE BYTE
   2620					;
   2621		000001 			UT.PR==1	;SET IF TY ID PRIVILEDGED
   2622		000002 			UT.SL==2	;SET IF TTY IS SLAVED
   2623		000004 			UT.LG==4	;SET IF TERMINAL IS LOGGED ON
   2624					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 58
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2626					;
   2627					; TASK TERMINATION NOTICE ERROR CODES FOR A.FM+0
   2628					;
   2629		000012 			TN.EMT==12		;NON-RSX EMT
   2630		000014 			TN.TRP==14		;TRAP INSTRUCTION
   2631		000040 			TN.LRF==40		;LOAD FAILURE
   2632					;
   2633					; SEND AND REQUEST QUEUE ENTRY
   2634					;
   2635		000004 			Q.SI==04 ; WD. 02 (B 04) -- SYSTEM TASK LIST ADDRESS
   2636		000006 			Q.D1==06 ; WD. 03 (B 06) -- FIRST DATA WORD
   2637					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 59
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2639					;
   2640					;	DEVICE QUEUE POINTER TABLE (TO 11 QUEUE ENTRIES)
   2641					;
   2642		000000 			Q.DA==0	; WD. 00 (B 00) -- ADDRESS OF DEVICE TABLE LIST
   2643		000002 			Q.TS==02 ; WD. 01 (B 02) -- SIZE OF AN ENTRY IN THE DEVICE TABLE LIST
   2644		000004 			Q.ST==04 ; WD. 02 (B 04) -- ADDRESS OF DEVICE START SUBROUTINE
   2645		000006 			Q.SP==06 ; WD. 03 (B 06) -- ADDRESS OF DEVICE STOP SUBROUTINE
   2646						; WD. 04 (B 10) -- SPARE
   2647		000012 			Q.AK==12 ; WD. 05 (B 12) -- ACKNOWLEDGE ROUTINE
   2648						 ; WD. 06 (B 14) -- SPARE
   2649		000016 			Q.DZ==16 ; WD. 07 (B 16) -- DEVICE COUNT
   2650		000020 			Q.SZ==20	; SIZE OF TABLE ENTRY
   2651					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 60
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2653					;
   2654					;	DEVICE ERROR LOGGING INFORMATION AND STATUS BLOCK DEFINITONS
   2655					;
   2656					;	WORD 0 -- STANDARD STATUS BITS (DV.XXX)
   2657					;
   2658					;	1	DEVICE-DEPENDENT BITS
   2659					;	2	...........
   2660					;	N
   2661					;
   2662					;	DEVICE ERROR LOGGING BITS (FIRST WORD BITS ONLY)
   2663					;
   2664		000001 			DV.NXD==1	;NON-EX DEVICE
   2665		000002 			DV.OFL==2	;OFF-LINE
   2666		000004 			DV.OIR==4	;HARDWARE ERROR. OPERATOR INTERVENTION REQ'D
   2667		000010 			DV.SCN==10	;SOFTWARE CONDITION. ACKNOWLEDGE REQUIRED
   2668		000020 			DV.IOP==20	;I/O IN PROGRESS
   2669		000040 			DV.EOF==40	;END-OF-FILE ENCOUNTERED
   2670		000100 			DV.LOG==100	;ERROR LOGGING REQUIRED
   2671		000200 			DV.URE==200	;UN-RECOVERABLE ERROR
   2672		000400 			DV.F11==400	;ERROR ON FROM -11 REQUEST
   2673		001000 			DV.HNG==1000	;DEVICE HUNG
   2674		002000 			DV.LIN==2000	;DEVICE LOST INTERRUPT ENABLE
   2675		004000 			DV.CFG==4000	; CONFIGURATION INFORMATION
   2676					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 61
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2678					;
   2679					; KLINIK EVENT LOGGING CODES
   2680					;
   2681
   2682		000000 			K.LUND==0		; UNDEFINED CODE
   2683
   2684		000001 			K.LSCK==1		; SET/CLEAR KLINIK COMMAND
   2685		000001 				K.LSKL==1	; SET KLINIK
   2686		177777 				K.LCKL==-1	; CLEAR KLINIK
   2687
   2688		000002 			K.LRNG==2		; KLINIK RING
   2689		000001 				K.LRAC==1	; ACCEPTED (WINDOW OPEN)
   2690		177777 				K.LRRJ==-1	; REJECTED (WINDOW CLOSED)
   2691
   2692		000003 			K.LDSC==3		; KLINIK LINE DISCONNECT
   2693		000001 				K.LDCM==1	; DIRECTED DISCONNECT (COMMAND)
   2694		177777 				K.LDRP==-1	; CARRIER DROP
   2695
   2696		000004 			K.LCON==4		; KLINIK LINE CONNECT
   2697		000001 				K.LROP==1	; REMOTE -- OPERATOR MODE
   2698		000002 				K.LRPR==2	; REMOTE -- PROGRAMMER MODE
   2699		000003 				K.LRMN==3	; REMOTE -- MAINTENANCE MODE
   2700		177777 				K.LUSR==-1	; USER MODE
   2701
   2702		000005 			K.LBPW==5		; BAD PASSWORD
   2703
   2704		000006 			K.LLTO==6		; LOGON TIMEOUT
   2705
   2706		000007 			K.LRBA==7		; KLINIK ACTIVE ON REBOOT
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 62
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2708					;
   2709					;	OFFSETS FOR SST TRAPS TABLE IN USER'S AREA
   2710					;
   2711		000000 			T.RAP4==0		;TRAP AT 4
   2712		000002 			T.RAPM==2		;MEMORY PROTECT VIOLATOION
   2713		000004 			T.RAPB==4		;T BIT OR BPT TRAP
   2714		000006 			T.RAPI==6		;IOT TRAP
   2715		000010 			T.RAPR==10		;RESERVED INSTRUCTION TRAP
   2716		000012 			T.RAPE==12		;EMT TRAP (NON RSX)
   2717		000014 			T.RAPT==14		;TRAP TRAP
   2718		000016 			T.RAPF==16		;FLOATING POINT TRAP
   2719					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 63
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2721					;
   2722					; IRQ -- I/O REQUEST QUEUE
   2723					;
   2724					; THE "IRQ" IS A PRIORITY ORDERED DEQUE OF I/O REQUEST NODES WITH ITS
   2725					; LISTHEAD IN THE PUD ENTRY OF THE PHYSICAL UNIT FOR WHICH THE I/O
   2726					; REQUEST WAS QUEUED.  EACH PHYSICAL UNIT HAS ITS OWN I/O REQUEST QUEUE.
   2727					; I/O REQUEST NODES ARE CREATED AND QUEUED PRIMARILY BY THE "QUEUE I/O"
   2728					; DIRECTIVE.  HOWEVER, THE EXEC ALSO CREATES I/O REQUESTS TO:
   2729					; (1) LOAD A TASK IMAGE,
   2730					; I/O REQUEST NODES ARE
   2731					; THE FOLLOWING FORMAT.
   2732					;
   2733						 ; WD. 00 (B 00) -- FORWARD LINKAGE
   2734						 ; WD. 01 (B 02) -- BACKWARD LINKAGE
   2735		000004 			R.TD==04 ; WD. 02 (B 04) -- STD NODE OF REQUESTOR
   2736		000006 			R.AT==06 ; WD. 03 (B 06) -- ATL NODE OF REQUESTOR ***
   2737		000010 			R.PR==10 ; WD. 04 (B 10) -- PRIORITY (BYTE)
   2738		000011 			R.DP==11 ;        (B 11) -- DPB SIZE (BYTE) ***
   2739		000012 			R.LU==12 ; WD. 05 (B 12) -- LOGICAL UNIT NUMBER (BYTE)
   2740		000013 			R.FN==13 ;        (B 13) -- EVENT FLAG NUMBER (BYTE)
   2741		000014 			R.FC==14 ; WD. 06 (B 14) -- I/O FUNCTION CODE
   2742		000016 			R.SB==16 ; WD. 07 (B 16) -- ADDRESS OF STATUS BLOCK
   2743		000020 			R.AS==20 ; WD. 10 (B 20) -- AST ADDRESS
   2744		000022 			R.UI==22 ; WD. 11 (B 22) -- UIC (UNUSED)
   2745		000024 			R.PB==24 ; WD. 12 (B 24) -- PARAMETER #1
   2746						 ; WD. 13 (B 26) -- PARAMETER #2
   2747						 ; WD. 14 (B 30) -- PARAMETER #3
   2748						 ; WD. 15 (B 32) -- PARAMETER #4
   2749						 ; WD. 16 (B 34) -- PARAMETER #5
   2750						 ; WD. 17 (B 36) -- PARAMETER #6
   2751					;
   2752					; THE LOW ORDER THREE-BITS OF THE I/O FUNCTION CODE ARE USED BY THE SYSTEM
   2753					; AS FOLLOWS:
   2754					;
   2755							;[0] -- RESERVED FOR FUTURE USE
   2756		000002 			RF.XR==000002	;RESERVED
   2757							;[2] -- RESERVED FOR FUTURE USE
   2758					;
   2759					; *** WHENEVER AN I/O REQUEST IS QUEUED BY THE "QUEUE I/O" DIRECTIVE, THE
   2760					; DPB SIZE AND THE REQUESTOR'S ATL NODE ADDRESS ARE RECORDED IN THE I/O
   2761					; REQUEST NODE.  WHENEVER AN I/O REQUEST IS QUEUED AS A RESULT OF ANOTHER
   2762					; DIRECTIVE (VIZ., "REQUEST" CAUSING A TASK IMAGE TO BE LOADED), THE DPB
   2763					; SIZE AND THE REQUESTOR'S ATL NODE ADDRESS ARE SET TO ZERO.  THUS, BOTH
   2764					; BOTH THE DPB SIZE AND THE ATL NODE ADDRESS ARE ALSO "EXEC REQUEST"
   2765					; INDICATORS.
   2766					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 64
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2768					;+
   2769					;  SIGNIFICANT EVENT FLAG DEFINITIONS
   2770					;
   2771					;
   2772					; THE HIGH-ORDER BYTE '.SERFG+1' IS INCREMENTED WHENEVER A CLOCK
   2773					; TICK OCCURS (WHENEVER THE CLOCK INTERRUPT SERVICE ROUTINE RUNS).
   2774					; HENCE, '.SERFG+1' IS A BYTE CONTAINING A COUNT OF UNRECOGNIZED
   2775					; CLOCK TICKS.
   2776					;
   2777					; THE BITS OF THE LOW-ORDER BYTE '.SERFG+0' ARE USED TO FLAG THE
   2778					; FOLLOWING EVENTS:
   2779					;
   2780		000001 			EV.SE==001 ; [0] SET WHENEVER A SIGNIFICANT EVENT IS TO BE
   2781						   ; RECOGNIZED,
   2782					;
   2783		000002 			EV.AS==002 ; [1] SET WHEN POWER FAIL IS REQUIRED
   2784		000200 			EV.PF==200 ; [7] SET WHEN POWER DOWN HAS OCCURRED AND MUST BE RECOGNIZED
   2785						   ;     ** MUST BE SIGN BIT **
   2786					;-
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 65
EXEC MODULE ONE -- NUL TASK

   2788						.SBTTL	EXEC MODULE ONE -- NUL TASK
   2789					;
   2790					; THE NUL TASK EXISTS TO ELIMINATE EXCEPTION TESTING WHEN SCANNING THE
   2791					; ACTIVE TASK LIST, AND WHEN PROCESSING DIRECTIVES THAT CAUSE AN
   2792					; ATL SCAN TO CONTINUE FROM THE NEXT TASK OF LOWER PRIORITY THAN THE
   2793					; DIRECTIVE ISSUING TASK.
   2794					;
   2795					; THE NUL TASK IS THE LOWEST PRIORITY TASK IN A SYSTEM.
   2796					;
   2797					; THE NUL TASK HAS AN ATL NODE WITH STATUS OF "RUNNING", BUT HAS NO STD
   2798					; ENTRY.
   2799					;
   2800					; THE NUL TASK DOES NOT RESIDE IN A PARTITION.
   2801					;
   2802					; THE NUL TASK EXECUTION CONSISTS OF "WAIT" INSTRUCTIONS (TO INCREASE
   2803					; UNIBUS THROUGHPUT).  HOWEVER, THE NUL TASK DOES HAVE CONTEXT, AND CAN
   2804					; EXECUTE PDP-11 INSTRUCTIONS
   2805					;
   2806					;
   2807	012472				NULHD::	.STKM	170017,0,0,0,0,0,0,NTKXEP,174000,NTKXSP
	012540	000000 	000000 	000000 		.WORD	0,0,0,0
	012546	000000
	012566	174000 	012776'	012752'		.WORD	174000,NTKXEP,NTKXSP
	012622	000005 				.WORD	5
	012624	010262'				.WORD	TTPEN
	012626	000000 				.WORD	0
	012630	000000 				.WORD	0
	012632	000000 				.WORD	0
	012634	000000 				.WORD	0
	012636	000000 				.WORD	0
	012640	000000 				.WORD	0
	012642	000000 				.WORD	0
	012644	000000 				.WORD	0
	012646	000000 				.WORD	0
	012650	000000 				.WORD	0
	012752	170017 				.WORD	170017
	012754	000000 				.WORD	0
	012756	000000 				.WORD	0
	012760	000000 				.WORD	0
	012762	000000 				.WORD	0
	012764	000000 				.WORD	0
	012766	012776'				.WORD	NTKXEP
	012770	174000 				.WORD	174000
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 66
EXEC MODULE ONE -- NUL TASK

   2809	012772				NTKXEN:
   2810	012772					.ENB6			; ENABLE INTERRUPTS
	012772	012637 	177776 			MOV	(SP)+,@#PS
   2811	012776				NTKXEP:
   2812	012776	000001 				WAIT
   2813	013000	000001 				WAIT
   2814	013002	005200 				INC	R0
   2815	013004					.INH6			; [4.1.1035] DISALLOW INTERRUPTS
	013004	013746 	177776 			MOV	@#PS,-(SP)
	013010	112737 	000300 	177776 		MOVB	#300,@#PS
   2816	013016	005737 	001012'			TST	.COMEF+2	;;; [4.1.1105] IF PRIMARY PROTOCOL IS DEAD
   2817	013022	100033 				BPL	40$		;;; [4.1.1105] THEN SEND DOWN MESSAGE
   2818	013024	005737 	001164'			TST	.ACKAL		;;; IF ACKAL HAS NOT BEEN SENT
   2819	013030	001002 				BNE	20$		;;; THEN KL MAY STILL BE SHAKY
   2820	013032	105037 	013264'			CLRB	SNDMSG		;;; OTHERWISE RESET MSG FLAG
   2821	013036				20$:
   2822	013036	005737 	001124'			TST	.TKTN		;;; CHECK FOR TASK TERMINATION REQUIRED
   2823	013042	001410 				BEQ	30$		;;; NO -- LOOK AT TIME OF DAY FLAG
   2824	013044	005037 	001124'			CLR	.TKTN		;;; CLEAR REQUEST FOR TASK TERMINTATION
   2826	013050					.ENB6			;;; ENABLE INTERRUPTS
	013050	012637 	177776 			MOV	(SP)+,@#PS
   2827	013054					DIR$	#.TKTN.		; REQUEST TASK TERMINATION
	013054	012746 	013170'			MOV	#.TKTN.,-(SP)
	013060	104375 				EMT	375
   2828	013062	000745 				BR	NTKXEP		; AND CONTINUE
   2829						;
   2833	013064				30$:
   2834	013064	005737 	001136'			TST	.CLKSW		;;; NEED TIME CHANGE?
   2835	013070	100340 				BPL	NTKXEN		;;; [4.1.1035] NO -- JUST GO ON
   2836	013072	005037 	001136'			CLR	.CLKSW		;;; YES -- RESET CLOCK SWITCH
   2837	013076					.ENB6			;;; ENABLE INTERRUPTS
	013076	012637 	177776 			MOV	(SP)+,@#PS
   2838	013102					DIR$	#.TOD.		; REQUEST TIME OF DAY TASK
	013102	012746 	013152'			MOV	#.TOD.,-(SP)
	013106	104375 				EMT	375
   2839	013110	000732 				BR	NTKXEP		; AND CONTINUE IDLE LOOP
   2840						;
   2841	013112				40$:
   2842	013112	105737 	001400'			TSTB	.PRPSE		;;; ARE WE JUST PAUSING??
   2843	013116	001347 				BNE	20$		;;; YES -- BACK TO MAIN LOOP
   2844	013120	005737 	013264'			TST	SNDMSG		;;; HAVE WE INFORMED THE TTYS ?
   2845	013124	001344 				BNE	20$		;;; YES -- DON'T RE-SEND
   2846	013126	012704 	013206'			MOV	#DWNMSG,R4	;;; SEND DOWN MESSAGE
   2847	013132					CALL	COPBUF		;;; COPY BUFFER TO FREE SPACE
	013132	004737 	030130'			JSR	PC,COPBUF
   2848	013136	010004 				MOV	R0,R4		;;; SET UP TO SEND IT
   2849	013140					CALL	.SNDAL		;;; SEND MESSAGE
	013140	004737 	027624'			JSR	PC,.SNDAL
   2850	013144	105237 	013264'			INCB	SNDMSG		;;; SYSTEM DOWN MESSAGE HAS BEEN SENT.
   2851	013150	000732 				BR	20$		;;; CHECK FOR TERMINATION NOTIFICATION
   2852						;
   2853	013152				.TOD.:
   2854	013152					RQST$	MIDNIT
	013152	   013 	   007 			.BYTE	11.,7
	013154	051254 	054374 			.RAD50	/MIDNIT/
	013160	000000 	000000 			.WORD	0,0
	013164	000000 				.WORD
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 66-1
EXEC MODULE ONE -- NUL TASK

	013166	   000 	   000 			.BYTE	,
   2855
   2857	013170				.TKTN.:
   2858	013170					RQST$	TKTN
	013170	   013 	   007 			.BYTE	11.,7
	013172	077314 	053600 			.RAD50	/TKTN/
	013176	000000 	000000 			.WORD	0,0
	013202	000000 				.WORD
	013204	   000 	   000 			.BYTE	,
   2860
   2861					;A MACRO TO ASSEMBLE AN EVEN PARITY ASCII STRING
   2862					.MACRO EPASCI STR
   2863					.IRPC CHR,<STR>
   2864						PB==0			;;PARITY BIT INITIALLY ZERO
   2865						CH==''CHR		;;GET THE VALUE OF THE CHAR
   2866						.REPT 8.		;;FOR ALL EIGHT BITS
   2867							PB==200&<PB+CH>	;;XOR THE TOP BIT INTO PB
   2868							CH==CH*2	;; AND SHIFT TO THE NEXT BIT
   2869						.ENDR
   2870						.BYTE	PB+''CHR	;;STORE THE BYTE WITH THE PARITY BIT
   2871					.ENDM				;;END THE IRPC
   2872					.ENDM				;;END THE MACRO
   2873
   2874	013206				DWNMSG:
   2875	013206	000000 	000060 	013220'		.WORD	0,60,DWNMS,DWNMSZ,DWNMSZ*400
	013214	000043 	021400
   2876
   2877	013220				DWNMS:
   2878	013220	   215 	   012 	   207 		.ASCII	<215><12><207><207><207>
	013223	   207 	   207
   2879						.ENABL LC
   2881	013225					EPASCI	<%DECSYSTEM-20 not running>
	013225	   245 				.BYTE	PB+'%	;;STORE THE BYTE WITH THE PARITY BIT
	013226	   104 				.BYTE	PB+'D	;;STORE THE BYTE WITH THE PARITY BIT
	013227	   305 				.BYTE	PB+'E	;;STORE THE BYTE WITH THE PARITY BIT
	013230	   303 				.BYTE	PB+'C	;;STORE THE BYTE WITH THE PARITY BIT
	013231	   123 				.BYTE	PB+'S	;;STORE THE BYTE WITH THE PARITY BIT
	013232	   131 				.BYTE	PB+'Y	;;STORE THE BYTE WITH THE PARITY BIT
	013233	   123 				.BYTE	PB+'S	;;STORE THE BYTE WITH THE PARITY BIT
	013234	   324 				.BYTE	PB+'T	;;STORE THE BYTE WITH THE PARITY BIT
	013235	   305 				.BYTE	PB+'E	;;STORE THE BYTE WITH THE PARITY BIT
	013236	   115 				.BYTE	PB+'M	;;STORE THE BYTE WITH THE PARITY BIT
	013237	   055 				.BYTE	PB+'-	;;STORE THE BYTE WITH THE PARITY BIT
	013240	   262 				.BYTE	PB+'2	;;STORE THE BYTE WITH THE PARITY BIT
	013241	   060 				.BYTE	PB+'0	;;STORE THE BYTE WITH THE PARITY BIT
	013242	   240 				.BYTE	PB+' 	;;STORE THE BYTE WITH THE PARITY BIT
	013243	   356 				.BYTE	PB+'n	;;STORE THE BYTE WITH THE PARITY BIT
	013244	   157 				.BYTE	PB+'o	;;STORE THE BYTE WITH THE PARITY BIT
	013245	   164 				.BYTE	PB+'t	;;STORE THE BYTE WITH THE PARITY BIT
	013246	   240 				.BYTE	PB+' 	;;STORE THE BYTE WITH THE PARITY BIT
	013247	   162 				.BYTE	PB+'r	;;STORE THE BYTE WITH THE PARITY BIT
	013250	   365 				.BYTE	PB+'u	;;STORE THE BYTE WITH THE PARITY BIT
	013251	   356 				.BYTE	PB+'n	;;STORE THE BYTE WITH THE PARITY BIT
	013252	   356 				.BYTE	PB+'n	;;STORE THE BYTE WITH THE PARITY BIT
	013253	   151 				.BYTE	PB+'i	;;STORE THE BYTE WITH THE PARITY BIT
	013254	   356 				.BYTE	PB+'n	;;STORE THE BYTE WITH THE PARITY BIT
	013255	   347 				.BYTE	PB+'g	;;STORE THE BYTE WITH THE PARITY BIT
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 66-2
EXEC MODULE ONE -- NUL TASK

   2885						.DSABL LC
   2886	013256	   215 	   012 	   207 		.ASCII	<215><12><207><207><207>
	013261	   207 	   207
   2887		000043 			DWNMSZ=.-DWNMS
   2888						.EVEN
   2889	013264				SNDMSG::
   2890	013264	   001 				.BYTE	1		;  +++005 A SYSTEM DOWN MSG HAS BEEN SENT
   2891	013265	   000 				.BYTE	0		; [5.1127] HOST DEBUG NO MESSAGE FLAG
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 67
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   2893						.SBTTL	EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS
   2894					;
   2895					;
   2896					;	EMT INSTRUCTIONS ARE ONLY EXECUTED BY NON-INTERRUPT SERVICE ROUTINES
   2897					;
   2898					;	DIRECTIVE DISPATCH -- CONTROL IS TRANSFERRED TO A DIRECTIVE SERVICE
   2899					;	ROUTINE PER DIRECTIVE IDENTIFICATION CODE (DIC)
   2900					;
   2901					;	REGISTER DEFINITIONS ON EXIT:
   2902					;	R0 -- PC OF EMT INSTRUCTION
   2903					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   2904					;	R2 -- DPB SIZE
   2905					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   2906					;	R5 -- CURRENT TASK POINTER
   2907					;
   2908		000020 			EM.DRO==20	;OFFSET TO DPB OR DPB POINTER ON STACK
   2909					;
   2910					;
   2911					;
   2912	013266	010546 			EMTTRP::MOV	R5,-(SP)	;SAVE R5 INCASE OF TRAP(SST)
   2913	013270	016605 	000002 			MOV	2(SP),R5	;=PC+2 OF EMT INSTRUCTION
   2914	013274	024527 				CMP	-(R5),(PC)+	;WAS IT A
   2915	013276	104375 				EMT	375		; DIRECTIVE ?
   2916	013300	001421 				BEQ	10$		;YES -- LEGAL DIRECTIVE REQUEST
   2917	013302	011637 	001116'			MOV	@SP,EMTSTK	;SAVE R5
   2918	013306	111516 				MOVB	@R5,@SP		;NO -- MUST SET IT UP FOR SST
   2919	013310	013705 	001006'			MOV	.CRTSK,R5	;FIND THE CURRENT TASK POINTER
   2920	013314	016505 	000016 			MOV	A.TD(R5),R5	;FIND STD ADDRESS
   2921	013320	016505 	000030 			MOV	S.SS(R5),R5	;FIND THE SST TABLE
   2922	013324	001403 				BEQ	5$		;NONE -- FORGET IT
   2923	013326					MFPS	T.RAPE(R5),R5	;IS THERE AN ENTRY IN THE TABLE?
	013326	016505 	000012 			MOV	T.RAPE(R5),R5
   2924	013332	001106 				BNE	.SSTET		;DO SST SERVICE
   2925
   2926	013334	012737 	000012 	001120'	5$:	MOV	#TN.EMT,TRPASV	;SAVE THE TERMINATION TYPE
   2927	013342	000513 				BR	CMNABT		;AND GO TO COMMON ABORT
   2928
   2929	013344				10$:				;REMOVE THE SAVED R0 -- NOT NEEDED NOW
   2930									;SAVE REGISTERS
   2931	013344	010446 				MOV	R4,-(SP)
   2932	013346	010346 				MOV	R3,-(SP)
   2933	013350	010246 				MOV	R2,-(SP)
   2934	013352	010146 				MOV	R1,-(SP)
   2935	013354	010046 				MOV	R0,-(SP)
   2936	013356	010637 	001116'			MOV	SP,EMTSTK	;SAVE EMT STACK POINTER
   2938	013362	016601 	000020 			MOV	EM.DRO(SP),R1	;FIND THE DIRECTIVE OR DIRECTIVE POINTER
   2944					;
   2945					;	IF R1 IS EVEN, IT IS ASSUMED TO BE A DPB POINTER
   2946					;	IF R1 IS ODD, IT IS ASSUMED TO BE THE FIRST WORD OF A DPB THAT
   2947					;	HAS BEEN PUSHED ONTO THE STACK.
   2948					;
   2949					;
   2950					;	TEST FOR ODD OR EVEN
   2951					;
   2952	013366	032701 	000001 			BIT	#1,R1
   2953	013372	001003 				BNE	20$
   2954					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 67-1
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   2955					;	EVEN -- R1 CONTAINS A DPB POINTER (ADDRESS).
   2956					;
   2957	013374					MFPS	@R1,R2		;FIND THE FIRST DPB WORD
	013374	011102 				MOV	@R1,R2
   2958	013376	010203 				MOV	R2,R3		;FIND THE DIRECTIVE IDENTIFICATION CODE
   2959	013400	000405 				BR	30$		;EXECUTE DIRECTIVE
   2960					;
   2961					;	ODD WORD ON STACK -- DPB IS ON THE ISSUING
   2962					;	TASK'S STACK, AND R1 CONTAINS THE FIRST DPB WORD.
   2963					;
   2964					;	SET R1 TO THE DPB ADDRESS, R2 TO THE DPB SIZE (IN WORDS),
   2965					;	R3 TO THE DIRECTIVE IDENTIFICATION CODE.
   2966					;
   2967	013402	010102 			20$:	MOV	R1,R2		;SET DPB SIZE IN R2
   2968	013404	010103 				MOV	R1,R3		;SET DIRECTIVE CODE
   2969	013406	010601 				MOV	SP,R1		;FIND THE ADDRESS OF THE DPB
   2970	013410	062701 	000020 			ADD	#EM.DRO,R1	;POINT PAST SAVED STACK
   2971	013414	042703 	177400 		30$:	BIC	#177400,R3
   2972	013420	105002 				CLRB	R2
   2973	013422	000302 				SWAB	R2		;SET SIZE IN LOW ORDER
   2974					;
   2975					;	R3 CONTAINS  THE DIRECTIVE IDENTIFICATION CODE.
   2976					; THE DIC IS AN ODD QUANTITY AND SHOULD BE IN THE RANGE
   2977					;	001-127.(MAX RANGE)
   2978					;
   2979	013424	005721 				TST	(R1)+		;ADVANCE R1 TO POINT TO THE WORD FOLLOWING
   2980									;THE FIRST WORD DPB WORD.
   2981	013426	013705 	001006'			MOV	.CRTSK,R5	;SET UP CURRENT TASK POINTER
   2982	013432	022703 	000102 			CMP	#DIRMAX,R3	;CHECK TO SEE IF LEGAL DIRECTIVE
   2983	013436	103001 				BHIS	DIROK		;OK -- LEGAL RANGE
   2984	013440	104635 			DS.99:	TRAP	DE.99		;ILLEGAL DIRECTIVE
   2985	013442	000173 	013445'		DIROK:	JMP	@DIRDPT-1(R3)	;DISPATCH TO APPROPRIATE DIRECTIVE SERVICE CODE.
   2986					;
   2987	013446	023170'			DIRDPT:	.WORD	.D.QIO	;001. -- QIO
   2988	013450	023170'				.WORD	.D.QIO	;003. -- QIO AND WAIT
   2989	013452	022316'				.WORD	.D.GLI	;005. -- GET LUN INFORMATION
   2990	013454	022212'				.WORD	.D.ASS	;007. -- ASSIGN LUN
   2991	013456	020746'				.WORD	.D.DTE	;009. -- DTE20 FUNCTIONS
   2992	013460	024310'				.WORD	.D.REQ	;011. -- REQUEST
   2993	013462	023640'				.WORD	.D.SEN	;013. -- SEND
   2994	013464	023654'				.WORD	.D.SAR	;015. -- SEND AND REQUEST
   2995	013466	024106'				.WORD	.D.REC	;017. -- RECEIVE
   2996	013470	024106'				.WORD	.D.ROE	;019. -- RECEIVE OR EXIT
   2997	013472	024106'				.WORD	.D.ROS	;021. -- RECEIVE OR SUSPEND
   2998	013474	022776'				.WORD	.D.MKT	;023. -- MARK TIME
   2999	013476	024266'				.WORD	.D.PUT	;025. -- POWER UP AST
   3000	013500	023100'				.WORD	.D.CMT	;027. -- CANCEL MARK TIME REQUESTS
   3001	013502	013440'				.WORD	DS.99	; 029. -- ILLEGAL DIRECTIVE
   3002	013504	022462'				.WORD	.D.CEF	;031. -- CLEAR EVENT FLAG
   3003	013506	022500'				.WORD	.D.SEF	;033. -- SET EVENT FLAG
   3004	013510	022516'				.WORD	.D.DSE	;035. -- DECLARE SIGNIFICANT EVENT
   3005	013512	022540'				.WORD	.D.REF	;037. -- READ EVENT FLAG
   3006	013514	022554'				.WORD	.D.RAF	;039. -- READ ALL EVENT FLAGS
   3007	013516	022600'				.WORD	.D.WFS	;041. -- WAIT FOR SINGLE EVENT FLAG
   3008	013520	022656'				.WORD	.D.WFL	;043. -- WAIT FOR LOGICAL "OR" OF EVENT FLAGS
   3009	013522	013440'				.WORD	DS.99	;045. -- SUSPEND EXECUTION -- 010 REMOVED -- ILLEGAL
   3010	013524	013440'				.WORD	DS.99	;047. -- RESUME TASK EXECUTION -- 010 REMOVED -- ILLEGAL
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 67-2
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   3011	013526	022764'				.WORD	.D.WSE	;049. -- WAIT FOR NEXT SIGNIFICANT EVENT
   3012	013530	023146'				.WORD	.D.EXT	;051. -- TASK EXIT
   3017	013532	013440'				.WORD	DS.99	; 053. -- ILLEGAL DIRECTIVE
   3018	013534	013440'				.WORD	DS.99	; 055. -- ILLEGAL DIRECTIVE
   3020	013536	024254'				.WORD	.D.STV	;057. -- SPECIFY SST VECTOR
   3021	013540	022346'				.WORD	.D.GTP	;059. -- GET TIME PARAMETERS
   3022	013542	013440'				.WORD	DS.99	;061. -- ILLEGAL
   3023	013544	024536'				.WORD	.D.GPP	;063. -- GET TASK PARAMETERS
   3024	013546	024660'				.WORD	.D.GMP	;065. -- GET PARTITION PARAMETERS
   3025		000102 			DIRMAX=.-DIRDPT	;LEGAL NUMBER OF DIRECTIVES
   3026					;
   3027					; .SSTET -- SST FOR TRAP AND EMT'S
   3028					;
   3029	013550				.SSTET::
   3030	013550	105066 	000001 			CLRB	1(SP)		;CLEAR HIGH BYTE
   3031	013554	006316 				ASL	@SP		;MULTIPLY BY 2
   3032	013556				.SSTCO::
   3034	013556	012746 	004000 			MOV	#004000,-(SP)	;SET PS
   3038	013562	010546 				MOV	R5,-(SP)	;SET TRAP ADDRESS
   3039	013564	013705 	001116'			MOV	EMTSTK,R5	;RESTORE R5
   3040	013570	000002 				RTI			;RETURN TO USER
   3041					;
   3042	013572	013705 	001116'		CMNABT:	MOV	EMTSTK,R5	;RESTORE R5
   3043	013576	000137 	011664'			JMP	CMNABO		;AND GO TO COMMON ABORT
   3044					;
   3045					; CONTROL IS RETUNRED TO ".DR.NS" TO EXIT DIRECTIVE SERVICE WITHOUT ALTERING
   3046					; AN ISSUING TASK'S DIRECTIVE STATUS OR CONDITION CODES.
   3047					;
   3048					; DIRECTIVE RETURN STATUSES
   3049					;
   3050		000000 			DR.00==0		;DIRECTIVE RETURN 00
   3051		000001 			DR.01==1		;DIRECTIVE RETURN 01
   3052		000002 			DR.02==2		;DIRECTIVE RETURN 02
   3053		000003 			DR.03==3		;DIRECTIVE RETURN 03
   3054					;
   3055					; DIRECTIVE ERROR RETURNS
   3056					;
   3057		000377 			DE.01==-1&377		;ERR 01
   3058		000376 			DE.02==-2&377		;ERR 02
   3059		000375 			DE.03==-3&377		;ERR 03
   3060		000374 			DE.04==-4&377		;ERR 04
   3061		000373 			DE.05==-5&377		;ERR 05
   3062		000372 			DE.06==-6&377		;ERR 06
   3063		000371 			DE.07==-7&377		;ERR 07
   3064		000370 			DE.08==-8.&377		;ERR 08
   3065		000367 			DE.09==-9.&377		;ERR 09
   3066		000366 			DE.10==-10.&377		;ERR 10
   3067		000365 			DE.11==-11.&377		;ERR 11
   3068		000260 			DE.80==-80.&377		;ERR 80
   3069		000257 			DE.81==-81.&377		;ERR 81
   3070		000246 			DE.90==-90.&377		;ERR 90
   3071		000245 			DE.91==-91.&377		;ERR 91
   3072		000244 			DE.92==-92.&377		;ERR 92
   3073		000243 			DE.93==-93.&377		;ERR 93
   3074		000242 			DE.94==-94.&377		;ERR 94
   3075		000241 			DE.95==-95.&377		;ERR 95
   3076		000240 			DE.96==-96.&377		;ERR 96
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 67-3
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   3077		000237 			DE.97==-97.&377		;ERR 97
   3078		000236 			DE.98==-98.&377		;ERR 98
   3079		000235 			DE.99==-99.&377		;ERR 99
   3080					;
   3081	013602	132766 	000340 	000002 	.DRSRN::BITB	#340,2(SP)	;FROM EXEC?
   3082	013610	001025 				BNE	20$		;YES -- CONTIUE
   3083	013612	011646 				MOV	@SP,-(SP)	;PUT IT ON STACK TWICE
   3084	013614	162716 	000002 			SUB	#2,@SP
   3085	013620	117616 	000000 			MOVB	@(SP),@SP
   3086	013624	010537 	001116'			MOV	R5,EMTSTK
   3087	013630	013705 	001006'			MOV	.CRTSK,R5	;FIND THE CURRENT TASK
   3088	013634	016505 	000016 			MOV	A.TD(R5),R5	;FIND STD ADDRESS
   3089	013640	016505 	000030 			MOV	S.SS(R5),R5	;IS THERE AN SST VECTOR?
   3090	013644	001403 				BEQ	10$		;NO -- CRASH
   3091	013646					MFPS	T.RAPT(R5),R5	;FIND THE ADDRESS
	013646	016505 	000014 			MOV	T.RAPT(R5),R5
   3092	013652	001336 				BNE	.SSTET		;NONE -- CRASH
   3093	013654	012737 	000014 	001120'	10$:	MOV	#TN.TRP,TRPASV	;SET TRAP TYPE
   3094	013662	000743 				BR	CMNABT		;AND GO TO COMMON ABORT
   3095					;
   3096					;
   3097	013664	162716 	000002 		20$:	SUB	#2,@SP		;FIND THE TRAP VALUE
   3098	013670	113600 				MOVB	@(SP)+,R0
   3099	013672	100006 				BPL	DRXCOM		;BRANCH IF THE DIRECTIVE SUCCEEDED
   3100	013674	013706 	001116'		DEXCOM:	MOV	EMTSTK,SP	;RESTORE STACK FOR REGISTER SAVE
   3101	013700	052766 	000001 	000016 		BIS	#1,EM.DRO-2(SP)	;SET CC-C -2(ISSUING TASK'S PS)
   3102	013706	000405 				BR	DRXRR		;---
   3103					;
   3104	013710				.DR.NS::			;RETURN NO STATUS
   3105	013710	013706 	001116'		DRXCOM:	MOV	EMTSTK,SP	;RESTORE STACK FOR REGISTER SAVE
   3106	013714	042766 	000001 	000016 		BIC	#1,EM.DRO-2(SP)	;CLEAR CC-C -2(ISSUING TASK'S PS)
   3107	013722				DRXRR:				;-----
   3108	013722	010037 	000046 			MOV	R0,$DSW		;SAVE THE DSW
   3109	013726	012600 				MOV	(SP)+,R0	;POP (RESORE) R0
   3110	013730	012601 				MOV	(SP)+,R1	;POP (RESTORE) R1
   3111	013732	012602 				MOV	(SP)+,R2	;POP (RESTORE) R2
   3112	013734	012603 				MOV	(SP)+,R3	;POP (RESTORE) R3
   3114	013736	016604 	000010 			MOV	10(SP),R4	;FIND DPB OR DPB ADDRESS
   3119	013742	106004 				RORB	R4		;ADDRESS OR DPB?
   3120	013744	103402 				BCS	10$		;DPB -- FOUND SIZE REQ'D
   3121	013746	012704 	000400 			MOV	#400,R4		;SET UP TO POP ONLY 1 WORD
   3122	013752	105004 			10$:	CLRB	R4
   3123	013754	000304 				SWAB	R4		;PUT SIZE IN LOW ORDER
   3124	013756	006304 				ASL	R4		;MAKE +2 FOR COUNT
   3126	013760	062704 	000020 			ADD	#EM.DRO,R4	;POINT TO USER STACK LOCATION
   3127	013764	063704 	001116'			ADD	EMTSTK,R4
   3133	013770	016644 	000006 			MOV	6(SP),-(R4)	;RESET STACK
   3134	013774	016644 	000004 			MOV	4(SP),-(R4)
   3135	014000	016644 	000002 			MOV	2(SP),-(R4)
   3136	014004	011644 				MOV	@SP,-(R4)
   3137	014006	010406 				MOV	R4,SP		;SET STACK POINTER
   3138					;
   3139					; A DIRECTIVE HAS BEEN PROCESSED -- IF A TASK IS CURRENT (THE ISSUING
   3140					; TASK) ITS PS, PC, R5, & R4 ARE ON THE KERNEL STACK, AND '.CRTSK' POINTS
   3141					; TO THE ATL NODE OF THAT TASK.  IF A TASK IS NOT CURRENT (ISSUING
   3142					; TASK EXIT'ED), '.CRTSK' IS SET TO ZERO.
   3143					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 67-4
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   3144					; R0 CONTAINS THE ADDRESS OF THE NEXT ATL NODE TO BE EXAMINED.
   3145					;
   3146	014010	032766 	000340 	000006 		BIT	#PRI7,+6(SP)	;IS PROCESSOR PRIORITY OF DIRECTIVE ISSUING TASK ZERO?
   3147	014016	001403 				BEQ	20$		;YES -- SCAN ATL FROM ENTRY POINTED TO BY R5.
   3148	014020	012604 				MOV	(SP)+,R4	;NO -- TASK SWITCHING HAS BEEN INHIBITED BY ISSUING TASK,
   3149	014022	012605 				MOV	(SP)+,R5	;RESTORE R4, R5, PC, & PS, AND RETURN TO ISSUING TASK.
   3150	014024	000002 				RTI			;(PRIORITY IS ZEROED IF TASK EXIT'ED.)
   3151					;
   3152					; TRANSFER CONTROL TO THE SCAN ATL ROUTINE AT PRIORITY TWO,
   3153					; PREVIOUS MODE: USER, CURRENT MODE: KERNEL, AND CC'S ZERO.
   3154					;
   3155	014026	012746 	034100 		20$:	MOV	#034100+STXAS,-(SP)
   3156	014032	012746 	014054'			MOV	#ASXE2,-(SP)
   3157	014036	000002 				RTI
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 68
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3159						.SBTTL	EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST
   3160					;+
   3161					; THE ACTIVE TASK LIST (ATL) IS A PRIORITY ORDERED LIST OF TASKS THAT
   3162					; HAVE BEEN ASSIGNED MEMORY SPACE FOR EXECUTION, AND HAVE NOT EXIT'ED.
   3163					;
   3164					; THE SYSTEM IS DRIVEN BY SCANNING THE ATL FROM THE TOP (HIGH PRIORITY)
   3165					; WHETHER A TASK IS CAPABLE OF EXECUTION IS INDICATED BY THE 'A.TS'TH
   3166					; BYTE OF EACH ATL NODE (ENTRY).
   3167					;
   3168					; THE ATL IS SCANNED DOWNWARD FROM A TASK WHENEVER THAT TASK VOLUNTARILY
   3169					; STOPS EXECUTION (VIZ., WAITFOR, EXIT) AND A SIGNIFICANT
   3170					; EVENT HAS NOT BEEN DECLARED.
   3171					;
   3172					; SIGNIFICANT EVENTS ARE DECLARED BY TASKS (PRI=0) VIA SYSTEM DIRECTIVES,
   3173					; AND BY INTERRUPT SERVICE ROUTINES (PRI 4,5,6,7) VIA SYSTEM SUBROUTINES.
   3174					; A DECLARATION OF A SIGNIFICANT EVENT IS INDICATED BY THE SOFTWARE FLAG
   3175					; (BYTE) '.SERFG+0'.
   3176					;
   3177					; CONTROL IS TRANSFERRED TO THE ATL SCAN ROUTINE UNDER TWO CONDITIONS:
   3178					; (1) WHEN CONTROL IS RETURNED TO A TASK (PRI 0) VIA THE "COMMON RETURN TO
   3179					; INTERRUPTED PROGRAM" AND A SIGNIFICANT EVENT HAS BEEN DECLARED (NON-ZERO
   3180					; '.SERFG+0'), AND (2) WHEN CONTROL IS RETURNED FROM A DIRECTIVE SERVICE
   3181					; ROUTINE.
   3182					;
   3183					; THERE ARE TWO ENTRY POINTS TO THE ATL SCAN ROUTINE:
   3184					; ASXE1 -- TO SCAN THE ATL DOWNWARD FROM THE TOP.  I.E., TO EFFECT A
   3185					; DECLARATION OF A SIGNIFICANT EVENT.
   3186					;
   3187					; CONTROL IS TRANSFERRED TO 'ASXE1' FROM THE 'COMMON RETURN TO INTERRUPTED
   3188					; PROGRAM', OR FROM ATL SCAN TASK STATUS SERVICE, WHENEVER A SIGNIFICANT
   3189					; EVENT DECLARATION IS TO BE EFFECTED.
   3190					;
   3191					; ASXE2 -- TO SERVICE THE STATUS OF THE TASK WHOSE ATL NODE ADDRESS
   3192					; IS IN R5, AND THEN TO EITHER: (1) RETURN CONTROL TO THAT TASK,
   3193					; (2) SCAN THE ATL FROM THAT TASK THRU LOWER PRIORITY TASKS, OR
   3194					; (3) TO SCAN THE ATL FROM THE TOP.
   3195					;
   3196					; CONTROL IS TRANSFERRED TO 'ASXE2' FROM THE COMMON EXIT FOR DIRECTIVE
   3197					; (EMT 375) SERVICE CODE.
   3198					;
   3199					; IF A SIGNIFICANT EVENT HAS BEEN DECLARED (EITHER COINCIDENTLY OR AS
   3200					; A RESULT OF DIRECTIVE EXECUTION) CONTROL IS TRANSFERRED TO 'ASXE1'.
   3201					; HOWEVER, THE DECISION TO TRANSFER TO 'ASXE1' IS NOT MADE UNTIL THE
   3202					; "TASK STATUS SERVICE" FOR THE DIRECTIVE ISSUING TASK HAS BEEN PERFORMED.
   3203					;
   3204					; WHENEVER CONTROL IS TRANSFERRED TO THE ATL SCAN ROUTINE AND A TASK IS
   3205					; CURRENT, THE PS, PC, R5, & R4 OF THE CURRENT TASK  HAVE BEEN PUSHED
   3206					; ONTO THE  STACK.
   3207					;-
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 69
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3209	014040	142737 	000001 	001014'	ASXE1::	BICB	#EV.SE,.SERFG+0	;CLEAR SIGNIFICANT EVENT FLAG, AND SET
   3210	014046	012705 	007136'			MOV	#.ATLLH,R5	;R5 TO THE ADDRESS OF THE FIRST ATL NODE.
   3211									;DISPATCH PER TASK STATUS
   3212					;
   3213					; SCAN LOOP -- AFTER PROCESSING AN ATL ENTRY, CONTROL IS TRANSFERRED EITHER:
   3214					; (1) TO 'ASXSCN' TO PROCESS THE NEXT ATL NODE, OR (2) TO 'ASXTE' TO
   3215					; TERMINATE THE ATL SCAN (A RUNABLE TASK HAS BEEN FOUND).
   3216					;
   3217					; CONTROL IS TRANSFERRED HERE FROM A ATL SCAN SERVICE ROUTINE, WITH THE
   3218					;  STACK AND R5 UNCHANGED FROM THE DISPATCH TO THAT SERVICE ROUTINE.
   3219					;
   3220	014052	011505 			ASXSCN:	MOV	@R5,R5		;ADVANCE R5 TO THE NEXT ATL NODE,
   3221	014054	116504 	000014 		ASXE2:	MOVB	A.TS(R5),R4	;DISPATCH PER ACTIVE TASK STATUS, WITH
   3222	014060	000174 	014062'			JMP	@ASXDT-02(R4)	;R0 = ATL NODE ADR & R4 = STATUS.
   3223					;
   3224	014064				ASXDT:		;STATUS DEFINITIONS & DISPATCH ADDRESS TABLE.
   3225							;
   3226							;THE DISPATCH ROUTINE AT 'ASXE2' EXPECTS THE DISPATCH TABLE
   3227							;TO BEGIN WITH STATUS "02" AND INCREASE SEQUENTIALLY BY TWOS.
   3228							;
   3229					;
   3230		000002 			TS.LRQ==02	;TASK LOAD REQEUST QUEUED
   3231	014064	014262'				ASXLRQ
   3232		000004 			TS.TKN==04	;TASK WAITING FOR TERMINATION NOTICE
   3233	014066	014052'				ASXSCN
   3234		000006 			TS.LRF==06	;TASK LOAD REQUEST FAILED
   3235	014070	014224'				ASXLRF
   3236		000010 			TS.RUN==10	;** TASK IS RUNNING
   3237	014072	014672'				ASXTE
   3238		000012 			TS.SUS==12	;** TASK IS SUSPENDED
   3239	014074	014052'				ASXSCN
   3240		000014 			TS.WF0==14	;** TASK WAITING FOR AN EVENT FLAG 1-14
   3241							;** ('TS.WF0'-'TS.WS4' ARE EXPECTED IN SEQUENCE
   3242							;** BY THE WAITFOR DIRECTIVES.)
   3243	014076	014112'				ASXWR0
   3244		000016 			TS.WF1==16	;** TASK WAITING FOR AN EVENT FLAG 17-32
   3245	014100	014122'				ASXWR1
   3246		000020 			TS.WF2==20	;** TASK WAITING FOR AN EVENT FLAG 33-48
   3247	014102	014132'				ASXWR2
   3248		000022 			TS.WF3==22	;** TASK WAITING FOR AN EVENT FLAG 49-64
   3249	014104	014142'				ASXWR3
   3250		000024 			TS.WF4==24	;** TASK WAITING FOR AN EVENT FLAG 1-64
   3251	014106	014152'				ASXWR4
   3252		000026 			TS.EXT==26	;TASK EXITED
   3253	014110	014400'				ASXEXT
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 70
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3255					;
   3256					; SERVICE FOR "WAITFOR" TASK STATUSES
   3257					;
   3258					; A TASK (THE TASK WHOSE ATL NODE IS POINTED TO BY R5) HAS ISSUED A
   3259					; WAITFOR DIRECTIVE.  IF ANY INDICATED EVENT FLAG IS SET, CHANGE TASK'S
   3260					; TO "RUNNING", AND TERMINATE ATL SCAN TO RUN THE TASK.
   3261					;
   3262					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE ZERO (FLAGS 1-16)
   3263					;
   3264	014112	036565 	000024 	000020 	ASXWR0:	BIT	A.FM+0(R5),A.EF+0(R5)
   3265	014120	000433 				BR	ASXCMN
   3266					;
   3267					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE ONE (FLAGS 17-32)
   3268					;
   3269	014122	036565 	000024 	000022 	ASXWR1:	BIT	A.FM+0(R5),A.EF+2(R5)
   3270	014130	000427 				BR	ASXCMN
   3271					;
   3272					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE TWO (FLAGS 33-48)
   3273					;
   3274	014132	036537 	000024 	001010'	ASXWR2:	BIT	A.FM+0(R5),.COMEF+0
   3275	014140	000423 				BR	ASXCMN
   3276					;
   3277					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE THREE (FLAGS 49-64)
   3278					;
   3279	014142	036537 	000024 	001012'	ASXWR3:	BIT	A.FM+0(R5),.COMEF+2
   3280	014150	000417 				BR	ASXCMN
   3281					;
   3282					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE FOUR (FLAGS 1-64)
   3283					;
   3284	014152	036565 	000024 	000020 	ASXWR4:	BIT	A.FM+0(R5),A.EF+0(R5)
   3285	014160	001014 				BNE	WFXSET
   3286	014162	036565 	000026 	000022 		BIT	A.FM+2(R5),A.EF+2(R5)
   3287	014170	001010 				BNE	WFXSET
   3288	014172	036537 	000030 	001010'		BIT	A.FM+4(R5),.COMEF+0
   3289	014200	001004 				BNE	WFXSET
   3290	014202	036537 	000032 	001012'		BIT	A.FM+6(R5),.COMEF+2
   3291	014210	001720 			ASXCMN:	BEQ	ASXSCN
   3292	014212				WFXSET:
   3293	014212	112765 	000010 	000014 		MOVB	#TS.RUN,A.TS(R5)
   3294	014220	000137 	014672'			JMP	ASXTE
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 71
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3296					;
   3297					; SERVICE FOR TASK STATUS: LOAD REQUEST FAILED
   3298					;
   3299	014224	012765 	000040 	000024 	ASXLRF:	MOV	#TN.LRF,A.FM+0(R5) ;SET LOAD REQUEST FAILURE
   3300	014232	112765 	000004 	000014 		MOVB	#TS.TKN,A.TS(R5) ;SET TERMINATION NOTICE REQUESTED
   3301	014240	005237 	001124'			INC	.TKTN		;REQUEST TASK TERMINATION
   3302	014244	026527 	000006 	010022'		CMP	A.PD(R5),#F11TPD ;F11  TPD PARTITION?
   3303	014252	001300 				BNE	ASXE2		;NO -- CONTINUE
   3304	014254					.CRASH	LRF		;LOAD REQUEST FAILURE
	014254	000004 				IOT
	014256	   114 	   122 	   106 		.ASCIZ	/LRF/
	014261	   000
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 72
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3306					;
   3307					; SERVICE FOR TASK REQUEST QUEUE'D SERVICE
   3308					;
   3309	014262	006265 	000020 		ASXLRQ:	ASR	A.EF+0(R5)	;CHECK FOR REQUEST TO LOAD DONE
   3310	014266	103271 				BCC	ASXSCN		;NO -- CONTINUE TO WAIT
   3311	014270	105765 	000030 			TSTB	A.FM+4(R5)	;DID THE I/O SUCCEED?
   3312	014274	100753 				BMI	ASXLRF		;NO -- COMPLAIN
   3313	014276	112765 	000010 	000014 		MOVB	#TS.RUN,A.TS(R5) ;SET THE TASK STATUS TO RUNNING
   3314	014304	016504 	000012 			MOV	A.HA(R5),R4	;FIND THE HEADER ADDRESS
   3321	014310	016446 	000106 			MOV	H.TKVA(R4),-(SP) ;SAVE THE SST ADDRESS
   3322	014314	016446 	000076 			MOV	H.IPC(R4),-(SP)	;SAVE INITIAL PC
   3323	014320	016446 	000074 			MOV	H.IPS(R4),-(SP)	;SAVE INITIAL PS
   3324	014324	016446 	000130 			MOV	H.LUT(R4),-(SP)	;FIND OVERLAY LUN
   3325	014330	006316 				ASL	@SP		;MAKE OFFSET
   3326	014332	006316 				ASL	@SP
   3327	014334	062716 	000126 			ADD	#H.LUT-2,@SP	;POINT TO START OF LUT
   3328	014340	060416 				ADD	R4,@SP		;POINT TO CORRECT LUT
   3329	014342	016536 	000022 			MOV	A.EF+2(R5),@(SP)+ ;SET LUT
   3330	014346	016404 	000100 			MOV	H.ISP(R4),R4	;FIND INITIAL STACK
   3331	014352	012644 				MOV	(SP)+,-(R4)	;STORE THE PS
   3332	014354	012644 				MOV	(SP)+,-(R4)	;STORE THE PC
   3333	014356	162704 	000014 			SUB	#14,R4		;INCLUDE REGISTER SAVE
   3334	014362	010465 	000004 			MOV	R4,A.SP(R5)	;SET STACK VALUE
   3335	014366	016504 	000016 			MOV	A.TD(R5),R4	;FIND THE STD ADDRESS
   3336	014372	012664 	000030 			MOV	(SP)+,S.SS(R4)	;SET SST ADDRESS
   3337	014376	000535 				BR	ASXTE		;GO TO START THE TASK
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 73
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3339					;
   3340					; SERVICE FOR TASK STATUS: EXIT
   3341					;
   3342	014400	010446 			ASXEXT:	MOV	R4,-(SP)
   3343	014402	010346 				MOV	R3,-(SP)
   3344	014404	010246 				MOV	R2,-(SP)
   3345	014406	010146 				MOV	R1,-(SP)
   3346	014410	010046 				MOV	R0,-(SP)
   3347	014412	016502 	000016 			MOV	A.TD(R5),R2	;FIND THE STD ADDRESS
   3348	014416	016500 	000006 			MOV	A.PD(R5),R0	;FIND THE TPD ADDRESS
   3349	014422	042762 	000001 	000006 		BIC	#SF.TA,S.FW(R2)	;CLEAR ACTIVE FLAG IN STD
   3350	014430				10$:
   3351	014430	032762 	000002 	000006 		BIT	#SF.FX,S.FW(R2)	;CHECK TO SEE IF TASK FIXED
   3352	014436	001003 				BNE	20$		;YES -- DON'T FREE CORE
   3353					;
   3354					;
   3355					; FREE MEMORY (AND POSSIBLY START TASK WAITING FOR MEMORY) AND RETURN
   3356					; ATL NODE TO POOL.
   3357					;
   3358	014440	042760 	000002 	000010 		BIC	#TF.OU,T.FW(R0) ;RELEASE PARTITION
   3359					;
   3360					;
   3361	014446	010504 			20$:	MOV	R5,R4		;POINT R5 TO THE NEXT LOWEST PRIORITY TASK'S
   3362	014450	010501 				MOV	R5,R1		;ATL NODE, DELETE NODE FROM ATL, AND RETURN
   3363	014452	011505 				MOV	@R5,R5		;IT TO THE POOL.
   3364	014454					CALL	..NDEL
	014454	004737 	045320'			JSR	PC,..NDEL
   3365	014460	012704 	001432'			MOV	#.POLLH,R4	;RETURN THE NODE TO THE POOL
   3366	014464					CALL	..NADD
	014464	004737 	045434'			JSR	PC,..NADD
   3367	014470	032762 	000004 	000006 		BIT	#SF.EX,S.FW(R2)	;HAS THE TASK BEEN REQUESTED TO EXIT?
   3368	014476	001426 				BEQ	50$		;NO -- JUST CONTINUE
   3369	014500	010046 				MOV	R0,-(SP)	;SAVE R0 (TPD ADDRESS)
   3370	014502	013700 	006364'			MOV	.STDTA,R0	;FIND THE HEAD OF THE STD LIST
   3371	014506	013703 	006370'			MOV	.STDTZ,R3	;FIND THE SIZE OF THE LIST
   3372	014512	162737 	000002 	006370'		SUB	#2,.STDTZ	;RESET THE SIZE FOR NOW IT IS SMALLER
   3373	014520	006203 				ASR	R3		;DIVIDE BY 2
   3374	014522	005203 				INC	R3		;MAKE 1 LARGER BECAUSE IT IS 2*N-2
   3375	014524	020210 			30$:	CMP	R2,@R0		;THE CORRECT ENTRY?
   3376	014526	001403 				BEQ	40$		;YES -- FOUND IT
   3377	014530	005720 				TST	(R0)+		;NO -- CONTINUE SEARCH
   3378	014532	005303 				DEC	R3		;CONTINUE SCAN
   3379	014534	000773 				BR	30$
   3380					;
   3381	014536	016020 	000002 		40$:	MOV	2(R0),(R0)+	;MOVE ENTRIES BACK
   3382	014542	077303 				SOB	R3,40$		;UNTIL DONE
   3383	014544	010201 				MOV	R2,R1		;RETURN NODE TO POOL
   3384									;NOTE -- R4 STILL POINTS TO .POLLH
   3385									;FROM ABOVE RETURN OF ATL!!!!!
   3386	014546					CALL	..NADD		;RETURN NODE
	014546	004737 	045434'			JSR	PC,..NADD
   3387	014552	012600 				MOV	(SP)+,R0	;RESTORE R0
   3388	014554	032760 	000002 	000010 	50$:	BIT	#TF.OU,T.FW(R0)	;CHECK FOR PARTITION OCCUPIED
   3389	014562	001025 				BNE	60$		;YES -- DON'T TRY TO START TASK
   3390	014564	010004 				MOV	R0,R4		;SET UP TO PICL A NODE FROM MRL
   3391	014566	062704 	000014 			ADD	#T.RF,R4	;POINT TO MRL
   3392	014572					CALL	..PICK		;PICK NODE
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 73-1
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

	014572	004737 	045476'			JSR	PC,..PICK
   3393	014576	103417 				BCS	60$		;NONE FOUND -- DON'T ATTEMPT TO START
   3394	014600	010401 				MOV	R4,R1		;SAVE THE NODE ADDRESS FOUND
   3395	014602	022424 				CMP	(R4)+,(R4)+	;POINT TO THE ENTRIES IN THE NDOE
   3396	014604	012402 				MOV	(R4)+,R2	;SET UP TO CALL .REQS
   3397	014606	012403 				MOV	(R4)+,R3
   3398	014610	012446 				MOV	(R4)+,-(SP)	;PUSH PRI
   3399	014612	012704 	001432'			MOV	#.POLLH,R4	;RETURN THE NODE TO THE POOL
   3400	014616					CALL	..NADD		;RETURN NODE
	014616	004737 	045434'			JSR	PC,..NADD
   3401	014622	012604 				MOV	(SP)+,R4	;GET THE PRIORITY
   3402	014624	042762 	000001 	000006 		BIC	#SF.TA,S.FW(R2) ;CLEAR TASK ACTIVE FLAGS
   3403	014632					CALL	.REQS		;REQUEST THE TASK
	014632	004737 	015276'			JSR	PC,.REQS
   3404					;
   3405	014636	012600 			60$:	MOV	(SP)+,R0	;POP (RESTORE) R0,R2,R1
   3406	014640	012601 				MOV	(SP)+,R1
   3407	014642	012602 				MOV	(SP)+,R2
   3408	014644	012603 				MOV	(SP)+,R3
   3409	014646	012604 				MOV	(SP)+,R4
   3410					;
   3411					; IF EXITING TASK IS NOT "CURRENT", ITS CONTEXT IS STORED IN ITS STACK.
   3412					; IF EXITING TASK IS "CURRENT", ITS PS, PC, R5, & R4 ARE STORED ON THE
   3413					;  STACK AND THE REMAINDER OF ITS CONTEXT IS LOADED.
   3414					;
   3415					; R1 CONTAINS THE ADDRESS OF THE ATL NODE (WHICH HAS BEEN RETURNED TO THE
   3416					; POOL) OF THE EXITING TASK.
   3417					;
   3418	014650	020537 	001006'			CMP	R5,.CRTSK	;IF EXITING TASK IS "CURRENT", REMOVE (POP)
   3419	014654	001004 				BNE	70$		;ITS R4, R5, PC, & PS FROM THE  STACK
   3420	014656	062706 	000010 			ADD	#8.,SP		;(POP)
   3421	014662	005037 	001006'			CLR	.CRTSK
   3422	014666				70$:
   3423	014666	000137 	014054'			JMP	ASXE2		;DISPATCH PER STATUS OF TASK POINTED TO BY R5.
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 74
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3425					;
   3426					; TERMINATION OF ATL SCAN -- A TASK THAT CAN BE RUN HAS BEEN FOUND
   3427					;
   3428					; CONTROL IS TRANSFERRED HERE WITH THE PS, PC, R5, & R4 OF THE CURRENT
   3429					; TASK PUSHED ONTO THE  STACK.
   3430					;
   3431					; CONTROL IS TRANSFERRED HERE EITHER BY DIRECT DISPATCH, OR FROM AN ATL
   3432					; SCAN SERVICE ROUTINE.  IN EITHER CASE, THE  STACK AND R5 ARE
   3433					; UNCHANGED FROM THE LAST ATL SCAN DISPATCH.
   3434	014672	020537 	001006'		ASXTE:	CMP	R5,.CRTSK	;IS CONTROL RETURNING TO CURRENT TASK?
   3435	014676	001461 				BEQ	CSDONE		;YES -- RESTORE R5, R4, PS, & PC FROM STACK
   3436	014700	132737 	000001 	001014'		BITB	#EV.SE,.SERFG+0	;NO -- HAS A SIGNIFICANT EVENT OCCURRED?
   3437	014706	001402 				BEQ	10$
   3438	014710	000137 	014040'			JMP	ASXE1		;YES -- RESTART ATL SCAN
   3439
   3440	014714	112737 	000340 	177776 	10$:	MOVB	#340,@#PS	;INHIBIT INTERRUPTS WHILE CONTEXT SWITCHING
   3441	014722	013704 	001006'			MOV	.CRTSK,R4	;NO -- IS THERE A CURRENT TASK?
   3442	014726	001420 				BEQ	40$		;NO -- (CURRENT TASK EXITED) NO CONTEXT TO SAVE
   3443									;YES -- SAVE CONTEXT OF OLD CURRENT TASK, AND
   3444									;LOAD CONTEXT OF NEW CURRENT TASK.
   3445
   3447	014730	010346 				MOV	R3,-(SP)	;PUSH R3
   3448	014732	010246 				MOV	R2,-(SP)	;PUSH R2
   3449	014734	010146 				MOV	R1,-(SP)	;PUSH R1
   3450	014736	010046 				MOV	R0,-(SP)	;PUSH R0
   3451	014740	016400 	000012 			MOV	A.HA(R4),R0	;FIND THE HEADER ADDRESS
   3458	014744	062700 	000046 			ADD	#H.DSW,R0	;POINT TO DSW
   3459	014750	012701 	000046 			MOV	#$DSW,R1	;POINT TO DSW
   3460	014754	012120 				MOV	(R1)+,(R0)+	;SAVE THE CONTEXT OF LOW CORE
   3461	014756	012120 				MOV	(R1)+,(R0)+
   3462	014760	012120 				MOV	(R1)+,(R0)+
   3463	014762	011110 				MOV	@R1,@R0
   3464	014764	010664 	000004 			MOV	SP,A.SP(R4)	;SAVE OLD PS
   3465	014770	016506 	000004 		40$:	MOV	A.SP(R5),SP	;SET UP NEW STACK
   3466	014774	016500 	000012 			MOV	A.HA(R5),R0	;RESTORE CONTEXT
   3473	015000	062700 	000054 			ADD	#H.DSW+6,R0	;POINT TO DSW SAVE
   3474	015004	012701 	000054 			MOV	#$DSW+6,R1
   3475	015010	011011 				MOV	@R0,@R1
   3476	015012	014041 				MOV	-(R0),-(R1)
   3477	015014	014041 				MOV	-(R0),-(R1)
   3478	015016	014041 				MOV	-(R0),-(R1)
   3479	015020	012600 				MOV	(SP)+,R0	;RESTORE REGISTERS FROM THE IS TASK
   3480	015022	012601 				MOV	(SP)+,R1
   3481	015024	012602 				MOV	(SP)+,R2
   3482	015026	012603 				MOV	(SP)+,R3
   3484
   3521
   3522	015030	010537 	001006'			MOV	R5,.CRTSK	;SET NEW '.CRTSK' (ATL NODE ADR OF CURRENT TASK).
   3523	015034	142737 	000300 	177776 		BICB	#300,@#PS	;LOWER TO PRI 1 AFTER CONTEXT SWITCH
   3524
   3525	015042				CSDONE:		;CONTEXT SWITCH (IF REQUIRED) IS DONE.
   3527	015042	052766 	004000 	000006 		BIS	#4000,6(SP)	;SET REG SET 1
   3528	015050	042766 	170000 	000006 		BIC	#170000,6(SP)	;CLEAR OFF MODE BITS
   3530					;
   3531					; A TASK'S PS, PC, R5, & R4 ARE ON THE  STACK, AND THE TASK'S ATL
   3532					; NODE ADDRESS IS IN R5.  I.E., CONDITIONS ARE CORRECT FOR AN ATL SCAN
   3533					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 74-1
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3534					;
   3535					; IF THE TASK'S STATUS IS "RUNNING", CONTROL IS RETURNED TO THE TASK
   3536					; (UNLESS A SIGNIFICANT EVENT HAS BEEN DECLARED, IN WHICH CASE, CONTROL
   3537					; WILL BE RETURNED LATER).
   3538					;
   3539					;
   3540	015056	012604 				MOV	(SP)+,R4	;POP (RESTORE) R4
   3541	015060	012605 				MOV	(SP)+,R5	;POP (RESTORE) R5
   3542					;
   3543					; TRANSFER CONTROL TO TASK VIA COMMON "RETURN TO INTERRUPTED PROGRAM"
   3544					; ROUTINE (CLOCK AND/OR EVENT RECOGNITION MAY CAUSE ACTUAL TRANSFER TO
   3545					; OCCUR LATER IN REAL TIME).
   3546					;
   3547					;	BR	..INTX
   3548						;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 75
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3550						.SBTTL	EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM
   3551					;
   3552					; MOST INTERRUPT SERVICE ROUTINES ARE CONTAINED WITHIN I/O HANDLER TASKS
   3553					; CONTROL IS TRANSFERRED TO A TASK CONTAINED INTERRUPT SERVICE ROUTINE,
   3554					; WHEN THE INTERRUPT SERVICE ROUTINE WAS "CONNECTED" TO THE INTERRUPT.
   3555					;
   3556					; CONTROL IS TRANSFERRED TO A TASK CONTAINED INTERRUPT SERVICE ROUTINE
   3557					; WITH THE INTERRUPTED PROGRAM'S PS & PC,
   3558					;
   3559					; ALL TASK CONTAINED INTERRUPT SERVICE ROUTINES EXIT VIA "JMP ..INTX" WITH
   3560					; PS & PC OF THE INTERRUPTED PROGRAM
   3561					;
   3562					; THE '..INTX' ROUTINE  EFFECTS A RETURN OF CONTROL
   3563					; TO THE INTERRUPTED PROGRAM.
   3564					;
   3565					; WITH THE PS & PC OF THE INTERRUPTED PROGRAM ON THE  STACK.
   3566					;
   3567					; THE 'EXINTX' ROUTINE EFFECTS A RETURN TO THE INTERRUPTED PROGRAM.
   3568					;
   3569					; WHENEVER CONTROL IS RETURNED TO OTHER THAN A TASK (NON-ZERO PRI),
   3570					; CONTROL IS TRANSFERRED DIRECTLY TO THE INTERRUPTED PROGRAM.  HOWEVER,
   3571					; WHEN CONTROL IS BEING RETURNED TO A TASK (PRI=0), THE "SYSTEM
   3572					; EVENT RECOGNITION FLAG" IN THE SYSTEM COMMUNICANTIONS AREA (SCOM) IS
   3573					; EXAMINED, AND IF FOUND NON-ZERO, THE INDICATED EVENTS ARE RECOGNIZED
   3574					; BEFORE CONTROL IS RETURNED TO THE INTERRUPTED TASK.
   3575					;
   3576
   3577	015062				..INTX::			;NORMAL ISR EXIT
   3578	015062	052737 	000340 	177776 		BIS	#000340,@#PS	;;;INHIBIT INTERRUPTS (RAISE PRIORITY TO 7)
   3579	015070	032766 	000340 	000002 		BIT	#000340,+2(SP)	;;;IS CONTROL RETURNING TO A TASK (PRI=0)?
   3580	015076	001010 				BNE	CRTNXA		;;;YES -- EXAMINE SYSTEM EVENT RECOGNITION FLAG
   3581
   3582	015100	005737 	001026'			TST	.PFAIL		;;;POWER FAIL SERVICE?
   3583	015104	001402 				BEQ	CRTNX1		;;;NO -- JUST RETURN
   3584	015106	000137 	020164'			JMP	.PWRDN		;;;YES -- POWER DOWN
   3585
   3586	015112	005737 	001014'		CRTNX1:	TST	.SERFG		;;;** ANY UNRECOGNIZED "SYSTEM EVENTS"?
   3587	015116	001001 				BNE	CRTNX3		;;;** YES -- TRANSFER CONTROL TO APPROPRIATE
   3588									;;;** EVENT RECOGNITON ROUTINE.
   3589	015120				CRTNXA:
   3590					;	CMP	.DBRTT,SP	;;;** ## NO -- IS CONTROL RETURNING FROM SYSTEM
   3591					;	BNE	10$		;;;** ## TRACE DEBUGGING ROUTINE?
   3592					;	CLR	.DBRTT		;;;** ## YES -- RETURN VIA "RTT" INSTEAD OF "RTI"
   3593					;	RTT			;;;** ##
   3594	015120				10$:				;;;** ##
   3595	015120	000002 			CRTNX2:	RTI			;;;** NO -- RETURN CONTROL TO TASK
   3596
   3597									;** A RACE CONDITION EXISTS WHENEVER A
   3598									;POWER FAILURE OCCURS WHILE EXECUTING
   3599									;BETWEEN 'CRTNX1' AND 'CRTNX2'.  TO
   3600									;AVOID THIS CONDITION, THE POWER FAIL
   3601									;TRAP SERVICE ROUTINE SETS THE PC TO
   3602									;'CRTNX1' WHENEVER IT INTERRUPTS EXECUTION
   3603									;IN THE RANGE 'CRTNX1' THRU 'CRTNX2'.
   3604					;
   3605					; A SYSTEM EVENT IS TO BE RECOGNIZED (NON-ZERO '.SERFG'), CONTROL IS
   3606					; TRANSFERRED TO SERVICE ROUTINE PER '.SERFG'
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 75-1
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3607					;   PRI=2, CONDITION CODES CLEARED, AND THE
   3608					; INTERRUPTED TASK'S PS, PC, R5 & R4 PUSHED ONTO THE  STACK.
   3609					;
   3610	015122	010546 			CRTNX3:	MOV	R5,-(SP)	;;;PUSH R5
   3611	015124	010446 				MOV	R4,-(SP)	;;;PUSH R4
   3612
   3613	015126	012746 	034100 			MOV	#034100,-(SP)
   3614	015132	105737 	001015'			TSTB	.SERFG+1	;;;UN-RECOGNIZED CLOCK TICK(S)?
   3615	015136	001403 				BEQ	10$		;;;
   3616						 			;;;YES -- RECOGNIZE CLOCK TICKS (NORMALLY
   3617	015140	012746 	025012'			MOV	#.TICK,-(SP)	;;;ONLY ONE)
   3618	015144	000002 				RTI			;;;
   3619	015146	132737 	000201 	001014'	10$:	BITB	#EV.SE!EV.PF,.SERFG+0	;;;NO -- SIGNIFICANT EVENT RECOGNITION?
   3620	015154	100437 				BMI	60$			;;;OR POWER FAIL
   3621	015156	001403 				BEQ	30$		;;;
   3622						 			;;;YES -- SCAN ATL FROM THE TOP
   3623	015160	012746 	014040'		20$:	MOV	#ASXE1,-(SP)	;;;
   3624	015164	000002 				RTI			;;;
   3625
   3626	015166	132737 	000002 	001014'	30$:	BITB	#EV.AS,.SERFG+0	;;;AST?
   3627	015174	001435 				BEQ	70$		;;;YIPES -- GOOFED AND SYSTEM BROKEN
   3628	015176	010316 				MOV	R3,@SP		;;;SAVE CONTEXT
   3629	015200	010246 				MOV	R2,-(SP)
   3630	015202	010146 				MOV	R1,-(SP)
   3631	015204	010046 				MOV	R0,-(SP)
   3635	015206	012746 	004000 			MOV	#004000,-(SP)
   3637	015212	013746 	001050'			MOV	.CKASS,-(SP)	;;;SET AST ADDRESS
   3638	015216	001411 				BEQ	50$		;;;NOT THIS TYPE
   3639	015220	005037 	001050'			CLR	.CKASS		;;;CLEAR THIS FOR NEXT TIME
   3640	015224	005737 	001052'			TST	.PFASS		;;;POWER FAIL ALSO?
   3641	015230	001334 				BNE	CRTNX3		;;;YES -- BETTER DO IT TOO
   3642	015232	142737 	000002 	001014'	40$:	BICB	#EV.AS,.SERFG+0	;;;CLEAR THIS FLAG
   3643	015240	000002 				RTI			;;;RETURN TO USER
   3644
   3645	015242	013716 	001052'		50$:	MOV	.PFASS,@SP	;;;SET UP POWER FAIL AST
   3646	015246	005037 	001052'			CLR	.PFASS		;;;CLEAR POWER FAIL AST ADDRESS
   3647	015252	000767 				BR	40$		;;;AND RETURN TO USER
   3648
   3649	015254	142737 	000200 	001014'	60$:	BICB	#EV.PF,.SERFG+0	;;;CLEAR POWER FAIL FLAG
   3650	015262					CALL	.PFRST		;;;POWER FAIL RESTART
	015262	004737 	020522'			JSR	PC,.PFRST
   3651	015266	000734 				BR	20$		;;;RETURN
   3652
   3653	015270				70$:	.CRASH	IAS		;;;CRASH SYSTEM UNKNOWN SIG EVENT
	015270	000004 				IOT
	015272	   111 	   101 	   123 		.ASCIZ	/IAS/
	015275	   000
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 76
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3655					;
   3656					;  .REQS -- SUBROUTINE TO ATTEMPT TO MAKE A TASK ACTIVE
   3657					;
   3658					; ENTRY CONDITIONS:
   3659					;
   3660					;	R2 -- STD ENTRY ADDRESS (TASK ID ) OF REQUESTED TASK
   3661					;	R3 -- TPD ENTRY ADDRESS, OR ZERO (DEFAULT PARTITION) , FOR REQUESTED TASK
   3662					;	R4 -- RUN PRIORITY, OR ZERO (DEFAULT PRIORITY), FOR REQUESTED TASK
   3663					;
   3664					;  CALLING SEQUENCE:
   3665					;
   3666					;	CALL	.REQS
   3667					;
   3668					;   EXIT CONDITIONS:
   3669					;
   3670					;	R2=00 -- TASK MADE ACTIVE
   3671					;	R2=02 -- TASK NOT MADE ACTIVE, TASK ALREADY ACTIVE
   3672					;	R2=06 -- TASK NOT MADE ACTIVE, INSUFFICIENT POOL NODE(S)
   3673					;
   3674					;	REGISTERS ALTERED:
   3675					;	R0,R1,R2,R3,R4
   3676					;
   3677					;
   3678	015276	032762 	000001 	000006 	.REQS::	BIT	#SF.TA,S.FW(R2)	;IS TASK ACTIVE?
   3679	015304	001403 				BEQ	10$		;NO -- IT IS LEGAL TO ACTIVATE IT
   3680	015306	012702 	000002 			MOV	#2,R2		;YES -- RETURN +2
   3681	015312					RETURN
	015312	000207 				RTS	PC
   3682
   3683	015314	005703 			10$:	TST	R3		;CHECK THE PARTITION
   3684	015316	001002 				BNE	20$		;PARTITION SPECIFIED
   3685	015320	016203 	000004 			MOV	S.TD(R2),R3	;PARTITION NOT SPECIFIED -- USE DEFAULT
   3686	015324	005704 			20$:	TST	R4		;PRIORITY?
   3687	015326	001002 				BNE	30$		;YES -- DON'T USE DEFAULT
   3688	015330	156204 	000010 			BISB	S.DP(R2),R4	;FIND THE DEFAULT PRIORITY
   3689	015334	010446 			30$:	MOV	R4,-(SP)	;SAVE PRI
   3690	015336	010346 				MOV	R3,-(SP)	;SAVE TPD
   3691	015340	012704 	001432'			MOV	#.POLLH,R4	;PICK AN ATL NODE
   3692	015344					CALL	..PICK
	015344	004737 	045476'			JSR	PC,..PICK
   3693	015350	103004 				BCC	50$		;GOT NODE
   3694	015352	022626 			40$:	CMP	(SP)+,(SP)+	;REMOVE SAVED TPD AND PRI
   3695	015354	012702 	000006 			MOV	#6,R2		;COMPLAIN NO NODES AVAILABLE
   3696	015360					RETURN			;RETURN TO CALLER
	015360	000207 				RTS	PC
   3697
   3698	015362	032762 	000002 	000006 	50$:	BIT	#SF.FX,S.FW(R2)	;FIXED IN CORE?
   3699	015370	001436 				BEQ	70$		;NO -- MUST READ THE TASK IN
   3700	015372	010401 				MOV	R4,R1		;SAVE NODE ADDRESS
   3701	015374	016204 	000022 			MOV	S.SP(R2),R4	;SET UP STACK
   3702	015400	062704 	000014 			ADD	#14,R4		;SET POINTER TO PC
   3703	015404	016224 	000020 			MOV	S.PC(R2),(R4)+	;SET PC
   3704	015410	012724 	174000 			MOV	#174000,(R4)+	;SET UP PS
   3705	015414	012703 	000010 			MOV	#TS.RUN,R3	;SET UP TO START TASK
   3706	015420	010104 			60$:	MOV	R1,R4		;SAVE THE ATL NODE ADDRESS
   3707	015422	022424 				CMP	(R4)+,(R4)+	;MOVE OVER LISTHEAD
   3708	015424	016224 	000022 			MOV	S.SP(R2),(R4)+	;SET INITIAL STACK POINTER
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 76-1
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3709	015430	012624 				MOV	(SP)+,(R4)+	;SET UP TPD AND PRI
   3710	015432	012624 				MOV	(SP)+,(R4)+
   3711	015434	016224 	000012 			MOV	S.BA(R2),(R4)+	;SET BASE ADDRESS
   3712	015440	010324 				MOV	R3,(R4)+	;SET RUN STATE
   3713	015442	010224 				MOV	R2,(R4)+	;SET STD NODE ADDRESS
   3714	015444	005024 				CLR	(R4)+
   3715	015446	005064 	000012 			CLR	A.PF-A.EF-2(R4)	;CLEAR POWER FAIL AST ADDRESS
   3716	015452	052762 	000001 	000006 		BIS	#SF.TA,S.FW(R2)	;SET TASK ACTIVE
   3717	015460	012702 	007136'			MOV	#.ATLLH,R2	;INSERT NODE INTO ATL
   3718	015464	000535 				BR	120$
   3719
   3720	015466	032763 	000002 	000010 	70$:	BIT	#TF.OU,T.FW(R3)	;PARTITION BUSY?
   3721	015474	001116 				BNE	110$		;YES -- BETER PUT IN MRL
   3722	015476	010446 				MOV	R4,-(SP)	;SAVE NODE ADDRESS OF ATL NODE
   3723	015500	012701 	000040 			MOV	#32.,R1		;PICK AN I/O NODE
   3724	015504					CALL	..ALCB
	015504	004737 	045654'			JSR	PC,..ALCB
   3725	015510	010004 				MOV	R0,R4		;SET CORRECT NODE ADDRESS
   3726	015512	103006 				BCC	80$		;GOT ONE
   3727	015514	012601 				MOV	(SP)+,R1	;NONE AVAILABLE -- RETURN ATL NODE
   3728	015516	012704 	001432'			MOV	#.POLLH,R4
   3729	015522					CALL	..NADD		;ADD NODE BACK TO ATL
	015522	004737 	045434'			JSR	PC,..NADD
   3730	015526	000711 				BR	40$		;RETURN +6
   3731
   3732	015530	010446 			80$:	MOV	R4,-(SP)	;SAVE NODE ADDRESS
   3733	015532	022424 				CMP	(R4)+,(R4)+	;MOVE OVER LISTHEAD
   3734	015534	010224 				MOV	R2,(R4)+	;SET UP STD ADDRESS
   3735	015536	016624 	000002 			MOV	2(SP),(R4)+	;SET UP ATL NODE ADDRESS
   3736	015542	012724 	175014 			MOV	#250.*400+12.,(R4)+ ;SET UP PRI/DPB SIZE
   3737	015546	012724 	000400 			MOV	#400,(R4)+	;SET EFN
   3738	015552	012724 	000050 			MOV	#IO.LTK,(R4)+	;CLAIM THIS IS A READ
   3739	015556	005024 				CLR	(R4)+		;NO I/O STATUS
   3740	015560	005024 				CLR	(R4)+		;NO AST ADDRESS
   3741	015562	022424 				CMP	(R4)+,(R4)+	;ADDRESS IS NOT SPECIFIED HERE
   3742	015564	016224 	000014 			MOV	S.LZ(R2),(R4)+	;SET UP INITIAL SIZE
   3743	015570	005024 				CLR	(R4)+		;SKIP THIS PARAMETER
   3744	015572	016224 	000032 			MOV	S.DL(R2),(R4)+	;SET UP DISK ADDRESS
   3745	015576	016224 	000034 			MOV	S.DL+2(R2),(R4)+ ;LOW ORDER DISK ADDRESS
   3746	015602	012601 				MOV	(SP)+,R1	;RESTORE R1
   3747	015604	016603 	000002 			MOV	2(SP),R3	;RESTORE THE TPD ADDRESS
   3748	015610	032763 	000002 	000010 		BIT	#TF.OU,T.FW(R3)	;PARTITON OCCUPIED?
   3749	015616	001407 				BEQ	90$		;NO -- MUST BE OK TO LOAD
   3750	015620	012603 				MOV	(SP)+,R3	;YES -- BETTER ADD IT TO MRL
   3751	015622	012601 				MOV	(SP)+,R1	;RESTORE ATL ADDRESS
   3752	015624	010361 	000030 			MOV	R3,A.FM+4(R1)	;SET THE NODE ADDRESS IN FLAGS MASK WORD TO PRESERVE IT
   3753	015630	012703 	100002 			MOV	#TS.LRQ+100000,R3 ;SET LOAD REQUEST QUEUE'D AND PARTITION BUSY
   3754	015634	000671 				BR	60$		;SET UP ATL
   3755
   3756	015636	010246 			90$:	MOV	R2,-(SP)	;SAVE STD ADDRESS
   3757	015640	052763 	000002 	000010 		BIS	#TF.OU,T.FW(R3)	;DECLARE THE PARTITION OCCUPIED
   3758	015646	005003 				CLR	R3		;FIND PUD ENTRY
   3759	015650	156203 	000011 			BISB	S.DI(R2),R3	;SET DISK INDICATOR
   3760	015654	012702 	010262'			MOV	#.PUDBA,R2	;SET UP FOR ..IPRI
   3761	015660	062702 	000050 		100$:	ADD	#U.SZ,R2	;POINT TO AN ENTRY
   3762	015664	077303 				SOB	R3,100$		;LOOP UNTIL CORRECT ENTRY FOUND
   3763	015666	010203 				MOV	R2,R3		;SAVE THE LOGICAL UNIT NUMBER
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 76-2
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3764	015670	062702 	000022 			ADD	#U.RF,R2	;POINT TO LISTHEAD
   3765	015674					CALL	..IPRI		;ENTER IN LIST
	015674	004737 	045360'			JSR	PC,..IPRI
   3766	015700	014202 				MOV	-(R2),R2	;FIND ATL NODE ADDRESS OF HANDLER TASK
   3767	015702	052762 	000010 	000020 		BIS	#EF.NIR,A.EF(R2) ;START HANDLER
   3768	015710					CALL	..DSEV		;DECLARE SIG EVENT
	015710	004737 	045264'			JSR	PC,..DSEV
   3769	015714	012602 				MOV	(SP)+,R2	;RESTORE STD ADDRESS
   3770	015716	012601 				MOV	(SP)+,R1	;RESTORE R1 (ATL NODE ADDRESS)
   3771	015720	010361 	000022 			MOV	R3,A.EF+2(R1)	;SAVE THE OVERLAY PUD ADDRESS
   3772	015724	012703 	000002 			MOV	#TS.LRQ,R3	;SET UP TO INDICATE LOAD REQUEST QUEUE'D
   3773	015730	000633 				BR	60$		;AND START TASK
   3774
   3775	015732	010401 			110$:	MOV	R4,R1		;SAVE THE NODE ADDRESS
   3776	015734	052762 	000001 	000006 		BIS	#SF.TA,S.FW(R2)	;SET TASK ACTIVE
   3777	015742	022424 				CMP	(R4)+,(R4)+
   3778	015744	010224 				MOV	R2,(R4)+	;SAVE THE ATTRIBUTES OF THIS CALL
   3779	015746	012624 				MOV	(SP)+,(R4)+
   3780	015750	012624 				MOV	(SP)+,(R4)+
   3781	015752	010302 				MOV	R3,R2		;FIND THE MRL
   3782	015754	062702 	000014 			ADD	#T.RF,R2	;POINT TO IT IN TPD
   3783	015760				120$:	CALL	..IPRI		;INSERT THIS NODE IN MRL BY PRI
	015760	004737 	045360'			JSR	PC,..IPRI
   3784	015764	005002 				CLR	R2		;DECLARE TASK ACTIVE
   3785	015766					RETURN			;RETURN TO CALLER
	015766	000207 				RTS	PC
   3786
   3787	015770	104401 			.RQESD::TRAP	DR.01		;RETURN +1
   3788	015772	104771 				TRAP	DE.07		;RETURN -7
   3789	015774	104401 				TRAP	DR.01		;RETURN+1 (CURRENTLY UNUSED)
   3790	015776	104777 				TRAP	DE.01		;RETURN -1
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 77
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3792					;
   3793					;  .FEPPU -- SUBROUTINE TO FETCH PARTITION AND PRIORITY
   3794					;
   3795					;  ENTRY CONDITIONS:
   3796					;
   3797					;	R1 -- DPB PLUS SIX -- POINTING TO FOLLOWING DATA IN PREVIOUS SPACE
   3798					;		[PARTITION NAME (FIRST HALF),
   3799					;		[PARTITION NAME (SECOND HALF),
   3800					;		[PRIORITY],
   3801					;		[UNUSED].
   3802					;
   3803					;	IT IS ASSUMED THAT THESE WORDS CAN BE FETCHED WITHOUT SEGMENT FAULT.
   3804					;
   3805					;	R2 -- STD ENTRY OF TASK TO FIT IN PARTITION
   3806					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   3807					;
   3808					;	CALLING SEQUENCE:
   3809					;
   3810					;	CALL	.FEPPU
   3811					;
   3812					;  EXIT CONDITIONS:
   3813					;
   3814					;	R1 -- ADVANCED BY 8 (4 WORDS)
   3815					;	R3 -- TPD ENTRY ADDRESS, OR ZERO (DEFAULT PARTITION)
   3816					;	R4 -- RUN PRIORITY, OR ZERO (DEFAULT PRIORITY)
   3817					;
   3818					;	REGISTERS ALTERED R1,R3,R4
   3819					;
   3820	016000				.FEPPU::MFPI	(R1)+		;PUSH 2-WORD PARTITION NAME ONTO STACK
	016000	012146 				MOV	(R1)+,-(SP)
   3821	016002					MFPI	(R1)+
	016002	012146 				MOV	(R1)+,-(SP)
   3822	016004	005003 				CLR	R3		;CLEAR R3 (TPD ADDRESS
   3823	016006	005766 	000002 			TST	2(SP)		;WAS A PARTITION NAME SPECIFIED?
   3824	016012	001423 				BEQ	20$		;NO -- RETURN WITH ZERO IN R3
   3825	016014	012703 	007602'			MOV	#.TPDBA,R3	;YES -- SET UP TO SCAN TPD FOR PARTITION
   3826	016020	020327 	007602'		10$:	CMP	R3,#.TPDBA	;END OF TPD?
   3827	016024	001425 				BEQ	X.X94		;YES -- RETURN STS=-94.
   3828	016026	162703 	000020 			SUB	#T.SZ,R3	;NO -- SET UP R3 TO EXAMINE ENTRY
   3829	016032	021366 	000002 			CMP	@R3,2(SP)	;PARTITION NAME MATCH?
   3830	016036	001370 				BNE	10$		;NO -- CHECK NEXT TPD
   3831	016040	026316 	000002 			CMP	2(R3),@SP	;MAYBE -- CHECK SECOND HALF OF NAME
   3832	016044	001365 				BNE	10$		;NO -- CHECK NEXT TPD
   3833	016046	016204 	000016 			MOV	S.TZ(R2),R4	;SET R4 TO THE NUMBER OF 32-WORD BLOCKS
   3834									;REQUIRED FOR THE TASK INDICATED BY R2.
   3835	016052	020463 	000006 			CMP	R4,T.PZ(R3)	;IS PARTITION LARG ENOUGH FOR TASK?
   3836	016056	101401 				BLOS	20$		;YES -- SET R4 PER PRIORITY SPECIFIED
   3837	016060	104775 				TRAP	DE.03		;NO -- RETURN STS=-03
   3838
   3839	016062	022626 			20$:	CMP	(SP)+,(SP)+	;REMOVE PARTITION NAME FROM STACK
   3840	016064					MFPS	(R1)+,R4	;SET R4 TO PRIORITY INDICATOR
	016064	012104 				MOV	(R1)+,R4
   3841	016066	020427 	000372 			CMP	R4,#250.	;IS PRIORITY GREATER THAN 250?
   3842	016072	101003 				BHI	X.X95		;YES -- RETURN STS=-95.
   3843	016074	005721 				TST	(R1)+		;MOVE OVER UNUSED WORD
   3844	016076					RETURN			;RETURN TO CALLER
	016076	000207 				RTS	PC
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 77-1
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3845
   3846	016100	104642 			X.X94:	TRAP	DE.94		;RETURN STS=94.
   3847	016102	104641 			X.X95:	TRAP	DE.95		;RETURN STS=95.
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 78
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3849					;
   3850					; .VCLUN -- VERIFY & CONVER LOGICAL UNIT NUMBER
   3851					;
   3852					; ENTRY CONDITIONS:
   3853					;
   3854					;	R5 -- ATL NODE ADR OF DIRECTIVE ISSUING TASK
   3855					;	TOP OF STACK -- LOGICAL UNIT NUMBER
   3856					;
   3857					; CALLING SEQUENCE:
   3858					;
   3859					;	CALL  .VCLUN
   3860					;
   3861					; EXIT CONDITIONS:
   3862					;
   3863					;	R4 -- POINTS TO FIRST LUT ENTRY
   3864					;	CC-C SET IF TASK NOT FOUND
   3865					;
   3866					;	IF LUN IS ASSIGNED TO A PHYSICAL UNIT, THE  LUN (ON TOP OF
   3867					;	STACK) IS REPLACED BY THE ADDRESS OF THE CORRESPONDING PUD
   3868					;	ENTRY.
   3869					;
   3870					;	IF AN INVALID LUN, RETURN STS-96.
   3871					;
   3872					;	IF THE LUN IS NOT ASSIGNED, IT IS REPLACED BY A ZERO.
   3873					;
   3874					;
   3875					; REGISTERS ALTERED:
   3876					;
   3877					;	NONE
   3878					;
   3879	016104	010046 			.VCLUN::MOV	R0,-(SP)	;PUSH  (SAVE) R0
   3880	016106	016600 	000004 			MOV	4(SP),R0	;LUN MINUS ONE TO R0
   3881	016112	005300 				DEC	R0
   3882
   3887	016114	016504 	000012 			MOV	A.HA(R5),R4	;POINT TO HEADER ADDRESS
   3894	016120	062704 	000130 			ADD	#H.LUT,R4
   3896
   3897	016124	020024 				CMP	R0,(R4)+	;IS LUN <1, OR >MAX FOR TASK?
   3898	016126	103013 				BHIS	X9X96		;YES -- RETURN STS=-96
   3899	016130	006300 				ASL	R0		;NO -- SET LUT CONTENTS (PER LUN) IN R0
   3900	016132	006300 				ASL	R0
   3901	016134	060400 				ADD	R4,R0
   3902	016136	011000 				MOV	@R0,R0		;(PUD ENT ADR OR ZERO IN R0)
   3903	016140	001402 				BEQ	10$		;IF ASSIGNED, EFFECT REDIRECTION (IF ANY)
   3904	016142	016000 	000016 			MOV	U.RP(R0),R0
   3905	016146				10$:
   3906	016146	010066 	000004 			MOV	R0,4(SP)	;REPLACE LUN (ON STACK) BY PUD
   3907									;ENTRY ADDRESS (OR ZERO).
   3908
   3909	016152	012600 				MOV	(SP)+,R0	;POP (RESTORE) R0
   3910	016154					RETURN			;EXIT SUBROUTINE
	016154	000207 				RTS	PC
   3911					;
   3912					; COMMON JMP'S TO DIRECTIVE EXITS
   3913					;
   3914	016156	104640 			X9X96:	TRAP	DE.96
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 79
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3916					;
   3917					;	.STAST -- SUBROUTINE TO SET AN AST IN A TASK
   3918					;
   3919					;  ENTRY CONDITONS:
   3920					;
   3921					;	R5 -- ACTIVE TASK LIST POINTER
   3922					;	R4 -- ENTRY ADDRESS
   3923					;
   3924					;	CALLING SEQUENCE:
   3925					;
   3926					;	CALL	.STAST
   3927					;
   3928					;	EXIT CONDITIONS:
   3929					;
   3930					;	CC-C CLEAR -- AST SET AND ALL OK
   3931					;	CC-C SET -- THE TASK IS CURRENT AND CAN'T SET AST
   3932					;
   3933	016160	010246 			.STAST::MOV	R2,-(SP)	;SAVE REGISTERS
   3934	016162	010346 				MOV	R3,-(SP)
   3935	016164					CALL	..DSEV		;DECLARE A SIG EVENT
	016164	004737 	045264'			JSR	PC,..DSEV
   3936	016170	012702 	000006 			MOV	#6,R2		;SET UP TO SAVE REGISTERS
   3937	016174	000241 				CLC			;ASSUME SUCCESS
   3938	016176					.INH0			;;INHIBIT INTERRUPTS
	016176	013746 	177776 			MOV	@#PS,-(SP)
	016202	112737 	000140 	177776 		MOVB	#140,@#PS
   3939	016210	020537 	001006'			CMP	R5,.CRTSK		;;CURRENT TASK?
   3940	016214	001415 				BEQ	30$		;;YES 0-- BETTER SET CARRY
   3941	016216	016503 	000004 			MOV	A.SP(R5),R3	;;SET UP A POINTER TO THE TASK'S STACK
   3942	016222	010443 				MOV	R4,-(R3)	;;SET UP NEW PC
   3946	016224	012743 	004000 			MOV	#004000,-(R3)
   3948	016230	016343 	000016 		10$:	MOV	16(R3),-(R3)	;SET UP NEW STACK SAVE
   3949	016234	077203 				SOB	R2,10$		;;CONTINUE TIL DONE
   3950	016236				20$:	.ENB0			;ENABLE INTERRUPTS
	016236	004737 	045540'			JSR	PC,..ENB0
   3951	016242	012603 				MOV	(SP)+,R3	;RESTORE
   3952	016244	012602 				MOV	(SP)+,R2
   3953	016246					RETURN			;RETURN TO CALLER
	016246	000207 				RTS	PC
   3954
   3955	016250	005216 			30$:	INC	@SP		;ENABLE INTERRUPTS
   3956	016252	152737 	000002 	001014'		BISB	#EV.AS,.SERFG+0	;SET AST REQUIRED
   3957	016260	000766 				BR	20$		;AND RETURN
   3958						;
SCH	- TASK SCHEDULER & GLOB	MACRO M1113  03-APR-86 18:57  PAGE 80
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3960
   3961
   3962						.TITLE	BOOT -- BOOT PROTOCOL HANDLER
   3963						.SBTTL	SECONDARY PROTOCOL -- COPYRIGHT STATEMENT
   3964	016262					IDENT$	15,00
						.IDENT	/015000/
   3965
   3966					;
   3967					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   3968					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3969					;			ALL RIGHTS RESERVED.
   3970					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3971					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3972					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3973					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3974					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3975					;
   3976					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3977					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3978					;       CORPORATION.
   3979					;
   3980					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3981					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3982					;
   3983					;		MODULE: "BOOT PROTOCOL HANDLER"
   3984					;
   3985					;		VERSION: 14-37
   3986					;
   3987					;		AUTHOR: R. MCLEAN
   3988					;
   3989					;		DATE: 12 OCT 76
   3990					;
   3991					;	THIS MODULE CONTAINS:
   3992					;
   3993					;	1 -- CODE TO SERVICE BOOT PROTOCOL ETC.
   3994					;
   3995					; MODIFIED:
   3996					;	NO.	DATE		PROGRAMMER	PURPOSE
   3997					;	---	----		----------	-------
   3998					;	001	12-OCT-76	R. BELANGER	CHANGED PHYSICAL EXAMINES &
   3999					;						DEPOSITS TO EPT RELATIVE
   4000					;	002	21-OCT-76	A. PECKHAM	ADDITION OF CODE TO COUNT
   4001					;						DOORBELLS.
   4002					;
   4003					;	003	04-NOV-76	R. BELANGER	ADDED CODE TO DELETE
   4004					;						ENTRIES FROM TO10Q ON
   4005					;						PRIMARY PROTOCOL RESTART.
   4006					;	004	29-NOV-76	A. PECKHAM	CHANGES TOO NUMEROUS TO MENTION.
   4007					;	005	07-MAR-77	A. PECKHAM	ADDED CHANGE TO AVOID RESETTING TO -10 Q.
   4008					;	006	21-MAR-77	A. PECKHAM	FIXED BUG IN ACKNOWLEGE
   4009					;	007	28-AUG-77	R. BELANGER	RESET POWERFAIL FLAG ON
   4010					;						PRIMARY PROTOCOL START
   4011					;	008	07-OCT-77	R. BELANGER	IGNORE COMM REGION IF SO DIRECTED BY "TKTN"
   4012					;
   4013					;	009	27-MAY-78	R. BELANGER	ADD PROTOCOL TIMEOUT
   4014					;   TCO 4.2207	08-MAR-79	R. BELANGER	FIX BUG WHICH CAN CAUSE
   4015					;						PROTOCOL PAUSE LOOPS
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 80-1
SECONDARY PROTOCOL -- COPYRIGHT STATEMENT

   4016					;  TCO 4.1.1035	16-NOV-79	R. BELANGER	ADD QUEUE ARBITRATION
   4017					;  TCO 4.1.1121	19-MAR-80	R. BELANGER	SUPPORT BLOCKED DTE-20
   4018					;  TCO 4.1.1137	05-APR-80	R. BELANGER	REMOVE SUPPORT FOR RESTRICTED DTE-20
   4019					;
   4020					;	MACRO CALLS
   4021					;
   4022						.MCALL	CALL,RETURN,.STKM,CLEF$S,WTSE$S,QIOW$,DTON$S,.CRASH
   4023						.MCALL	WSIG$S,.ENB0,.INH6,.ENB6,$DEF
   4024	016262					$DEF
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 81
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4026						.SBTTL	SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE
   4027					;
   4028					;	BTPRO -- ROUTINE TO HANDLE THE PROTOCOL TRANSITION INTO
   4029					;	SECONDARY PROTOCOL.
   4030					;	IT IS ASSUMED THAT THIS PROTOCOL WILL BE USED
   4031					;	DURING INITALIZATION AND IN CASE OF MONITOR CRASHED ETC
   4032					;	WHEN THE NORMAL MEANS OF COMMUNICATIONS THRU THE COMM REGION ARE DESTROYED
   4033					;
   4034					;	"EF.CRI" INDICATES THAT THE FRONT-END BELEIVES THE COMM-REGION TO BE
   4035					;	INVALID.  THIS BIT IS SET ON POWERFAIL AND BY "KLI" ON A KL RELOAD.
   4036					;	IF THE COMM REGION INVALID FLAG IS NOT SET, THE TRANSITION INTO SECONDARY
   4037					;	PROTOCOL IS TIMED-OUT FOR 30 SECONDS.  IF NO TRANSITION IS MADE WITHIN
   4038					;	THAT PERIOD, THE KL IS RELOADED.
   4039					;
   4040					;	NOTE -- IF THE COMM-REGION IS FOUND TO BE VALID DURING A NORMAL PROTOCOL
   4041					;		TRANSITION, PRIMARY PROTOCOL IS IS IMMEDIATELY RE-ENTERED.
   4042					;
   4043					;	IF SUCCESS IN COMMUNICATION WITH THE KL IT WILL ENTER SECONDARY
   4044					;	PROTOCOL (OR RE-ENTER PRIMARY PROTOCOL)
   4045					;
   4046
   4047	016262				BTPHD::
   4048	016262					.STKM	0,1,2,3,4,5,0,BTPRO,174000,.BTSTK
	016330	000000 	000000 	000000 		.WORD	0,0,0,0
	016336	000000
	016356	174000 	016562'	016542'		.WORD	174000,BTPRO,.BTSTK
	016412	000005 				.WORD	5
	016414	010262'				.WORD	TTPEN
	016416	000000 				.WORD	0
	016420	000000 				.WORD	0
	016422	000000 				.WORD	0
	016424	000000 				.WORD	0
	016426	000000 				.WORD	0
	016430	000000 				.WORD	0
	016432	000000 				.WORD	0
	016434	000000 				.WORD	0
	016436	000000 				.WORD	0
	016440	000000 				.WORD	0
	016542	000000 				.WORD	0
	016544	000001 				.WORD	1
	016546	000002 				.WORD	2
	016550	000003 				.WORD	3
	016552	000004 				.WORD	4
	016554	000005 				.WORD	5
	016556	016562'				.WORD	BTPRO
	016560	174000 				.WORD	174000
   4049
   4050	016562				BTPRO:
   4051	016562	105037 	001400'			CLRB	.PRPSE		; RESET THE PAUSE FLAG
   4052	016566					WTSE$S	#E.FPR2		;WAIT FOR ACTIVATION.
	016566	012746 	000076 			MOV	#E.FPR2,-(SP)
	016572	012746 				MOV	(PC)+,-(SP)
	016574	   051 	   002 			.BYTE	41.,2
	016576	104375 				EMT	375
   4053	016600	052737 	100000 	007422'		BIS	#BIT15,FETSK+A.EF ;SET SECONDARY PROTOCOL FLAG FOR FETSK
   4054	016606	013700 	001154'			MOV	.TKPS,R0	; +++009 TICKS PER SECOND TO R0
   4055	016612	012701 	000036 			MOV	#^D30,R1	; +++009 30. SECONDS
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 81-1
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4056	016616				5$:
   4057	016616					CALL	$MUL		; +++009 CALCULATE PAUSE PERIOD
	016616	004737 	000000G			JSR	PC,$MUL
   4058	016622	010104 				MOV	R1,R4		; +++009 SAVE IT IN R4
   4059	016624	013700 	001366'			MOV	.PRDTE,R0	;FIND ADDRESS OF PRIVILEDGED DTE
   4060	016630	013705 	001364'			MOV	.PRSTA,R5
   4061	016634	012715 	000010 			MOV	#INTROF,@R5	;CLEAR THE STATUS
   4062	016640	000405 				BR	20$		;GO LOOK FOR CHANGE TO BOOT PROTOCOL
   4063						;
   4064	016642				10$:
   4065	016642					.ENB6			;;;ENABLE INTERRUPTS
	016642	012637 	177776 			MOV	(SP)+,@#PS
   4066	016646					WSIG$S			;WAIT FOR SIG EVENT
	016646	012746 				MOV	(PC)+,-(SP)
	016650	   061 	   001 			.BYTE	49.,1
	016652	104375 				EMT	375
   4067	016654				20$:
   4068	016654					.INH6			;INHIBIT INTERRUPTS
	016654	013746 	177776 			MOV	@#PS,-(SP)
	016660	112737 	000300 	177776 		MOVB	#300,@#PS
   4069	016666	032737 	002000 	001012'		BIT	#EF.CRI,.COMEF+2 ;;; +++008 IS THE COMM REGION VALID??
   4070	016674	001020 				BNE	30$		;;; +++008 NO -- GO ON
   4071	016676	112737 	177777 	001400'		MOVB	#-1,.PRPSE	;;; +++009 MARK THAT  WE ARE PAUSING
   4072	016704	005060 	000010 			CLR	TNAD1(R0)	;;; MAYBE -- LOOK FOR PROTOCOL CHANGE
   4073	016710	005060 	000012 			CLR	TNAD2(R0)	;;;BY TESTING RELATIVE ADDR WORD
   4074	016714					CALL	..WFED		;;; [4.1.1121] WAIT FOR EXAMINE
	016714	004737 	047454'			JSR	PC,..WFED
   4075	016720	103453 				BCS	47$		;;;KL HAS BEEN LOST..
   4076	016722	005760 	000002 			TST	DXWD3(R0)	;;;IF NON-ZERO
   4077	016726	001403 				BEQ	30$		;;;THEN EXAMINE VALID, SO
   4078	016730	010702 				MOV	PC,R2		;;; +++006 SAY NO ACKNOWLEGE NEEDED
   4079	016732	000137 	020024'			JMP	120$		;;; +++005 RETURN TO PRIMARY PROTOCOL.
   4080						;
   4081	016736				30$:
   4082	016736	032760 	004000 	000030 		BIT	#DS04,DAG1(R0)	;;;CHECK FOR CLOCK ERROR STOP
   4083	016744	001174 				BNE	86$		;;;STOP ALL PROTOCOLS IF SO
   4084	016746				31$:
   4085	016746	032715 	004000 			BIT	#TO11DB,@R5	;;;WAIT OR A DOORBELL INTERRUPT
   4086	016752	001021 				BNE	40$		;;; +++009 GOT ONE -- PROCESS IT
   4087	016754	032737 	002000 	001012'		BIT	#EF.CRI,.COMEF+2 ;;; +++009 IS THIS A PAUSE??
   4088	016762	001327 				BNE	10$		;;; +++009 YES -- WAIT FOR SECONDARY PROTOCOL
   4089	016764	077452 				SOB	R4,10$		;;; +++009 NO -- DID WE TIME OUT??
   4090	016766	105237 	001124'			INCB	.TKTN		;;; +++009 YES -- SAY GOODNIGHT....
   4091	016772	105237 	001122'			INCB	.NOERR		;;; +++009 DON'T CARE ABOUT ERRORS NOW
   4092	016776	052737 	000200 	001126'		BIS	#KS.PTO,.KLITK	;;; +++009 FLAG PROTOCOL TIMEOUT
   4093	017004					CALL	..DTSP		;;; [4.2207] STOP ALL PROTOCOLS
	017004	004737 	050226'			JSR	PC,..DTSP
   4094	017010					.ENB6			;;; +++009 ALLOW INTERRUPTS
	017010	012637 	177776 			MOV	(SP)+,@#PS
   4095	017014	000662 				BR	BTPRO		; +++009 AND GO BACK TO SLEEP
   4096						;
   4097	017016				40$:
   4098	017016	042737 	001000 	001012'		BIC	#EF.FCP,.COMEF+2 ;;;CLEAR FAULT CONTINUATION IN PROGRESS IN CASE
   4099	017024	005237 	001370'			INC	.PRDCT		;;; +002 ONE MORE DOORBELL....
   4100	017030	012760 	004000 	000010 		MOV	#PRTOFF!EPTR,TNAD1(R0) ;;; +001 PROTECT OFF
   4101	017036	012760 	000451 	000012 		MOV	#DTECMD,TNAD2(R0) ;;;READ THE COMMAND PASSED
   4102	017044					CALL	..WFED		;;; [4.1.1121] WAIT FOR EXAMINE DEPOSIT
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 81-2
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

	017044	004737 	047454'			JSR	PC,..WFED
   4103	017050				47$:
   4104	017050	103534 				BCS	87$
   4105	017052	012715 	002000 			MOV	#INT11C,@R5	;;;ALLOW MORE DOORBEL INTERRUPTS
   4106	017056	122760 	000011 	000003 		CMPB	#11,DXWD3+1(R0)	;;;LOOK AT THE COMMAND WORD
   4107	017064	001266 				BNE	10$		;;;NOT WHAT WE WANT...
   4108					;
   4109					;	CHANGE PROTOCOL TO SECONDARY (FUNCTION 11)
   4110					;
   4111	017066				50$:
   4112	017066	105037 	001400'			CLRB	.PRPSE		;;; +++009 RESET PAUSE FLAG
   4113	017072	012760 	177776 	000002 	55$:	MOV	#-2,DXWD3(R0)	;;;ACKNOWLEDGE THE COMMAND
   4114	017100	052760 	014000 	000010 		BIS	#DEP!EPTR!PRTOFF,TNAD1(R0) ;;; +001 SET DEPOSIT IN TEN MEMORY FLAG
   4115	017106	012760 	000444 	000012 		MOV	#DTEFLG,TNAD2(R0) ;;;START TRANSFER TO DTE FLAG WORD
   4116	017114					CALL	..WFED		;;; [4.1.1121] WAIT FOR EXAMINE DEPOSIT
	017114	004737 	047454'			JSR	PC,..WFED
   4117	017120	103510 				BCS	87$		;;;TEN STOPPED
   4118	017122	012715 	000400 			MOV	#TO10DB,@R5	;;;SET 10'S DOORBELL
   4119	017126	005037 	001162'			CLR	.BTSCH		;;;CLEAR ANY SAVED CHARACTERS
   4120					;
   4121					;	AT THIS POINT WE ARE OFFICIALLY IN SECONDARY PROTOCOL
   4122					;
   4123					;	THIS IS THE MAIN COMMAND LOOP WHICH PROCESSES THE SECONDARY
   4124					;	PROTOCOL COMMANDS AND PASSES CTY CHARACTERS TO THE -10.
   4125					;
   4126	017132				60$:
   4127	017132					.ENB6			;;;ENABLE INTERRUPTS
	017132	012637 	177776 			MOV	(SP)+,@#PS
   4128	017136					WSIG$S			;WAIT FOR SIG EVENT
	017136	012746 				MOV	(PC)+,-(SP)
	017140	   061 	   001 			.BYTE	49.,1
	017142	104375 				EMT	375
   4129	017144					.INH6			;INHIBIT INTERRUPTS
	017144	013746 	177776 			MOV	@#PS,-(SP)
	017150	112737 	000300 	177776 		MOVB	#300,@#PS
   4130	017156	032715 	004000 			BIT	#TO11DB,@R5	;;;WAIT FOR ANOTHER DOORBELL
   4131	017162	001073 				BNE	90$		;;;FOUND IT -- CHECK THE COMMAND
   4132	017164	032760 	004000 	000030 		BIT	#DS04,DAG1(R0)	;;;CHECK FOR CLOCK ERROR STOP
   4133	017172	001061 				BNE	86$		;;;YES -- STOP PROTOCOL
   4134	017174				70$:
   4135	017174	113701 	001162'			MOVB	.BTSCH,R1	;;;CHECK FOR CTY CHARACTER
   4136	017200	001754 				BEQ	60$
   4137					;
   4138					;	TRANSFER CTY CHARACTER TO -10
   4139					;
   4140	017202				80$:
   4141	017202	012760 	004000 	000010 		MOV	#PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET PROTECT OFF
   4142	017210	012760 	000456 	000012 		MOV	#DTEMTI,TNAD2(R0) ;;;PICK UP THE INPUT BUSY FLAG
   4143	017216				81$:
   4144	017216					CALL	..WFED		;;; [4.1.1121] WAIT FOR EXAMINE DEPOSIT
	017216	004737 	047454'			JSR	PC,..WFED
   4145	017222	103447 				BCS	87$		;;;TEN STOPPED
   4146	017224	005760 	000004 			TST	DXWD2(R0)
   4147	017230	001340 				BNE	60$		;;;TEN CAN'T ACCEPT ANOTHER CHARACTER YET
   4148	017232	042701 	177600 			BIC	#^C177,R1	;;;MASK OFF JUNK
   4149	017236	010160 	000002 			MOV	R1,DXWD3(R0)	;;;PUT THE WORD IN THE DTE
   4150	017242	005060 	000004 			CLR	DXWD2(R0)
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 81-3
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4151	017246	005060 	000006 			CLR	DXWD1(R0)
   4152	017252	012760 	014000 	000010 		MOV	#DEP!PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET DEP!PRTOFF!EPTR DEPOSIT FLAG
   4153	017260	012760 	000450 	000012 		MOV	#DTEF11,TNAD2(R0) ;;;STORE THE CHARACTER IN THE 10
   4154	017266					CALL	..WFED		;;; [4.1.1121] WAIT FOR EXAMINE/DEPOSIT
	017266	004737 	047454'			JSR	PC,..WFED
   4155	017272	103423 				BCS	87$		;;;TEN STOPPED
   4156	017274	105037 	001162'			CLRB	.BTSCH		;;;CHARACTER HAS NOW BEEN SENT
   4157	017300	012760 	177776 	000002 		MOV	#-2,DXWD3(R0)	;;;SET CHARACTER IN BUFFER FLAG
   4158	017306	012760 	014000 	000010 		MOV	#DEP!PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET DEP!PRTOFF!EPTR DEPOSIT FLAG
   4159	017314	012760 	000456 	000012 		MOV	#DTEMTI,TNAD2(R0) ;;;TRANSFER TO 10 MEMORY
   4160	017322					CALL	..WFED		;;; [4.1.1121] WAIT FOR TRANSFER
	017322	004737 	047454'			JSR	PC,..WFED
   4161	017326	103405 				BCS	87$		;;;TEN STOPPED
   4162	017330	012715 	000400 			MOV	#TO10DB,@R5	;;;SET THE 10'S DOORBELL
   4163	017334	000676 				BR	60$		;;;CONTINUE POLLING
   4164					;
   4165					;	AN ERROR ON EXAMINE / DEPOSIT TURNS OFF BOOT PROTOCOL
   4166					;
   4167	017336				86$:
   4168	017336					CALL	..WFED		;;; [4.1.1121] RECOGNIZE ERROR, THEN
	017336	004737 	047454'			JSR	PC,..WFED
   4169	017342				87$:
   4170	017342					.ENB0			;;; +++006 ENABLE INTERRUPTS
	017342	004737 	045540'			JSR	PC,..ENB0
   4171	017346	000137 	016562'			JMP	BTPRO		;AND GO TO WAIT FOR REACTIVATION.
   4172					;
   4173					;	RECIEVE A COMMAND FROM THE -10
   4174					;
   4175	017352				90$:
   4176	017352	005237 	001370'			INC	.PRDCT		;;; +002 ONE MORE DOORBELL...
   4177	017356	012760 	004000 	000010 		MOV	#PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET PROTECT OFF
   4178	017364	012760 	000451 	000012 		MOV	#DTECMD,TNAD2(R0) ;;;READ THE COMMAND WORD
   4179	017372					CALL	..WFED		;;; [4.1.1121] WAIT FOR EXAMINE DEPOSIT
	017372	004737 	047454'			JSR	PC,..WFED
   4180	017376	012715 	002000 			MOV	#INT11C,@R5	;;;WARNING !!!!!DON'T MOVE THIS INSTRUCTION!!!!!!!
   4181									;;;DOORBELL MUST NOT BE CLEARED BEFORE THE
   4182									;;;10 FINISHES THE SET DOORBELL!!!!!!
   4183									;;;IT IS GUARANTEED TO BE SAFE AFTER ..WFED
   4184	017402	103757 				BCS	87$		;;;TEN STOPPED
   4185	017404	122760 	000013 	000003 		CMPB	#13,DXWD3+1(R0)	;;; [**]
   4186	017412	001447 				BEQ	97$		;;; [**]
   4187	017414	122760 	000012 	000003 		CMPB	#12,DXWD3+1(R0)	;;;MONITOR MODE CONTROL OFF?
   4188	017422	001515 				BEQ	100$		;;;YES -- RE-ENTER RSX20F
   4189	017424	122760 	000011 	000003 		CMPB	#11,DXWD3+1(R0)	;;;MONITOR MODE CONTROL ON?
   4190	017432	001003 				BNE	95$		;;;NO -- MUST BE CTY CHARACTER
   4191	017434	012715 	002000 			MOV	#INT11C,@R5	;;;ALLOW MORE DOORBELLS AND
   4192	017440	000612 				BR	50$		;;;ACKNOWLEDGE THE COMMAND.
   4193					;
   4194					;	OUTPUT A CHARACTER TO THE CTY (FUNCTION 10)
   4195					;
   4196	017442				95$:
   4197	017442	116037 	000002 	020162'		MOVB	DXWD3(R0),QPROAD ;;;OUTPUT A CHARACTER
   4198	017450					.ENB6			;;;ENABLE INTERRUPTS
	017450	012637 	177776 			MOV	(SP)+,@#PS
   4199	017454					DIR$	#QPROMS		;OUTPUT CHARACTER
	017454	012746 	020140'			MOV	#QPROMS,-(SP)
	017460	104375 				EMT	375
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 81-4
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4200	017462					.INH6			;INHIBIT INTERRUPTS
	017462	013746 	177776 			MOV	@#PS,-(SP)
	017466	112737 	000300 	177776 		MOVB	#300,@#PS
   4201	017474	012760 	177776 	000002 		MOV	#-2,DXWD3(R0)	;;;ACKNOWLEDGE CHARACTER OUTPUT
   4202	017502	012760 	014000 	000010 		MOV	#DEP!PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET DEPOSIT
   4203	017510	012760 	000455 	000012 		MOV	#DTEMTD,TNAD2(R0) ;;;START TRANSFER TO INDICATE CHARACTER OUTPUT
   4204	017516					CALL	..WFED		;;; [4.1.1121] WAIT FOR EXAMINE DEPOSIT
	017516	004737 	047454'			JSR	PC,..WFED
   4205	017522	103707 				BCS	87$		;;;WHOOPS !
   4206	017524	012715 	000400 			MOV	#TO10DB,@R5	;;;CLEAR THE 11 DOORBELL AND SET THE 10'S DOORBELL
   4207	017530	000621 				BR	70$		;;;CONTINUE POLLING
   4208
   4209					;
   4210					;	SEND DATE/TIME INFO (FUNCTION 13)
   4211					;
   4212	017532				97$:
   4213	017532	005060 	000006 			CLR	DXWD1(R0)	;;; [**]
   4214	017536	016001 	000004 			MOV	DXWD2(R0),R1	;;; [**]
   4215	017542	013760 	001140'	000004 		MOV	.DATE,DXWD2(R0)	;;; [**]
   4216	017550	013760 	001142'	000002 		MOV	.YEAR,DXWD3(R0)	;;; [**]
   4217	017556					CALL	98$		;;; [**]
	017556	004737 	017634'			JSR	PC,98$
   4218	017562	103667 				BCS	87$		;;; [**]
   4219	017564	013760 	001144'	000004 		MOV	.DAY,DXWD2(R0)	;;; [**]
   4220	017572	013760 	001146'	000002 		MOV	.DST,DXWD3(R0)	;;; [**]
   4221	017600					CALL	98$		;;; [**]
	017600	004737 	017634'			JSR	PC,98$
   4222	017604	103656 				BCS	87$		;;; [**]
   4223	017606	013760 	001150'	000004 		MOV	.SSM,DXWD2(R0)	;;; [**]
   4224	017614	013760 	001152'	000002 		MOV	.SSM+2,DXWD3(R0)  ;;; [**]
   4225	017622					CALL	98$		;;; [**]
	017622	004737 	017634'			JSR	PC,98$
   4226	017626	103645 				BCS	87$		;;; [**]
   4227	017630	000137 	017072'			JMP	55$		;;; [**]
   4228	017634				98$:
   4229	017634	012760 	014000 	000010 		MOV	#DEP!EPTR!PRTOFF,TNAD1(R0)	;;; [**]
   4230	017642	010160 	000012 			MOV	R1,TNAD2(R0)	;;; [**]
   4231	017646					CALL	..WFED		;;; [**]
	017646	004737 	047454'			JSR	PC,..WFED
   4232	017652	005201 				INC	R1		;;; [**]
   4233	017654					RETURN			;;; [**]
	017654	000207 				RTS	PC
   4234
   4235					;
   4236					;	CHANGE PROTOCOL TO PRIMARY (FUNCTION 12)
   4237					;
   4238	017656				100$:
   4239	017656	005037 	001402'			CLR	.DTBLK		;;; [4.1.1121] DTE-20 IS NO LONGER BLOCKED
   4240	017662	005002 				CLR	R2		;;; +++006 NEED ACKNOWLEGE
   4241	017664	042737 	006000 	001012'		BIC	#EF.PFR!EF.CRI,.COMEF+2 ;;; +++007 GUARD AGAINST SPURIOUS POWERFAIL
   4242									;;; +++008 DECLARE COMM REGION VALID
   4243	017672	032760 	000001 	000002 		BIT	#1,DXWD3(R0)	;;;CHECK FOR RE-INIT
   4244	017700	001451 				BEQ	120$		;;; +++006 NO
   4245	017702				110$:
   4246	017702	010046 				MOV	R0,-(SP)
   4247	017704				113$:
   4248	017704	013704 	001334'			MOV	TO10Q,R4	;;; +003 Q LISTHEAD TO R4
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 81-5
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4249	017710	022704 	001334'			CMP	#TO10Q,R4	;;; +003 DONE?
   4250	017714	001416 				BEQ	112$		;;; +003 YES -- LEAVE
   4251	017716					CALL	..NDEL		;;; +003 NO -- REMOVE THIS ENTRY FROM Q
	017716	004737 	045320'			JSR	PC,..NDEL
   4252	017722	005764 	000012 			TST	12(R4)		;;; +003 TEST INDIRECT INDICATOR
   4253	017726	003003 				BGT	111$		;;; +003 NOT INDIRECT -- GO ON
   4254	017730	056474 	000024 	000026 		BIS	24(R4),@26(R4)	;;; +003 INDIRECT -- DECLARE XFER COMPLETE
   4255	017736				111$:
   4256	017736	010400 				MOV	R4,R0		;;; +003 SET UP TO
   4257	017740	016001 	000004 			MOV	4(R0),R1	;;; +003 RETURN CORE BLOCK
   4258	017744					CALL	..DECB		;;; +003 RETURN IT
	017744	004737 	046010'			JSR	PC,..DECB
   4259	017750	000755 				BR	113$		;;; +003 DO NEXT ENTRY IN Q
   4260						;
   4261	017752				112$:
   4262	017752	005037 	001332'			CLR	TO10QC		;;; +003 DONE -- CLEAR CURRENT COUNTS
   4263	017756	005037 	001262'			CLR	.CPDV		;;; CLEAR CURRENT TO-10 DEVICE
   4264	017762	013700 	001270'			MOV	.CRHD,R0	;;; GET CURRENT NODE
   4265	017766	062700 	000010 			ADD	#10,R0		;;; POINT TO DATA AREA
   4266	017772	010037 	001266'			MOV	R0,.CRPB	;;; AND SET BUFFER POINTER.
   4267	017776	005060 	177776 			CLR	-2(R0)		;;; CLEAR ENTRY COUNT
   4268	020002	016000 	177774 			MOV	-4(R0),R0	;;; GET LENGTH OF NODE
   4269	020006	162700 	000012 			SUB	#10.,R0		;;; ADJUST,
   4270	020012	010037 	001264'			MOV	R0,.CRSZ	;;; AND SET BUFFER SIZE.
   4271	020016	005037 	001256'			CLR	.CRQZ		;;; NOTHING ENTERED YET.
   4272	020022	012600 				MOV	(SP)+,R0
   4273	020024				120$:				;;; +++005
   4274	020024	105037 	001401'			CLRB	TOXQIP		;;; [4.1.1035] RESET THE QUEUE INTERLOCK
   4275	020030					CLEF$S	#E.FPR2		;;;TURN SECONDARY PROTOCOL OFF
	020030	012746 	000076 			MOV	#E.FPR2,-(SP)
	020034	012746 				MOV	(PC)+,-(SP)
	020036	   037 	   002 			.BYTE	31.,2
	020040	104375 				EMT	375
   4276	020042					DTON$S			;;;ENABLE DTE20
	020042	012746 	000003 			MOV	#DF.ON,-(SP)
	020046	012746 	001011 			MOV	#400*2.+DR.DTE,-(SP)
	020052	104375 				EMT	375
   4277	020054	103002 				BCC	125$		;;; [**]
   4278	020056	000137 	017342'			JMP	87$		;;; +++006 LOST COMM REGION
   4279	020062				125$:
   4280	020062	005702 				TST	R2		;;; +++006 ACKNOWLEGE??
   4281	020064	001013 				BNE	130$		;;; +++006 NO -- GO ON
   4282	020066	012760 	177776 	000002 		MOV	#-2,DXWD3(R0)	;;; +++006 ACK THE COMMAND
   4283	020074	012760 	014000 	000010 		MOV	#DEP!EPTR!PRTOFF,TNAD1(R0) ;;; +++001 SET DEPOSIT
   4284	020102	012760 	000444 	000012 		MOV	#DTEFLG,TNAD2(R0)  ;;;  +++006 START IT
   4285	020110					CALL	..WFED		;;; [4.1.1121] WAIT FOR IT
	020110	004737 	047454'			JSR	PC,..WFED
   4286	020114				130$:				;;;  +++006
   4287	020114	012715 	000440 			MOV	#INTRON!TO10DB,@R5 ;;;ENABLE INTERRUPTS
   4288	020120					.ENB0			;;;ENABLE INTERRUPTS
	020120	004737 	045540'			JSR	PC,..ENB0
   4289	020124	005237 	001164'			INC	.ACKAL		;SEND ACK ALL
   4290	020130	005037 	005716'			CLR	.FEACT		;FE IS NOW AVAILABLE
   4291	020134	000137 	016562'			JMP	BTPRO		;WAIT FOR PROTOCOL REACTIVICATION.
   4292						;
   4293	020140				QPROMS:
   4294	020140					QIOW$	IO.WLB,1,2,0,0,0,<QPROAD,1,0>
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 81-6
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

	020140	   003 	   011 			.BYTE	3,$$$ARG
	020142	000400 				.WORD	IO.WLB
	020144	000001 				.WORD	1
	020146	   002 	   000 			.BYTE	2,0
	020150	000000 				.WORD	0
	020152	000000 				.WORD	0
	020154	020162'				.WORD	QPROAD
	020156	000001 				.WORD	1
	020160	000000 				.WORD	0
   4295	020162				QPROAD:
   4296	020162	000000 				.WORD	0
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 82
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4298
   4299						.TITLE	PF -- POWER FAIL HANDLER
   4300						.SBTTL	POWERFAIL HANDLER -- COPYRIGHT STATEMENT
   4301	020164					IDENT$	14,05
						.IDENT	/014050/
   4302					;
   4303					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   4304					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4305					;			ALL RIGHTS RESERVED.
   4306					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4307					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4308					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4309					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4310					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4311					;
   4312					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4313					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4314					;       CORPORATION.
   4315					;
   4316					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4317					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4318					;
   4319					;		MODULE: "POWER FAIL"
   4320					;
   4321					;		VERSION: 14-05
   4322					;
   4323					;		AUTHOR: R. MCLEAN
   4324					;
   4325					;		DATE: 19 JUL 75
   4326					;
   4327					;
   4328					;	THIS MODULE CONTAINS:
   4329					;
   4330					;	1 -- CODE TO SUPPORT POWER FAIL
   4331					;
   4332					; MODIFICATIONS:
   4333					;
   4334					;	NO.	DATE		PROGRAMMER	REASON
   4335					;	---	----		----------	------
   4336					;	001	10-AUG-77	R. BELANGER	WAIT FOR KL CROBAR TO
   4337					;						SETTLE ON POWER RESTART
   4338					;	002	18-AUG-77	R. BELANGER	FLAG POWER RESTART
   4339					;  TCO 4.2205	08-MAR-79	R. BELANGER	RESET SENADALL DATABASE
   4340					;						ON POWER UP
   4341					;  TCO 4.2249	09-MAY-79	R. BELANGER	ALLOW POWER FAIL RECOVERY
   4342					;						TO COMPLETE BEFORE NOTIFYING KL10
   4343					;						MODIFY PARITY REGISTER INITIALIZATION
   4344					;						NOT NOT ALTER CPU PRIORITY ON TRAP
   4345
   4347						.MCALL	CALL,$DEF,.CRASH
   4348	020164					$DEF
PF -- POWER FAIL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 83
POWERFAIL -- POWER DOWN

   4351						.SBTTL	POWERFAIL -- POWER DOWN
   4352
   4353					;+
   4354					;	POWER FAILURE AND RECOVERY SERVICE
   4355					;
   4356					;	WHEN A POWER FAILURE TRAP OCCURS, THE VOLATILE REGISTERS
   4357					;	ARE SAVED AND THE TRAP VEECTOR FOR POWER UP IS SET.
   4358					;
   4359					;	IF POWER FAIL INTERRUPTS A PRI 7 (I/O INITALIZE OR DTE
   4360					;	EXAMINE/DEPOSIT) THEN .PFAIL IS SET AND RTI
   4361					;	IS EXECUTED.  ROUTINES WHICH BREAK DOWN FROM PRI7
   4362					;	MUST CHECK TO SEE IF .PFAIL IS SET AND JUMP TO
   4363					;	.PFRTN -- THIS WILL ALLOW THEM TO FINISH AND
   4364					;	STILL PROTECT POWERFAIL FROM FAILING
   4365					;
   4366					;
   4367					;	NOTE: POWERFAIL TRAP CANNOT BE INHIBITED.
   4368					;	POWER FAIL TRAP SERVICE CAN NOT USE ROUTINES THAT INHIBIT
   4369					;	INTERRUPTS TO AVOID RACE CONDITIONS
   4370					;
   4371					;	NOTE: ALL MEMORY IS ASSUMED TO BE NON-VOLATILE (IT CANNOT BE
   4372					;	SAVED IN THE TIME PERMITTED FOR POWER FAIL SAVE)
   4373					;
   4374					;	NOTE: A KL10 INITIATED FRONT-END RELOAD SIMULATES A POWER-FAIL
   4375					;	TRAP TO STOP THE FRONT-END
   4376					;
   4377					;	POWER DOWN ENTRY -- CONTROL IS TRANSFERRED HERE (VIA POWER
   4378					;	FAIL TRAP VECTOR) AT PRIORITY SEVEN.
   4379					;
   4380					;	STACK SUMMARY:
   4381					;
   4382					;	0(SP) -- POWERFAIL TRAP PC
   4383					;	2(SP) -- POWERFAIL TRAP PS
   4384					;	4(SP) -- BEGINNING OF INTERRUPTED PROCESS STACK
   4385					;-
   4386
   4387	020164				.PWRDN::
   4388	020164	052737 	006000 	001012'		BIS	#EF.PFR!EF.CRI,.COMEF+2 ; +++002 ALWAYS FLAG POWER FAIL (ALWAYS!)
   4389	020172	005237 	011370'			INC	.PFDBG		;[**]
   4390	020176	016646 	000002 			MOV	2(SP),-(SP)	;FIND THE PS
   4391	020202	042716 	177437 			BIC	#177437,@SP	;MASK OFF ALL BUT PRI
   4392	020206	022726 	000340 			CMP	#340,(SP)+	;IS IT PRI 7?
   4393	020212	001005 				BNE	10$		;NO -- THEN ACCEPT POWER FAIL
   4394	020214	005237 	001026'			INC	.PFAIL		;SET POWER FAIL ERROR
   4395	020220	105237 	001014'			INCB	.SERFG+0	; +++001 LEST WE FORGET...
   4396	020224	000006 				RTT			;RETURN TO CALLER
   4397
   4398	020226	013746 	000006 		10$:	MOV	@#6,-(SP)	;SAVE LOW CORE
   4399	020232	013746 	000004 			MOV	@#4,-(SP)
   4400	020236	012737 	020312'	000004 		MOV	#20$,@#4	;SET UP TO HALT IF FAKE POWER FAIL
   4401	020244	012737 	000340 	000006 		MOV	#340,@#6	;SET PRIORITY 7 IN ODD ADDRESS TRAP ADDRESS
   4402					;
   4403					; STACK SUMMARY:
   4404					;
   4405					;	 0(SP) -- SAVED ABSOLUTE 4
   4406					;	 2(SP) -- SAVED ABSOLUTE 6
   4407					;	 4(SP) -- POWERFAIL TRAP PC
PF -- POWER FAIL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 83-1
POWERFAIL -- POWER DOWN

   4408					;	 6(SP) -- POWERFAIL TRAP PS
   4409					;	10(SP) -- INTERRUPTED PROCESS STACK
   4410					;
   4411	020252	005737 	173000 			TST	.BM873		;IF NOT POWER FAIL THIS WILL TRAP TO 4
   4412									; AND IMMEDIATELY HALT AT "20$" BELOW,
   4413									; IN WHICH CASE THE TRAP PS/PC WILL BE ON STACK
   4414	020256	010046 				MOV	R0,-(SP)	;SAVE REGISTERS
   4415	020260	010146 				MOV	R1,-(SP)
   4416	020262	010246 				MOV	R2,-(SP)
   4417	020264	010346 				MOV	R3,-(SP)
   4418	020266	010446 				MOV	R4,-(SP)
   4419	020270	010546 				MOV	R5,-(SP)
   4420	020272	010637 	001032'			MOV	SP,PWRXSP	;SAVE STACK REGISTER
   4421	020276	012737 	020314'	000024 		MOV	#PWR.UP,@#24	;SET UP POWER UP TRAP VECTOR ADDRESS
   4422	020304	012737 	000006 	001034'		MOV	#6,CROBAR	; +++001 SET UP CROBAR COUNTER
   4423	020312	000000 			20$:	HALT
   4424					;
   4425					; CRASH (NON-POWERFAIL) STACK SUMMARY:
   4426					;
   4427					;	 0(SP) -- BM873 ROM TRAP PC
   4428					;	 2(SP) -- BM873 ROM TRAP PS
   4429					;	 4(SP) -- SAVED ABSOLUTE 4
   4430					;	 6(SP) -- SAVED ABSOLUTE 6
   4431					;	10(SP) -- POWERFAIL TRAP PC
   4432					;	12(SP) -- POWERFAIL TRAP PS
   4433					;	14(SP) -- INTERRUPTED PROCESS STACK
   4434					;
   4435					; THE TOP OF THIS STACK IS POINTED TO BY LOCATION 54 IN THE CRASH DUMP
PF -- POWER FAIL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 84
POWERFAIL -- POWER UP ENTRY

   4437						.SBTTL	POWERFAIL -- POWER UP ENTRY
   4438
   4439					;
   4440					;
   4441					;	POWER UP ENTRY
   4442					;
   4443	020314				PWR.UP::
   4444	020314	013706 	001032'			MOV	PWRXSP,SP	;RESTORE STACK POINTER
   4445	020320	012737 	020314'	000004 		MOV	#PWR.UP,@#4	; +++001 MAKE BUS TIMEOUT TRAP TO "PWR.UP"
   4446	020326	012737 	004340 	000006 		MOV	#4340,@#6
   4447	020334	005337 	001034'			DEC	CROBAR		; +++001 COUNT THIS ATTEMPT
   4448	020340	003003 				BGT	10$		; +++001 ALL OK IF STILL .GT. 0
   4449	020342					.CRASH	CBR		; +++001 CRASH IF MORE THAN ONE MINUTE
	020342	000004 				IOT
	020344	   103 	   102 	   122 		.ASCIZ	/CBR/
	020347	   000
   4450						;
   4451	020350				10$:
   4452	020350	013701 	001366'			MOV	.PRDTE,R1	; +++001 ADDRESS OF DTE20 TO R1
   4453	020354					CALL	20$		; +++001 WAIT FOR KL CROBAR
	020354	004737 	020474'			JSR	PC,20$
   4454	020360					CALL	20$		; +++001 AND BE VERY SURE OF IT
	020360	004737 	020474'			JSR	PC,20$
   4455	020364	012761 	000100 	000032 		MOV	#DRESET,DAG2(R1) ; +++001 RESET THE DTE20
   4456	020372	005037 	001026'			CLR	.PFAIL		;CLEAR POWER FAIL FLAG
   4457	020376	012737 	177777 	001030'		MOV	#-1,.PFIOW	;SET POWER FAIL BITS TO INTERRUPT ROUTINES
   4458	020404	012605 				MOV	(SP)+,R5	;RESTORE REGISTERS
   4459	020406	012604 				MOV	(SP)+,R4
   4460	020410	012603 				MOV	(SP)+,R3
   4461	020412	012602 				MOV	(SP)+,R2
   4462	020414	012601 				MOV	(SP)+,R1
   4463	020416	012600 				MOV	(SP)+,R0
   4464	020420	012637 	000004 			MOV	(SP)+,@#4	;RESTORE LOW CORE
   4465	020424	012637 	000006 			MOV	(SP)+,@#6
   4466	020430	012737 	020164'	000024 		MOV	#.PWRDN,@#24	;SET UP POWER DOWN TRAP AGAIN
   4467	020436	052737 	000100 	001126'		BIS	#KS.PFT,.KLITK	;FORCE POWER RESTART
   4468	020444	012737 	000401 	001122'		MOV	#401,.NOERR	;SET NO ERROR OR HALT
   4469	020452					CALL	..DTSP		;TURN OFF PROTOCOL TASKS
	020452	004737 	050226'			JSR	PC,..DTSP
   4470	020456	105237 	001124'			INCB	.TKTN		;TASK TERMINATION REQUEST
   4471	020462	152737 	000200 	001014'		BISB	#EV.PF,.SERFG+0	;INDICATE POWER FAIL & SIG EVENT
   4472	020470	000137 	015062'			JMP	..INTX		;RETURN TO INTERRUPTED ROUTINE
   4473						;
   4474	020474				20$:				; +++001
   4475	020474	012700 	000454 			MOV	#^D<5*60>,R0	; +++001 WAIT FOR CROWBAR TO SETTLE (5 SECONDS)
   4476	020500				30$:				; +++001
   4477	020500	105737 	177546 			TSTB	@#LKS		; +++001 CHECK WITH CLOCK
   4478	020504	100375 				BPL	30$		; +++001 WAIT FOR TICK
   4479	020506	105037 	177546 			CLRB	@#LKS		; +++001 CLEAR CLOCK FLAG
   4480	020512	077006 				SOB	R0,30$		; +++001 WAIT THE FULL COUNT
   4481	020514	005777 	160644 			TST	@.PRSTA		; +++001 LOOK AT DTE20 STATUS REGISTER
   4482									; +++001 IF NOT THERE (CROBAR TRUE) TRAP
   4483									; +++001 TO "PWR.UP", ELSE GO ON
   4484	020520					RETURN			; +++001 MADE IT -- RETURN
	020520	000207 				RTS	PC
PF -- POWER FAIL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 85
POWERFAIL -- POWER FAIL RESTART

   4486						.SBTTL	POWERFAIL -- POWER FAIL RESTART
   4487
   4488					;	.PFAIL INDICATES POWER FAIL IN PROGRESS
   4489					;	.PFIOW IS BIT ENCODED TO INDICATE POWER FAIL
   4490					;	OCCURED AND POWER UP RECOVERY IS NECESSARY
   4491
   4492	020522				.PFRST::
   4493	020522	000005 				RESET			; [**] DO A UNIBUS INIT
   4494	020524	013746 	000004 			MOV	@#4,-(SP)	; SAVE ABSOLUTE 4 (NEXM STOP)
   4495	020530	010046 				MOV	R0,-(SP)	; SAVE REGISTERS
   4496	020532	010146 				MOV	R1,-(SP)
   4497	020534	010246 				MOV	R2,-(SP)
   4498	020536	010346 				MOV	R3,-(SP)
   4499	020540	010446 				MOV	R4,-(SP)
   4500	020542	010546 				MOV	R5,-(SP)
   4501	020544	012737 	177777 	001030'		MOV	#-1,.PFIOW	; INDICATE POWER/FAIL TTY ENABLE
   4502	020552	012702 	002612'			MOV	#.SNDLP,R2	; [4.2205] INIT SENDALL POINTER
   4503	020556	012703 	000004 			MOV	#4,R3		; [4.2205] INIT SENDALL COUNTER
   4504	020562	005022 				CLR	(R2)+		; [4.2205] CLEAR SENDALL INDEX
   4505	020564				10$:
   4506	020564	005062 	000010 			CLR	10(R2)		; [4.2205] CLEAR SENDALL COUNT
   4507	020570	012200 				MOV	(R2)+,R0	; [4.2205] GET BUFFER POINTER
   4508	020572	001402 				BEQ	20$		; [4.2205] GO ON IF NULL
   4509	020574					CALL	..DECN		; [4.2205] DEALLOCATE THE BUFFER
	020574	004737 	046004'			JSR	PC,..DECN
   4510	020600				20$:
   4511	020600	077307 				SOB	R3,10$		; [4.2205] LOOP THROUGH ALL 4 NODES
   4512	020602					CALL	.DHTMO		; [4.2205] DO TIMEOUT
	020602	004737 	042030'			JSR	PC,.DHTMO
   4513	020606					CALL	.DLTMO
	020606	004737 	041520'			JSR	PC,.DLTMO
   4514	020612					CALL	.DMTMO
	020612	004737 	042336'			JSR	PC,.DMTMO
   4515	020616	005237 	006244'			INC	.LPPFL
   4516	020622	005237 	005736'			INC	.CRPFL
   4517	020626	005037 	002606'			CLR	.ABCNT
   4518	020632	005037 	002610'			CLR	.ABFLG
   4519	020636	105037 	001400'			CLRB	.PRPSE
   4520	020642	005037 	001030'			CLR	.PFIOW		; CLEAR POWER FAIL FLAG
   4521	020646	005037 	011370'			CLR	.PFDBG		;[**]
   4522	020652	012704 	000020 			MOV	#16.,R4		; SET UP TO RESTORE PARITY ERROR REGISTERS
   4523	020656	012705 	172100 			MOV	#.PARRG,R5	; SET UP THE ADDRESS OF THE REGISTERS
   4524	020662	012737 	020742'	000004 		MOV	#PARLOT,@#4	; [4.2249] SET UP 4 TO TRAP TO "PARLOT"
   4525
   4526						.ENABL	LSB
   4527
   4528	020670				PARLOA:
   4529	020670	012725 	000001 			MOV	#1,(R5)+	; [4.2249] ENABLE PARITY CHECKING
   4530	020674				10$:
   4531	020674	077403 				SOB	R4,PARLOA	; [4.2249] LOOP THROUGH ALL REGISTERS
   4532	020676	012605 				MOV	(SP)+,R5	; [4.2249] DONE -- RESTORE REGISTERS
   4533	020700	012604 				MOV	(SP)+,R4
   4534	020702	012603 				MOV	(SP)+,R3
   4535	020704	012602 				MOV	(SP)+,R2
   4536	020706	012601 				MOV	(SP)+,R1
   4537	020710	012600 				MOV	(SP)+,R0
   4538	020712	012637 	000004 			MOV	(SP)+,@#4	; [4.2249] RESTORE LOW CORE
PF -- POWER FAIL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 85-1
POWERFAIL -- POWER FAIL RESTART

   4539	020716	042737 	004000 	001012'		BIC	#EF.PFR,.COMEF+2 ; [4.2249] CLEAR POWERFAIL IN PROGRESS FLAG
   4540	020724	012737 	000100 	177546 		MOV	#.INTEN,@#LKS	; [4.2249] ENABLE CLOCK
   4542	020732	012777 	000400 	160424 		MOV	#TO10DB,@.PRSTA	; [4.2249] RING THE DOORBELL TO TELL 10 WE ARE HERE AND READY
   4544	020740					RETURN			; [4.2249] RETURN TO CALLER
	020740	000207 				RTS	PC
   4545					;
   4546					; HERE ON A TRAP FROM A NON-EXISTENT PARITY REGISTER
   4547					;
   4548	020742				PARLOT:
   4549	020742	032626 				BIT	(SP)+,(SP)+	; [4.2249] FLUSH THE TRAP PS/PC
   4550	020744	000753 				BR	10$		; [4.2249] AND CONTINUE THROUGH ALL REGISTERS
   4551						;
   4552
   4553						.DSABL	LSB
PF -- POWER FAIL HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 86
POWERFAIL -- POWER FAIL RESTART

   4555
   4556
   4557						.TITLE	DMDTE	- DTE DIRECTIVES MODULE
   4558						.SBTTL	DTE DIRECTIVES -- COPYRIGHT STATEMENT
   4559	020746					IDENT$	RSX$$V,RSX$$E,RSX$$F
						.IDENT	/B15500/
   4560					;
   4561					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   4562					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4563					;			ALL RIGHTS RESERVED.
   4564					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4565					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4566					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4567					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4568					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4569					;
   4570					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4571					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4572					;       CORPORATION.
   4573					;
   4574					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4575					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4576					;
   4577					;		MODULE: "DTE20" DIRECTIVE
   4578					;
   4579					;		VERSION: 14-45
   4580					;
   4581					;		AUTHOR: R. MCLEAN
   4582					;
   4583					;		DATE: 19 MAR 75
   4584					;
   4585					;
   4586					;	THIS MODULE CONTAINS:
   4587					;
   4588					;	1 --  CODE TO SERVICE THE DTE20 EMT SERVICE
   4589					;
   4590					; MODIFICATIONS:
   4591					;
   4592					;	NO.	DATE		PROGRAMMER	PURPOSE
   4593					;	---	----		----------	-------
   4594					;	001	14-MAR-77	R. BELANGER	CONDITIONALLY REMOVE UNUSED
   4595					;						DTE-20 EMT SERVICES
   4596					;	002	01-APR-77	A. PECKHAM	FIX BUG IN "$DTEON"
   4597					;	003	18-AUG-77	R. BELANGER	FIX "$DTEON" TO RETURN CORRECT STATUS
   4598					;						AND NOT START PRIMARY PROTOCOL IF
   4599					;						"..SWED" FAILS.
   4600					;	004	21-FEB-78	R. BELANGER	FIX "$DTEON" TO SET UP
   4601					;						"PROTBL" PROPERLY.
   4602					;  TCO 4.2107	06-DEC-78	R. BELANGER	INITIALIZE KEEP-ALIVE DATA-BASE
   4603					;						IN "$DTEON".
   4604					; TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
   4605					; TCO 4.1.1121	19-MAR-80	R. BELANGER	SUPPORT BLOCKED DTE-20
   4606					; TCO 4.1.1137	05-APR-80	R. BELANGER	REMOVE RESTRICTED DTE-20 SUPPORT
   4607					;
   4608					;19-JAN-83  TCO 6.1508	D. WEAVER
   4609					;	GET THE CPU NUMBER OF THE KL WE ARE RUNNING AND STORE IN .KLCPU
   4610					;	SO WE CAN DO WARM RESTART ON SMP SYSTEMS (USED BY KLINIT)
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 86-1
DTE DIRECTIVES -- COPYRIGHT STATEMENT

   4611					;
   4612
   4613					;	MACRO CALLS
   4614
   4615						.MCALL	CALL,RETURN,MFPI,MTPI,MFPS,MTPS,.CRASH,.INH,.ENB,$DEF
   4616
   4617	020746					$DEF
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 87
DTE20 EMT DISPATCH DECODER

   4619						.SBTTL	DTE20 EMT DISPATCH DECODER
   4620					;
   4621					;	CALLED BY EMT DISPATCH
   4622					;	THIS ROUTINE DECODES THE SPECIFIC DTE FUNCTION CODE
   4623					;	AND DISPATCHES TO THE CORRECT FUNCTION
   4624					;
   4625					;	ENTRY CONDITIONS:
   4626					;
   4627					;	R1 -- ADDRESS OF DPB
   4628					;	R2 -- SIZE OF DPB
   4629					;	R3 -- DIRECTIVE IDENTIFICATION CODE
   4630					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   4631					;
   4632					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4633					;
   4634					;	R0,R1,R2,R3,R4,R5
   4635					;
   4636					;	REGISTERS FOR USER AND DOES NOT REQUIRE EMT SERVICE
   4637					;	ROUTINES TO SAVE EMT'S REGISTERS.
   4638					;
   4639					;	EXIT TO DTE EMT SERVICE ROUTINE CONDITIONS:
   4640					;
   4641					;	3(SP) -- FUNCTION CODE PLUS HIGH ORDER BYTE OF SECOND WORD  OF DPB
   4642					;	R0 -- POINTER TO EXAMINE/DEPOSIT ADDRESSES
   4643					;	R1 -- WORD 5 OF DPB
   4644					;	R2 -- WORD 3 OF DPB
   4645					;	R3 -- WORD 4 OF DPB
   4646					;	R4 -- ADDRESS OF DPB
   4647					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   4648					;
   4649					;
   4650					;
   4651	020746				.D.DTE::
   4652	020746	005046 				CLR	-(SP)
   4653	020750	005046 				CLR	-(SP)
   4654	020752	010146 				MOV	R1,-(SP)	;SAVE POINTER TO DPB FOR R4
   4655	020754					MFPS	(R1)+,R0	;PUT THE FUNCTION CODE IN R0
	020754	012100 				MOV	(R1)+,R0
   4656	020756	150066 	000002 			BISB	R0,2(SP)
   4657	020762	105000 				CLRB	R0
   4658	020764	010066 	000004 			MOV	R0,4(SP)
   4659	020770	010204 				MOV	R2,R4		;SAVE SIZE OF DPB
   4660	020772	005046 				CLR	-(SP)		;SET DEFAULT PROCESSOR NUMBER
   4661	020774	162704 	000002 			SUB	#2,R4		;CHECK COUNT OF PARAMETERS
   4662	021000	001407 				BEQ	10$		;IF ZERO REGISTERS DON'T NEED BE SET UP (NO PARAMS)
   4663	021002					MFPS	(R1)+,R2	;MOVE THE CPU ADDRESS
	021002	012102 				MOV	(R1)+,R2
   4664	021004					MFPS	(R1)+,R3	;MOVE IN OFFSET ADDRESS TO COMM AREA
	021004	012103 				MOV	(R1)+,R3
   4665	021006	162704 	000002 			SUB	#2,R4		;CHECK TO SEE IF CPU PARAMETER
   4666	021012	001402 				BEQ	10$		;NO -- DON'T ATTEMPT TO SET REGISTER
   4667	021014					MFPS	(R1)+,@SP	;YES -- SET CPU NUMBER
	021014	012116 				MOV	(R1)+,@SP
   4668	021016	001031 				BNE	CPUERR		; [4.1.1137] ERROR IF NOT CPU 0
   4669	021020				10$:
   4670	021020	012601 				MOV	(SP)+,R1	;SET CPU NUMBER
   4671	021022	012604 				MOV	(SP)+,R4
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 87-1
DTE20 EMT DISPATCH DECODER

   4672	021024	012700 	001244'			MOV	#PROTBL,R0	; [4.1.1137] FIND PROCESSOR BLOCK
   4673	021030	006316 				ASL	@SP		;MULTIPLY FUNCTION CODE BY 2 TO FORM OFFSET
   4674	021032	062716 	021042'			ADD	#DTEDSP-2,@SP	;POINT INTO DISPATCH TABLE
   4675	021036	017616 	000000 			MOV	@(SP),@SP
   4676	021042	000136 				JMP	@(SP)+		;GO TO ROUTINE AND REMOVE ELEMENTFROM STACK
   4677						;
   4678	021044	021104'			DTEDSP:	.WORD	$DORBL		;RING DORBELL (FUNCTION CODE 1)
   4679	021046	021106'				.WORD	$DTEOF		;TURN OFF DTE20 (FUNCTION CODE 2)
   4680	021050	021114'				.WORD	$DTEON		;TURN ON DTE20 (FUNCTION CODE 3)
   4681	021052	021536'				.WORD	$DPMYG		;DEPOSIT MY GENERAL SECTION (FUNCTION CODE 4)
   4682	021054	021570'				.WORD	$EXMYG		;EXAMINE MY GENERAL SECTION (FUNCTION CODE 5)
   4683	021056	021600'				.WORD	$EXMYN		;EXAMINE MY SECTION FOR CPU N (FUNCTION CODE 6)
   4684	021060	021606'				.WORD	$DPMYN		;DEPOSIT MY SECTION FOR CPU N (FUNCTION CODE 7)
   4685	021062	021614'				.WORD	$EXHSG		;EXAMINE HIS GENERAL COMM (FUNCTION CODE 10)
   4686	021064	021622'				.WORD	$EXHSM		;EXAMINE HIS SECTION FOR ME (FUNCTION CODE 11)
   4687	021066	021630'				.WORD	$KLDFR		;START KL10 DIAGNOSTIC FUNCTION READ
   4688	021070	021770'				.WORD	$KLDFW		;START KL10 DIAGNOSTIC FUNCTION WRITE
   4689	021072	021746'				.WORD	$KLDFX		;START KL10 DIAGNOSTIC FUNCTION (FUNCTION CODE 12)
   4690	021074	022102'				.WORD	$PRVEX		;PRIVILEDGED EXAMINE (FUNCTION 13)
   4691	021076	022066'				.WORD	$PRVDP		;PRIVILEDGED DEPOSIT (FUNCTION 14)
   4692	021100	022136'				.WORD	$RWDRG		;READ/WRITE DIAGNOSTIC REGISTER (FUNCTION 15)
   4693						;
   4694	021102				CPUERR:
   4695	021102	104776 				TRAP	DE.02		; ILLEGAL CPU
   4696						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 88
$DORBL -- RING THE KL-10 DOORBELL

   4698						.SBTTL	$DORBL -- RING THE KL-10 DOORBELL
   4699
   4700					;+
   4701					;	$DORBL -- RING THE DOORBELL OF THE KL-10 SPECIFIED
   4702					;
   4703					;		* * *  U N S U P P O R T E D  F U N C T I O N  * * *
   4704					;
   4705					;-
   4706
   4707	021104				$DORBL::
   4724
   4725	021104	104635 				TRAP	DE.99		; +++001 THIS ISN'T HERE
   4726						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 89
$DTEOF -- TURN THE DTE20 OFF

   4729						.SBTTL	$DTEOF -- TURN THE DTE20 OFF
   4730
   4731					;+
   4732					;	$DTEOF -- TURN OFF THE DTE20
   4733					;
   4734					;	CALLING SEQUENCE:
   4735					;
   4736					;	JMP	$DTEOF
   4737					;
   4738					;	EXIT CONDITIONS:
   4739					;
   4740					;	R0 --1 TO INDICATE SUCCESS
   4741					;	CC-C CLEAR TO INDICATE SUCCESS
   4742					;
   4743					;	ERROR CONDITIONS: NONE
   4744					;
   4745					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4746					;-
   4747
   4748	021106				$DTEOF::
   4761	021106					CALL	..DTP2		;+ START UP SECONDARY PROTOCOL.
	021106	004737 	050244'			JSR	PC,..DTP2
   4762	021112	104401 				TRAP	DR.01		;RETURN STATUS OK
   4763						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 90
$DTEON -- TURN THE DTE20 ON

   4765						.SBTTL	$DTEON -- TURN THE DTE20 ON
   4766
   4767					;+
   4768					;	$DTEON -- TURN ON THE DTE20
   4769					;	THIS ROUTINE WILL SET UP THE TABLES NECESSARY TO
   4770					;	INITALIZE THE COMMUNICATON BETWEEN THE PDP10 AND PDP11'S
   4771					;
   4772					;	CALLING SEQUENCE:
   4773					;
   4774					;	JMP	$DTEON
   4775					;
   4776					;	EXIT CONDITIONS:
   4777					;
   4778					;	R0 --1 TO INDICATE SUCCESS
   4779					;	CC-C CLEAR TO INDICATE SUCCESS
   4780					;
   4781					;	ERROR CONDITIONS:
   4782					;
   4783					;	R0 -2 -- E BOX STOPPED
   4784					;	CC-C SET
   4785					;
   4786					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4787					;-
   4788
   4789	021114				$DTEON::
   4790	021114	010546 				MOV	R5,-(SP)
   4791	021116	011000 				MOV	(R0),R0		;;; [4.1.1137] FIND THE COMMON DTE20
   4792	021120	005001 				CLR	R1		;;;SET UP TO FIND PROCESSOR NUMBER
   4793	021122	005002 				CLR	R2		;;;START TRANSFER OF ABS WORD 0 OF EPT (MY PROCESSOR NUMBER
   4794	021124	012703 	001354'			MOV	#DEXTM3,R3	;;;SET UP ADDRESS TO STORE WORDS
   4795	021130					CALL	..SWED		;;; [4.1.1121] WAIT FOR EXAMINE/DEPOSIT
	021130	004737 	050126'			JSR	PC,..SWED
   4796	021134	103417 				BCS	1$		;;;E BOX STOP
   4797	021136	011304 				MOV	@R3,R4		;;;YES --FIND OFFSET TO MY R/W AREA
   4798	021140	113702 	001357'			MOVB	@#DEXTM2+1,R2	;;;FIND THE PROCESSOR NUMBER
   4799									;;; PROCESSOR NUMBER TO LOW ORDER BITS
   4800	021144	042702 	177740 			BIC	#^C37,R2	;;;MASK OFF JUNK(0.-31. LEGAL)
   4801	021150	010237 	001240'			MOV	R2,PRMEMN	;;;SAVE PROCESSOR NUMBER
   4802	021154	005202 				INC	R2		;;;FIND COMMUNICATIONS VIRTUAL 2
   4803	021156	010237 	001236'			MOV	R2,COMBSE	;;;SAVE BASE OF COMMUNICATIONS AREA
   4804	021162	060402 				ADD	R4,R2		;;;ADD OFFSET TO BASE OF COMM AREA
   4805	021164	010237 	001242'			MOV	R2,DEPOF	;;;SET CORRECT OFFSETT
   4806	021170					CALL	..SWED		;;; [4.1.1121] WAIT FOR TRANSFER
	021170	004737 	050126'			JSR	PC,..SWED
   4807	021174				1$:
   4808	021174	103555 				BCS	80$		;;; +++003
   4809	021176				2$:
   4810	021176	013705 	001356'			MOV	@#DEXTM2,R5	;;;PICK UP THE NUMBER OF 8 TM BLOCKS
   4811	021202	042705 	177770 			BIC	#177770,R5	;;;FIND THE NUMBER OF 8 WORD BLOCKS IN MY AREA
   4812	021206	162705 	000002 			SUB	#2,R5		;;;ACCOUNT FOR MY GENERAL SECTION
   4813	021212	010246 				MOV	R2,-(SP)
   4814	021214	010546 				MOV	R5,-(SP)	;;;SAVE COUNT OF BLOCKS
   4815	021216	062702 	000002 			ADD	#CPUNUM,R2	;;;[TCO?] GET THE CPU # OF OUR KL
   4816	021222					CALL	..SWED		;;;WAIT FOR TRANSFER
	021222	004737 	050126'			JSR	PC,..SWED
   4817	021226	113737 	001354'	001176'		MOVB	DEXTM3,.KLCPU	;;;SAVE CPU NUMBER FOR KLINIT
   4818	021234	113737 	001360'	001177'		MOVB	DEXTM1,.KLMON	;;;SAVE MONITOR TYPE (FOR FUTURE)
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 90-1
$DTEON -- TURN THE DTE20 ON

   4819	021242				16$:
   4820									;;; +++002
   4821	021242	062766 	000020 	000002 		ADD	#FORPRO,2(SP)	;;;LOOK AT A COMMUNICATIONS AREA TO ANOTHER PROCESSOR
   4822	021250	016602 	000002 			MOV	2(SP),R2
   4823	021254					CALL	..SWED		;;; [4.1.1121] WAIT FOR TRANSFER
	021254	004737 	050126'			JSR	PC,..SWED
   4824	021260	103523 				BCS	80$		;;; +++003 E BOX STOPPED
   4825	021262	011304 				MOV	@R3,R4		;;;FIND PROCESSOR NUMBER
   4826	021264	012705 	001244'			MOV	#PROTBL,R5	;SET INITIAL POINTER
   4827	021270	042704 	177770 			BIC	#177770,R4	;;;MASK OFF JUNK
   4828
   4835
   4836	021274				19$:
   4837	021274	013704 	001356'			MOV	@#DEXTM2,R4	;;;FIND NUMBER OF 8 WORD BLOCS
   4838	021300	042704 	177770 			BIC	#177770,R4	;;;MASK OFF POSSIBLE GARBAGE
   4839	021304	160416 				SUB	R4,@SP		;;;UPDATE COUNT OF BLOCKS
   4840	021306	005015 				CLR	@R5		;;;SET UP TO CLEAR TABLE IF NO DTE
   4841	021310	013704 	001360'			MOV	@#DEXTM1,R4	;;;PICK UP DTE NUMBER
   4842	021314	032704 	000004 			BIT	#4,R4		;;;DTE HERE?
   4843	021320	001422 				BEQ	20$		;;;NO -- DON'T ENTER IN TABLE
   4844	021322	000304 				SWAB	R4		;;;MAKE MOD 40 (8)
   4845	021324	006004 				ROR	R4
   4846	021326	006004 				ROR	R4
   4847	021330	006004 				ROR	R4
   4848	021332	042704 	177637 			BIC	#177637,R4	;;;MASKOFF JUNK
   4849	021336	062704 	174400 			ADD	#174400,R4	;;;POINT TO FIRST BLOCK OF DTE'S
   4850	021342	020437 	001366'			CMP	R4,.PRDTE	;;;PRIMARY DTE?
   4851	021346	001002 				BNE	10$		;;;NO -- DON'T SET TABLE POINTER
   4852	021350	010537 	001362'			MOV	R5,.PRADR	;;;SAVE TABLE OFFSET
   4853	021354				10$:
   4854	021354	010415 				MOV	R4,@R5		;;;SET DTE ADDRESS IN TABLE
   4855	021356	005014 				CLR	@R4		 ;;; [4.1.1105] SET UP DELAY COUNTER
   4856	021360	012764 	000040 	000034 		MOV	#INTRON,STATD(R4) ;;;YES -- ENABLE INTERRUPT ON IT
   4857	021366				20$:
   4858	021366	010265 	000002 			MOV	R2,EMYN(R5) 	;;;SET THE ADDRESS OF EXAMINE MY AREA FOR N
   4859									;;;MAKE ADDRESS OF THE ADDRESS OF DEPOSIT MY AREA FOR N
   4860	021372	010265 	000004 			MOV	R2,DMYN(R5) 	;;;STORE IT
   4861	021376	163765 	001242'	000004 		SUB	DEPOF,DMYN(R5) 	;;;RESTORE ADDRESS FOR EXAMINE OF THIS BLOCK
   4862	021404	062702 	000001 			ADD	#PROPNT-FORPRO,R2 ;;;READ POINTER TO HIS COMM AREA
   4863	021410					CALL	..SWED		;;; [4.1.1121] WAIT FOR EXAMINE/DEPOSIT
	021410	004737 	050126'			JSR	PC,..SWED
   4864	021414	103445 				BCS	80$		;;; +++003 E BOX STOPPED
   4865	021416	011302 				MOV	@R3,R2		;;;FIND THE EXAMINE ADDRESS
   4866	021420	063702 	001236'			ADD	COMBSE,R2	;;;ADD OFFSET TO COMMON AREA
   4867	021424	010265 	000006 			MOV	R2,EHSG(R5) 	;;;SET EHSG ADDRESS IN TABLE
   4868	021430	062702 	000020 			ADD	#FORPRO,R2	;;;POINT TO HIS FIRST TABLE FOR OTHER PROCESSORS
   4869	021434				50$:
   4870	021434					CALL	..SWED		;;; [4.1.1121] WAIT FOR EXAMINE/DEPOSIT
	021434	004737 	050126'			JSR	PC,..SWED
   4871	021440	103433 				BCS	80$		;;; +++003
   4872	021442	123713 	001240'			CMPB	PRMEMN,@R3 	;;;SAME PROCESSOR NUMBER?
   4873	021446	001411 				BEQ	60$		;;;YES -- FOUND MY ENTRY
   4874	021450	013704 	001356'			MOV	@#DEXTM2,R4	;;;NO -- FIND NEXT ENTRY IN LIST
   4875	021454	042704 	177770 			BIC	#177770,R4	;;;IT IS IN 8 WORD INCREMENTS
   4876	021460	006304 				ASL	R4		;;;SO IT MUST BE SHIFTED LEFT 3 BITS
   4877	021462	006304 				ASL	R4		;;;
   4878	021464	006304 				ASL	R4		;;;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 90-2
$DTEON -- TURN THE DTE20 ON

   4879	021466	060402 				ADD	R4,R2		;;;READ NEXT BLOCK
   4880	021470	000761 				BR	50$		;;;AND TRY AGAIN
   4881						;
   4882	021472				60$:
   4883	021472	010265 	000010 			MOV	R2,EHSM(R5)	;;;STORE EHSM ADDRESS
   4884	021476	011605 				MOV	@SP,R5		;;;DONE ALL BLOCKS??
   4885	021500	101260 				BHI	16$		;;; +++002 NO -- TRY NEXT BLOCK
   4886	021502				70$:
   4887	021502	112737 	000005 	001416'		MOVB	#.KALSC,.KPAC+0	;;; [4.2107] INIT KEEP-ALIVE TIMER
   4888	021510	112737 	000001 	001417'		MOVB	#1,.KPAC+1	;;; [4.2107] AND RETRY COUNTER
   4889	021516	013737 	001404'	001412'		MOV	KPAL0,OKPAL0	;;; [4.2107] INIT LAST KEEP ALIVE COUNT
   4890	021524					CALL	..DTP1		;;;START THE PRIMARY PROTOCOL TASK
	021524	004737 	050274'			JSR	PC,..DTP1
   4891	021530				80$:				;;; +++003
   4892	021530	012605 				MOV	(SP)+,R5	;;; +++003 RESTORE R5
   4893	021532	000137 	013710'			JMP	.DR.NS		;RETURN STATUS IN R0
   4894						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 91
$DPMYG -- DEPOSIT INTO MY GENERAL SECTION

   4896						.SBTTL	$DPMYG -- DEPOSIT INTO MY GENERAL SECTION
   4897
   4898					;+
   4899					;	$DPMYG -- DEPOSIT INTO MY GENERAL SECTION WITH PROCESSOR N
   4900					;
   4901					;	ENTRY CONDITIONS:
   4902					;
   4903					;	R2 -- ADDRESS OF PDP-10 LOCATION TO TRANSFER  RELATIVE TO MY GEN REGION
   4904					;	R3 -- ADDRESS OF PDP-11 CORE ADDRESS TO WRITE FROM
   4905					;	CALLING SEQUENCE:
   4906					;
   4907					;	JMP		$DPMYG
   4908					;
   4909					;	EXIT CONDITIONS:
   4910					;
   4911					;	R0 -- +1 TRANSFER COMPLETED
   4912					;	CC-C CLEAR -- TRANSFER COMPLETED
   4913					;
   4914					;	ERROR CONDITIONS:
   4915					;
   4916					;	CC-C SET
   4917					;
   4918					;	R0 -2  -- E BOX STOPPED
   4919					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   4920					;
   4921					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4922					;-
   4923
   4924	021536				$DPMYG::
   4925	021536	005001 				CLR	R1
   4926	021540				DPCMN:
   4927	021540	052701 	010000 			BIS	#DEP,R1		;;;SET DEPOSIT BIT IN ADDRESS WORD
   4928	021544				CMEDP:
   4929	021544	005737 	001012'			TST	.COMEF+2	;;; [4.1.1105] PRIMARY PROTOCOL RUNNING?
   4930	021550	100006 				BPL	DPMSEP		;;; [4.1.1105] NO -- ERROR
   4931	021552	011000 				MOV	@R0,R0		;;;FIND DTE20 ADDRESS
   4932	021554					CALL	..SWED		;;; [4.1.1121] WAIT FOR EXAMINE/DEPOSIT
	021554	004737 	050126'			JSR	PC,..SWED
   4933	021560	103401 				BCS	DPSEC		;;;ERROR -2
   4934	021562	104401 				TRAP	DR.01
   4935						;
   4936	021564				DPSEC:
   4937	021564	104776 				TRAP	DE.02		;E BOX STOPPED
   4938						;
   4939	021566				DPMSEP:
   4940	021566	104775 				TRAP	DE.03		;SECONDARY PROTOCOL IN USE
   4941						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 92
$EXMYG -- EXAMINE MY GENERAL SECTION

   4943						.SBTTL	$EXMYG -- EXAMINE MY GENERAL SECTION
   4944
   4945					;+
   4946					;	$EXMYG -- EXAMINE MY (PDP-11) GENERAL SECTION
   4947					;
   4948					;	ENTRY CONDITIONS:
   4949					;
   4950					;	R2 -- ADDRESS OF A PDP10 ADDRESS TO EXAMINE RELATIVE TO THE BASE OF MY GENERAL SECTION
   4951					;	R3 -- ADDRESS OF THE THREE WORD BLOCK TO TRANSFER TO
   4952					;
   4953					;	CALLING SEQUENCE:
   4954					;
   4955					;	JMP	$EXMYG
   4956					;
   4957					;	EXIT CONDITIONS:
   4958					;
   4959					;	R0 -- +1 SUCCESS
   4960					;	CC-C CLEAR -- SUCCESS
   4961					;
   4962					;	ERROR CONDITIONS:
   4963					;
   4964					;	CC-C SET
   4965					;
   4966					;	R0 -2 -- E BOX STOPPED
   4967					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   4968					;
   4969					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4970					;-
   4971
   4972	021570				$EXMYG::
   4973	021570	063702 	001242'			ADD	DEPOF,R2	;ADD DEPOSIT OFFSET TO EXAMINE ADDRESS
   4974	021574				EXCMN:
   4975	021574	005001 				CLR	R1		;;;CLEAR HIGH ORDER 10 ADDRESS (FORCES EXAMINE)
   4976	021576	000762 				BR	CMEDP
   4977						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 93
$EXMYN -- EXAMINE MY SECTION FOR PROCESSOR N

   4979						.SBTTL	$EXMYN -- EXAMINE MY SECTION FOR PROCESSOR N
   4980
   4981					;+
   4982					;	$EXMYN -- EXAMINE MY SECTION FOR COMMUNICATING WITH PROCESSOR N
   4983					;
   4984					;	ENTRY CONDITIONS:
   4985					;
   4986					;	R2 -- ADDRESS WORD WITHIN REGION TO EXAMINE
   4987					;	R3 -- PDP-11 CORE ADDRESS
   4988					;
   4989					;	CALLING SEQUENCE:
   4990					;
   4991					;	JMP	$EXMYN
   4992					;
   4993					;	EXIT CONDITIONS:
   4994					;
   4995					;	R0 -- +1 - SUCCESS
   4996					;	CC-C CLEAR -- SUCCESS
   4997					;
   4998					;	ERROR CONDITIONS:
   4999					;
   5000					;	CC-C SET
   5001					;	R0 -1 -- ILLEGAL CPU NUMBER
   5002					;	R0 -2 -- E BOX STOPPED
   5003					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   5004					;
   5005					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5006					;-
   5007
   5008	021600				$EXMYN::
   5009	021600	066002 	000002 			ADD	EMYN(R0),R2	;SET CALCULATED ADDRESS TO COMM AREA
   5010	021604	000773 				BR	EXCMN		;GO TO COMMON AREA
   5011						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 94
$DPMYN -- DEPOSIT INTO MY SECTION FOR COMM WITH PROCESSOR N

   5013						.SBTTL	$DPMYN -- DEPOSIT INTO MY SECTION FOR COMM WITH PROCESSOR N
   5014
   5015					;+
   5016					;	$DPMYN --  DEPOSIT INTO MY SECTION FOR COMMUNICATING WITH PROCESSOR N
   5017					;
   5018					;	ENTRY CONDITIONS:
   5019					;
   5020					;	R2 -- ADDRESS WORD WITHIN REGION TO DEPOSIT
   5021					;	R3 -- ADDRESS IN PDP-11 TO TRANSFER FROM
   5022					;
   5023					;	CALLING SEQUENCE:
   5024					;
   5025					;	JMP	$DPMYN
   5026					;
   5027					;	EXIT CONDITIONS:
   5028					;
   5029					;	R0 -- +1 -SUCCESS
   5030					;	CC-C CLEAR - SUCCESS
   5031					;
   5032					;	ERROR CONDITIONS:
   5033					;
   5034					;	CC-C SET
   5035					;	R0 -1 -- ILLEGAL CPU NUMBER
   5036					;	R0 -2 -- E BOX STOPPED
   5037					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   5038					;
   5039					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5040					;-
   5041
   5042	021606				$DPMYN::
   5043	021606	066002 	000004 			ADD	DMYN(R0),R2	;FIND CORRECT ADDRESS IN COMMON AREA
   5044	021612	000752 				BR	DPCMN		;DEPOSIT IN COMMON AREA
   5045						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 95
$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION

   5047						.SBTTL	$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION
   5048
   5049					;+
   5050					;	$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION
   5051					;
   5052					;	ENTRY CONDITIONS:
   5053					;
   5054					;	R2 -- WORD NUMBER IN HIS GENERAL SECTION
   5055					;	R3 -- ADDRESS TO STORE EXAMINE
   5056					;
   5057					;	CALLING SEQUENCE:
   5058					;
   5059					;	JMP	$EXHSG
   5060					;
   5061					;	EXIT CONDITIONS:
   5062					;
   5063					;	R0 -- +1 - SUCCESS
   5064					;	CC-C CLEAR - SUCCESS
   5065					;
   5066					;	ERROR CONDITIONS:
   5067					;
   5068					;	R0 -1 -- ILLEGAL CPU NUMBER
   5069					;	R0 -2 -- EBOX STOPPED
   5070					;	R0 -3  -- SECONDARY PROTOCOL IN USE
   5071					;
   5072					;	CC-C SET
   5073					;
   5074					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5075					;-
   5076
   5077	021614				$EXHSG::
   5078	021614	066002 	000006 			ADD	EHSG(R0),R2	;FIND OFFSET TO COMMUNICATIONS AREA
   5079	021620	000765 				BR	EXCMN		;GO TO COMMON EXAMINE
   5080						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 96
$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME

   5082						.SBTTL	$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME
   5083
   5084					;+
   5085					;	$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME
   5086					;
   5087					;	ENTRY CONDITIONS:
   5088					;
   5089					;	R2 -- ADDRESS OF WORD WITHIN REGION TO EXAMINE
   5090					;	R3 -- ADDRESS TO STORE PDP-10 WORD
   5091					;
   5092					;	CALLING SEQUENCE:
   5093					;
   5094					;	JMP	$EXHSM
   5095					;
   5096					;	EXIT CONDITIONS:
   5097					;
   5098					;	R0 -- +1 - SUCCESS
   5099					;	CC-C CLEAR - SUCCESS
   5100					;
   5101					;	ERROR CONDITIONS:
   5102					;
   5103					;	CC-C SET
   5104					;	R0 -1 -- ILLEGAL CPU NUMBER
   5105					;	R0 -2 -- E BOX STOPPED
   5106					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   5107					;
   5108					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5109					;-
   5110
   5111	021622				$EXHSM::
   5112	021622	066002 	000010 			ADD	EHSM(R0),R2	;FIND OFFSET INTO COMM AREA
   5113	021626	000762 				BR	EXCMN		;GO TO EXAMINE
   5114						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 97
$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION

   5116						.SBTTL	$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION
   5117
   5118					;+
   5119					;	$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION
   5120					;
   5121					;	THIS FUNCTION WILL LOAD AND READ THE EBUS.
   5122					;	IT DOES A DATA SEND OPERATION IF IT IS A WRITE FUNCTION
   5123					;	AND IT ALWAYS RETURNS THE STATUS OF THE DIAGNOSTIC REGISTERS
   5124					;	AND EBUS (DEXWD1-3) AFTER EACH FUNCTION.
   5125					;
   5126					;	ENTRY CONDITIONS:
   5127					;
   5128					;	00(SP) -- FUNCTION TO BE EXECUTED (BITS 15-9)
   5129					;	R3 -- ADDRESS OF FOUR WORD BLOCK TO STORE DIAG1-3
   5130					;	R2 -- PDP11 6 WORD BLOCK THE FIRST 3 WORDS ARE
   5131					;	USED TO STORE THE CONTENTS IN THE E BUS THE SECOND 3 WORDS
   5132					;	ARE USED TO STORE THE RESULTS OF THE DIAGNOSTIC FUNCTION E BUS
   5133					;
   5134					;	CALL	$KLDFX
   5135					;
   5136					;	EXIT CONDITIONS:
   5137					;
   5138					;	CC-C CLEAR
   5139					;	R0 -- +1 -- SUCCESS
   5140					;
   5141					;	ERROR CONDITIONS:
   5142					;
   5143					;	-2 -- FUNCTION FAILED
   5144					;
   5145					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5146					;
   5147					;-
   5148
   5149	021630				$KLDFR::
   5150	021630	011001 				MOV	(R0),R1		; [4.1.1137] POINT TO THE DTE-20
   5151	021632	012600 				MOV	(SP)+,R0	;RESTORE FUNCTION
   5152	021634					CALL	CESCHK		;RESET DTE-20 IF CLOCK ERROR STOP
	021634	004737 	022166'			JSR	PC,CESCHK
   5153	021640	042700 	000777 			BIC	#777,R0		;MASK OFF FUNCTION CODE
   5154	021644	052700 	000211 			BIS	#DIKL10!DCOMST!DFUNC,R0 ;SET DIAGNOSTIC FUNCTION START BITS
   5155	021650	062702 	000006 			ADD	#6,R2		;DON'T DO THE E BUS WRITE
   5156	021654				KLCST:
   5157	021654	010061 	000030 			MOV	R0,DAG1(R1)	;START FUNCTION
   5158	021660	012737 	003000 	001352'		MOV	#3000,DEXST	;TIME OUT FUNCTION
   5159	021666				10$:
   5160	021666	032761 	000001 	000030 		BIT	#DCOMST,DAG1(R1) ;WAIT FOR THE FUNCTION TO COMPLETE
   5161	021674	001404 				BEQ	22$
   5162	021676	005337 	001352'			DEC	DEXST		;COUNT DOWN
   5163	021702	100371 				BPL	10$
   5164	021704	104776 				TRAP	DE.02		;TRAP ERROR
   5165						;
   5166	021706				22$:
   5167	021706					MTPS	DXWD3(R1),(R2)+	;STORE THE FOUND WORD IN PDP11
	021706	016122 	000002 			MOV	DXWD3(R1),(R2)+
   5168	021712					MTPS	DXWD2(R1),(R2)+
	021712	016122 	000004 			MOV	DXWD2(R1),(R2)+
   5169	021716					MTPS	DXWD1(R1),(R2)+
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 97-1
$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION

	021716	016122 	000006 			MOV	DXWD1(R1),(R2)+
   5170	021722	005703 				TST	R3		;ANYWHERE TO STORE?
   5171	021724	001407 				BEQ	20$		;NO -- FORGET IT
   5172	021726	010104 				MOV	R1,R4		; YES -- POINT TO THE DTE-20
   5173	021730	062704 	000030 			ADD	#DAG1,R4	; DIAGNOSTIC REGISTERS
   5174	021734					MTPS	(R4)+,(R3)+	;STORE DIAGNOSITC REGISTERS
	021734	012423 				MOV	(R4)+,(R3)+
   5175	021736					MTPS	(R4)+,(R3)+
	021736	012423 				MOV	(R4)+,(R3)+
   5176	021740					MTPS	(R4)+,(R3)+
	021740	012423 				MOV	(R4)+,(R3)+
   5177	021742					MTPS	(R4)+,(R3)+
	021742	012423 				MOV	(R4)+,(R3)+
   5178	021744				20$:
   5179	021744	104401 				TRAP	DR.01		;SET OK RETURN TO CALLER
   5180						;
   5181	021746				$KLDFX::
   5182	021746	011001 				MOV	(R0),R1		; [4.1.1137] POINT TO THE DTE-20
   5183	021750	012600 				MOV	(SP)+,R0	;FIND FUNCTION BITS
   5184	021752					CALL	CESCHK		;RESET DTE-20 IF CLOCK ERROR STOP
	021752	004737 	022166'			JSR	PC,CESCHK
   5185	021756	042700 	000777 			BIC	#777,R0		;CLEAR OFF LOW ORDER FUNCTION CODE
   5186	021762	052700 	000201 			BIS	#DCOMST!DFUNC,R0 ;SET DIAG FUNCTION EXECUTE
   5187	021766	000410 				BR	$KLDFC		;ENTER COMMON CODE
   5188						;
   5189	021770				$KLDFW::
   5190	021770	011001 				MOV	(R0),R1		; [4.1.1137] POINT TO THE DTE-20
   5191	021772	012600 				MOV	(SP)+,R0	;FIND FUNCTION BITS
   5192	021774					CALL	CESCHK		;RESET DTE-20 IF CLOCK ERROR STOP
	021774	004737 	022166'			JSR	PC,CESCHK
   5193	022000	042700 	000777 			BIC	#777,R0		;MASK OFF LOW ORDER FUNCTION CODE
   5194	022004	052700 	000215 			BIS	#DCOMST!DSEND!DIKL10!DFUNC,R0
   5195	022010				$KLDFC::
   5196	022010					MFPS	(R2)+,DXWD3(R1)	;STORE THE OUTPUT FOR THE EBUS
	022010	012261 	000002 			MOV	(R2)+,DXWD3(R1)
   5197	022014					MFPS	(R2)+,DXWD2(R1)
	022014	012261 	000004 			MOV	(R2)+,DXWD2(R1)
   5198	022020					MFPS	(R2)+,DXWD1(R1)
	022020	012261 	000006 			MOV	(R2)+,DXWD1(R1)
   5199	022024	032700 	000004 			BIT	#DSEND,R0	;DIAG WRITE?
   5200	022030	001711 				BEQ	KLCST		;GO TO COMMON OUTPUT EQOUTINE
   5201	022032				10$:
   5202	022032	012761 	000014 	000030 		MOV	#DIKL10!DSEND,DAG1(R1)	;WRITE
   5203	022040	012761 	010000 	000010 		MOV	#DEP,TNAD1(R1)	;SIMULATE DEPOSIT
   5204	022046	005061 	000012 			CLR	TNAD2(R1)
   5205	022052				20$:
   5206	022052	010046 				MOV	R0,-(SP)	;SAVE R0
   5207	022054	010100 				MOV	R1,R0
   5208	022056					CALL	..WFED		; [4.1.1121] WAIT FOR DEX DONE
	022056	004737 	047454'			JSR	PC,..WFED
   5209	022062	012600 				MOV	(SP)+,R0
   5210	022064	000673 				BR	KLCST
   5211						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 98
$PRVDP -- PRIVILEDGED DEPOSIT

   5213						.SBTTL	$PRVDP -- PRIVILEDGED DEPOSIT
   5214
   5215					;+
   5216					;	$PRVDP -- PRIVILEDGED DEPOSIT OF THE KL10 MEMORY
   5217					;
   5218					;
   5219					;	ENTRY CONDITIONS:
   5220					;
   5221					;	R0 -- PROCESSOR TABLE POINTER
   5222					;	R1 -- WORD 5 OF DPB
   5223					;	R2 -- WORD 3 OF DPB
   5224					;	R3 -- WORD 4 OF DPB
   5225					;	R4 -- ADDRESS OF DPB
   5226					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   5227					;
   5228					;	CALLING SEQUENCE:
   5229					;
   5230					;	JMP	$PRVDP
   5231					;
   5232					;	ERROR CONDITIONS:
   5233					;
   5234					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5235					;-
   5236
   5237	022066				$PRVDP::
   5238	022066					MFPS	2(R2),R1	;SET UP THE INTERNAL ADDRESS 2(PDP11 ADDRESS
	022066	016201 	000002 			MOV	2(R2),R1
   5239	022072	052601 				BIS	(SP)+,R1	;SET HIGH ORDER OF PRIVILEDGE
   5240	022074	052701 	010000 			BIS	#DEP,R1		;SET PRIVILEDGED DEPOSIT
   5241	022100	000405 				BR	PRVCM
   5242						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 99
$PRVEX -- PRIVILEDGED EXAMINE

   5244						.SBTTL	$PRVEX -- PRIVILEDGED EXAMINE
   5245
   5246					;+
   5247					;	$PRVEX -- PRIVILEDGED EXAMINE OF THE KL10 MEMORY
   5248					;
   5249					;	ENTRY CONDITIONS:
   5250					;
   5251					;	R0 -- PROCESSOR TABLE POINTER
   5252					;	R1 -- WORD 5 OF DPB
   5253					;	R2 -- WORD 3 OF DPB
   5254					;	R3 -- WORD 4 OF DPB
   5255					;	R4 -- ADDRESS OF DPB
   5256					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   5257					;
   5258					;	CALLING SEQUENCE:
   5259					;
   5260					;	JMP	$PRVEX
   5261					;
   5262					;	ERROR CONDITIONS:
   5263					;
   5264					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5265					;-
   5266
   5267	022102				$PRVEX::
   5268	022102					MFPS	2(R2),R1	;SET UP THE INTERNAL ADDRESS 2(PDP11 ADDRESS
	022102	016201 	000002 			MOV	2(R2),R1
   5269	022106	052601 				BIS	(SP)+,R1	;SET HIGH ORDER OF PRIVILEDGE
   5270	022110	042701 	010000 			BIC	#DEP,R1		;INSURE THAT IT IS AN EXAMINE
   5271	022114				PRVCM:
   5272	022114	052701 	004000 			BIS	#PRTOFF,R1	;SET PRIVILEDGED EXAMINE/DEPOSIT
   5273	022120					MFPS	@R2,R2		;LOWER ORDER HALF
	022120	011202 				MOV	@R2,R2
   5274	022122	011000 				MOV	(R0),R0		; [4.1.1137] POINT TO THE DTE-20
   5275	022124					CALL	..SWED		; [4.1.1121] START-WAIT FOR EXAMINE/DEPOSIT
	022124	004737 	050126'			JSR	PC,..SWED
   5276	022130	103401 				BCS	20$		;E BOX STOPPED ERROR
   5277	022132	104401 				TRAP	DR.01		;MUST BE OK -- RETURN TO USER
   5278						;
   5279	022134				20$:
   5280	022134	104776 				TRAP	DE.02		;RETURN EBOX STOPPED ERROR
   5281						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 100
$RWDRG -- READ/WRITE DIAGNOSTIC REGISTER

   5283						.SBTTL	$RWDRG -- READ/WRITE DIAGNOSTIC REGISTER
   5284
   5285					;+
   5286					;
   5287					;	$RWDRG -- PRIVILEDGED READ/WRITE OF DIAGNOSTIC DTE20 REGISTERS
   5288					;
   5289					;	ENTRY CONDITIONS:
   5290					;
   5291					;	R0 -- PROCESSOR TABLE POINTER
   5292					;	R1 -- WORD 5 OF DPB
   5293					;	R2 -- WORD 3 OF DPB
   5294					;	R3 -- WORD 4 OF DPB
   5295					;	R4 -- ADDRESS OF DPB
   5296					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   5297					;
   5298					;	CALLING SEQUENCE:
   5299					;
   5300					;	JMP	$RWDRG
   5301					;
   5302					;	ERROR CONDITIONS:
   5303					;
   5304					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5305					;-
   5306
   5307	022136				$RWDRG::
   5308	022136	011001 				MOV	(R0),R1		; [4.1.1137] POINT TO THE DTE-20
   5309	022140	000316 				SWAB	@SP		;FIND THE REGISTER NUMBER
   5310	022142	062601 				ADD	(SP)+,R1	;MAKE EXTERNAL PAGE OFFSET
   5311	022144	005702 				TST	R2		;IS IT WRITE?
   5312	022146	001402 				BEQ	10$		;NO -- DON'T SET IT
   5313	022150					MFPS	@R2,DAG1(R1)	;YES -- SET REGISTER
	022150	011261 	000030 			MOV	@R2,DAG1(R1)
   5314	022154				10$:
   5315	022154	005703 				TST	R3		;RETURN ADDRESS SPECIFIED?
   5316	022156	001402 				BEQ	20$		;NO -- THEN RETURN ALL OK
   5317	022160					MTPS	DAG1(R1),@R3	;SET IN USER SPACE
	022160	016113 	000030 			MOV	DAG1(R1),@R3
   5318	022164				20$:
   5319	022164	104401 				TRAP	DR.01		;MUST BE OK -- RETURN TO USER
   5320						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 101
CESCHK -- CHECK FOR CLOCK ERROR STOP

   5322						.SBTTL	CESCHK -- CHECK FOR CLOCK ERROR STOP
   5323
   5324					;+
   5325					;	CESCHK -- CHECK FOR CLOCK ERROR STOP
   5326					;
   5327					;	ENTRY CONDITIONS:
   5328					;
   5329					;	R1 -- ADDRESS OF CURRENT DTE-20
   5330					;
   5331					;	NO REGISTERS MODIFIED
   5332					;-
   5333
   5334	022166				CESCHK:
   5335	022166	005061 	000030 			CLR	DAG1(R1)	;CLEAR ALL FLAGS
   5336	022172	032761 	004000 	000030 		BIT	#DS04,DAG1(R1)	;CLOCK ERROR STOP UP?
   5337	022200	001403 				BEQ	10$		;NO-- JUST RETURN
   5338	022202	012761 	000100 	000032 		MOV	#DRESET,DAG2(R1) ;YES-- RESET DTE-20
   5339	022210				10$:
   5340	022210					RETURN			;FROM CESCHK
	022210	000207 				RTS	PC
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1113  03-APR-86 18:57  PAGE 102
CESCHK -- CHECK FOR CLOCK ERROR STOP

   5342
   5343
   5344						.TITLE	DMASS	- "ASSIGN LUN" DIRECTIVE MODULE
   5345						.SBTTL	ASIGN LUN -- COPYRIGHT STATEMENT
   5346	022212					IDENT$	1,0
						.IDENT	/001000/
   5347					;
   5348					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   5349					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5350					;			ALL RIGHTS RESERVED.
   5351					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5352					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5353					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5354					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5355					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5356					;
   5357					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5358					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5359					;       CORPORATION.
   5360					;
   5361					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5362					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5363					;
   5364					;		MODULE: "ASSIGN LUN" DIRECTIVE
   5365					;
   5366					;		VERSION: 01-00
   5367					;
   5368					;		AUTHOR: R. MCLEAN
   5369					;
   5370					;		DATE: 19 JUL 75
   5371					;
   5372					;
   5373					;	THIS MODULE CONTAINS:
   5374					;
   5375					;	1 -- CODE TO SERVICE THE "ASSIGN LUN" DIRECTIVE.
   5376					;
   5377					;	MACRO DEFINITIONS
   5378					;
   5379						.MCALL	CALL,RETURN
   5380						.MCALL	MFPI,MFPS
DMASS	- "ASSIGN LUN" DIRECTIV	MACRO M1113  03-APR-86 18:57  PAGE 103
DIRECTIVE -- ASSIGN LUN

   5382						.SBTTL	DIRECTIVE -- ASSIGN LUN
   5383					;+
   5384					; THE "ASSIGN LUN" DIRECTIVE
   5385					;
   5386					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ASSIGN A LOGICAL UNIT NUMBER (LUN)
   5387					; TO A PHYSICAL DEVICE-UNIT.
   5388					;
   5389					; A FOUR-WORD DPB OF THE FOLLOWING FORMAT IS USED TO ASSIGN A LUN
   5390					; TO A PHYSICAL DEVICE:
   5391					;
   5392					;	WD. 00 -- DIC (07.) & DPB SIZE (4.),
   5393					;	WD. 01 -- LOGICAL UNIT NUMBER,
   5394					;	WD. 02 -- PHYSICAL DEVICE NAME,
   5395					;	WD. 03 -- PHYSICAL DEVICE UNIT NUMBER.
   5396					;
   5397					; A TWO-WORD DPB OF THE FOLLOWING FORMAT IS USED TO DEASSIGN (ASSIGN
   5398					; TO "NONE") A LUN:
   5399					;
   5400					;	WD. 00 -- DIC (07.) & DPB SIZE (2.),
   5401					;	WD. 01 -- LOGICAL UNIT NUMBER.
   5402					;
   5403					; THE FOLLOWING STATUS IS RETURNED:
   5404					;
   5405					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5406					; OF ONE (+1).
   5407					;
   5408					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5409					;
   5410					;	-90 -- LUN USAGE INTERLOCKED (VIZ., FILE OPEN),
   5411					;	-92 -- INVALID DEVICE AND/OR UNIT,
   5412					;	-96 -- INVALID LOGICAL UNIT NUMBER,
   5413					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   5414					;	-99 -- DIC OR DPB SIZE IS INVALID.
   5415					;-
   5416					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5417					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   5418					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5419					;	R0 -- PC OF EMT INSTRUCTION
   5420					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   5421					;	R2 -- DPB SIZE
   5422					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5423					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   5424					;
   5425					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   5426					;
   5427					;
   5428					; LUN ASSIGNMENT -- CHECK FOR VALIDITY OF LUN & DEVICE-UNIT AND ASSIGN
   5429					; IF NOT INTERLOCKED.
   5430					;
   5431	022212				.D.ASS::MFPI	@R1		;VALIDATE LUN, AND SETUP  TO ACCESS TASK
	022212	011146 				MOV	@R1,-(SP)
   5432									;HEADER, BY PUSHING LUN AND CALLING
   5433									;SUBROUTINE TO CONVERT & VERIFY.
   5434	022214					CALL	.VCLUN		;IF INVALID LUN, RETURN STS=-96.
	022214	004737 	016104'			JSR	PC,.VCLUN
   5435	022220	010416 				MOV	R4,@SP		;PUD ENTRY ADR ON STACK REPLACED BY LUT ADDRESS
   5436					;
DMASS	- "ASSIGN LUN" DIRECTIV	MACRO M1113  03-APR-86 18:57  PAGE 103-1
DIRECTIVE -- ASSIGN LUN

   5437	022222	005003 				CLR	R3		;SET UP INCASE OF DEASSIGNMENT
   5438	022224	020227 	000002 			CMP	R2,#2		;IS THIS LUN DEASSIGNMENT?
   5439	022230	001422 				BEQ	60$		;YES -- DEASSIGN LUN
   5445					;
   5446	022232				45$:	MFPI	(R1)+		;PUSH LUN, AND LEAVE R1 POINTING TO DEV NAME
	022232	012146 				MOV	(R1)+,-(SP)
   5447					;
   5448	022234					MFPS	(R1)+,R4	;SET R4 TO DEVICE NAME.
	022234	012104 				MOV	(R1)+,R4
   5449									;R0 CONTAINS DEVICE UNIT NUMBER
   5450	022236					MFPS	@R1,R0
	022236	011100 				MOV	@R1,R0
   5451					;
   5452					; SCAN PUD FOR DEVICE-UNIT IN R4-R0.
   5453					;
   5454	022240	012703 	010262'			MOV	#.PUDBA,R3	;USE R3 TO SCAN PUD
   5455	022244				20$:
   5456	022244	020327 	011342'			CMP	R3,#.PUDEA	;END OF PUD?
   5457	022250	001001 				BNE	30$
   5458	022252	104644 				TRAP	DE.92		;YES -- DEVICE-UNIT NOT FOUND
   5459	022254	021304 			30$:	CMP	@R3,R4		;NO -- DEVICE NAME MATCH?
   5460	022256	001003 				BNE	40$		;NO -- CHECK NEXT ENTRY
   5461	022260	126300 	000002 			CMPB	U.UN(R3),R0	;YES -- UNIT NUMBER MATCH?
   5462	022264	001403 				BEQ	50$		;YES -- DEVICE-UNIT FOUND
   5463									;NO -- CHECK NEXT ENTRY
   5464	022266				40$:
   5465	022266	062703 	000050 			ADD	#U.SZ,R3	;ADVANCE R3 TO NEXT PUD ENTRY (IF ANY), AND
   5466	022272	000764 				BR	20$		;CHECK FOR DEVICE-UNIT MATCH.
   5467					;
   5468					; INDICATED DEVICE-UNIT FOUND IN PUD -- PUD ENTRY ADDRESS IS IN R3
   5469					;
   5470	022274	012600 			50$:	MOV	(SP)+,R0	;SET R0 TO LUN
   5471					;
   5472					; R3 CONTAINS A VALUE (PUD ENTRY ADDRESS OR ZERO) TO BE SET IN THE
   5473					; THE FIRST WORD OF THE LUT PER LUN IN R0.
   5474					;
   5475	022276				60$:
   5476	022276	006300 				ASL	R0		;SET R0 TO FOUR TIMES THE LUN
   5477	022300	006300 				ASL	R0
   5478	022302	062600 				ADD	(SP)+,R0	;POINT TO LUT AS SAVED
   5479					;
   5480	022304	005740 				TST	-(R0)		;IS LUN LOCKED IN USE?
   5481	022306	001401 				BEQ	70$
   5482	022310	104646 				TRAP	DE.90		;YES -- RETURN STS=-90.
   5483	022312	010340 			70$:	MOV	R3,-(R0)	;NO -- MAKE ASSIGNMENT, AND
   5484	022314	104401 				TRAP	DR.01		;RETURN STS=+1
DMASS	- "ASSIGN LUN" DIRECTIV	MACRO M1113  03-APR-86 18:57  PAGE 104
DIRECTIVE -- ASSIGN LUN

   5486
   5487						.TITLE	DMGLI	- "GET LUN INFO" DIRECTIVE MODULE
   5488						.SBTTL	GET LUN INFO -- COPYRIGHT STATEMENT
   5489	022316					IDENT$	1,0
						.IDENT	/001000/
   5490					;
   5491					;                             COPYRIGHT (C) 1975, 1984,1985 BY
   5492					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5493					;			ALL RIGHTS RESERVED.
   5494					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5495					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5496					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5497					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5498					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5499					;
   5500					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5501					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5502					;       CORPORATION.
   5503					;
   5504					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5505					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5506					;
   5507					;		MODULE: "GET LUN INFO" DIRECTIVE
   5508					;
   5509					;		VERSION: 01-00
   5510					;
   5511					;		AUTHOR: R. MCLEAN
   5512					;
   5513					;		DATE: 19 JUL 75
   5514					;
   5515					;
   5516					;	THIS MODULE CONTAINS:
   5517					;
   5518					;	1 -- CODE TO SERVICE THE "GET LUN INFO" DIRECTIVE.
   5519					;
   5520					;	MACROS
   5521					;
   5522						.MCALL	CALL,RETURN,MTPI,MFPI,MFPS
DMGLI	- "GET LUN INFO" DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 105
DIRECTIVE -- GET LUN INFORMATION

   5524						.SBTTL	DIRECTIVE -- GET LUN INFORMATION
   5525					;+
   5526					; THE "GET LUN INFORMATION" DIRECTIVE
   5527					;
   5528					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL A SIX WORD BUFFER
   5529					; WITH INFORMATION ABOUT A PHYSICAL UNIT TO WHICH IT IS ASSIGNED.
   5530					; IF REQUESTS TO THE PHYSICAL UNIT HAVE BEEN RE-DIRECTED TO ANOTHER
   5531					; UNIT, THE INFORMATION RETURNED WILL DESCRIBE THE EFFECTIVE ASSIGNMENT.
   5532					;
   5533					; A THREE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5534					;
   5535					;	WD. 00 -- DIC (05.) & DPB SIZE (3.),
   5536					;	WD. 01 -- LUN,
   5537					;	WD. 02 -- ADDRESS OF SIX-WORD BUFFER.
   5538					;
   5539					;
   5540					; THE SIX WORD BUFFER IS FILLED WITH THE FIRST SIX WORDS OF THE
   5541					; CORRESPONDING PUD ENTRY AS FOLLOWS:
   5542					;
   5543					;	WD. 00 -- NAME OF ASSIGNED DEVICE,
   5544					;	WD. 01 -- UNIT NUMBER OF ASSIGNED DEVICE & FLAGS BYTE,
   5545					;	WD. 02 -- DEVICE CHARACTERISTICS WD. #1,
   5546					;	WD. 03 -- DEVICE CHARACTERISTICS WD. #2,
   5547					;	WD. 04 -- DEVICE CHARACTERISTICS WD. #3,
   5548					;	WD. 05 -- DEVICE CHARACTERISTICS WD. #4.
   5549					;
   5550					; THE FOLLOWING STATUS IS RETURNED:
   5551					;
   5552					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5553					; OF ONE (+1).
   5554					;
   5555					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5556					;
   5557					;	-05 -- UNASSIGNED LUN,
   5558					;
   5559					;	-95 -- INVALID BUFFER SIZE ( 1> OR >U.SZ)
   5560					;	-96 -- INVALID LOGICAL UNIT NUMBER,
   5561					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   5562					;	-99 -- DIC OR DPB SIZE IS INVALID.
   5563					;-
   5564									;R0 CONTAINS BUFFER ADDRESS (LAST DPB WORD)
   5565					;
   5566	022316	006302 			.D.GLI::ASL	R2		;MULTIPLY THE DPB SIZE BY 2
   5572					;
   5573					;
   5574	022320				10$:	MFPI	(R1)+		;PUSH LUN, AND CONVERT TO PUD ENTRY ADR
	022320	012146 				MOV	(R1)+,-(SP)
   5575	022322					CALL	.VCLUN		;IF INVALID LUN, RETURN STS=-96.
	022322	004737 	016104'			JSR	PC,.VCLUN
   5576	022326	012604 				MOV	(SP)+,R4	;SET R4 TO PUD ENTRY ADR IF LUN ASSIGNED
   5577	022330	001001 				BNE	20$		;IF UN-ASSIGNED LUN, RETURN STS=-05.
   5578	022332	104773 				TRAP	DE.05
   5579					;
   5580					; FILL BUFFER -- IF SEGMENT FAULT, RETURN STS=-98.
   5581					;
   5582	022334				20$:	MFPS	(R1),R0
	022334	011100 				MOV	(R1),R0
DMGLI	- "GET LUN INFO" DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 105-1
DIRECTIVE -- GET LUN INFORMATION

   5583	022336	012446 			30$:	MOV	(R4)+,-(SP)
   5584	022340					MTPI	(R0)+
	022340	012620 				MOV	(SP)+,(R0)+
   5585	022342	077203 				SOB	R2,30$
   5586					;
   5587	022344	104401 				TRAP	DR.01		;RETURN STS=+1
   5588					;
DMGLI	- "GET LUN INFO" DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 106
DIRECTIVE -- GET LUN INFORMATION

   5590
   5591
   5592						.TITLE	DMGTP	- "GET TIME PARAMETERS" DIRECTIVE MODULE
   5593						.SBTTL	GET TIME PARAMETERS -- COPYRIGHT STATEMENT
   5594	022346					IDENT$	1,0
						.IDENT	/001000/
   5595					;
   5596					;                             COPYRIGHT (C) 1975, 1984. 1985 BY
   5597					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5598					;			ALL RIGHTS RESERVED.
   5599					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5600					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5601					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5602					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5603					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5604					;
   5605					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5606					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5607					;       CORPORATION.
   5608					;
   5609					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5610					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5611					;
   5612					;		MODULE: "GET TIME PARAMETERS" DIRECTIVE
   5613					;
   5614					;		VERSION: 01-00
   5615					;
   5616					;		AUTHOR: R. MCLEAN
   5617					;
   5618					;		DATE: 19 JUL 75
   5619					;
   5620					;
   5621					;	THIS MODULE CONTAINS:
   5622					;
   5623					;	1 -- CODE TO SERVICE THE "GET TIME PARAMETERS" DIRECTIVE.
   5624					;
   5625					;	MACROS
   5626					;
   5627						.MCALL	CALL,RETURN,MTPI,MFPS
DMGTP	- "GET TIME PARAMETERS"	MACRO M1113  03-APR-86 18:57  PAGE 107
DIRECTIVE -- GET TIME PARAMETERS

   5629						.SBTTL	DIRECTIVE -- GET TIME PARAMETERS
   5630					;+
   5631					; THE "GET TIME PARAMETERS" DIRECTIVE
   5632					;
   5633					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL AN INDICATED EIGHT WORD BUFFER
   5634					; WITH CURRENT TIME PARAMETERS.
   5635					;
   5636					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5637					;
   5638					;	WD. 00 -- DIC (59.) & DPB SIZE (2.),
   5639					;	WD. 01 -- ADDRESS OF 8-WORD BUFFER.
   5640					;
   5641					; THE 8-WORD BUFFER IS FILLED AS FOLLOWS:
   5642					;
   5643					;	WD. 0 -- YEAR (SINCE 1900),
   5644					;	WD. 1 -- MONTH OF YEAR,
   5645					;	WD. 2 -- DAY OF MONTH,
   5646					;	WD. 3 -- HOUR OF DAY,
   5647					;	WD. 4 -- MINUTE OF HOUR,
   5648					;	WD. 5 -- SECOND OF MINUTE,
   5649					;	WD, 6 -- TICK OF SECOND,
   5650					;	WD. 7 -- TICKS PER SECOND.
   5651					;
   5652					; THE FOLLOWING STATUS IS RETURNED:
   5653					;
   5654					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5655					; OF ONE (+1).
   5656					;
   5657					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5658					;
   5659					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   5660					;	-99 -- DIC OR DPB SIZE IS INVALID.
   5661					;
   5662	022346	013746 	001154'		.D.GTP::MOV	.TKPS,-(SP)	;PUSH TICKS-PER-SECOND
   5663	022352	010104 				MOV	R1,R4		;SAVE DPB POINTER
   5664	022354	013700 	001150'			MOV	.SSM,R0		;FIND HOURS
   5665	022360	012701 	003410 			MOV	#60.*30.,R1
   5666	022364					CALL	$DIV		;DIVIDE
	022364	004737 	000000G			JSR	PC,$DIV
   5667	022370	010003 				MOV	R0,R3		;SAVE ANSWER
   5668	022372	010100 				MOV	R1,R0		;SET UP REMAINDER FOR NEXT DIVIDE
   5669	022374	012701 	000036 			MOV	#30.,R1
   5670	022400					CALL	$DIV		;FIND MIN
	022400	004737 	000000G			JSR	PC,$DIV
   5671	022404	005046 				CLR	-(SP)		;TICKS NOT RETURNED
   5672	022406	006301 				ASL	R1
   5673	022410	010146 				MOV	R1,-(SP)	;SAVE SECONDS
   5674	022412	010046 				MOV	R0,-(SP)
   5675	022414	010346 				MOV	R3,-(SP)	;HOURS
   5676	022416	005046 				CLR	-(SP)
   5677	022420	113716 	001144'			MOVB	.DAY,@SP
   5678	022424	005216 				INC	@SP		; [**]
   5679	022426	005046 				CLR	-(SP)
   5680	022430	113716 	001145'			MOVB	.MON,@SP
   5681	022434	005216 				INC	@SP			; [**]
   5682	022436	013746 	001142'			MOV	.YEAR,-(SP)
   5683	022442	162716 	003554 			SUB	#1900.,@SP
DMGTP	- "GET TIME PARAMETERS"	MACRO M1113  03-APR-86 18:57  PAGE 107-1
DIRECTIVE -- GET TIME PARAMETERS

   5684					;
   5685					;
   5686					; MOVE TIME PARAMETERS FROM KERNEL STACK TO 8-WORD BUFFER IN USER SPACE
   5687					;
   5688					;
   5689	022446	012703 	000010 			MOV	#8.,R3
   5690					;
   5691	022452					MFPS	(R4),R4		;FIND BUFFER ADDRESS
	022452	011404 				MOV	(R4),R4
   5692	022454				10$:
   5693	022454					MTPI	(R4)+		;MOVE WORD
	022454	012624 				MOV	(SP)+,(R4)+
   5694	022456	077302 				SOB	R3,10$		;LOOP 8 TIMES
   5695					;
   5696	022460	104401 				TRAP	DR.01		;RETURN STS=+1
   5697					;
DMGTP	- "GET TIME PARAMETERS"	MACRO M1113  03-APR-86 18:57  PAGE 108
DIRECTIVE -- GET TIME PARAMETERS

   5699
   5700
   5701						.TITLE	DMSED	- SIGNIFICANT EVENT DIRECTIVES MODULE
   5702						.SBTTL	SIGNIFICANT EVENT DIRECTIVES -- COPYRIGHT STATEMENT
   5703	022462					IDENT$	1,0
						.IDENT	/001000/
   5704					;
   5705					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   5706					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5707					;			ALL RIGHTS RESERVED.
   5708					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5709					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5710					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5711					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5712					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5713					;
   5714					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5715					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5716					;       CORPORATION.
   5717					;
   5718					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5719					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5720					;
   5721					;		MODULE: SIGNIFICANT EVENT DIRECTIVES
   5722					;
   5723					;		VERSION: 01-00
   5724					;
   5725					;		AUTHOR:  R. MCLEAN
   5726					;
   5727					;		DATE: 19 MAR 75
   5728					;
   5729					;
   5730					;	THIS MODULE CONTAINS:
   5731					;
   5732					;	1 -- CODE TO SERVICE THE "WAITFOR SINGLE EVENT FLAG" DIRECTIVE,
   5733					;	2 -- CODE TO SERVICE THE "WAITFOR LOGICAL 'OR' OF FLAGS" DIRECTIVE,
   5734					;	3 -- CODE TO SERVICE THE "WAIT FOR NEXT SIGNIFICANT EVENT" DIRECTIVE.
   5735					;	4 -- CODE TO SERVICE THE "CLEAR EVENT FLAG" DIRECTIVE,
   5736					;	5 -- CODE TO SERVICE THE "SET EVENT FLAG" DIRECTIVE,
   5737					;	6 -- CODE TO SERVICE THE "DECLARE SIG EVENT" DIRECTIVE,
   5738					;	7 -- CODE TO SERVICE THE "READ EVENT FLAGS" DIRECTIVE
   5739					;
   5740					;	MACROS
   5741
   5742						.MCALL	CALL,RETURN,MTPS,MFPS,MFPI,MTPI
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 109
DIRECTIVE -- CLEAR EVENT FLAG

   5744						.SBTTL	DIRECTIVE -- CLEAR EVENT FLAG
   5745					;+
   5746					;	THE "CLEAR EVENT FLAG" DIRECTIVE
   5747					;
   5748					;	THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CLEAR AND INDICATE
   5749					;	EVENT FLAG AND REPORT THE FLAG'S POLARITY BEFORE CLEARING.
   5750					;
   5751					;	A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED;
   5752					;
   5753					;	WD. 00 -- DIC (31.) & DPB SIZE (2.)
   5754					;	WD. 01 -- EVENT FLAG NUMBER (EFN)
   5755					;
   5756					;	THE FOLLOWING STATUS IS RETURNED:
   5757					;
   5758					;
   5759					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5760					;
   5761					;	R0 -- +0 -- FLAG WAS ALREADY RESET,
   5762					;	R0 -- +2 -- FLAG WAS SET.
   5763					;
   5764					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5765					;
   5766					;	R0 -- -97 -- EFN>64 OR EFN<1,
   5767					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5768					;-
   5769					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5770					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5771					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5772					;	R0 -- PC OF EMT INSTRUCTION
   5773					;	R1 -- WORD FOLLOWING THE DIC & SIZE
   5774					;	R2 -- SIZE OF DPB (IN WORDS),
   5775					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE )
   5776					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5777					;
   5778					;
   5779					;
   5780	022462				.D.CEF::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	022462	004737 	044320'			JSR	PC,.CEFN
   5781									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5782									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5783									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5784									;SPECIFIED), RETURN WITH R2=R3=00.
   5785									;CONDITION CODES ARE SET PER "TST R3".
   5786					;
   5787									;EVENT FLAG SPECIFIED?
   5788	022466	001443 				BEQ	SEX97		;NO -- RETURN STS=-97
   5789	022470	030312 				BIT	R3,@R2		;YES -- IS FLAG CLEARED?
   5790	022472	001410 				BEQ	SEXP0		;YES -- RETURN STS=+0
   5791	022474	040312 				BIC	R3,@R2		;NO -- CLEAR FLAG & RETURN STS=+2
   5792	022476	104402 			SEXP2:	TRAP	DR.02		;COMMON RETURN -- STS=+2
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 110
DIRECTIVE -- SET EVENT FLAG

   5794					.SBTTL	DIRECTIVE -- SET EVENT FLAG
   5795					;+
   5796					; THE "SET EVENT FLAG" DIRECTIVE
   5797					;
   5798					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SET AND INDICATED EVENT FLAG
   5799					; AND REPORT THE FLAG'S POLARITY BEFORE SETTING.
   5800					;
   5801					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5802					;
   5803					;	WD. 00 -- DIC (33.) & DPB SIZE (2.),
   5804					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   5805					;
   5806					; THE FOLLOWING STATUS IS RETURNED:
   5807					;
   5808					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5809					;
   5810					;	R0 -- +0 -- FLAG WAS CLEARED,
   5811					;	R0 --+2 -- FLAG WAS SET.
   5812					;
   5813					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5814					;
   5815					;	R0 -- -97 -- EFN>64 OR EFN<1,
   5816					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5817					;-
   5818					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5819					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5820					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5821					;	R0 -- PC OF EMT INSTRUCTION
   5822					;	R1 -- WORD FOLLOWING DIC % SIZE
   5823					;	R2 -- DPB SIZE
   5824					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5825					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5826					;
   5827					;
   5828									;R1 IS POINTING TO EFN IN DPB
   5829					;
   5830	022500				.D.SEF::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	022500	004737 	044320'			JSR	PC,.CEFN
   5831									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5832									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5833									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5834									;SPECIFIED), RETURN WITH R2=R3=00.
   5835									;CONDITION CODES ARE SET PER "TST R3".
   5836					;
   5837									;EVENT FLAG SPECIFIED?
   5838	022504	001434 				BEQ	SEX97		;NO -- RETURN STS=-97
   5839	022506	030312 			SEXCM:	BIT	R3,@R2		;YES -- IS FLAG ALREADY SET?
   5840	022510	001372 				BNE	SEXP2		;YES -- RETURN STS=+2
   5841	022512	050312 				BIS	R3,@R2		;NO -- SET FLAG & RETURN STS=+0
   5842	022514	104400 			SEXP0:	TRAP	DR.00		;COMMON RETURN -- STS=+0
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 111
DIRECTIVE -- DECLARE SIGNIFICANT EVENT

   5844					.SBTTL	DIRECTIVE -- DECLARE SIGNIFICANT EVENT
   5845					;+
   5846					; THE "DECLARE SIGNIFICANT EVENT" DIRECTIVE
   5847					;
   5848					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DECLARE A SIGNIFICANT EVENT
   5849					; AND OPTIONALLY SET AN EVENT FLAG & AND REPORT ITS POLARITY BEFORE
   5850					; IT WAS SET.
   5851					;
   5852					; A TWO WORD DBP OF THE FOLLOWING FORMAT IS USED TO (1) READ AN EVENT
   5853					; FLAG, (2) SET THE EVENT FLAG, (3) DECLARE A SIGNIFICANT EVENT, AND
   5854					; (4) REPORT THE PRE-EVENT FLAG POLARITY:
   5855					;
   5856					;	WD. 00 -- DIC (35.) & DPB SIZE (2.),
   5857					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   5858					;
   5859					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED TO (1) DECLARE A
   5860					; SIGNIFICANT EVENT:
   5861					;
   5862					;	WD. 00 -- DIC (07.) & DPB SIZE (2.).
   5863					;	WD. 01 -- NO EVENT FLAG SPECIFIED
   5864					;
   5865					; THE FOLLOWING STATUS IS RETURNED:
   5866					;
   5867					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5868					;
   5869					;	R0 -- +1 -- NO EVENT FLAG SPECIFIED,
   5870					;	R0 -- +0 -- SPECIFIED FLAG WAS CLEARED,
   5871					;	R0 --+2 -- SPECIFIED FLAG WAS SET.
   5872					;
   5873					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5874					;
   5875					;	R0 -- -97 -- EFN<1 OR EFN>64.,
   5876					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5877					;-
   5878					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5879					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5880					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   5881					;	R0 -- PC OF EMT INSTRUCTION
   5882					;	R1 -- WORD FOLLOWING DIC & SIZE
   5883					;	R2 -- DPB SIZE
   5884					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5885					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5886					;
   5887					;
   5888					;
   5889	022516				.D.DSE::CALL	..DSEV		;SET SIGNIFICANT EVENT FLAG
	022516	004737 	045264'			JSR	PC,..DSEV
   5890	022522	005302 				DEC	R2
   5891	022524	001401 				BEQ	5$
   5892	022526	104400 				TRAP	DR.00
   5893	022530				5$:	CALL	.CEFN		;YES -- R1 IS POINTING TO EFN IN DPB.
	022530	004737 	044320'			JSR	PC,.CEFN
   5894									;CONVERT EFN TO: (1) FLAG WORD ADDRESS
   5895									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5896									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5897									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5898									;SPECIFIED), RETURN WITH R2=R3=00.
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 111-1
DIRECTIVE -- DECLARE SIGNIFICANT EVENT

   5899									;CONDITION CODES ARE SET PER "TST R3".
   5900					;
   5901									;EVENT FLAG SPECIFIED?
   5902	022534	001417 				BEQ	SEXP1		;NO -- RETURN STS=1.
   5903	022536	000763 				BR	SEXCM		;GO TO COMMON TEST
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 112
DIRECTIVE -- READ EVENT FLAG

   5905					.SBTTL	DIRECTIVE -- READ EVENT FLAG
   5906					;+
   5907					; THE "READ EVENT FLAG" DIRECTIVE
   5908					;
   5909					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO READ AND INDICATED EVENT FLAG.
   5910					;
   5911					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5912					;
   5913					;	WD. 00 -- DIC (37.) & DPB SIZE (2.),
   5914					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   5915					;
   5916					; THE FOLLOWING STATUS IS RETURNED:
   5917					;
   5918					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5919					;
   5920					;	R0 -- +0 -- FLAG WAS CLEARED,
   5921					;	R0 -- +2 -- FLAG WAS SET.
   5922					;
   5923					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5924					;
   5925					;	R0 -- -97 -- EFN>64 OR EFN<1,
   5926					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5927					;-
   5928					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5929					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5930					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5931					;	R0 -- PC OF EMT INSTRUCTION
   5932					;	R1 -- WORD FOLLOWING DIC & SIZE
   5933					;	R2 -- DPB SIZE
   5934					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5935					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5936					;
   5937					;
   5938									;R1 IS POINTING TO EFN IN DPB.
   5939					;
   5940	022540				.D.REF::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	022540	004737 	044320'			JSR	PC,.CEFN
   5941									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5942									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5943									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5944									;SPECIFIED), RETURN WITH R2=R3=00.
   5945									;CONDITION CODES ARE SET PER "TST R3".
   5946					;
   5947									;EVENT FLAG SPECIFIED?
   5948	022544	001414 				BEQ	SEX97		;NO -- RETURN STS=-97
   5949	022546	030312 				BIT	R3,@R2		;YES -- IS FLAG SET?
   5950	022550	001352 				BNE	SEXP2		;YES -- RETURN STS=+2
   5951	022552	104400 				TRAP	DR.00		;NO -- RETURN STS=+0
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 113
DIRECTIVE -- READ ALL EVENT FLAGS

   5953					.SBTTL	DIRECTIVE -- READ ALL EVENT FLAGS
   5954					;+
   5955					; THE "READ ALL FLAGS" DIRECTIVE
   5956					;
   5957					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO READ ALL SIXTY-FOUR
   5958					; EVENT FLAGS FOR THE ISSUING TASK AND RECORD THEIR POLARITIES
   5959					; IN A SIXTY-FOUR BIT (4-WORD) BUFFER.
   5960					;
   5961					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5962					;
   5963					;	WD. 00 -- DIC (39.) & DPB SIZE (2.),
   5964					;	WD. 01 -- ADDRESS  OF 64-BIT BUFFER.
   5965					;
   5966					; THE FOLLOWING STATUS IS RETURNED:
   5967					;
   5968					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5969					; OF ONE (+1).
   5970					;
   5971					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5972					;
   5973					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5974					;-
   5975					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5976					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5977					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5978					;	R0 -- PC OF EMT INSTRUCTION
   5979					;	R1 -- WORD FOLLOWING DIC & SIZE
   5980					;	R2 -- DPB SIZE
   5981					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5982					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5983					;
   5984					;
   5985					; FILL FOUR WORD BUFFER
   5986					;
   5987	022554				.D.RAF::MTPS   A.EF+0(R5),(R1)+	;FLAGS 1-16 TO BUF+0
	022554	016521 	000020 			MOV	A.EF+0(R5),(R1)+
   5988	022560					MTPS   A.EF+2(R5),(R1)+	;FLAGS 17-32 TO BUF+2
	022560	016521 	000022 			MOV	A.EF+2(R5),(R1)+
   5989	022564					MTPS	.COMEF+0,(R1)+	;FLAGS 33-48 TO BUF+4
	022564	013721 	001010'			MOV	.COMEF+0,(R1)+
   5990	022570					MTPS	.COMEF+2,(R1)+	;FLAGS 49-64 TO BUF+6
	022570	013721 	001012'			MOV	.COMEF+2,(R1)+
   5991					;
   5992	022574	104401 			SEXP1:	TRAP	DR.01		;RETURN STS=+1
   5993					;
   5994	022576	104637 			SEX97:	TRAP	DE.97
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 114
DIRECTIVE -- WAITFOR SINGLE EVENT FLAG

   5996					.SBTTL	DIRECTIVE -- WAITFOR SINGLE EVENT FLAG
   5997					;+
   5998					; THE "WAIT FOR SINGLE EVENT FLAG" DIRECTIVE
   5999					;
   6000					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE
   6001					; ISSUING TASK UNTIL AN INDICATED EVENT FLAG IS SET.  IF THE FLAG IS SET
   6002					; AT ISSUANCE, TASK EXECUTION IS EFFECTIVELY NOT SUSPENDED.  (ACTUALLY, THE
   6003					; TASK IS ALWAYS SUSPENDED, BUT R0 IS LEFT POINTING TO THE ISSUING TASK'S
   6004					; ATL NODE; AND THEREFORE, A CHECK IS ALWAYS MADE BY THE ATL SCAN ROUTINE.)
   6005					;
   6006					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6007					;
   6008					;	WD. 00 -- DIC (41.) & DPB SIZE (2.),
   6009					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   6010					;
   6011					; THE FOLLOWING STATUS IS RETURNED:
   6012					;
   6013					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6014					; OF ONE (+1).
   6015					;
   6016					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6017					;
   6018					;	R0 -- -97 -- INVALID EVENT FLAG NUMBER (<1 OR >64.),
   6019					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   6020					;-
   6021					;
   6022					;
   6023					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6024					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6025					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6026					;	R0 -- PC OF EMT INSTRUCTION
   6027					;	R1 -- WORD FOLLOWING DIC & SIZE
   6028					;	R2 -- DPB SIZE
   6029					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6030					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6031					;
   6032					;
   6033	022600	011103 			.D.WFS::MOV	@R1,R3		;SET R3 TO EFN
   6034									;IS AN EVENT FLAG SPECIFIED (NON-ZERO EFN)?
   6035	022602				.D.WFO::			;SPECIAL ENTRY POINT FOR QIO AND WAIT
   6036	022602	001775 				BEQ	SEX97		;NO -- RETURN STS=-97.
   6037	022604	020327 	000100 			CMP	R3,#64.		;YES -- IS EFN IN RANGE: 0-64.?
   6038	022610	101372 				BHI	SEX97		;NO -- RETURN STS=-97.
   6039					;
   6040	022612	005303 				DEC	R3		;YES -- CONVERT EFN TO FLAG SET NUMBER (R2),
   6041	022614	005002 				CLR	R2		;AND FLAG MASK (R1)
   6042	022616					CALL	DIV216		;DIVIDE R2 BY 16.
	022616	004737 	045274'			JSR	PC,DIV216
   6043	022622	012701 	000001 			MOV	#1,R1
   6044	022626	005303 			10$:	DEC	R3		;DO AN ASH	R3,R1
   6045	022630	100402 				BMI	20$
   6046	022632	006301 				ASL	R1
   6047	022634	000774 				BR	10$
   6048	022636				20$:
   6049					;
   6050					;
   6051	022636	006302 				ASL	R2		;CONVERT SET NUMBER (0,1,2,3) TO TASK
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 114-1
DIRECTIVE -- WAITFOR SINGLE EVENT FLAG

   6052	022640	062702 	000014 			ADD	#TS.WF0,R2	;STATUS FOR ATL NODE.
   6053					;
   6054	022644	010165 	000024 			MOV	R1,A.FM+0(R5)	;SET MASK AND STATUS IN ATL NODE
   6055	022650	110265 	000014 			MOVB	R2,A.TS(R5)
   6056					;
   6057	022654	104401 				TRAP	DR.01		;RETURN STS=+1
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 115
DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS

   6059					.SBTTL	DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS
   6060					;+
   6061					; THE "WAITFOR LOGICAL 'OR' OF FLAGS" DIRECTIVE
   6062					;
   6063					;
   6064					; IF THE INDICATED CONDITION IS MET AT ISSUANCE, TASK EXECUTION IS
   6065					; EFFECTIVELY NOT SUSPENDED.  (ACTUALLY, THE TASK IS ALWAYS SUSPENDED,
   6066					;
   6067					;
   6068					; A THREE WORD DPB OF THE FOLLOWING FORMAT IS USED TO WAIT FOR EVENT FLAGS OF A GIVEN SET
   6069					;
   6070					;	WD. 00 -- DIC (43.) & DPB SIZE (3.)
   6071					;	WD. 01 -- SET NUMBER
   6072					;	WD. 02 -- FLAGS MASK FOR THIS SET
   6073					;
   6074					;
   6075					; A FIVE-WORD DPB OF THE FOLLOWING FORMAT IS USED TO WAITFOR EVENT FLAGS
   6076					; OF SET FOUR:
   6077					;
   6078					;	WD. 00 -- DIC (15.) & DPB SIZE (5.),
   6079					;	WD. 01 -- MASK WORD FOR FLAGS 1-16,
   6080					;	WD. 02 -- MASK WORD FOR FLAGS 17-32,
   6081					;	WD. 03 -- MASK WORD FOR FLAGS 33-48,
   6082					;	WD. 04 -- MASK WORD FOR FLAGS 49-64.
   6083					;
   6084					; MASK WORD BITS FROM RIGHT-TO-LEFT REPRESENT INCREASING EVENT FLAG
   6085					; NUMBERS, AND A SET MASK WORD BIT INDICATES "WAITFOR THE CORRESPONDING
   6086					; EVENT FLAG".
   6087					;
   6088					; THE FOLLOWING STATUS IS RETURNED.
   6089					;
   6090					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6091					; OF ONE (+1).
   6092					;
   6093					; CC-C SET TO INDICATE REJECTION, AND DIRECTIVE STATUS OF:
   6094					;
   6095					;	R0 -- -97 -- NO EVENT FLAG SPECIFIED IN MASK WORD(S),
   6096					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   6097					;-
   6098					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6099					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6100					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   6101					;	R0 -- PC OF EMT INSTRUCTION
   6102					;	R1 -- WORD FOLLOWING DIC & SIZE
   6103					;	R2 -- DPB SIZE
   6104					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6105					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6106					;
   6107					;
   6108					;
   6109					; EVEN FLAG SET IS FOUR.  I.E., WAIT FOR ANY OF SIXTY-FOUR EVENT FLAGS.
   6110					;
   6111					; SET 64-BIT FLAGS MASK IN ATL NODE AND ACCUMULATE 'OR' OF MASK WORDS
   6112					; IN R2.  THE 64-BIT MASK IS SET BY MOVING FOUR WORDS FROM THE DPB TO
   6113					; THE ATL NODE.
   6114					;
   6115					; IF NO FLAG INDICATED (ALL 64 BITS ARE ZERO), RETURN STS=-97.
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 115-1
DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS

   6116					;
   6117	022656	022702 	000005 		.D.WFL::CMP	#5,R2		;THREE OR 5 WORD DPB?
   6118	022662	001020 				BNE	10$		;THREE WORD DPB (WAIT FOR ONE SET)
   6119	022664	010502 				MOV	R5,R2		;SETUP R2 TO FILL ATL NODE
   6120	022666	062702 	000024 			ADD	#A.FM,R2
   6121	022672					MFPS	(R1)+,@R2	;MASK FOR FLAGS 1-16
	022672	012112 				MOV	(R1)+,@R2
   6122	022674	012203 				MOV	(R2)+,R3
   6123									;MASK FOR FLAGS 17-32
   6124	022676					MFPS	(R1)+,@R2
	022676	012112 				MOV	(R1)+,@R2
   6125	022700	052203 				BIS	(R2)+,R3
   6126									;MASK FOR FLAGS 33-48
   6127	022702					MFPS	(R1)+,@R2
	022702	012112 				MOV	(R1)+,@R2
   6128	022704	052203 				BIS	(R2)+,R3
   6129	022706					MFPS	@R1,@R2		;MASK FOR FLAGS 49-64 (LAST DPB WORD)
	022706	011112 				MOV	@R1,@R2
   6130	022710	051203 				BIS	@R2,R3
   6131	022712	001731 				BEQ	SEX97		;RETURN STS=-97 IF NO FLAG INDICATED
   6132					;
   6133	022714	112765 	000024 	000014 		MOVB	#TS.WF4,A.TS(R5) ;SET WAITFOR-SET-FOUR TASK STATUS
   6134					;
   6135	022722	104401 				TRAP	DR.01		;RETURN DIRECTIVE STS=+1
   6136					;
   6137	022724				10$:	MFPS	(R1)+,R2	;FIND THE SET NUMBER
	022724	012102 				MOV	(R1)+,R2
   6138	022726	001415 				BEQ	30$		;ILLEGAL SET NUMBER
   6139	022730					MFPS	(R1)+,R3	;FIND THE FLAGS TO WAIT FOR
	022730	012103 				MOV	(R1)+,R3
   6140	022732	020227 	000004 			CMP	R2,#4		;LEGAL SET NUMBER?
   6141	022736	101011 				BHI	30$		;NO -- ILLEGAL SET TO WAIT FOR
   6142	022740	005302 				DEC	R2		;DECREMENT SO SET1 IS 0
   6143	022742	006302 				ASL	R2		;MULTIPLY BY 2
   6144	022744	062702 	000014 			ADD	#TS.WF0,R2	;POINT TO THE CORRECT ATL STATUS
   6145	022750	110265 	000014 			MOVB	R2,A.TS(R5)	;SET THE CORRECT STATUS IN THE ATL NODE
   6146	022754	010365 	000024 			MOV	R3,A.FM(R5)	;SET UP THE FLAGS MASK WORD FOR THESE EVENT FLAGS
   6147	022760	104401 				TRAP	DR.01		;RETURN STS +1
   6148					;
   6149	022762	104636 			30$:	TRAP	DE.98		;ILLEGAL SET NUMBER
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 116
DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT

   6151					.SBTTL	DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT
   6152					;+
   6153					; THE "WAIT FOR NEXT SIGNIFICANT EVENT" DIRECTIVE
   6154					;
   6155					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE
   6156					; ISSUING TASK UNTIL THE NEXT SIGNIFICANT EVENT HAS BEEN DECLARED.
   6157					;
   6158					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6159					;
   6160					;	WD. 00 -- DIC (49.) & DPB SIZE (1.).
   6161					;
   6162					; THE FOLLOWING STATUS IS RETURNED:
   6163					;
   6164					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6165					; OF ONE (+1).
   6166					;
   6167					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6168					;
   6169					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   6170					;-
   6171					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6172					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6173					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   6174					;	R0 -- PC OF EMT INSTRUCTION
   6175					;	R1 -- WORD FOLLOWING DIC & SIZE
   6176					;	R2 -- DPB SIZE
   6177					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6178					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6179					;
   6180					;
   6181	022764	011505 			.D.WSE::MOV	@R5,R5		;ADVANCE R5 (ATL NODE POINTER)
   6182	022766	012737 	000001 	001016'		MOV	#EV.SE,.SEWFL
   6183	022774	104401 				TRAP	DR.01		;RETURN STS=+1.
   6184					;
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1113  03-APR-86 18:57  PAGE 117
DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT

   6186
   6187
   6188						.TITLE	DMMKT	- "MARK TIME" DIRECTIVE MODULE
   6189						.SBTTL	MARK TIME -- COPYRIGHT STATEMENT
   6190	022776					IDENT$	1,0
						.IDENT	/001000/
   6191					;
   6192					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   6193					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6194					;			ALL RIGHTS RESERVED.
   6195					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6196					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6197					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6198					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6199					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6200					;
   6201					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6202					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6203					;       CORPORATION.
   6204					;
   6205					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6206					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6207					;
   6208					;		MODULE: "MARK TIME" DIRECTIVE
   6209					;
   6210					;		VERSION: 01-00
   6211					;
   6212					;		AUTHOR:  R. MCLEAN
   6213					;
   6214					;		DATE: 19 APR 75
   6215					;
   6216					;
   6217					;	THIS MODULE CONTAINS:
   6218					;
   6219					;	1 -- CODE TO SERVICE THE "MARK TIME" DIRECTIVE.
   6220					;
   6221					;	MACROS
   6222
   6223						.MCALL	CALL,RETURN,MFPI,MTPI,MTPS,MFPS
DMMKT	- "MARK TIME" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 118
DIRECTIVE -- MARK TIME

   6225						.SBTTL	DIRECTIVE -- MARK TIME
   6226					;+
   6227					; THE "MARK TIME" DIRECTIVE
   6228					;
   6229					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DECLARE A SIGNIFICANT EVENT
   6230					; IN AN INDICATED TIME INTERVAL FROM ISSUANCE.
   6231					;
   6232					; IF AN EVENT FLAG IS SPECIFIED, IT IS CLEARED AT ISSUANCE AND SET
   6233					; AT THE TIME OF THE SIGNIFICANT EVENT.
   6234					;
   6235					;
   6236					; IF  AN EVENT FLAG NUMBER
   6237					; IS SPECIFIED, THE SIGNIFICANT EVENT WILL STILL OCCUR AFTER
   6238					; THE INDICATED TIME INTERVAL.
   6239					;
   6240					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6241					;
   6242					;	WD. 00 -- DIC (23.) & DPB SIZE (5.),
   6243					;	WD. 01 -- EVENT FLAG NUMBER (EFN),
   6244					;	WD. 02 -- TIME INTERVAL MAGNITUDE, ( IN TICS)
   6245					;	WD. 03 -- RESCHEDULE INTERVAL (IN TICS)
   6246					;	WD. 04 -- AST TRAP ADDRESS
   6247					;
   6248					; THE FOLLOWING STATUS IS RETURNED:
   6249					;
   6250					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6251					; OF ONE (+1).
   6252					;
   6253					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6254					;
   6255					;	-01 -- UNAVAILABLE ENTRY (FOR CLOCK LIST),
   6256					;
   6257					;	-97 -- INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   6258					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6259					;-
   6260					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6261					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6262					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6263					;
   6264					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6265					;
   6266					;
   6267									;R1 IS POINTING TO EFN IN DPB
   6268					;
   6269					;
   6270	022776				.D.MKT::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	022776	004737 	044320'			JSR	PC,.CEFN
   6271									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   6272									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   6273									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   6274									;SPECIFIED), RETURN WITH R2=R3=00.
   6275									;CONDITION CODES ARE SET PER "TST R3".
   6276					;
   6277	023002	001001 				BNE	10$		;ALL OK WITH EFN
   6278	023004	104637 				TRAP	DE.97		;RETURN STS=-97
   6279	023006	062701 	000004 		10$:	ADD	#4,R1		;R1 IS POINTING TO THE EFN, ADVANCE TO THE
   6280									;FIRST WORD (MAGNITUDE) OF TIME INTERVAL.
DMMKT	- "MARK TIME" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 118-1
DIRECTIVE -- MARK TIME

   6281					;
   6282	023012	010246 				MOV	R2,-(SP)	;PUSH EFN WORD ADDRESS
   6283	023014	010346 				MOV	R3,-(SP)	;PUSH EFN MASK
   6284					;
   6285	023016					MFPI	(R1)		;PUSH THE RESCHED INTERVAL
	023016	011146 				MOV	(R1),-(SP)
   6286	023020					MFPI	-(R1)		;PUSH TIME INTERVAL MAGNITUED MAGNITUDE
	023020	014146 				MOV	-(R1),-(SP)
   6287	023022					MFPI	4(R1)		;PUSH AST TRAP ADDRES
	023022	016146 	000004 			MOV	4(R1),-(SP)
   6288					;
   6289					;
   6290					; STACK & REGISTER SUMMARY:
   6291					;
   6292					;	SP+10 -- FLAG WORD ADDRESS (OR ZERO)
   6293					;	SP+06 -- FLAG MASK (OR ZERO)
   6294					;	SP+04 -- TIME RESCHEDULE INTERVAL
   6295					;	SP+02 -- TIME INTERVAL
   6296					;	SP+00 -- AST TRAP ADDRESS
   6297					;
   6298					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   6299					;	R1 -- ADDRESS OF NODE FOR CLOCK QUEUE
   6300					;
   6301	023026	046676 	000006 	000010 		BIC	+6(SP),@+10(SP)	;CLEAR INDICATED EVENT FLAG
   6302					;
   6303	023034	012700 	002376'			MOV	#.CLKBA,R0	;POINT TO BEGINNING OF CLOCK LIST
   6304	023040	022700 	002602'		20$:	CMP	#.CLKEA,R0	;END OF LIST?
   6305	023044	001001 				BNE	30$		;NO -- MUST BE OK
   6306	023046	104777 				TRAP	DE.01		;YES -- RAN OUT OF CLOCK ENTRIES
   6307	023050	005710 			30$:	TST	@R0		;LOOK FOR A FREE ENTRY
   6308	023052	001403 				BEQ	40$		;FOUND ONE
   6309	023054	062700 	000014 			ADD	#C.SZ,R0	;NOT HERE -- TRYNEXT ENTRY
   6310	023060	000767 				BR	20$
   6311					;
   6312					;
   6313	023062	010520 			40$:	MOV	R5,(R0)+	;ATL NODE OF ISSUING TASK
   6314	023064	012620 				MOV	(SP)+,(R0)+	;AST ADDRESS
   6315	023066	012620 				MOV	(SP)+,(R0)+	;(POP) SCHEDULE INTERVAL
   6316	023070	012620 				MOV	(SP)+,(R0)+	;(POP) RESCHEDULE INTERVAL
   6317	023072	012620 				MOV	(SP)+,(R0)+	;(POP) EVENT FLAG MASK
   6318	023074	012620 				MOV	(SP)+,(R0)+	;(POP) EVENT FLAG WORD ADDRESS
   6319					;
   6320	023076	104401 				TRAP	DR.01		;RETURN STS=+1
   6321					;
DMMKT	- "MARK TIME" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 119
DIRECTIVE -- MARK TIME

   6323
   6324
   6325						.TITLE	DMCMT	- "CANCEL MARK TIME" DIRECTIVE MODULE
   6326						.SBTTL	CANCEL MARK TIME -- COPYRIGHT STATEMENT
   6327	023100					IDENT$	1,0
						.IDENT	/001000/
   6328					;
   6329					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   6330					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6331					;			ALL RIGHTS RESERVED.
   6332					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6333					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6334					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6335					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6336					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6337					;
   6338					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6339					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6340					;       CORPORATION.
   6341					;
   6342					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6343					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6344					;
   6345					;		MODULE: "CANCEL MARK TIME" DIRECTIVE
   6346					;
   6347					;		VERSION: 01-00
   6348					;
   6349					;		AUTHOR:  R. MCLEAN
   6350					;
   6351					;		DATE: 19 MAR 75
   6352					;
   6353					;
   6354					;	THIS MODULE CONTAINS:
   6355					;
   6356					;	1 -- CODE TO SERVICE THE "CANCEL MARK TIME" DIRECTIVE.
   6357					;
   6358					;	MACROS
   6359					;
   6360
   6361						.MCALL	CALL,RETURN
DMCMT	- "CANCEL MARK TIME" DI	MACRO M1113  03-APR-86 18:57  PAGE 120
DIRECTIVE -- CANCEL MARK-TIME REQUESTS

   6363						.SBTTL	DIRECTIVE -- CANCEL MARK-TIME REQUESTS
   6364					;+
   6365					; THE "CANCEL MARK-TIME REQUESTS" DIRECTIVE
   6366					;
   6367					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CANCEL MARK-TIME REQUESTS
   6368					; THAT HAVE BEEN MADE BY THE ISSUING TASK.
   6369					;
   6370					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED TO CANCEL ALL MARK-TIME
   6371					; REQUESTS THAT HAVE BEEN MADE BY THE ISSUING TASK:
   6372					;
   6373					;	WD. 00 -- DIC (21.) & DPB SIZE (1.).
   6374					;
   6375					;
   6376					; THE FOLLOWING STATUS IS RETURNED:
   6377					;
   6378					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6379					; OF ONE (R0 - +1).
   6380					;
   6381					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6382					;
   6383					;	R0 -- -97 -- INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   6384					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   6385					;-
   6386					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6387					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6388					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6389					;	R0 -- PC OF EMT INSTRUCTION
   6390					;	R1 -- WORD FOLLOWING DIC & SIZE
   6391					;	R2 -- DPB SIZE
   6392					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6393					;
   6394					;
   6395					; ALL MARK-TIME REQUESTS BY THE ISSUING TASK ARE TO BE DELETED
   6396					; FROM THE CLOCK QUEUE.
   6397					;
   6398					;
   6399	023100	010546 			.D.CMT::MOV	R5,-(SP)	;SAVE CURRENT TASK POINTER
   6400	023102	012704 	002376'			MOV	#.CLKBA,R4	;USE R4 TO SCAN DEQUE
   6401					;
   6402	023106	020427 	002602'		50$:	CMP	R4,#.CLKEA	;END OF SCAN (END OF DEQUE)?
   6403	023112	001002 				BNE	60$
   6404	023114	012605 				MOV	(SP)+,R5	;RESTORE CURRENT TASK POINTER
   6405	023116	104401 				TRAP	DR.01		;YES -- RETURN STS=+1.
   6406									;NO -- CHECK NODE POINTED TO BY R4
   6407	023120	026405 	000000 		60$:	CMP	C.AT(R4),R5	;YES -- WAS REQUEST MADE BY ISSUING TASK?
   6408	023124	001005 				BNE	45$		;NO -- NEXT NODE
   6409									;DELETE NODE (PER R4) FROM CLOCK QUEUE, AND
   6410	023126					CALL	.CKDEL		;QUEUE NODE (R4 IS NOT ALTERED).
	023126	004737 	044406'			JSR	PC,.CKDEL
   6411					;
   6412					;
   6413	023132	000765 				BR	50$		;TEST FOR END OF DEQUE
   6414					;
   6415	023134	012605 			90$:	MOV	(SP)+,R5	;RESTORE CURRENT TASK POINTER
   6416	023136	104637 				TRAP	DE.97		;TO RETURN STS=-97.
   6417					;
   6418	023140	062704 	000014 		45$:	ADD	#C.SZ,R4	;UPDATE THE Q SIZE TO LOOK AT NEXT ENTRY
DMCMT	- "CANCEL MARK TIME" DI	MACRO M1113  03-APR-86 18:57  PAGE 120-1
DIRECTIVE -- CANCEL MARK-TIME REQUESTS

   6419	023144	000760 				BR	50$
   6420					;
DMCMT	- "CANCEL MARK TIME" DI	MACRO M1113  03-APR-86 18:57  PAGE 121
DIRECTIVE -- CANCEL MARK-TIME REQUESTS

   6422
   6423						.TITLE	DMEXT	- "EXIT" DIRECTIVE MODULE
   6424						.SBTTL	EXIT -- COPYRIGHT STATEMENT
   6425	023146					IDENT$	1,0
						.IDENT	/001000/
   6426					;
   6427					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   6428					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6429					;			ALL RIGHTS RESERVED.
   6430					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6431					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6432					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6433					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6434					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6435					;
   6436					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6437					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6438					;       CORPORATION.
   6439					;
   6440					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6441					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6442					;
   6443					;		MODULE: "EXIT" DIRECTIVE
   6444					;
   6445					;		VERSION: 01-00
   6446					;
   6447					;		AUTHOR: R. MCLEAN
   6448					;
   6449					;		DATE: 19 MAR 75
   6450					;
   6451					;
   6452					;	THIS MODULE CONTAINS:
   6453					;
   6454					;	1 -- CODE TO SERVICE THE "EXIT" DIRECTIVE
   6455					;
   6456					;	MACROS
   6457					;
   6458
   6459						.MCALL	CALL,RETURN
DMEXT	- "EXIT" DIRECTIVE MODU	MACRO M1113  03-APR-86 18:57  PAGE 122
DIRECTIVE -- TASK EXIT

   6461						.SBTTL	DIRECTIVE -- TASK EXIT
   6462					;+
   6463					; THE "TASK EXIT" DIRECTIVE
   6464					;
   6465					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO TERMINATE THE EXECUTION OF THE
   6466					; ISSUING TASK.
   6467					;
   6468					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6469					;
   6470					;	WD. 00 -- DIC (27.) & DPB SIZE (1.).
   6471					;
   6472					; THE FOLLOWING STATUS IS RETURNED:
   6473					;
   6474					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6475					; OF ONE (+1).
   6476					;
   6477					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6478					;
   6479					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6480					;-
   6481					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6482					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   6483					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6484					;	R1 -- ADDRESS OF WORD FOLLOWING DIC & SIZE
   6485					;	R2 -- DPB SIZE
   6486					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6487					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6488					;
   6489					;
   6490					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6491					;
   6492					; R5 CONTAINS THE EXITING TASK'S ATL NODE ADDRESS.
   6493					;
   6494	023146	042766 	000340 	000020 	.D.EXT::BIC  #000340,EM.DRO(SP)	;SET ISSUING TASK'S PROCESSRO PRIROITY TO ZERO TO
   6495									;PREVENT RETURN TO TASK IF EXIT DIRECTIVE HAS
   6496									;BEEN ISSUED FROM NON TASK LEVEL
   6497					;
   6498	023154	112765 	000026 	000014 		MOVB  #TS.EXT,A.TS(R5)	;CHANGE STATUS TO "EXIT", INDICATE
   6499	023162	005065 	000024 			CLR	A.FM+0(R5)	;NO TERMINATION NOTIFICATION, AND
   6500	023166	104401 				TRAP	DR.01		;EXIT DIRECTIVE SERVICE (SET STS=+1)
   6501					;
DMEXT	- "EXIT" DIRECTIVE MODU	MACRO M1113  03-APR-86 18:57  PAGE 123
DIRECTIVE -- TASK EXIT

   6503
   6504
   6505						.TITLE	DMQIO	- "QUEUE I/O" DIRECTIVE MODULE
   6506						.SBTTL	QUEUE I/O -- COPYRIGHT STATEMENT
   6507	023170					IDENT$	1,0
						.IDENT	/001000/
   6508					;
   6509					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   6510					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6511					;			ALL RIGHTS RESERVED.
   6512					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6513					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6514					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6515					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6516					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6517					;
   6518					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6519					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6520					;       CORPORATION.
   6521					;
   6522					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6523					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6524					;
   6525					;		MODULE: "QUEUE I/O" DIRECTIVE
   6526					;
   6527					;		VERSION: 01-00
   6528					;
   6529					;		AUTHOR: R. MCLEAN
   6530					;
   6531					;		DATE: 19 JUL 75
   6532					;
   6533					;
   6534					;	THIS MODULE CONTAINS:
   6535					;
   6536					;	1 -- CODE TO SERVICE THE "QUEUE I/O" DIRECTIVE.
   6537					;	2 -- CODE TO SERVICE THE "QUEUE I/O AND WAIT" DIRECTIVE.
   6538					;
   6539					;	MACROS
   6540					;
   6541
   6542						.MCALL	CALL,RETURN,MFPI,MTPI,MTPS,MFPS
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 124
DIRECTIVE -- QUEUE I/O

   6544						.SBTTL	DIRECTIVE -- QUEUE I/O
   6545					;+
   6546					; THE "QUEUE I/O" DIRECITVE
   6547					;
   6548					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO PLACE AN I/O REQUEST FOR AN
   6549					; INDICATED DEVICE IN A QUEUE OF PRIORITY ORDERED REQUESTS FOR THAT DEVICE-
   6550					; UNIT.  THE DEVICE-UNIT IS SPECIFIED AS A LOGICAL UNIT NUMBER (LUN), WHICH
   6551					; IS MAPPED INTO A PHYSICAL UNIT SPECIFICATION PER LUN ASSIGNMENT.
   6552					;
   6553					; EACH LUN IS REPRESENTED BY AN ENTRY IN THE ISSUING TASK'S LUT (LOGICAL
   6554					; UNIT TABLE) IN THE TASK'S HEADER.  EACH PHYSICAL UNIT IS REPRESENTED
   6555					; BY AN ENTRY IN THE PUD (PHYSICAL UNIT DIRECTORY).  WHEN A LUN IS
   6556					; ASSIGNED TO A PHYSICAL UNIT, THE ADDRESS OF THE CORRESPONDING PUD
   6557					; ENTRY IS SET IN THE CORRESPONDING LUT ENTRY.  WHEN A LUN IS NOT
   6558					; ASSIGNED TO A PHYSICAL UNIT ("DEASSIGNED" OR "ASSIGNED TO NONE"), THE
   6559					; CORRESPONDING LUT ENTRY IS SET TO ZERO.
   6560					;
   6561					; NORMALLY, A SIGNIFICANT EVENT IS DECLARED BY HANDLER TASKS (VIA SYSTEM
   6562					; SUBROUTINES) UPON I/O COMPLETION.
   6563					;
   6564					;	IF AN EVENT FLAG IS SPECIFIED, IT IS CLEARED WHEN THE REQUEST
   6565					;	IS QUEUED, AND SET AT THE SIGNIFICANT EVENT.
   6566					;
   6567					;	IF AN AST SERVICE ENTRY POINT IS SPECIFIED, THE AST WILL OCCUR
   6568					;	UPON I/O COMPLETION WITH THE TASK'S PS, PC, VIRTUAL ZERO (DIRECTIVE
   6569					;	STATUS), AND [ADDRESS OF I/O STATUS BLOCK] PUSHED ONTO THE TASK'S
   6570					;	(USER) STACK.
   6571					;
   6572					; A 6-12 WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6573					;
   6574					;	WD. 00 -- DIC (01.) & DPB SIZE (6-12),
   6575					;	WD. 01 -- I/O FUNCTION CODE,
   6576					;	WD. 02 -- LUN,
   6577					;	WD. 03 -- [EFN] & [PRIORITY],
   6578					;	WD. 04 -- [ADDRESS OF I/O STATUS BLOCK],
   6579					;	WD. 05 -- [I/O DONE AST SERVICE ENTRY POINT],
   6580					;	WD. 06 -- PARAMETER #1,
   6581					;	WD. 07 -- PARAMETER #2,
   6582					;	WD. 10 -- PARAMETER #3,
   6583					;	WD. 11 -- PARAMETER #4,
   6584					;	WD. 12 -- PARAMETER #5,
   6585					;	WD. 13 -- PARAMETER #6.
   6586					;
   6587					; THE FORMAT OF THE I/O REQUEST NODE CREATED IS DESCRIBED
   6588					; UNDER "SYMBOLIC DEFINITIONS".
   6589					;
   6590					; THE FOLLOWING STATUS IS RETURNED:
   6591					;
   6592					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6593					; OF ONE (+1).
   6594					;
   6595					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6596					;
   6597					;	-01 -- UNAVAILABLE POOL NODE FOR REQUEST QUEUE,
   6598					;	-05 -- UNASSIGNED LUN,
   6599					;
   6600					;	-95 -- INVALID PRIORITY (>250.),
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 124-1
DIRECTIVE -- QUEUE I/O

   6601					;	-96 -- INVALID LUN,
   6602					;	-97 -- INVALID EFN (>64.),
   6603					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   6604					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6605					; THE "QUEUE I/O AND WAIT" DIRECITVE
   6606					;
   6607					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO PLACE AN I/O REQUEST FOR AN
   6608					; INDICATED DEVICE IN A QUEUE OF PRIORITY ORDERED REQUESTS FOR THAT DEVICE-
   6609					; UNIT.  THE DEVICE-UNIT IS SPECIFIED AS A LOGICAL UNIT NUMBER (LUN), WHICH
   6610					; IS MAPPED INTO A PHYSICAL UNIT SPECIFICATION PER LUN ASSIGNMENT.
   6611					;
   6612					; EACH LUN IS REPRESENTED BY AN ENTRY IN THE ISSUING TASK'S LUT (LOGICAL
   6613					; UNIT TABLE) IN THE TASK'S HEADER.  EACH PHYSICAL UNIT IS REPRESENTED
   6614					; BY AN ENTRY IN THE PUD (PHYSICAL UNIT DIRECTORY).  WHEN A LUN IS
   6615					; ASSIGNED TO A PHYSICAL UNIT, THE ADDRESS OF THE CORRESPONDING PUD
   6616					; ENTRY IS SET IN THE CORRESPONDING LUT ENTRY.  WHEN A LUN IS NOT
   6617					; ASSIGNED TO A PHYSICAL UNIT ("DEASSIGNED" OR "ASSIGNED TO NONE"), THE
   6618					; CORRESPONDING LUT ENTRY IS SET TO ZERO.
   6619					;
   6620					; NORMALLY, A SIGNIFICANT EVENT IS DECLARED BY HANDLER TASKS (VIA SYSTEM
   6621					; SUBROUTINES) UPON I/O COMPLETION.
   6622					;
   6623					;	IF AN EVENT FLAG IS SPECIFIED, IT IS CLEARED WHEN THE REQUEST
   6624					;	IS QUEUED, AND SET AT THE SIGNIFICANT EVENT.
   6625					;	IF AN EVENT FLAG IS SPECIFIED, A WAIT DIRECTIVE IS ALSO
   6626					;	EXECUTED BEFORE TASK SWITCHING IS ENABLED.
   6627					;
   6628					;	IF NO EVENT FLAG IS SPECIFIED THE I/O WILL BE QUEUE'D
   6629					;	AND THE WAIT DIRECTIVE WILL BE REJECTED (STATUS -97.)
   6630					;
   6631					;
   6632					;	IF AN AST SERVICE ENTRY POINT IS SPECIFIED, THE AST WILL OCCUR
   6633					;	UPON I/O COMPLETION WITH THE TASK'S PS, PC, VIRTUAL ZERO (DIRECTIVE
   6634					;	STATUS), AND [ADDRESS OF I/O STATUS BLOCK] PUSHED ONTO THE TASK'S
   6635					;	(USER) STACK.
   6636					;
   6637					; A 6-12 WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6638					;
   6639					;	WD. 00 -- DIC (03.) & DPB SIZE (6-12),
   6640					;	WD. 01 -- I/O FUNCTION CODE,
   6641					;	WD. 02 -- LUN,
   6642					;	WD. 03 -- [EFN] & [PRIORITY],
   6643					;	WD. 04 -- [ADDRESS OF I/O STATUS BLOCK],
   6644					;	WD. 05 -- [I/O DONE AST SERVICE ENTRY POINT],
   6645					;	WD. 06 -- PARAMETER #1,
   6646					;	WD. 07 -- PARAMETER #2,
   6647					;	WD. 10 -- PARAMETER #3,
   6648					;	WD. 11 -- PARAMETER #4,
   6649					;	WD. 12 -- PARAMETER #5,
   6650					;	WD. 13 -- PARAMETER #6.
   6651					;
   6652					; THE FORMAT OF THE I/O REQUEST NODE CREATED IS DESCRIBED
   6653					; UNDER "SYMBOLIC DEFINITIONS".
   6654					;
   6655					; THE FOLLOWING STATUS IS RETURNED:
   6656					;
   6657					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 124-2
DIRECTIVE -- QUEUE I/O

   6658					; OF ONE (+1).
   6659					;
   6660					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6661					;
   6662					;	-01 -- UNAVAILABLE POOL NODE FOR REQUEST QUEUE,
   6663					;	-05 -- UNASSIGNED LUN,
   6664					;	-06 -- HANDLER TASK NOT DECLARED RESIDENT,
   6665					;
   6666					;	-95 -- INVALID PRIORITY (>250.),
   6667					;	-96 -- INVALID LUN,
   6668					;	-97 -- INVALID EFN (>64.), OR 0 EVENT FLAG (I/O QUEUE'D BUT WAIT NOT EXECUTED),
   6669					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   6670					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6671					;-
   6672					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6673					; DIRECTIVE ISSUING TASK'S PS, PC, & R5-R0 PUSHED ONTO THE
   6674					; KERNEL STACK, AND R5-R0 SET AS FOLLOWS:
   6675					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6676					;
   6677	023170	010346 			.D.QIO::MOV	R3,-(SP)	;SAVE THE DIC TO DETERMINE IF QIO& WAIT OR JUST QIO.
   6678					;
   6679	023172				20$:	MFPS	(R1)+,R3	;SET R3 TO FUNCTION CODE
	023172	012103 				MOV	(R1)+,R3
   6680									;(LEAVE R1 POINTING TO LUN WORD)
   6681					;
   6682	023174					MFPI	(R1)+		;PUSH LUN, AND CONVERT TO PUD ENTRY ADR
	023174	012146 				MOV	(R1)+,-(SP)
   6683	023176					CALL	.VCLUN		;(LEAVE R1 POINTING TO EFN/PRI WORD)
	023176	004737 	016104'			JSR	PC,.VCLUN
   6684									;IF INVALID LUN, RETURN STS=-96.
   6685	023202	011600 				MOV	@SP,R0		;SET R0 TO PUD ENTRY ADR IF LUN ASSIGNED
   6686	023204	001001 				BNE	40$		;IF UN-ASSIGNED LUN, RETURN STS=-05.
   6687	023206	104773 				TRAP	DE.05
   6688	023210	010246 			40$:	MOV	R2,-(SP)	;PUSH DPB SIZE
   6689					;
   6690									;TO ACCESS REQUESTOR'S HEADER BY '.VCLUN').
   6691					;
   6692	023212					MFPI	+4(R1)		;PUSH I/O DONE AST ENTRY PT (OR ZERO)
	023212	016146 	000004 			MOV	+4(R1),-(SP)
   6693					;
   6694	023216					MFPI	+02(R1)		;PUSH I/O STATUS BLOCK ADR (OR ZERO),
	023216	016146 	000002 			MOV	+02(R1),-(SP)
   6695	023222	011602 				MOV	@SP,R2		;AND CLEAR TWO-WORD STATUS BLOCK.
   6696	023224	001404 				BEQ	50$		;(IF SPECIFIED).  IF PART OF STATUS
   6697	023226	005046 				CLR	-(SP)		;OUT OF ADDRESS SPACE, RETURN
   6698	023230					MTPI	(R2)+
	023230	012622 				MOV	(SP)+,(R2)+
   6699	023232	005046 				CLR	-(SP)
   6700	023234					MTPI	@R2
	023234	012612 				MOV	(SP)+,@R2
   6701	023236				50$:
   6702	023236	010346 				MOV	R3,-(SP)	;PUSH I/O FUNCTION CODE WORD
   6703					;
   6704									;R1 IS POINTING TO [EFN] IN DPB.
   6705					;
   6706	023240					CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	023240	004737 	044320'			JSR	PC,.CEFN
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 124-3
DIRECTIVE -- QUEUE I/O

   6707									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   6708									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   6709									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   6710									;SPECIFIED), RETURN WITH R2=R3=00.
   6711									;CONDITION CODES ARE SET PER "TST R3".
   6712					;
   6713	023244					MFPS	@R1,R4		;SET PRIORITY IN R4, EFN IN HIGH ORDER
	023244	011104 				MOV	@R1,R4
   6714									;BYTE OF R0, AND ZERO IN LOW ORDER BYTE
   6715	023246	010400 				MOV	R4,R0		;OF R0
   6716	023250	105004 				CLRB	R4
   6717	023252	000304 				SWAB	R4
   6718	023254	000300 				SWAB	R0
   6719	023256	105000 				CLRB	R0
   6720									;IS A PRIORITY SPECIFIED?
   6721	023260	001002 				BNE	70$		;YES -- CHECK ITS VALIDITY
   6722	023262	156504 	000010 			BISB	A.RP(R5),R4	;NO -- USE RUN PARIORITY OF ISSUING TASK
   6723									;("BISB" INTO A CLEARED R4 EFFECTS A
   6724									;"MOVB" WITHOUT SIGN EXTENSION.)
   6725					;
   6726	023266				70$:	MFPI	-(R1)		;PUSH LUN & FORM LUN/EFN WORD ON STACK.
	023266	014146 				MOV	-(R1),-(SP)
   6727	023270	050016 				BIS	R0,@SP		;(R1 IS LEFT POINTING TO LUN)
   6728					;
   6729	023272	010446 				MOV	R4,-(SP)	;PUSH PRI/BYTE RESERVED FOR DPB SIZE
   6730					;
   6731					; STACK & REGISTER SUMMARY:
   6732					;
   6733					;	SP+14 -- PUD ENTRY ADDRESS
   6734					;	SP+12 -- DPB SIZE
   6735					;	SP+10 -- AST ENTRY PT (OR ZERO)
   6736					;	SP+06 -- I/O STATUS BUF ADR (OR ZERO)
   6737					;	SP+04 -- I/O FUNCTION CODE
   6738					;	SP+02 -- LUN/EFN WORD
   6739					;	SP+00 -- PRI/RESERVED BYTE
   6740					;
   6741					;	R5 -- ATL NODE ADR OF ISSUING TASK
   6742					;	R2 & R3 SETUP TO CLEAR EVENT FLAG
   6743					;
   6744	023274	116666 	000012 	000001 		MOVB	+12(SP),+1(SP)	;SET DPB SIZE IN "PRI/DPB-SIZE" WORD
   6745					;
   6746	023302	010100 				MOV	R1,R0		;SETUP R0 TO FETCH I/O PARAMETERS (FROM DPB)
   6747	023304	062700 	000010 			ADD	#10,R0
   6748	023310	010046 				MOV	R0,-(SP)	;SAVE R0
   6749					;
   6750	023312	012701 	000040 			MOV	#32.,R1		;SET UP TO PICK A NODE
   6751	023316					CALL	..ALCB
	023316	004737 	045654'			JSR	PC,..ALCB
   6752	023322	010001 				MOV	R0,R1		;SET UP NODE ADDRESS
   6753	023324	103001 				BCC	79$		;OK -- CHECK FUNCTION CODE
   6754	023326	104777 				TRAP	DE.01		;NO -- RETURN POOL EMPTY ERROR
   6755					;
   6756					;
   6757					;
   6758					; REQUEST CAN BE MADE -- STACK & REGISTER SUMMARY:
   6759					;
   6760					;	SP+14 -- PUD ENTRY ADDRESS
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 124-4
DIRECTIVE -- QUEUE I/O

   6761					;	SP+12 -- DPB SIZE
   6762					;	SP+10 -- AST ENTRY PT (OR ZERO)
   6763					;	SP+06 -- I/O STATUS BUF ADR (OR ZERO)
   6764					;	SP+04 -- I/O FUNCTION CODE
   6765					;	SP+02 -- LUN/EFN WORD
   6766					;	SP+00 -- PRI/DPB SIZE
   6767					;
   6768					;	R5 -- ATL NODE ADR OF ISSUING TASK
   6769					;	R1 -- I/O REQUEST NODE ADDRESS
   6770					;	R2 & R3 SETUP TO CLEAR EVENT FLAG
   6771					;	R0 -- POINTING TO FIRST PARAMETER WORD IN DPB
   6772					;
   6773	023330	040312 			79$:	BIC	R3,@R2		;CLEAR EVENT FLAG, IFF SPECIFIED.
   6774									;NOTE -- IF NO EFN SPECIFIED, R3=R3=00.
   6775									;I.E., NO BITS IN LOCATION ZERO ARE CLEARED.
   6776	023332	012600 				MOV	(SP)+,R0	;RESTORE BUFFER ADDRESS
   6777					;
   6778					; FILL I/O REQUEST NODE
   6779					;
   6780	023334	010104 				MOV	R1,R4		;SETUP R4 TO FILL NODE
   6781	023336	022424 				CMP	(R4)+,(R4)+	;MOVE OVER LISTHEAD
   6782	023340	016524 	000016 			MOV	A.TD(R5),(R4)+	;SET STD ADDRESS
   6783					;
   6784	023344	010524 				MOV	R5,(R4)+	;SET ATL NODE ADR OF REQUESTOR
   6785	023346	012624 				MOV	(SP)+,(R4)+	;(POP) SET PRI/DPB-SIZE WORD
   6786	023350	011603 				MOV	@SP,R3		;SAVE LUN/EFN
   6787	023352	012624 				MOV	(SP)+,(R4)+	;(POP) SET LUN/EFN WORD
   6788	023354	012624 				MOV	(SP)+,(R4)+	;(POP) SET I/O FUNCTION CODE
   6789	023356	012624 				MOV	(SP)+,(R4)+	;(POP) SET I/O STATUS BLK ADR (OR ZERO)
   6790	023360	012624 				MOV	(SP)+,(R4)+	;(POP) SET AST ENTRY PT (OR ZERO)
   6791	023362	013724 	001156'			MOV	.SYUIC,(R4)+	;SET THE UIC
   6792					;
   6793	023366	012602 				MOV	(SP)+,R2	;(POP) SET DPB SIZE IN R2, CONVERT
   6794	023370	162702 	000006 			SUB	#6.,R2		;TO NUMBER OF I/O PARAMETERS, AND
   6795	023374	001402 				BEQ	90$		;MOVE PARAMETERS FROM DPB TO I/O
   6796	023376				80$:				;REQUEST NODE.
   6797	023376					MFPS	(R0)+,(R4)+
	023376	012024 				MOV	(R0)+,(R4)+
   6798	023400	077202 				SOB	R2,80$
   6799	023402				90$:
   6800					;
   6801					;
   6802	023402	012602 				MOV	(SP)+,R2	;(POP) SET R2 TO PUD ENTRY ADDRESS, AND
   6803	023404	016204 	000020 			MOV	U.HA(R2),R4	;SET R2 TO HANDLER TASK'S ATL NODE ADDRESS.
   6804					;
   6805					; IF FUNCTION CODE 'RF.XR' IS SET, THIS FUNCTION IS AN "EXPRESS" FUNCTION.
   6806					; EXPRESS REQUESTS ARE NORMALLY DE-QUEUED BEFORE NORMAL REQUESTS. VIZ.,
   6807					; "KILL READ REQUEST", OR "RUNDOWN I/O ON TASK".
   6808					;
   6809	023410	010137 	023626'			MOV	R1,QNDSV	;SAVE THE QIO NODE ADDRESS
   6810	023414	016100 	000014 			MOV	R.FC(R1),R0	;FIND THE FUNCTION CODE
   6811	023420	020027 	002500 			CMP	R0,#IO.STC	;CHECK TO SEE IF LEGAL
   6812	023424	101457 				BLOS	95$		;YES -- DON'T NEED FCP
   6813	023426	010246 				MOV	R2,-(SP)
   6814	023430	010346 				MOV	R3,-(SP)
   6815	023432	010203 				MOV	R2,R3		;FIND THE PUD ADDRESS
   6816	023434	016302 	000040 			MOV	U.ACP(R3),R2	;FIND THE STD ADDRESS OF THE ACP
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 124-5
DIRECTIVE -- QUEUE I/O

   6817	023440	001015 				BNE	77$		;FOUND ACP -- DON'T DIDDLE CODES
   6818	023442	022700 	011000 			CMP	#IO.WVB,R0	;IS CODE WRITE VIRTUAL?
   6819	023446	001003 				BNE	74$		;NO -- LOOK FOR READ
   6820	023450	012761 	000400 	000014 		MOV	#IO.WLB,R.FC(R1) ;YES SET FUNCTON CODE
   6821	023456	022700 	010400 		74$:	CMP	#IO.RVB,R0	;IS FUNCTION CODE READ VIRTUAL?
   6822	023462	001036 				BNE	93$		;NO -- FORGET IT
   6823	023464	012761 	001000 	000014 		MOV	#IO.RLB,R.FC(R1) ;SET FUNCTION CODE
   6824	023472	000432 				BR	93$
   6825	023474				77$:
   6829	023474	020027 	010400 			CMP	R0,#IO.RVB	;CHECK FOR READ/WRITE VIRTUAL
   6830	023500	001403 				BEQ	71$		;YES -- ATTEMPT TO MAP IT
   6831	023502	020027 	011000 			CMP	R0,#IO.WVB	;MAYBE TRY WRITE
   6832	023506	001003 				BNE	73$		;NO -- CALL FCP
   6833	023510				71$:	CALL	..VTOL		;TRY AND MAP
	023510	004737 	050406'			JSR	PC,..VTOL
   6834	023514	103021 				BCC	93$		;MADE IT -- DON'T CALL FCP
   6835	023516	010337 	023630'		73$:	MOV	R3,QNDSV+2	;SET PUD ADDRESS
   6836	023522	016137 	000014 	023632'		MOV	R.FC(R1),QNDSV+4	;SET FUNCTION CODE
   6837	023530	012701 	023634'			MOV	#PRMBLK,R1	;POINTER TO BUFFER ADDRESS AND EFN
   6838	023534					CALL	.SEND		;SEND BLOCK
	023534	004737 	024006'			JSR	PC,.SEND
   6839	023540	005003 				CLR	R3
   6840	023542	005004 				CLR	R4		;SET DEFAULT PARTITION AND PRI FOR ACP
   6841	023544	010102 				MOV	R1,R2
   6842	023546					CALL	.REQS		;REQ ACP
	023546	004737 	015276'			JSR	PC,.REQS
   6843	023552	012603 				MOV	(SP)+,R3
   6844	023554	012602 				MOV	(SP)+,R2
   6845	023556	000413 				BR	100$
   6846					;
   6847	023560	012603 			93$:	MOV	(SP)+,R3	;RESTORE
   6848	023562	012602 				MOV	(SP)+,R2
   6849	023564				95$:				;(R2 CONTAINS PUD ENTRY ADDRESS)
   6850	023564	062702 	000022 			ADD	#U.RF,R2	;SET R2 TO I/O REQUEST DEQUE LISTHEAD ADR
   6851									;(R1 IS SET TO REQUEST NODE ADDRESS)
   6852	023570					CALL	..IPRI		;AND INSERT REQUEST NODE BY PRIORITY.
	023570	004737 	045360'			JSR	PC,..IPRI
   6853	023574	052764 	000010 	000020 		BIS	#EF.NIR,A.EF+0(R4) ;NO -- SET TRIGGER EVENT FLAG 'EF.NIR'.
   6854	023602					CALL	..DSEV		;DECLARE SIGNIFICANT EVENT TO EFFECT "TRIGGER"
	023602	004737 	045264'			JSR	PC,..DSEV
   6855					;
   6856	023606	022627 	000003 		100$:	CMP	(SP)+,#3	;CHECK THE DIC TO SEE IF QIO AND WAIT
   6857	023612	001401 				BEQ	120$		;YES -- ISSUE THE WAIT
   6858					;				;NO -- JUST RETURN
   6859	023614	104401 				TRAP	DR.01		;RETURN STS=+1
   6860					;
   6861	023616	105003 			120$:	CLRB	R3		;SET UP FOR THE WAIT DIRECTIVE
   6862	023620	000303 				SWAB	R3
   6863	023622	000137 	022602'			JMP	.D.WFO		;ISSUE WAIT DIRECTIVE
   6864					;
   6865	023626	000000 	000000 	000000 	QNDSV:	.WORD	0,0,0		;SAVE AREA FOR NODE
   6866					;
   6867	023634	023626'			PRMBLK:	.WORD	QNDSV		;POINTER TO SEND BUFFER
   6868	023636	000000 				.WORD	0		;EFN (0)
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1113  03-APR-86 18:57  PAGE 125
DIRECTIVE -- QUEUE I/O

   6870
   6871						.TITLE	DMSAR	- SEND & RECEIVE DIRECTIVES MODULE
   6872						.SBTTL	SEND AND RECEIVE -- COPYRIGT STATEMENT
   6873	023640					IDENT$	2,0
						.IDENT	/002000/
   6874					;
   6875					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   6876					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6877					;			ALL RIGHTS RESERVED.
   6878					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6879					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6880					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6881					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6882					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6883					;
   6884					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6885					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6886					;       CORPORATION.
   6887					;
   6888					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6889					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6890					;
   6891					;
   6892					;		MODULE: SEND & RECEIVE DIRECTIVES
   6893					;
   6894					;		VERSION: 01-00
   6895					;
   6896					;		AUTHOR: R. MCLEAN
   6897					;
   6898					;		DATE: 19 MAY 75
   6899					;
   6900					;
   6901					;	THIS MODULE CONTAINS:
   6902					;
   6903					;	1 -- CODE TO SERVICE THE "SEND DATA" DIRECTIVE,
   6904					;	2 -- CODE TO SERVICE THE "SEND AND REQUEST OR RESUME" DIRECTIVE,
   6905					;	3 -- CODE TO SERVICE THE "RECEIVE DATA" DIRECTIVE,
   6906					;	4 -- CODE TO SERVICE THE "RECEIVE OR EXIT" DIRECTIVE,
   6907					;	5 -- CODE TO SERVICE THE "RECEIVE OR SUSPEND" DIRECTIVE,
   6908					;
   6909					;	MACROS
   6910					;
   6911						.MCALL	CALL,RETURN,MTPI,MTPS,MFPI,MFPS
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 126
DIRECTIVE -- SEND DATA

   6913						.SBTTL	DIRECTIVE -- SEND DATA
   6914					;+
   6915					; THE "SEND DATA" DIRECTIVE
   6916					;
   6917					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO QUEUE (FIFO) A THIRTEEN WORD
   6918					; BLOCK OF DATA FOR A TASK TO RECEIVE.
   6919					;
   6920					; A FIVE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6921					;
   6922					;	WD. 00 -- DIC (13.) & DPB SIZE (5.),
   6923					;	WD. 01 -- RECEIVER TASK NAME (FIRST HALF),
   6924					;	WD. 02 -- RECEIVER TASK NAME (SECOND HALF),
   6925					;	WD. 03 -- ADDRESS OF THIRTEEN WORD DATA BLOCK,
   6926					;	WD. 04 -- [EVENT FLAG NUMBER (EFN)].
   6927					;
   6928					; WHEN AN EVENT FLAG IS SPECIFIED, A SIGNIFICANT EVENT IS DECLARED
   6929					; (IF THE DIRECTIVE IS PERFORMED) AND THE INDICATED EVENT FLAG IS SET.
   6930					;
   6931					; THE FOLLOWING STATUS IS RETURNED:
   6932					;
   6933					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6934					; OF ONE (+1).
   6935					;
   6936					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6937					;
   6938					;	-02 -- RECEIVER TASK NOT INSTALLED (NO STD ENTRY FOUND),
   6939					;	-04 -- INSUFFICIENT POOL NODES FOR "SEND",
   6940					;
   6941					;	-97 -- INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   6942					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6943					;-
   6944					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6945					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   6946					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6947					;	R0 -- PC OF EMT INSTRUCTION
   6948					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   6949					;	R2 -- DPB SIZE
   6950					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6951					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   6952					;
   6953					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6954					;
   6955	023640				.D.SEN::CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	023640	004737 	045574'			JSR	PC,..FSTD
   6956									;ZERO IF TASK NAME NOT FOUND (AND SET
   6957									;CONDITION CODES PER "TST R2").
   6958									;
   6959									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   6960					;
   6961	023644	001406 				BEQ	.X.02		;IF TASK NOT INSTALLED, RETURN STS=-02.
   6962					;
   6963					; R1 IS POINTING TO DPB WD. 03, AND R2 CONTAINS STD NODE ADR OF RECEIVER.
   6964					;
   6965	023646				10$:	CALL	.SEND		;SEND DATA & SET EVENT FLAG PER R1 & R2
	023646	004737 	024006'			JSR	PC,.SEND
   6966					;
   6967	023652	104401 				TRAP	DR.01		;RETURN STS=+1.
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 127
DIRECTIVE -- SEND AND REQUEST OR RESUME

   6969					.SBTTL	DIRECTIVE -- SEND AND REQUEST OR RESUME
   6970					;+
   6971					; THE "SEND AND REQUEST OR RESUME" DIRECTIVE
   6972					;
   6973					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO QUEUE (FIFO) A THIRTEEN WORD
   6974					; BLOCK OF DATA FOR A TASK TO RECEIVE, AND TO REQUEST OR RESUME THE
   6975					; EXECUTION OF THE RECEIVER TASK.
   6976					;
   6977					; THIS DIRECTIVE HAS THE EFFECT OF ISSUING A "SEND DATA" DIRECTIVE
   6978					; FOLLOWED BY A "REQUEST" OR "RESUME" DIRECTIVE, EXCEPT THAT (1) NO TASK
   6979					; SWITCHING CAN OCCUR BETWEEN THE SEND AND THE REQUEST OR RECEIVE, AND
   6980					; (2) IF THE SEND IS NOT PERFORMED, NEITHER THE REQEST NOR THE RESUME
   6981					; WILL BE ATTEMPTED.
   6982					;
   6983					; I.E., IF DATA IS SENT TO AN INACTIVE TASK, THAT TASK WILL BE REQUESTED;
   6984					; IF DATA IS SENT TO A SUSPENDED TASK, THAT TASK WILL BE RESUMED.
   6985					;
   6986					; A NINE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6987					;
   6988					;	WD. 00 -- DIC (15.) & DPB SIZE (9.),
   6989					;	WD. 01 -- RECEIVER TASK NAME (FIRST HALF),
   6990					;	WD. 02 -- RECEIVER TASK NAME (SECOND HALF),
   6991					;	WD. 03 -- [PARTITION NAME (FIRST HALF)],
   6992					;	WD. 04 -- [PARTITION NAME (SECOND HALF)],
   6993					;	WD. 05 -- [PRIORITY],
   6994					;	WD. 06 -- 0,
   6995					;	WD. 07 -- ADDRESS OF THIRTEEN WORD DATA BLOCK,
   6996					;	WD. 10 -- [EVENT FLAG NUMBER (EFN)].
   6997					;
   6998					; WHEN AN EVENT FLAG IS SPECIFIED, A SIGNIFICANT EVENT IS DECLARED
   6999					; (IF THE DIRECTIVE IS PERFORMED) AND THE INDICATED EVENT FLAG IS SET.
   7000					;
   7001					; THE FOLLOWING STATUS IS RETURNED:
   7002					;
   7003					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE
   7004					; STATUS OF:
   7005					;
   7006					;	+1 -- DATA SENT AND TASK REQUESTED,
   7007					;	+2 -- DATA SEND AND TASK RESUMED,
   7008					;	+3 -- DATA SENT TO AN NON-SUSPENDED ACTIVE TASK.
   7009					;
   7010					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7011					;
   7012					;	-01 -- [R] INSUFFICIENT POOL NODES AVAILABLE FOR "REQUEST",
   7013					;	-02 -- [B] RECEIVER TASK NOT INSTALLED (NO STD ENTRY FOUND),
   7014					;	-03 -- [R] PARTITION TOO SMALL FOR RECEIVER TASK,
   7015					;	-04 -- [B] INSUFFICIENT POOL NODES FOR "SEND",
   7016					;	-08 -- [R] RECEIVER TASK IS DISABLED,
   7017					;
   7018					;	-80 -- [B] DIRECTIVE ISSUED BY "BACKGROUND" TASK,
   7019					;	-94 -- [R] PARTITION NOT IN SYSTEM (NO TPD ENTRY FOUND),
   7020					;	-95 -- [R] INVALID PRIORITY SPECIFIED (<0 OR >250.),
   7021					;	-97 -- [B] INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   7022					;	-99 -- [B] DIC OR DPB SIZE IS INVALID.
   7023					;
   7024					; [R] -- REQUEST OR RESUME REJECTED
   7025					; [B] -- BOTH SEND & REQUEST OR RESUME REJECTED
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 127-1
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7026					;-
   7027					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7028					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7029					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7030					;	R0 -- PC OF EMT INSTRUCTION
   7031					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   7032					;	R2 -- DPB SIZE
   7033					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7034					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   7035					;
   7036					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7037					;
   7038	023654				.D.SAR::CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	023654	004737 	045574'			JSR	PC,..FSTD
   7039									;ZERO IF TASK NAME NOT FOUND (AND SET
   7040									;CONDITION CODES PER "TST R2").
   7041									;
   7042									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   7043					;
   7044	023660	001001 				BNE	SKX		;IF TASK NOT INSTALLED, RETURN STS=-02.
   7045	023662	104776 			.X.02:	TRAP	DE.02
   7046					;
   7047	023664	010146 			SKX:	MOV	R1,-(SP)	;PUSH (SAVE) R1 & R2, AND ADVANCE R1 TO POINT
   7048	023666	010246 				MOV	R2,-(SP)	;TO DPB WD. 07.
   7049	023670	062701 	000010 			ADD	#8.,R1
   7050					;
   7051					; R1 IS POINTING TO DPB WD. 07, AND R2 CONTAINS STD ENTRY ADR OF RECEIVER.
   7052					;
   7053	023674					CALL	.SEND		;SEND DATA & SET EVENT FLAG PER R1 & R2
	023674	004737 	024006'			JSR	PC,.SEND
   7054									;(R1, R2, R3, R4, & R5 ARE ALTERED)
   7055					;
   7056	023700	012602 				MOV	(SP)+,R2	;POP (RESTORE) R2 & R1
   7057	023702	012601 				MOV	(SP)+,R1	;(R1 IS POINTING TO DPB WD. 03.)
   7058					;
   7059	023704					CALL	.FEPPU		;SET R3 TO TPD ADDRESS IF A PARTITION IS
	023704	004737 	016000'			JSR	PC,.FEPPU
   7060									;SPECIFIED, OR TO ZERO IF NOT SPECIFIED.
   7061									;
   7062									;SET R4 TO PRIORITY IF SPECIFIED, OR TO
   7063									;ZERO IF NOT SPECIFIED.
   7064									;
   7065									;
   7066									;ADVANCE R1 BY EIGHT (PAST PARTITION NAME,
   7067									;PRIORITY INDICATOR, AND UIC INDICATOR.).
   7068									;
   7069									;IF INVALID PRIORITY, RETURN STS=-95.
   7070									;IF PARTITION NOT IS SYSTEM, RETURN
   7071									;STS=-94.  IF NON-PRIVILEGED TASK HAS
   7072									;SPECIFIED OTHER THAN OWN UIC, RETURN
   7073									;STS=-91.  IF SPECIFIED PARTITION IS
   7074									;TOO SMALL FOR TASK, RETURN STS=-03.
   7075					;
   7076					;
   7077	023710	012701 	000001 			MOV	#1,R1		;SET R1 TO INDICATE "MAKE TASK ACTIVE WHETHER
   7078									;MEMORY IS AVAILABLE OR NOT"
   7079					;
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 127-2
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7080	023714	016500 	000016 			MOV	A.TD(R5),R0	;SET R5 TO STD ADDRESS OF REQUESTOR
   7081					;
   7082	023720	010246 				MOV	R2,-(SP)	;PUSH STD ENTRY ADDRESS (FOR ATL SCAN)
   7083					;
   7084	023722					CALL	.REQS		;MAKE A TASK ACTIVE PER R0, R1, R2, R3, R4 & R5.
	023722	004737 	015276'			JSR	PC,.REQS
   7085									;(R1, R2, R3, R4, & R5 ARE ALTERED)
   7086	023726	012604 				MOV	(SP)+,R4	;POP STD ENTRY ADDRESS INTO R4
   7087					;
   7088	023730	020227 	000002 			CMP	R2,#02		;SPECIAL CASE -- IS TASK ACTIVE?
   7089	023734	001402 				BEQ	10$		;YES -- RESUME IF SUSPENDED
   7090	023736	000162 	015770'			JMP	.RQESD(R2)	;NO -- RETURN DIRECTIVE STATUS PER SUBROUTINE
   7091									;STATUS IN R2.
   7092					;
   7093					; RECEIVER TASK IS ACTIVE:
   7094					;
   7095					;	IF SUSPENDED, RESUME & RETURN STS=+2
   7096					;	IF NOT SUSPENDED, RETURN STS=+3
   7097					;
   7098					; R4 CONTAINS THE STD ENTRY ADDRESS OF THE RECEIVER TASK.
   7099					;
   7100	023742	012703 	007136'		10$:	MOV	#.ATLLH,R3	;SETUP FOR ATL SCAN
   7101	023746				20$:
   7102	023746	011303 				MOV	@R3,R3		;SETUP R3 TO EXAMINE NEXT ENTRY
   7103	023750	020337 	007140'			CMP	R3,.ATLLH+2	;IS R3 POINTING TO ENTRY FOR NUL TASK?
   7104	023754	001413 				BEQ	70$		;YES -- ATL NODE IS NOT IN THE ATL (IT IS
   7105									;IN THE "MRL" FOR A PARTITION) RETURN STS=+3.
   7106	023756	026304 	000016 			CMP	A.TD(R3),R4	;NO -- STD ADDRESS MATCH?
   7107	023762	001371 				BNE	20$		;NO -- CHECK NEXT ATL NODE
   7108	023764	126327 	000014 	000012 	60$:	CMPB  A.TS(R3),#TS.SUS	;NO -- IS TASK SUSPENDED?
   7109	023772	001004 				BNE	70$
   7110	023774	112763 	000010 	000014 		MOVB  #TS.RUN,A.TS(R3)	;YES -- CHANGE STATUS TO RUNNING (A SIGNIFICANT
   7111									;EVENT HAS BEEN DECLARED AS A RESULT OF THE
   7112	024002	104402 				TRAP	DR.02		;SEND), AND RETURN STS=+2.
   7113					;
   7114	024004	104403 			70$:	TRAP	DR.03		;STS +3
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 128
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7116					; SEND -- SUBROUTINE TO PERFORM "SEND" FOR "SEND DATA" AND "SEND DATA &
   7117					; REQUEST RECEIVER" DIRECTIVES.
   7118					;
   7119					; ENTRY CONDITIONS:
   7120					;
   7121					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   7122					;	R1 -- POINTING (IN DPB) TO ADR OF 13 WORD BLOCK OF DATA,
   7123					;	WHICH IS FOLLOWED BY AN [EFN].  BOTH WORDS MUST BE FETCHABLE
   7124					;	WITHOUT SEGMENT FAULT.
   7125					;	R2 -- STD ENTRY ADDRESS OF RECEIVER TASK
   7126					;
   7127					; CALLING SEQUENCE:
   7128					;
   7129					;	JSR  PC,SEND
   7130					;
   7131					; EXIT CONDITIONS:
   7132					;
   7133					;	IF NO POOL NODE AVAILABLE, RETURN AT 'DE.01'
   7134					;	IF INVALID EFN, RETURN AT 'DE.97'
   7135					;	IF PART OF DATA OUT OF TASK'S ADDRESS SPACE, RETURN AT 'DE.98'
   7136					;
   7137					;	IF SUCCESSFUL, DATA IS QUEUED, EFN (IF SPECIFIED) IS SET,
   7138					;	AND A SIGNIFICANT EVENT IS DECLARED.
   7139					;
   7140					;	R1 -- STD OF RECEIVER TASK
   7141					;
   7142					;
   7143					; REGISTERS ALTERED:
   7144					;
   7145					;	R1, R2, R3, R4, & R0
   7146					;
   7147	024006				.SEND::	MFPI	(R1)+		;SET R5 TO ADDRESS OF DATA BLOCK, AND
	024006	012146 				MOV	(R1)+,-(SP)
   7148	024010	012600 				MOV	(SP)+,R0	;LEAVE R1 POINTING TO [EFN].
   7149					;
   7150	024012	010246 				MOV	R2,-(SP)	;SAVE RECEIVER STD ENTRY ADR IN -(SP)
   7151					;
   7152									;R1 IS POINTING TO [EFN] IN DPB.
   7153					;
   7154	024014					CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	024014	004737 	044320'			JSR	PC,.CEFN
   7155									;IN R2, AND (2) FLAG MASK IN R3 (R1 IS
   7156									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   7157									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   7158									;SPECIFIED), RETURN WITH R2=R3=00.
   7159									;CONDITION CODES ARE SET PER "TST R3".
   7160					;
   7161	024020	010246 				MOV	R2,-(SP)	;PUSH "BIS" ADDRESS WORD
   7162	024022	010346 				MOV	R3,-(SP)	;PUSH "BIS" MASK WORD
   7163					;
   7164	024024	012704 	001432'			MOV	#.POLLH,R4	;LISTHEAD
   7165	024030					CALL	..PICK		;ISSUING TASK, AND SET R1 TO NODE ADR.
	024030	004737 	045476'			JSR	PC,..PICK
   7166	024034	103001 				BCC	10$		;IF NONE AVAILABLE, RETURN STS=-04.
   7167	024036	104774 				TRAP	DE.04
   7168					;
   7169	024040	010401 			10$:	MOV	R4,R1		;SETUP R3 TO FILL NODE
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 128-1
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7170	024042	062704 	000006 			ADD	#Q.D1,R4
   7171	024046	012703 	000015 			MOV	#13.,R3
   7172	024052				20$:
   7173	024052					MFPI	(R0)+		;MOVE WORD FROM DATA BLOCK TO NODE
	024052	012046 				MOV	(R0)+,-(SP)
   7174	024054	012624 				MOV	(SP)+,(R4)+
   7175	024056	077303 				SOB	R3,20$
   7176	024060	052636 				BIS	(SP)+,@(SP)+	;SET EVENT FLAG IF SPECIFIED (IF NOT
   7177	024062	011604 				MOV	@SP,R4		;FIND RECEIVER'S STD ADDRESS
   7178	024064	010461 	000004 			MOV	R4,Q.SI(R1)	;SET SENDERS STD ADDRESS
   7179					;
   7180	024070	016404 	000026 			MOV	S.RB(R4),R4	;SET R4 TO ADDRESS OF LAST NODE (OR LISTHEAD)
   7181	024074					CALL	..NADD		;OF TASK'S RECEIVE DEQUE (LISTHEAD IN STD),
	024074	004737 	045434'			JSR	PC,..NADD
   7182									;AND ADD NODE AT END OF DEQUE.
   7183					;
   7184									;SPECIFIED, SET NO BITS IN WORD ZERO).
   7185					;
   7186	024100	012601 				MOV	(SP)+,R1	;SET RECEIVER STD ADDRESS
   7187	024102	000137 	045264'			JMP	..DSEV		;DECLARE A SIGNIFICANT EVENT AND EXIT
   7188						;
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 129
DIRECTIVE -- RECEIVE DATA

   7190					.SBTTL	DIRECTIVE -- RECEIVE DATA
   7191					;+
   7192					; THE "RECEIVE DATA" DIRECTIVE
   7193					;
   7194					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECEIVE A THIRTEEN WORD
   7195					; DATA BLOCK THAT HAS BEEN QUEUED (FIFO) FOR IT (VIA "SEND DATA" OR
   7196					; "SEND DATA & REQUEST RECEIVER" DIRECTIVES).
   7197					;
   7198					; WHEN A SENDER TASK IS SPECIFIED, ONLY DATA SENT BY THE INDICATED
   7199					; TASK IS RECEIVED.
   7200					;
   7201					; A TWO-WORD SENDER TASK NAME, AND THE THIRTEEN-WORD DATA BLOCK, ARE
   7202					; RETURNED IN AN INDICATED FIFTEEN WORD BUFFER, WITH THE TASK NAME IN
   7203					; THE FIRST TWO WORDS.
   7204					;
   7205					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7206					;
   7207					;	WD. 00 -- DIC (17.) & DPB SIZE (4.),
   7208					;	WD. 01 -- [SENDER TASK NAME (FIRST HALF)],
   7209					;	WD. 02 -- [SENDER TASK NAME (SECOND HALF)],
   7210					;	WD. 03 -- ADDRESS OF FIFTEEN WORD BUFFER.
   7211					;
   7212					; THE FOLLOWING STATUS IS RETURNED:
   7213					;
   7214					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7215					; OF ONE (+1).
   7216					;
   7217					;
   7218					; CC-C SET TO INDICATE REJECTIONAND A DIRECTIVE STATUS OF:
   7219					;
   7220					;	-02 -- SPECIFIED SENDER TASK NOT INSTALLED,
   7221					;	-08 -- NO DATA QUEUED (SENT),
   7222					;
   7223					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7224					;-
   7225					; THIS DIRECTIVE SERVICE HAS A COMMON ENTRY WITH "RECEIVE DATA OR SUSPEND".
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 130
DIRECTIVE -- RECEIVE DATA OR EXIT

   7227					.SBTTL	DIRECTIVE -- RECEIVE DATA OR EXIT
   7228					;+
   7229					; THE "RECEIVE DATA OR EXIT" DIRECTIVE
   7230					;
   7231					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECEIVE A THIRTEEN WORD
   7232					; DATA BLOCK IF AT LEAST ONE IS CAN BE RECEIVED, OR TO EXIT IF NO
   7233					; THIRTEEN WORD DATA BLOCKS ARE CAN BE RECEIVED.
   7234					;
   7235					; DATA BLOCKS ARE QUEUED (FIFO) FOR THE TASK VIA THE "SEND DATA" OR
   7236					; THE "SEND DATA & REQUEST RECEIVER" DIRECTIVES.
   7237					;
   7238					; WHEN A SENDER TASK IS SPECIFIED, ONLY DATA SENT BY THE INDICATED
   7239					; TASK IS RECEIVED.
   7240					;
   7241					; A TWO-WORD SENDER TASK NAME, AND THE THIRTEEN-WORD DATA BLOCK, ARE
   7242					; RETURNED IN AN INDICATED FIFTEEN WORD BUFFER, WITH THE TASK NAME IN
   7243					; THE FIRST TWO WORDS.
   7244					;
   7245					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7246					;
   7247					;	WD. 00 -- DIC (19.) & DPB SIZE (4.),
   7248					;	WD. 01 -- [SENDER TASK NAME (FIRST HALF)],
   7249					;	WD. 02 -- [SENDER TASK NAME (SECOND HALF)],
   7250					;	WD. 03 -- ADDRESS OF FIFTEEN WORD BUFFER.
   7251					;
   7252					; THE FOLLOWING STATUS IS RETURNED:
   7253					;
   7254					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7255					; OF ONE (+1).
   7256					;
   7257					;
   7258					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7259					;
   7260					;	-02 -- SPECIFIED SENDER TASK NOT INSTALLED,
   7261					;
   7262					;	-80 -- DIRECTIVE ISSUED BY "BACKGROUND" TASK,
   7263					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7264					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7265					;-
   7266					; THIS DIRECTIVE SERVICE HAS A COMMON ENTRY WITH "RECEIVE DATA OR SUSPEND".
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 131
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7268					.SBTTL	DIRECTIVE -- RECEIVE DATA OR SUSPEND
   7269					;+
   7270					; THE "RECEIVE DATA OR SUSPEND" DIRECTIVE
   7271					;
   7272					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECEIVE A THIRTEEN WORD
   7273					; DATA BLOCK IF AT LEAST ONE IS CAN BE RECEIVED, OR TO SUSPEND IF NO
   7274					; THIRTEEN WORD DATA BLOCKS ARE CAN BE RECEIVED.
   7275					;
   7276					; DATA BLOCKS ARE QUEUED (FIFO) FOR THE TASK VIA THE "SEND DATA" OR
   7277					; THE "SEND DATA & REQUEST RECEIVER" DIRECTIVES.
   7278					;
   7279					; WHEN A SENDER TASK IS SPECIFIED, ONLY DATA SENT BY THE INDICATED
   7280					; TASK IS RECEIVED.
   7281					;
   7282					; A TWO-WORD SENDER TASK NAME, AND THE THIRTEEN-WORD DATA BLOCK, ARE
   7283					; RETURNED IN AN INDICATED FIFTEEN WORD BUFFER, WITH THE TASK NAME IN
   7284					; THE FIRST TWO WORDS.
   7285					;
   7286					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7287					;
   7288					;	WD. 00 -- DIC (21.) & DPB SIZE (4.),
   7289					;	WD. 01 -- [SENDER TASK NAME (FIRST HALF)],
   7290					;	WD. 02 -- [SENDER TASK NAME (SECOND HALF)],
   7291					;	WD. 03 -- ADDRESS OF FIFTEEN WORD BUFFER.
   7292					;
   7293					; THE FOLLOWING STATUS IS RETURNED:
   7294					;
   7295					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE
   7296					; STATUS OF:
   7297					;
   7298					;	+1 -- IF DATA WAS RECEIVED,
   7299					;	+2 -- IF TASK WAS SUSPENDED.
   7300					;
   7301					; CC-C SET TO INDICATE REJECTION AND A DIRECTIVE STATUS OF:
   7302					;
   7303					;	-02 -- SPECIFIED SENDER TASK NOT INSTALLED,
   7304					;
   7305					;	-80 -- DIRECTIVE ISSUED BY "BACKGROUND" TASK,
   7306					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7307					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7308					;-
   7309					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7310					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7311					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7312					;	R0 -- PC OF EMT INSTRUCTION
   7313					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   7314					;	R2 -- DPB SIZE
   7315					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7316					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   7317					;
   7318					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7319					;
   7320									;R5 IS POINTING TO 15-WORD BUFFER IN TASK.
   7321					;
   7322									;R4 IS SET TO STD NODE ADDRESS OF RECEIVER TASK.
   7323					;
   7324					; COMMON ENTRY POINT FOR "RECEIVE", "RECEIVE OR EXIT", & "RECEIVE OR SUSPEND".
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 131-1
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7325					;
   7326
   7327	024106				.D.REC::
   7328	024106				.D.ROE::
   7329	024106				.D.ROS::
   7330	024106	016504 	000016 			MOV 	A.TD(R5),R4	;SET R4 TO RECEIVE DEQUE LISTHEAD (IN STD ENTRY).
   7331	024112	062704 	000024 			ADD	#S.RF,R4
   7332					;
   7333	024116					MFPI	(R1)+		;IS A SENDER TASK SPECIFIED?
	024116	012146 				MOV	(R1)+,-(SP)
   7334	024120					MFPI	(R1)+		;MAYBE -- CHECK SECOND HALF OF TASK NAME
	024120	012146 				MOV	(R1)+,-(SP)
   7335	024122	052626 				BIS	(SP)+,(SP)+
   7336	024124	001004 				BNE	10$		;NO -- RECEIVE FROM ANY SENDER
   7337									;YES -- RECEIVE ONLY FROM INDICATED SENDER
   7338									;NO -- RECEIVE FROM ANY SENDER
   7339	024126					CALL	..PICK		;PICK FIRST NODE FROM REC DEQUE, AND LEAVE NODE
	024126	004737 	045476'			JSR	PC,..PICK
   7340									;ADDRESS IN R4.
   7341									;NODE PICKED?
   7342	024132	103017 				BCC	40$		;YES -- FILL BUFFER
   7343	024134	000440 				BR	70$		;NO -- NO DATA BY ANY SENDER
   7344					;
   7345	024136	024141 			10$:	CMP	-(R1),-(R1)
   7346					; R1 IS POINTING TO SPECIFIED SENDER'S TASK NAME IN PREVIOUS SPACE.
   7347					;
   7348	024140					CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	024140	004737 	045574'			JSR	PC,..FSTD
   7349									;ZERO IF TASK NAME NOT FOUND (AND SET
   7350									;CONDITION CODES PER "TST R2").
   7351									;
   7352									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   7353					;
   7354	024144	001001 				BNE	20$		;IF TASK NOT INSTALLED, RETURN STS=-02.
   7355	024146	104776 				TRAP	DE.02		;RETURN STS=-02.
   7356					;
   7357	024150	010401 			20$:	MOV	R4,R1		;SAVE LISTHEAD ADDRESS IN R1, AND
   7358									;SCAN DEQUE FOR DATA SENT BY SENDER PER R2.
   7359	024152				30$:
   7360	024152	011404 				MOV	@R4,R4		;ADVANCE R4 TO NEXT NODE
   7361	024154	020401 				CMP	R4,R1		;END OF DEQUE?
   7362	024156	001427 				BEQ	70$		;YES -- NO DATA BY SPECIFIED SENDER
   7363	024160	026402 	000004 			CMP	Q.SI(R4),R2	;NO -- IS DATA SENT BY SPECIFIED SENDER?
   7364	024164	001372 				BNE	30$		;NO -- CHECK NEXT NODE
   7365	024166					CALL	..NDEL		;YES -- DELETE NODE FROM DEQUE
	024166	004737 	045320'			JSR	PC,..NDEL
   7366					;
   7367					; DATA RECEIVED -- R4 CONTAINS NODE ADDRESS & R1 CONTAINS DATA BUFFER
   7368					; ADDRESS.  FILL BUFFER (2-WORD TASK NAME & 13-WORD DATA BLOCK).
   7369					;
   7370	024172				40$:
   7371	024172					MFPS	@R1,R0	;FIND THE BUFFER ADDRESS
	024172	011100 				MOV	@R1,R0
   7372	024174	010401 				MOV	R4,R1		;SAVE NODE ADR IN R1 FOR '..RNTP'
   7373	024176	062704 	000004 			ADD	#Q.SI,R4	;ADVANCE R4 TO POINT TO SENDER ID WORD
   7374					;
   7375	024202	012403 				MOV	(R4)+,R3	;SET R3 TO SENDER STD NODE ADDRESS
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 131-2
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7376					;
   7377	024204				50$:
   7378	024204					MTPS  S.TN+0(R3),(R0)+	;SET SENDER TASK NAME IN FIRST TWO WORDS
	024204	016320 	000000 			MOV	S.TN+0(R3),(R0)+
   7379	024210					MTPS  S.TN+2(R3),(R0)+
	024210	016320 	000002 			MOV	S.TN+2(R3),(R0)+
   7380					;
   7381	024214	012703 	000015 			MOV	#13.,R3		;FILL REMAINING 13 WORDS FROM NODE.
   7382	024220				60$:
   7383	024220					MTPS	(R4)+,(R0)+
	024220	012420 				MOV	(R4)+,(R0)+
   7384	024222	077302 				SOB	R3,60$
   7385					;
   7386	024224	012704 	001432'			MOV	#.POLLH,R4	;RETURN NODE TO POOL
   7387	024230					CALL	..NADD		;RETURN NODE (PER R1) TO POOL
	024230	004737 	045434'			JSR	PC,..NADD
   7388					;
   7389	024234	104401 				TRAP	DR.01		;RETURN STS=+1.
   7390					;
   7391					; DATA NOT RECEIVED:
   7392					;	IF "RECEIVE", RETURN STS=-08.
   7393					;	IF "RECEIVE OR EXIT", EXIT.
   7394					;	IF "RECEIVE OR SUSPEND", SUSPEND.
   7395					;
   7396					; R3 CONTAINS THE DIC SIZE.
   7397					; R0 CONTAINS THE ISSUING TASK'S ATL NODE ADDRESS
   7398					;
   7399	024236	006303 			70$:	ASL	R3
   7400	024240	000173 	024200'			JMP	@80$-2-<17.*2.>(R3)
   7401	024244	024252'			80$:	.WORD	90$
   7402	024246	023146'				.WORD	.D.EXT
   7403	024250	024252'				.WORD	90$
   7404					;
   7405	024252	104770 			90$:	TRAP	DE.08
   7406					;
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1113  03-APR-86 18:57  PAGE 132
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7408
   7409						.TITLE	DMSDV	- SPECIFY SST TABLE DIRECTIVES MODULE
   7410						.SBTTL	SPECIFY SST TABLE -- COPYRIGHT STATEMENT
   7411	024254					IDENT$	1,0
						.IDENT	/001000/
   7412					;
   7413					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   7414					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7415					;			ALL RIGHTS RESERVED.
   7416					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7417					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7418					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7419					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7420					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7421					;
   7422					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7423					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7424					;       CORPORATION.
   7425					;
   7426					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7427					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7428					;
   7429					;		MODULE: SPECIFY SST TABLE DIRECTIVES
   7430					;
   7431					;		VERSION: 01-00
   7432					;
   7433					;		AUTHOR: R. MCLEAN
   7434					;
   7435					;		DATE: 19 JUN 75
   7436					;
   7437					;
   7438					;	THIS MODULE CONTAINS:
   7439					;
   7440					;	1 -- CODE TO SERVICE THE "SPECIFY SST VECTOR TABLE FOR TASK" DIRECTIVE.
   7441					;
   7442					;	MACRO LIBRARY CALLS
   7443
   7444						.MCALL	MTPS,MFPS,MFPI,MTPI,CALL,RETURN
DMSDV	- SPECIFY SST TABLE DIR	MACRO M1113  03-APR-86 18:57  PAGE 133
DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK

   7446						.SBTTL	DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK
   7447					;+
   7448					; THE "SPECIFY SST VECTOR TABLE FOR TASK" DIRECTIVE
   7449					;
   7450					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECORD THE ADDRESS (VIRTUAL) OF
   7451					; A TABLE OF SYNCHRONOUS SYSTEM TRAP SERVICE ROUTINE ENTRY POINTS
   7452					; FOR USE BY THE ISSUING TASK.  WHENEVER AN SST SERVICE ROUTINE ENTRY IS
   7453					; SPECIFIED IN BOTH THE TASK'S TABLE & DDT'S TABLE, THE TRAP OCCURS
   7454					; FOR THE DEBUGGING AID, AND NOT FOR THE TASK.
   7455					;
   7456					;
   7457					;	WD. 00 -- "ODD ADDRESS" ERROR,
   7458					;	WD. 01 -- SEGMENT FAULT,
   7459					;	WD. 02 -- T-BIT TRAP OR EXECUTION OF A 'BPT' INSTRUCTION,
   7460					;	WD. 03 -- EXECUTION OF AN 'IOT' INSTRUCTION,
   7461					;	WD. 04 -- EXECUTION OF A "RESERVED" INSTRUCTION,
   7462					;	WD. 05 -- EXECUTION OF "NON-RSX EMT",
   7463					;	WD. 06 -- EXECUTION OF A 'TRAP' INSTRUCTION,
   7464					;	WD. 07 -- PDP-11/40 FLOATING POINT EXCEPTION.
   7465					;
   7466					; THE TABLE IS OF THE FOLLOWING FORMAT:
   7467					; A THREE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7468					;
   7469					;	WD. 00 -- DIC (43.) & DPB SIZE (3.),
   7470					;	WD. 01 -- ADDRESS OF SST VECTOR TABLE,
   7471					;	WD. 02 -- NUMBER OF TABLE ENTRIES (8). (MUST BE AT LEAST 8!)
   7472					;
   7473					; THE FOLLOWING STATUS IS RETURNED:
   7474					;
   7475					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7476					; OF ONE (+1).
   7477					;
   7478					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7479					;
   7480					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7481					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7482					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7483					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7484					;	R1 -- ADDRESS OF WORD FOLLOWING DIC & SIZE
   7485					;	R2 -- DPB SIZE
   7486					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7487					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   7488					;
   7489					;
   7490					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7491									;R1 IS POINTING TO THE ADDRESS OF THE TABLE
   7492									;R5 CONTAINS THE TABLE SIZE
   7493					;
   7494	024254	016502 	000016 		.D.STV::MOV	A.TD(R5),R2	;FIND THE STD ADDRESS OF THIS TASK
   7495	024260					MFPS	@R1,S.SS(R2)	;SET UP SST VECTOR ADDRESS
	024260	011162 	000030 			MOV	@R1,S.SS(R2)
   7496	024264	104401 				TRAP	DR.01		;VALID DIRECTIVE RETURN
DMSDV	- SPECIFY SST TABLE DIR	MACRO M1113  03-APR-86 18:57  PAGE 134
DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK

   7498
   7499
   7500						.TITLE	DMAST	- SPECIFY AST SERVICE DIRECTIVES
   7501						.SBTTL	SPECIFY AST SERVICE -- COPYRIGHT STATEMENT
   7502	024266					IDENT$	1,0
						.IDENT	/001000/
   7503					;
   7504					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   7505					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7506					;			ALL RIGHTS RESERVED.
   7507					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7508					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7509					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7510					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7511					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7512					;
   7513					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7514					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7515					;       CORPORATION.
   7516					;
   7517					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7518					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7519					;
   7520					;		MODULE: SPECIFY AST SERVICE DIRECTIVES
   7521					;
   7522					;		VERSION: 01-00
   7523					;
   7524					;		AUTHOR: R. MCLEAN
   7525					;
   7526					;		DATE: 19 JUN 75
   7527					;
   7528					;
   7529					;	THIS MODULE CONTAINS:
   7530					;
   7531					;	1 -- CODE TO SERVICE THE "SPECIFY POWER RECOVERY AST" DIRECTIVE,
   7532					;
   7533					;	MACRO LIBRARY CALLS
   7534					;
   7535						.MCALL	CALL,RETURN,MTPS,MTPI,MFPI,MFPS
DMAST	- SPECIFY AST SERVICE D	MACRO M1113  03-APR-86 18:57  PAGE 135
DIRECTIVE -- SPECIFY POWER FAIL AST

   7537						.SBTTL	DIRECTIVE -- SPECIFY POWER FAIL AST
   7538					;+
   7539					; THE "SPECIFY POWER FAIL AST" DIRECTIVE
   7540					;
   7541					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECORD EITHER (1) THAT POWER
   7542					; RECOVERY AST'S FOR THE ISSUING TASK ARE DESIRED, AND WHERE CONTROL
   7543					; IS TO BE TRANSFERRED WHEN A POWER FAIL AST OCCURS, OR (2) THAT
   7544					; POWER FAIL AST'S FOR THE ISSUING TASK ARE NO LONGER DESIRED.
   7545					;
   7546					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7547					;
   7548					;	WD. 00 -- DIC (45..) & DPB SIZE (2.),
   7549					;	WD. 01 -- [AST SERVICE ENTRY POINT].
   7550					;
   7551					; WHEN AN "AST SERVICE ENTRY POINT" IS SPECIFIED, FUTURE POWER FAIL
   7552					; AST'S WILL OCCUR FOR THE ISSUING TASK, AND CONTROL WILL BE TRANSFERRED
   7553					; TO THE INDICATED LOCATION WHENEVER A POWER FAIL AST OCCURS.
   7554					;
   7555					; WHEN AN "AST SERVICE ENTRY POINT" IS NOT SPECIFIED (ZERO SECOND DPB
   7556					; WORD), FUTURE POWER FAIL AST'S WILL NOT OCCUR (UNTIL AN AST ENTRY
   7557					; POINT IS SPECIFIED AGAIN).
   7558					;
   7559					; THE FOLLOWING STATUS IS RETURNED:
   7560					;
   7561					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7562					;
   7563					; OF ONE (+1).
   7564					;
   7565					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7566					;
   7567					;	-08 -- AST ENTRY ALREADY UN-SPECIFIED,
   7568					;
   7569					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   7570					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7571					;
   7572					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7573					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7574					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7575					;	R1 -- ADDRESS OF WORD FOLLOWING DIC & SIZE
   7576					;	R2 -- DPB SIZE
   7577					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7578					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   7579					;
   7580					;
   7581					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7582					;
   7583	024266				.D.PUT::MFPS	@R1,R1		;FIND THE LAST WORD OF THE DPB
	024266	011101 				MOV	@R1,R1
   7584	024270	001403 				BEQ	20$		;YES -- THEN CHECK IT OUT
   7585	024272	010165 	000034 		10$:	MOV	R1,A.PF(R5)	;SPECIFY POWER FAIL AST
   7586	024276	104401 				TRAP	DR.01		;AND RETURN +1
   7587					;
   7588	024300	005765 	000034 		20$:	TST	A.PF(R5)	;CHECK FOR ALREADY CLEAR
   7589	024304	001372 				BNE	10$		;NO -- ALL OK
   7590	024306	104770 				TRAP	DE.08		;YES -- ERROR
DMAST	- SPECIFY AST SERVICE D	MACRO M1113  03-APR-86 18:57  PAGE 136
DIRECTIVE -- SPECIFY POWER FAIL AST

   7592
   7593
   7594						.TITLE	DMREQ	- "REQUEST AND EXECUTE" DIRECTIVES MODULE
   7595						.SBTTL	REQUEST AND EXECUTE -- COPYRIGHT STATEMENT
   7596	024310					IDENT$	1,0
						.IDENT	/001000/
   7597					;
   7598					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   7599					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7600					;			ALL RIGHTS RESERVED.
   7601					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7602					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7603					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7604					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7605					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7606					;
   7607					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7608					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7609					;       CORPORATION.
   7610					;
   7611					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7612					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7613					;
   7614					;		MODULE: "REQUEST" DIRECTIVE
   7615					;
   7616					;		VERSION: 01-00
   7617					;
   7618					;		AUTHOR: R. MCLEAN
   7619					;
   7620					;		DATE: 1 JUL 75
   7621					;
   7622					;
   7623					;	THIS MODULE CONTAINS:
   7624					;
   7625					;	1 -- CODE TO SERVICE THE "REQUEST" DIRECTIVE.
   7626					;
   7627					;	MACROS
   7628					;
   7629						.MCALL	CALL,RETURN,MFPS
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1113  03-APR-86 18:57  PAGE 137
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7631						.SBTTL	DIRECTIVE -- TASK SCHEDULING -- REQUEST
   7632					;+
   7633					; THE "REQUEST" DIRECTIVE
   7634					;
   7635					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO MAKE A TASK ACTIVE.  I.E., TO
   7636					; RUN CONTINGENT UPON PRIORITY AND MEMORY AVAILABILITY.
   7637					;
   7638					; A SEVEN WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7639					;
   7640					;	WD. 00 -- DIC (11.) & DPB SIZE (7.),
   7641					;	WD. 01 -- TASK NAME (FIRST HALF),
   7642					;	WD. 02 -- TASK NAME (SECOND HALF),
   7643					;	WD. 03 -- [PARTITION NAME (FIRST HALF)],
   7644					;	WD. 04 -- [PARTITION NAME (SECOND HALF)],
   7645					;	WD. 05 -- [PRIORITY],
   7646					;	WD. 06 -- [UIC].
   7647					;
   7648					; THE FOLLOWING STATUS IS RETURNED:
   7649					;
   7650					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7651					; OF ONE (+1).
   7652					;
   7653					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7654					;
   7655					;	-01 -- INSUFFICIENT POOL NODES AVAILABLE,
   7656					;	-03 -- PARTITION TOO SMALL FOR TASK,
   7657					;	-06 -- HANDLER TASK NOT RESIDENT TO LOAD TASK,
   7658					;	-07 -- TASK IS ACTIVE,
   7659					;
   7660					;	-94 -- PARTITION NOT IN SYSTEM (NO TPD ENTRY FOUND),
   7661					;	-95 -- INVALID PRIORITY SPECIFIED (<0 OR >250.),
   7662					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7663					;
   7664					;-
   7665	024310				.D.REQ::CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	024310	004737 	045574'			JSR	PC,..FSTD
   7666									;ZERO IF TASK NAME NOT FOUND (AND SET
   7667									;CONDITION CODES PER "TST R2").
   7668									;
   7669									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   7670					;
   7671					;
   7672	024314	001406 				BEQ	20$		;IF TASK IS NOT INSTALLED TRY TO GET IT INSTALLED
   7673	024316					CALL	.FEPPU		;SET R3 TO TPD ADDRESS IF A PARTITION IS
	024316	004737 	016000'			JSR	PC,.FEPPU
   7674									;SPECIFIED, OR TO ZERO IF NOT SPECIFIED.
   7675									;
   7676									;SET R4 TO PRIORITY IF SPECIFIED, OR TO
   7677									;ZERO IF NOT SPECIFIED.
   7678									;
   7679									;
   7680									;ADVANCE R1 BY EIGHT (PAST PARTITION NAME,
   7681									;PRIORITY INDICATOR, AND UIC INDICATOR.).
   7682									;
   7683									;IF INVALID PRIORITY, RETURN STS=-95.
   7684									;IF PARTITION NOT IS SYSTEM, RETURN
   7685									;STS=-94.  IF NON-PRIVILEGED TASK HAS
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1113  03-APR-86 18:57  PAGE 137-1
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7686									;SPECIFIED OTHER THAN OWN UIC, RETURN
   7687									;STS=-91.  IF SPECIFIED PARTITION IS
   7688									;TOO SMALL FOR TASK, RETURN STS=-03.
   7689					;
   7690					;
   7691					;
   7692					;
   7693	024322				10$:	CALL	.REQS		;MAKE A TASK ACTIVE PER R1, R2, R3, R4 & R5.
	024322	004737 	015276'			JSR	PC,.REQS
   7694									;(R1, R2, R3, R4, & R5 ARE ALTERED)
   7695					;
   7696	024326	000162 	015770'			JMP	.RQESD(R2)	;RETURN DIRECTIVE STATUS PER SUBROUTINE
   7697									;STATUS IN R2.
   7698					;
   7699	024332	012704 	024522'		20$:	MOV	#RQSPB,R4	;SET UP TO INSERT PARAMETERS INTO SEND
   7700	024336	024141 				CMP	-(R1),-(R1)	;BACKUP TO POINT TO TASK NAME
   7701	024340					MFPS	(R1)+,(R4)+	;TASK NAME
	024340	012124 				MOV	(R1)+,(R4)+
   7702	024342					MFPS	(R1)+,(R4)+
	024342	012124 				MOV	(R1)+,(R4)+
   7703	024344					MFPS	(R1)+,(R4)+	;PARTITION NAME
	024344	012124 				MOV	(R1)+,(R4)+
   7704	024346					MFPS	(R1)+,(R4)+
	024346	012124 				MOV	(R1)+,(R4)+
   7705	024350					MFPS	(R1)+,(R4)+	;PRIORITY
	024350	012124 				MOV	(R1)+,(R4)+
   7706	024352	012704 	001432'			MOV	#.POLLH,R4	;PICK A NODE FROM THE POOL
   7707	024356					CALL	..PICK
	024356	004737 	045476'			JSR	PC,..PICK
   7708	024362	103001 				BCC	30$		;GOT ONE
   7709	024364	104777 				TRAP	DE.01		;NONE RETURN -1
   7710					;
   7711	024366	010401 			30$:	MOV	R4,R1		;SAVE THE NODE ADDRESS
   7712	024370	012704 	001432'			MOV	#.POLLH,R4	;FIND THE LISTHEAD OF THE POOL
   7713	024374	021404 				CMP	@R4,R4		;ANY NODES?
   7714	024376	001003 				BNE	35$		;YES -- PROCEED
   7715	024400					CALL	..NADD		;NO RETURN NODE
	024400	004737 	045434'			JSR	PC,..NADD
   7716	024404	104777 				TRAP	DE.01		;NOT ENOUGH NODES
   7717					;
   7718	024406	010137 	024534'		35$:	MOV	R1,RQSTD	;SET UP THE STD ADDRESS
   7719	024412	005743 				TST	-(R3)		;BACK UP TO POINT TO CORRECT ENTRY TO INSERT
   7720	024414	012704 	024522'			MOV	#RQSPB,R4	;SET UP PARAMETERS IN STD
   7721	024420	012421 				MOV	(R4)+,(R1)+
   7722	024422	012421 				MOV	(R4)+,(R1)+
   7723	024424	005021 				CLR	(R1)+
   7724	024426	012721 	040005 			MOV	#SF.EX!SF.TA!SF.IR,(R1)+ ;DECLARE TASK ACTIVE
   7725	024432	062701 	000014 			ADD	#S.RF-S.DP,R1	;POINT TO SEND LISTHEAD
   7726	024436	010111 				MOV	R1,@R1		;SET UP LISTHEAD
   7727	024440	010161 	000002 			MOV	R1,2(R1)
   7728	024444	013704 	024534'			MOV	RQSTD,R4	;RESTORE STD ADDRESS
   7729	024450	011301 			40$:	MOV	@R3,R1		;MAKE ENTRY IN STD
   7730	024452	001403 				BEQ	50$		;END OF LIST
   7731	024454	010423 				MOV	R4,(R3)+	;MOVE LIST DOWN
   7732	024456	010104 				MOV	R1,R4		;SET NEXT ENTRY
   7733	024460	000773 				BR	40$		;GO NEXT ENTRY
   7734					;
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1113  03-APR-86 18:57  PAGE 137-2
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7735	024462	010413 			50$:	MOV	R4,@R3		;STORE LAST ENTRY
   7736	024464	062737 	000002 	006370'		ADD	#2,.STDTZ	;UPDATE SIZE
   7740	024472	012702 	006676'			MOV	#STDINS,R2	;SET UP STD NODE OF RECEIVER
   7741	024476	012701 	024516'			MOV	#RQSPT,R1	;SET UP TO SEND TO INSTALL
   7742	024502					CALL	.SEND		;SEND DATA
	024502	004737 	024006'			JSR	PC,.SEND
   7743	024506	005004 				CLR	R4		;START AT DEFAULT PART & PRI
   7744	024510	005003 				CLR	R3
   7745	024512	010102 				MOV	R1,R2		;SET UP STD OF INSTALL
   7746	024514	000702 				BR	10$
   7747					;
   7748	024516	024522'			RQSPT::	.WORD	RQSPB		;POINTER TO SEND BLOCK
   7749	024520	000000 				.WORD	0		;EVENT FLAG (NONE)
   7750	024522				RQSPB:	.BLKW	5		;DATA TO BE XMITTED
   7751	024534	000000 			RQSTD:	.WORD	0		;STD ADDRESS
   7752					;
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1113  03-APR-86 18:57  PAGE 138
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7754
   7755
   7756						.TITLE	DMGPP	- "GET TASK PARAMETERS" DIRECTIVE MODULE
   7757						.SBTTL	GET TASK PARAMETERS -- COPYRIGHT STATEMENT
   7758	024536					IDENT$	1,0
						.IDENT	/001000/
   7759					;
   7760					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   7761					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7762					;			ALL RIGHTS RESERVED.
   7763					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7764					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7765					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7766					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7767					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7768					;
   7769					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7770					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7771					;       CORPORATION.
   7772					;
   7773					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7774					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7775					;
   7776					;		MODULE: "GET TASK PARAMETERS" DIRECTIVE
   7777					;
   7778					;		VERSION: 01-00
   7779					;
   7780					;		AUTHOR: R. MCLEAN
   7781					;
   7782					;		DATE: 19 AUG 75
   7783					;
   7784					;
   7785					;	THIS MODULE CONTAINS:
   7786					;
   7787					;	1 -- CODE TO SERVICE THE "GET TASK PARAMETERS" DIRECTIVE.
   7788					;
   7789					; MACRO CALLS
   7790
   7791						.MCALL	MTPS,MFPS
DMGPP	- "GET TASK PARAMETERS"	MACRO M1113  03-APR-86 18:57  PAGE 139
DIRECTIVE -- GET TASK PARAMETERS

   7793						.SBTTL	DIRECTIVE -- GET TASK PARAMETERS
   7794					;+
   7795					; THE "GET TASK PARAMETERS" DIRECTIVE
   7796					;
   7797					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL AN INDICATED SIXTEEN WORD
   7798					; BUFFER WITH PARAMETERS RELATING TO THE ISSUING TASK.
   7799					;
   7800					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7801					;
   7802					;	WD. 00 -- DIC (63.) & DPB SIZE (2.),
   7803					;	WD. 01 -- ADDRESS OF SIXTEEN WORD BUFFER.
   7804					;
   7805					; THE SIXTEEN WORD BUFFER IS FILLED AS FOLLOWS:
   7806					;
   7807					;	WD. 00 -- ISSUING TASK'S NAME (FIRST HALF),
   7808					;	WD. 01 -- ISSUING TASK'S NAME (SECOND HALF),
   7809					;	WD. 02 -- PARTITION NAME (FIRST HALF),
   7810					;	WD. 03 -- PARTITION NAME (SECOND HALF),
   7811					;	WD. 04 -- TASK NAME OF REQUESTOR OF ISSUING TASK (FIRST HALF),
   7812					;	WD. 05 -- TASK NAME OF REQUESTOR OF ISSUING TASK (SECOND HALF),
   7813					;	WD. 06 -- RUN PRIORITY,
   7814					;	WD. 07 -- USER IDENTIFICATION CODE (UIC FOR FILES SYSTEM),
   7815					;	WD. 10 -- NUMBER OF LOGICAL I/O UNITS (LUN'S),
   7816					;	WD. 11 -- MACHINE TYPE INDICATOR (VIZ., 45. FOR PDP-11/45),
   7817					;	WD. 12 -- STD FLAGS WORD,
   7818					;	WD. 13 -- [ADDRESS OF TASK SST VECTOR TABLE],
   7819					;	WD. 14 -- [SIZE OF TASK SST VECTOR TABLE (IN WORDS)],
   7820					;	WD. 15 -- TASK SIZE
   7821					;	WD. 16 -- ZERO (RESERVED),
   7822					;	WD. 17 -- ZERO (RESERVED).
   7823					;
   7824					; THE FOLLOWING STATUS IS RETURNED:
   7825					;
   7826					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7827					; OF ONE (+1).
   7828					;
   7829					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7830					;
   7831					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7832					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7833					;-
   7834		000050 			.PDP11=40.		;PDP11/40
   7835					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7836					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   7837					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   7838					;	R0 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK'),
   7839					;	R1 -- VIRTUAL ADDRESS OF DPB PLUS TWO,
   7840					;	R2 -- SIZE OF DPB (IN WORDS),
   7841					;	R3 -- TWICE THE DIRECTIVE IDENTIFICATION CODE (2*DIC),
   7842					;	R4 -- STD ENTRY ADDRESS OF ISSUING TASK, AND
   7843					;	R5 -- LAST WORD OF DPB.
   7844					;
   7845					; R0 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7846					;
   7847					;
   7848	024536	005046 			.D.GPP::CLR	-(SP)		;PUSH ZERO
   7849	024540	005046 				CLR	-(SP)		;PUSH ZERO
DMGPP	- "GET TASK PARAMETERS"	MACRO M1113  03-APR-86 18:57  PAGE 139-1
DIRECTIVE -- GET TASK PARAMETERS

   7850	024542	016504 	000016 			MOV	A.TD(R5),R4	;FIND STD ADDRESS
   7851	024546	016502 	000006 			MOV	A.PD(R5),R2	;FIND THE TPD ADDRESS
   7852	024552	016500 	000012 			MOV	A.HA(R5),R0	;FIND THE HEADER ADDRESS
   7853	024556	016246 	000006 			MOV	T.PZ(R2),-(SP)	;SET PARTITION SIZE (TASK SIZE)
   7854	024562	012746 	000010 			MOV	#8.,-(SP)	;PUSH VECTOR TBL SIZE
   7855	024566	016046 	000106 			MOV  H.TKVA(R0),-(SP)	;PUSH VECTOR TBL ADDRESS
   7856	024572	016446 	000006 			MOV	S.FW(R4),-(SP)	;PUSH STD FLAGS WORD
   7857	024576	012746 	000050 			MOV	#.PDP11,-(SP)	;PUSH MACHINE TYPE INDICATOR
   7858	024602	016046 	000130 			MOV  H.LUT(R0),-(SP)	;PUSH NUMBER OF LUN'S
   7859	024606	013746 	001156'			MOV	.SYUIC,-(SP)	;PUSH UIC
   7860	024612	005046 				CLR	-(SP)		;PUSH RUN PRIORITY
   7861	024614	116516 	000010 			MOVB	A.RP(R5),@SP
   7862	024620	005046 				CLR	-(SP)
   7863	024622	005046 				CLR	-(SP)
   7864	024624	016246 	000002 			MOV	T.PN+2(R2),-(SP)
   7865	024630	016246 	000000 			MOV	T.PN+0(R2),-(SP)
   7866	024634	016446 	000002 			MOV	S.TN+2(R4),-(SP);PUSH TASK NAME
   7867	024640	016446 	000000 			MOV	S.TN+0(R4),-(SP)
   7868					;
   7869	024644	012702 	000020 			MOV	#16.,R2		;POP SIXTEEN WORDS FROM STACK INTO BUFFER
   7870	024650					MFPS	@R1,R1		;PICK UP HIS ADDRESS
	024650	011101 				MOV	@R1,R1
   7871									;IN ISSUING TASK'S ADDRESS SPACE.
   7872									;R5 CONTAINS VIRTUAL ADDRESS OF BUFFER.
   7873	024652				10$:
   7874	024652					MTPS	(SP)+,(R1)+
	024652	012621 				MOV	(SP)+,(R1)+
   7875	024654	077202 				SOB	R2,10$
   7876					;
   7877	024656	104401 				TRAP	DR.01		;RETURN STS=+1.
   7878					;
DMGPP	- "GET TASK PARAMETERS"	MACRO M1113  03-APR-86 18:57  PAGE 140
DIRECTIVE -- GET TASK PARAMETERS

   7880
   7881						.TITLE	DMGMP	- "GET PARTITION PARAMETERS" DIRECTIVE MODULE
   7882						.SBTTL	GET PARTITION PARAMETERS -- COPYRIGHT STATEMENT
   7883	024660					IDENT$	1,0
						.IDENT	/001000/
   7884					;
   7885					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   7886					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7887					;			ALL RIGHTSS RESERVED.
   7888					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7889					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7890					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7891					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7892					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7893					;
   7894					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7895					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7896					;       CORPORATION.
   7897					;
   7898					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7899					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7900					;
   7901					;		MODULE: "GET PARTITION PARAMETERS" DIRECTIVE
   7902					;
   7903					;		VERSION: 01-00
   7904					;
   7905					;		AUTHOR: R. MCLEAN
   7906					;
   7907					;		DATE: 19 AUG 75
   7908					;
   7909					;
   7910					;	THIS MODULE CONTAINS:
   7911					;
   7912					;	1 -- CODE TO SERVICE THE "GET PARTITION PARAMETERS" DIRECTIVE.
   7913					;
   7914					; MACRO CALLS
   7915					;
   7916
   7917						.MCALL	MFPI,MTPI,MFPS,MTPS
DMGMP	- "GET PARTITION PARAME	MACRO M1113  03-APR-86 18:57  PAGE 141
DIRECTIVE -- GET PARTITION PARAMETERS

   7919						.SBTTL	DIRECTIVE -- GET PARTITION PARAMETERS
   7920					;+
   7921					; THE "GET PARTITION PARAMETERS" DIRECTIVE
   7922					;
   7923					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL AN INDICATED THREE WORD
   7924					; BUFFER WITH PARTITION PARAMETERS.
   7925					;
   7926					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7927					;
   7928					;	WD. 00 -- DIC (65.) & DPB SIZE (4.),
   7929					;	WD. 01 -- [PARTITION NAME (FIRST HALF)],
   7930					;	WD. 02 -- [PARTITION NAME (SECOND HALF)],
   7931					;	WD. 03 -- ADDRESS OF THREE WORD BUFFER.
   7932					;
   7933					; IF A PARTITION IS NOT SPECIFIED, THE PARTITION OF THE ISSUING TASK
   7934					; IS ASSUMED.
   7935					;
   7936					; THE THREE WORD BUFFER IS FILLED AS FOLLOWS:
   7937					;
   7938					;	WD. 00 -- 1/64TH BASE ADDRESS OF PARTITION,
   7939					;	WD. 01 -- 1/64TH SIZE OF PARTITION,
   7940					;	WD. 02 -- PARTITION FLAGS WORD.
   7941					;
   7942					; THE FOLLOWING STATUS IS RETURNED:
   7943					;
   7944					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7945					; OF ONE (+0).
   7946					;
   7947					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7948					;
   7949					;	-02 -- INDICATED PARTITION NOT IS SYSTEM,
   7950					;
   7951					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7952					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7953					;-
   7954					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7955					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   7956					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   7957					;	R0 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK'),
   7958					;	R1 -- VIRTUAL ADDRESS OF DPB PLUS TWO,
   7959					;	R2 -- SIZE OF DPB (IN WORDS),
   7960					;	R3 -- TWICE THE DIRECTIVE IDENTIFICATION CODE (2*DIC),
   7961					;	R4 -- STD ENTRY ADDRESS OF ISSUING TASK, AND
   7962					;	R5 -- LAST WORD OF DPB.
   7963					;
   7964					; R0 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7965					;
   7966					; R5 CONTAINS ADDRESS OF THREE WORD BUFFER.
   7967					;
   7968	024660				.D.GMP::MFPI	(R1)+		;PUSH 2-WORD PARTITION NAME (OR TWO ZEROS)
	024660	012146 				MOV	(R1)+,-(SP)
   7969	024662					MFPI	(R1)+		;ONTO KERNEL STACK (IN REVERSE ORDER)
	024662	012146 				MOV	(R1)+,-(SP)
   7970									;WAS A NAME SPECIFIED?
   7971	024664	001011 				BNE	10$		;YES -- SCAN "TPD" FOR MATCH
   7972	024666	005766 	000002 			TST	+2(SP)		;MAYBE -- CHECK FIRST HALF OF NAME
   7973	024672	001006 				BNE	10$		;YES -- SCAN "TPD" FOR MATCH
DMGMP	- "GET PARTITION PARAME	MACRO M1113  03-APR-86 18:57  PAGE 141-1
DIRECTIVE -- GET PARTITION PARAMETERS

   7974	024674	016504 	000006 			MOV	A.PD(R5),R4	;NO -- REPLACE TWO-ZEROS WITH NAME OF PARTITION
   7975	024700	016446 	000000 			MOV  T.PN+0(R4),-(SP)	;IN WHICH ISSUING TASK IS EXECUTING.
   7976	024704	016446 	000002 			MOV  T.PN+2(R4),-(SP)
   7977	024710				10$:
   7978	024710	012703 	010062'			MOV	#.TPDEA,R3	;SETUP R3 TO SCAN "TPD"
   7979	024714				20$:
   7980	024714	020327 	007602'			CMP	R3,#.TPDBA	;END OF SCAN?
   7981	024720	001001 				BNE	30$
   7982	024722	104776 				TRAP	DE.02		;YES -- RETURN STS=-02.
   7983					;
   7984	024724	162703 	000020 		30$:	SUB	#T.SZ,R3	;NO -- REDUCE R3 TO POINT TO TPD ENTRY
   7985	024730	010304 				MOV	R3,R4		;SETUP R4 TO INDEX THRU TPD ENTRY
   7986	024732	022466 	000002 			CMP	(R4)+,+2(SP)	;DOES NAME MATCH?
   7987	024736	001366 				BNE	20$		;NO -- CONTINUE SCAN
   7988	024740	022416 				CMP	(R4)+,@SP	;MAYBE -- CHECK SECOND HALF
   7989	024742	001364 				BNE	20$		;NO -- CONTINUE SCAN
   7990					;
   7991	024744	012703 	000002 			MOV	#2.,R3		;YES -- MOVE 2-WORDS TO BUF IN PREVIOUS SPACE
   7992	024750					MFPS	@R1,R1		;FIND BUFFER
	024750	011101 				MOV	@R1,R1
   7993	024752	011400 				MOV	@R4,R0		;FIND PARTITION START
   7994	024754				40$:
   7995	024754	012446 				MOV	(R4)+,-(SP)
   7997	024756	006216 				ASR	@SP
   7998	024760	006216 				ASR	@SP
   7999	024762	006216 				ASR	@SP
   8000	024764	006216 				ASR	@SP
   8001	024766	006216 				ASR	@SP
   8002	024770	006216 				ASR	@SP
   8003	024772	042716 	176000 			BIC	#176000,@SP	;MASK OFF CARRY FROM SHIFT
   8005	024776					MTPI	(R1)+
	024776	012621 				MOV	(SP)+,(R1)+
   8006	025000	077313 				SOB	R3,40$
   8007	025002	005724 				TST	(R4)+		;RETURN FLAGS WORD
   8008	025004					MTPS	(R4)+,(R1)+	;SET IN USER'S AREA
	025004	012421 				MOV	(R4)+,(R1)+
   8009					;
   8013	025006	000137 	013710'			JMP	.DR.NS		;RETURN R0 STATUS
   8015					;
DMGMP	- "GET PARTITION PARAME	MACRO M1113  03-APR-86 18:57  PAGE 142
DIRECTIVE -- GET PARTITION PARAMETERS

   8017
   8018						.TITLE	RUN	- CLOCK HANDLER
   8019						.SBTTL	CLOCK HANDLER -- COPYRIGHT STATEMENT
   8020					;
   8021					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   8022					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   8023					;			ALL RIGHTS RESERVED.
   8024					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   8025					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   8026					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   8027					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   8028					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   8029					;
   8030					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   8031					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   8032					;       CORPORATION.
   8033					;
   8034					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   8035					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   8036					;
   8037					;		MODULE: "CLOCK TICK RECOGNITION"
   8038					;
   8039					;		VERSION: 07-00
   8040					;
   8041					;		AUTHOR: R. MCLEAN
   8042					;
   8043					;		DATE: 19 JUL 75
   8044					;
   8045					;
   8046					;	THIS MODULE CONTAINS:
   8047					;
   8048					;	1 -- CODE TO SERVICE CLOCK TICK RECOGNITION
   8049					;
   8050					;
   8051					; MODIFICATIONS:
   8052					;
   8053					;	NO.	DATE		PROGRAMMER	PURPOSE
   8054					;	---	----		----------	-------
   8055					;	001	04-MAR-77	R. BELANGER	CHANGE MIDNIGHT RECOGNITION
   8056					;
   8057					;	MACROS
   8058					;
   8059						.MCALL	CALL,RETURN,DIR$,.CRASH,.STKM
RUN	- CLOCK HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 143
CLOCK TICK RECOGNITION

   8061						.SBTTL	CLOCK TICK RECOGNITION
   8062					;
   8063					; UPDATE TICKS
   8064					;
   8065	025012	012704 	001134'		.TICK::	MOV	#.TICKS,R4	;POINT TO BASE OF TIME PARAMETERS
   8066	025016	005214 				INC	@R4		;UPDATE TICKS
   8067	025020	023714 	001154'			CMP	.TKPS,@R4	;1 SEC YET?
   8068	025024	101020 				BHI	3$		;NO DONE
   8069					;
   8070					; TICKS OVERFLOWED, UPDATE SECONDS
   8071					;
   8072	025026	005024 				CLR	(R4)+		;CLEAR FRACTIONS
   8073	025030	000337 	001152'			SWAB	.SSM+2		;FIND IF TIME TO UPDATE SSM
   8074	025034	001414 				BEQ	3$		;NO -- CONTINUE
   8075	025036	005237 	001150'			INC	.SSM		;UPDATE SECONDS SINCE MIDNIGHT
   8076	025042	022737 	124277 	001150'		CMP	#30.*60.*24.-1,.SSM ;MIDNIGHT?
   8077	025050	101006 				BHI	3$		;NO, CAN INCREMENT
   8078	025052	006337 	001136'			ASL	.CLKSW		;GIVE THE 10 TIME TO CHANGE IT'S DATE -- WE DON'T
   8079									; +++001 RREMOVED 10. INSTRUCTIONS
   8080	025056	001003 				BNE	3$		; +++001 NO -- GO ON
   8081	025060	012737 	177777 	001136'		MOV	#-1,.CLKSW	; +++001 YES -- FLAG NULL TASK TO REQUEST
   8082									; +++001 TIME-OF-DAY TASK
   8083					;
   8084					;INCREMENT IN NO OVERFLOW CASES - SECONDS OR MINUTES
   8085					;
   8086	025066				3$:
   8087					;
   8088					; SET UP FOR LINE FREQ. SERVICE
   8089					;
   8090					;
   8091	025066	012704 	002376'		4$:	MOV	#.CLKBA,R4	;DELETE THE ENTRY OR RESCHEDULE IT
   8092	025072	012405 			10$:	MOV	(R4)+,R5	;NO -- AN ENTRY HERE?
   8093	025074	001435 				BEQ	40$		;NO -- GO
   8094	025076	005724 				TST	(R4)+		;OVER AST ADDRESS
   8095	025100	005324 				DEC	(R4)+		;YES --DECREMENT THE COUNT
   8096	025102	001403 				BEQ	30$		;END OF COUNT SET EVENT FLAG
   8097	025104	062704 	000006 		20$:	ADD	#6,R4		;NO -- LOOK AT NEXT ENTRY
   8098	025110	000770 				BR	10$
   8099					;
   8100	025112				30$:	CALL	..DSEV		 ;DECLARE A SIG EVENT
	025112	004737 	045264'			JSR	PC,..DSEV
   8101	025116	012464 	177774 			MOV	(R4)+,-4(R4)	;RESET RESCHEDULE INTERVAL
   8102	025122	052434 				BIS	(R4)+,@(R4)+	;DO THE SETTING OF THE EVENT FLAG
   8103	025124	010446 				MOV	R4,-(SP)	;SAVE R4
   8104	025126	016404 	177766 			MOV	-12(R4),R4	;FIND AST ADDRESS
   8105	025132	001405 				BEQ	35$		;NONE -- FORGET IT
   8106	025134					CALL	.STAST		;START AST
	025134	004737 	016160'			JSR	PC,.STAST
   8107	025140	103002 				BCC	35$		;GOT IT -- CONTINUE
   8108	025142	010437 	001050'			MOV	R4,.CKASS	;NOT QUITE -- TASK IS CURRENT GET AT ..INTX
   8109	025146	012604 			35$:	MOV	(SP)+,R4
   8110	025150	005764 	177772 			TST	-6(R4)		;RESCHEDULE?
   8111	025154	001346 				BNE	10$		;NO -- DO NEXT ENTRY
   8112	025156	162704 	000014 			SUB	#C.SZ,R4	;BACK UP POINTER
   8113	025162					CALL	.CKDEL		;DELETE ENTRY
	025162	004737 	044406'			JSR	PC,.CKDEL
   8114	025166	000741 				BR	10$		;AND TRY AGAIN
RUN	- CLOCK HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 143-1
CLOCK TICK RECOGNITION

   8115					;
   8116	025170	105337 	001015'		40$:	DECB	.SERFG+1	;COUNT DOWN CLOCK COUNTER
   8117	025174	001306 				BNE	.TICK		;AND GO DO ANOTHER IF WE MISSED ONE
   8118	025176	012604 				MOV	(SP)+,R4	;RESTORE REGISTERS
   8119	025200	012605 				MOV	(SP)+,R5
   8120	025202	053737 	001016'	001014'		BIS	.SEWFL,.SERFG	;SET SIG EVENT FLAG IF NECESSARYH
   8121	025210	005037 	001016'			CLR	.SEWFL		;AND CLEAR FLAG
   8122	025214	000137 	015062'			JMP	..INTX		;AND RETURN TO INTERRUPT EXIT
RUN	- CLOCK HANDLER	MACRO M1113  03-APR-86 18:57  PAGE 144
CLOCK TICK RECOGNITION

   8124
   8125
   8126						.TITLE	QPRDRV	-- QUEUED PROTOCOL DRIVER FOR RSX-20F
   8127						.SBTTL	QUEUED PROTOCOL DRIVER -- COPYRIGHT STATEMENT
   8128	025220					IDENT$	15,14,RSX$$F
						.IDENT	/B15140/
   8129
   8130					;
   8131					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
   8132					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   8133					;				ALL RIGHTS RESERVED
   8134					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   8135					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   8136					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   8137					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   8138					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   8139					;
   8140					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   8141					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   8142					;       CORPORATION.
   8143					;
   8144					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   8145					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   8146					;
   8147					;
   8148					;		MODULE: QUEUED PROTOCOL DRIVER FOR RSX-20F
   8149					;
   8150					;		VERSION: V15-14
   8151					;
   8152					;		AUTHOR: R. MCLEAN
   8153					;
   8154					;		DATE: 19 JUL 75
   8155					;
   8156					;	THIS MODULE CONTAINS:
   8157					;
   8158					;	1 -- QUEUED PROTOCOL SERVICE
   8159					;
   8160					; MODIFICATIONS:
   8161					;
   8162					;	NO.	DATE		PROGRAMMER	PURPOSE
   8163					;	---	----		----------	-------
   8164					;	001	21-OCT-76	A. PECKHAM	INSERT CODING TO COUNT
   8165					;						DOORBELLS.
   8166					;	002	08-NOV-76	K. RETI		ADD SUPPRESS SEND-ALL
   8167					;				R. BELANGER	CODE.
   8168					;	003	03-FEB-77	R. BELANGER	ADDED GENERALIZED DL-11E
   8169					;						SUPPORT
   8170					;	004	10-FEB-77	A. PECKHAM	KEEP TO-11 QUEUE COUNT
   8171					;						STRAIGHT
   8172					;	005	16-FEB-77	A. PECKHAM	SET SPEED OF REMOTE LINES
   8173					;	006	07-MAR-77	A. PECKHAM	REORGANIZE SENDALL
   8174					;	007	08-MAR-77	A. PECKHAM	FIX "XOFF" FOR CTY
   8175					;	008	14-MAR-77	R. BELANGER	CONDITIONALLY REMOVE
   8176					;						SUPPORT FOR UNUSED DTE-20
   8177					;						DIRECTIVES
   8178					;	009	31-MAY-77	R. BELANGER	ADD SUPPORT FOR KLINIK
   8179					;						PARAMETER PASSING
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 144-1
QUEUED PROTOCOL DRIVER -- COPYRIGHT STATEMENT

   8180					;	010	15-JUL-77	R. BELANGER	ADD AUTO-BAUD SUPPORT
   8181					;	011	25-JUL-77	R. BELANGER	FIX BUG IN INITIAL STATUS
   8182					;	012	25-AUG-77	R. BELANGER	ADD KL POWERFAIL SUPPORT
   8183					;	013	02-SEP-77	R. BELANGER	XON/XOFF BUG FIX
   8184					;   TCO 4.2067	30-OCT-78	R. BELANGER	FIX XON TO ACCOUNT FOR NULL
   8185					;						BYTE IN THREAD PACKET
   8186					;   TCO 4.2096	30-NOV-78	R. BELANGER	REMOVE EXTRANEOUS CODE
   8187					;						FROM "XON" PROCESSOR
   8188					;   TCO 4.2181	01-FEB-79	R. BELANGER	ADD ENABLE/DISABLE XON/XOFF
   8189					;						MESSAGE.
   8190					;						MOVE DEVICE DEPENDENT XON/XOFF
   8191					;						PROCESSING TO TERMINAL DRIVER.
   8192					;   TCO 4.2216	16-MAR-79	R. BELANGER	ALLOW DTE-20 TO RUN AT FULL SPEED
   8193					;   TCO 4.2246	16-MAY-79	R. BELANGER	ELIMINATE RACE CONDITION IN SENDALL
   8194					;   TCO 4.2284	25-MAY-79	R. BELANGER	ADD NEW MODEM CONTROL SUPPORT
   8195					;   TCO 4.2524	01-OCT-79	R. BELANGER	FLUSH OUPUT QUEUE WHEN LINE SPEED SET TO 0
   8196					;   TCO 5.1004	10-OCT-79	R. BELANGER	ADD NON-CONTIGUOUS DEVICE SUPPORT
   8197					;   TCO 5.1015	25-OCT-79	R. BELANGER	ADD NEW TERMINAL INPUT CONTROL
   8198					;   TCO 5.1016	01-NOV-79	R. BELANGER	ADD BREAK-THROUGH WRITE
   8199					;  TCO 4.1.1035	16-NOV-79	R. BELANGER	ADD QUEUE ARBITRATION MECHANISM
   8200					;						PROCESS PACKETS INIBITTED
   8201					;  TCO 4.1.1091	12-FEB-80	R. BELANGER	FIX MISSING DM-11/BB PROBLEM
   8202					;  TCO 4.1.1092	25-FEB-80	R. BELANGER	LOCAL TERMINAL INPUT CONTROL
   8203					;  TCO 4.1.1104	05-MAR-80	R. BELANGER	SEND KEEP-ALIVE FROM DTE SERVICE
   8204					;  TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
   8205					;  TCO 4.1.1121	19-MAR-80	R. BELANGER	BREAK QUEUED PROTOCOL DRIVER AND
   8206					;						DTE-20 DRIVER INTO SEPARATE MODULES
   8207					;  TCO 4.1.1137	05-APR-80	R. BELANGER	LIMIT TO-10 QUEUE NODE SIZE TO 60 BYTES
   8208					;  TCO 5.1127	08-AUG-80	S. LEAPLINE	ADD HOST DEBUG MODE MESSAGE
   8209					;  TCO 5.1248	26-JAN-81	S. LEAPLINE	SAVE R0 FOR XOFF/XON CODE
   8210					;  TCO 5.1249	26-JAN-81	S. LEAPLINE	FIX BUG IN SETSPD, HIT WHEN
   8211					;						GIVEN AN INCORRECT LINE SPEED
   8212					;  	014	18-AUG-81	S. LEAPLINE	REMOVE WSIG$S IN SENDALL
   8213					;
   8214					; THE FOLLOWING CHANGES ARE POST V14-45
   8215					;
   8216					;18-NOV-82  TCO 6.1359	D. WEAVER
   8217					;	XOFF BIT GETS CLEARED ON QUEUED PROTOCOL MESSAGE TO SET/RESET
   8218					;	RECEIVE SYSTEM-MESSAGES BIT.
   8219					;29-MAR-83  TCO 6.1567	D. WEAVER
   8220					;	WHEN SETTING A LINE TO AUTOBAUD, SET ITS INTITIAL SPEED TO 2400 BAUD
   8221					;	RATHER THAN 300 BAUD FOR HIGH SPEED AUTO-BAUD.
   8222					;29-APR-83  TCO 6.1567	D. WEAVER
   8223					;	WHEN SETTING A LINE TO AUTOBAUD, ALSO PUT IT IN AUTOBAUD WAIT.
   8224					;11-JUL-83  TCO 6.1723	D. WEAVER
   8225					;	TIME OUT LOW SPEED AUTOBAUD DETECT.  CHANGE REFERENCES OF TT.FER
   8226					;	TO TT.BRK.
   8227					;12-AUG-83  TCO 6.1771	D. WEAVER
   8228					;	SUPPORT QUEUED PROTOCOL FUNCTION DIALUP FOR AUTO-DIALERS.
   8229					;18-JUN-84  TCO ******  M. RUDENKO
   8230					;	ADD DISK DRIVE SERIAL NUMBER REPORT
   8231					;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 145
QUEUED PROTOCOL DRIVER -- COPYRIGHT STATEMENT

   8233					;
   8234					;	MACRO DEFINITIONS
   8235					;
   8236
   8237						.MCALL	RQST$,WTSE$S,$DEF,WSIG$S,.INH5,.ENB5
   8238						.MCALL	.DQPEN,MRKT$,WTLO$,WTSE$,.CRASH,CALL,RETURN,.STKM,DIR$,.INH6,.ENB6
   8239
   8240	025220					$DEF
   8241
   8242					;
   8243					;	LOCAL MACROS
   8244					;
   8245					;	MACRO TO ENABLE TASK SWITCHING
   8246					;
   8247						.MACRO	.ENBT
   8248						 MOV	@#PS,-(SP)
   8249						 BIC	#PRI7,@#PS
   8250						.ENDM
   8251					;
   8252					;	MACRO TO DISABLE TASK SWITCHING
   8253					;
   8254						.MACRO	.INHT
   8255						 MOV	(SP)+,@#PS
   8256						.ENDM
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 146
QUEUED PROTOCOL DRIVER -- COPYRIGHT STATEMENT

   8258					;
   8259					;	DATA AREAS
   8260					;
   8261		000060 				E.OPSZ==60	; [4.1.1137] OPTIMAL SIZE FOR A TO 10 QUEUE
   8262					;
   8263					; LOCAL DEFINITIONS FOR DTE20 TASK
   8264					;
   8265		000100 				EF.TED==100	; TO ELEVEN DONE EVENT FLAG
   8266					;
   8267					; TO ELEVEN QUEUE ENTRY
   8268					;
   8269		000000 				E.FP==0		; FORWARD POINTER
   8270		000002 				E.LS==2		; LIST SIZE
   8271		000004 				E.FN==4		; FUNCTION CODE
   8272		000006 				E.DV==6		; DEVICE CODE
   8273		000010 				E.FW==10	; FUNCTION FIRST WORD
   8274					;
   8275					;	FUNCTION CODE DEFINITIONS
   8276					;
   8277		000001 				BC.RQD==1	; REQUEST DEVICES
   8278		000002 				BC.HAD==2	; HERE ARE DEVICES
   8279		000003 				BC.STR==3	; STRING DATA
   8280		000004 				BC.LNC==4	; LINE/CHARACTER DATA
   8281		000005 				BC.RDS==5	; RETURN DEVICE STATUS
   8282		000006 				BC.SDS==6	; SET DEVICE STATUS
   8283		000007 				BC.HDS==7	; HERE IS DEVICE STATUS
   8284		000010 				BC.DES==10	; DEVICE ERROR STATUS
   8285		000011 				BC.RTD==11	; RETURN TIME OF DAY
   8286		000012 				BC.HTD==12	; HERE IS TIME OF DAY
   8287		000013 				BC.FOD==13	; FLUSH OUTPUT DEVICE QUEUE
   8288		000014 				BC.SNA==14	; SEND ALL
   8289		000015 				BC.TDU==15	; DEVICE DIAL UP
   8290		000016 				BC.THU==16	; DEVICE HANG UP
   8291		000017 				BC.SAK==17	; ACKNOWLEDGE DEVICE DONE
   8292		000020 				BC.XOF==20	; X-OFF (TTY ONLY)
   8293		000021 				BC.XON==21	; X-ON (TTY ONLY)
   8294		000022 				BC.STS==22	; SET TTY SPEED
   8295		000023 				BC.SLA==23	; SET LINE ALLOCATION
   8296		000024 				BC.BTP==24	; 11 REBOOT WORD
   8297		000025 				BC.AKA==25	; ACK ALL
   8298		000026 				BC.SPT==26	; START/STOP LINE
   8299		000027 				BC.EDR==27	; ENABLE/DISABLE REMOTES
   8300		000030 				BC.LDR==30	; LOAD LP RAM
   8301		000031 				BC.LDV==31	; LOAD LP VFU
   8302		000032 				BC.NSA==32	; SUPPRESS SEND-ALL FUNCTION (SET OR CLEAR BIT)
   8303		000033 				BC.SKP==33	; SEND KLINIK PARAMETERS
   8304		000034 				BC.XEN==34	; [4.2181] ENABLE/DISABLE XON/XOFF
   8305		000035 				BC.BTW==35	; [5.1016] BREAK-THROUGH WRITE
   8306		000036 				BC.DEB==36	; [5.1127] HOST DEBUG MODE
   8307		000037 				BC.NDM==37	; [5.1127] CLEAR HOST DEBUG MODE
   8308		000040 				BC.HSN==40	; [******] HERE ARE SERIAL NUMBERS
   8309		000041 				BC.FNM==41	; [5.1016] 1 GREATER THAN MAX FUNCTION
   8310					;
   8311					;	DPB'S
   8312					;
   8313
   8314	025220				WTLODT:
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 146-1
QUEUED PROTOCOL DRIVER -- COPYRIGHT STATEMENT

   8315	025220					WTLO$	1,EF.TED	; WAIT FOR TEN DONE
	025220	   053 	   003 			.BYTE	43.,3
	025222	000001 				.WORD	1
	025224	000100 				.WORD	EF.TED
   8316
   8317	025226				.RQSPD::			; ALSO CALLED FROM "TTYDRR"
   8318	025226					RQST$	SETSPD
	025226	   013 	   007 			.BYTE	11.,7
	025230	073634 	074504 			.RAD50	/SETSPD/
	025234	000000 	000000 			.WORD	0,0
	025240	000000 				.WORD
	025242	   000 	   000 			.BYTE	,
   8319
   8320					;
   8321					;	LOCAL DATA
   8322					;
   8323
   8324	025244				SPDTBL::
   8325	025244	000000 				.WORD	0		; ZERO BAUD
   8326	025246	000062 				.WORD	50.		; 50 BAUD
   8327	025250	000113 				.WORD	75.		; ETC ......
   8328	025252	000156 				.WORD	110.
   8329	025254	000206 				.WORD	134.
   8330	025256	000226 				.WORD	150.
   8331	025260	000310 				.WORD	200.
   8332	025262	000454 				.WORD	300.
   8333	025264	001130 				.WORD	600.
   8334	025266	002260 				.WORD	1200.
   8335	025270	003410 				.WORD	1800.
   8336	025272	004540 				.WORD	2400.
   8337	025274	011300 				.WORD	4800.
   8338	025276	022600 				.WORD	9600.
   8339	025300	000001 				.WORD	1.
   8340	025302	000002 				.WORD	2.
   8341
   8342		000020 			SPDTBZ=.-SPDTBL/2
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 147
QUEUED PROTOCOL DRIVER -- PROTOCOL PACKET SERVICE DISPATCH

   8344						.SBTTL	QUEUED PROTOCOL DRIVER -- PROTOCOL PACKET SERVICE DISPATCH
   8345
   8346	025304				DTEHD::
   8347	025304					.STKM	0,0,0,0,0,0,0,QPRDTE,174000,DTESP
	025352	000000 	000000 	000000 		.WORD	0,0,0,0
	025360	000000
	025400	174000 	025610'	025564'		.WORD	174000,QPRDTE,DTESP
	025434	000005 				.WORD	5
	025436	010262'				.WORD	TTPEN
	025440	000000 				.WORD	0
	025442	000000 				.WORD	0
	025444	000000 				.WORD	0
	025446	000000 				.WORD	0
	025450	000000 				.WORD	0
	025452	000000 				.WORD	0
	025454	000000 				.WORD	0
	025456	000000 				.WORD	0
	025460	000000 				.WORD	0
	025462	000000 				.WORD	0
	025564	000000 				.WORD	0
	025566	000000 				.WORD	0
	025570	000000 				.WORD	0
	025572	000000 				.WORD	0
	025574	000000 				.WORD	0
	025576	000000 				.WORD	0
	025600	025610'				.WORD	QPRDTE
	025602	174000 				.WORD	174000
   8348
   8349						.ENABL	LSB
   8350
   8351	025604				QPRDTC::
   8352	025604					.ENB6			;;; [4.1.1035] ALLOW INTERRUPTS
	025604	012637 	177776 			MOV	(SP)+,@#PS
   8353	025610				QPRDTE::
   8354	025610					DIR$	#WTLODT		; WAIT FOR TEN DONE
	025610	012746 	025220'			MOV	#WTLODT,-(SP)
	025614	104375 				EMT	375
   8355	025616				10$:
   8356	025616					.INH6			; INHIBIT INTERRUPTS
	025616	013746 	177776 			MOV	@#PS,-(SP)
	025622	112737 	000300 	177776 		MOVB	#300,@#PS
   8357	025630	013700 	001006'			MOV	.CRTSK,R0	;;; POINT TO CURRENT TASK
   8358	025634	005060 	000020 			CLR	A.EF(R0)	;;; AND CLEAR THE EVENT FLAGS.
   8359	025640				20$:
   8360	025640	013704 	001342'			MOV	TO11Q,R4	;;; PICK IT FROM THE QUEUE
   8361	025644	001757 				BEQ	QPRDTC		;;; NO QUEUE -- BACK TO SLEEP
   8362	025646	011437 	001342'			MOV	@R4,TO11Q	;;; SET UP THE NEXT LISTHEAD OR ZERO
   8363	025652	010400 				MOV	R4,R0		;;; SET IN R0 ALSO
   8364	025654	116401 	000004 			MOVB	E.FN(R4),R1	;;; FIND THE FUNCTION CODE OF THE REQUEST
   8365	025660	006301 				ASL	R1		;;; MAKE IT 2* FUNCTION
   8366	025662	000171 	025732'			JMP	@DFTBL-2(R1)	;;; GO TO THE CORRECT ROUTINE
   8367						;
   8368	025666				QPRDTL:
   8369	025666					.ENB6			;;; [4.1.1035] ALLOW INTERRUPTS
	025666	012637 	177776 			MOV	(SP)+,@#PS
   8370	025672	000240 				NOP			; [4.1.1035] LET AN INTERRUPT HAPPEN
   8371	025674	005737 	001012'			TST	.COMEF+2	; [4.1.1105] ARE WE STILL IN PRIMARY PROTOCOL??
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 147-1
QUEUED PROTOCOL DRIVER -- PROTOCOL PACKET SERVICE DISPATCH

   8372	025700	100346 				BPL	10$		; [4.1.1105] NO -- CONTINUE EMPTYING TO 11 QUEUE
   8373	025702					.INH6			; [4.1.1035] YES -- DISALLOW INTERRUPTS
	025702	013746 	177776 			MOV	@#PS,-(SP)
	025706	112737 	000300 	177776 		MOVB	#300,@#PS
   8374	025714	013704 	001334'			MOV	TO10Q,R4	;;; [4.1.1035] POINT TO THE TO 10 QUEUE
   8375	025720	022704 	001334'			CMP	#TO10Q,R4	;;; [4.1.1035] ANYTHING THERE??
   8376	025724	001745 				BEQ	20$		;;; [4.1.1035] NO -- GO ON
   8377	025726					CALL	.STTNF		;;; [4.1.1121] YES -- FORCE THE START
	025726	004737 	032206'			JSR	PC,.STTNF
   8378	025732	000742 				BR	20$		;;; [4.1.1035] UNLOAD THE REST OF THE TO 11 QUEUE
   8379						;
   8380
   8381						.DSABL	LSB
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 148
QUEUED PROTOCOL DRIVER -- DISPATCH TABLE

   8383						.SBTTL	QUEUED PROTOCOL DRIVER -- DISPATCH TABLE
   8384
   8385	025734				DFTBL::
   8386	025734	026766'				HICTS			; (01) HERE IS INITIAL STATUS
   8387	025736	026034'				UNRGFN			; (02) UNRECGONIZED FUNCTION
   8388	025740	027236'				STRDAT			; (03) STRING DATA FOR DEVICE
   8389	025742	027302'				LINCHR			; (04) LINE NUMBER CHARACTER DATA FOR DEVICE
   8390	025744	027236'				RTDVST			; (05) RETURN DEVICE STATUS
   8391	025746	027236'				STDVST			; (06) SET DEVICE STATUS FOR DEVICE
   8392	025750	027236'				HIDVST			; (07) HERE IS DEVICE STATUS
   8393	025752	026034'				UNRGFN			; (10) ERROR DEVICE STATUS
   8394	025754	027212'				RTNTOD			; (11) RETURN TIME OF DAY
   8395	025756	027444'				RETTOD			; (12) SEND TIME OF DAY
   8396	025760	027502'				FLDVOT			; (13) FLUSH DEVICE OUTPUT QUEUE
   8397	025762	027616'				SNDALL			; (14) SEND ALL TTY'S
   8398	025764	026130'				DIALUP			; (15) DIAL UP
   8399	025766	026176'				HANGUP			; (16) HANG UP
   8400	025770	026344'				ACKNOW			; (17) ACKNOWLEDGE END OF DATA IN BUFFER
   8401	025772	026730'				XOFF			; (20) XOFF (TTY)
   8402	025774	026744'				XON			; (21) XON (TTY)
   8403	025776	026376'				SETSPD			; (22) SET TTY SPEED
   8404	026000	026356'				SETLIN			; (23) SET LINE ALLOCATION
   8405	026002	026034'				UNRGFN			; (24) SET RELOAD PARAMETERS
   8406	026004	026762'				DEAND1			; (25) ACK ALL
   8407	026006	026604'				STPLIN			; (26) STOP LINE
   8408	026010	026042'				EDRMT			; (27) ENABLE/DISABLE REMOTE LINES
   8409	026012	027236'				LDLPR			; (30) LOAD LP RAM
   8410	026014	027236'				LDLPV			; (31) LOAD LP VFU
   8411	026016	026060'				NOSNDA			; (32) SET OR CLEAR "SUPPRESS SEND-ALL" BIT
   8412	026020	027540'				RCVKLP			; (33) RECIEVE KLINIK PARAMETERS FROM KL
   8413	026022	026052'				ENBXOF			; (34) ENABLE/DISABLE XOFF PROCESSING
   8414	026024	026702'				BTWCHR			; (35) BREAK-THROUGH WRITE
   8415	026026	027600'				SETDEB			; (36) HOST DEBUG MODE
   8416	026030	027610'				CLRDEB			; (37) CLEAR HOST DEBUG MODE
   8417	026032	027120'				HISN			; [**] (40) HERE IS SERIAL NUMBERS
   8418
   8419		000100 			DFTSZ=.-DFTBL			; LEGAL FUNCTIONS COUNT *2
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 149
QUEUED PROTOCOL DRIVER -- UNRECOGNIZED FUNCTION

   8421						.SBTTL	QUEUED PROTOCOL DRIVER -- UNRECOGNIZED FUNCTION
   8422
   8423					;
   8424					;	UNRGFN -- UNRECOGNIZED FUNCTION
   8425					;
   8426
   8427	026034				UNRGFN::
   8428	026034					.CRASH	ILF		;;; ILF -- ILLEGAL FUNCTION
	026034	000004 				IOT
	026036	   111 	   114 	   106 		.ASCIZ	/ILF/
	026041	   000
   8429						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 150
QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE REMOTE TERMINALS

   8431						.SBTTL	QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE REMOTE TERMINALS
   8432
   8433					;
   8434					;	ENABLE/DISABLE REMOTE TERMINALS -- FUNCTION 27
   8435					;
   8436
   8437	026042				EDRMT::
   8438	026042	016037 	000010 	002604'		MOV	E.FW(R0),.INHDM	;;; ENABLE/DISABLE DM-11/BB'S
   8439	026050	000426 				BR	DEAND3		;;; AND QUIT
   8440						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 151
QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE SENDALL AND XOFF PROC

   8442						.SBTTL QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE SENDALL AND XOFF PROCESSING
   8443
   8444					;
   8445					;	ENBXOF FUNCTION (ENABLE/DISABLE XOFF PROCESSING) FUNCTION 34
   8446					;
   8447
   8448						.ENABL	LSB
   8449
   8450	026052				ENBXOF::
   8451	026052	012705 	000020 			MOV	#TT.XEN,R5	  ; SET UP STATUS BIT
   8452	026056	000402 				BR	10$		  ; DO COMMON CODE
   8453						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 152
QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE SENDALLS

   8455						.SBTTL	QUEUED PROTOCOL DRIVER -- ENABLE/DISABLE SENDALLS
   8456
   8457					;
   8458					;	NOSNDA FUNCTION (SET/CLEAR SUPPRESS SEND-ALL BIT) FUNCTION 32
   8459					;
   8460
   8461	026060				NOSNDA::			  ; SET OR CLEAR BIT TO SUPPRESS SEND-ALLS
   8462	026060	012705 	000400 			MOV	#TT.NSA,R5	  ; SET UP STATUS BIT
   8463	026064				10$:
   8464	026064	000360 	000010 			SWAB	E.FW(R0)	  ; SET UP DEVICE CODE FOR "FDVNMM"
   8465	026070					CALL	FDVNMM		  ; GET R2 TO POINT TO BLOCK FOR THIS LINE
	026070	004737 	030266'			JSR	PC,FDVNMM
   8466	026074	040562 	000006 			BIC	R5,STSW1(R2)	  ; ASSUME A CLEAR
   8467	026100	033705 	000020 			BIT	TT.XEN,R5	  ; ARE WE ENABLING/DISABLING XOFF
   8468	026104	001403 				BEQ	20$		  ; NO,
   8469	026106	042762 	000200 	000006 		BIC	#TT.XOF,STSW1(R2) ; YES, ALWAYS CLEAR XOFF BIT
   8470	026114	105760 	000010 		20$:	TSTB	E.FW(R0)	  ; TEST ARGUMENT BYTE
   8471	026120	001525 				BEQ	DEAND2		  ; IF .NE. 0,
   8472	026122	050562 	000006 			BIS	R5,STSW1(R2)	  ; THEN SET BIT.
   8473	026126				DEAND3:
   8474	026126	000522 				BR	DEAND2		  ; FREE THE NODE
   8475						;
   8476
   8477						.DSABL	LSB
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 153
QUEUED PROTOCOL -- DIALUP

   8479						.SBTTL	QUEUED PROTOCOL -- DIALUP
   8480
   8481					;
   8482					;	DIALUP -- FUNCTION 15
   8483					;
   8484
   8485	026130				DIALUP::
   8486	026130					CALL	FDVNMM		; FIND DEVICE
	026130	004737 	030266'			JSR	PC,FDVNMM
   8487	026134	010205 				MOV	R2,R5		; SETUP TABLE ADDRESS
   8488	026136	022705 	003054'			CMP	#DHTBL,R5	; IS IT A DH-11
   8489	026142	101114 				BHI	DEAND2		; NO -- IGNORE DL11
   8490	026144	005001 				CLR	R1		; YES -- FIND THE LINE NUMBER
   8491	026146	156001 	000011 			BISB	E.FW+1(R0),R1	; SO
   8492	026152	162701 	000005 			SUB	#DLCNT,R1	; REMOVE DL-11'S
   8493	026156	042701 	177760 			BIC	#177760,R1	; MAKE IT A UNIT NUMBER
   8494	026162					CALL	FNDDM		; FIND THE DM-11/BB ADDRESS
	026162	004737 	030204'			JSR	PC,FNDDM
   8495	026166	001502 				BEQ	DEAND2		; NOT THERE -- IGNORE
   8496	026170					CALL	.DMUHU		; RAISE DTR
	026170	004737 	041326'			JSR	PC,.DMUHU
   8497	026174	000477 				BR	DEAND2		; FREE THE NODE
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 154
QUEUED PROTOCOL DRIVER -- HANGUP

   8499						.SBTTL	QUEUED PROTOCOL DRIVER -- HANGUP
   8500
   8501					;
   8502					;	HANGUP -- FUNCTION 16
   8503					;
   8504
   8505	026176				HANGUP::
   8506	026176					CALL	FDVNMM		  ; FIND DEVICE
	026176	004737 	030266'			JSR	PC,FDVNMM
   8507	026202	010205 				MOV	R2,R5		  ; SET UP TABLE ADDRESS
   8508	026204	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ; IS THIS A CTY??
   8509	026212	001411 				BEQ	10$		  ; NO -- GO ON
   8510	026214	105737 	001234'			TSTB	.KLNSW+0	  ; YES -- IS KLINIK ACTIVE??
   8511	026220	003406 				BLE	10$		  ; NOT THAT WE CARE
   8512	026222	010546 				MOV	R5,-(SP)	  ; YES -- SAVE POINTER
   8513					;
   8514					; HERE TO HANG UP THE KLINIK LINE
   8515					;
   8516	026224	013705 	002644'			MOV	KLNPTR,R5	  ; POINT TO KLINIK LINE
   8517	026230					CALL	.DLHUP		  ; HANG UP THE KLINIK LINE
	026230	004737 	041376'			JSR	PC,.DLHUP
   8518	026234	012605 				MOV	(SP)+,R5	  ; RESTORE POINTER
   8519	026236				10$:
   8520	026236	022705 	003054'			CMP	#DHTBL,R5	  ; IS THIS A DH-11??
   8521	026242	101035 				BHI	20$		  ; NO -- DL-11'S ARE A SPECIAL CASE
   8522					;
   8523					; HERE TO HANG UP A DM-11/BB
   8524					;
   8525	026244	005001 				CLR	R1		  ; YES -- FIND THE LINE NUMBER
   8526	026246	156001 	000011 			BISB	E.FW+1(R0),R1	  ; SO
   8527	026252	162701 	000005 			SUB	#DLCNT,R1	  ; REMOVE DL-11'S
   8528	026256	042701 	177760 			BIC	#177760,R1	  ; MAKE IT A UNIT NUMBER
   8529	026262					CALL	FNDDM		  ; FIND THE DM-11/BB ADDRESS
	026262	004737 	030204'			JSR	PC,FNDDM
   8530	026266	001442 				BEQ	DEAND2		  ; NOT THERE -- IGNORE
   8531	026270					CALL	.DMHUP		  ; HANGUP
	026270	004737 	041276'			JSR	PC,.DMHUP
   8532	026274	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; IS THIS AN AUTO-BAUD LINE?
   8533	026302	001434 				BEQ	DEAND2		  ; NO -- GO ON
   8534	026304	042765 	030000 	000006 		BIC	#TT.LSP!TT.IGN,STSW1(R5) ; SET HIGH SPEED AUTOBAUD
   8535	026312	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ; REMOTE LINE?
   8536	026320	001003 				BNE	15$		  ; YES, LET THE MODEM CODE SET AUTOBAUD
   8537	026322	052765 	000010 	000006 		BIS	#TT.ABW,STSW1(R5) ; NO, PUT INTO AUTOBAUD WAIT.
   8538	026330				15$:
   8539	026330					CALL	.DHSPR		  ; YES RESET LINE SPEED TO DEFAULT
	026330	004737 	040602'			JSR	PC,.DHSPR
   8540	026334	000417 				BR	DEAND2		  ; RETURN THE NODE
   8541						;
   8542					;
   8543					; HERE TO HANG UP A DL-11E
   8544					;
   8545	026336				20$:
   8546	026336					CALL	.DLHUP		;;; HANG IT UP
	026336	004737 	041376'			JSR	PC,.DLHUP
   8547	026342	000414 				BR	DEAND2		;;; [4.1.1035] RETURN THE NODE
   8548						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 155
QUEUED PROTOCOL DRIVER -- ACKNOWLEDGE DEVICE

   8550						.SBTTL	QUEUED PROTOCOL DRIVER -- ACKNOWLEDGE DEVICE
   8551
   8552					;
   8553					;	ACKNOWLEDGE DEVICE -- FUNCTION 17
   8554					;
   8555
   8556	026344				ACKNOW::
   8557	026344					CALL	FDVNMM		;;; FIND UNIT ETC
	026344	004737 	030266'			JSR	PC,FDVNMM
   8558	026350					CALL	@.DQPBA-20+Q.AK(R1) ;;; GO TO USER STATUS ROUTINE
	026350	004771 	010054'			JSR	PC,@.DQPBA-20+Q.AK(R1)
   8559	026354	000407 				BR	DEAND2		;;; [4.1.1092] RETURN NODE
   8560						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 156
QUEUED PROTOCOL DRIVER -- SET LINE ALLOCATION

   8562						.SBTTL	QUEUED PROTOCOL DRIVER -- SET LINE ALLOCATION
   8563
   8564					;
   8565					;	SET LINE ALLOCATION -- FUNCTION 23
   8566					;
   8567
   8568	026356				SETLIN::
   8569	026356	000360 	000010 			SWAB	E.FW(R0)	;;; SWAP THE BYTES FOR "FDVNMM"
   8570	026362					CALL	FDVNMM		;;; FIND DEVICE
	026362	004737 	030266'			JSR	PC,FDVNMM
   8571	026366	116461 	000011 	010056'		MOVB	E.FW+1(R4),.DQPBA-20+14(R1) ;;; SET IT IN THE TABLE
   8572	026374				DEAND2:
   8573	026374	000572 				BR	DEAND1		;;; [4.1.1092] AND RETURN
   8574						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 157
QUEUED PROTOCOL DRIVER -- SET LINE SPEED

   8576						.SBTTL	QUEUED PROTOCOL DRIVER -- SET LINE SPEED
   8577
   8578					;
   8579					;	SETSPD -- SET SPEED OF TTY -- FUNCTION 22
   8580					;
   8581					; TCO 5.1249 CHANGES REFRENCES TO R4 TO R0 AND SAVES IN R4 INSTEAD OF SP
   8582
   8583	026376				SETSPD::
   8584	026376	016002 	000012 		        MOV	E.FW+2(R0),R2	;;; FIND THE INPUT SPEED
   8585	026402					CALL	FNDSPD		;;; FIND THIS SPEED
	026402	004737 	030236'			JSR	PC,FNDSPD
   8586	026406	006203 				ASR	R3		;;; PUT IT IN THE CORRECT POSITION FOR DH-11
   8587	026410	006203 				ASR	R3		;;; SO
   8588	026412	010304 				MOV	R3,R4		;;; SAVE THE WORD
   8589	026414	016002 	000014 			MOV	E.FW+4(R0),R2	;;; FIND THE OUTPUT SPEED
   8590	026420					CALL	FNDSPD		;;; FIND THIS SPEED
	026420	004737 	030236'			JSR	PC,FNDSPD
   8591	026424	006303 				ASL	R3		;;; PUT OUTPUT SPEED IN CORRECT POSITION
   8592	026426	006303 				ASL	R3		;;; IS THE OUPUT SPEED ZERO??
   8593	026430	001002 				BNE	10$		;;; NO -- DON'T ALTER IT
   8594	026432	012703 	016003 			MOV	#16003,R3	;;; YES -- SET IT TO AN OUTPUT SPEED OF 300
   8595									;;; THIS IS DONE TO PREVENT PROBLEMS WHEN ZERO OUTPUT BAUD
   8596									;;; IS DONE AND THERE IS OUTPUT FOR THIS LINE
   8597	026436				10$:
   8598	026436	050403 				BIS	R4,R3		;;; SET THE INPUT AND OUTPUT TOGETHER
   8599	026440	016001 	000016 			MOV	E.FW+6(R0),R1	;;; GET THE STOP BIT PARAMETER
   8600	026444	006301 				ASL	R1		;;; 1 IS 1 STOP BIT 2 IS TWO STOP BITS
   8601	026446	042701 	177770 			BIC	#177770,R1	;;; CLEAR OFF JUNK
   8602	026452	050103 				BIS	R1,R3		;;; SET IN STATUS WORD
   8603	026454				20$:
   8604	026454	052703 	000003 			BIS	#3,R3		;;; SET 8 BIT CHARACTER LENGTH
   8605	026460	005005 				CLR	R5		;;; FIND THE LINE NUMBER
   8606	026462	156005 	000010 			BISB	E.FW(R0),R5	;;; FIND THE UNIT NUMBER
   8607	026466	162705 	000005 			SUB	#DLCNT,R5	;;; SUBTRACT OUT DL-11'S
   8608	026472	100533 				BMI	DEAND1		;;; [4.1.1035] DL-11'S ARE NOT LEGAL
   8609	026474	010304 				MOV	R3,R4
   8610	026476	000360 	000010 			SWAB	E.FW(R0)	;;; SWAP THE PLACE OF THE LINE NUMBER
   8611	026502					CALL	FDVNMM
	026502	004737 	030266'			JSR	PC,FDVNMM
   8612	026506	010403 				MOV	R4,R3
   8613	026510	010501 				MOV	R5,R1		;;; SAVE UNIT NUMBER
   8614	026512	010205 				MOV	R2,R5
   8615	026514	005760 	000016 			TST	E.FW+6(R0)	  ; CHECK FOR REMOTE FLAG
   8616	026520	100012 				BPL	30$		  ; NO -- DON'T SET REMOTE FLAG
   8617	026522	042701 	177760 			BIC	#177760,R1	  ; MASK UNIT NUMBER
   8618	026526					CALL	FNDDM		  ; FIND THE DM-11/BB ADDRESS
	026526	004737 	030204'			JSR	PC,FNDDM
   8619	026532	001513 				BEQ	DEAND1		  ; NOT THERE -- IGNORE
   8620	026534	052765 	000100 	000006 		BIS	#TT.RMT,STSW1(R5) ; SET REMOTE FLAG
   8621	026542					CALL	.DMHUP		  ; HANGUP THE DEVICE
	026542	004737 	041276'			JSR	PC,.DMHUP
   8622	026546				30$:
   8623	026546	032760 	040000 	000016 		BIT	#BIT14,E.FW+6(R0) ; IS THIS AN AUTO-BAUD LINE??
   8624	026554	001410 				BEQ	40$		  ; NO -- GO ON
   8625	026556	052765 	000050 	000006 		BIS	#TT.ABL!TT.ABW,STSW1(R5) ; SET THE FLAG
   8626	026564	042765 	034000 	000006 		BIC	#TT.LSP!TT.IGN!TT.BRK,STSW1(R5) ; CLEAR SOME FLAGS
   8627	026572	012703 	027303 			MOV	#27303,R3	  ; SET THE DEFAULT SPEED TO 2400 BAUD
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 157-1
QUEUED PROTOCOL DRIVER -- SET LINE SPEED

   8628	026576				40$:
   8629	026576					CALL	.DHSPD		  ; SET DH-11 LINE SPEED
	026576	004737 	040714'			JSR	PC,.DHSPD
   8630	026602	000467 				BR	DEAND1		  ; DEALLOCATE NODE
   8631						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 158
QUEUED PROTOCOL DRIVER -- STOP LINE INPUT

   8633						.SBTTL	QUEUED PROTOCOL DRIVER -- STOP LINE INPUT
   8634
   8635					;
   8636					;	STOP INPUT FROM LINE -- FUNCTION 26
   8637					;
   8638	026604				STPLIN::
   8639	026604	000360 	000010 			SWAB	E.FW(R0)	;;; SWAP THE BYTES
   8640	026610					CALL	FDVNMM		;;; FIND DEVICE
	026610	004737 	030266'			JSR	PC,FDVNMM
   8641	026614	010205 				MOV	R2,R5		;;; [5.1015] DEVICE POINTER TO R5
   8642	026616	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; [5.1015] IS THIS A CTY?
   8643	026624	001411 				BEQ	10$		;;; NO -- GO ON
   8644	026626	105737 	001234'			TSTB	.KLNSW+0	;;; YES -- IS KLINIK ACTIVE?
   8645	026632	003406 				BLE	10$		;;; NOT THAT WE CARE -- GO ON
   8646	026634	010546 				MOV	R5,-(SP)	;;; [5.1015] YES -- SAVE R5
   8647	026636	013705 	002644'			MOV	KLNPTR,R5	;;; [5.1015] KLINIK POINTER TO R5
   8648	026642					CALL	20$		;;; [5.1015] STOP THE KLINIK LINE
	026642	004737 	026656'			JSR	PC,20$
   8649	026646	012605 				MOV	(SP)+,R5	;;; [5.1015] RESTORE POINTER
   8650	026650				10$:
   8651	026650					CALL	20$		;;; [5.1015] START OR STOP THE LINE
	026650	004737 	026656'			JSR	PC,20$
   8652	026654	000442 				BR	DEAND1		;;; [5.1015] DEALLOCATE THE NODE AND EXIT
   8653						;
   8654	026656				20$:
   8655	026656					CALL	.TTSW2		;;; [5.1015] FIND OUR ".STSW2" ENTRY
	026656	004737 	044212'			JSR	PC,.TTSW2
   8656	026662	012746 	043412'			MOV	#.TTQDS,-(SP)	;;; [4.1.1092] ASSUME A STOP
   8657	026666	105760 	000010 			TSTB	E.FW(R0)	;;; [4.1.1092] IS THIS A START OR A STOP??
   8658	026672	001402 				BEQ	30$		;;; [4.1.1092] STOP -- GO ON
   8659	026674	012716 	043422'			MOV	#.TTQEN,(SP)	;;; [4.1.1092] SET UP FOR A START
   8660	026700				30$:
   8661	026700	000136 				JMP	@(SP)+		;;; [4.1.1092] DO THE START OR STOP AND RETURN
   8662						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 159
QUEUED PROTOCOL DRIVER -- BREAK-THROUGH WRITE

   8664						.SBTTL	QUEUED PROTOCOL DRIVER -- BREAK-THROUGH WRITE
   8665
   8666					;
   8667					;	BTWCHR	-- BREAK-TROUGH WRITE FOR CHARACTER -- FUNCTION 35
   8668					;
   8669
   8670	026702				BTWCHR::
   8671	026702	000360 	000010 			SWAB	E.FW(R0)	;;; [5.1016] SWAP THE LINE NUMBER/FLAG
   8672	026706					CALL	FDVNMM		;;; [5.1016] FIND THE DEVICE
	026706	004737 	030266'			JSR	PC,FDVNMM
   8673									;;; [5.1016] DON'T RETURN IF IT DOESN'T EXIST
   8674	026712	010205 				MOV	R2,R5		;;; [5.1016] COPY DLS POINTER TO R5
   8675	026714	116004 	000010 			MOVB	E.FW(R0),R4	;;; [5.1016] GET THE CHARACTER IN R4
   8676	026720	001420 				BEQ	DEAND1		;;; [4.1.1035] IGNORE IF NULL
   8677	026722					CALL	.TTBTW		;;; [5.1016] FORCE THE CHARACTER OUT
	026722	004737 	044042'			JSR	PC,.TTBTW
   8678	026726	000415 				BR	DEAND1		;;; [5.1016] DEALLOCATE AND EXIT
   8679						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 160
QUEUED PROTOCOL DRIVER -- XOFF

   8681						.SBTTL	QUEUED PROTOCOL DRIVER -- XOFF
   8682
   8683					;
   8684					;	XOFF -- FUNCTION 20
   8685					;
   8686					;	THIS ROUTINE WILL INITIATE THE XOFF SEQUENCE FOR A TERMINAL LINE.
   8687					;	THE "XOFF" STATUS BIT ("TT.XOF") IS SET IN THE LINE STATUS WORD WHICH
   8688					;	BLOCKS ANY FURTHER OUTPUT FROM THE TERMINAL DRIVER. IF THE LINE IS
   8689					;	A DH-11, THE OUTPUT IS NOT STOPPED IMMEDIATELY, BUT A RUNDOWN SEQUENCE
   8690					;	IS INITATED SINCE EARLIER DH-11'S WILL "RUN AWAY" IF THE DEVICE BYTE
   8691					;	COUNT IS SIMPLY CLEARED. THE TERMINAL INTERRUPT SERVICE WILL RESET THE
   8692					;	PACKET ADDRESS AND BYTE COUNT AT OUTPUT DONE SO THAT THE XON CODE CAN
   8693					;	DO A NORMAL LINE START.
   8694					;
   8695					;	THIS MESSAGE IS IGNORED IF:
   8696					;
   8697					;		1. THE LINE IS ALREADY X'D OFF
   8698					;		2. THE LINE HAS NO OUTPUT PENDING (THREAD LIST EMPTY)
   8699					;		3. A SENDALL IS IN PROGRESS ON THIS LINE
   8700					;		4. THE CTY IS IN PDP-11 I/O WAIT AND THE CTY IS TO BE X'D OFF
   8701
   8702	026730				XOFF::
   8703	026730					CALL	FDVNMM		;;; FIND THE DEVICE NAME
	026730	004737 	030266'			JSR	PC,FDVNMM
   8704	026734	010205 				MOV	R2,R5		;;; COPY DLS POINTER TO R5
   8705	026736					CALL	.TTXOF		;;; DO THE XOFF
	026736	004737 	042762'			JSR	PC,.TTXOF
   8706	026742	000407 				BR	DEAND1		;;; AND EXIT
   8707						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 161
QUEUED PROTOCOL DRIVER -- XON

   8709						.SBTTL	QUEUED PROTOCOL DRIVER -- XON
   8710
   8711					;
   8712					;	XON -- FUNCTION 21
   8713					;
   8714					;	THIS ROUTINE WILL RESUME OUTPUT FOR A LINE WHICH WAS PREVIOUSLY
   8715					;	X'D OFF.  THE OUTPUT WILL BE RESUMED PER THE DATA IN THE CURRENT
   8716					;	NODE IN THE THREAD LIST FOR THIS LINE. (T.HCBC AND T.HACD) THIS
   8717					;	DATA IS SAVED AT OUTPUT INTERRUPT TIME FROM THE XOFF.
   8718					;
   8719					;	THIS MESSAGE WILL BE IGNORED IF:
   8720					;
   8721					;		1. THE LINE HAS NOT BEEN PREVIOUSLY X'D OFF
   8722					;		2. A SENDALL IS CURRENTLY IN PROGRESS ON THIS LINE
   8723					;
   8724					;	THE DEVICE WILL NOT BE RESTARTED IF:
   8725					;
   8726					;		1. OUTPUT IS ALREADY IN PROGRESS ON THIS LINE
   8727					;		2. THE OUTPUT THREAD LIST FOR THIS LINE IS EMPTY
   8728					;		3. THE DEVICE DOES NOT EXIST
   8729
   8730
   8731	026744				XON::
   8732	026744					CALL	FDVNMM		;;; [4.2181] FIND THIS DEVICE
	026744	004737 	030266'			JSR	PC,FDVNMM
   8733	026750	010205 				MOV	R2,R5		;;; [4.2181] COPY DLS POINTER TO R5
   8734	026752	010046 				MOV	R0,-(SP)	;;; [5.1248] SAVE R0
   8735	026754					CALL	.TTXON		;;; [4.2181] PROCESS THE DIRECTIVE
	026754	004737 	043104'			JSR	PC,.TTXON
   8736	026760	012600 				MOV	(SP)+,R0	;;; [5.1248] RESTORE R0
   8737	026762				DEAND1:
   8738	026762	000137 	027472'			JMP	DEANOD		;;; [4.2181] DEALLOCATE THE NODE
   8739						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 162
QUEUED PROTOCOL DRIVER -- HERE IS INITIAL STATUS

   8741						.SBTTL	QUEUED PROTOCOL DRIVER -- HERE IS INITIAL STATUS
   8742
   8743					;
   8744					;	HERE IS INITIAL STATUS -- FUNCTION 1
   8745					;	FW IS ALLOCATED WITH LOW ORDER PART AS # OF TTY'S
   8746					;	BIT 16 IS ALLOCATED TO INDICATE 50CPS
   8747					;
   8748
   8749	026766				HICTS::
   8750	026766	012737 	000074 	001154'		MOV	#60.,.TKPS	;;; SET UP THE CLOCK TO 60. CPS
   8751	026774	105760 	000010 			TSTB	E.FW+0(R0)	;;; CHECK FOR 50 CPS (BYTES ARE SWAPPED)
   8752	027000	100003 				BPL	10$		;;; HIGH ORDER BIT SET IS 50CPS
   8753	027002	162737 	000012 	001154'		SUB	#10.,.TKPS	;;; SET TO 50 HZ
   8754	027010				10$:
   8755	027010	012703 	000001 			MOV	#D.CCTY,R3	;;; SET DEVICE ID
   8756	027014	012701 	000002 			MOV	#BC.HAD,R1	;;; SET HERE IS DEVICE STATUS
   8757	027020	013704 	002642'			MOV	CTYPTR,R4	;;; FIND THE CTY NUMBER
   8758	027024	162704 	003004'			SUB	#TTTBL,R4
   8759	027030	006204 				ASR	R4		;;; MAKE NUMBER
   8760	027032	006204 				ASR	R4
   8761	027034	006204 				ASR	R4
   8762	027036					CALL	..STFC		;;; START FUNCTION
	027036	004737 	046714'			JSR	PC,..STFC
   8763	027042	105737 	001224'			TSTB	.KLNMD+0	;;; ANY KLINIK PARAMETERS TO SEND??
   8764	027046	001424 				BEQ	20$		;;; NO -- GO ON
   8765	027050	010046 				MOV	R0,-(SP)	;;; YES -- SAVE R0
   8766	027052	012700 	001204'			MOV	#.KLNPB,R0	;;; BUFFER POINTER TO R0
   8767	027056	012710 	000026 			MOV	#KLNPLN,(R0)	;;; BYTE COUNT TO BUFFER HEADER
   8768	027062	012701 	100033 			MOV	#BC.SKP+100000,R1 ;;; FUNCTION CODE TO R1
   8769	027066	005002 				CLR	R2		;;; DON'T WAIT FOR IT
   8770	027070	012703 	000200 			MOV	#D.CCPU,R3	;;; DEVICE ID TO R3
   8771	027074					.ENBT			;;; [4.1.1035] ALLOW TASK SWITCHING
	027074	013746 	177776 			 MOV	@#PS,-(SP)
	027100	042737 	000340 	177776 		 BIC	#PRI7,@#PS
   8772	027106					CALL	..STIN		; SEND THE KLINIK PARAMETERS
	027106	004737 	047104'			JSR	PC,..STIN
   8773	027112					.INHT			; [4.1.1035] DISABLE TASK SWITCHING
	027112	012637 	177776 			 MOV	(SP)+,@#PS
   8774	027116	012600 				MOV	(SP)+,R0	;;; RESTORE R0
   8775	027120				20$:
   8776	027120	123727 	001037'	000102 	HISN::	CMPB	.VERNO+1,#'B
   8777	027126	001022 				BNE	30$
   8778	027130	010046 				MOV	R0,-(SP)		;;; [**] SAVE R0
   8779	027132	012700 	005550'			MOV	#.RHPB,R0	;;; [**] FETCH BUFFER ADDRESS
   8780	027136	012701 	100040 			MOV	#BIT15!BC.HSN,R1 ;;; [**] SET UP FNC CODE (INDIRECT)
   8781	027142	005002 				CLR	R2		;;; [**] NO EVENT FLAG DESIRED
   8782	027144	012703 	000203 			MOV	#D.CRJP,R3	;;; [**] RP DEVICE CODE
   8783	027150					.ENBT			;;; [**] ENABLE TASK SWITCHING
	027150	013746 	177776 			 MOV	@#PS,-(SP)
	027154	042737 	000340 	177776 		 BIC	#PRI7,@#PS
   8784	027162					CALL	..STIN		; [**] SEND THE PACKET
	027162	004737 	047104'			JSR	PC,..STIN
   8785	027166					.INHT			; [**] DISABLE TASK SWITCHING
	027166	012637 	177776 			 MOV	(SP)+,@#PS
   8786	027172	012600 				MOV	(SP)+,R0		; [**] RESTORE R0
   8787	027174	013704 	001160'		30$:	MOV	.BTPRM,R4	;;; SEND BOOT PARAMETERS
   8788	027200	012701 	000024 			MOV	#BC.BTP,R1	;;; SET BOOT PARAMETERS
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 162-1
QUEUED PROTOCOL DRIVER -- HERE IS INITIAL STATUS

   8789	027204					CALL	..STFC		;;; [5.1004] SEND BOOT PARAMETERS
	027204	004737 	046714'			JSR	PC,..STFC
   8790	027210	000530 				BR	DEANOD		;;; [4.1.1035] DEALLOCATE NODE
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 163
QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY

   8792						.SBTTL	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   8793
   8794					;
   8795					;	RTNTOD -- RETURN TIME OF DAY TO KL -- FUNCTION 11
   8796					;
   8797
   8798	027212				RTNTOD::
   8799	027212	005737 	001140'			TST	.DATE3		;;; [5.1004] IS OUR DATE VALID??
   8800	027216	001403 				BEQ	10$		;;; [5.1004] NO -- JUST REPORT CONFIGURATION
   8801	027220	012737 	177777 	002610'		MOV	#-1,.ABFLG	;;; FLAG "SETSPD" TO REPORT ALL LINES
   8802	027226				10$:
   8803	027226					DIR$	#.RQSPD		;;; SET SPEED AND THEN RETURN TIME OF DAY
	027226	012746 	025226'			MOV	#.RQSPD,-(SP)
	027232	104375 				EMT	375
   8804	027234	000516 				BR	DEANOD		;;; [4.1.1035] DEALLOCATE THIS NODE
   8805						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 164
QUEUED PROTOCOL DRIVER -- STRING DATA

   8807						.SBTTL	QUEUED PROTOCOL DRIVER -- STRING DATA
   8808
   8809					;
   8810					;	STRDAT -- ROUTINE TO HANDLE STRING DATA -- FUNCTION 3
   8811					;	HIDVST -- ROUTINE TO RECIEVE DEVICE STATUS -- FUNCTION 7
   8812					;	RTDVST -- ROUTINE TO RECEIVE REQUEST FOR DEVICE STATUS -- FUNCTION 5
   8813					;	STDVST -- ROUTINE TOSET DEVICE STATUS -- FUNCTION 6
   8814					;	LDLPR -- ROUTINE TO LOAD LP RAM -- FUNCTION 30
   8815					;	LDLPV -- ROUTINE TO LOAD LP VFU -- FUNCTION 31
   8816					;
   8817
   8818	027236				HIDVST::
   8819	027236				LDLPR::
   8820	027236				LDLPV::
   8821	027236				STDVST::
   8822	027236				RTDVST::
   8823	027236				STRDAT::
   8824	027236	012702 	000006 			MOV	#6,R2		;;; MOVE OVER THE LISTHEAD AND COUNT
   8825	027242	060204 				ADD	R2,R4		;;; FIND THE DEVICE ADDRESS
   8826	027244	012401 				MOV	(R4)+,R1	;;; FIND THE DEVICE ADDRESS
   8827	027246	012403 				MOV	(R4)+,R3	;;; FIND THE FIRST WORD
   8828	027250	160204 				SUB	R2,R4		;;; BACKUP TO STORE IN THE HEADER
   8829	027252	111464 	000003 			MOVB	@R4,3(R4)	;;; SAVE FUNCTION CODE
   8830	027256	010414 				MOV	R4,@R4		;;; SAVE THE ADDRESS
   8831	027260	060224 				ADD	R2,(R4)+	;;; UPDATE ADDRESS
   8832	027262	000303 				SWAB	R3		;;; SET UP BYTES SWAPED
   8833	027264	110314 				MOVB	R3,@R4		;;; STORE BYTE COUNT
   8834	027266					CALL	FDVNM		;;; FIND DEVICE TABLE ENTRY
	027266	004737 	030302'			JSR	PC,FDVNM
   8835	027272	103477 				BCS	DEANOD		;;; ILLEGAL DEVICE -- FORGET IT
   8836	027274					CALL	@.DQPBA+Q.ST-20(R1) ;;; START DEVICE
	027274	004771 	010046'			JSR	PC,@.DQPBA+Q.ST-20(R1)
   8837	027300	000476 				BR	QPRDTF		;;; [4.1.1035] GO TO DO MORE WORK
   8838						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 165
QUEUED PROTOCOL DRIVER -- LINE NUMBER - CHARACTER

   8840						.SBTTL	QUEUED PROTOCOL DRIVER -- LINE NUMBER - CHARACTER
   8841
   8842					;
   8843					;	LINCHR --LINE NUMBER - CHARACTER -- FUNCTION 4
   8844					;
   8845
   8846	027302				LINCHR::
   8847	027302	010046 				MOV	R0,-(SP)	;;; SAVE THE NODE ADDRESS
   8848	027304	005046 				CLR	-(SP)
   8849	027306	116416 	000005 			MOVB	E.FN+1(R4),@SP	;;; SAVE SIZE OF BLOCK
   8850	027312	162716 	000010 			SUB	#E.FW,@SP	;;; SUBTRACT THE SIZE OF THE HEADER
   8851	027316	010405 				MOV	R4,R5		;;; SET UP THE POINTER TO THE BUFFER
   8852	027320	016404 	000006 			MOV	E.DV(R4),R4	;;; FIND THE DEVICE
   8853	027324	062705 	000010 			ADD	#E.FW,R5	;;; POINT TO THE CHARACTER
   8854	027330				10$:
   8855	027330	012701 	000014 			MOV	#T.HHDS+4,R1	;;; SET UP THE BUFFER SIZE
   8856	027334					.ENBT			;;; [4.1.1035] ENABLE TASK SWITCHING
	027334	013746 	177776 			 MOV	@#PS,-(SP)
	027340	042737 	000340 	177776 		 BIC	#PRI7,@#PS
   8857	027346					CALL	..ALOW		; ALLOCATE A BLOCK
	027346	004737 	046144'			JSR	PC,..ALOW
   8858	027352					.INHT			; [4.1.1035] ALLOW TASK SWITCHING
	027352	012637 	177776 			 MOV	(SP)+,@#PS
   8859	027356	010002 				MOV	R0,R2		;;; SAVE THE NODE ADDRESS
   8860	027360	005722 				TST	(R2)+		;;; MOVE OVER THE THREAD POINTER
   8861	027362	010122 				MOV	R1,(R2)+	;;; SET UP THE CHARACTER COUNT
   8862	027364	010012 				MOV	R0,@R2		;;; SET UP THE MEMORY ADDRESS
   8863	027366	062722 	000012 			ADD	#T.HHDS+2,(R2)+	;;; POINT TO THE BUFFER
   8864	027372	012722 	000001 			MOV	#1,(R2)+	;;; SET UP THE CURRENT COUNT POINTER
   8865	027376	005722 				TST	(R2)+
   8866	027400	010401 				MOV	R4,R1		;;; PICK UP THE DEVICE
   8867	027402	112503 				MOVB	(R5)+,R3
   8868	027404	112522 				MOVB	(R5)+,(R2)+	;;; STORE THE CHARCTER
   8869	027406	000303 				SWAB	R3		;;; SET UP LINE NUMBER FOR FDVNM
   8870	027410					CALL	FDVNM		;;; FIND THE DEVICE NUMBER
	027410	004737 	030302'			JSR	PC,FDVNM
   8871	027414	103410 				BCS	30$		;;; ILLEGAL LINE NUMBER
   8872	027416					CALL	@.DQPBA+Q.ST-20(R1) ;;; START TTY
	027416	004771 	010046'			JSR	PC,@.DQPBA+Q.ST-20(R1)
   8873	027422				20$:
   8874	027422	162716 	000002 			SUB	#2,@SP		;;; POINT TO THE NEXT CHARACTER
   8875	027426	001340 				BNE	10$		;;; DO AT LEAST ONE MORE
   8876	027430	005726 				TST	(SP)+		;;; REMOVE COUNT
   8877	027432	012600 				MOV	(SP)+,R0	;;; SET UP TO RETURN NODE
   8878	027434	000416 				BR	DEANOD		;;; ALL DONE -- RETURN THE NODE
   8879						;
   8880	027436				30$:
   8881	027436					CALL	..DECN		;;; DEALLOCATE BUFFER
	027436	004737 	046004'			JSR	PC,..DECN
   8882	027442	000767 				BR	20$		;;; AND TRY NEXT BLOCK
   8883						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 166
QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY

   8885						.SBTTL	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   8886
   8887					;
   8888					;	RETTOD -- RETURN TIME OF DAY -- FUNCTION 12
   8889					;
   8890
   8891	027444				RETTOD::
   8892	027444	062704 	000010 			ADD	#E.FW,R4	;;; MOVE OVER THE HEADER
   8893	027450	005724 				TST	(R4)+		;;; MOVE OVER THE VALID BIT AND CHECK IT
   8894	027452	001407 				BEQ	DEANOD		;;; TIME NOT VALID FORGET IT
   8895	027454	012703 	001140'			MOV	#.DATE,R3	;;; SET UP TO SET DATE
   8896	027460	012423 				MOV	(R4)+,(R3)+	;;; SET UP VALIDITY BITS
   8897	027462	012423 				MOV	(R4)+,(R3)+	;;; SET UP YEAR
   8898	027464	012423 				MOV	(R4)+,(R3)+	;;; SET UP DAY
   8899									;;; SET UP MONTH
   8900	027466	012423 				MOV	(R4)+,(R3)+	;;; SAVE DAYLIGHT SAVINGS TIME INDICATOR (1=DST)
   8901									;;; SET UP DAY OF WEEK
   8902	027470	012423 				MOV	(R4)+,(R3)+	;;; SET SECONDS SINCE MIDNIGHT
   8903	027472				DEANOD:
   8904	027472					CALL	..DECN		;;; DEALLOCATE BUFFER
	027472	004737 	046004'			JSR	PC,..DECN
   8905	027476				QPRDTF:
   8906	027476	000137 	025666'			JMP	QPRDTL		;;; GO TO NEXT FUNCTION
   8907						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 167
QUEUED PROTOCOL DRIVER -- FLUSH DEVICE OUTPUT QUEUE

   8909						.SBTTL	QUEUED PROTOCOL DRIVER -- FLUSH DEVICE OUTPUT QUEUE
   8910
   8911					;
   8912					;	FLDVOT -- FLUSH OUTPUT FOR THIS DEVICE -- FUNCTION 13
   8913					;
   8914
   8915	027502				FLDVOT::
   8916	027502					CALL	FDVNMM		;;; FIND THE DEVICE POINTER
	027502	004737 	030266'			JSR	PC,FDVNMM
   8917	027506	010146 				MOV	R1,-(SP)
   8918	027510					CALL	@.DQPBA+Q.SP-20(R1) ;;; STOP DEVICE
	027510	004771 	010050'			JSR	PC,@.DQPBA+Q.SP-20(R1)
   8919	027514	012601 				MOV	(SP)+,R1
   8920	027516	016100 	010042'			MOV	.DQPBA+Q.DA-20(R1),R0 ;;; FIND DEVICE TABLE BASE ADDRESS
   8921	027522	010205 				MOV	R2,R5		;;; FIND THIS DEVICE ADDRESS
   8922	027524	016403 	000006 			MOV	E.DV(R4),R3	;;; FIND DEVICE NUMBER
   8923	027530					CALL	..SACK		;;; SEND ACKNOWLEDGEMENT
	027530	004737 	046630'			JSR	PC,..SACK
   8924	027534	010400 				MOV	R4,R0		;;; SET UP TO RETURN NODE
   8925	027536	000755 				BR	DEANOD		;;; DEALLOCATE NODE
   8926						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 168
QUEUED PROTOCOL DRIVER -- RECIEVE KLINIK PARAMETERS

   8928						.SBTTL	QUEUED PROTOCOL DRIVER -- RECIEVE KLINIK PARAMETERS
   8929
   8930					;
   8931					;	RCVKLP -- RECIEVE KLINIK PARAMETERS -- FUNCTION 33
   8932					;
   8933
   8934	027540				RCVKLP::
   8935	027540	062704 	000012 			ADD	#E.FW+2,R4	;;; GET OVER THE INDIRECT HEADER
   8936	027544	012402 				MOV	(R4)+,R2	;;; BYTE COUNT TO R2
   8937	027546	001751 				BEQ	DEANOD		;;; QUIT IF NULL
   8938	027550	006202 				ASR	R2		;;; MAKE A WORD COUNT
   8939	027552	012703 	001210'			MOV	#.KLNFT,R3	;;; BUFFER POINTER TO R3
   8940	027556	042737 	010000 	001012'		BIC	#EF.RKP,.COMEF+2 ;;; CLEAR THE FLAG
   8941	027564				10$:
   8942	027564	012423 				MOV	(R4)+,(R3)+	;;; LOAD THE PARAMETERS
   8943	027566	077202 				SOB	R2,10$		;;; LOOP TILL DONE
   8944	027570	052737 	010000 	001012'		BIS	#EF.RKP,.COMEF+2 ;;; SET THE EVENT FLAG
   8945	027576	000735 				BR	DEANOD		;;; DEQUEUE THIS NODE AND EXIT
   8946						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 169
QUEUED PROTOCOL DRIVER -- SET/CLEAR HOST DEBUG MODE

   8948						.SBTTL	QUEUED PROTOCOL DRIVER -- SET/CLEAR HOST DEBUG MODE
   8949
   8950					;
   8951					;	SETDEB -- SET HOST DEBUG MODE (36)
   8952					;	CLRDEB -- CLEAR HOST DEBUG MODE (37)
   8953					;
   8954
   8955	027600				SETDEB::
   8956	027600	112737 	177777 	013265'		MOVB	#-1,SNDMSG+1	;;; [5.1127] SET HOST DEBUG MODE
   8957	027606	000731 				BR	DEANOD		;;; [5.1127] AND RETURN
   8958
   8959	027610				CLRDEB::
   8960	027610	105037 	013265'			CLRB	SNDMSG+1	;;; [5.1127] CLEAR HOST DEBUG MODE
   8961	027614	000726 				BR	DEANOD		;;; [5.1127] AND RETURN
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 170
QUEUED PROTOCOL DRIVER -- SENDALL

   8963						.SBTTL	QUEUED PROTOCOL DRIVER -- SENDALL
   8964
   8965					;
   8966					;	SNDALL -- SENDALL SERVICE -- FUNCTION 14
   8967					;
   8968
   8969	027616				SNDALL::
   8970	027616					CALL	.SNDAL		;;; DO SENDALL
	027616	004737 	027624'			JSR	PC,.SNDAL
   8971	027622	000725 				BR	QPRDTF		;;; AND RETURN
   8972						;
   8973					;
   8974					;	.SNDAL -- SUBROUTINE TO DO A SENDALL
   8975					;
   8976					;	CALLING SEQUENCE
   8977					;
   8978					;	R0 & R4 -- POINTER TO BUFFER TO BE SENT (QUEUED PROTOCOL FORMAT)
   8979					;
   8980					;	REGISTERS ALTERED
   8981					;
   8982					;	R0,R1,R2,R3,R5
   8983					;
   8984					;	THE SENDALL MESSAGES AND COUNTS ARE MAINTINED IN PARALLEL RING BUFFERS
   8985					;	IN ".SNDBF" AND ".SNDCN" (Q.V.). ".SNDLP" POINTS THE THE NEXT FREE LOGICAL
   8986					;	NODE IN THE SENDALL RING. EACH ENTRY IN THE DATA LINE SCANNER TABLE HAS
   8987					;	AS SENDALL INDEX BYTE IN "STSW1" ("TT.SND") WHICH POINTS TO THE LAST NODE
   8988					;	PROCESSED SENDALL RING. THE QUEUED PROTOCOL BUFFER IS DEALLOCATEED BY THE
   8989					;	TERMINAL DRIVER WHEN THE LAST TERMINAL HAS PROCESSED THAT NODE.
   8990					;
   8991					;	A SENDALL IS DEEMED TO BE PENDING FOR A LINE IF ITS SENDALL INDEX IS
   8992					;	DIFFERENT FROM THAT IN ".SNDLP". THE SENDALL WILL BE INITIATED AT "..STTY"
   8993					;	IF THE LINE IS IDLE, OR AT "STTYDN" IF THE LINE HAS ACTIVE OUTPUT.
   8994					;
   8995					;	IN ORDER TO PREVENT PROBLEMS ASSOCIATED WITH LARGE SENDALLS (A LARGE
   8996					;	SENDALL IS DEFINED AS ONE WHICH WILL FILL THE SENDALL RING), THE RING IS
   8997					;	ACTUALLY MANAGED AS A CIRCULAR LIST, WITH A GUARANTEED NULL ENTRY IN THE
   8998					;	LIST AT ALL TIMES. SHOULD A REQUEST BE MADE TO FILL AN EMPTY NODE IN THE
   8999					;	RING WITHOUT THE FOLLOWING NODE BEING EMPTY, THAT MODE WILL NOT BE FILLED
   9000					;	UNTIL THE FOLLOWING NODE BECOMES EMPTY (NULL). IN EFFECT, THE SENDALL
   9001					;	PROCESS IS DRIVEN BY THE SLOWEST TERMINAL(S) IN THE DATA LINE SCANNER.
   9002					;
   9003					;	TCO 4.2246 REMOVED SEVERAL INHIBIT AND ENABLE MACROS FROM THIS ROUTINE
   9004					;	014 -- REMOVED WSIG$S IF NO SPACE IN RING BUFFER
   9005
   9006	027624				.SNDAL::
   9007	027624	010004 				MOV	R0,R4		;;; COPY SENDALL POINTER
   9008	027626	022020 				CMP	(R0)+,(R0)+	;;; GET OVER LISTHEAD
   9009	027630	010010 				MOV	R0,(R0)		;;; SET UP CURRENT ADDRESS POINTER
   9010	027632	062720 	000006 			ADD	#6,(R0)+	;;; CORRECT BUFFER POINTER
   9011	027636	116010 	000003 			MOVB	3(R0),(R0)	;;; MOVE THE BYTE COUNT
   9012	027642				10$:
   9013	027642	013701 	002612'			MOV	.SNDLP,R1	;;; FIND THE CURRENT POINTER FOR SENDALL
   9014	027646	010102 				MOV	R1,R2		;;; COPY IT TO R2
   9015	027650	006301 				ASL	R1		;;; MAKE RING WORD INDEX
   9016	027652	005202 				INC	R2		;;; UPDATE THE POINTER TO NEXT NODE
   9017	027654	042702 	177774 			BIC	#^C3,R2		;;; MODULO 4
   9018	027660	010237 	002612'			MOV	R2,.SNDLP	;;; SET THE POINTER TO THE NEXT RING BUFFER
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 170-1
QUEUED PROTOCOL DRIVER -- SENDALL

   9019	027664	013761 	010140'	002624'		MOV	.DQDH0+Q.DZ,.SNDCN(R1) ;;; SET UP THE TTY COUNT
   9020					;	BEQ	15$		;;; GO ON IF NO DH-11'S
   9021	027672	010461 	002614'			MOV	R4,.SNDBF(R1)	;;; SET PACKET IN THE CURRENT RING BUFFER
   9022	027676				15$:
   9023	027676	012702 	003004'			MOV	#DLTBL,R2	;;; DO THE DL-11W AND DL-11E'S
   9024	027702				20$:
   9025	027702	020237 	002644'			CMP	R2,KLNPTR	;;; IS THIS THE KLINIK LINE??
   9026	027706	001003 				BNE	25$		;;; NO -- GO ON
   9027	027710	105737 	001234'			TSTB	.KLNSW+0	;;; YES -- IS IT ACTIVE AS USER CONSOLE??
   9028	027714	002015 				BGE	30$		;;; NO -- FORGET IT
   9029	027716				25$:
   9030	027716	005762 	000002 			TST	TTYEXP(R2)	;;; IS IT HERE??
   9031	027722	001412 				BEQ	30$		;;; NO -- FORGET IT
   9032	027724	032762 	000400 	000006 		BIT	#TT.NSA,STSW1(R2) ;;; YES -- SUPPRESS SENDALLS??
   9033	027732	001006 				BNE	30$		;;; YES -- SO DO IT
   9034	027734	010246 				MOV	R2,-(SP)	;;; SAVE R2 FROM "COPBUF"
   9035	027736					CALL	COPBUF		;;; COPY THE BUFFER
	027736	004737 	030130'			JSR	PC,COPBUF
   9036	027742	012602 				MOV	(SP)+,R2	;;; RESTORE R2
   9037	027744					CALL	..STTY		;;; START THE LINE UP
	027744	004737 	046164'			JSR	PC,..STTY
   9038	027750				30$:
   9039	027750	062702 	000010 			ADD	#^D8,R2		;;; POINT TO THE NEXT LINE
   9040	027754	022702 	003054'			CMP	#DHTBL,R2	;;; IS IT A DL-11??
   9041	027760	101350 				BHI	20$		;;; YES -- DO THIS LINE
   9042	027762	010400 				MOV	R4,R0		;;; NO -- SET UP POINTER TO TTY BUFFER FOR "..STTY"
   9043	027764	010037 	002634'			MOV	R0,.CRSND	;;; SET THAT THIS IS CURRENT SENDALL
   9044	027770				35$:
   9045	027770	032762 	000410 	000006 		BIT	#TT.NSA!TT.ABW,STSW1(R2) ;;; IGNORE SENDALL OR AUTO-BAUD WAIT??
   9046	027776	001033 				BNE	70$		;;; YES -- DON'T START THIS LINE BUT ACCOUNT FOR IT
   9047	030000	032762 	000002 	000006 		BIT	#TT.CTY,STSW1(R2) ;;; NO -- IS THIS A CTY??
   9048	030006	001403 				BEQ	45$		;;; NO -- GO ON
   9049	030010	005737 	002640'			TST	.TTP11		;;; YES -- IN -11 I/O WAIT??
   9050	030014	001014 				BNE	50$		;;; YES -- DON'T RESTART
   9051	030016				45$:
   9052	030016	032762 	000001 	000006 		BIT	#TT.OUT,STSW1(R2) ;;; ANY KIND OF OUTPUT PENDING??
   9053	030024	001010 				BNE	50$		;;; YES -- DON'T RESTART
   9054	030026	005762 	000002 			TST	TTYEXP(R2)	;;; [5.1004] DOES THE DEVICE EXIST??
   9055	030032	001415 				BEQ	70$		;;; [5.1004] NO -- ACCOUNT FOR SENDALL
   9056	030034					CALL	..STTY		;;; YES -- START SENDALL FOR THIS TTY
	030034	004737 	046164'			JSR	PC,..STTY
   9057	030040	052762 	001000 	000006 		BIS	#TT.SIP,STSW1(R2) ;;; MARK SENDALL IN PROGRESS
   9058	030046				50$:
   9059	030046	062702 	000010 			ADD	#8.,R2		;;; LOOK AT THE NEXT DH-11
   9060	030052	022702 	005054'			CMP	#TTYEND,R2	;;; [5.1004] DONE ALL DH-11'S??
   9061	030056	101344 				BHI	35$		;;; [5.1004] NO -- DO NEXT LINE
   9062	030060				55$:
   9063	030060	005037 	002634'			CLR	.CRSND		;;; YES -- CLEAR CURRENT SENDALL POINTER
   9067	030064					RETURN			;;; RETURN TO CALLER
	030064	000207 				RTS	PC
   9068						;
   9095
   9096	030066				70$:				;;; HERE TO PRETEND WE DID SENDALL ON LINE
   9097	030066	013701 	002612'			MOV	.SNDLP,R1	;;; GET POINTER TO CURRENT SENDALL + 1
   9098	030072	005301 				DEC	R1		;;; MAKE IT POINTER TO CURRENT
   9099	030074	042701 	177774 			BIC	#177774,R1	;;; WE ONLY WANT TWO BITS
   9100	030100	006301 				ASL	R1		;;; MAKE IT INTO A WORD INDEX
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 170-2
QUEUED PROTOCOL DRIVER -- SENDALL

   9101	030102	005361 	002624'			DEC	.SNDCN(R1)	;;; DECREMENT COUNT OF SENDALLS SENT
   9102	030106	003004 				BGT	80$		;;; IF SOME LEFT, DON'T FREE MESSAGE
   9103						;
   9104	030110				75$:
   9105	030110	005061 	002614'			CLR	.SNDBF(R1)	;;; INDICATE NONEXISTANT
   9106	030114					CALL	..DECN		;;; DEALLOCATE THE NODE
	030114	004737 	046004'			JSR	PC,..DECN
   9107	030120				80$:				;;; HERE TO FINISH DUMMY SENDALL
   9108	030120	062762 	040000 	000006 		ADD	#TT.SNI,STSW1(R2);;; BUMP INDEX TO NEXT SENDALL
   9109	030126	000747 				BR	50$		;;; AND DO THE NEXT LINE
   9110						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 171
QUEUED PROTOCOL DRIVER -- COPY BUFFER

   9112						.SBTTL	QUEUED PROTOCOL DRIVER -- COPY BUFFER
   9113
   9114					;
   9115					;	COPBUF -- ROUTINE TO COPY A TTY BUFFER AND CORRECT THE
   9116					;	ADDRESS OF THE BUFFER IN THE CURRENT ADDRESS POINTER
   9117					;
   9118					;	CALLING SEQUENCE:
   9119					;
   9120					;	R4 -- ADDRESS OF BUFFER TO BE COPIED
   9121					;
   9122					;	CALL	COPBUF
   9123					;
   9124					;	EXIT CONDITIONS:
   9125					;
   9126					;	R0 -- NEW BUFFER ADDRESS
   9127					;
   9128					;	REGISTERS ALTERED:
   9129					;
   9130					;	R1,R2,R5
   9131					;
   9132
   9133	030130				COPBUF::
   9134	030130	016401 	000002 			MOV	2(R4),R1	;;; SET UP THE BUFFER SIZE
   9135	030134					.ENBT			;;; [4.1.1035] ENABLE TASK SWITCHING
	030134	013746 	177776 			 MOV	@#PS,-(SP)
	030140	042737 	000340 	177776 		 BIC	#PRI7,@#PS
   9136	030146					CALL	..ALOW		; ALLOCATE A BUFFER
	030146	004737 	046144'			JSR	PC,..ALOW
   9137	030152					.INHT			; [4.1.1035] DISABLE TASK SWITCHING
	030152	012637 	177776 			 MOV	(SP)+,@#PS
   9138	030156	010405 				MOV	R4,R5		;;; SAVE R5 BUFFER POINTER
   9139	030160	010002 				MOV	R0,R2		;;; SAVE TTY BUFFER POINTER
   9140	030162	006201 				ASR	R1		;;; MAKE WORD INDEX
   9141	030164				10$:
   9142	030164	012522 				MOV	(R5)+,(R2)+	;;; COPY THE BUFFER
   9143	030166	077102 				SOB	R1,10$		;;; COPY UNTIL FINISHED
   9144	030170	010060 	000004 			MOV	R0,T.HCAD(R0)	;;; SET THE CURRENT ADDRESS
   9145	030174	062760 	000012 	000004 		ADD	#T.HHDS+2,T.HCAD(R0) ;;; CORRECT IT TO POINT TO BUFFER
   9146	030202					RETURN
	030202	000207 				RTS	PC
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 172
QUEUED PROTOCOL DRIVER -- MAP DH-11 TO DM-11

   9156						.SBTTL	QUEUED PROTOCOL DRIVER -- MAP DH-11 TO DM-11
   9157
   9158					;+
   9159					; FNDDM -- LOCAL SUBROUTINE TO MAP A DH-11 LINE TO A DM-11/BB
   9160					;
   9161					; INPUTS:
   9162					;
   9163					;	R5 -- POINTS TO DATA LINE SCANNER ENTRY FOR DH-11 LINE
   9164					;
   9165					; OUTPUTS:
   9166					;
   9167					;	R4 -- POINTS TO ASSOCIATED DM-11/BB CSR
   9168					;-
   9169
   9170	030204				FNDDM:
   9171	030204	010546 				MOV	R5,-(SP)	; [5.1004] SAVE R5
   9172	030206	012704 	002742'			MOV	#DMTBL,R4	; [5.1004] POINT TO THE DM-11/BB TABLE
   9173	030212	162705 	003054'			SUB	#DHTBL,R5	; [5.1004] GET OUR DISPLACMENT INTO "DHTBL"
   9174	030216				10$:
   9175	030216	162705 	000200 			SUB	#200,R5		; [5.1004] HAVE WE FOUND OUR DH-11??
   9176	030222	100402 				BMI	20$		; [5.1004] YES -- EXIT
   9177	030224	032424 				BIT	(R4)+,(R4)+	; [5.1004] NO -- TRY NEXT DM-11/BB
   9178	030226	000773 				BR	10$		; [5.1004] SO
   9179						;
   9180	030230				20$:
   9181	030230	012605 				MOV	(SP)+,R5	; [5.1004] RESTORE R5
   9182	030232	011404 				MOV	(R4),R4		; [5.1004] GET I/O PAGE ADDRESS OF DM-11/BB
   9183	030234					RETURN			; [5.1004] TO CALLER
	030234	000207 				RTS	PC
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 173
QUEUED PROTOCOL DRIVER -- FIND LINE SPEED

   9185						.SBTTL	QUEUED PROTOCOL DRIVER -- FIND LINE SPEED
   9186					;+
   9187					; FNDSPD -- FIND LINE SPEED
   9188					;
   9189					; THIS SUBROUTINE WILL MAP THE DECIMAL LINE SPEED IN R2 TO A DH-11 LINE SPEED MASK
   9190					;
   9191					; INPUTS:
   9192					;
   9193					;	R2 -- DECIMAL LINE SPEED
   9194					;
   9195					; OUTPUTS:
   9196					;
   9197					;	R3 -- DH-11 LINE SPEED MASK
   9198					;
   9199					;	IF A MATCH CANNOT BE FOUND, THE NODE IS DEALLOCATED AND CONTROL RETURNED
   9200					;	TO THE NEXT HIGHER LEVEL.
   9201					;-
   9202
   9203	030236				FNDSPD:
   9204	030236	012705 	025244'			MOV	#SPDTBL,R5	; FIND THE ADDRESS OF THE SPEED TABLE
   9205	030242	012701 	000020 			MOV	#SPDTBZ,R1	; SET UP THE TABLE SIZE
   9206	030246	005003 				CLR	R3		; SET UP COUNTER
   9207	030250				10$:
   9208	030250	020225 				CMP	R2,(R5)+	; COMPARE AGAINST TABLE
   9209	030252	001403 				BEQ	20$		; FOUND CORRECT ENTRY -- R3 IS CORRECT WHEN FOUND
   9210	030254	005203 				INC	R3		; UPDATE R3
   9211	030256	077104 				SOB	R1,10$		; TRY NEXT ENTRY
   9212	030260	000455 				BR	FDVNMF		; CAN'T FIND SPEED -- DEALLOCATE AND EXIT
   9213						;
   9214	030262				20$:
   9215	030262	000303 				SWAB	R3		; SET IN HIGH BYTE
   9216	030264					RETURN			; RETURN TO CALLER
	030264	000207 				RTS	PC
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 174
QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME

   9218						.SBTTL	QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME
   9219
   9220					;+
   9221					; FDVNMM -- FIND DEVICE NAME
   9222					;
   9223					; THIS SUBROUTINE WILL RETURN A POINTER TO A DEVICE TABLE ENTRY IN R2 IF THE
   9224					; DEVICE EXISTS IN THE SYSTEM.
   9225					;
   9226					; INPUTS:
   9227					;
   9228					;	R0 -- POINTS TO THE TO11Q PACKET
   9229					;	R4 -- POINTS TO THE TO11Q PACKET
   9230					;
   9231					; OUTPUTS:
   9232					;
   9233					;	R0 -- POINTS TO THE TO11Q PACKET
   9234					;	R1 -- POINTS TO THE DEVICE (PUD) TABLE FOR THIS DEVICE
   9235					;	R2 -- POINTS TO THE DRIVER TABLE ENTRY FOR THE DEVICE
   9236					;	R4 -- POINTS TO THE TO11Q PACKET
   9237					;
   9238					; NOTE:
   9239					;
   9240					; 	IF THE DEVICE DOES NOT EXIST, "FDVNMM" ACKNOWLEGES THE PACKET
   9241					;	AND IMMEDIATELY DEQUEUES IT WITHOUT RETURNING TO THE CALLING ROUTINE
   9242					;-
   9243
   9244						.ENABL	LSB
   9245
   9246	030266				FDVNMM:
   9247	030266	016001 	000006 			MOV	E.DV(R0),R1	;FIND DEVICE
   9248	030272	016003 	000010 			MOV	E.FW(R0),R3	;FIND FIRST WORD
   9249	030276	005046 				CLR	-(SP)		;SAVE ENTRY FLAG
   9250	030300	000402 				BR	10$
   9251						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 175
QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME

   9253						.SBTTL	QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME
   9254
   9255					;+
   9256					; FDVNM -- FIND DEVICE NAME
   9257					;
   9258					; THIS ROUTINE PERFORMS EXACTLY THE SAME THE SAME FUNCTION AS "FDVNMM",
   9259					; ABOVE, EXCEPT THAT IT WILL RETURN WITH CC-C SET IF THE DEVICE DOES NOT EXIST.
   9260					;
   9261					; INPUTS:
   9262					;
   9263					;	R0 -- POINTS TO THE TO11Q PACKET
   9264					;	R1 -- CONTAINS THE DEVICE CODE FOR THE DEVICE
   9265					;	R3 -- CONTAINS THE FIRST WORD FROM THE T011Q PACKET
   9266					;	R4 -- POINTS TO THE TO11Q PACKET
   9267					;
   9268					; OUTPUTS:
   9269					;
   9270					;	R0 -- POINTS TO THE TO11Q PACKET
   9271					;	R1 -- CONTAINS THE DEVICE (PUD) OFFSET + 20 FOR THIS DEVICE
   9272					;	R2 -- POINTS TO THE DRIVER TABLE ENTRY FOR THE DEVICE
   9273					;	R4 -- POINTS TO THE TO11Q PACKET
   9274					;
   9275					; NOTE:
   9276					;
   9277					; 	IF THE DEVICE DOES NOT EXIST, THE T011Q PACKET IS ACKNOWLEDGED
   9278					;	AND CC-C IS SET FOR THE RETURN.
   9279					;-
   9280
   9281	030302				FDVNM:
   9282	030302	012746 	177777 			MOV	#-1,-(SP)	; SAVE ENTRY FLAG
   9283	030306				10$:
   9284	030306	010546 				MOV	R5,-(SP)	; SAVE REGISTERS
   9285	030310	010446 				MOV	R4,-(SP)
   9286	030312	010146 				MOV	R1,-(SP)	; SAVE DEVICE
   9287	030314	006301 				ASL	R1		; FIND THE DEVICE ADDRESS
   9288	030316	006301 				ASL	R1
   9289	030320	006301 				ASL	R1
   9290	030322	006301 				ASL	R1
   9291	030324	116105 	010044'			MOVB	.DQPBA-20+Q.TS(R1),R5 ; FIND THE SIZE OF A TABLE ENTRY
   9292	030330	016102 	010042'			MOV	.DQPBA-20+Q.DA(R1),R2 ; FIND THE TABLE HEAD ADDRESS
   9293	030334	105003 				CLRB	R3		; FIND THE LINE NUMBER
   9294	030336	000303 				SWAB	R3		; PUT IT IN LOWER ORDER OF BYTE
   9295	030340	010346 				MOV	R3,-(SP)	; SAVE LINE NUMBER
   9296	030342	126103 	010060'			CMPB	.DQPBA-20+Q.DZ(R1),R3 ; IS THIS A LEGAL NUMBER?
   9297	030346	101425 				BLOS	80$		; NO -- IGNORE IT -- NOTE THIS SETS C BIT
   9298	030350				20$:
   9299	030350	005303 				DEC	R3		; ATTEMPT TO FIND THE ADDRESS OF THE HEAD OF THE LIST
   9300	030352	100402 				BMI	30$		; FOUND IT -- QUIT -- NOTE THIS SHOULD CLEAR C
   9301	030354	060502 				ADD	R5,R2		; MULTIPLY BY TABLE ENTRY SIZE
   9302	030356	000774 				BR	20$		; AND TRY AGAIN
   9303						;
   9304	030360				30$:
   9305	030360	026627 	000002 	000004 		CMP	2(SP),#D.CDLS	; [5.1004] TERMINAL DEVICE??
   9306	030366	101003 				BHI	40$		; [5.1004] NO -- GO ON - (NOTE: CC-C CLEAR)
   9307	030370	005762 	000002 			TST	TTYEXP(R2)	; [5.1004] YES -- DOES THE TERMINAL EXIST??
   9308	030374	001412 				BEQ	80$		; [5.1004] NO -- SAY THAT IT DOES NOT
   9309	030376				40$:
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 175-1
QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME

   9310	030376	032626 				BIT	(SP)+,(SP)+	; [5.1004] YES -- CLEAR STACK
   9311	030400				50$:
   9312	030400	012604 				MOV	(SP)+,R4
   9313	030402	012605 				MOV	(SP)+,R5	; RESTORE REGISTERS
   9314	030404	005226 				INC	(SP)+		; REMOVE THE ENTRY FLAG
   9315	030406	103001 				BCC	60$		; [5.1004] JUST EXIT IF CC-C IS CLEAR
   9316	030410	001001 				BNE	70$		; [5.1004] DEQUEUE IMMEDIATELY IF WE MUST
   9317	030412				60$:
   9318	030412					RETURN			; RETURN TO CALLER
	030412	000207 				RTS	PC
   9319					;
   9320					; HERE TO SIMPLY DEALLOCATE TO11Q PACKET AND RETURN TO TOP OF TASK
   9321					;
   9322	030414				FDVNMF:
   9323	030414				70$:
   9324	030414	005726 				TST	(SP)+		; FLUSH RETURN
   9325	030416	000137 	027472'			JMP	DEANOD		; DEALLOCATE AND START NEXT PACKET
   9326						;
   9327					;
   9328					; HERE TO ACKNOWLEDGE NON-EXISTENT DEVICE
   9329					;
   9330	030422				80$:
   9331	030422	012604 				MOV	(SP)+,R4	; SET LINE NUMBER
   9332	030424	012603 				MOV	(SP)+,R3	; SET DEVICE NAME
   9333	030426	012701 	000017 			MOV	#BC.SAK,R1	; ACKNOWLEDGE PACKET
   9334	030432					CALL	..STFC		; START FUNCTION
	030432	004737 	046714'			JSR	PC,..STFC
   9335	030436	000261 				SEC			; SET ERROR
   9336	030440	000757 				BR	50$		; AND RETURN
   9337						;
   9338
   9339						.DSABL	LSB
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO M1113  03-APR-86 18:57  PAGE 176
QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME

   9341
   9342						.TITLE	DTEDRV -- DTE-20 DRIVER FOR RSX-20F
   9343						.SBTTL	DTE-20 DRIVER -- COPYRIGHT STATEMENT
   9344	030442					IDENT$	14,31
						.IDENT	/014310/
   9345
   9346					;
   9347					;              	              COPYRIGHT (C) 1975, 1984, 1985 BY
   9348					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   9349					;			ALL RIGHTS RESERVED.
   9350					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   9351					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   9352					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   9353					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   9354					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   9355					;
   9356					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   9357					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   9358					;       CORPORATION.
   9359					;
   9360					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   9361					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   9362					;
   9363					;	MODULE:		DTE-20 DRIVER FOR RSX-20F
   9364					;
   9365					;	VERSION:	14-31
   9366					;
   9367					;	AUTHOR:		ROLAND BELANGER
   9368					;
   9369					;	DATE:		15-MAR-80
   9370					;
   9371					;	THIS MODULE CONTAINS:
   9372					;
   9373					;		1) DTE-20 INTERRUPT SERVICE
   9374					;		2) DEVICE DEPENDENT DTE-20 SERVICE
   9375					;		3) DEVICE DEPENDENT QUEUED PROTOCOL SERVICE
   9376					;
   9377					; THIS MODULE WAS SPLIT OUT OF "QPRDTE.MAC" AND REWRITTEN AS A PART OF
   9378					; TCO 4.1.1121
   9379					;
   9380					; TCO 4.1.1137	05-APR-80	R. BELANGER	LIMIT LENGTH OF TO-11 QUEUE
   9381					; TCO 5.1041	18-MAY-80	S. LEAPLINE	CHECK FREE POOL BYTES LEFT
   9382
   9383						.MCALL	CALL,RETURN,.CRASH,$DEF
   9384
   9385	030442					$DEF
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 177
DTE-20 DRIVER -- DTE-20 INTERRUPT HEAD

   9387						.SBTTL	DTE-20 DRIVER -- DTE-20 INTERRUPT HEAD
   9388
   9389					;+
   9390					; .DTINT -- DTE-20 INTERRUPT HEAD
   9391					;
   9392					; THIS IS THE HEAD OF THE DTE-20 INTERRUPT SERVICE.  ALL DTE-20 INTERRUPTS ARE
   9393					; VECTORED HERE, AND ALL DTE-20 INTERRUPTS ARE DISMISSED FROM THIS ROUTINE.
   9394					;
   9395					; SINCE A DTE-20 CAN HAVE MULTIPLE INTERRUPTS PENDING, AN ATTEMPT TO DISMISS
   9396					; ANY GIVEN INTERRUPT FORCES A SCAN FOR ALL OTHER POSSIBLE INTERRUPTS BEFORE
   9397					; THE DISMISSAL IS GRANTED.
   9398					;
   9399					; INTERRUPTS SERVICED HERE ARE:
   9400					;
   9401					;	TO-10 TRANSFER DONE
   9402					;	TO-11 TRANSFER DONE
   9403					;	DOORBELL
   9404					;
   9405					; ERRORS HANDLED HERE ARE:
   9406					;
   9407					;	TO-10 DONE ERROR TERMINATION (TET)
   9408					;	PDP-11 MEMORY PARITY ERROR ON BYTE TRANSFER (TET)
   9409					;	TO-11 DONE ERROR TERMINATION (ETE)
   9410					;
   9411					; INPUTS:
   9412					;
   9413					;	NONE
   9414					;
   9415					; OUTPUTS:
   9416					;
   9417					;	NO REGISTERS ALTERED ON DISMISSAL
   9418					;
   9419					;	R0 -- POINTS TO DTE-20 ON SERVICE DISPATCH
   9420					;	R1 -- POINTS TO DTE-20 STATUS REGISTER ON SERVICE DISPATCH
   9421					;	R3 -- POINTS TO "PROTBL" ON SERVICE DISPATCH
   9422					;-
   9423
   9424
   9425	030442				.DTINT::
   9426	030442	010046 				MOV	R0,-(SP)	;;; SAVE REGISTERS
   9427	030444	010146 				MOV	R1,-(SP)
   9428	030446	010246 				MOV	R2,-(SP)
   9429	030450	010346 				MOV	R3,-(SP)
   9430	030452	010446 				MOV	R4,-(SP)
   9431	030454	010546 				MOV	R5,-(SP)
   9432	030456				INTLPS:
   9433	030456	013700 	001366'			MOV	.PRDTE,R0	;;; BASE ADDRESS OF PRIVILEGED DTE-20
   9434	030462	013703 	001362'			MOV	.PRADR,R3	;;; POINTER TO OUR PROCESSOR TABLE
   9435	030466	013701 	001364'			MOV	.PRSTA,R1	;;; COPY INTERRUPT FLAGS TO R1
   9436	030472	032711 	121000 			BIT	#TO10DN!TO10ER!MPE11,(R1) ;;; TO-10 DONE OR ERROR??
   9437	030476	100432 				BMI	.TENDN		;;; TO-10 DONE
   9438	030500	001403 				BEQ	10$		;;; NO ERRORS -- GO ON
   9439	030502					.CRASH	TET		;;; ERROR -- DIE!
	030502	000004 				IOT
	030504	   124 	   105 	   124 		.ASCIZ	/TET/
	030507	   000
   9440						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 177-1
DTE-20 DRIVER -- DTE-20 INTERRUPT HEAD

   9441	030510				10$:
   9442	030510	132711 	000202 			BITB	#TO11DN!TO11ER,(R1) ;;; TO-11 DONE OR ERROR??
   9443	030514	100556 				BMI	.ELEDN		;;; TO-11 DONE
   9444	030516	001403 				BEQ	20$		;;; NO ERRORS -- GO ON
   9445	030520					.CRASH	ETE		;;; ERROR -- DIE AGAIN!
	030520	000004 				IOT
	030522	   105 	   124 	   105 		.ASCIZ	/ETE/
	030525	   000
   9446						;
   9447	030526				20$:
   9448	030526	032711 	004000 			BIT	#TO11DB,(R1)	;;; HOW ABOUT A DOORBELL??
   9449	030532	001404 				BEQ	DTEXIT		;;; NO -- DISMISS INTERRUPT
   9450	030534	005237 	001370'			INC	.PRDCT		;;; YES -- COUNT THE DOORBELL
   9451	030540	000137 	031356'			JMP	.DRBEL		;;; AND SERVICE IT
   9452						;
   9453	030544				DTEXIT:
   9454	030544	012605 				MOV	(SP)+,R5	;;; RESTORE THE REGISTERS
   9455	030546	012604 				MOV	(SP)+,R4
   9456	030550	012603 				MOV	(SP)+,R3
   9457	030552	012602 				MOV	(SP)+,R2
   9458	030554	012601 				MOV	(SP)+,R1
   9459	030556	012600 				MOV	(SP)+,R0
   9460	030560	000137 	015062'			JMP	..INTX		;;; COMMON INTERRUPT EXIT
   9461						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 178
DTE-20 DRIVER -- TO-10 DONE SERVICE

   9463						.SBTTL	DTE-20 DRIVER -- TO-10 DONE SERVICE
   9464
   9465					;+
   9466					; .TENDN -- TO-10 DONE INTERRUPT SERVICE
   9467					;
   9468					; THIS IS THE TO-10 DONE INTERRUPT SERVICE.  FUNCTIONS PROVIDED HERE ARE:
   9469					;
   9470					;	TO-10 TRANSFER END CHECKS
   9471					;	TO-10 TRANSFER TERMINATION PROCESSING
   9472					;	TO-10 QUEUE NODE DELETION AND DEALLOCATION
   9473					;	TO-10 TRANSFER INITIATION (".STTNQ")
   9474					;	TO-10 INDIRECT TRANSFER CONTINUATION
   9475					;
   9476					; ERRORS HANDLED HERE ARE:
   9477					;
   9478					;	TO-10 TRANSFER END CHECK FAILURE (DTF)
   9479					;
   9480					; INPUTS:
   9481					;
   9482					;	R0 -- POINTS TO DTE-20
   9483					;	R1 -- POINTS TO DTE-20 STATUS REGISTER
   9484					;	R3 -- POINTS TO PROCESSOR TABLE ENTRY
   9485					;
   9486					; OUTPUTS:
   9487					;
   9488					;	NONE -- REGISTERS ARE NOT NECESSARILY PRESERVED
   9489					;-
   9490
   9491	030564				.TENDN::
   9492	030564	012711 	040000 			MOV	#DON10C,(R1)	;;; CLEAR THE TO-10 DONE FLAG
   9493	030570	013704 	001322'			MOV	TO10SZ,R4	;;; GET THE TRANSFER SIZE
   9494	030574	063704 	001324'			ADD	TO10AS,R4	;;; ADD THE STARTING ADDRESS TO IT
   9495	030600	020460 	000020 			CMP	R4,T10AD(R0)	;;; DID IT FINISH WHERE WE EXPECTED IT TO??
   9496	030604	001403 				BEQ	10$		;;; YES -- GO ON
   9497	030606					.CRASH	DTF		;;; NO -- DIE!
	030606	000004 				IOT
	030610	   104 	   124 	   106 		.ASCIZ	/DTF/
	030613	   000
   9498						;
   9499					;
   9500					; HERE TO FINISH UP A TO-10 TRANSFER
   9501					;
   9502	030614				10$:
   9503	030614	012737 	000001 	001324'		MOV	#1,TO10AS	;;; SAY WE EXPECT NO TRANSFER
   9504	030622	013704 	001334'			MOV	TO10Q,R4	;;; POINT TO THE TO-10 QUEUE
   9505	030626	005764 	000012 			TST	12(R4)		;;; CHECK TRANSFER TYPE
   9506	030632	100432 				BMI	STIND2		;;; INDIRECT HEADER -- START SECOND PART
   9507	030634	001010 				BNE	20$		;;; DIRECT FUNCTION -- FINISH IT UP
   9508					;
   9509					; HERE TO FINISH A TO-10 INDIRECT TRANSFER
   9510					;
   9511	030636	053777 	001274'	150432 		BIS	DTEMSK,@DTEADR	;;; SET ANY EVENT FLAGS
   9512	030644					CALL	..DSEV		;;; AND DECLARE A SIGNIFICANT EVENT
	030644	004737 	045264'			JSR	PC,..DSEV
   9513	030650	042737 	000006 	001330'		BIC	#TOIP!TOBM,STSTT+2 ;;; CLEAR INDIRECT IN PROGRESS
   9514					;
   9515					; HERE TO FINISH A DIRECT OR INDIRECT TRANSFER
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 178-1
DTE-20 DRIVER -- TO-10 DONE SERVICE

   9516					;
   9517	030656				20$:
   9518	030656					CALL	..NDEL		;;; REMOVE THE NODE FROM THE TO-10 QUEUE
	030656	004737 	045320'			JSR	PC,..NDEL
   9519	030662	016401 	000004 			MOV	4(R4),R1	;;; FIND THE SIZE OF THE NODE TO RETURN
   9520	030666	010400 				MOV	R4,R0		;;; POINT TO THE NODE
   9521	030670					CALL	..DECB		;;; RETURN THE NODE
	030670	004737 	046010'			JSR	PC,..DECB
   9522	030674	105037 	001401'			CLRB	TOXQIP		;;; RESET THE TO-10 QUEUE IN PROGRESS FLAG
   9523	030700	013704 	001334'			MOV	TO10Q,R4	;;; POINT TO THE LISTHEAD
   9524	030704	022704 	001334'			CMP	#TO10Q,R4	;;; IS THE TO-10 QUEUE EMPTY??
   9525	030710	001662 				BEQ	INTLPS		;;; YES -- DONE WITH THIS INTERRUPT
   9526	030712					CALL	.STTNQ		;;; NO -- SEE IF ANOTHER NODE MAY BE STARTED
	030712	004737 	032200'			JSR	PC,.STTNQ
   9527	030716	000657 				BR	INTLPS		;;; AND EXIT
   9528						;
   9529					;
   9530					; HERE TO START SECOND HALF OF AN INDIRECT TRANSFER
   9531					;
   9532	030720				STIND2:
   9533	030720	005064 	000012 			CLR	12(R4)		;;; RESET INDIRECT PENDING SEMAPHORE
   9534					;
   9535					; HERE TO SET UP THE TRANSFER SIZE IN THE COMM REGION
   9536					;
   9537	030724	062704 	000020 			ADD	#20,R4		;;; POINT TO THE BYTE COUNT
   9538	030730	005060 	000006 			CLR	DXWD1(R0)	;;; LOAD UP THE TRANSFER SIZE
   9539	030734	005060 	000004 			CLR	DXWD2(R0)
   9540	030740	005005 				CLR	R5		;;; CLEAR R5
   9541	030742	152405 				BISB	(R4)+,R5	;;; GET THE TRANSFER SIZE
   9542	030744	105724 				TSTB	(R4)+		;;; ADVANCE TO NEXT WORD
   9543	030746	010537 	001322'			MOV	R5,TO10SZ	;;; SAVE THE BYTE COUNT FOR END CHECKS
   9544	030752	010560 	000002 			MOV	R5,DXWD3(R0)	;;; AND SET IT
   9545	030756	011437 	001324'			MOV	(R4),TO10AS	;;; SAVE THE START ADDRESS FOR END CHECKS
   9546	030762	012460 	000020 			MOV	(R4)+,T10AD(R0) ;;; SET UP THE SOURCE ADDRESS
   9547	030766	012705 	000003 			MOV	#QSIZE-FORPRO,R5 ;;; OFFSET FOR TRANSFER SIZE
   9548	030772	066305 	000004 			ADD	DMYN(R3),R5	;;; ADD IN COMM REGION OFFSET
   9549	030776	012760 	010000 	000010 		MOV	#DEP,TNAD1(R0)	;;; THIS IS A DEPOSIT
   9550	031004	010560 	000012 			MOV	R5,TNAD2(R0)	;;; THIS STARTS THE TRANSFER
   9551	031010					CALL	..WFED		;;; WAIT FOR IT TO COMPLETE
	031010	004737 	047454'			JSR	PC,..WFED
   9552					;
   9553					; HERE TO SEND OUR STATUS TO THE TEN
   9554					;
   9555	031014	052737 	000006 	001330'		BIS	#TOIP!TOBM,STSTT+2 ;;; SET INDIRECT IN PROGRESS AND BYTE MODE
   9556	031022	005060 	000036 			CLR	DAG3(R0)	;;; SET FRONT-END WORD MODE
   9557	031026					CALL	SNDSTS		;;; SEND STATUS TO THE TEN
	031026	004737 	032354'			JSR	PC,SNDSTS
   9558					;
   9559					; HERE TO SET UP FOR NORMAL INDIRECT TERMINATION
   9560					;
   9561	031032	012437 	001274'			MOV	(R4)+,DTEMSK	;;; FIND THE EVENT FLAGS
   9562	031036	011437 	001276'			MOV	(R4),DTEADR	;;; AND WHERE THEY BELONG
   9563	031042	012777 	000400 	150314 		MOV	#TO10DB,@.PRSTA	;;; RING HIS DOORBELL
   9564	031050	000602 				BR	INTLPS		;;; AND GO AWAY
   9565						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 179
DTE-20 DRIVER -- TO-11 DONE SERVICE

   9567						.SBTTL	DTE-20 DRIVER -- TO-11 DONE SERVICE
   9568
   9569					;+
   9570					; .ELEDN -- TO-11 DONE SERVICE
   9571					;
   9572					; THIS IS THE TO-11 DONE SERVICE.  FUNCTIONS PROVIDED HERE ARE:
   9573					;
   9574					;	TO-11 TRANSFER END CHECKS
   9575					;	TO-11 QUEUE NODE ENTRY
   9576					;	TO-11 TRANSFER TERMINATION POCESSING
   9577					;	BASIC PROTOCOL ERROR PROCESSING
   9578					;
   9579					; ERRORS PROCESSED HERE ARE:
   9580					;
   9581					;	TO-11 TRANSFER TERMINATION ERROR (DTB)
   9582					;	ILLEGAL PROTOCOL DEVICE CODE (PT1)
   9583					;	ILLEGAL PROTOCOL FUNCTION CODE (PT2)
   9584					;
   9585					; INPUTS:
   9586					;
   9587					;	R0 -- POINTS TO DTE-20
   9588					;	R1 -- POINTS TO DTE-20 STATUS REGISTER
   9589					;	R3 -- POINTS TO PROCESSOR TABLE ENTRY
   9590					;
   9591					; OUTPUTS:
   9592					;
   9593					;	NONE -- REGISTERS ARE NOT NECESSARILY PRESERVED
   9594					;-
   9595
   9596	031052				.ELEDN::
   9597	031052	012711 	000100 			MOV	#DON11C,(R1)	;;; CLEAR TO-11 DONE FLAG
   9598	031056	013701 	001320'			MOV	TO11BS,R1	;;; GET OUR SAVED BYTE COUNT
   9599	031062	052701 	170000 			BIS	#170000,R1	;;; DO THE SIGN EXTENSION
   9600	031066	005401 				NEG	R1		;;; MAKE IT A POSITIVE INTEGER
   9601	031070	032737 	020000 	001320'		BIT	#TO11BM,TO11BS	;;; WERE WE IN BYTE MODE??
   9602	031076	001001 				BNE	10$		;;; YES -- GO ON
   9603	031100	006301 				ASL	R1		;;; NO -- MAKE IT A WORD COUNT
   9604	031102				10$:
   9605	031102	063701 	001316'			ADD	TO11AS,R1	;;; COMPUTE WHERE WE SHOULD HAVE FINISHED
   9606	031106	020160 	000022 			CMP	R1,T11AD(R0)	;;; ARE WE THERE??
   9607	031112	001406 				BEQ	20$		;;; YES -- GO ON
   9608	031114	016027 	000022 			MOV	T11AD(R0),(PC)+	;;; NO -- SAVE WHERE WE ARE FOR DUMP
   9609	031120	000000 				.WORD	0
   9610	031122					.CRASH	DTB		;;; AND DIE!
	031122	000004 				IOT
	031124	   104 	   124 	   102 		.ASCIZ	/DTB/
	031127	   000
   9611						;
   9612	031130				20$:
   9613	031130	000337 	001304'			SWAB	TO11FN		;;; SWAP THE BYTES
   9614	031134	001017 				BNE	FELXFR		;;; IN PROGRESS -- PROCESS IT
   9615					;
   9616					; HERE TO ENTER A NEW NODE IN THE TO-11 QUEUE
   9617					;
   9618	031136				ENTELQ:
   9619	031136	013701 	001300'			MOV	TO11NP,R1	;;; DONE -- POINT TO THE NEW NODE
   9620	031142	012704 	001342'			MOV	#TO11Q,R4	;;; POINT TO THE LISTHEAD
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 179-1
DTE-20 DRIVER -- TO-11 DONE SERVICE

   9621	031146				10$:
   9622	031146	010402 				MOV	R4,R2		;;; SAVE CURRENT NODE POINTER
   9623	031150	011404 				MOV	(R4),R4		;;; FIND THE END OF THE QUEUE
   9624	031152	001375 				BNE	10$		;;; NOT YET -- KEEP GOING
   9625	031154	005011 				CLR	(R1)		;;; MARK NEW LIST TERMINATOR
   9626	031156	010112 				MOV	R1,(R2)		;;; AND LINK IN NEW NODE
   9627	031160	052737 	000100 	007162'		BIS	#EF.TED,DTETSK+A.EF ;;; WAKE UP THE QUEUED PROTOCOL DRIVER
   9628	031166					CALL	..DSEV		;;; SO
	031166	004737 	045264'			JSR	PC,..DSEV
   9629	031172	000462 				BR	TOITDN		;;; AND DONE...
   9630						;
   9631					;
   9632					; HERE TO FINISH A TO-11 DIRECT TRANSFER
   9633					;
   9634	031174				FELXFR:
   9635	031174	000337 	001302'			SWAB	TO11HD		;;; SWAP THE SIZE BYTES
   9636	031200	000337 	001306'			SWAB	TO11DV		;;; AND THE DEVICE CODE BYTES
   9637	031204	022737 	000010 	001306'		CMP	#.DQPSZ,TO11DV	;;; IS THE DEVICE CODE LEGAL??
   9638	031212	103003 				BHIS	10$		;;; YES -- GO ON
   9639	031214					.CRASH	PT1		;;; NO -- DIE!
	031214	000004 				IOT
	031216	   120 	   124 	   061 		.ASCIZ	/PT1/
	031221	   000
   9640						;
   9641	031222				10$:
   9642	031222	123727 	001304'	000041 		CMPB	TO11FN,#BC.FNM	;;; IS THIS A LEGAL FUNCTION??
   9643	031230	103403 				BLO	20$		;;; YES -- GO ON
   9644	031232					.CRASH	PT2		;;; NO -- DIE!
	031232	000004 				IOT
	031234	   120 	   124 	   062 		.ASCIZ	/PT2/
	031237	   000
   9645						;
   9646	031240				20$:
   9647	031240	005737 	001304'			TST	TO11FN		;;; INDIRECT IN PROGRESS??
   9648	031244	100007 				BPL	30$		;;; NO -- GO ON
   9649	031246	010046 				MOV	R0,-(SP)	;;; YES -- SAVE DTE-20 POINTER
   9650	031250	013700 	001300'			MOV	TO11NP,R0	;;; POINT TO PRE-ALLOCATED BUFFER
   9651	031254					CALL	..DECN		;;; AND GET RID OF IT
	031254	004737 	046004'			JSR	PC,..DECN
   9652	031260	012600 				MOV	(SP)+,R0	;;; RESTORE DTE-20 POINTER
   9653	031262	000426 				BR	TOITDN		;;; SET QUEUE IDLE STATE AND EXIT
   9654						;
   9655	031264				30$:
   9656	031264	013705 	001300'			MOV	TO11NP,R5	;;; GET THE NODE POINTER
   9657	031270					CALL	LODNOD		;;; AND LOAD IT UP
	031270	004737 	032530'			JSR	PC,LODNOD
   9658	031274	010502 				MOV	R5,R2		;;; SET UP THE ADDRESS IN CASE EXTENDED DIRECT
   9659	031276	005037 	001304'			CLR	TO11FN		;;; RELEASE FIXED BUFFER
   9660	031302	013701 	001302'			MOV	TO11HD,R1	;;; FIND THE BYTE COUNT
   9661	031306	162701 	000012 			SUB	#^D10,R1	;;; ARE WE FINISHED??
   9662	031312	001711 				BEQ	ENTELQ		;;; YES -- ENTER THE NODE IN THE QUEUE AND EXIT
   9663					;
   9664					; HERE FOR AN EXTENDED DIRECT TRANSFER
   9665					;
   9666	031314	160137 	001340'			SUB	R1,EQSZ		;;; NO -- ACCOUNT FOR THE HEADER
   9667	031320	005401 				NEG	R1		;;; NEGATE THE BYTE COUNT
   9668	031322	042701 	170000 			BIC	#^C7777,R1	;;; TRIM TO BYTE COUNT
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 179-2
DTE-20 DRIVER -- TO-11 DONE SERVICE

   9669	031326	052701 	120000 			BIS	#TO11BM!IFLOP,R1 ;;; SET THE MODE FLAGS
   9670	031332					CALL	STBXFR		;;; START THE TRANSFER
	031332	004737 	032506'			JSR	PC,STBXFR
   9671	031336	000405 				BR	TEDXIT		;;; AND EXIT
   9672						;
   9673					;
   9674					; HERE TO RETURN DONE STATUS TO THE KL
   9675					;
   9676	031340				TOITDN:
   9677	031340	042737 	000001 	001330'		BIC	#TOIT,STSTT+2	;;; CLEAR PROCESSING QUEUE STATUS
   9678	031346					CALL	SNDSTS		;;; SEND THE STATUS
	031346	004737 	032354'			JSR	PC,SNDSTS
   9679	031352				TEDXIT:
   9680	031352	000137 	030456'			JMP	INTLPS		;;; CHECK OTHER DTE-20 STATUS AND DISMISS
   9681						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 180
DTE-20 DRIVER -- DOORBELL SERVICE

   9683						.SBTTL	DTE-20 DRIVER -- DOORBELL SERVICE
   9684
   9685					;+
   9686					; .DRBEL -- DOORBELL SERVICE
   9687					;
   9688					; THIS IS THE DOORBELL SERVICE.  FUNCTIONS PROVIDED HERE ARE:
   9689					;
   9690					;	REQUESTED RELOAD SERVICE
   9691					;	POWERFAIL WARNING SERVICE
   9692					;	PROTOCOL PAUSE ENTRANCE SERVICE
   9693					;	TO-11 HEADER TRANSFER INITIATION
   9694					;	TO-11 INDIRECT TRANSFER CONTINUATION
   9695					;	DOORBELL ERROR PROCESSING
   9696					;
   9697					; ERRORS PROCESSED HERE ARE:
   9698					;
   9699					;	UNIMPLEMENTED DTE-20 PROTOCOL FUNCTION (UIE)
   9700					;	UNSYNCHRONIZED TO-11 INDIRECT TRANSFER (PT3)
   9701					;	UNSYNCHRONIZED HEADER TRANSFER (ILQ)
   9702					;	TO-11 TRANSFER TOO LARGE (PT4)
   9703					;
   9704					; INPUTS:
   9705					;
   9706					;	R0 -- POINTS TO DTE-20
   9707					;	R1 -- POINTS TO DTE-20 STATUS REGISTER
   9708					;	R3 -- POINTS TO PROCESSOR TABLE ENTRY
   9709					;
   9710					; OUTPUTS:
   9711					;
   9712					;	NONE -- REGISTERS ARE NOT NECESSARILY PRESERVED
   9713					;-
   9714
   9715	031356				.DRBEL::
   9716	031356	012711 	002000 			MOV	#INT11C,(R1)	;;; CLEAR RINGING DOORBELL
   9717	031362	005060 	000010 			CLR	TNAD1(R0)	;;; SET UP TO READ DOORBELL STATUS
   9718	031366	012702 	000002 			MOV	#STATUS-FORPRO,R2 ;;; POINT TO THE STATUS WORD
   9719	031372	066302 	000010 			ADD	EHSM(R3),R2	;;; IN HIS SECTION FOR ME
   9720	031376	010260 	000012 			MOV	R2,TNAD2(R0)	;;; START THE EXAMINE
   9721	031402					CALL	..WFED		;;; WAIT FOR IT TO FINISH
	031402	004737 	047454'			JSR	PC,..WFED
   9722	031406	103427 				BCS	DBLEPX		;;; EXIT IF ERROR
   9723	031410	012701 	001352'			MOV	#STATI+6,R1	;;; POINT TO BOTTOM OF STATUS BLOCK
   9724	031414	016041 	000002 			MOV	DXWD3(R0),-(R1)	;;; AND REVERSE-UNLOAD THE STATUS
   9725	031420	016041 	000004 			MOV	DXWD2(R0),-(R1)	;;; SO
   9726	031424	016041 	000006 			MOV	DXWD1(R0),-(R1)	;;; CHECK VALID EXAMINE
   9727	031430	001414 				BEQ	DBLEPP		;;; NOT THERE -- ENTER PROTOCOL PAUSE
   9728					;
   9729					; HERE TO CHECK FOR RELOAD AND POWERFAIL
   9730					;
   9731					;	R1 POINTS TO STATI
   9732					;
   9733	031432	032721 	000016 			BIT	#16,(R1)+	;;; IS THIS A RELOAD OR POWERFAIL??
   9734	031436	001433 				BEQ	DBLXFR		;;; NO -- SEE ABOUT HEADERS AND INDIRECTS
   9735	031440	032741 	000004 			BIT	#LOAD11,-(R1)	;;; YES -- IS IT A RELOAD??
   9736	031444	001012 				BNE	DBLRLD		;;; YES -- RELOAD HIM
   9737	031446	032711 	000010 			BIT	#KLPWRF,(R1)	;;; NO -- IS IT A POWERFAIL??
   9738	031452	001021 				BNE	DBLPWR		;;; YES -- SET UP TO TAKE IT
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 180-1
DTE-20 DRIVER -- DOORBELL SERVICE

   9739	031454					.CRASH	UIE		;;; NO -- UNIMPLEMENTED FUNCTION
	031454	000004 				IOT
	031456	   125 	   111 	   105 		.ASCIZ	/UIE/
	031461	   000
   9740						;
   9741					;
   9742					; HERE TO ENTER PROTOCOL PAUSE
   9743					;
   9744	031462				DBLEPP:
   9745	031462					CALL	..DTP2		;;; START SECONDARY PROTOCOL
	031462	004737 	050244'			JSR	PC,..DTP2
   9746	031466				DBLEPX:
   9747	031466	000137 	030544'			JMP	DTEXIT		;;; AND DISMISS
   9748						;
   9749					;
   9750					; HERE TO INITIATE A KL RELOAD
   9751					;
   9752	031472				DBLRLD:
   9753	031472	052737 	000040 	001126'		BIS	#KS.TRR,.KLITK	;;; REQUEST THE RELOAD
   9754	031500	105237 	001122'			INCB	.NOERR		;;; MARK THAT AN ERROR IS BEING SERVICED
   9755	031504					CALL	..DTSP		;;; CLEAR ALL PROTOCOLS
	031504	004737 	050226'			JSR	PC,..DTSP
   9756	031510	105237 	001124'			INCB	.TKTN		;;; REQUEST NOTIFICATION
   9757	031514	000462 				BR	DBLDON		;;; AND EXIT
   9758						;
   9759					;
   9760					; HERE TO INITIALIZE FOR IMPENDING POWERFAIL
   9761					;
   9762	031516				DBLPWR:
   9763	031516	052737 	004000 	001012'		BIS	#EF.PFR,.COMEF+2 ;;; MARK THAT WE ANTICIPATE A POWERFAIL
   9764	031524	000463 				BR	DBLXIT		;;; EXIT -- NO STATUS REQUIRED
   9765						;
   9766					;
   9767					; HERE TO SEE IF THIS IS A HEADER TO PROCESS
   9768					;
   9769					;	R1 POINTS TO STATI+2
   9770					;
   9771	031526				DBLXFR:
   9772	031526	032721 	000002 			BIT	#TOIP,(R1)+	;;; IS THIS AN INDIRECT IN PROGRESS??
   9773	031532	001411 				BEQ	DBLHDR		;;; NO -- MUST BE A HEADER (DIRECT)
   9774	031534	005737 	001304'			TST	TO11FN		;;; DO WE BELIEVE THAT IT IS INDIRECT??
   9775	031540	100403 				BMI	10$		;;; YES -- GO ON
   9776	031542					.CRASH	PT3		;;; NO -- DIE!
	031542	000004 				IOT
	031544	   120 	   124 	   063 		.ASCIZ	/PT3/
	031547	   000
   9777						;
   9778					;
   9779					; HERE TO PROCESS SECOND HALF OF AN INDIRECT TRANSFER
   9780					;
   9781	031550				10$:
   9782	031550					CALL	.STELI		;;; START THE INDIRECT PART
	031550	004737 	031766'			JSR	PC,.STELI
   9783	031554	000447 				BR	DBLXIT		;;; AND EXIT
   9784						;
   9785					;
   9786					; HERE TO START A DIRECT (HEADER) TRANSFER
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 180-2
DTE-20 DRIVER -- DOORBELL SERVICE

   9787					;
   9788					;	R1 POINTS TO STATI+4
   9789					;
   9790	031556				DBLHDR:
   9791	031556	121137 	001332'			CMPB	(R1),TO10QC	;;; IS THIS THE SAME NODE??
   9792	031562	001437 				BEQ	DBLDON		;;; YES -- SEND STATUS AND EXIT
   9793	031564	105237 	001332'			INCB	TO10QC		;;; NO -- UPDATE THE QUEUE COUNT
   9794	031570	121137 	001332'			CMPB	(R1),TO10QC	;;; IS IT NOW CORRECT??
   9795	031574	001403 				BEQ	10$		;;; YES -- GO ON
   9796	031576					.CRASH	ILQ		;;; NO -- DIE!
	031576	000004 				IOT
	031600	   111 	   114 	   121 		.ASCIZ	/ILQ/
	031603	   000
   9797						;
   9798	031604				10$:
   9799	031604	012702 	000003 			MOV	#QSIZE-FORPRO,R2 ;;; POINT TO THE QUEUE SIZE
   9800	031610	066302 	000010 			ADD	EHSM(R3),R2	;;; IN HIS GENERAL SECTION FOR ME
   9801	031614	005060 	000010 			CLR	TNAD1(R0)	;;; CLEAR THE DEPOSIT BIT
   9802	031620	010260 	000012 			MOV	R2,TNAD2(R0)	;;; SET THE ADDRESS AND START THE EXAMINE
   9803	031624					CALL	..WFED		;;; WAIT FOR IT TO COMPLETE
	031624	004737 	047454'			JSR	PC,..WFED
   9804	031630	016037 	000002 	001340'		MOV	DXWD3(R0),EQSZ	;;; READ THE DIRECT SIZE
   9805	031636	023727 	001340'	000144 		CMP	EQSZ,#^D100	;;; IS THE NODE OF A LEGAL SIZE??
   9806	031644	103403 				BLO	20$		;;; YES -- GO ON
   9807	031646					.CRASH	PT4		;;; NO -- DIE!
	031646	000004 				IOT
	031650	   120 	   124 	   064 		.ASCIZ	/PT4/
	031653	   000
   9808						;
   9809	031654				20$:
   9810	031654					CALL	.STELD		;;; ALLOCATE AND START THIS HEADER
	031654	004737 	031700'			JSR	PC,.STELD
   9811	031660	000405 				BR	DBLXIT		;;; AND EXIT
   9812						;
   9813	031662				DBLDON:
   9814	031662	052737 	000001 	001330'		BIS	#TOIT,STSTT+2	;;; SET PROCESSING QUEUE STATUS
   9815	031670					CALL	SNDSTS		;;; SEND THE STATUS
	031670	004737 	032354'			JSR	PC,SNDSTS
   9816	031674				DBLXIT:
   9817	031674	000137 	030456'			JMP	INTLPS		;;; AND EXIT
   9818						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 181
DTE-20 DRIVER -- START TO ELEVEN DIRECT TRANSFER

   9820					.SBTTL	DTE-20 DRIVER -- START TO ELEVEN DIRECT TRANSFER
   9821
   9822					;+
   9823					; .STELD -- START TO ELEVEN DIRECT TRANSFER
   9824					;
   9825					; THIS SUBROUTINE WILL ATTEMPT TO START A DIRECT TRANSFER TO THE TO-11 QUEUE.
   9826					; IF THE ALLOCATION FOR THE NODE TO BE TRANSFERRED IS SUCCESSFUL, THE NODE
   9827					; IS STARTED IMMEDIATELY.  IF THE ALLOCATION IS UNSUCCESSFUL, THE NODE START
   9828					; IS DEFERRED UNTIL THE NEXT CALL TO THE CORE MANAGER ("..DECB", Q.V.).
   9829					; UNDER THESE CIRCUMSTANCES THE TO-11 QUEUE BLOCKED FLAG, ".DTBLK", IS SET TO
   9830					; THE RE-ENTRY ADDRESS (".STELD") TO MARK THE BLOCKING OF THE QUEUE.  THE
   9831					; TO-11 QUEUE BECOMES UNBLOCKED AFTER SPACE FOR THE NODE IS SUCESSFULLY
   9832					; ALLOCATED AND THE TRANSFER STARTED.
   9833					;
   9834					; TO PREVENT KEEP-ALIVE PROBLEMS, THE FRONT-END'S KEEP-ALIVE COUNT IS TRANSMITTED
   9835					; TO THE HOST ONCE PER 256 HEADERS ACCEPTED.
   9836					;
   9837					; INPUTS:
   9838					;
   9839					;	R0 -- POINTS TO DTE-20
   9840					;	R3 -- POINTS TO PROCESSOR TABLE
   9841					;	EQSZ -- SIZE OF NODE TO BE ALLOCATED (SEE NOTE BELOW)
   9842					;
   9843					; OUTPUTS:
   9844					;
   9845					;	R1, R2 ALTERED
   9846					;		".DTBLK" .NE. 0 IF TO-11 QUEUE IS BLOCKED
   9847					;		".DTBLK" .EQ. 0 IF TO-11 QUEUE TRANSFER IS IN PROGRESS
   9848					;
   9849					;	EXIT CONDITIONS ARE SET UP PER CONTENTS OF ".DTBLK"
   9850					;
   9851					; NOTE:
   9852					;
   9853					;	THIS ROUTINE MUST BE ENTERED WITH INTERRUPTS INHIBITTED
   9854					;
   9855					;	THIS ROUTINE ASSUMES THAT ALL TRANSFERS ARE DIRECT TRANSFERS, AND
   9856					;	THUS ATTEMPTS TO PRE-ALLOCATE BUFFER SPACE FOR IT.  IF THE TRANSFER
   9857					;	IS AN INDIRECT TRANSFER, THE PRE-ALLOCATED BUFFER IS DISCARDED BY THE
   9858					;	TO-11 DONE INTERRUPT SERVICE IN ANTICIPATION OF THE INDIRECT TRANSFER
   9859					;	START BY THE DOORBELL SERVICE.
   9860					;-
   9861
   9862	031700				.STELD::
   9863	031700	013701 	001340'			MOV	EQSZ,R1		;;; PICK UP THE TRANSFER SIZE
   9864	031704	132121 				BITB	(R1)+,(R1)+	;;; ADD IN OUR OVERHEAD
   9865	031706					CALL	GETBUF		;;; TRY TO GET A BUFFER
	031706	004737 	032430'			JSR	PC,GETBUF
   9866	031712	103004 				BCC	10$		;;; ALL OK IF CC-C IS CLEAR
   9867	031714	012737 	031700'	001402'		MOV	#.STELD,.DTBLK	;;; FAILED -- SET RE-ENTRY ADDRESS AS BLOCKED FLAG
   9868	031722	000507 				BR	STELIX		;;; AND EXIT
   9869						;
   9870	031724				10$:
   9871	031724	105737 	001332'			TSTB	TO10QC		;;; HAVE WE ACCEPTED 256. HEADERS??
   9872	031730	001002 				BNE	20$		;;; NO -- GO ON
   9873	031732					CALL	.KPALV		;;; YES -- SEND OUR KEEP-ALIVE COUNT
	031732	004737 	032144'			JSR	PC,.KPALV
   9874					;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 181-1
DTE-20 DRIVER -- START TO ELEVEN DIRECT TRANSFER

   9875					; HERE TO START THE NEXT NODE IN THE TO-11 QUEUE
   9876					;
   9877	031736				20$:
   9878	031736	005001 				CLR	R1		;;; ASSUME NO INTERRUPT WANTED
   9879	031740	162737 	000012 	001340'		SUB	#^D10,EQSZ	;;; DISCOUNT THE HEADER
   9880	031746	001002 				BNE	30$		;;; DON'T NEED AN INTERRUPT THIS TIME
   9881	031750	052701 	100000 			BIS	#IFLOP,R1	;;; MUST INTERRUPT IF COUNT GOES TO ZERO
   9882	031754				30$:
   9883	031754	012702 	001302'			MOV	#TO11HD,R2	;;; ADDRESS TO R2
   9884	031760	052701 	027766 			BIS	#<-^D10&7777>!TO11BM,R1 ;;; SET UP BYTE COUNT AND MODE
   9885	031764	000455 				BR	STELIG		;;; START THE TRANSFER AND EXIT
   9886						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 182
DTE-20 DRIVER -- START TO ELEVEN INDIRECT TRANSFER

   9888						.SBTTL	DTE-20 DRIVER -- START TO ELEVEN INDIRECT TRANSFER
   9889
   9890					;+
   9891					; .STELI -- START TO ELEVEN INDIRECT TRANSFER
   9892					;
   9893					; THIS SUBROUTINE WILL ALLOCATE BUFFER SPACE FOR AND START A TO-11 INDIRECT
   9894					; TRANSFER.  IF THE ALLOCATION IS SUCCSSFUL, THE TRANSFER IS IN PROGRESS UPON
   9895					; EXIT FROM THIS ROUTINE.
   9896					;
   9897					; IF THE ALLOCATION IS UNSUCCESSFUL, THE TRANSFER IS DECLARED BLOCKED AND THE
   9898					; RESTART ADDRESS (".STELI") IS STORED AS THE BLOCKED FLAG.
   9899					;
   9900					; INPUTS:
   9901					;
   9902					;	R0 -- POINTS TO DTE-20
   9903					;	R3 -- POINTS TO PROCESSOR TABLE
   9904					;
   9905					; OUTPUTS:
   9906					;
   9907					;	R1, R2 ALTERED
   9908					;		".DTBLK" .NE. 0 IF TRANSFER IS BLOCKED
   9909					;		".DTBLK" .EQ. 0 IF TRANSFER IS IN PROGRESS
   9910					;
   9911					;	EXIT CONDITIONS ARE SET UP PER CONTENTS OF ".DTBLK"
   9912					;
   9913					; NOTE:
   9914					;
   9915					;	THIS ROUTINE MUST BE ENTERED WITH INTERRUPTS INHIBITTED
   9916					;-
   9917
   9918	031766				.STELI::
   9919	031766	012702 	000003 			MOV	#QSIZE-FORPRO,R2 ;;; POINT TO THE SIZE WORD
   9920	031772	066302 	000010 			ADD	EHSM(R3),R2	;;; ADD IN WINDOW OFFSET
   9921	031776	005060 	000010 			CLR	TNAD1(R0)	;;; CLEAR DEPOSIT
   9922	032002	010260 	000012 			MOV	R2,TNAD2(R0)	;;; START THE EXAMINE
   9923	032006					CALL	..WFED		;;; WAIT FOR THE EXAMINE TO COMPLETE
	032006	004737 	047454'			JSR	PC,..WFED
   9924	032012	016001 	000002 			MOV	DXWD3(R0),R1	;;; PICK UP THE INDIRECT SIZE
   9925	032016	062701 	000012 			ADD	#12,R1		;;; ADD IN SPACE FOR HEADER
   9926	032022					CALL	GETBUF		;;; GET A BUFFER FOR THE MESSAGE
	032022	004737 	032430'			JSR	PC,GETBUF
   9927	032026	103004 				BCC	20$		;;; ALL OK IF CC-C IS CLEAR
   9928	032030	012737 	031766'	001402'		MOV	#.STELI,.DTBLK	;;; SET THE RETRY ADDRESS AS FLAG
   9929	032036	000441 				BR	STELIX		;;; AND EXIT
   9930						;
   9931	032040				20$:
   9932	032040	010546 				MOV	R5,-(SP)	;;; SAVE R5
   9933	032042	013705 	001300'			MOV	TO11NP,R5	;;; GET THE NODE POINTER
   9934	032046					CALL	LODNOD		;;; GET THE HEADER OUT OF THE FIXED BUFFER
	032046	004737 	032530'			JSR	PC,LODNOD
   9935	032052	010502 				MOV	R5,R2		;;; SET UP TRANSFER ADDRESS
   9936	032054	012605 				MOV	(SP)+,R5	;;; RESTORE R5
   9937	032056	016001 	000002 			MOV	DXWD3(R0),R1	;;; GET THE TRANSFER COUNT
   9938	032062	005401 				NEG	R1		;;; CONVERT TO A BYTE COUNT
   9939	032064	042701 	170000 			BIC	#^C7777,R1	;;; SO
   9940	032070	106001 				RORB	R1		;;; NOW TO A WORD COUNT --
   9941									;;; NOTE: >> THIS ASSUMES CC-C SET BY "NEG R1"
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 182-1
DTE-20 DRIVER -- START TO ELEVEN INDIRECT TRANSFER

   9942	032072	032737 	000004 	001346'		BIT	#TOBM,STATI+2	;;; ARE WE IN WORD MODE??
   9943	032100	001003 				BNE	30$		;;; NO -- GO ON
   9944	032102	106101 				ROLB	R1		;;; YES -- RESTORE TO BYTE COUNT
   9945									;;; NOTE: >> SEE PREVIOUS NOTE
   9946	032104	052701 	020000 			BIS	#TO11BM,R1	;;; SET BYTE MODE
   9947	032110				30$:
   9948	032110	052701 	100000 			BIS	#IFLOP,R1	;;; INTERRUPT BOTH CPU'S WHEN DONE
   9949	032114	005037 	001304'			CLR	TO11FN		;;; RELEASE FIXED BUFFER
   9950	032120				STELIG:
   9951	032120					CALL	STBXFR		;;; START THE TRANSFER
	032120	004737 	032506'			JSR	PC,STBXFR
   9952	032124	052737 	000001 	001330'		BIS	#TOIT,STSTT+2	;;; SET QUEUE IN PROGRESS STATUS
   9953	032132					CALL	SNDSTS		;;; SEND THE STATUS
	032132	004737 	032354'			JSR	PC,SNDSTS
   9954	032136	005037 	001402'			CLR	.DTBLK		;;; CLEAR QUEUE BLOCKED FLAG (SETS CC-Z)
   9955	032142				STELIX:
   9956	032142					RETURN			;;; TO CALLER
	032142	000207 				RTS	PC
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 183
DTE-20 DRIVER -- UPDATE AND TRANSMIT FRONT-END KEEP-ALIVE COUN

   9958						.SBTTL	DTE-20 DRIVER -- UPDATE AND TRANSMIT FRONT-END KEEP-ALIVE COUNT
   9959
   9960					;+
   9961					; .KPALV -- UPDATE AND TRANSMIT FRONT-END KEEP-ALIVE COUNT
   9962					;
   9963					; THIS SUBROUTINE WILL UPDATE AND TRANSMIT THE FRONT-END KEEP-ALIVE COUNT.
   9964					; THE KEEP-ALIVE IS DONE HERE, "BY HAND", TO AVOID PROBLEMS ASSOCIATED WITH
   9965					; CALLING AN EMT FROM INTERRUPT LEVEL.
   9966					;
   9967					; INPUTS:
   9968					;
   9969					;	R0 -- POINTS TO THE DTE-20
   9970					;
   9971					; OUTPUTS:
   9972					;
   9973					;	NONE.
   9974					;
   9975					; NOTES:
   9976					;
   9977					;	THIS SUBROUTINE SHOULD ONLY BE CALLED AT PRI6 OR HIGHER
   9978					;	THIS SUBROUTINE EXITS THROUGH "..WFED", Q.V.
   9979					;-
   9980
   9981	032144				.KPALV::
   9982	032144	005237 	001414'			INC	KPAL1		;;; BUMP THE KEEP-ALIVE COUNT
   9983	032150	010001 				MOV	R0,R1		;;; COPY DTE-20 POINTER TO R1
   9984	032152	005021 				CLR	(R1)+		;;; CLEAR AND GET OVER DELAY COUNTER
   9985	032154	013721 	001414'			MOV	KPAL1,(R1)+	;;; SET DOWN THE KEEP-ALIVE COUNT
   9986	032160	005021 				CLR	(R1)+		;;; CLEAR REST OF WORD
   9987	032162	005021 				CLR	(R1)+		;;; SO
   9988	032164	012721 	010000 			MOV	#DEP,(R1)+	;;; SET UP DEPOSIT
   9989	032170	012711 	000005 			MOV	#PSWW1,(R1)	;;; SET ADDRESS AND START DEPOSIT
   9990	032174	000137 	047454'			JMP	..WFED		;;; WAIT FOR COMPLETION AND EXIT
   9991						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 184
DTE-20 DRIVER -- START TO TEN QUEUE

   9993						.SBTTL	DTE-20 DRIVER -- START TO TEN QUEUE
   9994
   9995					;+
   9996					; .STTNQ -- SUBROUTINE TO CONDITIONALLY START NEXT TO TEN QUEUE NODE
   9997					; .STTNF -- SUBROUTINE TO START NEXT TO-10 QUEUE NODE
   9998					;
   9999					; THESE SUBROUTINES WILL START THE NEXT NODE IN THE TO-10 QUEUE.  ".STTNQ"
  10000					; WILL START A NODE IF AND ONLY IF THE TO11Q IS EMPTY.  IF THIS IS NOT
  10001					; THE CASE, THE TO-10 QUEUE NODE START WILL BE DEFERRED TO WHEN THE
  10002					; NEXT TO-11 QUEUE NODE HAS FINISHED.  ".STTNF" WILL START THE NEXT
  10003					; TO-10 QUEUE NODE IF THE CURRENT TO-10 QUEUE NODE IS FINISHED.
  10004					;
  10005					; INPUTS:
  10006					;
  10007					;	R4 -- POINTS TO-10 QUEUE NODE TO BE STARTED
  10008					;
  10009					; OUTPUTS:
  10010					;
  10011					;	NO REGISTERS ALTERED
  10012					;
  10013					; NOTES:
  10014					;
  10015					;	THIS ROUTINE MUST BE ENTERED WITH INTERRUPTS INHIBITTED
  10016					;-
  10017
  10018						.ENABL	LSB
  10019
  10020	032200				.STTNQ::
  10021	032200	005737 	001342'			TST	TO11Q		;;; ANYTHING IN THE TO-11 QUEUE??
  10022	032204	001110 				BNE	20$		;;; YES -- WAIT FOR TO-11 QUEUE NODE TO FINISH
  10023	032206				.STTNF::
  10024	032206	105737 	001401'			TSTB	TOXQIP		;;; NO -- IS THERE A TO-10 QUEUE NODE IN PROGRESS??
  10025	032212	001105 				BNE	20$		;;; YES -- EXIT
  10026	032214	010546 				MOV	R5,-(SP)	;;; NO -- SAVE REGISTERS
  10027	032216	010346 				MOV	R3,-(SP)
  10028	032220	010046 				MOV	R0,-(SP)	;;; SO
  10029	032222	013700 	001366'			MOV	.PRDTE,R0	;;; SET UP ADDRESS OF DTE-20
  10030	032226	013703 	001362'			MOV	.PRADR,R3	;;; POINT TO THE PROCESSOR TABLE
  10031	032232	005060 	000006 			CLR	DXWD1(R0)	;;; SET UP THE TRANSFER
  10032	032236	005060 	000004 			CLR	DXWD2(R0)	;;; SO
  10033	032242	010405 				MOV	R4,R5		;;; SAVE THE NODE ADDRESS
  10034	032244	062705 	000006 			ADD	#6,R5		;;; MOVE OVER LISTHEAD AND NODE SIZE
  10035	032250	011537 	001322'			MOV	@R5,TO10SZ	;;; SAVE THE TRANSFER SIZE FOR END CHECKS
  10036	032254	012560 	000002 			MOV	(R5)+,DXWD3(R0)	;;; SET THE TRANSFER SIZE IN MY AREA TO HIM
  10037	032260	010560 	000020 			MOV	R5,T10AD(R0)	;;; SET UP THE TO-10 ADDRESS
  10038	032264	010537 	001324'			MOV	R5,TO10AS	;;; SAVE THE ADDRESS FOR END CHECKS
  10039	032270	012760 	000001 	000036 		MOV	#1,DAG3(R0)	;;; SET BYTE MODE
  10040	032276	016305 	000004 			MOV	DMYN(R3),R5	;;; FIND THE OFFSET INTO MY AREA
  10041	032302	062705 	000003 			ADD	#QSIZE-FORPRO,R5 ;;; POINT TO THE PROPER ITEM
  10042	032306	012760 	010000 	000010 		MOV	#DEP,TNAD1(R0)	;;; SET UP TO DO DEPOSIT
  10043	032314	010560 	000012 			MOV	R5,TNAD2(R0)	;;; START THE DEPOSIT
  10044	032320					CALL	..WFED		;;; WAIT FOR IT TO COMPLETE
	032320	004737 	047454'			JSR	PC,..WFED
  10045	032324	105237 	001333'			INCB	TO11QC		;;; INCREMENT THE QUEUE COUNT
  10046	032330					CALL	SNDSTS		;;; SEND THE STATUS TO THE KL10
	032330	004737 	032354'			JSR	PC,SNDSTS
  10047	032334	012777 	000400 	147022 		MOV	#TO10DB,@.PRSTA	;;; RING HIS DOORBELL
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 184-1
DTE-20 DRIVER -- START TO TEN QUEUE

  10048	032342	105237 	001401'			INCB	TOXQIP		;;; INTERLOCK THIS NODE
  10049	032346	012600 				MOV	(SP)+,R0	;;; RESTORE R0
  10050	032350	012603 				MOV	(SP)+,R3	;;; RESTORE R3
  10051	032352	000424 				BR	10$		;;; AND EXIT
  10052						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 185
DTE-20 DRIVER -- SEND STATUS TO TEN

  10054						.SBTTL	DTE-20 DRIVER -- SEND STATUS TO TEN
  10055
  10056					;+
  10057					; SNDSTS -- SEND STATUS TO THE KL10
  10058					;
  10059					; THIS SUBROUTINE WILL SEND THE STATUS IN "STSTT" TO THE KL10
  10060					;
  10061					; INPUTS:
  10062					;
  10063					;	R0 -- POINTS TO DTE-20
  10064					;	R3 -- POINTS TO TABLE OF COMM REGION OFFSETS ("PROTBL")
  10065					;
  10066					; OUTPUTS:
  10067					;
  10068					;	NO REGISTERS ALTERED
  10069					;-
  10070
  10071	032354				SNDSTS:
  10072	032354	010546 				MOV	R5,-(SP)	;;; SAVE R5
  10073	032356	012705 	001326'			MOV	#STSTT,R5	;;; POINT TO THE STATUS
  10074	032362	012560 	000006 			MOV	(R5)+,DXWD1(R0)	;;; LOAD UP THE TO-10 STATUS
  10075	032366	012560 	000004 			MOV	(R5)+,DXWD2(R0)
  10076	032372	011560 	000002 			MOV	(R5),DXWD3(R0)	;;; SO
  10077	032376	012705 	000002 			MOV	#STATUS-FORPRO,R5 ;;; POINT TO PROPER ITEM
  10078	032402	066305 	000004 			ADD	DMYN(R3),R5	;;; ADD COMM REGION OFFSET
  10079	032406	012760 	010000 	000010 		MOV	#DEP,TNAD1(R0)	;;; THIS IS A DEPOSIT
  10080	032414	010560 	000012 			MOV	R5,TNAD2(R0)	;;; START THE TRANSFER
  10081	032420					CALL	..WFED		;;; WAIT FOR COMPLETION
	032420	004737 	047454'			JSR	PC,..WFED
  10082	032424				10$:
  10083	032424	012605 				MOV	(SP)+,R5	;;; RESTORE R5
  10084	032426				20$:
  10085	032426					RETURN			;;; AND EXIT
	032426	000207 				RTS	PC
  10086
  10087						.DSABL	LSB
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 186
DTE-20 DRIVER -- GET A BUFFER FOR INCOMING TRANSFER

  10089						.SBTTL	DTE-20 DRIVER -- GET A BUFFER FOR INCOMING TRANSFER
  10090
  10091					;+
  10092					; GETBUF -- GET A BUFFER FOR INCOMING TRANSFER
  10093					;
  10094					; THIS SUBROUTINE WILL GET A BUFFER FOR A TO-11 TRANSFER.  IF THE ALLOCATION
  10095					; FAILS, OR THE CURRENT TO-11 QUEUE EXCEEDS THE MAXIMUM ALLOWABLE LENGTH, OR
  10096					; THE FREE-POOL IS BELOW THE MINIMUM THRESHOLD (".OBFLO"), THE ERROR
  10097					; (CC-C SET) RETURN IS TAKEN, WHICH SHOULD CAUSE THE TRANSFER TO BLOCK.
  10098					;
  10099					; INPUTS:
  10100					;
  10101					;	R1 -- SIZE OF BUFFER TO BE ALLOCATED
  10102					;
  10103					; OUTPUTS:
  10104					;
  10105					;	R1 -- SIZE OF BUFFER ALLOCATED
  10106					;	BUFFER POINTER IN "TO11NP"
  10107					;	CC-C CLEAR
  10108					;
  10109					;	CC-C SET IF ALLOCATION FAILS OR IF TO-11 QUEUE IS TOO LONG
  10110					;-
  10111		001200 				.OBFLO==1200		;;; [5.1041] AMOUNT OF FREE POOL BYTES
  10112									;;;		TO LEAVE
  10113
  10114	032430				GETBUF:
  10115	032430	010046 				MOV	R0,-(SP)	;;; SAVE R0
  10116	032432	012700 	001342'			MOV	#TO11Q,R0	;;; [4.1.1137] POINT TO TO-11 QUEUE LISTHEAD
  10117	032436	005046 				CLR	-(SP)		;;; [4.1.1137] CLEAR A COUNTER ON THE STACK
  10118	032440				10$:
  10119	032440	005216 				INC	(SP)		;;; [4.1.1137] COUNT A NODE
  10120	032442	011000 				MOV	(R0),R0		;;; [4.1.1137] MOVE OVER THE NODE
  10121	032444	001375 				BNE	10$		;;; [4.1.1137] TILL DONE
  10122					;
  10123					; NOTE --
  10124					;
  10125					;	IF ANY OF THE FOLLOWING TESTS FAIL, THIS ROUTINE MUST BE
  10126					;	EXITED WITH CC-C SET!
  10127					;
  10128	032446	022726 	000022 			CMP	#22,(SP)+	;;; [4.1.1137] CHECK QUEUE LENGTH
  10129	032452	103413 				BCS	20$		;;; [4.1.1137] TOO LONG -- EXIT (NOTE: CC-C SET)
  10130	032454	023727 	001430'	001200 		CMP	.FREPL+2,#.OBFLO ;;; [5.1041] LEAVE SOME POOL SPACE
  10131	032462	103407 				BCS	20$		;;; [5.1041] EXIT IF NOT ENOUGH LEFT (NOTE: CC-C SET)
  10132	032464					CALL	..ALCB		;;; ALL OK SO FAR -- ALLOCATE THE BUFFER
	032464	004737 	045654'			JSR	PC,..ALCB
  10133	032470	103404 				BCS	20$		;;; ALLOCATION FAILED (NOTE: CC-C SET)
  10134	032472	010160 	000002 			MOV	R1,T.HBCT(R0)	;;; SET THE NODE SIZE
  10135	032476	010037 	001300'			MOV	R0,TO11NP	;;; SAVE THE POINTER
  10136	032502				20$:
  10137	032502	012600 				MOV	(SP)+,R0	;;; RESTORE R0
  10138	032504					RETURN			;;; TO CALLER
	032504	000207 				RTS	PC
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 187
DTE-20 DRIVER -- START BYTE TRANSFER

  10140						.SBTTL	DTE-20 DRIVER -- START BYTE TRANSFER
  10141
  10142					;+
  10143					; STBXFR -- START A TO-11 BYTE TRANSFER
  10144					;
  10145					; THIS SUBROUTINE WILL START A TO-11 BYTE TRANSFER AND SAVE THE ADDRESS
  10146					; AND BYTE COUNT FOR END CHECKS
  10147					;
  10148					; INPUTS:
  10149					;
  10150					;	R0 -- POINTS TO THE DTE-20
  10151					;	R1 -- BYTE COUNT FOR TRANSFER
  10152					;	R2 -- ADDRESS FOR TRANSFER
  10153					;
  10154					; OUTPUTS:
  10155					;
  10156					;	NO REGISTERS ALTERED
  10157					;-
  10158
  10159	032506				STBXFR:
  10160	032506	010137 	001320'			MOV	R1,TO11BS	;;; SAVE THE BYTE COUNT
  10161	032512	010237 	001316'			MOV	R2,TO11AS	;;; AND THE ADDRESS
  10162	032516	010260 	000022 			MOV	R2,T11AD(R0)	;;; SET THE ADDRESS
  10163	032522	010160 	000016 			MOV	R1,T11BC(R0)	;;; SET THE BYTE COUNT AND START TRANSFER
  10164	032526					RETURN			;;; TO CALLER
	032526	000207 				RTS	PC
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 188
DTE-20 DRIVER -- LOAD TO-11 QUEUE NODE

  10166						.SBTTL	DTE-20 DRIVER -- LOAD TO-11 QUEUE NODE
  10167
  10168					;+
  10169					; LODNOD -- LOAD A TO-11 QUEUE NODE
  10170					;
  10171					; THIS SUBROUTINE WILL LOAD A TO-11 QUEUE DIRECT PACKET OR INDIRECT HEADER
  10172					; FROM A FIXED BUFFER ("TO11HD") IN LOW CORE
  10173					;
  10174					; INPUTS:
  10175					;
  10176					;	R5 -- POINTS TO HEAD OF NODE TO BE LOADED
  10177					;
  10178					; OUTPUTS:
  10179					;
  10180					;	R5 -- POINTS TO CURRENT BUFFER POSITION
  10181					;-
  10182
  10183	032530				LODNOD:
  10184	032530	032525 				BIT	(R5)+,(R5)+	;;; GET OVER THE LINK AND SIZE
  10185	032532	113725 	001304'			MOVB	TO11FN,(R5)+	;;; SET DOWN THE FUNCTION (E.FN+0)
  10186	032536	113725 	001302'			MOVB	TO11HD,(R5)+	;;; AND THE TRANSFER SIZE (E.FN+1)
  10187	032542	013725 	001306'			MOV	TO11DV,(R5)+	;;; AND THE DEVICE CODE (E.DV)
  10188	032546	013725 	001312'			MOV	TO11FW,(R5)+	;;; AND THE FIRST WORD (E.FW)
  10189	032552					RETURN			;;; TO CALLER
	032552	000207 				RTS	PC
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO M1113  03-APR-86 18:57  PAGE 189
DTE-20 DRIVER -- LOAD TO-11 QUEUE NODE

  10191
  10192						.TITLE	TTYDRR	- GENERAL TERMINAL HANDLER
  10193						.SBTTL	TERMINAL DRIVER -- COPYRIGHT STATEMENT
  10194	032554					IDENT$	15,06,RSX$$F
						.IDENT	/B15060/
  10195					;
  10196					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
  10197					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
  10198					;			ALL RIGHTS RESERVED.
  10199					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
  10200					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
  10201					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
  10202					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
  10203					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
  10204					;
  10205					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
  10206					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
  10207					;       CORPORATION.
  10208					;
  10209					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
  10210					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
  10211					;
  10212					;	VERSION 15-06
  10213					;
  10214					;	R. MC LEAN
  10215					;	07-APR-75
  10216					;
  10217					; TERMINAL DRIVER FOR DL-11W AND DL-11E LINE INTERFACES AND DH-11 LINE MULTIPLEX
  10218					;
  10219					; MODIFICATIONS:
  10220					;
  10221					;	NO.	DATE		PROGRAMMER	PURPOSE
  10222					;	---	----		----------	-------
  10223					;	001	08-NOV-76	K. RETI		ADD SUPPRESS SEND-ALL
  10224					;				R. BELANGER	CODE.
  10225					;	002	16-NOV-76	R. BELANGER	FIX TYPO IN EDIT 001
  10226					;	003	16-NOV-76	T. PORCHER	ADD CODE TO ALLOW CTY
  10227					;				R. BELANGER	TO BE MOVED
  10228					;	004	29-NOV-76	A. PECKHAM	RELOCATED ACKAL FOR LPT
  10229					;	005	03-FEB-77	R. BELANGER	ADDED GENERALIZED DL-11E
  10230					;						SERVICE AND NEW KLINIK
  10231					;						HOOKS AND HANDLES
  10232					;	006	07-MAR-77	A. PECKHAM	CLEAN UP "TT.OUT" MANAGEMENT
  10233					;	007	01-JUL-77	R. BELANGER	FIX BUG IN INTERNAL I/O INITIALIZATION
  10234					;	008	14-JUL-77	R. BELANGER	ADD AUTO-BAUD SUPPORT
  10235					;	009	10-AUG-77	R. BELANGER	FIX DL-11E INPUT TO IGNORE
  10236					;						CHARACTERS WITH FRAMING ERRORS
  10237					;						(DN-20 RUNNING OPEN ON POWERFAIL)
  10238					;	010	02-SEP-77	R. BELANGER	XON/XOFF BUG FIX
  10239					;	011	06-SEP-77	R. BELANGER	SHORTEN TIMEOUT COUNT TO 4 SECONDS
  10240					;	012	28-OCT-77	R. BELANGER	IGNORE DH-11 CHARACTERS WITH FRMING ERRORS
  10241					;	013	02-NOV-77	R. BELANGER	FIX LONG SENDALLS
  10242					;  TCO 4.2054	20-OCT-78	R. BELANGER	FIX BUG IN DH-11 ERROR LOGGING
  10243					;  TCO 4.2055	20-OCT-78	R. BELANGER	ADD DETACH ON RING FEATURE
  10244					;						FIX BUGS IN MODEM CONTROL
  10245					;  TCO 4.2095	30-NOV-78	R. BELANGER	ELIMINATE DH-11 POLLING ON CLOCK
  10246					;						SET DH-11 SILO ALARM TO 0
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 189-1
TERMINAL DRIVER -- COPYRIGHT STATEMENT

  10247					;  TCO 4.2096	30-NOV-78	R. BELANGER	FIX OUTPUT INTERRUPT SERVICE
  10248					;						TO ELIMINATE XOFF/XON RACE CONDITION
  10249					;  TCO 4.2103	04-DEC-78	R. BELANGER	ADD AUTO-BAUD CAPABILITY TO
  10250					;						1200 BAUD
  10251					;  TCO 4.2105	04-DEC-78	R. BELANGER	IGNORE RING INTERRUPTS IF
  10252					;						NOT IN PRIMARY PROTOCOL
  10253					;  TCO 4.2107	06-DEC-78	R. BELANGER	NEW KEEP-ALIVE ERROR RECOVERY
  10254					;  TCO 4.2140	02-JAN-78	R. BELANGER	INHIBIT REQUEST FOR "SETSPD"
  10255					;						FROM AUTO-BAUD DISCONNECT WHEN
  10256					;						PRIMARY PROTOCOL IS NOT RUNNING
  10257					;  TCO 4.2181	01-FEB-79	R. BELANGER	ADD INTERNAL XOFF PROCESSING
  10258					;  TCO 4.2205	08-MAR-79	R. BELANGER	ADD CODE TO SHUT OFF LINES AFTER
  10259					;						4 CONSECUTIVE FRAMING ERRORS,
  10260					;						LOG THE LINE SHUTDOWN,
  10261					;						AND TO REENABLE THEM ON TIMEOUT
  10262					;						REMOVE REFERENCE TO "TT.ECH"
  10263					;  TCO 4.2206	08-MAR-79	R. BELANGER	MODIFY DM-11/BB TIMEOUT TO
  10264					;						ALWAYS MAINTAIN INTERRUPT ENABLE
  10265					;  TCO 4.2211	12-MAR-79	R. BELANGER	ALLOW RSX20F TO ACCEPT TERMINAL
  10266					;				K. LEFEBVRE	INPUT WHILE IN PROTOCOL PAUSE
  10267					;						UNTIL FREE-POOL IS EXHAUSTED,
  10268					;						THEN CRASH (B01).
  10269					;  TCO 4.2244	05-APR-79	R. BELANGER	FIX DH-11 SILO LOCKUP ON LOCAL XOFF
  10270					;  TCO 4.2245	10-APR-79	R. BELANGER	ADD ERROR LOGGING FOR DH-11 FRAMING ERROR
  10271					;  TCO 4.2246	16-MAY-79	R. BELANGER	ELIMINATE RACE CONDITION IN SENDALLS
  10272					;  TCO 4.2247	29-MAY-79	R. BELANGER	FIX PDP-11 I/O DONE PROCESSING
  10273					;  TCO 4.2264	30-MAY-79	R. BELANGER	RESET AUTO-BAUD LINE SPEED TO 300
  10274					;						BAUD ON CARRIER LOSS.
  10275					;  TCO 4.2284	14-JUN-79	R. BELANGER	FIX CARRIER PROCESSING IN MODEM
  10276					;						CONTROL; SUPERCEDES TCO 4.2264.
  10277					;  TCO 4.2309	25-JUN-79	R. BELANGER	ADD BELL 212A MODEM SUPPORT.
  10278					;  TCO 4.2333	16-JUL-79	R. BELANGER	REJECT CHARACTERS FROM LINES WHICH
  10279					;						ARE IN CARRIER WAIT.
  10280					;  TCO 5.1004	12-SEP-79	R. BELANGER	ADD NON-CONTIGUOUS DEVICE SUPPORT
  10281					;  TCO 5.1007	10-OCT-79	R. BELANGER	ADD ERROR LOGGING FOR DL-11'S AND DM-11/BB'S
  10282					;  TCO 5.1008	11-OCT-79	R. BELANGER	ADD EBUS AND DEX ERROR LOGGING
  10283					;  TCO 5.1009	15-OCT-79	R. BELANGER	ADD RH-11 ERROR LOGGING
  10284					;  TCO 5.1015	25-OCT-79	R. BELANGER	ADD NEW TERMINAL INPUT CONTROL
  10285					;  TCO 5.1016	01-NOV-79	R. BELANGER	ADD BREAK-THROUGH WRITE
  10286					;  TCO 5.1017	01-NOV-79	R. BELANGER	DEFER ACKS IF FREE-POOL LOW
  10287					; TCO 4.1.1035	16-NOV-79	R. BELANGER	ADD QUEUE ARBITRATION MECHANISM
  10288					; TCO 4.1.1066	10-JAN-80	R. BELANGER	DEFER ACKS IN ROUND-ROBIN FASHION
  10289					; TCO 4.1.1088	12-FEB-80	R. BELANGER	FIX AUTO-BAUD NOISE PROBLEM
  10290					; TCO 4.1.1089	12-FEB-80	R. BELANGER	ALLOW FULL DUMP OF DH-11 SILOS
  10291					; TCO 4.1.1091	12-FEB-80	R. BELANGER	FIX MISSING DM-11BB PROBLEM
  10292					; TCO 4.1.1092	25-FEB-80	R. BELANGER	LOCAL INPUT CONTROL
  10293					; TCO 4.1.1104	05-MAR-80	R. BELANGER	CHANGE KEEP-ALIVE
  10294					; TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
  10295					; TCO 4.1.1121	19-MAR-80	R. BELANGER	DON'T DO KEEP-ALIVE IF DTE-20
  10296					;						IS BLOCKED
  10297					; TCO 4.1.1126	27-MAR-80	R. BELANGER	REMOVE SUPPORT FOR OLD-STYLE
  10298					;						<ESCAPE> CODES 175 AND 176
  10299					; TCO 4.1.1137	05-APR-80	R. BELANGER	REMOVE DEFERRED ACK SUPPORT
  10300					; TCO 5.1056	02-JUN-80	S. LEAPLINE	REMOVE CHECK FOR DTR IF NO CARRIER
  10301					; TCO 5.1099	08-JUL-80	S. LEAPLINE	DELAY EITHER 2 CHARACTERS OR
  10302					;						2 CLOCK TICKS BEFORE SETTING
  10303					;						INPUT SPEED TO 0
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 189-2
TERMINAL DRIVER -- COPYRIGHT STATEMENT

  10304					; TCO 5.1131	13-AUG-80	S. LEAPLINE	CORRECT TEST FOR RING IN DMINT
  10305					; RCO 9380	03-SEP-80	S. LEAPLINE	IGNORE RINGS FOR LOCAL LINES
  10306					; TCO 5.1149	17-SEP-80	S. LEAPLINE	CHECK FOR PARSER REQUEST ON CTY OUTPUT DONE
  10307					; TCO 5.1152	24-SEP-80	S. LEAPLINE	RESET ABW LINES CORRECTLY
  10308					; TCO 5.1246	26-JAN-81	S. LEAPLINE	ALLOW CTY AND KLINIK TO RUN AT
  10309					;						SPLIT SPEEDS
  10310					; TCO 5.1247	26-JAN-81	S. LEAPLINE	FIX BUG IN TERMINAL SHUTOFF CODE
  10311					; TCO 5.1248	26-JAN-81	S. LEAPLINE	REMOVE SAVE OF R0 IN XOFF/XON
  10312					; RCO 32681	26-MAR-81	S. LEAPLINE	ADD "BELL" TO OUTPUT IF NO
  10313					;						BUFFER SPACE AVAILABLE
  10314					; TCO 5.1011	25-AUG-81	S. LEAPLINE	CHECK FOR ERROR WHEN REQUESTING SETSPD
  10315					; TCO 5.1565	12-OCT-81	S. LEAPLINE	ACK CTY IF KLINIK IS IN USER MODE
  10316					;
  10317					; THE FOLLOWING CHANGES ARE POST V14-45
  10318					;
  10319					;14-OCT-82  TCO 6.1362	D. WEAVER
  10320					;	RE-WRITE $DMINT TO HANDLE MODEM CONTROL BETTER, IN PARTICULAR, CHECK
  10321					;	FOR CARRIER AFTER WE HAVE GOTTEN A RING INTERRUPT, AND DON'T BOTHER
  10322					;	CHECKING FOR SECONDARY RECEIVE INTERRUPTS, MAKE CODE MORE EFFICIENT
  10323					;	AND SAVE SPACE BY REMOVING REFERENCES TO .TTSCW AND .TTRNG.
  10324					;	MOVE ROUTINES .TTSCW AND .TTRNG TO .DLINT.
  10325					;14-OCT-82  TCO 6.1363	D. WEAVER
  10326					;	CHANGE TSTB .KLNMD TO TSTB .KLNSW IN .TTACK TO FIX CTY HANG WHEN KLINIK
  10327					;	ENABLED FOR REMOTE, BUT ACCESSED IN USER MODE.
  10328					;14-OCT-82  TCO 6.1361	D. WEAVER
  10329					;	.S2IDC GETS DECREMENTED WHEN IT SHOULDN'T, LEAVING LINES HUNG IN THE
  10330					;	DISABLED STATE.
  10331					;04-NOV-82  TCO 6.1360	D. WEAVER
  10332					;	LOCAL LINES GET ENABLED FOR MODEM INTERRUPTS WHEN THEY SHOULDN'T.
  10333					;09-NOV-82  TCO 6.1394	D.WEAVER
  10334					;	XOFF SENT WITH ODD PARITY RATHER THAN EVEN.
  10335					;24-NOV-82  TCO 6.1392	D.WEAVER
  10336					;	XOFF'S AND XON'S SENT WHEN TOPS20 SENDS STOP/START LINE QUEUED
  10337					;	PROTOCOL FUNCTION.  DON'T BOTHER, THIS WILL CAUSE OPEN LINES TO KEEP
  10338					;	RUNNING OPEN.
  10339					;28-FEB-83  TCO 6.1480	D.WEAVER
  10340					;	ELIMINATE POSSIBILITIES OF RACES WITH XOFF/XON.  STOP AND START OUTPUT
  10341					;	IN RSX20F RATHER THAN JUST STOPPING AND WAITING FOR TOPS10/TOPS20 TO
  10342					;	START THE OUTPUT.  BACKEND SUPPORT IS IN TOPS10 V7.02 AND TOPS20 V6.0.
  10343					;22-MAR-83  TCO 6.1567	D.WEAVER
  10344					;	ADD SUPPORT FOR 9600 AUTOBAUD SUPPORT.  THREE NEW BITS HAVE BEEN ADDED:
  10345					;	  TT.LSP - DOING LOW SPEED AUTOBAUD (IF CLEAR -- HIGH SPEED AUTOBAUD)
  10346					;	    LOW  = 110, 150
  10347					;	    HIGH = 1200, 1800, 2400, 4800, 9600
  10348					;	  TT.IGN - IGNORE NEXT CHARACTER
  10349					;	  TT.BRK - LAST CHARACTER WAS A BREAK
  10350					;	THESE BITS OVERLAP TT.RSI, TT.FEC AND TT.FEI WHICH ARE NOW ONLY USED
  10351					;	FOR NON-AUTOBAUD LINES.  LIKEWISE THE NEW BITS ARE ONLY USED ONLY FOR
  10352					;	AUTOBAUD LINES.  AUTOBAUD LINES CAN CURRENTLY ONLY BE REMOTE.
  10353					;	AUTOBAUD SPEEDS ARE 110, 150, 300, 1200, 1800, 2400, 4800 AND 9600.
  10354					;	4800 BAUD WILL ONLY AUTOBAUD WITH A ^C DUE TO THE FACT THAT A 4800
  10355					;	BAUD <CR> WILL OFTEN LOOK LIKE A 9600 BAUD <CR> WHEREAS ^C IS UNIQUE.
  10356					;28-JUN-83  TCO 6.1708	D.WEAVER
  10357					;	ADD NEW ROUTINE .DHSPA WHICH FALLS INTO .DHSPR THAT WILL RESET AN
  10358					;	AUTOBAUD LINE TO HIGH SPEED AUTOBAUD DETECT.  REPLACE CALLS TO .DHSPR
  10359					;	WITH .DHSPA IN THE HANGUP ROUTINES SO WE ALWAYS START WITH HIGH SPEED
  10360					;	AUTOBAUD DETECT.
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 189-3
TERMINAL DRIVER -- COPYRIGHT STATEMENT

  10361					;11-JUL-83  TCO 6.1722	D.WEAVER
  10362					;	ADD A NEW ROUTINE .DHSPZ WHICH ZEROES THE INPUT SPEED OF A DH11 LINE.
  10363					;	REPLACE BIC #S0.ISP,4(R4) WITH CALL .DHSPZ SO WE DON'T VIOLATE PDP11
  10364					;	PROTOCOLS BY DOING A BIC ON A WRITE ONLY REGISTER.
  10365					;11-JUL-83  TCO 6.1723	D.WEAVER
  10366					;	TIME OUT LOW SPEED AUTOBAUD WAIT.  DON'T JUST CHECK FOR 2
  10367					;	CONSECUTIVE FRAMING ERRORS TO SWITCH TO AUTOBAUD WAIT, CHECK FOR 2
  10368					;	CONSECUTIVE BREAKS INSTEAD.  CHANGE DEFINITION OF TT.FER TO TT.BRK
  10369					;	TO MORE ACCURATELY REFLECT THE BITS TRUE MEANING (LAST CHAR WAS A
  10370					;	BREAK).
  10371					;12-AUG-83  TCO 6.1771	D. WEAVER
  10372					;	ADD ROUTINE .DMUHU TO RAISE DTR FOR A REMOTE LINE.  USED BY DIALUP
  10373					;	ROUTINE IN QPRDRV.
  10374					;12-AUG-83  TCO 6.1772	D. WEAVER
  10375					;	IN $DMINT IF WE ARE IGNORING INTERRUPTS DUE TO LACK OF PRIMARY
  10376					;	PROTOCOL OR DM-11 ARE INHIBITED AND WE GET AN INTERRUPT, DROP
  10377					;	DTR AND RTS.  ALSO REMOVE EXTRANEOUS CODE IN .DMTMO THAT CHECKED
  10378					;	FOR RTS AND, IF SET, SET DTR.
  10379					;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 190
TERMINAL DRIVER -- DEFINITIONS

  10381						.SBTTL	TERMINAL DRIVER -- DEFINITIONS
  10382
  10383					;
  10384					; MACRO LIBRARY CALLS
  10385					;
  10386						.MCALL	.STKM,WTLO$,CLEF$,CALL,RETURN,WSIG$S,.INH5,.ENB5,.INH6,.ENB6
  10387						.MCALL	DIR$,RQST$,EHSG$,$DEF,.CRASH
  10388	032554					$DEF
  10389					;
  10390					; EQUATED SYMBOLS
  10391					;
  10392					; TERMINAL CONTROL BLOCK OFFSET DEFINITIONS
  10393					;
  10394					; FOR USE ONLY WITH CTY
  10395					;
  10396		000000 				STATS=0			; TERMINAL STATUS WORD (MUST BE ZERO)
  10397		000002 				STRBF=2			; CURRENT BUFFER ADDRESS (INPUT)
  10398		000004 				RMBYT=4			; REMAINING BYTES IN BUFFER (INPUT)
  10399		000005 				FNBYT=5			; TERMINAL BYTE (INPUT)
  10400		000006 				CURBF=6			; STARTING BUFFER ADDRESS (INPUT)
  10401		000010 				MECNT=10		; MULTI-ECHO BYTE COUNT
  10402		000011 				FLBYT=11		; FILL BYTE
  10403		000012 				MEBUF=12		; MULTI-ECHO BUFFER ADDRESS
  10404		000014 				MBUFR=14		; DYNAMIC MULTI-ECHO BUFFER
  10405		000016 				HORPS=16		; HORIZONTAL POSITION OF CARRIAGE
  10406		000020 				DHBUF=20		; DH-11 CHARACTER BUFFER
  10407					;
  10408					; TERMINAL STATUS WORD BIT DEFINITIONS
  10409					;
  10410		100000 				MODE=100000		; MODE OF BUSY TERMINAL (0=INPUT 1=OUTPUT)
  10411		074000 				LFCT=074000		; UNPROCESSED LINE FEED COUNT FIELD
  10412		004000 				LFBT=004000		; UNPROCESSED LINE FEED ADD/SUB BIT
  10413		002000 				CRTY=002000		; CARRIAGE CONTROL AT END OF LINE (1=YES)
  10414		001000 				CRJT=001000		; CARRIAGE RETURN JUST TYPED (1=YES)
  10415		000400 				EOLS=000400		; END OF LINE SEEN (1=YES)
  10416		000040 				CTLO=000040		; OUTPUT DISABLED (1=YES)
  10417		000020 				RUBP=000020		; RUBOUT SEQUENCE IN PROGRESS (1=YES)
  10418		000017 				FLCT=000017		; UNPROCESSED FILL COUNT FIELD
  10419		000001 				FLBT=000001		; UNPROCESSED FILL COUNT BIT
  10420					;
  10421					; TERMINAL STATUS OFFSETS FOR ALL TTY'S
  10422					;
  10423		000000 				THRED==0		; OUTPUT THREAD WORD POINTER (MUST BE ZERO)
  10424		000002 				TTYEXP==2		; EXTERNAL PAGE ADDRESS
  10425		000004 				STSW0==4		; STATUS WORD 0 (SAME AS DH-11 LINE STATUS WORD)
  10426									; HOLDS AUTO-BAUD REQUEST IN BIT 15
  10427									; HOLDS CONNECTED BIT IN BIT 14
  10428									; HOLDS LINE SPEED FOR DH-11'S
  10429									; HOLDS INPUT BLOCK FLAG FOR DL-11'S IN LOW BYTE
  10430		000006 				STSW1==6		; STATUS WORD 1 -- SPECIFIC CHARACTERISTICS
  10431					;
  10432					;	STSW0 DEFINITIONS
  10433					;
  10434		100000 				S0.ABR==100000		; [4.2284] AUTO-BAUD REPORT PENDING
  10435		040000 				S0.CON==040000		; [4.2284] REMOTE LINE IS CONNECTED
  10436		001700 				S0.ISP==001700		; [4.2205] INPUT SPEED FIELD MASK
  10437		036000 				S0.OSP==036000		; [4.2205] OUTPUT SPEED FIELD MASK
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 190-1
TERMINAL DRIVER -- DEFINITIONS

  10438		140000 				S0.MSK==S0.ABR!S0.CON	; [4.2284] BIT MASK FOR "SETSPD" TASK
  10439		037700 				S0.SPD==S0.OSP!S0.ISP	; [4.2205] TERMINAL SPEED MASK
  10440					;
  10441					;	STSW1 BIT DEFINITIONS
  10442					;
  10443					;	HIGH BYTE
  10444					;
  10445		140000 				TT.SND==140000		; INDEX OF NEXT SEND-ALL TO DO FOR THIS LINE
  10446		040000 				TT.SNI==040000		; TO INCREMENT SEND-ALL INDEX
  10447					;
  10448					; NOTE: THE NEXT THREE BITS MUST REMAIN CONTIGUOUS AND IN THE SAME ORDER!!
  10449					; THESE BITS ARE USED ONLY BY NON-AUTOBAUD LINES
  10450					;
  10451		020000 				TT.RSI==020000		; RESTART TERMINAL INPUT ON TIMEOUT
  10452		014000 				TT.FEC==014000		; FRAMING ERROR COUNT FIELD
  10453		004000 				TT.FEI==004000		; TO INCREMENT FRAMING ERROR COUNT
  10454					;
  10455					; NOTE: THE NEXT THREE BITS ARE USED BY AUTOBAUD LINES ONLY
  10456					;
  10457		020000 				TT.LSP==020000		; USING LOW SPEED AUTOBAUD TABLE
  10458		010000 				TT.IGN==010000		; IGNORE THE NEXT CHARACTER ON INPUT
  10459		004000 				TT.BRK==004000		; LAST CHARACTER WAS BREAK
  10460					;
  10461		002000 				TT.RIP==002000		; TTY REMOTE IN PROGRESS
  10462		001000 				TT.SIP==001000		; TTY SENDALL IN PROGRESS
  10463		000400 				TT.NSA==000400		; SUPPRESS SENDALLS
  10464					;
  10465					;	LOW BYTE
  10466					;
  10467		000200 				TT.XOF==000200		; TTY IS X'D OFF (WAS "TT.BSY")
  10468									; !!! MUST BE SIGN BIT OF LOW BYTE !!!!
  10469		000100 				TT.RMT==000100		; REMOTE FLAG
  10470		000040 				TT.ABL==000040		; AUTO-BAUD LINE
  10471		000020 				TT.XEN==000020		; [4.2181] XON/XOFF ENABLED ON THIS LINE
  10472		000010 				TT.ABW==000010		; LINE IS IN AUTO-BAUD WAIT
  10473		000004 				TT.CRW==000004		; WAITING FOR CARRIER FLAG
  10474		000002 				TT.CTY==000002		; TTY IS A CONSOLE TTY
  10475		000001 				TT.OUT==000001		; TTY OUTPUT FLAG
  10476					;
  10477					;	STSW2 DEFINITIONS
  10478					;
  10479		100000 				S2.DDN==BIT15		; [5.1015] INPUT IS X'D OFF
  10480		040000 				S2.DIP==BIT14		; [5.1015] INPUT XOFF SEQUENCE IS IN PROGRESS
  10481		020000 				S2.DIS==BIT13		; [5.1015] DEFERRED INPUT XOFF REQUEST
  10482		010000 				S2.ENB==BIT12		; [5.1015] DEFRRRED INPUT XON REQUEST
  10483		004000 				S2.LCL==BIT11		; [5.1015] INPUT XOFF LOCAL REQUEST
  10484		002000 				S2.RES==BIT10		; [4.1.1137] RESERVED FOR EXTENSION
  10485		001000 				S2.SSZ==BIT9		; [5.1015] SET INPUT SPEED TO ZERO
  10486		001400 				S2.CNT==BIT8!BIT9	; [5.1015] WAIT COUNT FIELD
  10487					;
  10488		000377 				S2.CHR==377		; [5.1016] LOW BYTE HOLDS DEFERRED BREAK-THROUGH WRITE CHARACTER
  10489					;
  10490					;	THREAD ENTRIES ARE IN THE FOLLOWING FORMAT
  10491					;
  10492		000000 				T.HRED==0		; THREAD WORD (MUST BE ZERO)
  10493		000002 				T.HBCT==2		; BYTE COUNT OF THIS BUFFER
  10494		000004 				T.HCAD==4		; CURRENT ADDRESS OF THIS POINTER
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 190-2
TERMINAL DRIVER -- DEFINITIONS

  10495		000006 				T.HCBC==6		; CURRENT BYTE COUNT OF CARS LEFT IN BUFFER
  10496		000007 				T.HFCN==7		; FUNCTION CODE
  10497		000010 				T.HHDS==10		; SIZE OF THIS HEADER
  10498					;
  10499					;	DL-11E RCSR BITS
  10500					;
  10501		100000 				DL.DSC==BIT15		; DL-11E DATASET STATUS CHANGE
  10502		040000 				DL.RNG==BIT14		; DL-11E RING INDICATOR
  10503		020000 				DL.CTS==BIT13		; DL-11E CLEAR TO SEND
  10504		010000 				DL.CAR==BIT12		; DL-11E CARRIER DETECT
  10505		004000 				DL.RAC==BIT11		; DL-11E RECIEVER ACTIVE
  10506		002000 				DL.SRD==BIT10		; DL-11E SECONDARY RECIEVED DATA
  10507		000200 				DL.RDN==BIT7		; DL-11E RECIVER DONE
  10508		000100 				DL.REN==BIT6		; DL-11E RECIEVER INTERRUPT ENABLE
  10509		000040 				DL.DEN==BIT5		; DL-11E DATASET INTERRUPT ENABLE
  10510		000010 				DL.STD==BIT3		; DL-11E SECONDARY TRANSMITTED DATA
  10511		000004 				DL.RTS==BIT2		; DL-11E REQUEST TO SEND
  10512		000002 				DL.DTR==BIT1		; DL-11E DATA TERMINAL READY
  10513		000001 				DL.RDE==BIT0		; DL-11E READER ENABLE
  10514		001420 				DL.UNA==BIT9!BIT8!BIT4	; DL-11E UNASSIGNED
  10515					;
  10516					;	DL-11E RBUF BITS
  10517					;
  10518		020000 				DL.FER==BIT13		; DL-11 FRAMING ERROR
  10519					;
  10520					;	DL-11E XCSR BITS
  10521					;
  10522		000100 				DL.XEN==BIT6		; DL-11E XMTR ENABLE
  10523					;
  10524					;	DH-11 NRCR BITS
  10525					;
  10526		020000 				DH.FER==BIT13		; DH-11 FRAMING ERROR
  10527					;
  10528					; SPECIAL CHARACTER DEFINITIONS
  10529					;
  10530		000011 				C.HTAB==11		; HORIZONTAL TAB CHARACTER
  10531		000012 				C.HLFD==12		; LINE FEED CHARACTER
  10532		000013 				C.HVTB==13		; VERTICAL TAB CHARACTER
  10533		000014 				C.HFFD==14		; FORM FEED CHARACTER
  10534		000015 				C.HCRT==15		; CARRIARGE RETURN CHARACTER
  10535		000021 				C.HXON==21		; XON CHARACTER
  10536		000023 				C.HXOF==23		; XOFF CHARACTER
  10537		000032 				C.HEOF==32		; END-OF-FILE CHARACTER
  10538		000033 				C.HESC==33		; ESCAPE CHARACTER
  10539		000033 				C.HALT==C.HESC		; ALIAS ALT-MODE
  10540		000040 				C.HSPC==40		; SPACE CHARACTER
  10541		000200 				C.HPAR==200		; PARITY BIT
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 191
TERMINAL DRIVER -- DEFINITIONS

  10543	032554				TTYHD::
  10544	032554					.STKM	0,0,0,0,0,0,0,TTINI,174000,TTYSP
	032622	000000 	000000 	000000 		.WORD	0,0,0,0
	032630	000000
	032650	174000 	033254'	033034'		.WORD	174000,TTINI,TTYSP
	032704	000005 				.WORD	5
	032706	010262'				.WORD	TTPEN
	032710	000000 				.WORD	0
	032712	000000 				.WORD	0
	032714	000000 				.WORD	0
	032716	000000 				.WORD	0
	032720	000000 				.WORD	0
	032722	000000 				.WORD	0
	032724	000000 				.WORD	0
	032726	000000 				.WORD	0
	032730	000000 				.WORD	0
	032732	000000 				.WORD	0
	033034	000000 				.WORD	0
	033036	000000 				.WORD	0
	033040	000000 				.WORD	0
	033042	000000 				.WORD	0
	033044	000000 				.WORD	0
	033046	000000 				.WORD	0
	033050	033254'				.WORD	TTINI
	033052	174000 				.WORD	174000
  10545					;
  10546					; LOCAL DATA
  10547					;
  10548					;
  10549					; CONTROL OUTPUT MESSAGES
  10550					;
  10551	033054				CTRLC:
  10552	033054	   136 	   103 	   015 		.ASCII	/^C/<15><12>
	033057	   012
  10553	033060				CTRLU:
  10554	033060	   136 	   125 	   015 		.ASCII	/^U/<15><12>
	033063	   012
  10555	033064				CTRLZ:
  10556	033064	   136 	   132 	   015 		.ASCII	/^Z/<15><12>
	033067	   012
  10557
  10558	033070				TTWLO:
  10559	033070					WTLO$	1,EF.NIR!EF.IOD!EF.TMO!EF.RQM!EF.RKR!EF.RKH!EF.RSS
	033070	   053 	   003 			.BYTE	43.,3
	033072	000001 				.WORD	1
	033074	007330 				.WORD	EF.NIR!EF.IOD!EF.TMO!EF.RQM!EF.RKR!EF.RKH!EF.RSS
  10560	033076				EXKAL:
  10561	033076					EHSG$	0,PSWW1,KPAL0
	033076	002411 				.WORD	400*5.+DR.DTE
	033100	000010 				.WORD	DF.EHG
	033102	000005 				.WORD	PSWW1
	033104	001404'				.WORD	KPAL0
	033106	000000 				.WORD	0
  10562	033110				RQMCR:
  10563	033110					RQST$	PARSER,,249.
	033110	   013 	   007 			.BYTE	11.,7
	033112	062072 	073632 			.RAD50	/PARSER/
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 191-1
TERMINAL DRIVER -- DEFINITIONS

	033116	000000 	000000 			.WORD	0,0
	033122	000371 				.WORD	249.
	033124	   000 	   000 			.BYTE	,
  10564	033126				RQKLR:
  10565	033126					RQST$	KLRING,,10
	033126	   013 	   007 			.BYTE	11.,7
	033130	043262 	035167 			.RAD50	/KLRING/
	033134	000000 	000000 			.WORD	0,0
	033140	000010 				.WORD	10
	033142	   000 	   000 			.BYTE	,
  10566	033144				RQKLD:
  10567	033144					RQST$	KLDISC,,10
	033144	   013 	   007 			.BYTE	11.,7
	033146	043244 	035473 			.RAD50	/KLDISC/
	033152	000000 	000000 			.WORD	0,0
	033156	000010 				.WORD	10
	033160	   000 	   000 			.BYTE	,
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 192
TERMINAL DRIVER -- DEFINITIONS

  10569					;
  10570					;	TABLES FOR AUTO BAUD UP TO 9600 BAUD (LOW BIT IS MASKED OFF)
  10571					;
  10572		000376 			HSPMSK=376			;MASK FOR UNWANTED BITS (HIGH SPEED AUTOBAUD)
  10573		000000 			LSPCHR=000			;CHAR TO SWITCH TO LOW SPEED DETECT
  10574
  10575	033162				LSPTAB::
  10576	033162	   174 				.BYTE	174		;110 BAUD ^C
  10577	033163	   234 				.BYTE	234		;110 BAUD CR
  10578	033164	   214 				.BYTE	214		;110 BAUD CR
  10579	033165	   346 				.BYTE	346		;150 BAUD CR
  10580	033166	   036 				.BYTE	036		;150 BAUD ^C
  10581	033167	   003 				.BYTE	003
  10582	033170	   203 				.BYTE	203
  10583	033171	   015 				.BYTE	015
  10584	033172	   215 				.BYTE	215
  10585		000011 			LSPTLN= .-LSPTAB		;END OF TABLE
  10586					;
  10587					;HIGH SPEED TABLE (NOTE THAT HSPMSK MASKS CHARACTERS BEFORE COMPARE)
  10588					;NOTE: THIS TABLE MUST FOLLOW LSPTAB!
  10589					;
  10590	033173				HSPTAB::
  10591	033173	   036 				.BYTE	036		;1200 BAUD ^C, ODD OR EVEN
  10592	033174	   346 				.BYTE	346		;1200 BAUD CR, ODD OR EVEN
  10593	033175	   006 				.BYTE	006		;1800 BAUD ^C, ODD OR EVEN
  10594	033176	   072 				.BYTE	072		;1800 BAUD CR, ODD OR EVEN
  10595	033177	   002 				.BYTE	002		;2400 BAUD ^C, EVEN
  10596	033200	   202 				.BYTE	202		;2400 BAUD ^C, ODD
  10597	033201	   214 				.BYTE	214		;2400 BAUD CR, EVEN
  10598	033202	   014 				.BYTE	014		;2400 BAUD CR, ODD
  10599	033203	   370 				.BYTE	370		;4800 BAUD ^C, ODD (ONLY ^C FOR 4800 BAUD)
  10600	033204	   360 				.BYTE	360		;4800 BAUD ^C, EVEN
  10601	033205	   374 				.BYTE	374		;4800 BAUD ^C, EVEN
  10602	033206	   376 				.BYTE	376		;9600 BAUD ^C OR CR, ODD OR EVEN
  10603		000014 			HSPTLN= .-HSPTAB		;END OF TABLE
  10604					;
  10605					;TABLE OF LOW SPEED INDEX'S
  10606					;
  10607		000200 			LSP.IG=200			;THROW AWAY NEXT CHAR AFTER AB CHAR (SIGN BIT)
  10608		000017 			LSP.SP=017			;MASK FOR SPEED INDEX
  10609
  10610	033207				LSPSPD::
  10611	033207	   000 				.BYTE	00		;110 BAUD ^C
  10612	033210	   200 				.BYTE	LSP.IG!00	;110 BAUD CR
  10613	033211	   200 				.BYTE	LSP.IG!00	;110 BAUD CR
  10614	033212	   201 				.BYTE	LSP.IG!01	;150 BAUD CR
  10615	033213	   001 				.BYTE	01		;150 BAUD ^C
  10616	033214	   002 				.BYTE	02
  10617	033215	   002 				.BYTE	02
  10618	033216	   002 				.BYTE	02
  10619	033217	   002 				.BYTE	02
  10620					;
  10621					;TABLE OF HIGH SPEED INDEX'S
  10622					;NOTE: HSPTAB MUST FOLLOW LSPTAB!
  10623					;
  10624	033220				HSPSPD::
  10625	033220	   003 				.BYTE	03		;1200 BAUD ^C
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 192-1
TERMINAL DRIVER -- DEFINITIONS

  10626	033221	   203 				.BYTE	LSP.IG!03	;1200 BAUD CR
  10627	033222	   004 				.BYTE	04		;1800 BAUD ^C
  10628	033223	   004 				.BYTE	04		;1800 BAUD CR
  10629	033224	   005 				.BYTE	05		;2400 BAUD ^C
  10630	033225	   005 				.BYTE	05		;2400 BAUD ^C
  10631	033226	   005 				.BYTE	05		;2400 BAUD CR
  10632	033227	   005 				.BYTE	05		;2400 BAUD CR
  10633	033230	   006 				.BYTE	06		;4800 BAUD ^C
  10634	033231	   006 				.BYTE	06		;4800 BAUD ^C
  10635	033232	   006 				.BYTE	06		;4800 BAUD ^C
  10636	033233	   007 				.BYTE	07		;9600 BAUD ^C, CR
  10637						.EVEN
  10638
  10639					;DH11 HARDWARE SPEEDS
  10640
  10641	033234				SPDPAR::
  10642	033234	006307 				.WORD	06307		;00  110 BAUD 8 BIT NO PARITY 2 STOP
  10643	033236	012503 				.WORD	12503		;01  150 BAUD 8 BIT NO PARITY 1 STOP
  10644	033240	016703 				.WORD	16703		;02  300 BAUD 8 BIT NO PARITY 1 STOP
  10645	033242	023103 				.WORD	23103		;03 1200 BAUD 8 BIT NO PARITY 1 STOP
  10646	033244	025203 				.WORD	25203		;04 1800 BAUD 8 BIT NO PARITY 1 STOP
  10647	033246	027303 				.WORD	27303		;05 2400 BAUD 8 BIT NO PARITY 1 STOP
  10648	033250	031403 				.WORD	31403		;06 4800 BAUD 8 BIT NO PARITY 1 STOP
  10649	033252	033503 				.WORD	33503		;07 9600 BAUD 8 BIT NO PARITY 1 STOP
  10650
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 193
TERMINAL DRIVER -- TTINI (TTY QUEUE SERVICE)

  10652						.SBTTL	TERMINAL DRIVER -- TTINI (TTY QUEUE SERVICE)
  10653
  10654						.ENABL	LSB
  10655
  10656					;
  10657					; TERMINAL DRIVER EVENT FLAG SERVICE
  10658					;
  10659
  10660	033254				TTINI::
  10661	033254					DIR$	#TTWLO		; WAIT FOR TTY
	033254	012746 	033070'			MOV	#TTWLO,-(SP)
	033260	104375 				EMT	375
  10662	033262					.INH6			;;; INHIBIT TASK SWITCHING
	033262	013746 	177776 			MOV	@#PS,-(SP)
	033266	112737 	000300 	177776 		MOVB	#300,@#PS
  10663	033274	013705 	001006'			MOV	.CRTSK,R5	;;; FIND THE CURRENT TASK POINTER
  10664	033300	016504 	000020 			MOV	A.EF(R5),R4	;;; FIND EVENT FLAGS
  10665	033304	005065 	000020 			CLR	A.EF(R5)	;;; CLEAR EVENT FLAGS
  10666	033310					.ENB6			; ENABLE TASK SWITCHING
	033310	012637 	177776 			MOV	(SP)+,@#PS
  10667	033314	010446 				MOV	R4,-(SP)	; [4.2247] STACK THE EVENT FLAGS
  10668	033316	032716 	000200 			BIT	#EF.RQM,(SP)	; [4.2247] REQUEST MCR??
  10669	033322	001406 				BEQ	10$		; NO -- MUST BE SOMETHING ELSE
  10670	033324	152737 	000002 	011362'		BISB	#M.PARQ,.MISC	; SET PRIORITY INPUT REQUEST
  10671	033332					DIR$	#RQMCR		; YES -- REQUEST PARSER
	033332	012746 	033110'			MOV	#RQMCR,-(SP)
	033336	104375 				EMT	375
  10672	033340				10$:
  10673	033340	032716 	001000 			BIT	#EF.RKR,(SP)	; [4.2247] KLINIK RING INTERRUPT??
  10674	033344	001403 				BEQ	15$		; NO -- FORGET IT
  10675	033346					DIR$	#RQKLR		; YES -- REQUEST KLRING
	033346	012746 	033126'			MOV	#RQKLR,-(SP)
	033352	104375 				EMT	375
  10676	033354				15$:
  10677	033354	032716 	002000 			BIT	#EF.RKH,(SP)	; [4.2247] KLINIK HANGUP??
  10678	033360	001403 				BEQ	20$		; NO -- GO ON
  10679	033362					DIR$	#RQKLD		; YES -- REQUEST KLDISC
	033362	012746 	033144'			MOV	#RQKLD,-(SP)
	033366	104375 				EMT	375
  10680	033370				20$:
  10681	033370	032716 	004000 			BIT	#EF.RSS,(SP)	; [4.2247] AUTO-BAUD REQUEST??
  10682	033374	001417 				BEQ	30$		; NO -- GO ON
  10683	033376	005737 	002610'			TST	.ABFLG		; YES -- INTERLOCK SET??
  10684	033402	001014 				BNE	30$		; YES -- GO ON
  10685	033404	013737 	002606'	002610'	25$:	MOV	.ABCNT,.ABFLG	; NO -- REAL REQUEST??
  10686	033412	001410 				BEQ	30$		; NO -- IGNORE IT
  10687	033414					DIR$	#.RQSPD		; YES -- REQUEST "SETSPD"
	033414	012746 	025226'			MOV	#.RQSPD,-(SP)
	033420	104375 				EMT	375
  10688	033422	103004 				BCC	30$		; [5.1011] ERROR FREE ??
  10689	033424					WSIG$S			; [5.1011] NO, WAIT A BIT
	033424	012746 				MOV	(PC)+,-(SP)
	033426	   061 	   001 			.BYTE	49.,1
	033430	104375 				EMT	375
  10690	033432	000764 				BR	25$		; [5.1011] RETRY THE REQUEST
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 194
TERMINAL DRIVER -- TIMEOUT SERVICE

  10692						.SBTTL	TERMINAL DRIVER -- TIMEOUT SERVICE
  10693
  10694	033434				30$:
  10695	033434	032716 	000100 			BIT	#EF.TMO,(SP)	; [4.2247] TIMEOUT??
  10696	033440	001431 				BEQ	45$		; [5.1008] NO -- GO ON
  10697	033442					.INH5			; [4.2309] YES -- DISALLOW TERMINAL INTERRUPTS
	033442	013746 	177776 			MOV	@#PS,-(SP)
	033446	112737 	000240 	177776 		MOVB	#240,@#PS
  10698	033454	105337 	002670'			DECB	TMOCNT+0	;;; [4.2309] ONLY DO TIMEOUT EVERY 10 SEC
  10699	033460	001007 				BNE	35$		;;; [5.1008] NOT YET -- SEE ABOUT ERROR LOGGING
  10700	033462	112737 	000012 	002670'		MOVB	#^D10,TMOCNT+0	;;; [4.2309] RESET TIMEOUT COUNT
  10701	033470					CALL	.DHTMO		;;; [4.2205] CHECK FOR TIMEOUT ON DM-11/BB'S AND DH-11'S
	033470	004737 	042030'			JSR	PC,.DHTMO
  10702	033474					CALL	.DLTMO		;;; CHECK FOR TIMEOUT ON DL-11E'S
	033474	004737 	041520'			JSR	PC,.DLTMO
  10703	033500				35$:
  10704	033500	105337 	002671'			DECB	TMOCNT+1	;;; [4.2309] MODEM TIMEOUT DUE??
  10705	033504	001005 				BNE	40$		;;; [5.1008] NO -- GO ON
  10706	033506	112737 	000026 	002671'		MOVB	#^D22,TMOCNT+1	;;; [4.2309] YES -- RESET TIMEOUT COUNT
  10707	033514					CALL	.DMTMO		;;; [4.2309] AND CHECK DM-11/BB'S
	033514	004737 	042336'			JSR	PC,.DMTMO
  10708	033520				40$:
  10709	033520					.ENB5			;;; [4.2054] ALLOW INTERRUPTS
	033520	012637 	177776 			MOV	(SP)+,@#PS
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 195
TERMINAL DRIVER -- ACK ALL SERVICE

  10711						.SBTTL	TERMINAL DRIVER -- ACK ALL SERVICE
  10712
  10713	033524				45$:
  10714	033524	005737 	001164'			TST	.ACKAL		; ACK ALL REQUESTED??
  10715	033530	001424 				BEQ	50$		; NO -- CONTINUE
  10716	033532	005037 	001164'			CLR	.ACKAL		; YES -- CLEAR FLAG
  10717	033536	012703 	000005 			MOV	#D.CLPT,R3	; SET LINE ALLOCATION ON LPT
  10718	033542	012704 	000214 			MOV	#140.,R4	; 140 BYTES
  10719	033546	012701 	000023 			MOV	#BC.SLA,R1	; SET LINE ALLOCATION
  10720	033552					CALL	..STFC
	033552	004737 	046714'			JSR	PC,..STFC
  10721	033556	062704 	000400 			ADD	#400,R4		; ALSO LPT1
  10722	033562					CALL	..STFC
	033562	004737 	046714'			JSR	PC,..STFC
  10723	033566	012701 	000025 			MOV	#BC.AKA,R1	; SEND ACK ALL
  10724	033572	012703 	000007 			MOV	#7,R3		; RANDOM FUNCTION CODE (ZERO A BAD IDEA HERE)
  10725									; DON'T CARE ABOUT FIRST WORD SENT
  10726	033576					CALL	..STFC		; START ACK FUNCTION
	033576	004737 	046714'			JSR	PC,..STFC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 196
TERMINAL DRIVER -- QUEUED PROTOCOL KEEP-ALIVE SERVICE

  10728						.SBTTL	TERMINAL DRIVER -- QUEUED PROTOCOL KEEP-ALIVE SERVICE
  10729
  10730					;+
  10731					; QUEUED PROTOCOL KEEP-ALIVE SERVICE
  10732					;
  10733					; THE QUEUED PROTOCOL KEEP-ALIVE SERVICE IS DONE AS PART OF THE TERMINAL
  10734					; DRIVER TIMEOUT SERVICE AS IS IT CONVENIENT AND ELIMINATESS THE NEED FOR
  10735					; A SEPARATE QUEUED PROTOCOL TIMEOUT SERVICE TASK.
  10736					;
  10737					; NO KEEP-ALIVE CHECKING OR MAINTENANCE WILL BE DONE IF THE FRONT-END IS NOT
  10738					; RUNNING PRIMARY PROTOCOL.
  10739					;
  10740					; KEEP-ALIVE MAINTENANCE IS ALWAYS DONE WHILE THE FRONT-END IS IN PRIMARY
  10741					; PROTOCOL BUT KEEP-ALIVE CHECKING IS DONE ONLY IF ".NOERR" IS CLEAR (ERRORS
  10742					; ARE TO BE IGNORED)
  10743					;
  10744					; THE HOST'S KEEP-ALIVE COUNT IS EXAMINED ONCE PER TIMEOUT AND CHECKED TO
  10745					; VERIFY THAT THE KEEP-ALIVE COUNT IS CHANGING. IF THE EXAMINE FAILS, THE
  10746					; HOST IS ASSUMED TO BE DEAD, AND THE ERROR IS IGNORED AT THIS LEVEL.
  10747					;
  10748					; IF THE EXAMINE SUCCEEDS AND THE HOST KEEP-ALIVE COUNT IS CHANGING, ALL IS
  10749					; WELL AND THE KEEP-ALIVE RETRY COUNTER, ".KPAC+0", IS RESET IN CASE THIS IS
  10750					; A CONTINUATION. THE CONTINUATION ATTEMPT IS MARKED BY DRIVING ".KPAC+1"
  10751					; NON-ZERO.
  10752					;
  10753					; IF THE HOST'S KEEP-ALIVE COUNT HAS NOT CHANGED, THE HOST IS ALLOWED 5 TIMEOUT
  10754					; PERIODS FOR THE KEEP-ALIVE COUNT TO BEGIN CHANGING. IF THIS TIME EXPIRES
  10755					; WITH NO RESUMPTION OF KEEP-ALIVE COUNTING, THE ERROR IS FLAGGED AND "TKTN"
  10756					; INVOKED.
  10757					;
  10758					; ON THE FIRST KEEP-ALIVE-CEASE, KLINIT (Q.V.) WILL EXECUTE THE KL10 INSTRUCTION
  10759					; IN LOCATION 71 IN ORDER THAT THE KL10 ATTEMPT TO DO SOMETHING ON ITS OWN ABOUT
  10760					; THE ERROR. THE FRONT-END WILL WAIT ONE KEEP-ALIVE PERIOD FOR THIS TO HAPPEN.
  10761					; IF THE SECOND KEEP-ALIVE PERIOD EXPIRES, A FULL ERROR DUMP AND RELOAD OF THE
  10762					; HOST IS REQUESTED.
  10763					;
  10764					; IN ALL CASES, THE FRONT-END WILL ATTEMPT TO CONTINUE ITS HALF OF THE KEEP-ALIVE
  10765					; DIALOG.
  10766					;-
  10767
  10768	033602				50$:
  10769	033602	032716 	000100 			BIT	#EF.TMO,(SP)	; [4.2247] IS THIS A CLOCK REQUEST??
  10770	033606	001507 				BEQ	95$		; [4.2247] NO -- GO ON
  10771	033610	005737 	001012'			TST	.COMEF+2	; [4.1.1105] YES -- ARE WE IN PRIMARY PROTOCOL??
  10772	033614	100104 				BPL	95$		; [4.1.1105] NO -- DON'T WORRY ABOUT KEEP-ALIVE
  10773	033616	005737 	001122'			TST	.NOERR		; [4.2107] YES -- DO WE CARE ABOUT HIS KEEP-ALIVE??
  10774	033622	001041 				BNE	80$		; [4.2107] NO -- GO ON
  10775	033624					DIR$	#EXKAL		; [4.2107] YES -- READ HOST KEEP-ALIVE COUNTER
	033624	012746 	033076'			MOV	#EXKAL,-(SP)
	033630	104375 				EMT	375
  10776	033632	103435 				BCS	80$		; [4.2107] HOST IS ALREADY DEAD IF CC-C IS SET
  10777	033634	123737 	001404'	001412'		CMPB	KPAL0,OKPAL0	; [4.2107] IS HIS COUNT CHANGING??
  10778	033642	001023 				BNE	70$		; [4.2107] YES -- GO ON
  10779	033644	105337 	001416'			DECB	.KPAC+0		; [4.2107] NO -- IS HE DEAD??
  10780	033650	003023 				BGT	75$		; [4.2107] NO -- NOT YET, ANYWAY
  10781	033652				55$:
  10782	033652	105337 	001417'			DECB	.KPAC+1		; [4.2107] YES -- SECOND TIME??
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 196-1
TERMINAL DRIVER -- QUEUED PROTOCOL KEEP-ALIVE SERVICE

  10783	033656	100404 				BMI	60$		; [4.2107] YES -- GO ON
  10784	033660	005737 	001420'			TST	.KACFL		; [4.2107] NO -- RETRIES ALLOWED??
  10785	033664	001005 				BNE	65$		; [4.2107] YES -- GO ON
  10786	033666	000771 				BR	55$		; [4.2107] NO -- FORCE SECOND ERROR
  10787						;
  10788					;
  10789					; HERE ON SECOND KEEP-ALIVE ERROR
  10790					;
  10791	033670				60$:
  10792	033670					CALL	..DTSP		; [4.2107] KILL ALL PROTOCOLS
	033670	004737 	050226'			JSR	PC,..DTSP
  10793	033674	105237 	001122'			INCB	.NOERR		; [4.2107] INDICATE WE ARE SERVICING A REAL ERROR
  10794					;
  10795					; HERE ON FIRST KEEP-ALIVE ERROR
  10796					;
  10797	033700				65$:
  10798	033700	052737 	000020 	001126'		BIS	#KS.CST,.KLITK	; [4.2107] FLAG THE ERROR
  10799	033706	105237 	001124'			INCB	.TKTN		; [4.2107] REQUEST TKTN
  10800					;
  10801					; HERE WHEN HIS KEEP-ALIVE IS RUNNING OR HAS TIMED OUT
  10802					;
  10803	033712				70$:
  10804	033712	112737 	000005 	001416'		MOVB	#.KALSC,.KPAC+0	; [4.2107] RESET RETRY COUNTER
  10805	033720				75$:
  10806	033720	013737 	001404'	001412'		MOV	KPAL0,OKPAL0	; [4.2107] SAVE HIS COUNT FOR THE NEXT TIME AROUND
  10807					;
  10808					; INCREMENT AND TRANSMIT OUR KEEP-ALIVE COUNT
  10809					;
  10810	033726				80$:
  10811	033726	005737 	001402'			TST	.DTBLK		; [4.1.1121] IS THE DTE-20 BLOCKED??
  10812	033732	001013 				BNE	85$		; [4.1.1121] YES -- GO ON
  10813	033734					.INH6			; [4.1.1104] NO -- DISALLOW INTERRUPTS
	033734	013746 	177776 			MOV	@#PS,-(SP)
	033740	112737 	000300 	177776 		MOVB	#300,@#PS
  10814	033746	013700 	001366'			MOV	.PRDTE,R0	;;; [4.1.1104] POINT TO THE DTE-20
  10815	033752					CALL	.KPALV		;;; [4.1.1104] DO KEEP-ALIVE
	033752	004737 	032144'			JSR	PC,.KPALV
  10816	033756					.ENB6			;;; [4.1.1104] ALLOW INTERRUPTS
	033756	012637 	177776 			MOV	(SP)+,@#PS
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 197
TERMINAL DRIVER -- GENERAL ERROR LOGGING

  10818						.SBTTL	TERMINAL DRIVER -- GENERAL ERROR LOGGING
  10819
  10820	033762				85$:
  10821	033762	012704 	002662'			MOV	#.TTELQ,R4	; [4.2245] POINT TO TERMINAL ERROR LOG QUEUE
  10822	033766	012703 	000004 			MOV	#D.CDLS,R3	; [5.1008] DEVICE CODE TO R3
  10823	033772					CALL	..ERLG		; [5.1008] DO TERMINAL ERROR LOGGING
	033772	004737 	044450'			JSR	PC,..ERLG
  10824	033776	012703 	000202 			MOV	#D.CDTE,R3	; [5.1008] DEVICE CODE TO R3
  10825	034002	012704 	001374'			MOV	#.EBPEQ,R4	; [5.1008] POINT TO DTE-20 ERROR LOG QUEUE
  10826	034006					CALL	..ERLG		; [5.1008] DO DTE-20 ERROR LOGGING
	034006	004737 	044450'			JSR	PC,..ERLG
  10827	034012	012703 	000203 			MOV	#D.CRJP,R3	; [5.1009] DEVICE CODE TO R3
  10828	034016	012704 	005544'			MOV	#.RPELQ,R4	; [5.1009] POINT TO ERROR LOG QUEUE
  10829	034022					CALL	..ERLG		; [5.1009] DO RH-11 ERROR LOGGING
	034022	004737 	044450'			JSR	PC,..ERLG
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 198
TERMINAL DRIVER -- CTY SERVICE

  10831						.SBTTL	TERMINAL DRIVER -- CTY SERVICE
  10832
  10833	034026				95$:
  10834	034026	032726 	000020 			BIT	#EF.IOD,(SP)+	; [4.2247] I/O DONE??
  10835	034032	001076 				BNE	105$		; [4.2247] YES -- HANDLE THAT FIRST
  10836	034034	005737 	002740'			TST	TTPKT		; NO -- CHECK PACKET
  10837	034040	001166 				BNE	TTINO		; PACKET IN USE -- WAIT
  10838	034042				DQNXT:
  10839	034042					.INH6			; DISALLOW INTERRUPTS
	034042	013746 	177776 			MOV	@#PS,-(SP)
	034046	112737 	000300 	177776 		MOVB	#300,@#PS
  10840	034054	132737 	000002 	011362'		BITB	#M.PARQ,.MISC	; PRIORTY INPUT REQUEST ?
  10841	034062	001017 				BNE	97$		; BRANCH IF YES
  10842	034064	105737 	001234'			TSTB	.KLNSW		;;; IS KLINIK ACTIVE ?
  10843	034070	003406 				BLE	100$		;;; NO -- GO ON
  10844	034072	013700 	002644'			MOV	KLNPTR,R0	;;; KLINIK LINE POINTER TO R0
  10845	034076	032760 	000001 	000006 		BIT	#TT.OUT,STSW1(R0) ;;; IS IT BUSY ??
  10846	034104	001142 				BNE	TTINX		;;; YES -- WAIT A WHILE
  10847	034106				100$:
  10848	034106	013700 	002642'			MOV	CTYPTR,R0	;;; CHECK AND WAIT FOR I/O FROM 10 TO STOP
  10849	034112	032760 	000001 	000006 		BIT	#TT.OUT,STSW1(R0) ;;; OUTPUT IN PROGRESS ?
  10850	034120	001134 				BNE	TTINX		;;; YES -- GO ON
  10851	034122				97$:
  10852	034122	012700 	052124 			MOV	#"TT,R0		;;; NO -- SET UP TO DEQUEUE FROM TTY LUN
  10853	034126					CALL	..DQRN		;;; GET AN I/O PACKET TO PROCESS
	034126	004737 	044670'			JSR	PC,..DQRN
  10854	034132	103527 				BCS	TTINX		;;; IF CC-C IS SET CONTROLLER BUSY OR NO REQUEST
  10855	034134	005237 	002640'			INC	.TTP11		;;; SET PDP11 I/O IN PROGRESS
  10856	034140					.ENB6			;;; ALLOW INTERRUPTS
	034140	012637 	177776 			MOV	(SP)+,@#PS
  10857					;
  10858					; THE FOLLOWING ARGUMENTS ARE RETURNED BY ..DQRN:
  10859					;
  10860					;	R0 -- LOGICAL UNIT NUMBER
  10861					;	R1 -- ADDRESS OF THE I/O REQUEST PACKET.
  10862					;
  10863	034144	010137 	002740'			MOV	R1,TTPKT	; SAVE PACKET ADDRESS
  10864	034150	010337 	002734'			MOV	R3,BYCNT 	; SAVE THE BYTE COUNT
  10865	034154	010337 	002732'			MOV	R3,CNT		; SAVE IT HERE ALSO
  10866	034160	010537 	002736'			MOV	R5,CRADR	; SAVE CURRENT ADDRESS
  10867	034164	013705 	002642'			MOV	CTYPTR,R5	; FIND THE CTY TERMINAL
  10868	034170	012703 	002672'			MOV	#CTYSTS,R3	; FIND TERMINAL STATUS WORD
  10869	034174	122761 	000001 	000015 		CMPB	#IO.WLB/256.,R.FC+1(R1) ; WRITE LOGICAL FUNCTION?
  10870	034202	001451 				BEQ	125$		; IF EQ YES
  10871	034204	042713 	000040 			BIC	#CTLO,@R3	; ENABLE OUTPUT
  10872	034210	122761 	000002 	000015 		CMPB	#IO.RLB/256.,R.FC+1(R1) ; READ LOGICAL FUNCTION?
  10873	034216	001422 				BEQ	115$		; YES -- PROCESS REQUEST
  10874	034220	012703 	000001 			MOV	#IS.SUC,R3	; SET UP THE ERROR STATUS
  10875	034224	005004 				CLR	R4		; INDICATE NO TRANSFER
  10876	034226	000407 				BR	110$		; TRY AGAIN
  10877						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 199
TERMINAL DRIVER -- CTY I/O DONE SERVICE

  10879						.SBTTL	TERMINAL DRIVER -- CTY I/O DONE SERVICE
  10880
  10881	034230				105$:
  10882	034230	013701 	002740'			MOV	TTPKT,R1	; FIND THE I/O PACKET
  10883	034234	001702 				BEQ	DQNXT
  10884	034236	016104 	000026 			MOV	R.PB+2(R1),R4	; SET THE COUNT XFERED
  10885	034242	013703 	002736'			MOV	CRADR,R3	; RETURN THE STATUS
  10886	034246				110$:
  10887	034246					CALL	..IODN		; CALL I/O DONE OUTINE
	034246	004737 	044550'			JSR	PC,..IODN
  10888	034252	005337 	002640'			DEC	.TTP11		; PDP11 INPUT NOT IN PROGREESS
  10889	034256	005037 	002740'			CLR	TTPKT		; SET NO PACKET IN USE
  10890	034262	000667 				BR	DQNXT		; AND WAIT FOR NEXT JOB
  10891						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 200
TERMINAL DRIVER -- CTY INPUT SERVICE

  10893						.SBTTL	TERMINAL DRIVER -- CTY INPUT SERVICE
  10894
  10895					;
  10896					; REQUEST IS A SOLICITED INPUT REQUEST-GET A BUFFER FOR INPUT
  10897					;
  10898	034264				115$:				; SET SOLICITED INPUT FLAG
  10899	034264	042713 	102400 			BIC	#MODE!EOLS!CRTY,@R3
  10900	034270	013763 	002736'	000006 		MOV	CRADR,CURBF(R3) ;SET RANDOM INPUT VALUES
  10901	034276	013763 	002734'	000004 		MOV	BYCNT,RMBYT(R3)
  10902	034304	013763 	002736'	000002 		MOV	CRADR,STRBF(R3)
  10903	034312	032713 	001000 			BIT	#CRJT,@R3	; CARRIAGE RETURN JUST TYPED?
  10904	034316	001426 				BEQ	135$		; NO -- NO CARRAGE CONTROL NECESSARY
  10905	034320				120$:
  10906	034320	062713 	004000 			ADD	#LFBT,@R3	; FORCE LINE FEED
  10907	034324	000423 				BR	135$		; AND FORCE IT OUT
  10908						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 201
TERMINAL DRIVER -- CTY OUTPUT SERVICE

  10910						.SBTTL	TERMINAL DRIVER -- CTY OUTPUT SERVICE
  10911
  10912					;
  10913					; REQUEST IS AN OUTPUT REQUEST-SET UP CARRIAGE CONTROL FLAGS
  10914					;
  10915	034326				125$:
  10916	034326	005737 	010276'			TST	TTPEN+U.AF	; CHECK FOR ATTACHED
  10917	034332	001002 				BNE	130$		; YES -- DON'T CLEAR STATUS FLAGS
  10918	034334	042713 	000040 			BIC	#CTLO,@R3	; ENABLE OUTPUT
  10919	034340				130$:
  10920	034340	042713 	076437 			BIC	#LFCT!CRTY!EOLS!RUBP!FLCT,@R3 ; CLEAR STATUS WORD
  10921	034344	052713 	100000 			BIS	#MODE,@R3	; SET OUTPUT MODE
  10922	034350	005761 	000030 			TST	R.PB+4(R1)	; CHECK FOR CARRAGE CONTROL
  10923	034354	001407 				BEQ	135$		; NO -- NOTHING TO DO
  10924	034356	122761 	000044 	000030 		CMPB	#'$,R.PB+4(R1)	; $?
  10925	034364	001755 				BEQ	120$		; YES -- DON'T FAKE CARRAGE CONTROL HERE
  10926	034366	052713 	002000 			BIS	#CRTY,@R3	; YES -- IT WILL ALWAYS BE ASSUMED ' '
  10927	034372	000752 				BR	120$		; OUTPUT CRLF
  10928						;
  10929	034374				135$:
  10930	034374					.INH6			; DISALLOW INTERRUPTS
	034374	013746 	177776 			MOV	@#PS,-(SP)
	034400	112737 	000300 	177776 		MOVB	#300,@#PS
  10931	034406					CALL	OUTPT		;;; START OUTPUT
	034406	004737 	035416'			JSR	PC,OUTPT
  10932	034412				TTINX:
  10933	034412					.ENB6			;;; ALLOW INTERRUPTS
	034412	012637 	177776 			MOV	(SP)+,@#PS
  10934	034416				TTINO:
  10935	034416	000137 	033254'			JMP	TTINI		; MAKE SURE OUTPUT IS ACTIVE
  10936						;
  10937						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 202
TERMINAL DRIVER -- $DHOUT (DH-11 OUTPUT INTERRUPT)

  10939						.SBTTL	TERMINAL DRIVER -- $DHOUT (DH-11 OUTPUT INTERRUPT)
  10940					;
  10941					;	DHOUT -- DH-11 TERMINAL MUX OUT INTERRUPTS
  10942					;
  10943	034422				$DHOUT::			;;; REF LABEL
  10944	034422	013737 	177776 	002654'		MOV	@#PS,DHTMP	;;; SAVE CONTROLLER NUMBER
  10945	034430					CALL	R3,DHSAV	;;; SAVE R3 AND SETUP R3 AND R4
	034430	004337 	040354'			JSR	R3,DHSAV
  10946	034434	001417 				BEQ	35$		;;; SPURIOUS INTERRUPT
  10947	034436				10$:
  10948	034436	042714 	101077 			BIC	#101077,@R4	;;; CLEAR CURRENT UNIT AND TRANSMIT INT
  10949	034442				20$:
  10950	034442	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; OUTPUT INTERRUPT EXPECTED?
  10951	034450	001403 				BEQ	30$		;;; IF EQ NO
  10952	034452	005764 	000010 			TST	10(R4)		;;; ZERO BYTE COUNT?
  10953	034456	001407 				BEQ	40$		;;; IF EQ YES
  10954	034460				30$:
  10955	034460	005214 				INC	@R4		;;; INCREMENT UNIT NUMBER
  10956	034462	062705 	000010 			ADD	#10,R5		;;; POINT TO NEXT ENTRY
  10957	034466	026504 	000002 			CMP	TTYEXP(R5),R4	;;; SAME DH-11 ??
  10958	034472	001763 				BEQ	20$		;;; YES -- CHECK NEXT UNIT
  10959	034474				35$:
  10960	034474					RETURN
	034474	000207 				RTS	PC
  10961	034476				40$:
  10962	034476	042765 	000001 	000006 		BIC	#TT.OUT,STSW1(R5) ;;; THIS OPERATION IS FINISHED
  10963	034504	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  10964	034512	001003 				BNE	60$		;;; YES -- DO SPECIAL CTY CHECK
  10965	034514				50$:
  10966	034514					CALL	STTYDN		;;; NO -- START NEXT OUTPUT PACKET
	034514	004737 	034546'			JSR	PC,STTYDN
  10967	034520	000757 				BR	30$		;;; SEE ABOUT OTHER LINES IN THIS DH-11
  10968						;
  10969					;
  10970					; HERE FOR SPECIAL CTY CHECKS AND PROCESSING
  10971					;
  10972	034522				60$:
  10973	034522	005737 	002640'			TST	.TTP11		;;; IS THIS PDP11 OUTPUT?
  10974	034526	001772 				BEQ	50$		;;; NO -- THEN HANDLE AS NORMAL CASE
  10975	034530	010446 			65$:	MOV	R4,-(SP)	;;; SAVE R4
  10976	034532					CALL	OUTPT3		;;; FINISH OUTPUT PROCESSING
	034532	004737 	035336'			JSR	PC,OUTPT3
  10977	034536	012604 				MOV	(SP)+,R4	;;; RESTORE R4
  10978	034540					CALL	.TTIXC		;;; [5.1015] DO INPUT CONTROL CHECKS
	034540	004737 	043462'			JSR	PC,.TTIXC
  10979	034544	000745 				BR	30$		;;; GO AGAIN
  10980						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 203
TERMINAL DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)

  10982						.SBTTL	TERMINAL DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)
  10983
  10984					;+
  10985					;	STTYDN -- REMOVE ENTRY FOR LAST OPERATION
  10986					;
  10987					;	IF THIS IS A SENDALL WHICH HAS FINISHED, DECREMENT THE COUNT FOR
  10988					;	THE NODE IN THE SENDALL RING. IF THE COUNT HAS EXHAUSTED, DEALLOCATE
  10989					;	THER CURRENT SENDALL BUFFER. THE SENDALL OFFSET FOR THIS LINE IS MOVED
  10990					;	TO THE NEXT NODE IN THE SENDALL RING.
  10991					;
  10992					;	IF THIS IS A NORMAL I/O TERMINATION,, ALTER THE BUFFER ADDRESS AND BYTE
  10993					;	COUNT IN THE CURRENT NODE SO THAT THE XON CODE CAN DO A NORMAL LINE
  10994					;	START. THE PACKET WILL BE ACK'ED AND DEALLOCATED AFTER THE LINE HAS
  10995					;	BEEN X'D ON.
  10996					;
  10997					;	IF THE PACKET IS FINISHED, THE CURRENT NODE IS REMOVED FROM THE
  10998					;	THREAD LIST, DEALLOCATED AND AN ATTEMPT MADE TO START THE NEXT ENTRY
  10999					;	IN THE THREAD LIST. IF THE LIST IS EMPTY, THIS LINE WILL BE ACK'ED.
  11000					;-
  11001
  11002	034546				STTYDN:
  11003	034546	032765 	001000 	000006 		BIT	#TT.SIP,STSW1(R5) ;;; IS THIS A SENDALL IN PROGRESS??
  11004	034554	001444 				BEQ	20$		;;; NO -- DON'T MAKE SENDALL RETURN CHECKS
  11005	034556	042765 	001000 	000006 		BIC	#TT.SIP,STSW1(R5) ;;; YES -- CLEAR SENDALL IN PROGRESS
  11006	034564	016502 	000006 			MOV	STSW1(R5),R2	;;; FIND THE POSITION IN THE SEND ALL TABLE
  11007	034570	062765 	040000 	000006 		ADD	#TT.SNI,STSW1(R5) ;;; MOVE TO NEXT SENDALL RING WORD
  11008	034576	006102 				ROL	R2		;;; FIND THE POSITION IN THE TABLE
  11009	034600	006102 				ROL	R2		;;; OF THE CURRENT SENDALL
  11010	034602	006102 				ROL	R2		;;; JUST FINISHED
  11011	034604	042702 	177774 			BIC	#177774,R2	;;; MASK OFF JUNK
  11012	034610	006302 				ASL	R2		;;; MAKE A WORD INDEX
  11013	034612	005362 	002624'			DEC	.SNDCN(R2)	;;; DECREMENT THE CURRENT INUSE COUNT
  11014	034616	003045 				BGT	STNXT		;;; THIS SENDALL QUEUE NOT FINISHED -- DON'T RELEASE IT
  11015	034620	001415 				BEQ	10$		;;; ALL DONE -- RETURN IT
  11016						;
  11017					; THIS CODE REPLACES THE SAI STOPCODE. IT "FIXES" THIS LINES SENDALL INDEX.
  11018						;
  11019	034622	013702 	002612'			MOV	.SNDLP,R2	;;; GET THE SENDALL BUFFER INDEX
  11020	034626	000302 				SWAB	R2		;;; PUT COUNT IN THE HIGH BYTE
  11021	034630	012700 	000006 			MOV	#6,R0		;;; SET UP LOOP COUNT FOR LEFT SHIFTS
  11022	034634	006302 			5$:	ASL	R2		;;; SHIFT
  11023	034636	077002 				SOB	R0,5$		;;; LOOP FOR THE COUNT
  11024	034640	042765 	140000 	000006 		BIC	#140000,STSW1(R5) ;;; GET RID OF THE OLD INDEX
  11025	034646	050265 	000006 			BIS	R2,STSW1(R5)	;;; SET IN THE NEW ONE
  11026	034652	000427 				BR	STNXT
  11027						;
  11028	034654				10$:
  11029	034654	016200 	002614'			MOV	.SNDBF(R2),R0	;;; PICK UP THE ENTRY
  11030	034660	005062 	002614'			CLR	.SNDBF(R2)	;;; CLEAR OUT THIS ENTRY (MARK END OF RING)
  11031	034664	000420 				BR	30$		;;; AND CONTINUE
  11032						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 204
TERMINAL DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)

  11034
  11035						;
  11036	034666				20$:				;;; HERE TO REMOVE THREAD ENTRY (NOT SENDALL)
  11037	034666	011500 				MOV	(R5),R0		;;; PICK UP THE THREAD POINTER
  11038	034670	001420 				BEQ	STNXT		;;; GO ON IF EMPTY
  11039									;;; [4.2096] REMOVED 2 INSTRUCTIONS
  11040	034672	016401 	000006 			MOV	6(R4),R1	;;; PICK UP CURRENT DH-11 ADDRESS
  11041	034676	116002 	000006 			MOVB	T.HCBC(R0),R2	;;; GET ORIGINAL BYTE COUNT
  11042	034702	016046 	000004 			MOV	T.HCAD(R0),-(SP) ;;; ORIGINAL ADDRESS TO STACK
  11043	034706	010160 	000004 			MOV	R1,T.HCAD(R0)	;;; CURRENT ADDRESS TO PACKET
  11044	034712	162601 				SUB	(SP)+,R1	;;; COMPUTE OFFSET INTO PACKET
  11045	034714	160102 				SUB	R1,R2		;;; DISCOUNT FROM PACKET SIZE
  11046	034716	110260 	000006 			MOVB	R2,T.HCBC(R0)	;;; AND SET NEW PACKET SIZE
  11047	034722	003003 				BGT	STNXT		;;; [4.2096] DON'T DEQUEUE IF NOT FINISHED
  11048	034724	011015 				MOV	@R0,(R5)	;;; DELINK THIS THREAD NODE
  11049	034726				30$:
  11050	034726					CALL	..DECN		;;; DEALLOCATE THE NODE
	034726	004737 	046004'			JSR	PC,..DECN
  11051									;;; AND START THE NEXT PACKET
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 205
TERMINAL DRIVER -- STNXT (START NEXT OUTPUT OPERATION)

  11053						.SBTTL	TERMINAL DRIVER -- STNXT (START NEXT OUTPUT OPERATION)
  11054
  11055					;+
  11056					;	STNXT -- START NEXT OUTPUT OPERATION
  11057					;
  11058					;	R0 -- POINTS TO THREAD NODE TO BE STARTED
  11059					;	R4 -- POINTS TO I/O PAGE ADDR THIS DEVICE
  11060					;	R5 -- POINTS TO DLS TABLE THIS DEVICE
  11061					;
  11062					;	BEFORE ATTEMPTING TO START THE NEXT NODE IN THE THREAD LIST, SEE IF A
  11063					;	SENDALL IS PENDING FOR THIS LINE, (".SNDLP" .NE. "TT.SND"). IF SO, START
  11064					;	THE SENDALL. IF SENDALLS ARE SUPPRESSED FOR THIS LINE, IGNORE IT.
  11065					;
  11066					;	IF NO SENDALL IS PENDING FOR THIS LINE, ATTEMPT TO START THE THE NEXT
  11067					;	NODE IN THE THREAD LIST. IF ANOTHER ENTRY EXISTS, START IT; IF NOT, SEND
  11068					;	AN ACK. IF THE LINE HAS BEEN X'D OFF, DO NOTHING.
  11069					;
  11070					;	NOTE: SENDALLS ARE FORCED OUT OVER THE XOFF -- THEY ARE NOT TO BE STOPPED.
  11071					;-
  11072
  11073	034732				STNXT:
  11074	034732					CALL	.TTIXC		;;; [5.1015] DO INPUT CONTROL CHECKS
	034732	004737 	043462'			JSR	PC,.TTIXC
  11075	034736	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; [5.1015] IS OUTPUT NOW IN PROGRESS??
  11076	034744	001134 				BNE	TTOUTR		;;; [5.1015] YES -- JUST EXIT
  11077	034746	016502 	000006 			MOV	STSW1(R5),R2	;;; FIND THE STATUS WORD TO LOOK AT
  11078	034752	006102 				ROL	R2		;;; GET THE RING INDEX OUT OF STATUS WORD
  11079	034754	006102 				ROL	R2
  11080	034756	006102 				ROL	R2
  11081	034760	042702 	177774 			BIC	#^C3,R2		;;; R2 NOW HAS OFFSET INTO SENDALL RING
  11082	034764	020237 	002612'			CMP	R2,.SNDLP	;;; ANY SENDALLS PENDING THIS LINE??
  11083	034770	001414 				BEQ	10$		;;; NO -- CONTINUE NORMAL I/O
  11084	034772	032765 	000400 	000006 		BIT	#TT.NSA,STSW1(R5) ;;; [4.2246] YES -- ARE WE SUPPRESSING SENDALL'S??
  11085	035000	001010 				BNE	10$		;;; [4.2246] YES -- IGNORE IT
  11086	035002	006302 				ASL	R2		;;; NO -- MAKE R2 A WORD INDEX INTO RING
  11087	035004	016200 	002614'			MOV	.SNDBF(R2),R0	;;; GET THE NEXT SENDALL NODE INTO R0
  11088	035010	001404 				BEQ	10$		;;; CONTINUE NORMAL I/O IF EMPTY
  11089	035012	052765 	001000 	000006 		BIS	#TT.SIP,STSW1(R5) ;;; SET SENDALL IN PROGRESS
  11090	035020	000405 				BR	.DHSTO		;;; AND START IT UP
  11091						;
  11092	035022				10$:
  11093	035022	011500 				MOV	(R5),R0		;;; [4.2096] START THE XFER ON THIS STRING
  11094	035024	001505 				BEQ	.TTACK		;;; [4.2096] SEND AN ACK IF END
  11095	035026	105765 	000006 			TSTB	STSW1+0(R5)	;;; [4.2096] IS THIS LINE X'D OFF??
  11096	035032	100501 				BMI	TTOUTR		;;; [4.2096] YES -- GO AWAY
  11097					;	BR	.DHSTO		;;; NO -- GO ON
  11098						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 206
TERMINAL DRIVER -- .DHSTO (START DH-11 OUTPUT)

  11100						.SBTTL	TERMINAL DRIVER -- .DHSTO (START DH-11 OUTPUT)
  11101
  11102					;+
  11103					; .DHSTO -- START DH-11 OUTPUT
  11104					;
  11105					; THIS SUBROUTINE WILL START OUTPUT ON A DH-11 LINE
  11106					;
  11107					; INPUTS:
  11108					;
  11109					;	R0 -- POINTS TO THE I/O PACKET
  11110					;	R4 -- EXTERNAL PAGE POINTER FOR THIS LINE
  11111					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  11112					;
  11113					; OUTPUTS:
  11114					;
  11115					;	R2 IS CLOBBERED
  11116					;-
  11117
  11118	035034				.DHSTO::
  11119	035034	016064 	000004 	000006 		MOV	T.HCAD(R0),6(R4) ;;; SET UP THE DH-11 ADDRESS REGISTER
  11120	035042	016064 	000006 	000010 		MOV	T.HCBC(R0),10(R4) ;;; SET UP THE BYTE COUNT
  11121	035050	005464 	000010 			NEG	10(R4)		;;; MAKE THE BYTE COUNT NEGATIVE
  11122	035054	011402 				MOV	@R4,R2		;;; FIND THE UNIT NUMBER TO START THE DH-11
  11123	035056	042702 	177760 			BIC	#177760,R2	;;; MASK OFF HIGH ORDER JUNK
  11124	035062	006302 				ASL	R2		;;; MAKE AN INDEX INTO BIT TABLE
  11125	035064	056264 	044260'	000012 		BIS	BITTBL(R2),12(R4) ;;; START THE DH-11
  11126	035072	000456 				BR	TTOUTX		;;; MARK OUTPUT BUSY AND EXIT
  11127						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 207
TERMINAL DRIVER -- $TTOUT (DL11 OUTPUT INTERRUPT)

  11129						.SBTTL	TERMINAL DRIVER -- $TTOUT (DL11 OUTPUT INTERRUPT)
  11130					;+
  11131					; **-$TTOUT-DL11 TERMINAL OUTPUT INTERRUPTS
  11132					;-
  11133
  11134	035074				$TTOUT::			;;; REF LABEL
  11135	035074	013737 	177776 	002656'		MOV	@#PS,DLTMP	;;; SAVE CONTROLLER NUMBER
  11136	035102					CALL	R3,TTSAV	;;; SAVE R3 AND SETUP R3, R4, AND R5
	035102	004337 	040412'			JSR	R3,TTSAV
  11137	035106	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; OUTPUT INTERRUPT EXPECTED??
  11138	035114	001451 				BEQ	.TTACK		;;; NO -- SO ACK THE LINE
  11139	035116	042765 	000001 	000006 		BIC	#TT.OUT,STSW1(R5) ;;; YES -- MARK OUTPUT DONE
  11140	035124	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CONSOLE??
  11141	035132	001403 				BEQ	STTYO		;;; NO -- SEND THE LINE
  11142	035134	005737 	002640'			TST	.TTP11		;;; YES -- IS THIS PDP11 INPUT??
  11143	035140	001076 				BNE	OUTPT3		;;; YES -- SPECIAL CASE
  11144	035142				STTYO:
  11145	035142	011500 				MOV	(R5),R0		;;; [4.2096] NO -- PICK UP THIS LINE IN USE
  11146	035144	001435 				BEQ	.TTACK		;;; [4.2096] ACK THE LINE IF END OF THREAD LIST
  11147	035146	005360 	000006 			DEC	T.HCBC(R0)	;;; [5.1015] DECREMENT THE BYTE COUNT
  11148	035152	003011 				BGT	10$		;;; [5.1015] FINISHED?
  11149	035154	011015 				MOV	@R0,(R5)	;;; SAVE NEXT THREAD POINTER
  11150	035156					CALL	..DECN		;;; DEALLOCATE THE BUFFER
	035156	004737 	046004'			JSR	PC,..DECN
  11151	035162					CALL	.TTIXC		;;; [5.1015] DO INPUT CONTROL CHECKS
	035162	004737 	043462'			JSR	PC,.TTIXC
  11152	035166	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; [5.1015] I/O STARTED ALREADY??
  11153	035174	001020 				BNE	TTOUTR		;;; [5.1015] YES -- JUST EXIT
  11154	035176				10$:
  11155	035176	011500 				MOV	(R5),R0		;;; NO -- SET THE NEW THREAD POINTER
  11156	035200	001417 				BEQ	.TTACK		;;; GO ACK THE LINE IF DONE
  11157	035202	105765 	000006 			TSTB	STSW1+0(R5)	;;; [5.1015] IS THIS LINE X'D OFF??
  11158	035206	100413 				BMI	TTOUTR		;;; [5.1015] YES -- JUST GO AWAY
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 208
TERMINAL DRIVER -- .DLSTO (START DL-11 OUTPUT)

  11160						.SBTTL	TERMINAL DRIVER -- .DLSTO (START DL-11 OUTPUT)
  11161
  11162					;+
  11163					; .DLSTO -- START DL-11 OUTPUT
  11164					;
  11165					; THIS SUBROUTINE WILL START OUTPUT ON A DL-11 LINE
  11166					;
  11167					; INPUTS:
  11168					;
  11169					;	R0 -- POINTS TO THE I/O PACKET
  11170					;	R4 -- EXTERNAL PAGE ADDRESS OF THIS DEVICE
  11171					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  11172					;
  11173					; OUTPUTS:
  11174					;
  11175					;	NO REGISTERS ARE ALTERED
  11176					;-
  11177
  11178	035210				.DLSTO::
  11179	035210	117064 	000004 	000006 		MOVB	@T.HCAD(R0),6(R4) ;;; START THE NEXT CHARACTER
  11180	035216	005260 	000004 			INC	T.HCAD(R0)	;;; UPDATE THE CHARACTER POINTER
  11181	035222	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; INSURE INTERRUPT ENABLED
  11182	035230				TTOUTX:
  11183	035230	052765 	000001 	000006 		BIS	#TT.OUT,STSW1(R5) ;;; MARK OUTPUT BUSY
  11184	035236				TTOUTR:
  11185	035236					RETURN			;;; RETURN TO CALLER
	035236	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 209
TERMINAL DRIVER -- .TTACK (ACKNOWLEDGE A TTY LINE)

  11187						.SBTTL	TERMINAL DRIVER -- .TTACK (ACKNOWLEDGE A TTY LINE)
  11188
  11189					;+
  11190					; .TTACK - ACKNOWLEDGE A TERMINAL LINE
  11191					;
  11192					; THIS SUBROUTINE MAY BE CALLED FROM EITHER INTERRUPT LEVEL OR TASK LEVEL
  11193					; TO TRANSMIT AN ACK TO THE HOST, IF CONDITIONS WILL ALLOW.
  11194					;
  11195					; THE LINE WILL NOT BE ACK'ED IF IT IS THE CTY AND IT IS ACTIVE ON THE PDP-11,
  11196					; OR IF THE LINE IS THE KLINIK LINE IN REMOTE CONSOLE MODE.
  11197					;
  11198					; INPUTS:
  11199					;
  11200					;	R5 -- POINTS TO DLS TABLE ENTRY FOR LINE TO BE ACK'ED
  11201					;
  11202					; OUTPUTS:
  11203					;
  11204					;	NO REGISTERS ALTERED.
  11205					;-
  11206
  11207	035240				.TTACK::
  11208	035240	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  11209	035246	001424 				BEQ	10$		;;; NO -- GO ON
  11210	035250	005737 	002640'			TST	.TTP11		;;; YES -- IS IT TALKING TO THE -11??
  11211	035254	001027 				BNE	20$		;;; YES -- JUST EXIT
  11212	035256	105737 	001234'			TSTB	.KLNSW+0	;;; NO -- IS KLINIK ACTIVE??
  11213	035262	001416 				BEQ	10$		;;; [4.1.1066] NO -- GO ON
  11214	035264	020537 	002642'			CMP	R5,CTYPTR	;;; IS THIS THE CTY ?
  11215	035270	001004 				BNE	5$		;;; [5.1565] BRANCH IF NOT
  11216	035272	105737 	001234'			TSTB	.KLNSW+0	;;; [6.1363] ACTIVE IN USER MODE ??
  11217	035276	002410 				BLT	10$		;;; [5.1565] YES, GO GIVE ACK
  11218	035300	000415 				BR	20$		;;; [5.1565] NO, WAIT FOR KLINIK LINE TO FINISH
  11219	035302				5$:
  11220	035302	010546 				MOV	R5,-(SP)	;;; [5.1246] SAVE THE REAL POINTER
  11221	035304	013705 	002642'			MOV	CTYPTR,R5	;;; [5.1246] TELL THE HOST THIS IS THE CTY
  11222	035310					CALL	10$		;;; [5.1246] SEND THE ACK
	035310	004737 	035320'			JSR	PC,10$
  11223	035314	012605 				MOV	(SP)+,R5	;;; [5.1246] RESTORE THE REAL PONITER
  11224	035316					RETURN			;;; [5.1246] AND EXIT
	035316	000207 				RTS	PC
  11225	035320				10$:
  11226	035320	010346 				MOV	R3,-(SP)	;;; NO -- SAVE R3
  11227	035322	012703 	000004 			MOV	#D.CDLS,R3	;;; SET DATA LINE SCANNER DEVICE CODE
  11228	035326					CALL	..SACK		;;; ACK THE LINE
	035326	004737 	046630'			JSR	PC,..SACK
  11229	035332	012603 				MOV	(SP)+,R3	;;; RESTORE R3
  11230	035334				20$:
  11231	035334					RETURN			;;; AND EXIT
	035334	000207 				RTS	PC
  11232
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 210
TERMINAL DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)

  11234						.SBTTL	TERMINAL DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)
  11235
  11236	035336				OUTPT3:				;;; HERE TO SYNCH CTY OUTPUT
  11237	035336	105737 	001234'			TSTB	.KLNSW+0	;;; KLINIK REMOTE CONSOLE ACTIVE?
  11238	035342	003425 				BLE	OUTPT		;;; NO -- CONTINUE
  11239	035344	010546 				MOV	R5,-(SP)	;;; SAVE CURRENT POINTER
  11240	035346	022705 	003054'			CMP	#DHTBL,R5	;;; IS CTY A DH-11 LINE??
  11241	035352	101410 				BLOS	10$		;;; YES -- GO ON
  11242	035354	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; NO -- IS THIS LINE FINISHED??
  11243	035362	001012 				BNE	30$		;;; NO -- EXIT
  11244	035364	013705 	002642'			MOV	CTYPTR,R5	;;; YES -- POINT TO THE CTY
  11245	035370	020516 				CMP	R5,(SP)		;;; HAVE WE ALREADY CHECKED IT??
  11246	035372	001002 				BNE	20$		;;; NO -- GO ON
  11247	035374				10$:
  11248	035374	013705 	002644'			MOV	KLNPTR,R5	;;; YES -- POINT TO THE KLINIK LINE
  11249	035400				20$:
  11250	035400	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; IS IT FINISHED??
  11251	035406	001402 				BEQ	90$		;;; YES -- TYPE IF FINISHED
  11252	035410				30$:
  11253	035410	012605 				MOV	(SP)+,R5	;;; NO -- RESTORE POINTER
  11254	035412					RETURN			;;; RETURN TO CALLER
	035412	000207 				RTS	PC
  11255	035414				90$:
  11256	035414	005726 				TST	(SP)+		;;; CLEAR STACK
  11257					;
  11258					; OUTPUT NEXT BYTE
  11259					;
  11260						.ENABL	LSB
  11261	035416				OUTPT:
  11262	035416	013705 	002642'			MOV	CTYPTR,R5	;;; POINT TO THE CTY
  11263	035422	012703 	002672'			MOV	#CTYSTS,R3	;;; GET CTY BLOCK POINTER
  11264	035426	032713 	000017 			BIT	#FLCT,@R3	;;; SHOULD A FILL BE ECHOED?
  11265	035432	001105 				BNE	60$		;;; IF NE YES
  11266	035434	032713 	074000 			BIT	#LFCT,@R3	;;; ANY UNPROCESSED LINE FEEDS?
  11267	035440	001066 				BNE	40$		;;; IF NE YES
  11268	035442	105763 	000010 			TSTB	MECNT(R3)	;;; MULTIECHO SEQUENCE IN PROGRESS?
  11269	035446	001070 				BNE	50$		;;; IF NE YES
  11270	035450	005713 				TST	@R3		;;; INPUT OR OUTPUT IN PROGRESS?
  11271	035452	100055 				BPL	INPPT		;;; IF PL INPUT
  11272					;
  11273					; OUTPUT REQUEST IN PROGRESS
  11274					;
  11275	035454	005737 	002734'			TST	BYCNT		;;; ANY MORE BYTES TO OUTPUT?
  11276	035460	100416 				BMI	20$		;;; IF MI NO
  11277	035462	005337 	002734'			DEC	BYCNT		;;; DECREMENT BYTE COUNT
  11278	035466	100405 				BMI	10$		;;; IF MI CHECK CARRIAGE CONTROL
  11279	035470	117746 	145242 			MOVB	@CRADR,-(SP)	;;; STORE CHARACTER ON STACK
  11280									;;; !!!NOTE: THIS SHOULD BE VXFR AND BLXI!!!!!
  11281	035474	005237 	002736'			INC	CRADR		;;; UPDATE POINTER TO NEXT CHARACTER
  11282	035500	000465 				BR	ECHOB		;;; ECHO NEXT BYTE
  11283						;
  11284	035502				10$:
  11285	035502	112746 	000015 			MOVB	#C.HCRT,-(SP)	;;; ASSUME TRAILING CARRIAGE RETURN REQUIRED
  11286	035506	032713 	002000 			BIT	#CRTY,@R3	;;; OUTPUT TRAILING CARRIAGE RETURN?
  11287	035512	001060 				BNE	ECHOB		;;; IF NE YES
  11288	035514	005726 				TST	(SP)+		;;; CLEAN STACK
  11289	035516				20$:
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 210-1
TERMINAL DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)

  11290	035516	012737 	000001 	002736'		MOV	#IS.SUC&377,CRADR ;;; SET SUCCESSFUL COMPLETION STATUS
  11291	035524				TTYDNE:
  11292	035524	052737 	000020 	007222'		BIS	#EF.IOD,TTYTSK+A.EF ;;; SET EVENT FLAG INDICATING I/O DONE
  11293	035532					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	035532	004737 	045264'			JSR	PC,..DSEV
  11294	035536	105737 	001234'			TSTB	.KLNSW+0	;;; IS KLINIK ACTIVE??
  11295	035542	003412 				BLE	TTYDNX		;;; NO -- GO ON
  11296	035544	010546 				MOV	R5,-(SP)	;;; YES -- SAVE R5
  11297	035546	010446 				MOV	R4,-(SP)	;;; AND R4
  11298	035550	013705 	002644'			MOV	KLNPTR,R5	;;; POINT TO THE KLINIK LINE
  11299	035554	016504 	000002 			MOV	TTYEXP(R5),R4	;;; I/O PAGE POINTER TO R5
  11300	035560					CALL	STTYO		;;; START OR DEALLOCATE
	035560	004737 	035142'			JSR	PC,STTYO
  11301	035564	012604 				MOV	(SP)+,R4	;;; RESTORE REGISTERS
  11302	035566	012605 				MOV	(SP)+,R5	;;; SO
  11303	035570				TTYDNX:
  11304	035570	022705 	003054'			CMP	#DHTBL,R5	;;; CALLED FROM DH-11??
  11305	035574	101002 				BHI	30$		;;; NO --TRY THE ONE ON DL-11
  11306	035576	000137 	034546'			JMP	STTYDN		;;; GO DO ACK AND CLEAR BUSY
  11307						;
  11308	035602				30$:
  11309	035602	000137 	035142'			JMP	STTYO		;;; SEE WHAT'S NEXT FOR DL-11
  11310						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 211
TERMINAL DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)

  11312						.SBTTL	TERMINAL DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)
  11313
  11314					;
  11315					; INPUT REQUEST IN PROGRESS
  11316					;
  11317	035606				INPPT:
  11318	035606	032713 	000400 			BIT	#EOLS,@R3	;;; END OF LINE SEEN?
  11319	035612	001157 				BNE	INPT1
  11320	035614				INPT0:
  11321	035614					RETURN
	035614	000207 				RTS	PC
  11322					;
  11323					; ECHO LINE FEED
  11324					;
  11325	035616				40$:
  11326	035616	162713 	004000 			SUB	#LFBT,@R3	;;; REDUCE LINE FEED COUNT
  11327	035622	112746 	000012 			MOVB	#C.HLFD,-(SP)	;;; SET TO ECHO LINE FEED
  11328	035626	000412 				BR	ECHOB		;;; ECHO BYTE
  11329						;
  11330					;
  11331					; MULTI-ECHO SEQUENCE
  11332					;
  11333	035630				50$:
  11334	035630	117346 	000012 			MOVB	@MEBUF(R3),-(SP) ;;; SET NEXT BYTE TO ECHO
  11335	035634	005263 	000012 			INC	MEBUF(R3)	;;; INCREMENT BUFFER ADDRESS
  11336	035640	105363 	000010 			DECB	MECNT(R3)	;;; DECREMENT MULTIECHO BYTE COUNT
  11337	035644	000403 				BR	ECHOB		;;; ECHO BYTE
  11338						;
  11339					;
  11340					; ECHO FILL BYTE
  11341					;
  11342	035646				60$:
  11343	035646	005313 				DEC	@R3		;;; DECREMENT FILL COUNT
  11344	035650	116346 	000011 			MOVB	FLBYT(R3),-(SP)	;;; SET TO ECHO FILL BYTE
  11345						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 212
TERMINAL DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)

  11347						.SBTTL	TERMINAL DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)
  11348
  11349					;
  11350					; ECHO NEXT BYTE
  11351					;
  11352
  11353	035654				ECHOB:
  11354	035654	042716 	177600 			BIC	#177600,@SP	;;; MASK OFF PARITY
  11355	035660	121627 	000037 			CMPB	@SP,#37		;;; IS THIS A CONTROL BYTE?
  11356	035664	101041 				BHI	70$		;;; IF HI NO
  11357	035666	122716 	000015 			CMPB	#C.HCRT,@SP	;;; CARRIAGE RETURN?
  11358	035672	001422 				BEQ	10$		;;; IF EQ YES
  11359	035674	101041 				BHI	80$		;;; IF HI GO ON
  11360	035676	122716 	000012 			CMPB	#C.HLFD,@SP	;;; LINE FEED, FORM FEED OR VERTICAL TAB?
  11361	035702	101424 				BLOS	50$		;;; IF LOS YES
  11362	035704	122716 	000011 			CMPB	#C.HTAB,@SP	;;; HORIZONTAL TAB?
  11363	035710	001033 				BNE	80$		;;; IF NE NO
  11364					;
  11365					; HORIZONTAL TAB
  11366					;
  11367	035712	116316 	000016 			MOVB	HORPS(R3),@SP	;;; GET CURRENT HORIZONTAL POSITION
  11368	035716	052716 	177770 			BIS	#177770,@SP	;;; CALCULATE BLANK COUNT TO NEXT TAB STOP
  11369	035722	005416 				NEG	@SP
  11370	035724	051613 				BIS	@SP,@R3		;;; MERGE BLANK COUNT
  11371	035726	112763 	000040 	000011 		MOVB	#' ,FLBYT(R3)	;;; SET FILL TO A BLANK
  11372	035734				5$:
  11373	035734	005726 				TST	(SP)+		;;; REMOVE BYTE FROM STACK
  11374	035736	000627 				BR	OUTPT		;;; START OUTPUT
  11375						;
  11376					;
  11377					; CARRIAGE RETURN
  11378					;
  11379	035740				10$:
  11380	035740				20$:
  11381	035740	052713 	001000 			BIS	#CRJT,@R3	;;; SET CARRIAGE RETURN JUST TYPED
  11382	035744	005213 				INC	@R3		;;; ALWAYS ONE FILL BYTE
  11383	035746	105063 	000016 			CLRB	HORPS(R3)	;;; CLEAR HORIZONTAL POSITION
  11384	035752	000403 				BR	60$		;;; OUTPUT CARRIAGE RETURN
  11385						;
  11386					;
  11387					; FORM FEED OR VERTICAL TAB OR LINE FEED
  11388					;
  11389	035754				50$:
  11390	035754	042713 	001000 			BIC	#CRJT,@R3	;;; CLEAR CARRIAGE RETURN JUST TYPED
  11391	035760	000407 				BR	80$
  11392						;
  11393	035762				60$:
  11394	035762	105063 	000011 			CLRB	FLBYT(R3)	;;; SET NULL FILL BYTE
  11395	035766	000404 				BR	80$
  11396						;
  11397					;
  11398					; BYTE REQUIRES HORIZONTAL POSITION
  11399					;
  11400	035770				70$:
  11401	035770	042713 	001000 			BIC	#CRJT,@R3	;;; CLEAR CARRIAGE RETURN JUST TYPED
  11402	035774	105263 	000016 			INCB	HORPS(R3)	;;; INCREMENT HORIZONTAL POSITION
  11403	036000				80$:
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 212-1
TERMINAL DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)

  11404	036000	005713 				TST	@R3		;;; INPUT MODE?
  11405	036002	100003 				BPL	81$		;;; IF PL YES
  11406	036004	032713 	000040 			BIT	#CTLO,@R3	;;; OUTPUT DISABLED?
  11407	036010	001351 				BNE	5$		;;; IF NE YES
  11408	036012				81$:
  11409	036012	105737 	001234'			TSTB	.KLNSW+0	;;; KLINIK REMOTE MODE ACTIVE?
  11410	036016	003420 				BLE	82$		;;; NO -- BETTER LEAVE IT ALONE
  11411	036020	010546 				MOV	R5,-(SP)	;;; SAVE DLS POINTER
  11412	036022	013705 	002644'			MOV	KLNPTR,R5	;;; GET KLINIK DLS POINTER
  11413	036026	016504 	000002 			MOV	TTYEXP(R5),R4	;;; POINT TO CSR
  11414	036032	001411 				BEQ	84$		;;; IGNORE IF NOT THERE
  11415	036034	116664 	000002 	000006 		MOVB	2(SP),6(R4)	;;; START KLINIK LINE
  11416	036042	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; ENABLE XMTR INTERRUPTS
  11417	036050	052765 	000001 	000006 		BIS	#TT.OUT,STSW1(R5) ;;; SET TTY BUSY
  11418	036056				84$:
  11419	036056	012605 				MOV	(SP)+,R5	;;; RESTORE CTY POINTER
  11420	036060				82$:
  11421	036060	016504 	000002 			MOV	TTYEXP(R5),R4	;;; GET ADDRESS OF CONTROL STATUS REGISTER
  11422	036064	022705 	003054'			CMP	#DHTBL,R5	;;; IS THIS A DL-11 ??
  11423	036070	101021 				BHI	90$		;;; YES -- SPECIAL CASE
  11424	036072	112637 	002712'			MOVB	(SP)+,DHBUF+CTYSTS ;;; PUT BYTE IN OUTPUT BUFFER
  11425	036076	042714 	001077 			BIC	#1077,@R4	;;; CLEAR CURRENT UNIT
  11426	036102	153714 	002646'			BISB	$UNIT,@R4	;;; SELECT DESIRED UNIT
  11427	036106	042724 	000060 			BIC	#60,(R4)+
  11428	036112	062704 	000004 			ADD	#4,R4		;;; POINT TO CURRENT ADDRESS REGISTER
  11429	036116	012724 	002712'			MOV	#DHBUF+CTYSTS,(R4)+
  11430	036122	012724 	177777 			MOV	#-1,(R4)+	;;; SET BYTE COUNT TO MINUS ONE
  11431	036126	053714 	002650'			BIS	$BTMSK,@R4 	;;; START OUTPUT
  11432	036132	000405 				BR	99$		;;; MARK OUTPUT BUSY AND EXIT
  11433						;
  11434	036134				90$:
  11435	036134	112664 	000006 			MOVB	(SP)+,6(R4)	;;; OUTPUT BYTE
  11436	036140	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; ENABLE OUTPUT INTERRUPT
  11437	036146				99$:
  11438	036146	000137 	035230'			JMP	TTOUTX		;;; MARK OUTPUT BUSY AND EXIT
  11439						;
  11440					;
  11441					; END OF INPUT LINE
  11442					;
  11443	036152				INPT1:
  11444	036152	012703 	002674'			MOV	#CTYSTS+2,R3	;;; FIND THE TERMINAL STATUS WORD
  11445	036156	117337 	000000 	002736'		MOVB	@(R3),CRADR	;;; FIND THE LAST CHARACTER
  11446	036164	016346 	000004 			MOV	4(R3),-(SP)
  11447	036170	162316 				SUB	(R3)+,@SP	;;; FIND THE BYTE COUNT
  11448	036172	112713 	000001 			MOVB	#IS.SUC&377,@R3 ;;; ASSUME NORMAL TERMINATION
  11449	036176	012300 				MOV	(R3)+,R0	;;; GET FINAL BYTE AND STATUS
  11450	036200	100006 				BPL	40$		;;; IF PL NORMAL TERMINATION
  11451	036202	012700 	015366 			MOV	#32*400+366,R0	;;; ASSUME ^Z
  11452	036206	105243 				INCB	-(R3)		;;; CONTROL Z?
  11453	036210	001402 				BEQ	40$		;;; IF EQ YES
  11454	036212	012700 	000361 			MOV	#IE.ABO&377,R0	;;; SET ABORT STATUS
  11455	036216				40$:
  11456	036216	013701 	002740'			MOV	TTPKT,R1	;;; FIND THE PACKET ADDRESS
  11457	036222	010037 	002736'			MOV	R0,CRADR	;;; SAVE THE STARTS FIRST WORD
  11458	036226	012661 	000026 			MOV	(SP)+,R.PB+2(R1) ;;; STORE THE BYTE COUNT
  11459	036232				50$:
  11460	036232	000137 	035524'			JMP	TTYDNE
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 212-2
TERMINAL DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)

  11461						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 213
TERMINAL DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)

  11463						.SBTTL	TERMINAL DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)
  11464
  11465					;+
  11466					; **- .KW11S -- LINE CLOCK INTERRUPT SERVICE HANDLER
  11467					;
  11468					;	THIS ROUTINE UPDATES THE COUNT OF CLOCK TICK WHICH ARE PENDING
  11469					;	SERVICE (NORMALLY ONLY ONE).  THESE CLOCK TICKS ARE HONORED AT
  11470					;	TASK LEVEL AT "..INTX".
  11471					;
  11472					;	THIS ROUTINE WILL:
  11473					;
  11474					;		1. INITIATE THE SECOND HALF OF THE INPUT DISABLE PROCESS FOR ALL
  11475					;		   WHICH HAVE FINISHED THE FIRST HALF
  11476					;		2. ENABLE A SINGLE LOCALLY (INPUT) DISABLED LINE, IF CONDITIONS ALLOW.
  11477					;		3. TRY TO UNBLOCK THE DTE IF IT WAS BLOCKED
  11478					;
  11479					;	AN ATTEMPT IS MADE TO START UP THE TO-10 QUEUE ON EVERY CLOCK TICK AS WELL.
  11480					;-
  11481
  11482	036236				.KW11S::
  11483	036236					CALL	R3,DHSAV	;;; [4.2095] MUST SAVE REGISTERS
	036236	004337 	040354'			JSR	R3,DHSAV
  11484	036242	105237 	001015'			INCB	.SERFG+1	;;; [4.2095] BUMP PENDING TICK COUNT
  11485	036246	005737 	005054'			TST	.TTS2F		;;; [5.1015] LINES NEED ATTENTION??
  11486	036252	001417 				BEQ	30$		;;; [4.4.1066] NO -- GO ON
  11487					;
  11488					; HERE TO CONTINUE INPUT DISABLE PROCESS
  11489					;
  11490	036254	012705 	003004'			MOV	#TTTBL,R5	;;; [5.1015] DLS TABLE POINTER TO R5
  11491	036260	012700 	000205 			MOV	#TTCNT,R0	;;; [5.1015] LINE COUNT TO R0
  11492	036264				10$:
  11493	036264					CALL	.TTSW2		;;; [5.1017] FIND OUT "STSW2" ENTRY
	036264	004737 	044212'			JSR	PC,.TTSW2
  11494	036270	032712 	040000 			BIT	#S2.DIP,(R2)	;;; [5.1015] YES -- INPUT XOFF IN PROGRESS??
  11495	036274	001403 				BEQ	20$		;;; [5.1015] NO -- GO ON
  11496	036276					CALL	.TTCHK		;;; [5.1015] YES -- COUNT THIS CLOCK TICK
	036276	004737 	043332'			JSR	PC,.TTCHK
  11497	036302	001403 				BEQ	30$		;;; [5.1015] EXIT IF DONE
  11498	036304				20$:
  11499	036304	062705 	000010 			ADD	#10,R5		;;; [5.1015] ADVANCE POINTER
  11500	036310	077013 				SOB	R0,10$		;;; [5.1015] CHECK ALL LINES
  11501	036312				30$:
  11502	036312	005737 	005056'			TST	.S2IDC		;;; [4.1.1092] ARE ANY DISABLED LINES PENDING??
  11503	036316	001410 				BEQ	40$		;;; [4.1.1092] NO -- TRY TO UNBLOCK THE DTE
  11504					;
  11505					; HERE TO ENABLE A LOCALLY DISABLED LINE
  11506					;
  11507	036320	023737 	005064'	001430'		CMP	.IBFOK,.FREPL+2	;;; [4.1.1092] YES -- CAN WE ENABLE NOW??
  11508	036326	101042 				BHI	DHISTQ		;;; [4.1.1092] NO -- GO ON
  11509	036330					CALL	.TTFDI		;;; [4.1.1092] YES -- FIND THE NEXT LINE TO ENABLE
	036330	004737 	042566'			JSR	PC,.TTFDI
  11510	036334					CALL	.TTENB		;;; [4.1.1092] AND ENABLE IT
	036334	004737 	043676'			JSR	PC,.TTENB
  11511					;[6.1361] REMOVE DEC .S2IDC
  11512	036340				40$:
  11513	036340	005737 	001012'			TST	.COMEF+2	;;; [4.1.1092] PRIMARY PROTOCOL RUNNING ??
  11514	036344	100033 				BPL	DHISTQ		;;; [4.1.1092] NO -- GO ON
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 213-1
TERMINAL DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)

  11515	036346	005737 	001402'			TST	.DTBLK		;;; [4.1.1121] IS THE DTE BLOCKED??
  11516	036352	001430 				BEQ	DHISTQ		;;; [4.1.1121] NO -- START THE TO-10 QUEUE
  11517	036354	013700 	001366'			MOV	.PRDTE,R0	;;; [4.1.1121] POINT TO THE DTE-20
  11518	036360	013703 	001362'			MOV	.PRADR,R3	;;; [4.1.1121] AND THE PROCESSOR TABLE
  11519	036364					CALL	@.DTBLK		;;; [4.1.1121] TRY TO UNBLOCK THE DTE
	036364	004777 	143012 			JSR	PC,@.DTBLK
  11520	036370	001021 				BNE	DHISTQ		;;; [4.1.1121]  GO ON IF STILL BLOCKED
  11521	036372					CALL	.KPALV		;;; [4.1.1121] OTHERWISE DO KEEP-ALIVE
	036372	004737 	032144'			JSR	PC,.KPALV
  11522	036376	000416 				BR	DHISTQ		;;; [4.1.1066] START THE TO-10 QUEUE
  11523						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 214
TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)

  11525						.SBTTL	TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)
  11526
  11527					;+
  11528					; $DHINP - DH-11 TERMINAL MULTIPLEXER INPUT INTERRUPTS
  11529					;
  11530					; THIS IS THE DH-11 INTERRUPT SERVICE ROUTINE. ALL DEVICE DEPENDENT INPUT
  11531					; PROCESSING IS DONE IN THIS ROUTINE. THE SPECIFIC FUNCTIONS PERFORMED
  11532					; HERE ARE:
  11533					;
  11534					;	1. SILO UNLOAD
  11535					;	2. AUTO-BAUD DETECT
  11536					;	3. FRAMING ERROR PROCESSING
  11537					;	4. TO-10 QUEUE ENTRY.
  11538					;	5. TO-10 QUEUE START-UP.
  11539					;
  11540					; THE SILO UNLOAD WILL DUMP THE INTERRUPTING DH-11'S SILO UNTIL:
  11541					;
  11542					;	1. THE SILO IS EMPTIED
  11543					;	2. AN XOFF CHARACTER IS UNLOADED FROM A LINE WHICH IS ENABLED FOR
  11544					;	   LOCAL XOFF PROCESSING.
  11545					;
  11546					; THE LAST POINT IS REQUIRED BECAUSE OF A SUSPECTED DH-11 HARDWARE BUG
  11547					; WHICH APPEARS TO CAUSE THE SILO TO "LOCK-UP" AFTER THE TRANSMITTER IS
  11548					; X'D-OFF.
  11549					;
  11550					; WHEN THE SILO UNLOAD IS COMPLETE, AN ATTEMPT IS MADE TO START UP THE
  11551					; TO-10 QUEUE.
  11552					;
  11553					; AUTOBAUD DETECTION IS PERFORMED FOR LINES WHICH ARE IN AUTO-BAUD WAIT
  11554					; THAT IS, LINES THAT ARE CONNECTED BUT NO SPEED HAS BEEN DETERMINED.
  11555					; AUTOBAUD DETECTION IS KEYED ON <CONTROL-C> AND <CARRIAGE-RETURN>
  11556					; CHARACTERS FOR LINE SPEEDSS OF 110, 150, 300, 1200, 1800, 2400, 4800,
  11557					; AND 9600 BAUD.  AUTOBAUD DETECT CONTINUES UNTIL A PATTERN MATCH IS
  11558					; MADE, OR THE LINE DISCONNECTS.  CHARACTERS EXAMINED FOR AUTO-BAUD DETECT
  11559					; ARE NOT CHECKED FOR FRAMING ERRORS OR ENTERED INTO THE TO-10 QUEUE.
  11560					;
  11561					; WHEN THE LINE HAS SUCCESSFULLY AUTOBAUDED, THE CONNECT MESSAGE IS SENT
  11562					; TO THE HOST, AS OPPOSED TO WHEN CARRIER IS ASSERTED FOR NON-AUTOBAUD
  11563					; LINES. A REQUEST IS ALSO MADE TO REPORT THE LINE SPEED TO THE HOST.
  11564					;
  11565					; FRAMING ERRORS ARE SENSED AND COUNTED FOR EACH NON-AUTOBAUD LINE. THE FRAMING
  11566					; ERROR COUNT IS CLEARED UPON RECEIPT OF A CHARACTER WITHOUT A FRAMING ERROR. IF
  11567					; FOUR CONSECUTIVE FRAMING ERRORS HAVE BEEN RECEIVED ON A NON-AUTOBAUD LINE, ITS
  11568					; INPUT SPEED IS SET TO ZERO BAUD, AND THE LINE IS FLAGGED TO HAVE ITS INPUT
  11569					; SPEED RE-ENABLED BY THE TERMINAL POLLING SERVICE (.DHTMO).
  11570					;
  11571					; ALL FRAMING ERROR CHARACTERS DETECTED BEFORE THE INPUT SPEED IS ZEROED ARE
  11572					; PASSED TO THE HOST.
  11573					;
  11574					; NORMAL CHARACTERS ARE SIMPLY ENTERED INTO THE TO-10 QUEUE.
  11575					;-
  11576
  11577						.ENABL	LSB
  11578
  11579	036400				$DHINP::			  ; [6.1567] REFERENCE LABEL
  11580	036400	013737 	177776 	002654'		MOV	@#PS,DHTMP	  ; SAVE THE CONTROLLER NUMBER
  11581	036406					CALL	R3,DHSAV	  ; SAVE R3 AND SETUP R4 AND R5
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 214-1
TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)

	036406	004337 	040354'			JSR	R3,DHSAV
  11582	036412	001415 				BEQ	30$		  ; GUARD AGAINST SPURIOUS INTERRUPTS
  11583	036414				10$:
  11584	036414	010537 	002660'			MOV	R5,DHSTSV	  ; SET UP THE HEAD OF THIS CONTROLLER TABLE ADDRESS
  11585	036420				20$:
  11586	036420	012746 	036420'			MOV	#20$,-(SP)	  ; SET RETURN ADDRESS
  11587	036424	016446 	000002 			MOV	2(R4),-(SP)	  ; GET NEXT BYTE FROM CONTROLLER SILO
  11588	036430	100407 				BMI	40$		  ; PROCESS CHARACTER FROM LINE IF THERE
  11589	036432	032626 				BIT	(SP)+,(SP)+	  ; REMOVE NULL CHARACTER AND RETURN ADDRESS
  11590	036434				DHISTQ:
  11591	036434	005737 	001012'			TST	.COMEF+2	  ; PRIMARY PROTOCOL RUNNING??
  11592	036440	100002 				BPL	30$		  ; NO -- DON'T BOTHER IT
  11593	036442					CALL	..STQ		  ; YES -- ATTEMPT TO START TO-10 QUEUE
	036442	004737 	047304'			JSR	PC,..STQ
  11594	036446				30$:
  11595	036446					RETURN			  ; DISMISS INTERRUPT
	036446	000207 				RTS	PC
  11596					;
  11597					;	HERE WITH A CHARACTER TO PROCESS
  11598					;
  11599	036450				40$:
  11600	036450	116605 	000001 			MOVB	1(SP),R5	  ; GET THE LINE NUMBER
  11601	036454	042705 	177760 			BIC	#^C17,R5	  ; GET RID OF ERRORS, ETC.
  11602	036460	010503 				MOV	R5,R3		  ; COPY LINE NUMBER TO R3
  11603	036462	006305 				ASL	R5		  ; MAKE A TABLE POINTER TO LINE WTHIN MUX
  11604	036464	006305 				ASL	R5		  ;
  11605	036466	006305 				ASL	R5		  ;
  11606	036470	063705 	002660'			ADD	DHSTSV,R5	  ; FROM BASE OF CONTROLLER TABLE
  11607	036474	005737 	001012'			TST	.COMEF+2	  ; IS PRIMARY PROTOCOL RUNNING??
  11608	036500	100117 				BPL	FERCHK		  ; NO -- JUST CHECK FRAMING ERRORS
  11609	036502	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; IS THE LINE IN AN AUTO-BAUD LINE?
  11610	036510	001513 				BEQ	FERCHK		  ; NO -- CHECK FOR FRAMING ERROR
  11611					;
  11612					;	HERE WITH A CHARACTER FROM AN AUTO-BAUD LINE
  11613					;
  11614	036512	032765 	010000 	000006 		BIT	#TT.IGN,STSW1(R5) ; IGNORING THIS CHARACTER
  11615	036520	001404 				BEQ	50$		  ; NO
  11616	036522	042765 	010000 	000006 		BIC	#TT.IGN,STSW1(R5) ; YES -- CLEAR THE FLAG
  11617	036530	000445 				BR	100$		  ; AND IGNORE THE CHARACTER
  11618						;
  11619					;
  11620					;	CHECK FOR AUTOBAUD
  11621					;
  11622	036532				50$:
  11623	036532	032765 	000010 	000006 		BIT	#TT.ABW,STSW1(R5) ; IS THE LINE IN IN AUTO-BAUD WAIT?
  11624	036540	001477 				BEQ	FERCHK		  ; NO -- CHECK FOR FRAMING ERROR
  11625	036542	111637 	011364'			MOVB	(SP),ABCHAR	  ; SAVE CHAR
  11626	036546	032765 	020000 	000006 		BIT	#TT.LSP,STSW1(R5) ; LOW SPEED AUTO BAUD?
  11627	036554	001407 				BEQ	60$		  ; NO -- USE HIGH SPEED TABLE
  11628	036556	042765 	020000 	000006 		BIC	#TT.LSP,STSW1(R5) ; CLEAR LOW SPEED FLAG
  11629	036564	005002 				CLR	R2		  ; NO -- CLEAR TABLE INDEX
  11630	036566	012701 	000011 			MOV	#LSPTLN,R1	  ; TABLE LENGTH TO R1
  11631	036572	000415 				BR	80$		  ; SEARCH FOR A MATCH
  11632						;
  11633	036574				60$:
  11634	036574	122716 	000000 			CMPB	#LSPCHR,(SP)	  ; LOW SPEED CHARACTER?
  11635	036600	001004 				BNE	70$		  ; NO, GO ON
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 214-2
TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)

  11636	036602	052765 	030000 	000006 		BIS	#TT.LSP!TT.IGN,STSW1(R5) ; YES, GO TO LOW SPEED AND IGNORE NEXT
  11637	036610	000413 				BR	90$		  ;
  11638						;
  11639	036612				70$:
  11640	036612	142716 	177401 			BICB	#^C<HSPMSK>,(SP)  ; CLEAR UNWANTED BITS FOR HIGH SPEED
  11641	036616	012702 	000011 			MOV	#HSPTAB-LSPTAB,R2 ; GET TABLE INDEX TO START
  11642	036622	012701 	000014 			MOV	#HSPTLN,R1	  ; TABLE LENGTH TO R1
  11643	036626				80$:
  11644	036626	121662 	033162'			CMPB	(SP),LSPTAB(R2)	  ; MATCH A BIT PATTERN??
  11645	036632	001406 				BEQ	110$		  ; YES -- DONE
  11646	036634	005202 				INC	R2		  ; NO -- NEXT PATTERN
  11647	036636	077105 				SOB	R1,80$		  ; TRY AGAIN
  11648	036640				90$:
  11649	036640					CALL	.DHSPR		  ; GO SET NEW DETECTION SPEED
	036640	004737 	040602'			JSR	PC,.DHSPR
  11650	036644				100$:
  11651	036644	000137 	037440'			JMP	TTINPB		  ; NO MATCH, FLUSH CHARACTER AND DISMISS
  11652						;
  11653					;
  11654					;	HERE ON AUTO-BAUD PATTERN MATCH
  11655					;
  11656	036650				110$:				  ; HERE ON BIT PATTERN MATCH
  11657	036650	042765 	010010 	000006 		BIC	#TT.ABW!TT.IGN,STSW1(R5) ; NO LONGER IN AUTO-BAUD WAIT
  11658	036656	116202 	033207'			MOVB	LSPSPD(R2),R2	  ; FIND INDEX FOR LINE SPEED
  11659	036662	100003 				BPL	120$		  ; IGNORING NEXT CHARACTER?
  11660	036664	052765 	010000 	000006 		BIS	#TT.IGN,STSW1(R5) ; YES -- SET IGNORE NEXT CHARACTER BIT
  11661	036672				120$:
  11662	036672	042702 	177760 			BIC	#^C<LSP.SP>,R2	  ; GET SPEED INDEX
  11663	036676	006302 				ASL	R2		  ; MAKE A WORD INDEX
  11664	036700	016203 	033234'			MOV	SPDPAR(R2),R3	  ; FIND THE SPEED
  11665	036704					CALL	.DHSPD		  ; SET THE LINE SPEED
	036704	004737 	040714'			JSR	PC,.DHSPD
  11666	036710					CALL	.DHSPF		  ; FLAG THE NEW SPEED
	036710	004737 	040654'			JSR	PC,.DHSPF
  11667	036714					CALL	.STTYD		  ; RING THE LINE
	036714	004737 	041212'			JSR	PC,.STTYD
  11668	036720	032765 	040000 	000004 		BIT	#S0.CON,STSW0(R5) ; ALREADY CONNECTED?
  11669	036726	001746 				BEQ	100$		  ; NO -- DUMP THE CHAR
  11670	036730	112716 	000015 			MOVB	#15,(SP)	  ; YES -- FUDGE A <CR>
  11671	036734	000137 	037264'			JMP	TTSTCH		  ; AND GO STORE IT (SO USERS DON'T HAVE TO)
  11672						;
  11673					;
  11674					; HERE TO CHECK FOR A FRAMING ERROR
  11675					;
  11676	036740				FERCHK::
  11677	036740	032716 	020000 			BIT	#DH.FER,(SP)	  ; FRAMING ERROR PRESENT??
  11678	036744	001020 				BNE	230$		  ; YES -- COUNT IT UP
  11679	036746	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; AUTOBAUD?
  11680	036754	001404 				BEQ	220$		  ; NO, CLEAR FRAMING ERROR COUNT
  11681	036756				210$:
  11682	036756	042765 	004000 	000006 		BIC	#TT.BRK,STSW1(R5) ; YES, CLEAR LAST CHAR BREAK FLAG
  11683	036764	000537 				BR	TTSTCH		  ; STORE CHARACTER AND RETURN
  11684						;
  11685	036766				220$:
  11686	036766					CALL	.TTSW2		  ; FIND OUR STSW2 ENTRY
	036766	004737 	044212'			JSR	PC,.TTSW2
  11687	036772	005712 				TST	(R2)		  ; LINE SHUT OFF BY US ?
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 214-3
TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)

  11688	036774	100463 				BMI	SNDBEL		  ; BRANCH IF SO
  11689	036776	042765 	014000 	000006 		BIC	#TT.FEC,STSW1(R5) ; FLUSH ANY PREVIOUS COUNT
  11690	037004	000527 				BR	TTSTCH		  ; STORE THE CHARACTER AND RETURN
  11691						;
  11692					;
  11693					; HERE TO COUNT A FRAMING ERROR AND SHUT OFF THE LINE IF REQUIRED
  11694					; ONLY NON-AUTOBAUD LINES WILL GET SHUT OFF
  11695					;
  11696	037006				230$:
  11697	037006	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; AUTOBAUD?
  11698	037014	001423 				BEQ	250$		  ; BRANCH IF NOT
  11699	037016	105716 				TSTB	(SP)		  ; BREAK?  (FRAMING ERROR + NULL CHAR)
  11700	037020	001356 				BNE	210$		  ; NO, CLEAR LAST CHAR BREAK
  11701	037022	032765 	004000 	000006 		BIT	#TT.BRK,STSW1(R5) ; WAS LAST CHAR A BREAK?
  11702	037030	001411 				BEQ	240$		  ; NO, MARK IT
  11703	037032	042765 	024000 	000006 		BIC	#TT.LSP!TT.BRK,STSW1(R5) ; YES, GO INTO HIGH SPEED AUTO
  11704	037040	052765 	000010 	000006 		BIS	#TT.ABW,STSW1(R5) ; AND GO INTO AUTOBAUD WAIT
  11705	037046					CALL	.DHSPR		  ; RESET AUTOBAUD DETECTION SPEED
	037046	004737 	040602'			JSR	PC,.DHSPR
  11706	037052	000572 				BR	TTINPB		  ; AND EXIT
  11707						;
  11708	037054				240$:
  11709	037054	052765 	004000 	000006 		BIS	#TT.BRK,STSW1(R5) ; FLAG LAST CHAR WAS BREAK
  11710	037062	000566 				BR	TTINPB		  ; AND, EXIT
  11711						;
  11712	037064				250$:
  11713	037064	032765 	020000 	000006 		BIT	#TT.RSI,STSW1(R5) ; INPUT RESTART ALREADY PENDING??
  11714	037072	001162 				BNE	TTINPB		  ; YES -- FLUSH CHARACTER AND RETURN
  11715	037074	062765 	004000 	000006 		ADD	#TT.FEI,STSW1(R5) ; NO -- COUNT THIS FRAMING ERROR
  11716									  ; NOTE: THIS WILL ALSO SET "TT.RSI" ON
  11717									  ;       FRAMING ERROR COUNT OVERFLOW
  11718	037102	016502 	000006 			MOV	STSW1(R5),R2	  ; COPY STATUS WORD TO R2
  11719	037106	042702 	163777 			BIC	#^C<TT.FEC>,R2	  ; MASK AND TEST FRAMING ERROR COUNT
  11720	037112	001064 				BNE	TTSTCH		  ; STILL OK -- GO ON
  11721	037114	042714 	001077 			BIC	#1077,(R4)	  ; OVERFLOWED -- CLEAR LINE NUMBER
  11722	037120	050314 				BIS	R3,(R4)		  ; SET THIS LINE NUMBER
  11723	037122					CALL	.DHSPZ		  ; SET INPUT SPEED TO ZERO
	037122	004737 	040540'			JSR	PC,.DHSPZ
  11724	037126	012703 	000300 			MOV	#DV.LOG!DV.URE,R3 ; SET STANDARD STATUS
  11725	037132	011637 	002666'			MOV	(SP),.TTELB	  ; SAVE THE ERROR DATA
  11726	037136					CALL	.TTERL		  ; LOG THE ERROR
	037136	004737 	042634'			JSR	PC,.TTERL
  11727	037142	000450 				BR	TTSTCH		  ; STORE THE CHARACTER AND EXIT
  11728						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 215
TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)

  11730	037144				SNDBEL::			  ; [RCO 32681]
  11731	037144	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ; OUTPUT IN PROGRESS ?
  11732	037152	001132 				BNE	TTINPB		  ; EXIT IF SO
  11733	037154	042714 	001077 			BIC	#1077,(R4)	  ; CLEAR OLD LINE NUMBER
  11734	037160	050314 				BIS	R3,(R4)		  ; SET NEW LINE NUMBER
  11735	037162	012764 	037216'	000006 		MOV	#BELADR,6(R4)	  ; SET THE ADDRESS FOR OUTPUT
  11736	037170	012764 	177777 	000010 		MOV	#-1,10(R4)	  ; AND THE BYTE COUNT
  11737	037176	011402 				MOV	@R4,R2		  ; GET THE DH UNIT NUMBER
  11738	037200	042702 	177760 			BIC	#177760,R2	  ; CLEAR ANY EXTRAS
  11739	037204	006302 				ASL	R2		  ; MAKE IT A WORD INDEX
  11740	037206	056264 	044260'	000012 		BIS	BITTBL(R2),12(R4) ; START THE DH GOING
  11741	037214	000511 				BR	TTINPB		  ; AND EXIT
  11742						;
  11743	037216				BELADR::
  11744	037216	   207 				.BYTE	207		  ; EVEN PARITY <BEL>
  11745						.EVEN
  11746						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 216
TERMINAL DRIVER -- $TTINP (DL-11 INPUT INTERRUPT)

  11748						.SBTTL	TERMINAL DRIVER -- $TTINP (DL-11 INPUT INTERRUPT)
  11749
  11750					;+
  11751					; **-$TTINP-DL-11 TERMINAL INPUT INTERRUPTS
  11752					;
  11753					; THIS IS THE DL-11 INPUT INTERRUPT HEAD, ALL DEVICE DEPENDENT INPUT PROCESSING
  11754					; IS DONE HERE.
  11755					;
  11756					; THE DL-11 INPUT SERVICE IS MUCH SIMPLER THAT THAT OF THE DH-11.  CONTROL WILL
  11757					; BE TRANSFERRED TO THE DL-11E MODEM INTERRUPT SERVICE, IF REQUIRED.  CHARACTERS
  11758					; WITH FRAMING ERRORS ARE SIMPLY IGNORED, AND AN ATTMEPT IS MADE TO START THE
  11759					; TO-10 QUEUE WHE THE INTERRUPT IS DISMISSED.
  11760					;
  11761					; CHARACTERS FROM DL-11'S ARE ENTERED INTO THE TO-10 QUEUE FOR TRANSMISSION TO
  11762					; THE HOST IN THE SAME MANNER AS ARE CHARACTERS FROM DH-11'S.
  11763					;-
  11764
  11765						.ENABL	LSB
  11766
  11767	037220				$TTINP::			;;; REF LABEL
  11768	037220	013737 	177776 	002656'		MOV	@#PS,DLTMP	;;; SAVE CONTROLLER NUMBER
  11769	037226					CALL	R3,TTSAV	;;; SAVE R3 AND SETUP R4 AND R5
	037226	004337 	040412'			JSR	R3,TTSAV
  11770	037232	001543 				BEQ	80$		;;; SPURIOUS INTERRUPT
  11771	037234	011400 				MOV	(R4),R0		;;; GET STATUS
  11772	037236	100542 				BMI	.DLINT		;;; THIS IS MODEM INTERRUPT.
  11773	037240				TTINPA:
  11774	037240	012746 	036434'			MOV	#DHISTQ,-(SP)	;;; RETURN THROUGH TO10Q STARTUP
  11775	037244	016446 	000002 			MOV	2(R4),-(SP)	;;; GET INPUT BYTE AND FLAGS
  11776	037250	032716 	020000 			BIT	#DL.FER,(SP)	;;; FRAMING ERROR PRESENT??
  11777	037254	001071 				BNE	TTINPB		;;; YES -- FORGET IT
  11778	037256	105765 	000004 			TSTB	STSW0+0(R5)	;;; [4.2284] NO -- IS THIS LINE TURNED OFF??
  11779	037262	001066 				BNE	TTINPB		;;; YES -- GO AWAY
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 217
TERMINAL DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)

  11781						.SBTTL	TERMINAL DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)
  11782
  11783					;+
  11784					; TTSTCH -- STORE TERMINAL CHARACTER IN TO-10 QUEUE
  11785					;
  11786					; THIS ROUTINE PERFORMS DEVICE INDEPENDENT INPUT CHARACTER PROCESSING.
  11787					; SPECIFIC FUNCTIONS PERFORMED ARE:
  11788					;
  11789					;	1. KLINIK INPUT PROCESSING
  11790					;	2. PROTOCOL PAUSE INPUT PRECESSING
  11791					;	3. LOCAL XOFF PROCESSING
  11792					;	4. PDP-11 CTY INPUT PROCESSING
  11793					;	5. SECONDARY PROTOCOL INPUT PROCESSING.
  11794					;
  11795					; CHARACTERS FROM THE KLINIK LINE ARE IGNORED IF KLINIK IS NOT ENABLED.
  11796					;
  11797					; CHARACTERS RECEIVED DURING PROTOCOL PAUSE ARE BUFFERED UNTIL A MINIMUM THRESHOLD
  11798					; IS CROSSED, WHEREUPON THE FRONT-END IS CRASHED (B01).
  11799					;
  11800					; XOFF CHARACTERS ARE PROCESSED LOCALLY FOR LINES WHICH ARE SO ENABLED.  THE
  11801					; RETURN IS ALTERED SO AS TO TERMINATE A DH-11 SILO UNLOAD.
  11802					;
  11803					; PDP-11 CTY CHARACTERS ARE ECHOED AND PASSED TO THE TASK WHICH "OWNS" THE CTY.
  11804					;
  11805					; A <CONTROL-C> CHARACTER IS DECLARED AS A SIGNIFICANT EVENT.
  11806					; A <CONTROL-BACKSLASH> CHARACTER REQUESTS THE PARSER TASK.
  11807					;
  11808					; CHARACTERS RECEIVED WHILE IN SECONDARY PROTOCOL ARE PASSED TO THE BOOT
  11809					; PROTOCOL TASK.
  11810					;
  11811					; NORMAL CHARACTERS RECEIVED IN PRIMARY PROTOCOL ARE QUEUED UP FOR TRANSMISSION
  11812					; TO THE HOST.  CHARACTERS RECEIVED FROM A LINE WHICH IS IN CARRIER-WAIT ARE
  11813					; IGNORED.
  11814					;-
  11815
  11816	037264				TTSTCH:
  11817	037264	020537 	002644'			CMP	R5,KLNPTR	;;; IS THIS THE KLINIK LINE??
  11818	037270	001003 				BNE	10$		;;; NO -- GO ON
  11819	037272	105737 	001234'			TSTB	.KLNSW+0	;;; YES -- IS KLINIK ACTIVE??
  11820	037276	001460 				BEQ	TTINPB		;;; NO -- GO AWAY
  11821	037300				10$:
  11822	037300	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS THE CTY?
  11823	037306	001056 				BNE	50$		;;; YES -- SPECIAL CASE
  11824	037310				20$:				;;; [4.2211]
  11825	037310	032765 	000004 	000006 		BIT	#TT.CRW,STSW1(R5) ;;; [4.2333] NO -- IS THE LINE IN CARRIER-WAIT??
  11826	037316	001050 				BNE	TTINPB		;;; [4.2333] YES -- IGNORE IT
  11827	037320	005737 	001012'			TST	.COMEF+2	;;; [4.1.1105] NO -- IS PRIMARY PROTOCOL RUNNING?
  11828	037324	100410 				BMI	30$		;;; [4.1.1105] YES -- GO ON
  11829	037326	105737 	001400'			TSTB	.PRPSE		;;; [4.2211] NO -- PROTOCOL PAUSE??
  11830	037332	001442 				BEQ	TTINPB		;;; [4.2211] NO -- FLUSH CHARACTER AND DISMISS
  11831	037334	022737 	000140 	001430'		CMP	#140,.FREPL+2	;;; [4.2211] YES -- WITHIN  LIMITS??
  11832	037342	002401 				BLT	30$		;;; [4.2211] YES -- GO ON
  11833	037344	000677 				BR	SNDBEL		;;; [RCO 032681] SEND A BELL TO USER
  11834						;
  11835	037346				30$:				;;; [4.2211]
  11836	037346	032765 	000020 	000006 		BIT	#TT.XEN,STSW1(R5) ;;; [4.2181] IS INTERNAL XOFF ENABLED??
  11837	037354	001415 				BEQ	40$		;;; [4.2211] NO -- GO ON
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 217-1
TERMINAL DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)

  11838	037356	011646 				MOV	(SP),-(SP)	;;; [4.2181] YES -- GET CHARACTER FOR INPUT CHECK
  11839	037360	042716 	177600 			BIC	#^C177,(SP)	;;; [4.2181] FLUSH LINE NUMBER AND PARITY
  11840	037364	022716 	000021 			CMP	#C.HXON,(SP)	;;; [6.1480] IS IT AN XON?
  11841	037370	001002 				BNE	35$		;;; [6.1480] NO -- GO ON
  11842	037372					CALL	.TTXON		;;; [6.1480] YES -- PROCESS XON
	037372	004737 	043104'			JSR	PC,.TTXON
  11843	037376				35$:				;;; [6.1480]
  11844	037376	022726 	000023 			CMP	#C.HXOF,(SP)+	;;; [4.2181] IS IT AN XOFF??
  11845	037402	001002 				BNE	40$		;;; [4.2211] NO -- GO ON
  11846	037404					CALL	.TTXOF		;;; [4.2181] YES -- PROCESS XOFF
	037404	004737 	042762'			JSR	PC,.TTXOF
  11847	037410				40$:				;;; [4.2211]
  11848	037410					CALL	..STCH		;;; STORE CHARACTER WITH PARITY
	037410	004737 	046564'			JSR	PC,..STCH
  11849	037414					CALL	.TTSW2		;;; [5.1099] FIND OUR "STSW2" ENTRY
	037414	004737 	044212'			JSR	PC,.TTSW2
  11850	037420	032712 	040000 			BIT	#S2.DIP,(R2)	;;; [5.1099] INPUT XOFF IN PROGRESS??
  11851	037424	001403 				BEQ	45$		;;; [5.1099] NO -- CHECK FREE-POOL THRESHOLD
  11852	037426					CALL	.TTCHK		;;; [5.1099] YES -- COUNT THIS CHARACTER
	037426	004737 	043332'			JSR	PC,.TTCHK
  11853	037432	000402 				BR	TTINPB		;;; [5.1099] AND EXIT
  11854						;
  11855	037434				45$:
  11856	037434					CALL	.TTICK		;;; [4.1.1092] CHECK THE BUFFER
	037434	004737 	043356'			JSR	PC,.TTICK
  11857	037440				TTINPB:
  11858	037440	005726 				TST	(SP)+		;;; REMOVE THE CHARACTER
  11859	037442					RETURN			;;; AND EXIT
	037442	000207 				RTS	PC
  11860	037444				50$:
  11861	037444	013705 	002642'			MOV	CTYPTR,R5	;;; POINT TO REAL CTY
  11862	037450	011600 				MOV	(SP),R0		;;; GET THE CHARACTER AND
  11863	037452	042700 	177600 			BIC	#^C177,R0	;;; MASK OFF PARITY
  11864	037456	122700 	000003 			CMPB	#'C-100,R0	;;; ^C?
  11865	037462	001005 				BNE	60$		;;; NO -- DON'T SET EVENT FLAG
  11866	037464	052737 	040000 	001012'		BIS	#EF.CTC,.COMEF+2 ;;; TELL THE MONITOR
  11867	037472					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	037472	004737 	045264'			JSR	PC,..DSEV
  11868	037476				60$:
  11869	037476	123700 	002636'			CMPB	.BRKCH,R0	;;; NULL CHARACTER?
  11870	037502	001006 				BNE	70$		;;; NO -- ALL OK
  11871	037504	052737 	000200 	007222'		BIS	#EF.RQM,TTYTSK+A.EF ;;; START PARSER TASK
  11872	037512					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	037512	004737 	045264'			JSR	PC,..DSEV
  11873	037516	000750 				BR	TTINPB		;;; IGNORE CHARACTER
  11874						;
  11875	037520				70$:
  11876	037520	005737 	002640'			TST	.TTP11		;;; IS THIS PDP11 INPUT?
  11877	037524	001100 				BNE	TTCTY		;;; YES -- GO DO ECHO ETC
  11878	037526	032737 	020000 	001012'		BIT	#EF.PR2,.COMEF+2 ;;; IS THIS BOOT PROTOCOL?
  11879	037534	001665 				BEQ	20$		;;; [4.2211] NO -- THEN JUST TREAT IT AS A NORMAL REQUEST
  11880	037536	112637 	001162'			MOVB	(SP)+,.BTSCH	;;; STORE CHARACTER FOR BOOT PROTOCOL
  11881	037542				80$:
  11882	037542					RETURN
	037542	000207 				RTS	PC
  11883
  11884						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 218
TERMINAL DRIVER -- .DLINT (DL-11E DATASET INTERRUPT SERVICE)

  11886						.SBTTL	TERMINAL DRIVER -- .DLINT (DL-11E DATASET INTERRUPT SERVICE)
  11887					;+
  11888					;	.DLINT -- DL-11E DATASET INTERRUPT SERVICE
  11889					;
  11890					; ENTER WITH:
  11891					;
  11892					;	R0 -- CSR FOR THIS DEVICE
  11893					;	R4 -- POINTS TO EXTERNAL PAGE FOR THIS DEVICE
  11894					;	R5 -- POINTS TO DLS ENTRY FOR THIS DEVICE
  11895					;
  11896					;-
  11897
  11898	037544				.DLINT::			;;; CALLED FROM "$TTINP"
  11899	037544	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5);;; REMOTE TERMINAL??
  11900	037552	001452 				BEQ	40$		;;; NO -- NOISE - GO AWAY
  11901	037554	032700 	040000 			BIT	#DL.RNG,R0	;;; YES -- DID IT RING??
  11902	037560	001421 				BEQ	20$		;;; NO -- GO LOOK AT CARRIER
  11903	037562	012714 	000046 			MOV	#DL.DTR!DL.DEN!DL.RTS,(R4)
  11904									;;; SET UP TO WAIT FOR CARRIER
  11905	037566	020537 	002644'			CMP	R5,KLNPTR	;;; IS THIS THE KLINIK LINE??
  11906	037572	001403 				BEQ	10$		;;; YES -- GO ON
  11907	037574					CALL	.TTRNG		;;; NO -- DISCONNECT AND SET CARRIER WAIT
	037574	004737 	037712'			JSR	PC,.TTRNG
  11908	037600	000411 				BR	20$		;;; AND GO  ON
  11909						;
  11910	037602				10$:
  11911	037602	105737 	001234'			TSTB	.KLNSW+0	;;; IS KLINIK ALREADY ACTIVE??
  11912	037606	001006 				BNE	20$		;;; YES -- NOISE - GO ON
  11913	037610	052737 	001000 	007222'		BIS	#EF.RKR,TTYTSK+A.EF ;;; NO -- REQUEST KLRING
  11914	037616					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	037616	004737 	045264'			JSR	PC,..DSEV
  11915	037622	000432 				BR	50$		;;; AND LET IT HANDLE CARRIER
  11916						;
  11917	037624				20$:
  11918	037624	032700 	010000 			BIT	#DL.CAR,R0	;;; CARRIER DETECT UP??
  11919	037630	001416 				BEQ	30$		;;; NO -- GO LOOK AT DATA TERMINAL READY
  11920	037632	032714 	000004 			BIT	#DL.RTS,(R4)	;;; YES -- IS REQUEST TO SEND UP??
  11921	037636	001424 				BEQ	50$		;;; NO -- JUST EXIT
  11922	037640	042765 	002004 	000006 		BIC	#TT.CRW!TT.RIP,STSW1(R5)
  11923	037646	052714 	000100 			BIS	#DL.REN,(R4)	;;; ENABLE RCVR INTERRUPTS
  11924	037652	020537 	002644'			CMP	R5,KLNPTR	;;; IS THIS THE KLINIK LINE??
  11925	037656	001410 				BEQ	40$		;;; YES -- GO ON
  11926	037660					CALL	.STTYD		;;; TELL -10 ABOUT DIALUP
	037660	004737 	041212'			JSR	PC,.STTYD
  11927	037664	000405 				BR	40$		;;; AND GO AWAY
  11928						;
  11929	037666				30$:				;;; HERE IF CARRIER IS OFF
  11930	037666	032714 	000002 			BIT	#DL.DTR,(R4)	;;; DATA TERMINAL READY LIT??
  11931	037672	001406 				BEQ	50$		;;; NO -- EXIT
  11932	037674					CALL	.TTSCW		;;; YES -- WAIT FOR CARRIER
	037674	004737 	037716'			JSR	PC,.TTSCW
  11933	037700				40$:
  11934	037700	105714 				TSTB	(R4)		;;; RCVR DONE LIT??
  11935	037702	100002 				BPL	50$		;;; [4.2211] NO -- EXIT
  11936	037704	000137 	037240'			JMP	TTINPA		;;; [4.2211] YES -- PROCESS DATA
  11937						;
  11938	037710				50$:
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 218-1
TERMINAL DRIVER -- .DLINT (DL-11E DATASET INTERRUPT SERVICE)

  11939	037710					RETURN			;;; TO CALLER
	037710	000207 				RTS	PC
  11940					;
  11941					; RING TRANSITION
  11942					;
  11943	037712				.TTRNG:
  11944	037712					CALL	.STTYH		;;; [4.2055] TRANSMIT HANGUP
	037712	004737 	041226'			JSR	PC,.STTYH
  11945					;
  11946					; CARRIER DROP TRANSITION
  11947					;
  11948	037716				.TTSCW:
  11949	037716	052765 	002004 	000006 		BIS	#TT.CRW!TT.RIP,STSW1(R5) ;;; [4.2055] SET CARRIER WAIT
  11950	037724					RETURN			;;; [4.2055] DISMISS AND RETURN
	037724	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 219
TERMINAL DRIVER -- TTCTY (CTY SERVICE)

  11952						.SBTTL	TERMINAL DRIVER -- TTCTY (CTY SERVICE)
  11953
  11954						.ENABL	LSB
  11955	037726				TTCTY:
  11956	037726	013705 	002642'			MOV	CTYPTR,R5	;;; RESET TO CTY AND
  11957	037732	012703 	002672'			MOV	#CTYSTS,R3	;;; GET CTY BLOCK POINTER.
  11958	037736	110016 				MOVB	R0,(SP)		;;; USE CHARACTER WITHOUT PARITY.
  11959	037740	122716 	000017 			CMPB	#'O-100,@SP	;;; CONTROL O?
  11960	037744	001010 				BNE	95$		;;; IF NE NO
  11961	037746	011346 				MOV	@R3,-(SP)	;;; XOR CTLO BIT
  11962	037750	042716 	177737 			BIC	#^C<CTLO>,@SP	;;; WITH STATUS WORD
  11963	037754	052713 	000040 			BIS	#CTLO,@R3
  11964	037760	042613 				BIC	(SP)+,@R3
  11965	037762				80$:
  11966					;
  11967					; CONTROLLER IS BUSY ON OUTPUT-IGNORE INPUT REQUEST
  11968					;
  11969	037762				85$:
  11970	037762	005726 				TST	(SP)+		;;; REMOVE BYTE FROM STACK
  11971	037764				90$:
  11972	037764					RETURN			;;; EXIT INTERRUPT
	037764	000207 				RTS	PC
  11973					;
  11974					; CONTROLLER IS BUSY ON INPUT OR OUTPUT
  11975					;
  11976	037766				95$:
  11977	037766	005713 				TST	@R3		;;; BUSY ON INPUT?
  11978	037770	100774 				BMI	80$		;;; IF MI NO
  11979					;
  11980					; PROCESS NEXT INPUT BYTE
  11981					;
  11982	037772				100$:
  11983	037772	122716 	000177 			CMPB	#177,@SP	;;; RUBOUT?
  11984	037776	001450 				BEQ	115$		;;; IF EQ YES
  11985	040000	122716 	000025 			CMPB	#25,@SP		;;; LINE DELETE?
  11986	040004	001474 				BEQ	125$		;;; IF EQ YES
  11987	040006	122716 	000033 			CMPB	#C.HESC,@SP	;;; ESCAPE?
  11988	040012	001506 				BEQ	1$		;;; IF EQ YES
  11989	040014	122716 	000032 			CMPB	#C.HEOF,@SP	;;; CONTROL Z?
  11990	040020	001507 				BEQ	11$		;;; IF EQ YES
  11991	040022	122716 	000015 			CMPB	#C.HCRT,@SP	;;; CARRIAGE RETURN?
  11992	040026	001524 				BEQ	41$		;;; IF EQ YES
  11993	040030	122716 	000003 			CMPB	#3,@SP		;;; ^C?
  11994	040034	001510 				BEQ	21$		;;; YES
  11995	040036	122716 	000140 			CMPB	#140,@SP	;;; CHECK FOR LC
  11996	040042	103005 				BHIS	105$		;;; NO
  11997	040044	122716 	000173 			CMPB	#173,@SP
  11998	040050	103402 				BLO	105$
  11999	040052	042716 	000040 			BIC	#40,@SP		;;; YES
  12000					;
  12001					; STORE BYTE IN INPUT BUFFER
  12002					;
  12003	040056				105$:
  12004	040056	111673 	000006 			MOVB	@SP,@CURBF(R3)	;;; STORE BYTE IN BUFFER
  12005	040062	005263 	000006 			INC	CURBF(R3)	;;; INCREMENT BUFFER ADDRESS
  12006	040066	105363 	000004 			DECB	RMBYT(R3)	;;; ANY REMAINING SPACE IN BUFFER
  12007	040072	001004 				BNE	110$		;;; IF NE YES
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 219-1
TERMINAL DRIVER -- TTCTY (CTY SERVICE)

  12008	040074	005363 	000006 			DEC	CURBF(R3)	;;; BACK UP TO END OF BUFFER
  12009	040100	052713 	000400 			BIS	#EOLS,@R3	;;; TERMINATE ON BYTE COUNT
  12010	040104				110$:
  12011	040104	032713 	000020 			BIT	#RUBP,@R3	;;; RUBOUT IN PROGRESS?
  12012	040110	001477 				BEQ	61$		;;; IF EQ NO
  12013	040112	042713 	000020 			BIC	#RUBP,@R3	;;; CLEAR RUBOUT IN PROGRESS
  12014	040116	000417 				BR	120$
  12015						;
  12016					;
  12017					; RUBOUT
  12018					;
  12019	040120				115$:
  12020	040120	026363 	000006 	000002 		CMP	CURBF(R3),STRBF(R3) ;;; ANY BYTES TO RUBOUT?
  12021	040126	001715 				BEQ	80$		;;; IF EQ NO
  12022	040130	005363 	000006 			DEC	CURBF(R3)	;;; BACK UP ONE BYTE
  12023	040134	117316 	000006 			MOVB	@CURBF(R3),@SP	;;; GET BYTE TO BE RUBBED OUT
  12024	040140	105263 	000004 			INCB	RMBYT(R3)	;;; INCREMENT REMAINING SPACE IN BUFFER
  12025	040144	032713 	000020 			BIT	#RUBP,@R3	;;; RUBOUT ALREADY IN PROGRESS?
  12026	040150	001057 				BNE	61$		;;; IF NE YES
  12027	040152	052713 	000020 			BIS	#RUBP,@R3	;;; SET RUBOUT IN PROGRESS
  12028	040156				120$:
  12029	040156	000316 				SWAB	@SP		;;; SWAP BYTE TO HIGH BYTE
  12030	040160	112716 	000134 			MOVB	#'\,@SP		;;; INSERT BACKSLASH
  12031	040164	011663 	000014 			MOV	@SP,MBUFR(R3)	;;; INSERT TEXT IN MULTI-ECHO BUFFER
  12032	040170	012716 	000002 			MOV	#2,@SP		;;; SET LENGTH OF BUFFER
  12033	040174	000456 				BR	81$
  12034						;
  12035					;
  12036					; LINE DELETE
  12037					;
  12038	040176				125$:
  12039	040176	012716 	000004 			MOV	#4,@SP		;;; SET LENGTH OF BUFFER
  12040	040202	012746 	033060'			MOV	#CTRLU,-(SP)	;;; SET ADDRESS OF MULTI-ECHO BUFFER
  12041	040206	042713 	000020 			BIC	#RUBP,@R3	;;; CLEAR RUBOUT IN PROGRESS FLAG
  12042	040212	013763 	002732'	000004 		MOV	CNT,RMBYT(R3)	;;; RESET REMAINING BYTES IN BUFFER
  12043	040220	016363 	000002 	000006 		MOV	STRBF(R3),CURBF(R3) ;;; RESET ADDRESS IN BUFFER
  12044	040226	000444 				BR	91$
  12045						;
  12046					;
  12047					; ESCAPE
  12048					;
  12049	040230				1$:
  12050	040230	111663 	000005 			MOVB	@SP,FNBYT(R3)	;;; [TCO 4.1.1126] SET FINAL BYTE
  12051	040234	105016 				CLRB	@SP		;;; [TCO 4.1.1126] SET TO ECHO ZERO BYTE
  12052	040236	000422 				BR	51$		;;; SET END OF LINE SEEN
  12053						;
  12054					;
  12055					; CONTROL Z
  12056					;
  12057	040240				11$:
  12058	040240	105363 	000005 			DECB	FNBYT(R3)	;;; SET CONTROL Z FLAG
  12059	040244	012716 	000004 			MOV	#4,@SP
  12060	040250	012746 	033064'			MOV	#CTRLZ,-(SP)	;;; SET ADDRESS OF MULTI-ECHO BUFFER
  12061	040254	000406 				BR	31$
  12062						;
  12063					;
  12064					; CONTROL C
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 219-2
TERMINAL DRIVER -- TTCTY (CTY SERVICE)

  12065					;
  12066	040256				21$:
  12067	040256	111663 	000005 			MOVB	@SP,FNBYT(R3)	;;; SET IN LAST CHARACTER
  12068	040262	012716 	000004 			MOV	#4,@SP		;;; SET COUNT
  12069	040266	012746 	033054'			MOV	#CTRLC,-(SP)	;;; SET  CNTRL C
  12070	040272				31$:
  12071	040272	052713 	000400 			BIS	#EOLS,@R3	;;; SET END OF LINE
  12072	040276	000420 				BR	91$		;;; AND ECHO
  12073						;
  12074					;
  12075					; CARRIAGE RETURN /CNTRL Z
  12076					;
  12077	040300				41$:
  12078	040300	111663 	000005 			MOVB	@SP,FNBYT(R3)
  12079	040304				51$:
  12080	040304	052713 	000400 			BIS	#EOLS,@R3	;;; SET END OF LINE SEEN
  12081	040310				61$:
  12082	040310	032713 	074000 			BIT	#LFCT,@R3	;;; ANY LINE FEEDS WAITING?
  12083	040314	001002 				BNE	71$		;;; IF NE YES
  12084	040316	000137 	035654'			JMP	ECHOB		;;; ECHO BYTE
  12085						;
  12086	040322				71$:
  12087	040322	111663 	000014 			MOVB	@SP,MBUFR(R3)	;;; SET FOR MULTI-ECHO OF ONE BYTE
  12088	040326	012716 	000001 			MOV	#1,@SP		;;; SET LENGTH OF BUFFER
  12089	040332				81$:
  12090	040332	010346 				MOV	R3,-(SP)	;;; CALCULATE ADDRESS OF MULTI-ECHO BUFFER
  12091	040334	062716 	000014 			ADD	#MBUFR,@SP
  12092	040340				91$:
  12093	040340	012663 	000012 			MOV	(SP)+,MEBUF(R3)	;;; INSERT ADDRESS OF MULTI-ECHO BUFFER
  12094	040344	112663 	000010 			MOVB	(SP)+,MECNT(R3)	;;; INSERT LENGTH OF BUFFER
  12095	040350	000137 	035416'			JMP	OUTPT		;;; START OUTPUT
  12096						;
  12097						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 220
TERMINAL DRIVER -- DHSAV (DH-11 REGISTER SAVE/RESTORE CO-ROUTI

  12099						.SBTTL	TERMINAL DRIVER -- DHSAV (DH-11 REGISTER SAVE/RESTORE CO-ROUTINE)
  12100
  12101					;+
  12102					; DHSAV -- DH-11 TERMINAL MULTIPLEXER SAVE ROUTINE
  12103					; TTSAV -- DL-11 TERMINAL SAVE ROUTINE
  12104					;
  12105					; THIS ROUTINE SAVES R0 THRU R5 ON THE STACK AND RETURNS:
  12106					;
  12107					;	R4 -- POINTS TO EXTERNAL PAGE FOR THIS DEVICE (UNIT)
  12108					;	R5 -- POINTS TO THE DLS ENTRY FOR THIS DEVICE (UNIT)
  12109					;	CC-Z SET -- DEVICE DOES NOT EXIST
  12110					;-
  12111
  12112						.ENABL LSB
  12113
  12114	040354				DHSAV:
  12115	040354	010046 				MOV	R0,-(SP)	; SAVE REGISTERS
  12116	040356	010146 				MOV	R1,-(SP)
  12117	040360	010246 				MOV	R2,-(SP)
  12118	040362	010446 				MOV	R4,-(SP)
  12119	040364	010546 				MOV	R5,-(SP)
  12120	040366	010346 				MOV	R3,-(SP)	;;; SET RETURN ADDRESS
  12121	040370	013705 	002654'			MOV	DHTMP,R5	;;; RET SAVED PS WORD
  12122	040374	042705 	177760 			BIC	#177760,R5	;;; CLEAR ALL BUT CONTROLLER NUMBER
  12123	040400	000305 				SWAB	R5		;;; CONVERT TO WORD INDEX
  12124	040402	006205 				ASR	R5
  12125	040404	062705 	003054'			ADD	#DHTBL,R5	;;; POINT TO THE BEGINNING OF DH-11 TABLE
  12126	040410	000417 				BR	20$		;;; FINISH IN COMMON CODE
  12127						;
  12128					;
  12129					; DL-11 TERMINAL SAVE ROUTINE
  12130					;
  12131	040412				TTSAV:
  12132	040412	010046 				MOV	R0,-(SP)	; SAVE REGISTERS
  12133	040414	010146 				MOV	R1,-(SP)
  12134	040416	010246 				MOV	R2,-(SP)
  12135	040420	010446 				MOV	R4,-(SP)
  12136	040422	010546 				MOV	R5,-(SP)
  12137	040424	010346 				MOV	R3,-(SP)	;;; SET RETURN ADDRESS
  12138	040426	013705 	002656'			MOV	DLTMP,R5	;;; RETRIEVE SAVED PS WORD
  12139	040432	042705 	177760 			BIC	#177760,R5	;;; CLEAR ALL BUT CONTROLLER (UNIT) NUMBER
  12140	040436	006305 				ASL	R5		;;; CONVERT TO WORD INDEX
  12141	040440	006305 				ASL	R5
  12142	040442	006305 				ASL	R5
  12143	040444	062705 	003004'			ADD	#TTTBL,R5	;;; POINT TO THE BEGINNING OF THE DL-11 TABLE
  12144	040450				20$:
  12145	040450	016504 	000002 			MOV	TTYEXP(R5),R4	;;; SET UP EXTERNAL PAGE ADDRESS OF THIS DEVICE
  12146	040454					CALL	@(SP)+		;;; CALL THE CALLER BACK
	040454	004736 				JSR	PC,@(SP)+
  12147	040456	012605 				MOV	(SP)+,R5	;;; RESTORE REGISTERS
  12148	040460	012604 				MOV	(SP)+,R4
  12149	040462	012602 				MOV	(SP)+,R2
  12150	040464	012601 				MOV	(SP)+,R1
  12151	040466	012600 				MOV	(SP)+,R0
  12152	040470	012603 				MOV	(SP)+,R3
  12153	040472	000137 	015062'			JMP	..INTX		;;; EXIT FROM INTERRUPT
  12154						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 220-1
TERMINAL DRIVER -- DHSAV (DH-11 REGISTER SAVE/RESTORE CO-ROUTI

  12155
  12156						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 221
TERMINAL DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROL

  12158						.SBTTL	TERMINAL DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROLLER)
  12159
  12160					;+
  12161					; .STDHL -- SET UP DH-11 LINE NUMBER IN CONTROLLER
  12162					;
  12163					; INPUTS:
  12164					;
  12165					;	R5 -- DLS BLOCK OFFSET FOR THIS LINE
  12166					;
  12167					; OUTPUTS:
  12168					;
  12169					;	R4 -- ADDRESS OF DH-11 CSR
  12170					;	CC-N CLEAR -- LINE NUMBER IS SET IN DH-11 CSR
  12171					;	CC-N SET -- R5 POINTS TO A DL-11 BLOCK
  12172					;	CC-Z SET -- LINE DOES NOT EXIST
  12173					;-
  12174
  12175	040476				.STDHL::
  12176	040476	016504 	000002 			MOV	TTYEXP(R5),R4	;;; [5,1015] FIND I/O PAGE ADDRESS
  12177	040502	001415 				BEQ	20$		;;; [5.1015] EXIT IF NON-EXISTENT
  12178	040504	010546 				MOV	R5,-(SP)	;;; [5.1015] DLS POINTER TO STACK
  12179	040506	162716 	003054'			SUB	#DHTBL,(SP)	;;; [5.1015] FIND OFFSET INTO "DHTBL"
  12180	040512	100410 				BMI	10$		;;; [5.1015] DONE WITH DL-11 AT THIS POINT
  12181	040514	006216 				ASR	(SP)		;;; [5.1015] COMPUTE DH-11
  12182	040516	006216 				ASR	(SP)		;;; [5.1015] LINE NUMBER
  12183	040520	006216 				ASR	(SP)		;;; [5.1015] SO
  12184	040522	042716 	177760 			BIC	#^C17,(SP)	;;; [5.1015] FLUSH EXTRANEOUS TRASH
  12185	040526	042714 	001077 			BIC	#1077,(R4)	;;; [5.1015] CLEAR LINE NUMBER REGISTER
  12186	040532	051614 				BIS	(SP),(R4)	;;; [5.1015] SET LINE NUMBER
  12187	040534				10$:
  12188	040534	005226 				INC	(SP)+		;;; [5.1015] CLEAR STACK AND SET RETURN FLAG
  12189	040536				20$:
  12190	040536					RETURN			;;; [5.1015] TO CALLER
	040536	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 222
TERMINAL DRIVER -- .DHSPZ (ZERO INPUT SPEED OF A LINE)

  12192						.SBTTL	TERMINAL DRIVER -- .DHSPZ (ZERO INPUT SPEED OF A LINE)
  12193
  12194					;+
  12195					; .DHSPZ -- ZERO THE INPUT SPEED OF A DH11 LINE
  12196					;
  12197					; THIS SUBROUTINE WILL SET THE INPUT SPEED OF A LINE TO ZERO
  12198					;
  12199					; INPUTS:
  12200					;
  12201					;	R4 -- POINTS TO EXTERNAL PAGE ADDRESS OF DH-11 LINE
  12202					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS DH-11 LINE
  12203					;	THE LINE # WITHIN THE DH IS ALREADY SET
  12204					;
  12205					; OUTPUTS:
  12206					;
  12207					;	INPUT SPEED OF DH11 IS ZEROED
  12208					;	NO REGISTERS ALTERED
  12209					;-
  12210
  12211	040540				.DHSPZ::
  12212	040540	010346 				MOV	R3,-(SP)	; SAVE REGISTER
  12213	040542	016503 	000004 			MOV	STSW0(R5),R3	; GET ORIGINAL SPEED
  12214	040546	042703 	001700 			BIC	#S0.ISP,R3	; SET INPUT SPEED TO ZERO
  12215	040552	010364 	000004 			MOV	R3,4(R4)	; STORE NEW SPEED
  12216	040556	012603 				MOV	(SP)+,R3	; RESTORE REGISTER
  12217	040560					RETURN
	040560	000207 				RTS	PC
  12218
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 223
TERMINAL DRIVER -- .DHSPR (RESET TO DEFAULT AUTO-BAUD SPEED)

  12220						.SBTTL	TERMINAL DRIVER -- .DHSPR (RESET TO DEFAULT AUTO-BAUD SPEED)
  12221
  12222					;+
  12223					; .DHSPA -- SET AN AUTOBAUD LINE TO ITS HIGH SPEED AUTO-BAUD SPEED
  12224					; .DHSPR -- RESET A DH-11 LINE TO DEFAULT AUTO-BAUD SPEED
  12225					;
  12226					; THIS SUBROUTINE WILL RESET A LINE TO ITS DEFAULT AUTO-BAUD SPEED
  12227					;
  12228					; INPUTS:
  12229					;
  12230					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS DH-11 LINE
  12231					;
  12232					; OUTPUTS:
  12233					;
  12234					;	LINE'S SPEED IS RESET TO 2400 BAUD OR 300 BAUD BASED ON TT.LSP
  12235					;	(IF LINE IS IN LOW SPEED AUTOBAUD WAIT OR HIGH SPEED)
  12236					;	NO REGISTERS ALTERED
  12237					;-
  12238
  12239
  12240						.ENABL	LSB
  12241
  12242	040562				.DHSPA::
  12243	040562	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; AUTOBAUD LINE ?
  12244	040570	001475 				BEQ	40$		  ; NO
  12245	040572	042765 	020000 	000006 		BIC	#TT.LSP,STSW1(R5) ; CLEAR LOW SPEED AUTO-BAUD
  12246	040600	000404 				BR	2$		  ; AND SET HIGH SPEED DETECT
  12247
  12248	040602				.DHSPR::
  12249	040602	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; ABW LINE ?
  12250	040610	001465 				BEQ	40$		  ; [5.1152] BRANCH IF NOT AUTO BAUD LINE
  12251	040612	016546 	000004 		2$:	MOV	STSW0(R5),-(SP)   ; SAVE LINE SPEED WORD AS FLAG
  12252	040616	010346 				MOV	R3,-(SP)	  ; SAVE R3
  12253	040620	032765 	020000 	000006 		BIT	#TT.LSP,STSW1(R5) ; LOW OR HIGH SPEED AUTO-BAUD WAIT
  12254	040626	001403 				BEQ	5$		  ; HIGH SPEED
  12255	040630	012703 	016703 			MOV	#16703,R3	  ; LOW SPEED, DETECT AT 300
  12256	040634	000402 				BR	7$		  ; GO SET
  12257						;
  12258	040636				5$:
  12259	040636	012703 	027303 			MOV	#27303,R3	  ; HIGH SPEED, DETECT AT 2400
  12260	040642				7$:
  12261	040642					CALL	.DHSPD		  ; SET IT
	040642	004737 	040714'			JSR	PC,.DHSPD
  12262	040646	012603 				MOV	(SP)+,R3	  ; RESTORE R3
  12263	040650	005726 				TST	(SP)+		  ; HAS THE SETSPD TASK BEEN BLOCKED??
  12264	040652	100405 				BMI	.DHSPC		  ; YES -- DON'T COUNT THIS LINE
  12265					;	BR	.DHSPF		  ; FALL THROUGH TO FLAG AUTOBAUD
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 224
TERMINAL DRIVER -- .DHSPF (FLAG AUTO-BAUD REPORT)

  12267						.SBTTL	TERMINAL DRIVER -- .DHSPF (FLAG AUTO-BAUD REPORT)
  12268
  12269					;+
  12270					; .DHSPF -- FLAG LINE SPEED TO BE REPORTED TO THE HOST
  12271					;
  12272					; THIS SUBROUTINE WILL FLAG AN AUTO-BAUD LINE SPEED TO BE REPORTED
  12273					;
  12274					; INPUTS:
  12275					;
  12276					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS DH-11 LINE
  12277					;
  12278					; OUTPUTS:
  12279					;
  12280					;	THE LINE SPEED IS FLAGGED TO BE REPORTED TO THE HOST
  12281					;	NO REGISTERS ALTERED
  12282					;-
  12283
  12284	040654				.DHSPF::
  12285	040654	005237 	002606'			INC	.ABCNT		;;; INCREMENT THE COUNT
  12286	040660	052765 	100000 	000004 		BIS	#S0.ABR,STSW0(R5) ;;; [4.2284] FLAG THE LINE SPEED
  12287	040666				.DHSPC:				;;; COMMON CODE
  12288	040666	005737 	001012'			TST	.COMEF+2	;;; [4.1.1105] IS PRIMARY PROTOCOL RUNNING??
  12289	040672	100034 				BPL	40$		;;; [4.1.1105] NO -- GO ON
  12290	040674	005737 	001140'			TST	.DATE3		;;; IS OUR DATE VALID ??
  12291	040700	001431 				BEQ	40$		;;; NO, DON'T CALL SETSPD
  12292	040702	052737 	004000 	007222'		BIS	#EF.RSS,TTYTSK+A.EF ;;; [4.2140] YES -- REQUEST THE TASK
  12293	040710	000137 	045264'			JMP	..DSEV		;;; DECLARE A SIGNIFICANT EVENT AND RETURN
  12294						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 225
TERMINAL DRIVER -- .DHSPD (SET LINE SPEED)

  12296						.SBTTL	TERMINAL DRIVER -- .DHSPD (SET LINE SPEED)
  12297
  12298					;+
  12299					; .DHSPD -- SET LINE SPEED FOR A DH-11 LINE
  12300					;
  12301					; THIS SUBROUTINE WILL SET THE LINE SPEED FOR A LINE
  12302					;
  12303					; INPUTS:
  12304					;
  12305					;	R3 -- LINE SPEED TO BE SET
  12306					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS DH-11 LINE
  12307					;
  12308					; OUTPUTS:
  12309					;
  12310					;	DH-11 LINE SPEED IS SET UP - DL-11 IS UNALTERED.
  12311					;	IF INPUT FOR THIS LINE WAS FORCIBLY TURNED OFF, THE ACTUAL SETTING
  12312					;	OF THE LINE SPEED IN THE HARDWARE IS DEFERRED UNTIL INPUT FOR THE
  12313					;	LINE IS RE-ENABLED BY THE HOST.
  12314					;	NO REGISTERS ALTERED
  12315					;-
  12316
  12317	040714				.DHSPD::
  12318	040714	010446 				MOV	R4,-(SP)	;;; SAVE R4
  12319	040716	010246 				MOV	R2,-(SP)	;;; [5.1015] SAVE R2 AS WELL
  12320	040720	042703 	140000 			BIC	#S0.MSK,R3	;;; [5.1015] FLUSH STATUS BITS
  12321	040724					CALL	.TTSW2		;;; [5.1015] FIND OUR "STSW2" ENTRY
	040724	004737 	044212'			JSR	PC,.TTSW2
  12322	040730					CALL	.STDHL		;;; SET THE DH-11 LINE NUMBER
	040730	004737 	040476'			JSR	PC,.STDHL
  12323	040734	003411 				BLE	30$		;;; [5.1015] EXIT IF DL-11 OR NON-EXISTENT
  12324	040736	005712 				TST	(R2)		;;; [4.1.1092] INPUT X'D OFF??
  12325	040740	100402 				BMI	20$		;;; [4.1.1092] YES -- GO ON
  12326	040742	010364 	000004 			MOV	R3,4(R4)	;;; SET THE NEW LINE SPEED
  12327	040746				20$:
  12328	040746	042765 	037777 	000004 		BIC	#^C<S0.MSK>,STSW0(R5) ;;; [4.2284] CLEAR OLD LINE SPEED
  12329	040754	050365 	000004 			BIS	R3,STSW0(R5)	;;; [4.2284] MARK IT IN LINE TABLE TOO
  12330	040760				30$:
  12331	040760	012602 				MOV	(SP)+,R2	;;; [5.1015] RESTORE R2
  12332	040762	012604 				MOV	(SP)+,R4	;;; AND R4
  12333	040764				40$:
  12334	040764					RETURN			;;; TO CALLER
	040764	000207 				RTS	PC
  12335
  12336						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 226
TERMINAL DRIVER -- $DMINT (DM-11/BB MODEM CONTROL INTERRUPT)

  12338						.SBTTL	TERMINAL DRIVER -- $DMINT (DM-11/BB MODEM CONTROL INTERRUPT)
  12339
  12340					;+
  12341					; **-$DMINT-DM-11/BB MODEM CONTROL MULTIPLEXER INTERRUPTS
  12342					;
  12343					;	THIS ROUTINE SERVICES INTERRUPTS FROM THE DM-11 MODEM CONTROLS
  12344					;	FOR THE FOLLOWING EVENTS:
  12345					;
  12346					;	1. RING INDICATE
  12347					;	2. CARRIER DETECT TRANSITION
  12348					;	3. CARRIER DROP TRANSITION
  12349					;
  12350					;	ON RING INDICATE (RI), IF THE DM-11'S ARE NOT INHIBITED, THE FOLLOWING
  12351					;	IS DONE.
  12352					;
  12353					;	DATA-TERMINAL READY (DTR) AND REQUEST TO SEND (RTS) IS SET FOR THE
  12354					;	LINE AND WE FALL INTO CARRIER CHECKING CODE.
  12355					;
  12356					;	ON CARRIER-DETECT (CD) TRANSITION THE FOLLOWING IS DONE:
  12357					;
  12358					;	THE LINE IS REMOVED FROM THE CARRIER-WAIT STATE AND
  12359					;	IF THE LINE IS AN AUTO-BAUD LINE, IT IS PUT INTO AUTO-BAUD WAIT,
  12360					;	OTHERWISE A CONNECT MESSAGE IS TRANSMITTED TO THE HOST.
  12361					;
  12362					;	ON CARRIER-DROP, THE LINE IS PUT INTO THE CARRIER-WAIT STATE,
  12363					;	THE LINE IS THEN TIMED-OUT BY THE TIME-OUT SERVICE IN ".DMTMO".
  12364					;
  12365					;	ANY NON-RING INTERRUPT INITIATED WITHOUT DATA-TERMINAL READY BEING
  12366					;	SET WILL BE IGNORED.
  12367					;-
  12368
  12369						.ENABL	LSB
  12370
  12371	040766				$DMINT::			;REF LABEL
  12372	040766	013737 	177776 	002652'		MOV	@#PS,DMTMP	;SAVE CONTROLLER NUMBER
  12373	040774					CALL	R3,TTSAV	;SAVE REGISTERS
	040774	004337 	040412'			JSR	R3,TTSAV
  12374	041000	013703 	002652'			MOV	DMTMP,R3	;RETRIEVE SAVED PS WORD
  12375	041004	042703 	177760 			BIC	#177760,R3	;CLEAR ALL BUT CONTROLLER NUMBER
  12376	041010	006303 				ASL	R3		;CONVERT TO WORD INDEX
  12377	041012	006303 				ASL	R3		;SO
  12378	041014	016304 	002742'			MOV	DMTBL(R3),R4	;GET ADDRESS OF DM-11/BB CSR
  12379	041020	012405 				MOV	(R4)+,R5	;GET INTERRUPT STATUS
  12380	041022	052714 	000001 			BIS	#1,(R4)		;SET LINE ENABLE TO TEST SIGNAL TRANSTIONS
  12381	041026	010502 				MOV	R5,R2		;COPY TO R2
  12382	041030	042705 	177760 			BIC	#177760,R5	;CLEAR ALL BUT UNIT NUMBER
  12383	041034	006305 				ASL	R5		;CONVERT UNIT NUMBER TO WORD INDEX
  12384	041036	006305 				ASL	R5		;THUS
  12385	041040	006305 				ASL	R5		;AND SO
  12386	041042	066305 	002744'			ADD	DMTBL+2(R3),R5	;CALCULATE ADDRESS OF "DHTBL" ENTRY
  12387	041046	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ; REMOTE LINE ?
  12388	041054	001450 				BEQ	50$		  ; EXIT IF NOT
  12389	041056	005737 	001012'			TST	.COMEF+2	  ; YES -- IS PRIMARY PROTOCOL RUNNING??
  12390	041062	100050 				BPL	60$		  ; NO -- DROP DTR AND IGNORE
  12391	041064	005737 	002604'			TST	.INHDM		  ; YES -- ARE DM-11/BB'S INHIBITED??
  12392	041070	001045 				BNE	60$		  ; YES -- DROP DTR AND IGNORE
  12393					;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 226-1
TERMINAL DRIVER -- $DMINT (DM-11/BB MODEM CONTROL INTERRUPT)

  12394					; HERE FOR A RING INTERRUPT OR AN ALLOWABLE NON-RING INTERRUPT
  12395					;
  12396	041072	005702 				TST	R2		;RING INTERRUPT??
  12397	041074	100404 				BMI	10$		; YES -- GO FORCE A HANGUP
  12398					;
  12399					; HERE FOR A NON-RING INTERRUPT
  12400					;
  12401	041076	032714 	000002 			BIT	#2,(R4)		;IS DTR UP?
  12402	041102	001435 				BEQ	50$		; NO -- JUST REENABLE SCAN AND EXIT
  12403	041104	000404 				BR	20$		; YES -- WE HAVE PREVIOUSLY GOTTEN RING
  12404					;
  12405					; RING TRANSITION (DM-11/BB'S ENABLED)
  12406					;
  12407	041106				10$:
  12408	041106					CALL	.STTYH		;TRANSMIT HANGUP
	041106	004737 	041226'			JSR	PC,.STTYH
  12409	041112	052714 	000006 			BIS	#6,(R4)		;SET DTR
  12410	041116				20$:
  12411	041116	032714 	000100 			BIT	#100,(R4)	;CARRIER UP?
  12412	041122	001422 				BEQ	40$		;IF .EQ. NO (EITHER NEW CALL OR DROP)
  12413					;
  12414					; CARRIER ON TRANSITION
  12415					;
  12416	041124	042765 	002004 	000006 		BIC	#TT.CRW!TT.RIP,STSW1(R5);CLEAR CARRIER WAIT
  12417	041132	032765 	040000 	000004 		BIT	#S0.CON,STSW0(R5) ;WAS LINE ALREADY CONNECTED??
  12418	041140	001016 				BNE	50$		  ; YES -- LEAVE IT ALONE
  12419	041142	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; NO -- IS THIS AN AUTO-BAUD LINE??
  12420	041150	001003 				BNE	30$		  ; YES
  12421	041152					CALL	.STTYD		  ; NO -- REPORT CONNECTION
	041152	004737 	041212'			JSR	PC,.STTYD
  12422	041156	000407 				BR	50$		  ;GO EXIT
  12423						;
  12424	041160				30$:
  12425	041160	052765 	002010 	000006 		BIS	#TT.ABW!TT.RIP,STSW1(R5) ;[**]MARK AUTO-BAUD WAIT
  12426	041166	000403 				BR	50$		  ;AND EXIT
  12427						;
  12428					;
  12429					; CARRIER DROP TRANSITION
  12430					;
  12431	041170				40$:
  12432	041170	052765 	002004 	000006 		BIS	#TT.CRW!TT.RIP,STSW1(R5);SET CARRIER WAIT
  12433
  12434	041176				50$:
  12435	041176	042744 	001200 			BIC	#1200,-(R4)	  ; REENABLE SCANNING
  12436	041202					RETURN			  ; DISMISS AND RETURN
	041202	000207 				RTS	PC
  12437						;
  12438					;
  12439					; HERE IF INTERRUPTS ARE DISABLED (MACHINE DEAD OR MODEM INTERRUPTS
  12440					; DISABLED).  DROP DTR AND RTS TO PREVENT ANY LOOPHOLES.
  12441					;
  12442	041204				60$:
  12443	041204	012714 	000001 			MOV	#1,(R4)		  ; CLEAR DTR AND RTS
  12444	041210	000772 				BR	50$		  ; AND RETURN
  12445						;
  12446						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 227
TERMINAL DRIVER -- .STTYD (DIALUP/HANGUP SERVICE)

  12448						.SBTTL	TERMINAL DRIVER -- .STTYD (DIALUP/HANGUP SERVICE)
  12449
  12450					;+
  12451					; .STTYD -- DILAUP SERVICE
  12452					; .STTYH -- HANGUP SERVICE
  12453					;
  12454					; THESE SUBROUTINES WILL REPORT A DILAUP OR HANGUP TO THE HOST, AND
  12455					; SET OR CLEAR THE LINE CONNECTED BIT, "S0.CON", IN THE LINE'S STATUS BLOCK.
  12456
  12457					;
  12458					; INPUTS:
  12459					;
  12460					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  12461					;
  12462					; OUTPUTS:
  12463					;
  12464					;	R3,R1 --  ALTERED
  12465					;-
  12466
  12467						.ENABL	LSB
  12468
  12469	041212				.STTYD::
  12470	041212	052765 	040000 	000004 		BIS	#S0.CON,STSW0(R5) ;;; [4.2284] MARK LINE CONNECT
  12471	041220	012701 	000015 			MOV	#BC.TDU,R1	;;; DIALUP FUNCTION
  12472	041224	000407 				BR	10$		;;; DO COMMON CODE
  12473						;
  12474	041226				.STTYH::
  12475	041226					CALL	.DHSPA		  ; RESET THE LINE SPEED IF ABW
	041226	004737 	040562'			JSR	PC,.DHSPA
  12476	041232	042765 	040000 	000004 		BIC	#S0.CON,STSW0(R5) ; MARK LINE DISCONNECT
  12477	041240	012701 	000016 			MOV	#BC.THU,R1	  ; HANGUP FUNCTION
  12478	041244				10$:
  12479	041244	010446 				MOV	R4,-(SP)	;;; SAVE R4
  12480	041246	010504 				MOV	R5,R4		;;; SET UP TO RETURN DIALUP OR HANGUP
  12481	041250	162704 	003004'			SUB	#TTTBL,R4	;;; FIND UNIT NUMBER IN R4
  12482	041254	006204 				ASR	R4		;;; DIVIDE BY 8
  12483	041256	006204 				ASR	R4		;;;
  12484	041260	006204 				ASR	R4		;;; SO
  12485	041262	012703 	000004 			MOV	#D.CDLS,R3	;;; DATA LINE SCANNER
  12486	041266					CALL	..STFC		;;; START FUNCTION
	041266	004737 	046714'			JSR	PC,..STFC
  12487	041272	012604 				MOV	(SP)+,R4	;;; RESTORE R4
  12488	041274					RETURN			;;; AND EXIT
	041274	000207 				RTS	PC
  12489
  12490						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 228
TERMINAL DRIVER -- .DMHUP (DM-11 HANGUP)

  12492						.SBTTL	TERMINAL DRIVER -- .DMHUP (DM-11 HANGUP)
  12493					;+
  12494					; .DMHUP -- HANG UP A DM-11/BB LINE
  12495					;
  12496					; THIS SUBROUTINE WILL HANG UP A DM-11/BB UNIT
  12497					;
  12498					; INPUTS:
  12499					;
  12500					;	R1 -- DM-11/BB UNIT NUMBER
  12501					;	R4 -- POINTER TO DM-11/BB CSR
  12502					;	R5 -- POINTER TO DLS TABLE ENTRY FOR THIS LINE
  12503					;
  12504					; OUTPUTS:
  12505					;
  12506					;	NO REGISTERS ALTERED
  12507					;-
  12508
  12509						.ENABL	LSB
  12510
  12511	041276				.DMHUP::
  12512	041276	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ;;; REMOTE TTY??
  12513	041304	001433 				BEQ	20$		;;; NO -- FORGET IT
  12514	041306					CALL	.STPDM		;;; YES -- STOP THE SCAN
	041306	004737 	041356'			JSR	PC,.STPDM
  12515	041312	050124 				BIS	R1,(R4)+ 	;;; SELECT DESIRED UNIT
  12516	041314	012714 	000001 			MOV	#1,(R4)		;;; ENABLE RING INTERRUPT
  12517	041320	052744 	000140 			BIS	#140,-(R4)	;;; RESTART SCAN AND ENABLE INTERRUPTS
  12518	041324	000457 				BR	DLHUPX		;;; RESET THE LINE STATE AND EXIT
  12519						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 229
TTY DRIVER -- .DMUHU (UN-HANGUP DM11)

  12521						.SBTTL	TTY DRIVER -- .DMUHU (UN-HANGUP DM11)
  12522
  12523					;+
  12524					; THIS SUBROUTINE WILL RAISE DTR ON A LINE WITH A DM-11 SO THAT
  12525					; AUTO-DIALERS MAY DIAL OUT FROM RSX20F
  12526					;
  12527					; INPUTS:
  12528					;
  12529					;	R1 -- DM-11/BB UNIT NUMBER
  12530					;	R4 -- POINTER TO DM-11/BB CSR
  12531					;	R5 -- POINTER TO DLS TABLE ENTRY FOR THIS LINE
  12532					;
  12533					; OUTPUTS:
  12534					;
  12535					;	NO REGISTERS ALTERED
  12536					;-
  12537
  12538
  12539	041326				.DMUHU::
  12540	041326	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ;;; REMOTE TTY??
  12541	041334	001417 				BEQ	20$		;;; NO -- FORGET IT
  12542	041336					CALL	.STPDM		;;; YES -- STOP THE SCAN
	041336	004737 	041356'			JSR	PC,.STPDM
  12543	041342	050124 				BIS	R1,(R4)+ 	;;; SELECT DESIRED UNIT
  12544	041344	012714 	000007 			MOV	#7,(R4)		;;; SET DTR, RTS, AND ENABLE INTERRUPT
  12545	041350	052744 	000140 			BIS	#140,-(R4)	;;; RESTART SCAN AND EXIT
  12546	041354					RETURN
	041354	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 230
TERMINAL DRIVER -- .STPDM (STOP DM-11/BB SCAN)

  12548						.SBTTL	TERMINAL DRIVER -- .STPDM (STOP DM-11/BB SCAN)
  12549
  12550					;+
  12551					; .STPDM -- STOP DM-11/BB SCAN
  12552					;
  12553					; THIS SUBROUTINE WILL DISABLE THE SCAN AND CLEAR THE UNIT SELECT BITS ON
  12554					; A DM-11/BB MODEM CONTROL UNIT.
  12555					;
  12556					; INPUTS:
  12557					;
  12558					;	R4 -- POINTS TO DM-11/BB CSR
  12559					;
  12560					; OUTPUTS:
  12561					;
  12562					;	SCAN IS STOPPED
  12563					;	NO REGISTERS ALTERED
  12564					;-
  12565
  12566	041356				.STPDM::
  12567	041356	042714 	001040 			BIC	#1040,(R4)	;;; DISABLE SCAN
  12568	041362				10$:
  12569	041362	032714 	000020 			BIT	#20,(R4)	;;; SCAN STOPPED??
  12570	041366	001375 				BNE	10$		;;; NO -- WAIT FOR IT
  12571	041370	042714 	001017 			BIC	#1017,(R4)	;;; YES -- CLEAR CURRENT UNIT
  12572	041374				20$:
  12573	041374					RETURN			;;; TO CALLER
	041374	000207 				RTS	PC
  12574
  12575						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 231
TERMINAL DRIVER -- .DLHUP (DL-11E HANGUP)

  12577						.SBTTL	TERMINAL DRIVER -- .DLHUP (DL-11E HANGUP)
  12578					;+
  12579					; .DLHUP -- HANG UP A DL-11E LINE.
  12580					;
  12581					; THIS ROUTINE SERVICES A DL-11E HANGUP REQUEST.
  12582					; IF THE KLINIK LINE IS ACTIVE, THE KLINIK DISCONNECT TASK, KLDISC, IS
  12583					; REQUESTED.  OTHERWISE, THE LINE IS HUNG UP HERE.
  12584					;
  12585					; INPUT ARGUMENTS:
  12586					;
  12587					;	R5 POINTS TO THE DLS TABLE ENTRY FOR THIS LINE
  12588					;
  12589					; OUTPUT ARGUMENTS:
  12590					;
  12591					;	R4 -- POINTER TO DL-11E CSR
  12592					;-
  12593
  12594						.ENABL	LSB
  12595
  12596	041376				.DLHUP::
  12597	041376	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ;;; REMOTE LINE??
  12598	041404	001420 				BEQ	10$		;;; NO -- FORGET IT
  12599	041406	016504 	000002 			MOV	TTYEXP(R5),R4	;;; YES -- SAVE I/O PAGE ADDRESS
  12600	041412	023705 	002644'			CMP	KLNPTR,R5	;;; IS THIS THE KLINIK LINE??
  12601	041416	001014 				BNE	20$		;;; NO -- GO ON
  12602	041420	105737 	001234'			TSTB	.KLNSW+0	;;; YES -- IS IT ACTIVE??
  12603	041424	001411 				BEQ	20$		;;; INACTIVE -- JUST HANG IT UP
  12604	041426	112737 	000002 	001235'		MOVB	#2,.KLNSW+1	;;; FLAG THE DISCONNECT
  12605	041434	052737 	002000 	007222'		BIS	#EF.RKH,TTYTSK+A.EF ;;; REQUEST KLDISC
  12606	041442	000137 	045264'			JMP	..DSEV		;;; DECLARE A SIGNIFICANT EVENT AND EXIT
  12607						;
  12608	041446				10$:
  12609	041446					RETURN			;;; AND GO AWAY
	041446	000207 				RTS	PC
  12610	041450				20$:
  12611	041450	005764 	000002 			TST	2(R4)		;;; CLEAR INPUT FLAGS
  12612	041454	012714 	000140 			MOV	#DL.DEN!DL.REN,(R4) ;;; HANG THE LINE UP
  12613	041460	105065 	000004 			CLRB	STSW0+0(R5)	;;; [4.2284] ENABLE INPUT SIDE IF IT WASN'T
  12614	041464				DLHUPX:
  12615	041464	005737 	001012'			TST	.COMEF+2	;;; [4.1.1105] PRIMARY PROTOCOL RUNNING?
  12616	041470	100011 				BPL	30$		;;; [4.1.1105] NO -- WAIT FOR IT
  12617	041472	042765 	002414 	000006 		BIC	#TT.CRW!TT.NSA!TT.ABW!TT.RIP,STSW1(R5) ;;; YES -- CLEAR CARRIER WAIT
  12618	041500	010346 				MOV	R3,-(SP)	;;; SAVE REGISTERS
  12619	041502	010146 				MOV	R1,-(SP)
  12620	041504					CALL	.STTYH		;;; TELL THE KL ABOUT HANGUP
	041504	004737 	041226'			JSR	PC,.STTYH
  12621	041510	012601 				MOV	(SP)+,R1	;;; RESTORE
  12622	041512	012603 				MOV	(SP)+,R3
  12623	041514				30$:
  12624	041514	000137 	043242'			JMP	.TTRST		;;; [4.2205] RESET THE LINE STATE AND EXIT
  12625						;
  12626
  12627						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 232
TERMINAL DRIVER -- .DLTMO (DL-11E MODEM CONTROL TIMEOUT)

  12629						.SBTTL	TERMINAL DRIVER -- .DLTMO (DL-11E MODEM CONTROL TIMEOUT)
  12630
  12631					;+
  12632					; .DLTMO -- DL11 TIMEOUT SERVICE
  12633					;
  12634					; THIS ROUTINE INSURES THAT THE CTY IS RUNNING AND TIMES OUT THE
  12635					; DL-11E LINES WHEN CARRIER IS LOST.  THIS ROUTINE WILL ALSO
  12636					; ERROR LOG ANY DL-11 WHICH LOSES AN INTERRUPT ENABLE.
  12637					;
  12638					; INPUTS:
  12639					;
  12640					;	NONE
  12641					;
  12642					; OUTPUTS:
  12643					;
  12644					;	NO REGISTERS PRESERVED
  12645					;
  12646					; NOTE:
  12647					;	THIS ROUTINE MUST BE CALLED AT BR5 OR HIGHER
  12648					;
  12649					; NOTE:
  12650					;	NXM VECTOR IS ALTERED DURING POWER FAIL RECOVERY
  12651					;
  12652					; NOTE:
  12653					;	ALL DL-11E'S ARE ASSUMED TO BE REMOTE (DATASET) LINES
  12654					;-
  12655
  12656	041520				.DLTMO::
  12657	041520	012705 	003004'			MOV	#DLTBL,R5	;;; GET LOCAL DL-11W POINTER
  12658	041524	016504 	000002 			MOV	TTYEXP(R5),R4	;;; AND EXTERNAL PAGE POINTER
  12659	041530	001410 				BEQ	20$		;;; IF NO ONE HAS THE LINE
  12660	041532					CALL	CKDLEN		;;; [5.1007] CHECK ENABLES AND ERRORS
	041532	004737 	041674'			JSR	PC,CKDLEN
  12661	041536				10$:
  12662	041536	005737 	001030'			TST	.PFIOW		;;; IS THIS A POWER FAIL START??
  12663	041542	001403 				BEQ	20$		;;; NO -- GO ON
  12664	041544	012737 	041664'	000004 		MOV	#100$,@#4	;;; YES -- SET NXM TRAP FOR DEVICE CHECKS
  12665	041552				20$:
  12666	041552	012705 	003014'			MOV	#DLETBL,R5	;;; GET DL-11E TABLE POINTER
  12667	041556	012700 	000004 			MOV	#DLECNT,R0	;;; COUNT OF DL-11E'S TO R0
  12668	041562				30$:
  12669	041562	016504 	000002 			MOV	TTYEXP(R5),R4	;;; EXTERNAL PAGE POINTER TO R4
  12670	041566	001432 				BEQ	80$		;;; TRY NEXT IF THIS ONE ISN'T THERE
  12671	041570	005714 				TST	(R4)		;;; [5.1007] DOES THE DEVICE EXIST??
  12672	041572					CALL	CKDLEN		;;; [5.1007] CHECK ENABLES AND ERRORS
	041572	004737 	041674'			JSR	PC,CKDLEN
  12673					;
  12674					; DL-11E CARRIER MAINTENANCE
  12675					;
  12676	041576	032714 	010000 			BIT	#DL.CAR,(R4)	;;; YES -- IS CARRIER DETECT UP??
  12677	041602	001406 				BEQ	60$		;;; [4.2055] NO -- GO ON[5.1056] BR TO 60 NOT 50
  12678	041604	032714 	000004 			BIT	#DL.RTS,(R4)	;;; [4.2055] YES -- IS REQUEST TO SEND UP??
  12679	041610	001403 				BEQ	60$		;;; [4.2055] NO -- GO ON
  12680	041612	052714 	000006 			BIS	#DL.DTR!DL.RTS,(R4) ;;; YES -- ENABLE THIS DL-11E LINE
  12681	041616	000416 				BR	80$		;;; AND TRY THE NEXT ONE
  12682						;
  12683					;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 232-1
TERMINAL DRIVER -- .DLTMO (DL-11E MODEM CONTROL TIMEOUT)

  12684					; FIVE INSTRUCTIONS PLUS LABEL  50$  WERE REMOVED WITH TCO 5.1056.
  12685					;
  12686					;
  12687					; DL-11E CARRIER TIMEOUT
  12688					;
  12689	041620				60$:
  12690	041620	032765 	000004 	000006 		BIT	#TT.CRW,STSW1(R5) ;;; WAITING FOR CARRIER??
  12691	041626	001412 				BEQ	80$		;;; NO -- GO ON
  12692	041630	032765 	002000 	000006 		BIT	#TT.RIP,STSW1(R5) ;;; YES -- IS THIS THE FIRST TIME??
  12693	041636	001404 				BEQ	70$		;;; NO -- GO HANG THE LINE UP
  12694	041640	042765 	002000 	000006 		BIC	#TT.RIP,STSW1(R5) ;;; YES -- SET TIMEOUT REQUEST
  12695	041646	000402 				BR	80$		;;; AND TRY THE NEXT LINE
  12696						;
  12697	041650				70$:
  12698	041650					CALL	.DLHUP		;;; HANG UP THE LINE
	041650	004737 	041376'			JSR	PC,.DLHUP
  12699	041654				80$:
  12700	041654	062705 	000010 			ADD	#^D8,R5		;;; POINT TO THE NEXT DLS ENTRY
  12701	041660	077040 				SOB	R0,30$		;;; DO THE NEXT LINE
  12702	041662				90$:
  12703	041662					RETURN
	041662	000207 				RTS	PC
  12704					;
  12705					; INITIALIZATION NXD PROCESSOR
  12706					;
  12707	041664				100$:				;;; HERE ON NXM INTERRUPT
  12708	041664	032626 				BIT	(SP)+,(SP)+	;;; CLEAR THE INTERRUPT
  12709	041666	005065 	000002 			CLR	TTYEXP(R5)	;;; SET NON-EXISTENT DEVICE
  12710	041672	000770 				BR	80$		;;; AND TRY FOR NEXT LINE
  12711						;
  12712					;
  12713					; LOCAL SUBROUTINE TO CHECK INTERRUPT ENABLES AND LOG ERRORS
  12714					;
  12715	041674				CKDLEN:
  12716	041674	005737 	001030'			TST	.PFIOW		;;; [4.2309] IS THIS A POWER-FAIL RESTART??
  12717	041700	001405 				BEQ	10$		;;; [4.2309] NO -- GO ON
  12718	041702	105065 	000004 			CLRB	STSW0(R5)	;;; [4.2309] YES -- ENABLE INPUT
  12719	041706					CALL	.TTRST		;;; [4.2309] RESET THIS LINE
	041706	004737 	043242'			JSR	PC,.TTRST
  12720	041712	000430 				BR	50$		;;; [5.1007] AND ENABLE THE LINE
  12721						;
  12722					;
  12723					; CHECK INPUT INTERRUPT ENABLE
  12724					;
  12725	041714				10$:
  12726	041714	105765 	000004 			TSTB	STSW0(R5)	;;; [5.1007] INPUT ENABLED ON THIS LINE??
  12727	041720	001003 				BNE	20$		;;; [5.1007] NO -- GO ON
  12728	041722	032714 	000100 			BIT	#DL.REN,(R4)	;;; [5.1007] YES -- INPUT INTERRUPT ENABLED??
  12729	041726	001415 				BEQ	40$		;;; [5.1007] NO -- ERROR LOG IT
  12730					;
  12731					; CHECK OUTPUT INTERRUPT ENABLE
  12732					;
  12733	041730				20$:
  12734	041730	032764 	000100 	000004 		BIT	#DL.XEN,4(R4)	;;; [5.1007] YES -- OUTPUT INTERRUPT ENABLED??
  12735	041736	001003 				BNE	30$		;;; [5.1007] YES -- GO ON
  12736	041740	105064 	000006 			CLRB	6(R4)		;;; [5.1007] NO -- RECOVER ERROR
  12737	041744	000406 				BR	40$		;;; [5.1007] AND LOG IT
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 232-2
TERMINAL DRIVER -- .DLTMO (DL-11E MODEM CONTROL TIMEOUT)

  12738						;
  12739					;
  12740					; CHECK DATASET INTERRUPT ENABLE
  12741					;
  12742	041746				30$:
  12743	041746	022705 	003004'			CMP	#TTTBL,R5	;;; [5.1007] IS THIS THE CTY??
  12744	041752	001410 				BEQ	50$		;;; [5.1007] YES -- GO ON
  12745	041754	032714 	000040 			BIT	#DL.DEN,(R4)	;;; [5.1007] NO -- DATASET INTERRUPT ENABLED??
  12746	041760	001005 				BNE	50$		;;; [5.1007] YES -- ENABLE INTERRUPTS AND EXIT
  12747	041762				40$:
  12748	041762	016437 	000004 	002666'		MOV	4(R4),.TTELB	;;; [5.1007] NO -- SET ALTERNATE STATUS
  12749	041770					CALL	DHERLG		;;; [5.1007] LOG THE ERROR
	041770	004737 	042316'			JSR	PC,DHERLG
  12750					;
  12751					; ENABLE INTERRUPTS FOR THIS LINE
  12752					;
  12753	041774				50$:
  12754	041774	105765 	000004 			TSTB	STSW0(R5)	;;; [5.1007] INPUT ALLOWED ON THIS LINE??
  12755	042000	001002 				BNE	60$		;;; [5.1007] NO -- GO ON
  12756	042002	052714 	000100 			BIS	#DL.REN,(R4)	;;; [4.2309] YES -- ENABLE INPUT INTERRUPTS
  12757	042006				60$:
  12758	042006	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; [5.1007] ENABLE OUTPUT INTERRUPTS
  12759	042014	022705 	003004'			CMP	#TTTBL,R5	;;; [5.1007] IS THIS THE CTY??
  12760	042020	001402 				BEQ	70$		;;; [5.1007] YES -- EXIT
  12761	042022	052714 	000040 			BIS	#DL.DEN,(R4)	;;; [5.1007] NO -- ENABLE DATASET INTERRUPTS
  12762	042026				70$:
  12763	042026					RETURN
	042026	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 233
TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  12765						.SBTTL	TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)
  12766
  12767					;+
  12768					; .DHTMO -- DH-11 CONTROLLER TIMEOUT
  12769					;
  12770					; THIS SUBROUTINE IS CALLED FROM THE POWER-FAIL RESTART CODE, AND EVERY 10
  12771					; SECONDS FROM THE TERMINAL SERVICE DISPATCH.  THIS SUBROUTINE PERFORMS THE
  12772					; FOLLWING FUNCTIONS:
  12773					;
  12774					;	1. DH-11 CONTROLLER INITIALIZATION
  12775					;	2. DH-11 STATUS MAINTENANCE
  12776					;	3. DH-11 INPUT RESTART
  12777					;	4. DH-11 ERROR LOGGING
  12778					;
  12779					; INPUTS:
  12780					;
  12781					;	NONE
  12782					;
  12783					; OUTPUTS:
  12784					;
  12785					; ALL DH-11 CONTROLLERS ARE SCANNED FOR INTERRUPT ENABLE OR NXM.  IF THE
  12786					; INTERRUPT ENABLE IS NOT PRESENT OR THE DH-11 CONTROLLER HAS ENCOUNTERED
  12787					; AN NXM, THE CONTROLLER IS (RE)INITIALIZED.  IF THIS IS A POWER-FAIL RESTART
  12788					; THE LINE STATUS IS RESET AND THE OUTPUT QUEUES FOR ALL LINES ON THE CONTROLLER
  12789					; ARE DEALLOCATED, OTHERWISE THESE CONDITIONS WILL BE LOGGED AS AN ERROR.
  12790					; IF THE DH-11 LINE HAS AN INPUT RESTART PENDING, THE LINE SPEED IS SET UP SO
  12791					; NORMAL INPUT MAY PROCEED.
  12792					;
  12793					; ALL DM-11/BB CONTROLLERS ARE SCANNED FOR INTERRUPT ENABLE AND CARRIER
  12794					; MAINTENANCE.  IF A CARRIER TIMEOUT HAS OCCURRED, THE UNIT IS HUNG UP AND,
  12795					; IF THE LINE IS AN AUTO-BAUD LINE, IS SPEED IS RESET TO DEFAULT.  IF A
  12796					; DM-11/BB HAS LOST THE INTERRUPT ENABLE, IT WILL BE ERROR LOGGED.
  12797					;
  12798					; NO REGISTERS ARE PRESERVED
  12799					;
  12800					; NOTE:
  12801					;	THIS ROUTINE MUST BE CALLED AT BR5 OR HIGHER
  12802					;
  12803					; NOTE:
  12804					;	THE NXM VECTOR IS ALTERED ON POWER-FAIL RESTART.  IT IS ASSUMED THAT
  12805					;	THIS VECTOR WILL BE RESET BY THE CALLING ROUTINE.
  12806					;
  12807					; NOTE:
  12808					;	THIS ROUTINE WILL EXIT THROUGH THE DM-11/BB TIMEOUT ROUTINE, BELOW
  12809					;-
  12810
  12811						.ENABL	LSB
  12812
  12813	042030				.DHTMO::
  12814	042030	012705 	003054'			MOV	#DHTBL,R5	;;; [4.2205] SET UP DH-11 TABLE POINTER
  12815	042034	005737 	001030'			TST	.PFIOW		;;; [4.2205] POWER-FAIL RESTART??
  12816	042040	001403 				BEQ	10$		;;; [4.2205] NO -- GO ON
  12817	042042	012737 	042276'	000004 		MOV	#DMTNXM,@#4	;;; [4.2205] YES -- HANDLE OUR OWN TRAPS
  12818					;
  12819					; INITIALIZE FOR CURRENT DH-11 CONTROLLER
  12820					;
  12821	042050				10$:
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 233-1
TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  12822	042050	005002 				CLR	R2		;;; [4.2205] INIT UNIT COUNTER
  12823	042052	005046 				CLR	-(SP)		;;; [4.2205] INIT RESET FLAG ON STACK
  12824	042054	012701 	000020 			MOV	#^D16,R1	;;; [4.2205] INIT ITERATION COUNTER
  12825					;
  12826					; INITIALIZE FOR CURRENT DH-11 LINE
  12827					;
  12828					; REGISTER SUMMARY:
  12829					;
  12830					;	R1 -- ITERATION COUNTER
  12831					;	R2 -- UNIT COUNTER
  12832					;	R3 -- LINE SPEED WORD
  12833					;	R4 -- I/O PAGE POINTER
  12834					;	R5 -- POINTER TO DH-11 TABLE
  12835					;	(SP) -- CONTROLLER RESET FLAG
  12836					;		MUST BE FLUSHED ON EXIT
  12837					;
  12838					; NXM AND INTERRUPT ENABLE CHECKS
  12839					;
  12840	042060				15$:
  12841	042060	016504 	000002 			MOV	TTYEXP(R5),R4	;;; [4.2205] GET EXTERNAL PAGE POINTER FOR THIS DH-11
  12842	042064	001467 				BEQ	80$		;;; [5.1004] MAKE DONE CHECKS IF .EQ. 0
  12843	042066	042714 	001077 			BIC	#1077,(R4)	;;; [4.2205] CLEAR OUT PREVIOUS LINE NUMBER
  12844	042072	050214 				BIS	R2,(R4)		;;; [4.2205] AND SET THE CURRENT LINE NUMBER
  12845	042074	005716 				TST	(SP)		;;; [4.2205] HAVE WE RESET THIS DH-11??
  12846	042076	001015 				BNE	30$		;;; [4.2205] YES -- CONTINUE SETTING LINES UP
  12847	042100	032714 	002000 			BIT	#2000,(R4)	;;; [4.2205] NO -- DID IT GET AN NXM??
  12848	042104	001003 				BNE	20$		;;; [4.2205] YES -- HANDLE AS A TIMEOUT
  12849	042106	032714 	000100 			BIT	#100,(R4)	;;; [4.2205] NO -- ARE INTERRUPTS ENABLED??
  12850	042112	001015 				BNE	35$		;;; [4.2205] YES -- CHECK FOR LINE RESTART
  12851	042114				20$:
  12852	042114					CALL	DHERLG		;;; [5.1007] LOG THE ERROR
	042114	004737 	042316'			JSR	PC,DHERLG
  12853					;
  12854					; HERE TO RESET AND INITIALIZE A DH-11 CONTROLLER
  12855					;
  12856	042120				25$:
  12857	042120	012714 	004000 			MOV	#4000,(R4)	;;; [4.2205] MASTER CLEAR THE DH-11
  12858	042124	005064 	000016 			CLR	16(R4)		;;; [4.2205] INIT THE SILO ALARM TO ZERO
  12859	042130	005316 				DEC	(SP)		;;; [4.2205] INDICATE THAT WE HAVE RESET THIS DH-11
  12860					;
  12861					; HERE TO RESET AND INITIALIZE A DH-11 LINE
  12862					;
  12863	042132				30$:
  12864	042132	005737 	001030'			TST	.PFIOW		;;; [4.2205] IS THIS A POWER-FAIL RESTART??
  12865	042136	001413 				BEQ	40$		;;; [4.2205] NO -- GO ON
  12866	042140					CALL	.TTRST		;;; [4.2205] YES -- RESET THIS LINE
	042140	004737 	043242'			JSR	PC,.TTRST
  12867	042144	000410 				BR	40$		;;; [4.2205] AND SET UP THE LINE SPEED
  12868						;
  12869	042146				35$:
  12870	042146	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; AUTOBAUD LINE?
  12871	042154	001024 				BNE	60$		  ; YES -- DON'T CHECK TT.RSI
  12872					;
  12873					; HERE TO CHECK FOR LINE RESTART FOR A LOCAL LINE
  12874					;
  12875	042156	032765 	020000 	000006 		BIT	#TT.RSI,STSW1(R5) ; DOES THIS LINE NEED RESTARTING??
  12876	042164	001427 				BEQ	80$		  ; NO -- GO ON
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 233-2
TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  12877	042166				40$:
  12878	042166	010246 				MOV	R2,-(SP)	  ; YES -- SAVE R2
  12879	042170					CALL	.TTSW2		  ; FIND OUR "STSW2" ENTRY
	042170	004737 	044212'			JSR	PC,.TTSW2
  12880	042174	032712 	140000 			BIT	#S2.DDN!S2.DIP,(R2) ; IS THE LINE (BEING) TURNED OFF??
  12881	042200	001011 				BNE	50$		  ; YES -- LEAVE IT ALONE
  12882	042202	016503 	000004 			MOV	STSW0(R5),R3	  ; NO -- GET THE LINE SPEED
  12883	042206	042703 	140000 			BIC	#S0.MSK,R3	  ; GET RID OF THE AUTO-BAUD FLAG
  12884	042212	010364 	000004 			MOV	R3,4(R4)	  ; SET THE LINE SPEED IN THE DH-11
  12885	042216	042765 	020000 	000006 		BIC	#TT.RSI,STSW1(R5) ; AND RESET THE RESTART FLAG
  12886	042224				50$:
  12887	042224	012602 				MOV	(SP)+,R2	  ; RESTORE R2
  12888					;
  12889					; THE FOLLOWING CODE WILL TIME OUT LOW SPEED AUTOBAUD FROM IMMEDIATELY
  12890					; TO TEN SECONDS.  IF ANYONE IS USING LOW SPEED THEY MIGHT HAVE TO HIT
  12891					; A COUPLE MORE ^C'S IF THEY HIT THIS CODE AT THE WRONG TIME, THEY WILL
  12892					; HAVE TO LIVE WITH IT AS IT IS NOT WORTH THE EXTRA CODE TO DO IT RIGHT
  12893					; WITH 2 STATES LIKE TT.RSI OR TT.RIP
  12894					;
  12895	042226				60$:
  12896	042226	032765 	020000 	000006 		BIT	#TT.LSP,STSW1(R5) ; LINE IN LOW SPEED AUTOBAUD?
  12897	042234	001403 				BEQ	80$		  ; NO, GO ON
  12898	042236					CALL	.DHSPA		  ; YES, RESET TO HIGH SPEED
	042236	004737 	040562'			JSR	PC,.DHSPA
  12899	042242	000400 				BR	80$		  ; ON TO NEXT
  12900					;
  12901					; SET UP FOR NEXT LINE IN THIS DH-11
  12902					;
  12903	042244				80$:
  12904	042244	005202 				INC	R2		;;; [4.2205] NEXT UNIT
  12905	042246	062705 	000010 			ADD	#^D8,R5		;;; [4.2205] NEXT DH-11 LINE IN DLS TABLE
  12906	042252	005301 				DEC	R1		;;; [4.2205] COUNT THIS LINE
  12907	042254	001301 				BNE	15$		;;; [4.2205] ITERATE THROUGH THIS DH-11/DM-11 PAIR
  12908	042256	005726 				TST	(SP)+		;;; [4.2205] DONE -- FLUSH AND TEST CONTROLLER RESET FLAG
  12909	042260	001402 				BEQ	90$		;;; [4.2205] GO ON IF DH-11 WASN'T RESET
  12910	042262	012714 	030100 			MOV	#30100,(R4)	;;; [4.2205] WAS RESET -- ENABLE IT
  12911					;
  12912					; SET UP FOR NEXT DH-11 IN SYSTEM
  12913					;
  12914	042266				90$:
  12915	042266	022705 	005054'			CMP	#TTYEND,R5	;;; [5.1005] ARE WE ALL DONE??
  12916	042272	101266 				BHI	10$		;;; [4.2205] NO -- START OVER
  12917	042274					RETURN			;;; [5.1004] YES -- RETURN TO CALLER
	042274	000207 				RTS	PC
  12918					;
  12919					; HERE ON TRAP-AT-4 DURING INITIALIZATION
  12920					;
  12921					;	R5 -- POINTS TO FIRST INVALID ENTRY IN DH-11 CONTROLLER TABLE
  12922					;
  12923					; STACK SUMMARY:
  12924					;
  12925					;	0(SP) -- TRAP PC
  12926					;	2(SP) -- TRAP PSW
  12927					;	4(SP) -- INITIALIZATION FLAG FROM .DHTMO, ABOVE
  12928
  12929	042276				DMTNXM:
  12930	042276	005065 	000002 			CLR	TTYEXP(R5)	;;; [5.1004] INDICATE THIS LINE DOES NOT EXIST
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 233-3
TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  12931	042302	062705 	000010 			ADD	#^D8,R5		;;; [5.1004] POINT TO NEXT LINE ON CONTROLLER
  12932	042306	077105 				SOB	R1,DMTNXM	;;; [5.1004] LOOP THRU ALL LINES
  12933	042310	032626 				BIT	(SP)+,(SP)+	;;; [4.2205] FLUSH TRAP PS/PC
  12934	042312	005726 				TST	(SP)+		;;; [4.2205] AND INITIALIZATION FLAG
  12935	042314	000764 				BR	90$		;;; [5.1004] TRY THE NEXT CONTROLLER
  12936						;
  12937
  12938						.DSABL	LSB
  12939
  12940					;
  12941					; HERE TO LOG A "LOST-INTERRUPT-ENABLE" ERROR
  12942					;
  12943
  12944	042316				DHERLG:
  12945	042316	005737 	001030'			TST	.PFIOW		;;; [5.1007] IS THIS A POWER-FAIL RESTART??
  12946	042322	001004 				BNE	10$		;;; [5.1007] YES -- GO ON
  12947	042324	012703 	002100 			MOV	#DV.LOG!DV.LIN,R3 ;;; [5.1007] YES -- SET STANDARD STATUS
  12948	042330					CALL	.TTERL		;;; [5.1007] LOG THE ERROR
	042330	004737 	042634'			JSR	PC,.TTERL
  12949	042334				10$:
  12950	042334					RETURN			;;; [5.1007] TO CALLER
	042334	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 234
TERMINAL DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)

  12952						.SBTTL	TERMINAL DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)
  12953
  12954					;+
  12955					; .DMTMO -- DM-11/BB CARRIER WAIT TIMEOUT
  12956					;
  12957					; THIS SUBROUTINE CHECKS THE CARRIER MAINTENANCE FOR THE DM-11/BB LINES.
  12958					; THIS SUBROUTINE ALSO ERROR LOGS DM-11/BB LINES WHICH LOSE INTERRUPT ENABLE.
  12959					;
  12960					; INPUTS:
  12961					;
  12962					;	NONE
  12963					;
  12964					; OUTPUTS:
  12965					;
  12966					;	NO REGISTERS PRESERVED
  12967					;
  12968					; REGISTER SUMMARY:
  12969					;
  12970					;	R0 -- DM-11/BB TABLE POINTER
  12971					;	R1 -- UNIT NUMBER
  12972					;	R2 -- POINTER TO DM-11/BB LSR
  12973					;	R4 -- POINTER TO DM-11/BB CSR
  12974					;	R5 -- POINTER TO DLS TABLE ENTRY FOR THIS LINE
  12975					;-
  12976
  12977	042336				.DMTMO::
  12978	042336	012700 	002742'			MOV	#DMTBL,R0	  ; INIT DM-11/BB TABLE POINTER
  12979	042342	005737 	001030'			TST	.PFIOW		  ; IS THIS A POWERFAIL RESTART??
  12980	042346	001403 				BEQ	10$		  ; NO -- GO ON
  12981	042350	012737 	042556'	000004 		MOV	#90$,@#4	  ; YES -- SET UP THE TRAP VECTOR
  12982	042356				10$:
  12983	042356	012004 				MOV	(R0)+,R4	  ; POINT TO DM-11/BB CSR
  12984	042360	001005 				BNE	15$		  ; GO ON IF IT EXISTS
  12985	042362	022700 	003004'			CMP	#DMTBE,R0	  ; HAVE WE DONE THEM ALL??
  12986	042366	001472 				BEQ	80$		  ; YES -- EXIT
  12987	042370	005720 				TST	(R0)+		  ; NO -- FIX UP THE POINTER
  12988	042372	000771 				BR	10$		  ; AND TRY FOR THE NEXT DM-11/BB
  12989						;
  12990	042374				15$:
  12991	042374	012005 				MOV	(R0)+,R5	  ; POINT TO DHTBL ENTRY
  12992	042376	005001 				CLR	R1		  ; INIT UNIT NUMBER
  12993	042400				20$:
  12994	042400	005765 	000002 			TST	TTYEXP(R5)	  ; THIS DH-11 EXIST??
  12995	042404	001465 				BEQ	100$		  ; NO -- MARK DM-11/BB NON-EXISTENT AS WELL
  12996	042406	005737 	001030'			TST	.PFIOW		  ; POWERFAIL RESTART??
  12997	042412	001403 				BEQ	25$		  ; NO -- GO ON
  12998	042414	012714 	000140 			MOV	#140,(R4)	  ; YES -- INIT THE CONTROLLER
  12999	042420	000756 				BR	10$		  ; AND CONTINUE
  13000						;
  13001	042422				25$:
  13002	042422	032765 	000014 	000006 		BIT	#TT.CRW!TT.ABW,STSW1(R5) ;[**] YES -- WAITING FOR CARRIER??
  13003	042430	001414 				BEQ	40$		  ; NO -- GO ON
  13004	042432	032765 	002000 	000006 		BIT	#TT.RIP,STSW1(R5) ; YES -- TIMING OUT??
  13005	042440	001005 				BNE	30$		  ; NO -- GO ON
  13006	042442					CALL	.DMHUP		  ; HANG UP THE LINE
	042442	004737 	041276'			JSR	PC,.DMHUP
  13007	042446					CALL	.DHSPA		  ; YES -- RESET THE LINE SPEED TO DEFAULT
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 234-1
TERMINAL DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)

	042446	004737 	040562'			JSR	PC,.DHSPA
  13008	042452	000403 				BR	40$		  ; AND SEE ABOUT ERROR LOGGING
  13009						;
  13010	042454				30$:
  13011	042454	042765 	002000 	000006 		BIC	#TT.RIP,STSW1(R5) ; MARK TIMEOUT REQUEST
  13012	042462				40$:
  13013	042462	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ; IS THIS A REMOTE LINE?
  13014	042470	001422 				BEQ	70$		  ; NO, SKIP INTERRUPT ENABLE CHECK
  13015	042472					CALL	.STPDM		  ; STOP THE DM-11/BB SCAN
	042472	004737 	041356'			JSR	PC,.STPDM
  13016	042476	010402 				MOV	R4,R2		  ; COPY CSR POINTER TO R2
  13017	042500	050122 				BIS	R1,(R2)+	  ; SET UP THE UNIT NUMBER
  13018	042502	032714 	000100 			BIT	#100,(R4)	  ; INTERRUPTS ENABLED??
  13019	042506	001403 				BEQ	50$		  ; NO -- ERROR LOG IT
  13020	042510	032712 	000001 			BIT	#1,(R2)		  ; IS THE LINE ENABLED??
  13021	042514	001006 				BNE	60$		  ; YES -- GO ON
  13022	042516				50$:
  13023	042516	011237 	002666'			MOV	(R2),.TTELB	  ; NO -- SAVE ALTERNATE STATUS
  13024	042522					CALL	DHERLG		  ; ERROR LOG IT
	042522	004737 	042316'			JSR	PC,DHERLG
  13025	042526	052712 	000001 			BIS	#1,(R2)		  ; ENABLE THE LINE
  13026	042532				60$:
  13027	042532	052714 	000140 			BIS	#140,(R4)	  ; ENABLE SCAN
  13028	042536				70$:
  13029	042536	062705 	000010 			ADD	#^D8,R5		  ; POINT TO NEXT DHTBL ENTRY
  13030	042542	005201 				INC	R1		  ; INCREMENT UNIT NUMBER
  13031	042544	022701 	000020 			CMP	#^D16,R1	  ; HAVE WE OVERFLOWED??
  13032	042550	003313 				BGT	20$		  ; NO -- GO ON
  13033	042552	000701 				BR	10$		  ; YES -- START NEXT CONTROLLER
  13034						;
  13035	042554				80$:
  13036	042554					RETURN			  ; RETURN TO CALLER
	042554	000207 				RTS	PC
  13037					;
  13038					; HERE ON NON-EXISTENT DM-11/BB TRAP
  13039					;
  13040	042556				90$:
  13041	042556	032626 				BIT	(SP)+,(SP)+	;;; [4.1.1091] FLUSH TRAP PS/PC
  13042	042560				100$:
  13043	042560	005060 	177774 			CLR	-4(R0)		;;; [4.1.1091] DECLARE THE DM NON-EXISTENT
  13044	042564	000674 				BR	10$		;;; [4.1.1091] AND TRY NEXT DH/DM PAIR
  13045						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 235
TERMINAL DRIVER -- .TTFDI (INPUT CONTROL SERVICE)

  13047						.SBTTL	TERMINAL DRIVER -- .TTFDI (INPUT CONTROL SERVICE)
  13048
  13049					;+
  13050					; .TTFDI -- INPUT CONTROL SERVICE
  13051					;
  13052					; THIS SUBROUTINE WILL RETURN POINTERS TO THE NEXT LINE TO BE SERVICED FOR
  13053					; INPUT CONTROL (ENABLE) IN R2 AND R5.
  13054					;
  13055					; INPUTS:
  13056					;
  13057					;	.S2ITP -- POINTER TO THE LAST LINE TO BE SERVICED FOR INPUT CONTROL
  13058					;
  13059					; OUTPUTS:
  13060					;
  13061					;	R2 -- POINTER TO "STSW2" ENTRY FOR NEXT LINE TO BE SERVICED
  13062					;	R5 -- POINTER TO DLS TABLE ENTRY FOR NEXT LINE TO BE SERVICED
  13063					;	.S2ITP -- UPDATED TO POINT TO CURRENT LINE
  13064					;-
  13065
  13066	042566				.TTFDI::
  13067	042566	013705 	005060'			MOV	.S2ITP,R5	;;; [4.1.1092] GET POINTER TO THE LAST LINE
  13068	042572	000405 				BR	20$		;;; [4.1.1092] AND GO ON
  13069						;
  13070	042574				10$:
  13071	042574					CALL	.TTSW2		;;; [4.1.1092] FIND "STSW2" ENTRY FOR THIS LINE
	042574	004737 	044212'			JSR	PC,.TTSW2
  13072	042600	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [4.1.1092] HAVE WE FOUND A LINE??
  13073	042604	001010 				BNE	30$		;;; [4.1.1092] YES -- EXIT
  13074	042606				20$:
  13075	042606	062705 	000010 			ADD	#10,R5		;;; [4.1.1092] NO -- FIND THE NEXT DLS ENTRY
  13076	042612	022705 	005054'			CMP	#TTYEND,R5	;;; [4.1.1092] HAVE WE FALLEN OFF THE END??
  13077	042616	101366 				BHI	10$		;;; [4.1.1092] NO -- CONTINUE SEARCHING
  13078	042620	012705 	003004'			MOV	#TTTBL,R5	;;; [4.1.1092] YES -- RESET TO BEGINNING
  13079	042624	000763 				BR	10$		;;; [4.1.1092] AND GO ON
  13080						;
  13081	042626				30$:
  13082	042626	010537 	005060'			MOV	R5,.S2ITP	;;; [4.1.1092] SAVE POINTER FOR THE NEXT TIME
  13083	042632					RETURN			;;; [4.1.1092] TO CALLER
	042632	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 236
TERMINAL DRIVER -- .TTERL (TERMINAL ERROR LOGGING)

  13085						.SBTTL	TERMINAL DRIVER -- .TTERL (TERMINAL ERROR LOGGING)
  13086
  13087					;+
  13088					; .TTERL -- TERMINAL ERROR LOGGING
  13089					;
  13090					; THIS SUBROUTINE WILL ENTER A TERMINAL ERROR REPORT IN THE TERMINAL
  13091					; ERROR LOGGING QUEUE.
  13092					;
  13093					; INPUTS:
  13094					;
  13095					;	R4 -- I/O PAGE POINTER FOR THIS DEVICE
  13096					;	R3 -- ERROR STATUS FOR THIS REPORT
  13097					;
  13098					; OUTPUTS:
  13099					;
  13100					;	NO REGISTERS ARE ALTERED
  13101					;-
  13102
  13103	042634				.TTERL::
  13104	042634	005737 	001012'			TST	.COMEF+2	;;; [4.1.1105] IS PRIMARY PROTOCOL RUNNING??
  13105	042640	100047 				BPL	40$		;;; [4.1.1105] NO -- JUST EXIT
  13106	042642	022737 	000006 	002664'		CMP	#6,.TTELC	;;; [5.1008] IS THERE ROOM IN THE QUEUE??
  13107	042650	003443 				BLE	40$		;;; [5.1008] NO -- EXIT
  13108	042652	010246 				MOV	R2,-(SP)	;;; [4.2245] YES -- SAVE REGISTERS
  13109	042654	010146 				MOV	R1,-(SP)	;;; [4.2245]
  13110	042656	010046 				MOV	R0,-(SP)	;;; [4.2245]
  13111	042660	010446 				MOV	R4,-(SP)	;;; [4.2245]
  13112	042662	012701 	000016 			MOV	#16,R1		;;; [4.2245] SET UP NODE SIZE
  13113	042666					CALL	..ALCB		;;; [4.2245] GET ONE FROM THE POOL
	042666	004737 	045654'			JSR	PC,..ALCB
  13114	042672	103424 				BCS	30$		;;; [4.2245] ERROR IF CC-C IS SET
  13115	042674	010160 	000002 			MOV	R1,T.HBCT(R0)	;;; [4.2245] GOT ONE -- SET NODE SIZE
  13116	042700	012701 	002662'			MOV	#.TTELQ,R1	;;; [4.2245] SET UP QUEUE POINTER
  13117	042704	005261 	000002 			INC	2(R1)		;;; [5.1008] ONE MORE NODE
  13118	042710				10$:
  13119	042710	011102 				MOV	(R1),R2		;;; [4.2245] FIND THE LAST NODE IN THE QUEUE
  13120	042712	001402 				BEQ	20$		;;; [4.2245] FOUND IT -- GO ON
  13121	042714	010201 				MOV	R2,R1		;;; [4.2245] NOT YET -- TRY AGAIN
  13122	042716	000774 				BR	10$		;;; [4.2245] SO
  13123						;
  13124	042720				20$:
  13125	042720	010011 				MOV	R0,(R1)		;;; [4.2245] ADD THIS NODE
  13126	042722	005020 				CLR	(R0)+		;;; [4.2245] MARK NEW END OF QUEUE
  13127	042724	005720 				TST	(R0)+		;;; [4.2245] GET OVER THE LISTHEAD (PACKET SIZE)
  13128	042726	012720 	000012 			MOV	#12,(R0)+	;;; [4.2245] SET MESSAGE SIZE
  13129	042732	010320 				MOV	R3,(R0)+	;;; [4.2245] SET ERROR STATUS
  13130	042734	010420 				MOV	R4,(R0)+	;;; [4.2245] SET THE DEVICE ADDRESS
  13131	042736	012420 				MOV	(R4)+,(R0)+	;;; [4.2245] SET DEVICE STATUS
  13132	042740	013710 	002666'			MOV	.TTELB,(R0)	;;; [4.2245] SET SAVED STATUS, IF ANY
  13133	042744				30$:
  13134	042744	005037 	002666'			CLR	.TTELB		;;; [4.2245] CLEAR SAVED STATUS
  13135	042750	012604 				MOV	(SP)+,R4	;;; [4.2245] RESTORE REGISTERS
  13136	042752	012600 				MOV	(SP)+,R0
  13137	042754	012601 				MOV	(SP)+,R1
  13138	042756	012602 				MOV	(SP)+,R2
  13139	042760				40$:
  13140	042760					RETURN			;;; [4.2245] TO CALLER
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 236-1
TERMINAL DRIVER -- .TTERL (TERMINAL ERROR LOGGING)

	042760	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 237
TERMINAL DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)

  13142						.SBTTL	TERMINAL DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)
  13143
  13144					;+
  13145					; .TTXOF -- DEVICE DEPENDENT XOFF PROCESSING
  13146					;
  13147					; THIS SUBROUTINE WILL PROCESS AN XOFF AND STOP OUTPUT ON A SPECIFIED
  13148					; TERMINAL LINE.
  13149					;
  13150					; INPUTS:
  13151					;
  13152					;	R5 -- POINTER TO DATA LINE SCANNER TABLE ENTRY FOR LINE TO BE STOPPED.
  13153					;
  13154					; OUTPUTS:
  13155					;
  13156					;	THE LINE IS STOPPED.
  13157					;
  13158					; CALLED FROM QUEUED PROTOCOL TASK AND TERMINAL INPUT SERVICE
  13159					;-
  13160
  13161						.ENABL	LSB
  13162
  13163	042762				.TTXOF::
  13164	042762	105765 	000006 			TSTB	STSW1+0(R5)	;;; [4.2181] ALREADY X'D OFF??
  13165	042766	100432 				BMI	10$		;;; [4.2181] YES -- JUST EXIT
  13166	042770	032765 	001000 	000006 		BIT	#TT.SIP,STSW1(R5) ;;; [4.2181] NO -- SENDALL IN PROGRESS??
  13167	042776	001023 				BNE	.DLXOF		;;; [4.2181] YES -- MARK XOFF AND RETURN
  13168	043000	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; [4.2181] NO -- IS THIS A CTY??
  13169	043006	001414 				BEQ	.DHXOF		;;; [4.2181] NO -- GO ON
  13170	043010	005737 	002640'			TST	.TTP11		;;; [4.2181] YES -- IN PDP-11 I/O WAIT??
  13171	043014	001017 				BNE	10$		;;; [4.2181] YES -- JUST EXIT
  13172	043016	105737 	001234'			TSTB	.KLNSW+0	;;; [4.2181] NO -- IS KLINIK ACTIVE??
  13173	043022	003406 				BLE	.DHXOF		;;; [4.2181] NO -- NOT THAT WE CARE -- GO ON
  13174	043024	010546 				MOV	R5,-(SP)	;;; [4.2181] YES -- SAVE CTY POINTER
  13175	043026	013705 	002644'			MOV	KLNPTR,R5	;;; [4.2181] SUBSTITUTE KLINIK POINTER
  13176	043032					CALL	.DHXOF		;;; [4.2181] STOP THE KLINIK LINE
	043032	004737 	043040'			JSR	PC,.DHXOF
  13177	043036	012605 				MOV	(SP)+,R5	;;; [4.2181] RESTORE CTY POINTER
  13178					;
  13179					; HERE TO STOP A DH-11 LINE
  13180					;
  13181	043040				.DHXOF::
  13182	043040					CALL	.TTSTP		;;; [5.1015] SEE ABOUT STOPPING I/O
	043040	004737 	043056'			JSR	PC,.TTSTP
  13183	043044	001403 				BEQ	10$		;;; [5.1015] EXIT IF NON-EXISTENT
  13184					;
  13185					; HERE TO STOP  DL-11 LINE
  13186					;
  13187	043046				.DLXOF::
  13188	043046	052765 	000200 	000006 		BIS	#TT.XOF,STSW1(R5) ;;; [4.2181] MARK THE LINE AS X'D OFF
  13189	043054				10$:
  13190	043054					RETURN			;;; [4.2181] TO CALLER
	043054	000207 				RTS	PC
  13191
  13192						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 238
TERMINAL DRIVER -- .TTSTP (STOP TERMINAL OUTPUT)

  13194						.SBTTL	TERMINAL DRIVER -- .TTSTP (STOP TERMINAL OUTPUT)
  13195
  13196					;+
  13197					; .TTSTP -- STOP TERMINAL OUTPUT
  13198					;
  13199					; THIS SUBROUTINE WILL STOP OR TRUNCATE OUTPUT FOR A LINE
  13200					;
  13201					; INPUTS:
  13202					;
  13203					;	R5 -- POINTS TO DLS ENTRY FOR LINE TO BE STOPPED
  13204					;
  13205					; OUTPUTS:
  13206					;
  13207					;	R4 -- POINTS TO DEVICE I/O PAGE ADDRESS
  13208					;-
  13209
  13210	043056				.TTSTP::
  13211	043056					CALL	.STDHL		;;; [5.1015] SET THE DH-11 LINE NUMBER
	043056	004737 	040476'			JSR	PC,.STDHL
  13212	043062	003407 				BLE	10$		;;; [5.1015] GO ON IF DL-11 OR NON-EXISTENT
  13213	043064	022764 	177775 	000010 		CMP	#-3,10(R4)	;;; [5.1015] MUST WE TRUNCATE PACKET??
  13214	043072	002403 				BLT	10$		;;; [5.1015] NO -- JUST LET I/O RUN DOWN
  13215	043074	012764 	177777 	000010 		MOV	#-1,10(R4)	;;; [5.1015] YES -- TRUNCATE IT
  13216	043102				10$:
  13217	043102					RETURN			;;; [5.1015] TO CALLER
	043102	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 239
TERMINAL DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)

  13219						.SBTTL	TERMINAL DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)
  13220
  13221					;+
  13222					; .TTXON -- DEVICE DEPENDENT XON PROCESSING
  13223					;
  13224					; THIS SUBROUTINE WILL PROCESS AN XON AND START OUTPUT ON A SPECIFIED
  13225					; TERMINAL LINE.
  13226					;
  13227					; INPUTS:
  13228					;
  13229					;	R5 -- POINTER TO DATA LINE SCANNER TABLE ENTRY FOR LINE TO BE STARTED.
  13230					;
  13231					; OUTPUTS:
  13232					;
  13233					;	THE LINE IS STARTED.
  13234					;
  13235					; CALLED FROM QUEUED PROTOCOL TASK AND TERMINAL INPUT SERVICE
  13236					;-
  13237
  13238						.ENABL	LSB
  13239
  13240	043104				.TTXON::			;;; [5.1248] REMOVE SAVE OF R0
  13241	043104	105765 	000006 			TSTB	STSW1+0(R5)	;;; [4.2181] IS THE LINE X'D OFF??
  13242	043110	100053 				BPL	30$		;;; [4.2181] NO -- JUST EXIT
  13243	043112	032765 	001001 	000006 		BIT	#TT.SIP!TT.OUT,STSW1(R5) ;;; [4.2181] YES -- SENDALL IN PROGRESS??
  13244									;;; [4.2181] OR ALREADY BUSY??
  13245	043120	001044 				BNE	20$		;;; [4.2181] YES -- RESET LINE STATE AND EXIT
  13246	043122	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; [4.2181] NO -- IS THIS THE CTY??
  13247	043130	001414 				BEQ	.DHXON		;;; [4.2181] NO -- GO ON
  13248	043132	005737 	002640'			TST	.TTP11		;;; [4.2181] YES -- IN PDP-11 I/O WAIT??
  13249	043136	001035 				BNE	20$		;;; [4.2181] YES -- RESET XOFF AND EXIT
  13250	043140	105737 	001234'			TSTB	.KLNSW+0	;;; [4.2181] NO -- IS KLINIK ACTIVE??
  13251	043144	003406 				BLE	.DHXON		;;; [4.2181] NO -- NOT THAT WE CARE - GO ON
  13252	043146	010546 				MOV	R5,-(SP)	;;; [4.2181] YES -- SAVE CTY POINTER
  13253	043150	013705 	002644'			MOV	KLNPTR,R5	;;; [4.2181] SUBSTITUTE KLINIK LINE POINTER
  13254	043154					CALL	.DHXON		;;; [4.2181] START THE KLINIK LINE
	043154	004737 	043162'			JSR	PC,.DHXON
  13255	043160	012605 				MOV	(SP)+,R5	;;; [4.2181] RESTORE CTY POINTER
  13256					;
  13257					; HERE TO START A DH-11 LINE
  13258					;
  13259	043162				.DHXON::
  13260	043162	011500 				MOV	(R5),R0		;;; [5.1015] COPY THREAD POINTER TO R0
  13261	043164	001422 				BEQ	20$		;;; [4.2181] RESET STATUS AND EXIT IF EMPTY
  13262	043166	105760 	000006 			TSTB	T.HCBC(R0)	;;; [5.1015] TEST BYTE COUNT FROM THREAD NODE
  13263	043172	001006 				BNE	10$		;;; [4.2181] PROCEED IF PACKET NOT EMPTY
  13264	043174	005360 	000004 			DEC	T.HCAD(R0)	;;; [5.1015] EMPTY -- BACK UP ONE BYTE
  13265	043200	105070 	000004 			CLRB	@T.HCAD(R0)	;;; [5.1015] AND RENDER IT NULL
  13266	043204	105260 	000006 			INCB	T.HCBC(R0)	;;; [5.1015] AND ACCOUNT FOR IT
  13267	043210				10$:
  13268	043210					CALL	.STDHL		;;; [4.2181] SET UP FOR THIS LINE NUMBER
	043210	004737 	040476'			JSR	PC,.STDHL
  13269	043214	100404 				BMI	.DLXON		;;; [5.1015] GO ON IF DL-11
  13270	043216	001410 				BEQ	30$		;;; [5.1015] EXIT IF NON-EXISTENT
  13271	043220					CALL	.DHSTO		;;; [5.1015] START UP THE DH-11
	043220	004737 	035034'			JSR	PC,.DHSTO
  13272	043224	000402 				BR	20$		;;; [4.2181] AND EXIT
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 239-1
TERMINAL DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)

  13273						;
  13274					;
  13275					; HERE TO START A DL-11 LINE
  13276					;
  13277	043226				.DLXON::
  13278	043226					CALL	.DLSTO		;;; [5.1015] START UP THE DL-11
	043226	004737 	035210'			JSR	PC,.DLSTO
  13279	043232				20$:
  13280	043232	042765 	000200 	000006 		BIC	#TT.XOF,STSW1(R5) ;;; [4.2181] MARK LINE AS X'D ON
  13281	043240				30$:
  13282	043240					RETURN			;;; [4.2181] TO CALLER
	043240	000207 				RTS	PC
  13283
  13284						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 240
TERMINAL DRIVER -- .TTRST (RESET A TERMINAL LINE)

  13286						.SBTTL	TERMINAL DRIVER -- .TTRST (RESET A TERMINAL LINE)
  13287
  13288					;+
  13289					; .TTRST -- RESET A TERMINAL LINE
  13290					;
  13291					; THIS SUBROUTINE WILL RESET A LINE'S STATUS AND CLEAR IT'S OUTPUT QUEUE
  13292					;
  13293					; INPUTS:
  13294					;
  13295					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  13296					;
  13297					; OUTPUTS:
  13298					;
  13299					;	NO REGISTERS ARE ALTERED
  13300					;	LINE STATUS IS RESET
  13301					;	LINES OUTPUT QUEUE IS EMPTY
  13302					;
  13303					; NOTE:
  13304					;	THIS SUBROUTINE MUST BE CALLED AT BR5 OR HIGHER
  13305					;-
  13306
  13307	043242				.TTRST::
  13308	043242	010246 				MOV	R2,-(SP)	;;; [4.2205] SAVE R2
  13309	043244	005737 	001030'			TST	.PFIOW		;;; [4.2205] POWER FAIL RESTART??
  13310	043250	001420 				BEQ	10$		;;; [4.2205] NO -- GO ON
  13311					;
  13312					;TT.LSP GETS CLEARED BY CLEARING TT.RSI
  13313					;
  13314	043252	042765 	161411 	000006 		BIC	#TT.SND!TT.RSI!TT.NSA!TT.ABW!TT.SIP!TT.OUT,STSW1(R5)
  13315									;;; [4.2205] YES -- SET POWER UP STATUS
  13316	043260	042765 	140000 	000004 		BIC	#S0.MSK,STSW0(R5) ;;; [4.2309] RESET CONNECT BIT
  13317	043266					CALL	.TTSW2		;;; [5.1015] FIND OUR "STSW2" ENTRY
	043266	004737 	044212'			JSR	PC,.TTSW2
  13318	043272	105012 				CLRB	(R2)		;;; [5.1016] REMOVE DEFERRED CHARACTER
  13319	043274	032712 	170000 			BIT	#S2.DDN!S2.DIP!S2.ENB!S2.DIS,(R2)
  13320									;;; [5.1015] WAS THE LINE BEING TURNED ON OR OFF??
  13321	043300	001404 				BEQ	10$		;;; [5.1015] NO -- LEAVE IT ALONE
  13322	043302	012712 	100000 			MOV	#S2.DDN,(R2)	;;; [5.1015] YES -- SAY IT WAS FINISHED
  13323	043306					CALL	.TTENB		;;; [5.1015] AND TURN IT ON
	043306	004737 	043676'			JSR	PC,.TTENB
  13324	043312				10$:
  13325	043312	010502 				MOV	R5,R2		;;; [5.1015] COPY DLS POINTER TO R2
  13326	043314					CALL	..STPT		;;; [4.2205] STOP THE LINE AND FLUSH OUTPUT
	043314	004737 	046400'			JSR	PC,..STPT
  13327	043320	042765 	014220 	000006 		BIC	#TT.XOF!TT.XEN!TT.FEC,STSW1(R5)
  13328									;;; [4.2205] RESET THE LINE STATUS
  13329					;
  13330					;THE FOLLOWING IS NOT CURRENTLY NECESSARY, AS CLEARING TT.FEC CLEARS
  13331					;TT.IGN!TT.BRK.  TT.LSP NOT GETTING CLEARED WILL NOT HAVE AN ADVERSE
  13332					;AFFECT (IT MEANS OCCASIONALLY WE WILL TRY LOW SPEED AUTOBAUD BEFORE
  13333					;HIGH SPEED IF WE RESTART A LINE IN LOW SPEED WAIT).
  13334					;
  13335					;	BIT	#TT.ABL,STSW1(R5) ;;; AUTOBAUD?
  13336					;	BEQ	20$		;;; NO
  13337					;	BIC	#TT.LSP!TT.IGN!TT.BRK,STSW1(R5)
  13338					;				;;; YES -- CLEAR APPROPRIATE BITS
  13339					;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 240-1
TERMINAL DRIVER -- .TTRST (RESET A TERMINAL LINE)

  13340	043326	012602 				MOV	(SP)+,R2	;;; RESTORE R2
  13341	043330					RETURN			;;; [4.2205] TO CALLER
	043330	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 241
TERMINAL DRIVER -- CHECK INPUT XOFF DELAY

  13343						.SBTTL	TERMINAL DRIVER -- CHECK INPUT XOFF DELAY
  13344
  13345					;+
  13346					; .TTCHK -- CHECK INPUT XOFF DELAY
  13347					;
  13348					; THIS SUBROUTINE WILL COUNT EITHER TWO CLOCK TICKS OR TWO CHARACTERS FOR A
  13349					; LINE WHICH IS BEING INPUT DISABLED.  THE LINE SPEED IS THEN SET TO ZERO
  13350					; WHEN THE COUNT OVERFLOWS
  13351					;
  13352					; INPUTS:
  13353					;
  13354					;	R2 -- POINTS TO "STSW2" ENTRY FOR LINE
  13355					;	R5 -- POINTS TO DLS TABLE ENTRY FOR LINE
  13356					;
  13357					; OUTPUTS:
  13358					;
  13359					;	DELAY COUNT AND STATUS IS IN "STSW2(R2)"
  13360					;-
  13361
  13362	043332				.TTCHK::
  13363	043332	105262 	000001 			INCB	1(R2)		;;; [5.1015] YES -- COUNT THIS TICK
  13364	043336	032712 	001000 			BIT	#S2.SSZ,(R2)	;;; [5.1015] TIME TO SHUT HIM OFF??
  13365	043342	001404 				BEQ	10$		;;; [5.1015] NO -- NOT YET
  13366	043344					CALL	.TTDIS		;;; [5.1015] YES -- DO IT
	043344	004737 	043520'			JSR	PC,.TTDIS
  13367	043350	005337 	005054'			DEC	.TTS2F		;;; [5.1015] COUNT THIS LINE
  13368	043354				10$:
  13369	043354					RETURN			;;; [5.1015] TO CALLER
	043354	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 242
TERMINAL DRIVER -- .TTICK (INPUT BUFFER CHECKS)

  13371						.SBTTL	TERMINAL DRIVER -- .TTICK (INPUT BUFFER CHECKS)
  13372
  13373					;+
  13374					; .TTICK -- TERMINAL INPUT BUFFER CHECKS
  13375					;
  13376					; THIS SUBROUTINE WILL CHECK THE STATE OF THE BUFFER SPACE AND INITIATE AN
  13377					; INPUT DISABLE SEQUENCE IF THE INPUT BUFFER LOW HAS BEEN CROSSED.
  13378					;
  13379					; INPUTS:
  13380					;
  13381					;	R2 -- POINTS TO "STSW2" ENTRY FOR CURRENT LINE
  13382					;	R5 -- POINTS TO DLS TABLE ENTRY FOR CURRENT LINE
  13383					;
  13384					; OUTPUTS:
  13385					;
  13386					;	NONE
  13387					;
  13388					; NOTE:
  13389					;
  13390					;	THE CTY IS NEVER INPUT-DISABLED BY THIS ROUTINE
  13391					;-
  13392
  13393						.ENABL	LSB
  13394
  13395	043356				.TTICK::
  13396	043356	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; [4.1.1092] IS THIS A CTY??
  13397	043364	001035 				BNE	20$		;;; [4.1.1092] YES -- LEAVE IT ALONE
  13398	043366	023737 	005062'	001430'		CMP	.IBFLO,.FREPL+2 ;;; [4.1.1092] NO -- IS THE FREE-POOL OK??
  13399	043374	103431 				BLO	20$		;;; [4.1.1092] YES -- JUST EXIT
  13400	043376	032712 	140000 			BIT	#S2.DDN!S2.DIP,(R2) ;;; [4.1.1092] NO -- IN PROGRESS OR DONE??
  13401	043402	001026 				BNE	20$		;;; [4.1.1092] YES -- LEAVE IT ALONE
  13402	043404	052712 	004000 			BIS	#S2.LCL,(R2)	;;; [4.1.1092] NO -- SAY THAT WE OWN THE LINE
  13403	043410	000443 				BR	.TTDIS		;;; [4.1.1092] AND DISABLE IT
  13404						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 243
TERMINAL DRIVER -- .TTQDS (QUEUED PROTOCOL INPUT DISABLE SERVI

  13406						.SBTTL	TERMINAL DRIVER -- .TTQDS (QUEUED PROTOCOL INPUT DISABLE SERVICE)
  13407
  13408					;+
  13409					; .TTQDS -- QUEUED PROTOCOL LINE DISABLE SERVICE
  13410					; .TTQEN -- QUEUED PROTOCOL LINE ENABLE SERVICE
  13411					;
  13412					; THESE SUBROUTINES ARBITRATE THE OWNERSHIP OF A LINE FOR WHICH THE HOST HAS
  13413					; REQUESTED EITHER AN INPUT DISABLE OR ENABLE VIA THE QUEUED PROTOCOL.  THE
  13414					; "RULE OF THUMB" IS THAT IF THE FREE-POOL IS BELOW INPUT THRESHOLDS, THE
  13415					; FRONT-END GAINS "OWNERSHIP" OF THAT LINE FOR WHICH THE REQUEST IS ISSUED.
  13416					;
  13417					; UNDER THESE CIRCUMSTANCES, THE LINE WILL EVENTUALLY BECOME INPUT RE-ENABLED
  13418					; BY THE CLOCK SERVICE, BUT ONLY IF THE FREE-POOL IS ABOVE MINIMUMS.
  13419					;
  13420					; INPUTS:
  13421					;
  13422					;	R2 -- POINTS TO "STSW2" ENTRY FOR THE LINE
  13423					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THE LINE
  13424					;
  13425					; OUTPUTS:
  13426					;
  13427					;	NO REGISTERS ALTERED
  13428					;-
  13429
  13430	043412				.TTQDS::
  13431	043412	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [4.1.1092] DO WE OWN THE LINE??
  13432	043416	001020 				BNE	20$		;;; [4.1.1092] YES -- KEEP IT
  13433	043420	000437 				BR	.TTDIS		;;; [4.1.1092] NO -- STOP IT
  13434						;
  13435	043422				.TTQEN::
  13436	043422	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [4.1.1092] DO WE OWN THE LINE??
  13437	043426	001014 				BNE	20$		;;; [4.1.1092] YES -- KEEP IT
  13438	043430	023737 	005064'	001430'		CMP	.IBFOK,.FREPL+2	;;; [4.1.1092] NO -- IS THE FREE-POOL OK??
  13439	043436	103517 				BLO	.TTENB		;;; [4.1.1092] YES -- ENABLE THE LINE AND EXIT
  13440	043440	032712 	140000 			BIT	#S2.DDN!S2.DIP,(R2) ;;; [4.1.1092] NO -- IS IT (BEING) STOPPED??
  13441	043444	001405 				BEQ	20$		;;; [4.1.1092] NO -- LEAVE IT ALONE
  13442	043446	100002 				BPL	10$		;;; [4.1.1092] IN PROGRESS -- GO ON
  13443	043450	005237 	005056'			INC	.S2IDC		;;; [4.1.1092] DONE -- ACCOUNT FOR THE LINE
  13444	043454				10$:
  13445	043454	052712 	004000 			BIS	#S2.LCL,(R2)	;;; [4.1.1092] MARK THAT WE OWN THE LINE
  13446	043460				20$:
  13447	043460					RETURN			;;; [4.1.1092] AND EXIT
	043460	000207 				RTS	PC
  13448
  13449						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 244
TERMINAL DRIVER -- .TTIXC (INPUT CONTROL CHECKS)

  13451						.SBTTL	TERMINAL DRIVER -- .TTIXC (INPUT CONTROL CHECKS)
  13452
  13453					;+
  13454					; .TTIXC -- TERMINAL INPUT CONTROL CHECKS
  13455					;
  13456					; THIS SUBROUTINE WILL CHECK AND INITIATE A DEFERRED INPUT XON OR XOFF
  13457					;
  13458					; INPUTS:
  13459					;
  13460					;	R5 -- POINTS TO DLS ENTRY FOR THE LINE TO BE CHECKED
  13461					;
  13462					; OUTPUTS:
  13463					;
  13464					;	R2 -- POINTS TO STSW2 ENTRY FOR THE LINE
  13465					;	OUTPUT IS ACTIVE IF AN XOFF OR XON HAS BEEN STARTED ON THE LINE
  13466					;-
  13467
  13468	043462				.TTIXC::
  13469	043462					CALL	.TTSW2		;;; [5.1015] FIND OUR "STSW2" ENTRY
	043462	004737 	044212'			JSR	PC,.TTSW2
  13470	043466	032712 	010000 			BIT	#S2.ENB,(R2)	;;; [5.1015] INPUT XON PENDING??
  13471	043472	001101 				BNE	.TTENB		;;; [5.1015] YES -- DO IT
  13472	043474				10$:
  13473	043474	032712 	020000 			BIT	#S2.DIS,(R2)	;;; [5.1015] INPUT XOFF PENDING??
  13474	043500	001007 				BNE	.TTDIS		;;; [5.1015] YES -- DO IT
  13475	043502				20$:
  13476	043502	010446 				MOV	R4,-(SP)	;;; [5.1016] SAVE R4
  13477	043504	111204 				MOVB	(R2),R4		;;; [5.1016] BREAK-THROUGH WRITE PENDING??
  13478	043506	001402 				BEQ	30$		;;; [5.1016] NO -- GO ON
  13479	043510					CALL	.TTBTW		;;; [5.1016] YES -- DO IT
	043510	004737 	044042'			JSR	PC,.TTBTW
  13480	043514				30$:
  13481	043514	012604 				MOV	(SP)+,R4	;;; [5.1016] RESTORE R4
  13482	043516					RETURN			;;; [5.1016] TO CALLER
	043516	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 245
TERMINAL DRIVER -- .TTDIS (DISABLE INPUT FROM LINE)

  13484						.SBTTL	TERMINAL DRIVER -- .TTDIS (DISABLE INPUT FROM LINE)
  13485
  13486					;+
  13487					; .TTDIS -- DISABLE INPUT FROM LINE
  13488					;
  13489					; THIS SUBROUTINE WILL INITIATE THE DISABLING OF THE INPUT FOR A LINE
  13490					; BY TRANSMITTING AN XOFF TO THE LINE AND MARKING THE DISABLE IN PROGRESS
  13491					;
  13492					; INPUTS:
  13493					;
  13494					;	R2 -- POINTS TO THE "STSW2" ENTRY FOR THIS LINE
  13495					;	R5 -- POINTS TO DATA LINE SCANNER ENTRY FOR LINE TO BE DISABLED
  13496					;
  13497					; OUTPUTS:
  13498					;
  13499					;	NO REGISTERS ALTERED
  13500					;
  13501					; NOTES:
  13502					;
  13503					;	THIS ROUTINE MUST BE ENTERED AT PRI5 OR HIGHER
  13504					;	THIS ROUTINE ASSUMES THAT THE DEVICE EXISTS
  13505					;-
  13506
  13507						.ENABL	LSB
  13508
  13509	043520				.TTDIS::
  13510	043520	010046 				MOV	R0,-(SP)	;;; [5.1015] SAVE REGISTERS
  13511	043522	010246 				MOV	R2,-(SP)
  13512	043524	010446 				MOV	R4,-(SP)
  13513	043526	032712 	140000 			BIT	#S2.DIP!S2.DDN,(R2) ;;; [5.1015] ALREADY DONE OR IN PROGRESS??
  13514	043532	100576 				BMI	75$		;;; [5.1015] ALREADY STOPPED -- GO ON
  13515	043534	001025 				BNE	20$		;;; [5.1015] FIRST PART DONE -- FINISH
  13516					;
  13517					; HERE TO INITIATE THE LINE STOP
  13518					;
  13519	043536	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; [5.1015] IS OUTPUT ACTIVE??
  13520	043544	001405 				BEQ	10$		;;; [5.1015] NO -- GO ON
  13521					;
  13522					; HERE TO DEFER THE XOFF TRANSMISSION
  13523					;
  13524	043546	052712 	020000 			BIS	#S2.DIS,(R2)	;;; [5.1015] YES -- DEFER THE REQUEST
  13525	043552	042712 	010000 			BIC	#S2.ENB,(R2)	;;; [5.1015] REMOVE "OTHER" REQUEST
  13526	043556	000562 				BR	70$		;;; [5.1015] STOP THE LINE AND EXIT
  13527						;
  13528					;
  13529					; HERE TO TRANSMIT THE XOFF
  13530					;
  13531	043560				10$:
  13532	043560	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [6.1392] DO WE OWN THIS LINE
  13533	043564	001402 				BEQ	12$		;;; [6.1392] NO, DON'T SEND XOFF
  13534	043566					CALL	.TFXOF		;;; [5.1016] FORCE THE XOFF TO THE LINE
	043566	004737 	044242'			JSR	PC,.TFXOF
  13535	043572				12$:
  13536	043572	042712 	020000 			BIC	#S2.DIS,(R2)	;;; [5.1015] REMOVE DEFERRED REQUEST
  13537	043576				15$:
  13538	043576	052712 	040000 			BIS	#S2.DIP,(R2)	;;; [5.1015] MARK THE REQUEST IN PROGRESS
  13539	043602	005237 	005054'			INC	.TTS2F		;;; [5.1015] FLAG THE CLOCK SERVICE
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 245-1
TERMINAL DRIVER -- .TTDIS (DISABLE INPUT FROM LINE)

  13540	043606	000550 				BR	75$		;;; [5.1015] AND EXIT
  13541						;
  13542					;
  13543					; HERE TO REFUSE INPUT FROM THE LINE
  13544					;
  13545	043610				20$:
  13546	043610	032712 	001000 			BIT	#S2.SSZ,(R2)	;;; [5.1015] READY FOR SECOND PART??
  13547	043614	001545 				BEQ	75$		;;; [5.1015] NO -- WAIT
  13548	043616					CALL	.STDHL		;;; [5.1015] SET UP THE LINE NUMBER
	043616	004737 	040476'			JSR	PC,.STDHL
  13549	043622	100406 				BMI	25$		;;; [5.1015] BRANCH IF LINE IS A DL-11
  13550	043624	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [RCO 32681] OUR LINE ??
  13551	043630	001010 				BNE	30$		;;; [RCO 32681] YES, DON'T SET LINE SPEED TO ZERO
  13552	043632					CALL	.DHSPZ		;;; SET INPUT SPEED TO ZERO
	043632	004737 	040540'			JSR	PC,.DHSPZ
  13553	043636	000405 				BR	30$		;;; [5.1015] AND EXIT
  13554						;
  13555	043640				25$:
  13556	043640	112765 	177777 	000004 		MOVB	#-1,STSW0(R5)	;;; [5.1015] DISABLE DL-11 INPUT
  13557	043646	042714 	000100 			BIC	#DL.REN,(R4)	;;; [5.1015] SO
  13558	043652				30$:
  13559	043652	042712 	041400 			BIC	#S2.DIP!S2.CNT,(R2) ;;; [5.1015] NO LONGER IN PROGRESS
  13560	043656	052712 	100000 			BIS	#S2.DDN,(R2)	;;; [5.1015] BUT FINISHED
  13561	043662	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [4.1.1092] DO WE OWN THIS LINE??
  13562	043666	001520 				BEQ	75$		;;; [4.1.1092] NO -- GO ON
  13563	043670	005237 	005056'			INC	.S2IDC		;;; [4.1.1092] YES -- ACCOUNT FOR IT
  13564	043674	000515 				BR	75$		;;; [5.1015] EXIT
  13565						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 246
TERMINAL DRIVER -- .TTENB (ENABLE INPUT FOR LINE)

  13567						.SBTTL	TERMINAL DRIVER -- .TTENB (ENABLE INPUT FOR LINE)
  13568
  13569					;+
  13570					; .TTENB -- ENABLE INPUT FOR LINE
  13571					;
  13572					; THIS ROUTINE WILL ENABLE INPUT FOR A LINE BY RESETTING ITS INPUT SPEED AND
  13573					; TRANSMITTING AN XON TO THE LINE.
  13574					;
  13575					; INPUTS:
  13576					;
  13577					;	R2 -- POINTS TO "STSW2" ENTRY FOR THIS LINE
  13578					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  13579					;
  13580					; OUTPUTS:
  13581					;
  13582					;	NO REGISTERS ALTERED
  13583					;
  13584					; NOTES:
  13585					;
  13586					;	THIS ROUTINE MUST BE ENTERED AT PRI5 OR HIGHER
  13587					;	THIS ROUTINE ASSUMES THAT THE DEVICE EXISTS
  13588					;-
  13589
  13590	043676				.TTENB::
  13591	043676	010046 				MOV	R0,-(SP)	;;; [5.1015] SAVE REGISTERS
  13592	043700	010246 				MOV	R2,-(SP)
  13593	043702	010446 				MOV	R4,-(SP)
  13594	043704	032712 	140000 			BIT	#S2.DDN!S2.DIP,(R2) ;;; [5.1015] INTERROGATE LINE STATE
  13595	043710	100406 				BMI	35$		;;; [5.1015] LINE IS DISABLED
  13596	043712	001506 				BEQ	75$		;;; [5.1015] ALREADY ENABLED -- EXIT
  13597	043714	042712 	040000 			BIC	#S2.DIP,(R2)	;;; [5.1015] REMOVE REQUEST IN PROGRESS
  13598	043720	005337 	005054'			DEC	.TTS2F		;;; [5.1015] REMOVE CLOCK COUNT
  13599	043724	000416 				BR	45$		;;; [5.1015] TRY TO ENABLE THE LINE NOW
  13600						;
  13601					;
  13602					; HERE TO INITIATE THE LINE START
  13603					;
  13604	043726				35$:
  13605	043726					CALL	.STDHL		;;; [5.1015] SET UP THE LINE NUMBER
	043726	004737 	040476'			JSR	PC,.STDHL
  13606	043732	100407 				BMI	40$		;;; [5.1015] BRANCH IF THIS IS A DL-11
  13607	043734	016546 	000004 			MOV	STSW0(R5),-(SP)	;;; [5.1015] GET THE SPEED WORD
  13608	043740	042716 	140000 			BIC	#S0.MSK,(SP)	;;; [5.1015] GET RID OF STATUS
  13609	043744	012664 	000004 			MOV	(SP)+,4(R4)	;;; [5.1015] SET THE SPEED
  13610	043750	000404 				BR	45$		;;; [5.1015] AND EXIT
  13611						;
  13612	043752				40$:
  13613	043752	105065 	000004 			CLRB	STSW0(R5)	;;; [5.1015] ALLOW DL-11 INPUT
  13614	043756	052714 	000100 			BIS	#DL.REN,(R4)	;;; [5.1015] SO
  13615					;
  13616					; HERE TO TRANSMIT THE XON
  13617					;
  13618	043762				45$:
  13619	043762	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; [5.1015] OUTPUT ACTIVE??
  13620	043770	001017 				BNE	50$		;;; [5.1015] YES -- DEFER THE REQUEST ONCE MORE
  13621	043772	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [6.1392] DO WE OWN THIS LINE
  13622	043776	001402 				BEQ	46$		;;; [6.1392] NO, DON'T SEND XON
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 246-1
TERMINAL DRIVER -- .TTENB (ENABLE INPUT FOR LINE)

  13623	044000					CALL	.TFXON		;;; [5.1016] YES, FORCE THE XON
	044000	004737 	044232'			JSR	PC,.TFXON
  13624	044004				46$:
  13625	044004	005712 				TST	(R2)		;;; [6.1361] HAVE WE DISABLED THIS LINE?
  13626	044006	100005 				BPL	48$		;;; [6.1361] NO, DON'T DECREMENT COUNT
  13627	044010	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [6.1361] YES, IS IT OUR REQUEST?
  13628	044014	001402 				BEQ	48$		;;; [6.1361] NO
  13629	044016	005337 	005056'			DEC	.S2IDC		;;; [6.1361] YES, DECREMENT DISABLED LINE COUNT
  13630	044022	042712 	115400 		48$:	BIC	#S2.ENB!S2.DDN!S2.LCL!S2.CNT,(R2) ;;; [5.1015] CLEAR THE REQUEST
  13631	044026	000440 				BR	75$		;;; [5.1015] AND EXIT
  13632						;
  13633					;
  13634					; HERE TO DEFER THE LINE START
  13635					;
  13636	044030				50$:
  13637	044030	052712 	010000 			BIS	#S2.ENB,(R2)	;;; [5.1015] SET DEFERRED REQUEST
  13638	044034	042712 	020000 			BIC	#S2.DIS,(R2)	;;; [5.1015] REMOVE "OTHER" REQUEST
  13639	044040	000431 				BR	70$		;;; [5.1015] STOP THE LINE AND EXIT
  13640						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 247
TERMINAL DRIVER -- .TTBTW (BREAK-THROUGH WRITE FUNCTION)

  13642						.SBTTL	TERMINAL DRIVER -- .TTBTW (BREAK-THROUGH WRITE FUNCTION)
  13643
  13644					;+
  13645					; .TTBTW -- BREAK-THROUGH WRITE FUNCTION
  13646					;
  13647					; THIS SUBROUTINE WILL FORCE A SINGLE CHARACTER TO A LINE AT THE HEAD OF ITS
  13648					; OUTPUT LIST AND OVER AN OUTPUT XOFF.
  13649					;
  13650					; INPUTS:
  13651					;
  13652					;	R4 -- CHARACTER TO BE SENT
  13653					;	R5 -- POINTS TO DLS ENTRY FOR THIS LINE
  13654					;
  13655					; OUTPUTS:
  13656					;
  13657					;	NO REGISTERS ALTERED
  13658					;
  13659					; NOTES:
  13660					;
  13661					;	THIS ROUTINE MUST BE ENTERED AT PRI5 OR HIGHER
  13662					;	THIS ROUTINE ASSUMES THAT THE DEVICE EXISTS
  13663					;-
  13664
  13665	044042				.TTBTW::
  13666	044042	010046 				MOV	R0,-(SP)	;;; [5.1015] SAVE R0
  13667	044044	010246 				MOV	R2,-(SP)	;;; [5.1015] AND R2
  13668	044046	010446 				MOV	R4,-(SP)
  13669	044050					CALL	.TTSW2		;;; [5.1016] FIND OUR "STSW2" ENTRY
	044050	004737 	044212'			JSR	PC,.TTSW2
  13670	044054	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; [5.1016] OUTPUT ACTIVE??
  13671	044062	001017 				BNE	65$		;;; [5.1016] YES -- DEFER THE REQUEST
  13672	044064					CALL	BLDPKT		;;; [5.1016] NO -- ALLOCATE AND BUILD THE PACKET
	044064	004737 	044140'			JSR	PC,BLDPKT
  13673	044070	105012 				CLRB	(R2)		;;; [5.1016] RENDER DEFERRED CHARACTER NULL
  13674	044072	011502 				MOV	(R5),R2		;;; [5.1015] GET POINTER TO FIRST NODE IN LIST
  13675	044074	010015 				MOV	R0,(R5)		;;; [5.1015] SET NEW PACKET AS NEW FIRST NODE
  13676	044076	010210 				MOV	R2,(R0)		;;; [5.1015] LINK REST OF QUEUE
  13677	044100					CALL	.STDHL		;;; [5.1015] SET THE LINE NUMBER
	044100	004737 	040476'			JSR	PC,.STDHL
  13678	044104	100403 				BMI	55$		;;; [5.1015] BRANCH IF THIS IS A DL-11
  13679	044106					CALL	.DHSTO		;;; [5.1015] START THE MESSAGE UP
	044106	004737 	035034'			JSR	PC,.DHSTO
  13680	044112	000406 				BR	75$		;;; [5.1015] AND EXIT
  13681						;
  13682	044114				55$:
  13683	044114					CALL	.DLSTO		;;; [5.1015] START UP THE DL-11
	044114	004737 	035210'			JSR	PC,.DLSTO
  13684	044120	000403 				BR	75$		;;; [5.1016] AND EXIT
  13685						;
  13686	044122				65$:
  13687	044122	110412 				MOVB	R4,(R2)		;;; [5.1016] SET DEFERRED REQUEST
  13688	044124				70$:
  13689	044124					CALL	.TTSTP		;;; [5.1016] FORCE THE LINE STOP
	044124	004737 	043056'			JSR	PC,.TTSTP
  13690	044130				75$:
  13691	044130	012604 				MOV	(SP)+,R4
  13692	044132	012602 				MOV	(SP)+,R2	;;; [5.1015] RESTORE REGISTERS
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 247-1
TERMINAL DRIVER -- .TTBTW (BREAK-THROUGH WRITE FUNCTION)

  13693	044134	012600 				MOV	(SP)+,R0
  13694	044136					RETURN			;;; [5.1015] AND EXIT
	044136	000207 				RTS	PC
  13695
  13696						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 248
TERMINAL DRIVER -- BLDPKT (BUILD A TERMINAL PACKET)

  13698						.SBTTL	TERMINAL DRIVER -- BLDPKT (BUILD A TERMINAL PACKET)
  13699
  13700					;+
  13701					; BLDPKT -- BUILD A TERMINAL PACKET
  13702					;
  13703					; THIS SUBROUTINE WILL BUILD A TERMINAL OUTPUT LIST ENTRY FOR THE
  13704					; CHARACTER IN R4.
  13705					;
  13706					; INPUTS:
  13707					;
  13708					;	R4 -- CHARACTER TO BE TRANSMITTED
  13709					;
  13710					; OUTPUTS:
  13711					;
  13712					;	R0 -- POINTER TO NEW TERMINAL PACKET
  13713					;-
  13714
  13715	044140				BLDPKT:
  13716	044140	010146 				MOV	R1,-(SP)	;;; [5.1015] SAVE R1
  13717	044142	012701 	000012 			MOV	#12,R1		;;; [5.1016] SET THE NODE SIZE
  13718	044146					CALL	..ALCB		;;; [5.1015] GET A BUFFER
	044146	004737 	045654'			JSR	PC,..ALCB
  13719	044152	103414 				BCS	10$		;;; [5.1015] POOL EXHAUSTED IF CC-C SET
  13720	044154	010046 				MOV	R0,-(SP)	;;; [5.1015] SAVE BUFFER POINTER
  13721	044156	005020 				CLR	(R0)+		;;; [5.1016] GET OVER THE LINKAGE
  13722	044160	010120 				MOV	R1,(R0)+	;;; [5.1016] SET THE NODE SIZE
  13723	044162	011610 				MOV	(SP),(R0)	;;; [5.1016] SET THE DATA ADDRESS
  13724	044164	062720 	000010 			ADD	#10,(R0)+	;;; [5.1016] SO
  13725	044170	012720 	000001 			MOV	#1,(R0)+	;;; [5.1016] SET THE BYTE COUNT
  13726	044174	110410 				MOVB	R4,(R0)		;;; [5.1016] AND NOW THE DATA
  13727	044176	012600 				MOV	(SP)+,R0	;;; [5.1015] RESTORE BUFFER POINTER
  13728	044200	012601 				MOV	(SP)+,R1	;;; [5.1015] RESTORE R1
  13729	044202					RETURN			;;; [5.1015] TO CALLER
	044202	000207 				RTS	PC
  13730	044204				10$:
  13731	044204					.CRASH	BO5		;;; [5.1015] BUFFER OVERFLOW...
	044204	000004 				IOT
	044206	   102 	   117 	   065 		.ASCIZ	/BO5/
	044211	   000
  13732						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 249
TERMINAL DRIVER -- .TTSW2 (FIND OFFSET INTO "STSW2" TABLE)

  13734						.SBTTL	TERMINAL DRIVER -- .TTSW2 (FIND OFFSET INTO "STSW2" TABLE)
  13735
  13736					;+
  13737					; .TTSW2 -- FIND OFFSET INTO "STSW2" TABLE
  13738					;
  13739					; INPUTS:
  13740					;
  13741					;	R5 -- POINTS TO DLS ENTRY FOR THIS LINE
  13742					;
  13743					; OUTPUTS:
  13744					;
  13745					;	R2 -- POINTS TO "STSW2" ENTRY FOR THIS LINE
  13746					;-
  13747
  13748	044212				.TTSW2::
  13749	044212	010502 				MOV	R5,R2		;;; [5.1015] COPY DLS POINTER TO R2
  13750	044214	162702 	003004'			SUB	#TTTBL,R2	;;; [5.1015] FIND OFFSET INTO "STSW2" TABLE
  13751	044220	006202 				ASR	R2
  13752	044222	006202 				ASR	R2		;;; [5.1015] SO
  13753	044224	062702 	005066'			ADD	#STSW2,R2	;;; [5.1015] VOILA!
  13754	044230					RETURN			;;; [5.1015] TO CALLER
	044230	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 250
TERMINAL DRIVER -- .TFXON (FORCE AN XON FOR A LINE)

  13756						.SBTTL	TERMINAL DRIVER -- .TFXON (FORCE AN XON FOR A LINE)
  13757
  13758					;+
  13759					; .TFXON -- FORCE AN XON FOR A LINE
  13760					; .TFXOF -- FORCE AN XOFF FOR A LINE
  13761					;
  13762					; THESE SUBROUTINES WILL FORCE THE INDICATED CHARACTER TO THE LINE IMMEDIATELY
  13763					;
  13764					; INPUTS:
  13765					;
  13766					;	R5 -- POINTS TO DLS ENTRY FOR THE LINE
  13767					;
  13768					; OUTPUTS:
  13769					;
  13770					;	NO REGISTERS ALTERED
  13771					;
  13772					; NOTES:
  13773					;
  13774					;	THIS ROUTINE MUST BE ENTERED AT PRI5 OR HIGHER
  13775					;	THIS ROUTINE ASSUMES THAT THE DEVICE EXISTS
  13776					;	THIS ROUTINE ASSUMES THAT THE DEVICE IS NOT OUTPUT ACTIVE
  13777					;-
  13778
  13779						.ENABL	LSB
  13780
  13781	044232				.TFXON::
  13782	044232	010446 				MOV	R4,-(SP)	;;; [5.1016] SAVE R4
  13783	044234	012704 	000021 			MOV	#C.HXON,R4	;;; [5.1016] SET THE XON CHARACTER
  13784	044240	000403 				BR	10$		;;; [5.1016] DO COMMON CODE
  13785						;
  13786	044242				.TFXOF::
  13787	044242	010446 				MOV	R4,-(SP)	;;; [5.1016] SAVE R4
  13788	044244	012704 	000223 			MOV	#C.HPAR!C.HXOF,R4	;;; [EDIT ?] SET THE XOFF CHARACTER
  13789	044250				10$:
  13790	044250					CALL	.TTBTW		;;; [5.1016] FORCE IT OUT
	044250	004737 	044042'			JSR	PC,.TTBTW
  13791	044254	012604 				MOV	(SP)+,R4	;;; [5.1016] RESTORE R4
  13792	044256					RETURN			;;; [5.1016] TO CALLER
	044256	000207 				RTS	PC
  13793
  13794						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO M1113  03-APR-86 18:57  PAGE 252
TERMINAL DRIVER -- .TFXON (FORCE AN XON FOR A LINE)

  13797
  13798
  13799
  13800						.TITLE	SCOMM	- COMMON DATA AND SUBROUTINES
  13801						.SBTTL	SYSTEM COMMON SUBROUTINES -- COPYRIGHT STATEMENT
  13802	044260					IDENT$	14,32,RSX$$F
						.IDENT	/B14320/
  13803					;
  13804					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
  13805					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
  13806					;			ALL RIGHTS RESERVED.
  13807					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
  13808					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
  13809					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
  13810					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
  13811					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
  13812					;
  13813					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
  13814					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
  13815					;       CORPORATION.
  13816					;
  13817					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
  13818					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
  13819					;
  13820					;		MODULE: "SCOMM"
  13821					;		VERSION: 14-32
  13822					;		AUTHOR: R. MCLEAN
  13823					;		DATE: 19 JUL 75
  13824					;
  13825					;
  13826					;	MODIFICATIONS:
  13827					;
  13828					;	THIS MODULE CONTAINS:
  13829					;
  13830					;	1 -- THIS MODULE CONTAINS SYSTEM COMMON MODULES AND TABLES
  13831					;
  13832					;	NO.	DATE		PROGRAMMER	PURPOSE
  13833					;	---	----		----------	-------
  13834					;	001	27-JUL-76	J. MASSE	CHANGE 'LBNL' FOR DX0 & DX1
  13835					;						FROM 496. TO 494.
  13836					;	002	8-AUG-76	J. MASSE	CHANGE VERSION NO. TO 004A
  13837					;	003	9-AUG-76	J. MASSE	ADD KLINIK HOOKS
  13838					;	004	20-OCT-76	A. PECKHAM	ADD DORBELL COUNTER
  13839					;	005	20-OCT-76	A. PECKHAM	CHANGE VERSION NO. TO 006A
  13840					;	006	03-FEB-77	R. BELANGER	ADD GENERALIZED DL11E
  13841					;						SERVICE AND NEW KLINIK
  13842					;						HOOKS AND HANDLES
  13843					;	007	07-MAR-77	A. PECKHAM	FIXED BUG  IN ..STTY
  13844					;	008	14-MAR-77	R. BELANGER	CONDITIONALLY REMOVE
  13845					;						SUPPORT FOR DTE20 DIRECTIVES
  13846					;						ADD CODE FOR DYNAMIC ALLOCATION
  13847					;						OF .BGBUF AND .FREPL
  13848					;	009	15-JUL-77	R. BELANGER	ADD AUTO BAUD SUPPORT
  13849					;	010	02-SEP-77	R. BELANGER	XON/XOFF BUG FIX
  13850					; TCO 4.2047	18-OCT-78	R. BELANGER	FIX ..STTY TO NOT QUEUE
  13851					;   						OUTPUT FOR NON-EX LINES
  13852					; TCO 4.2096	30-NOV-78	R. BELANGER	FIX "..STPT" TO INSURE DEQUEUE
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 252-1
SYSTEM COMMON SUBROUTINES -- COPYRIGHT STATEMENT

  13853					;						OF TRUNCATED PACKET AT OUTPUT DONE
  13854					; TCO 4.2107	06-DEC-78	R. BELANGER	ADD ".KACFL" FLAG FOR NEW
  13855					;						KEEP-ALIVE ERROR PROCESSING
  13856					; TCO 4.2208	08-MAR-79	R. BELANGER	FIX BUG IN "..STIN" TO DISALLOW
  13857					;						ACCESS TO KL MEMORY DURING
  13858					;						PROTOCOL PAUSE.
  13859					; TCO 4.2212	08-MAR-79	R. BELANGER	MOVE DATABASE TO FE STATUS BLOCK
  13860					; TCO 4.2216	16-MAR-79	R. BELANGER	ALLOW DTE-20 TO RUN AT FULL SPEED
  13861					; TCO 4.2217	19-MAR-79	R. BELANGER	RETRY ALL EBUS PARITY ERRORS AND
  13862					;						SNAPSHOT ALL FAILURES
  13863					; TCO 4.2265	23-MAY-79	R. BELANGER	FIX KLINIK BUG
  13864					; TCO 5.1008	11-OCT-79	R. BELANGER	ADD EBUS PARITY ERROR AND DEX
  13865					;						ERROR LOGGING
  13866					; TCO 5.1015	23-OCT-79	R. BELANGER	ADD NEW TERMINAL INPUT CONTROL
  13867					; TCO 4.1.1013	12-NOV-79	R. BELANGER	FIX CORE ALLOCATOR BUG FOR
  13868					;						NEGATIVE BYTE COUNT
  13869					; TCO 4.1.1035	16-NOV-79	R. BELANGER	ADD QUEUE ARBITRATION MECHANISM
  13870					; TCO 4.1.1065	07-JAN-80	R. BELANGER	DON'T RETRY DEX ERRORS
  13871					; TCO 4.1.1104	05-MAR-80	R. BELANGER	FIX BUG IN CORE ALLOCATOR
  13872					; TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
  13873					; TCO 4.1.1137	05-APR-80	R. BELANGER	LIMIT TO-10 QUEUE NODE TO 60 BYTES
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 253
SYSTEM COMMON SUBROUTINES -- COPYRIGHT STATEMENT

  13875					; MACRO LIBRARY CALLS
  13876					;
  13877						.MCALL	.CRASH,DIR$,DMYG$
  13878						.MCALL	MTPI,MFPI,MTPS,MFPS,CALL,RETURN,.INH5,.ENB5
  13879						.MCALL	$DEF,F11DF$
  13880						.MCALL	.INH0,.ENB0,WSIG$S
  13881						.MCALL	.ENB,.INH,.ENB6,.INH6
  13882	044260					$DEF
  13883	044260					F11DF$
  13884
  13885					;	MSETRP == 1
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 254
SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)

  13887						.SBTTL	SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)
  13888
  13889	044260				BITTBL::
  13890	044260	000001 				.WORD	1
  13891	044262	000002 				.WORD	2
  13892	044264	000004 				.WORD	4
  13893	044266	000010 				.WORD	10
  13894	044270	000020 				.WORD	20
  13895	044272	000040 				.WORD	40
  13896	044274	000100 				.WORD	100
  13897	044276	000200 				.WORD	200
  13898	044300	000400 				.WORD	400
  13899	044302	001000 				.WORD	1000
  13900	044304	002000 				.WORD	2000
  13901	044306	004000 				.WORD	4000
  13902	044310	010000 				.WORD	10000
  13903	044312	020000 				.WORD	20000
  13904	044314	040000 				.WORD	40000
  13905	044316	100000 				.WORD	100000
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 255
SCOMM MODULE -- .CEFN   (CONVERT EFN)

  13907						.SBTTL	SCOMM MODULE -- .CEFN   (CONVERT EFN)
  13908
  13909					;+
  13910					; .CEFN -- SUBROUTINE TO CONVERT AN EVENT FLAG NUMBER INTO A FORM SUCH THAT
  13911					;	   IT MAY BE READ, SET, AND CLEARED VIA "BIT", "BIS", AND "BIC" INSTRUCTIONS.
  13912					;
  13913					; ALTERNATE ENTRY POINT ".CEFN3" THAT DETERMINES EFN WITHOUT DOING
  13914					; MOVE FROM PREVIOUS (MFPS)
  13915					;
  13916					; ENTRY CONDITIONS:
  13917					;
  13918					;	R1 -- ADDRESS OF A WORD CONTAINING
  13919					;	R3 -- EFN NUMBER (FOR .CEFN3 ENTRY ONLY)
  13920					;	      THE EVENT FLAG NUMBER, AND THE EFN CAN BE FETCHED
  13921					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
  13922					;
  13923					; CALLING SEQUENCE:
  13924					;
  13925					;	CALL	.CEFN
  13926					;
  13927					;	- OR -
  13928					;
  13929					;	CALL	.CEFN3
  13930					;
  13931					; EXIT CONDITIONS:
  13932					;
  13933					;	R3 -- BIT MASK SELECTING FLAG IN WORD
  13934					;	R2 -- ADDRESS OF WORD CONTAINING THE FLAG
  13935					;
  13936					;	IF AN EVENT FLAG IS NOT SPECIFIED (EFN=0),
  13937					;	BOTH R2 & R3 ARE RETURNED ZERO.
  13938					;
  13939					;	CONDITION CODES ARE SET PER "TST R3" AT RETURN
  13940					;
  13941					;	IF EFN IS OUT OF RANGE (<0 OR >64.) CONTROL IS TRANSFERRED
  13942					;	TO DIRECTIVE ERROR STATUS 'E.97'.
  13943					;
  13944					; REGISTERS ALTERED:
  13945					;
  13946					;	R2,R3
  13947					;-
  13948
  13949	044320				.CEFN::
  13950	044320	005002 				CLR	R2		; (CLEARED FOR DIVIDE AND ERROR RETURN)
  13951	044322					MFPS	@R1,R3
	044322	011103 				MOV	@R1,R3
  13952	044324				.CEFN3::
  13953	044324	042703 	177400 			BIC	#177400,R3
  13954	044330	001423 				BEQ	20$		; EFN=0 -- NO FLAG SPECIFIED
  13955	044332	020327 	000100 			CMP	R3,#64.		; IS EFN IN RANGE: 0-64.?
  13956	044336	101022 				BHI	X8X97		; NO -- RETURN STS=-97
  13957	044340	005303 				DEC	R3		; YES -- CONVERT EFN TO INDEX (0,2,4,6)
  13958									; IN R2, AND FLAG MASK IN R3.
  13959	044342					CALL	DIV216		; DIVIDE R2 BY 16
	044342	004737 	045274'			JSR	PC,DIV216
  13960	044346	006302 				ASL	R2
  13961	044350	006303 				ASL	R3		; FIND BIT MASK
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 255-1
SCOMM MODULE -- .CEFN   (CONVERT EFN)

  13962	044352	016303 	044260'			MOV	BITTBL(R3),R3
  13963	044356	020227 	000004 			CMP	R2,#4		; FLAG IN RANGE 33-64?
  13964	044362	002403 				BLT	10$
  13965	044364	062702 	001004'			ADD	#.COMEF-4,R2	; YES -- SET R2 TO ADDRESS OF WORD IN
  13966	044370	000403 				BR	20$		; SCOMM (COMMON EVENT FLAGS)
  13967						;
  13968	044372				10$:
  13969	044372	060502 				ADD	R5,R2		; NO -- SET R2 TO ADDRESS OF WORD IN
  13970	044374	062702 	000020 			ADD	#A.EF,R2	; ATL NODE (TASK'S EVENT FLAGS)
  13971	044400				20$:
  13972	044400	005703 				TST	R3		; SET CONDITION CODES
  13973	044402					RETURN
	044402	000207 				RTS	PC
  13974
  13975	044404				X8X97::
  13976	044404	104637 				TRAP	DE.97
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 256
SCOMM MODULE -- .CKDEL  (CLOCK DELETE)

  13978						.SBTTL	SCOMM MODULE -- .CKDEL  (CLOCK DELETE)
  13979
  13980					;+
  13981					; .CKDEL -- SUBROUTINE TO REMOVE AN ENTRY FORM THE CLOCK LIST
  13982					;
  13983					; ENTRY CONDITIONS:
  13984					;
  13985					;	R4 -- POINTER TO ENTRY TO BE REMOVED
  13986					;
  13987					; CALLING SEQUENCE:
  13988					;
  13989					;	CALL	.CKDEL
  13990					;
  13991					; EXIT CONDITIONS:
  13992					;
  13993					;	NO ERROR CONDITIONS
  13994					;
  13995					;	REGISTERS ALTERED: NONE
  13996					;-
  13997
  13998						.ENABL	LSB
  13999
  14000	044406				.CKDEL::
  14001	044406	010446 				MOV	R4,-(SP)	; SAVE REGISTERS
  14002	044410	010546 				MOV	R5,-(SP)
  14003	044412	010405 				MOV	R4,R5
  14004	044414	062705 	000014 			ADD	#C.SZ,R5	; LOOK AT THE NEXT ENTRY
  14005	044420				10$:
  14006	044420	012524 				MOV	(R5)+,(R4)+	; NO -- MOVE AN ENTRY UP
  14007	044422	001406 				BEQ	30$		; END OF TABLE
  14008	044424	012524 				MOV	(R5)+,(R4)+
  14009	044426	012524 				MOV	(R5)+,(R4)+
  14010	044430	012524 				MOV	(R5)+,(R4)+
  14011	044432	012524 				MOV	(R5)+,(R4)+
  14012	044434	012524 				MOV	(R5)+,(R4)+
  14013	044436	000770 				BR	10$		; TRY AGAIN
  14014						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 257
SCOMM MODULE -- .CKDEL  (CLOCK DELETE)

  14050
  14051	044440				30$:
  14052	044440	005024 				CLR	(R4)+		; INSURE LAST ENTRY 0
  14053	044442	012605 				MOV	(SP)+,R5	; RESTORE
  14054	044444	012604 				MOV	(SP)+,R4
  14055	044446					RETURN			; RETURN TO CALLER
	044446	000207 				RTS	PC
  14057
  14058						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 258
SCOMM MODULE -- ..ERLG	(ERROR LOGGING)

  14060						.SBTTL	SCOMM MODULE -- ..ERLG	(ERROR LOGGING)
  14061
  14062					;+
  14063					; ..ERLG -- GENERAL ERROR LOGGING ROUTINE
  14064					;
  14065					; THIS SUBROUTINE WILL TRANSMIT ENTRIES IN A PARTICULAR ERROR LOGGING QUEUE
  14066					; TO THE KL.  THE FORMAT FOR AN ERROR LOGGING QUEUE LISTHEAD IS:
  14067					;
  14068					;	.WORD	ADDR		; ADDRESS OF FIRST NODE IN QUEUE
  14069					;	.WORD	COUNT		; COUNT OF NODES IN QUEUE
  14070					;
  14071					; INPUTS:
  14072					;
  14073					;	R3 -- DEVICE CODE FOR DEVICE TO BE ERROR LOGGED
  14074					;	R4 -- ADDRESS OF ERROR LOG QUEUE LISTHEAD
  14075					;
  14076					; OUTPUTS:
  14077					;
  14078					;	R0,R1,R2 -- CLOBBERED
  14079					;
  14080					; NOTE:
  14081					;
  14082					;	THIS ROUTINE MUST BE CALLED FROM TASK LEVEL
  14083					;-
  14084
  14085	044450				..ERLG::
  14086	044450	005737 	001012'			TST	.COMEF+2	; [4.1.1105] IS PRIMARY PROTOCOL RUNNING??
  14087	044454	100034 				BPL	40$		; [4.1.1105] NO -- JUST EXIT
  14088	044456	011400 				MOV	(R4),R0		; [5.1008] ANYTHING THERE??
  14089	044460	001432 				BEQ	40$		; [5.1008] NO -- EXIT
  14090	044462	032020 				BIT	(R0)+,(R0)+	; [5.1008] YES -- MOVE OVER THE LISTHEAD
  14091	044464	012702 	000001 			MOV	#1,R2		; [5.1008] SET UP EVENT FLAG
  14092	044470	012701 	100007 			MOV	#BC.HDS+BIT15,R1 ; [5.1008] SET UP FUNCTION CODE
  14093	044474					CALL	..STIN		; [5.1008] LOG THE ERROR
	044474	004737 	047104'			JSR	PC,..STIN
  14094	044500	103413 				BCS	30$		; [5.1008] ERROR IF CC-C IS SET
  14095	044502	013701 	001006'			MOV	.CRTSK,R1	; [5.1008] POINT TO CURRENT TASK
  14096	044506				10$:
  14097	044506	030261 	000020 			BIT	R2,A.EF(R1)	; [5.1008] HAS THE EVENT FLAG SET??
  14098	044512	001004 				BNE	20$		; [5.1008] YES -- GO ON
  14099	044514					WSIG$S			; [5.1008] NO -- WAIT A CLOCK TICK
	044514	012746 				MOV	(PC)+,-(SP)
	044516	   061 	   001 			.BYTE	49.,1
	044520	104375 				EMT	375
  14100	044522	000771 				BR	10$		; [5.1008] AND TRY AGAIN
  14101						;
  14102	044524				20$:
  14103	044524	040261 	000020 			BIC	R2,A.EF(R1)	; [5.1008] CLEAR THE EVENT FLAG
  14104	044530				30$:
  14105	044530	034040 				BIT	-(R0),-(R0)	; [5.1008] BACK OVER THE LISTHEAD
  14106	044532	011014 				MOV	(R0),(R4)	; [5.1008] REMOVE FROM LIST
  14107	044534	005364 	000002 			DEC	2(R4)		; [5.1008] COUNT THIS NODE OUT
  14108	044540					CALL	..DECN		; [5.1008] AND DEQUEUE THE NODE
	044540	004737 	046004'			JSR	PC,..DECN
  14109	044544	000741 				BR	..ERLG		; [5.1008] AND SEE ABOUT OTHER ERRORS
  14110						;
  14111	044546				40$:
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 258-1
SCOMM MODULE -- ..ERLG	(ERROR LOGGING)

  14112	044546					RETURN			; [5.1008] TO CALLER
	044546	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 259
SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)

  14114						.SBTTL	SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)
  14115
  14116					;+
  14117					;
  14118					; ..IODN -- SUBROUTINE TO COMPLETE THE USER'S I/O
  14119					;	    REQUEST.  ..IODN SETS TWO WORDS OF
  14120					;	    THE I/O STATUS BLOCK IN THE USER'S AREA AND
  14121					;	    AN EVENT FLAG (IF SPECIFIED) IS SET.
  14122					;	    THE REQUEST NODE IS RETURNED TO THE POOL .
  14123					;
  14124					; JUST BEFORE ..IODN EXITS IT DECLARES A SIG EVENT TO INFORM THE
  14125					; SYSTEM THAT SOME I/O IS COMPLETE AND IF POSSIBLE A TASK MAY BE RESTARTED.
  14126					;
  14127					; CALLING SEQUENCE:
  14128					;
  14129					;		R1 -- REQUEST NODE ADDRESS
  14130					;		R3 -- I/O STATUS BLOCK WD. 00
  14131					;		R4 -- I/O STATUS BLOCK WD. 01.
  14132					;
  14133					;		CALL	..IODN
  14134					;-
  14135
  14136	044550				..IODN::
  14137	044550	010046 				MOV	R0,-(SP)	; SAVE THE REGISTERS
  14138	044552	010446 				MOV	R4,-(SP)
  14139									; STATUS SO THAT THEY CAN BE SET BY BLXO
  14140	044554	010346 				MOV	R3,-(SP)
  14141	044556	010604 				MOV	SP,R4		; POINT TO THE TWO VALUES FOR I/O STATUS BLOCK
  14142	044560	010246 				MOV	R2,-(SP)
  14143	044562	012703 	000004 			MOV	#4,R3		; SET UP TO MOVE 4 BYTES
  14144	044566	016102 	000016 			MOV	R.SB(R1),R2
  14145	044572	001402 				BEQ	10$		; SKIP IF NO STATUS BLOCK
  14146	044574					CALL	..BLXO		; MOVE THE TWO WORDS
	044574	004737 	050332'			JSR	PC,..BLXO
  14147	044600				10$:
  14148	044600	012602 				MOV	(SP)+,R2	; RESTORE R2
  14149	044602	012603 				MOV	(SP)+,R3
  14150	044604	116100 	000013 			MOVB	R.FN(R1),R0	; PICKUP EVENT FLAG NUMBER
  14151	044610	001404 				BEQ	20$		; DON'T TRY TO SET IF NO FLAG
  14152	044612	016104 	000006 			MOV	R.AT(R1),R4	; FIND THE ATL NODE ADDRESS
  14153	044616					CALL	..SEFN		; SET THE EVENT FLAG
	044616	004737 	045212'			JSR	PC,..SEFN
  14154	044622				20$:
  14155	044622					CALL	..DSEV		;  DECLARE A SIGNIFICANT EVENT
	044622	004737 	045264'			JSR	PC,..DSEV
  14156	044626	016104 	000020 			MOV	R.AS(R1),R4	; AST ADDRESS?
  14157	044632	001406 				BEQ	30$		; NO -- FORGET IT
  14158	044634	010546 				MOV	R5,-(SP)	; SAVE R5
  14159	044636	016105 	000006 			MOV	R.AT(R1),R5	; SET UP THE ATL ADDRESS
  14160	044642					CALL	.STAST		; START AST (NOTE -- CAN'T FAIL)!!
	044642	004737 	016160'			JSR	PC,.STAST
  14161	044646	012605 				MOV	(SP)+,R5	; RESTORE R5
  14162	044650				30$:
  14163	044650	010100 				MOV	R1,R0		; SET UP NODE ADDRESS
  14164	044652	012701 	000040 			MOV	#32.,R1		; SET UP SIZE OFNODE
  14165	044656					CALL	..DECB		; DEALLOCATE CORE BUFFER
	044656	004737 	046010'			JSR	PC,..DECB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 259-1
SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)

  14166	044662	012604 				MOV	(SP)+,R4
  14167	044664	012600 				MOV	(SP)+,R0
  14168	044666					RETURN
	044666	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 260
SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)

  14170						.SBTTL	SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)
  14171
  14172					;+
  14173					; ..DQRN -- ROUTINE TO PICK A REQEST NODE FROM PUD
  14174					;
  14175					; THE NODE ON THE TOP IF THE QUEUE (HIGHEST PRIORITY) IS
  14176					; PICKED FROM THE QUEUE AND RETURNED TO THE HANDLER TASK.
  14177					;
  14178					; IF NO NODE CAN BE FOUND ..DQRN RETURNS WITH THE CONDITION CODES
  14179					; SET TO INDICATE FAILURE TO PICK A NODE.
  14180					;
  14181					; TASK SWITCHING IS INHIBITED DURING THE SCAN OF THE DEQUE TO PREVENT
  14182					; ..IPRI FROM INSERTING A NODE INTO THE LIST WHILE ONE IS BEING REMOVED.
  14183					;
  14184					; CALLING SEQUENCE:
  14185					;
  14186					;	R0 -- ASCII 2 CHARACTER DEVICE NAME
  14187					;
  14188					;	CALL	..DQRN
  14189					;
  14190					; EXIT CONDITIONS:
  14191					;
  14192					;	R0 -- PUD ADDRESS OF NODE PICKED+U.RF
  14193					;	R1 -- ADDRESS OF REQUEST NODE OR UNDEFINED IF NO NODE FOUND
  14194					;	R2 -- UNIT NUMBER
  14195					;	R3 -- BYTE COUNT
  14196					;	R4 -- HIGH ORDER ADDRESS (BITS 4,5)
  14197					;	R5 -- LOW ORDER ADDRESS
  14198					;
  14199					;	CC -- C BIT SET IF NO NODE FOUND
  14200					;	CC -- C BIT CLEAR IF NODE FOUND
  14201					;
  14202					;	EVENT FLAG EF.NIR CLEARED IF NO NODE FOUND
  14203					;	EVENT FLAG EF.NIR SET IF NODE FOUND
  14204					;-
  14205
  14206	044670				..DQRN::
  14207	044670	013701 	001006'			MOV	.CRTSK,R1	; CLEAR THE EVENT FLAG OF THE HANDLER
  14208	044674	042761 	000010 	000020 		BIC	#EF.NIR,A.EF(R1)
  14209	044702	012704 	010262'			MOV	#.PUDBA,R4	; FIND THE LOGICAL UNIT NUMBER
  14210	044706				10$:
  14211	044706	020014 				CMP	R0,@R4		; FIND THE POINTER TO THIS LUN
  14212	044710	001403 				BEQ	20$		; FOUND CORRECT LUN
  14213	044712	062704 	000050 			ADD	#U.SZ,R4	; POINT TO NEXT LUN
  14214	044716	000773 				BR	10$		; AND TRY AGAIN
  14215						;
  14216	044720				20$:
  14217	044720	062704 	000022 			ADD	#U.RF,R4	; NO -- DEQUE FIRST NODE
  14218	044724					.INH0			;; INHIBIT TASK SWITCHING
	044724	013746 	177776 			MOV	@#PS,-(SP)
	044730	112737 	000140 	177776 		MOVB	#140,@#PS
  14219	044736				30$:
  14220	044736	010446 				MOV	R4,-(SP)	;; SAVE ADDRESS
  14221	044740					CALL	..PICK		;; PICK A NODE IF POSSIBLE
	044740	004737 	045476'			JSR	PC,..PICK
  14222	044744	103011 				BCC	40$		;; POSSIBLE -- CONTINUE
  14223	044746	012604 				MOV	(SP)+,R4	;; RESTORE PUD ADDRESS
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 260-1
SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)

  14224	044750	062704 	000050 			ADD	#U.SZ,R4	;; LOOK AT NEXT ENTRY
  14225	044754	026464 	177756 	177706 		CMP	-U.RF(R4),-U.RF-U.SZ(R4) ; CHECK DEVICE NAME
  14226	044762	001765 				BEQ	30$
  14227	044764	005216 				INC	@SP		;; SET CARRY
  14228	044766	000466 				BR	65$		;; AND RETURN
  14229						;
  14230	044770				40$:
  14231	044770	010401 				MOV	R4,R1		;; SET UP NODE ADDRESS FOR RETURN
  14232	044772	016102 	000004 			MOV	R.TD(R1),R2	;; YES -- CHHANGE THE DISK ADDRESS
  14233	044776	013704 	001006'			MOV	.CRTSK,R4	;; SET THE EVENT FLAG
  14234	045002	016105 	000014 			MOV	R.FC(R1),R5	;; FIND THE FUNCTION CODE
  14235	045006	020527 	001400 			CMP	R5,#IO.ATT	;; ATTACH FUNCTION??
  14236	045012	001457 				BEQ	70$		;; YES -- HANDLE ATTACH HERE
  14237	045014	020527 	002000 			CMP	R5,#IO.DET	;; NO -- DETACH ??
  14238	045020	001470 				BEQ	80$		;; YES -- HANDLE HERE
  14239	045022	022705 	001010 			CMP	#IO.LOV,R5	;; NO -- IS THE FUNCTION CODE LOAD OVERLAY??
  14240	045026	001013 				BNE	50$		;; NO -- PROCEED
  14241	045030	066261 	000034 	000034 		ADD	S.DL+2(R2),R.PB+10(R1)
  14242	045036	005561 	000032 			ADC	R.PB+6(R1)
  14243	045042	066261 	000032 	000032 		ADD	S.DL(R2),R.PB+6(R1)
  14244	045050				45$:
  14245	045050	012761 	001000 	000014 		MOV	#IO.RLB,R.FC(R1) ; SET FUNCTION CODE TO READ LOGICAL BLOCK
  14246	045056				50$:
  14247	045056	022761 	000050 	000014 		CMP	#IO.LTK,R.FC(R1) ;; IS THIS A LOAD TASK FUNCTION?
  14248	045064	001013 				BNE	60$		;;  PROCEED
  14249	045066	016202 	000012 			MOV	S.BA(R2),R2	;; SET THE CORE ADDRESS
  14256	045072	010261 	000024 			MOV	R2,R.PB(R1)	;; SET CORE ADDRESS
  14257	045076	016102 	000006 			MOV	R.AT(R1),R2	;; FIND THE ATL NODE ADDRESS
  14258	045102	062702 	000030 			ADD	#A.FM+4,R2	;; SET I/O STATUS WORD TO POINT TO A.FM+4
  14259	045106	010261 	000016 			MOV	R2,R.SB(R1)	;;
  14260	045112	000756 				BR	45$		;; CHANGE FUNCTION TO READ
  14261						;
  14262	045114				60$:
  14263	045114	052764 	000010 	000020 		BIS	#EF.NIR,A.EF(R4) ;; FOR DQ NORMAL
  14264	045122	016103 	000026 			MOV	R.PB+2(R1),R3	;; FIND THE SIZE OF THE XFER
  14265	045126	016102 	000024 			MOV	R.PB(R1),R2	;; SET UP FOR VALIDATE
  14266	045132					CALL	..VXFR		;; VALIDATE XFER
	045132	004737 	050312'			JSR	PC,..VXFR
  14267	045136	012600 				MOV	(SP)+,R0	;; FIND THE PUD ADDRESS
  14268	045140	116002 	177760 			MOVB	U.UN-U.RF(R0),R2 ;; SET UNIT NUMBER ON STACK
  14269	045144				65$:
  14270	045144					.ENB0			;; ENABLE INTERRUPTS
	045144	004737 	045540'			JSR	PC,..ENB0
  14271	045150					RETURN			; NO -- RETURN
	045150	000207 				RTS	PC
  14272	045152				70$:
  14273	045152	012604 				MOV	(SP)+,R4	;; RESTORE PUD ADDRESS
  14274	045154	016164 	000006 	177772 		MOV	R.AT(R1),U.AF-U.RF(R4)	;; SET ATTACH FLAG
  14275	045162				75$:
  14276	045162					.ENB0			;; ENABLE TASK SWITCHING
	045162	004737 	045540'			JSR	PC,..ENB0
  14277	045166	012703 	000001 			MOV	#1,R3		; RETURN +1 STATUS
  14278	045172	005004 				CLR	R4
  14279	045174					CALL	..IODN
	045174	004737 	044550'			JSR	PC,..IODN
  14280	045200	000633 				BR	..DQRN		; DEQUEUE AGAIN
  14281						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 260-2
SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)

  14282	045202				80$:
  14283	045202	012604 				MOV	(SP)+,R4	;; RESTORE PUD ADDRESS
  14284	045204	005064 	177772 			CLR	U.AF-U.RF(R4)	;; CLEAR ATTACH
  14285	045210	000764 				BR	75$		;; AND RETURN I/O DONE STATUS
  14286						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 261
SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)

  14288						.SBTTL	SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)
  14289
  14290					;+
  14291					; ..SEFN -- SUBROUTINE TO SET AN EVENT FLAG FOR A HANDLER TASK.
  14292					;	    THIS IS A GENERAL ROUTINE TO SET ANY EVENT FLAG AND
  14293					;	    MAY BE USED BY A HANDLER TASK AT INTERRUPT LEVEL.
  14294					;	    THE MAIN PURPOSE OF THIS ROUTINE IS TO
  14295					;	    SET THE REQUESTOR'S EVENT FLAG FOR ..IODN.
  14296					;
  14297					; CALLING SEQUENCE:
  14298					;
  14299					;	R0 -- EVENT FLAG NUMBER 1-64
  14300					;	R4 -- ACTIVE TASK LIST ENTRY
  14301					;
  14302					;	CALL	..SEFN
  14303					;-
  14304
  14305	045212				..SEFN::
  14306	045212	010246 				MOV	R2,-(SP)	; SAVE USED REGISTERS
  14307	045214	010346 				MOV	R3,-(SP)
  14308	045216	010003 				MOV	R0,R3		;
  14309	045220	005303 				DEC	R3		; DECREMENT FOR 1 LESS THAN COUNT
  14310									; CONVERT EFN TO INDEX AND
  14311	045222					CALL	DIV216		; FLAG MASK
	045222	004737 	045274'			JSR	PC,DIV216
  14312	045226	006302 				ASL	R2
  14313	045230	006303 				ASL	R3		; FIND BIT MASK ADDRESS
  14314	045232	020227 	000004 			CMP	R2,#4		; TEST FOR COMMON SET
  14315	045236	002403 				BLT	10$		; NO -- FLAGS IN ATL
  14316	045240	062702 	001004'			ADD	#.COMEF-4,R2	; YES -- POINT TO COMMON FLAGS
  14317	045244	000403 				BR	20$
  14318						;
  14319	045246				10$:
  14320	045246	060402 				ADD	R4,R2		; POINT TO ATL SET
  14321	045250	062702 	000020 			ADD	#A.EF,R2
  14322	045254				20$:
  14323	045254	056312 	044260'			BIS	BITTBL(R3),@R2	; SET EVENT FLAGS
  14324	045260	012603 				MOV	(SP)+,R3
  14325	045262	012602 				MOV	(SP)+,R2
  14326					;	BR	..DSEV		; DECLARE A SIGNIFICANT EVENT
  14327						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 262
SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)

  14329						.SBTTL	SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)
  14330
  14331					;+
  14332					; ..DSEV -- COMMON ROUTINE TO DECLARE A SIGNIFICANT EVENT
  14333					;
  14334					; INPUTS:
  14335					;
  14336					;	SPECIFIC EVENT MUST BE DECLARED BY CALLER
  14337					;
  14338					; OUTPUTS:
  14339					;
  14340					;	NO REGISTERS ALTERED
  14341					;-
  14342
  14343	045264				..DSEV::
  14344	045264	152737 	000001 	001014'		BISB	#EV.SE,.SERFG+0	; DECLARE SIGNIFIGANT EVENT
  14345	045272					RETURN			; RETURN
	045272	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 263
SCOMM MODULE -- DIV216   (DIV R2 BY 16)

  14347						.SBTTL	SCOMM MODULE -- DIV216   (DIV R2 BY 16)
  14348
  14349					;+
  14350					; DIV216 -- SUBROUTINE TO SIMULATE A HARDWARE
  14351					;	    DIVIDE INSTRUCTION (DIV #16,R2)
  14352					;
  14353					; CALLING SEQUENCE:
  14354					;
  14355					;	R3 -- NUMBER TO BE DIVIDED BY 16
  14356					;
  14357					;	CALL	DIV216
  14358					;
  14359					; EXIT CONDITIONS:
  14360					;
  14361					;	R3 -- REMAINDER
  14362					;	R2 -- QUOTIENT
  14363					;-
  14364
  14365	045274				DIV216::
  14366	045274	010302 				MOV	R3,R2		; FIND THE REMAINDER
  14367	045276	042703 	177760 			BIC	#177760,R3	; MASK OFF THE REMAINDER
  14368	045302	006002 				ROR	R2		; DIVIDE R2 BY 2
  14369	045304	006002 				ROR	R2		; AGAIN
  14370	045306	006002 				ROR	R2		; AND AGAIN
  14371	045310	006002 				ROR	R2		; NOW HAVE DONE IT BY 16.
  14372	045312	042702 	170000 			BIC	#170000,R2	; MASK OFF JUNK PROPIGATED BY ROR
  14373	045316					RETURN			; RETURN TO CALLER
	045316	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 264
SCOMM MODULE -- ..NDEL	(NODE DELETE)

  14375						.SBTTL	SCOMM MODULE -- ..NDEL	(NODE DELETE)
  14376
  14377					;+
  14378					; ..NDEL -- ROUTINE TO DELETE A NODE FROM A LIST
  14379					;
  14380					;	THIS IS A BASIC SUBROUTINE TO DELETE NODES FROM A LIST.
  14381					;	IT DOES NOT DO ANY ACCOUNTING OR LOOKING THE NODE.  IT ASSUMES
  14382					;	THAT THERE IS A NODE TO BE PICKED AND INHIBITS INTERRUPTS TO
  14383					;	PREVENT CONFLICTS WITH NODES BEING ADDED TO A DEQUE.
  14384					;
  14385					;	CALLING SEQUENCE:
  14386					;
  14387					;		R4 -- POINTER TO NODE TO BE DELETED
  14388					;
  14389					;		CALL	..NDEL
  14390					;-
  14391
  14392	045320				..NDEL::
  14393	045320	010146 				MOV	R1,-(SP)	; SAVE R1
  14394	045322					.INH6			; INHIBIT ALL INTERRUPTS
	045322	013746 	177776 			MOV	@#PS,-(SP)
	045326	112737 	000300 	177776 		MOVB	#300,@#PS
  14395	045334	011401 				MOV	@R4,R1		;;; PICK THE NODE
  14396	045336	010174 	000002 			MOV	R1,@2(R4)	;;;
  14397	045342	016461 	000002 	000002 		MOV	2(R4),2(R1)	;;;
  14398	045350					.ENB6			;;; ENABLE INTERRUPTS
	045350	012637 	177776 			MOV	(SP)+,@#PS
  14399	045354	012601 				MOV	(SP)+,R1	; RESTORE R1
  14400	045356					RETURN			; RETURN TO CALLER
	045356	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 265
SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)

  14402						.SBTTL	SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)
  14403
  14404					;+
  14405					; ..IPRI -- ROUTINE TO INSERT A NODE BY PRIORITY
  14406					;
  14407					;	THIS ROUTINE WILL SEARCH A QUEUE (TASK SWITCHING INHIBITED)
  14408					;	AND INSERT A NODE IN IT'S CORRECT PRIORITY POSITION.  IF THERE
  14409					;	IS A NODE IN THE LIST WITH THE SAME PRIORITY AS THE ONE TO BE
  14410					;	INSERTED THE NEW NODE WILL COME AFTER THE OTHER NODES WITH THE
  14411					;	SAME PRIORITY (FIFO).
  14412					;
  14413					;	..IPRI EXPECTS THE NODE TO HAVE A PRIORITY IN THE COMMON NODE
  14414					;	PRIORITY POSITION.
  14415					;
  14416					; CALLING SEQUENCE:
  14417					;
  14418					;	R1 -- NODE ADDRESS
  14419					;	R2 -- LIST HEAD
  14420					;
  14421					;	CALL	..IPRI
  14422					;-
  14423
  14424	045360				..IPRI::
  14425	045360	010446 				MOV	R4,-(SP)	; SAVE R4
  14426	045362	010204 				MOV	R2,R4		; PICK UP THE POINTER TO THE LIST HEAD
  14427	045364					.INH0			; INHIBIT ALL INTERRUPTS DURING SCAN
	045364	013746 	177776 			MOV	@#PS,-(SP)
	045370	112737 	000140 	177776 		MOVB	#140,@#PS
  14428	045376				10$:
  14429	045376	011404 				MOV	@R4,R4		;; PICK UP THE FIRST NODE
  14430	045400	020402 				CMP	R4,R2		;; END OF THE SCAN?
  14431	045402	001404 				BEQ	20$		;; YES -- INSERT THE NODE
  14432	045404	126461 	000010 	000010 		CMPB	N.PR(R4),N.PR(R1) ;; NO -- LOOK AT THE PRIORITIES
  14433	045412	103371 				BHIS	10$		;; NO MATCH TRY AGAIN
  14434	045414				20$:
  14435	045414	016404 	000002 			MOV	N.BP(R4),R4	;; BACK UP ONE
  14436	045420					CALL	..NADD		;; ADD THE NODE TO THE QUEUE
	045420	004737 	045434'			JSR	PC,..NADD
  14437	045424					.ENB0			;; ENABLE INTERRUPTS
	045424	004737 	045540'			JSR	PC,..ENB0
  14438	045430	012604 				MOV	(SP)+,R4	; RESTORE R4
  14439	045432					RETURN			; RETURN TO CALLER
	045432	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 266
SCOMM MODULE -- ..NADD	(NODE ADD)

  14441						.SBTTL	SCOMM MODULE -- ..NADD	(NODE ADD)
  14442
  14443					;+
  14444					; ..NADD -- ROUTINE TO ADD A NODE TO A DEQUEUE
  14445					;
  14446					;	..NADD IS THE GENERAL PICK A NODE ROUTINE.  THE ADDITION
  14447					;	OF A NODE IS DONE WITH INTERRUPTS INHIBITED TO PREVENT
  14448					;	A CONFLICT WITH NODE DELETION.
  14449					;
  14450					; CALLING SEQUENCE:
  14451					;
  14452					;	R1 -- NODE ADDRESS
  14453					;	R4 -- ADDRESS OF LISTHEAD OR PREVIOUS NODE
  14454					;
  14455					;	CALL	..NADD
  14456					;-
  14457
  14458	045434				..NADD::
  14459	045434	010246 				MOV	R2,-(SP)	; SAVE R2
  14460	045436	010461 	000002 			MOV	R4,2(R1)	; SET UP BACKWARD POINTER IN NODE
  14461	045442					.INH6			;;; INHIBIT INTERRUPTS
	045442	013746 	177776 			MOV	@#PS,-(SP)
	045446	112737 	000300 	177776 		MOVB	#300,@#PS
  14462	045454	011411 				MOV	@R4,@R1		;;; SET UP FORWARD POINTER
  14463	045456	010114 				MOV	R1,@R4		;;; FORWARD POINTER FROM LIST HEAD
  14464	045460	011102 				MOV	@R1,R2		;;;
  14465	045462	010162 	000002 			MOV	R1,2(R2)	;;;
  14466	045466					.ENB6			;;; ENABLE INTERRUPTS
	045466	012637 	177776 			MOV	(SP)+,@#PS
  14467	045472	012602 				MOV	(SP)+,R2	; RESTORE R2
  14468	045474					RETURN			; RETURN TO CALLER
	045474	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 267
SCOMM MODULE -- ..PICK	(PICK A NODE)

  14470						.SBTTL	SCOMM MODULE -- ..PICK	(PICK A NODE)
  14471
  14472					;+
  14473					; ..PICK -- ROUTINE TO PICK A NODE FROM A DEQUEUE
  14474					;
  14475					;	..PICK IS THE GENERAL PICK A NODE ROUTINE.  IT'S PRIMARY USE IS TO
  14476					;	PICK A NODE FROM A LIST.  IT CHECKS TO SEE THAT A NODE DOES EXIST
  14477					;	IN THE LIST BUT IT DOES NO ACCOUNTING OF THE NODES.  ..PICK INHIBITS
  14478					;	INTERRUPTS TO PREVENT A NODE FROM BEING ADDED WHILE IT CHECKS TO SEE
  14479					;	IF THERE IS REALLY A NODE TO BE PICKED.
  14480					;
  14481					; CALLING SEQUENCE:
  14482					;
  14483					;	R4 -- LIST HEAD OR PREVIOUS NODE TO THE NODE TO BE PICKED
  14484					;
  14485					;	CALL	..PICK
  14486					;
  14487					; EXIT CONDITIONS:
  14488					;
  14489					;	CC -- C BIT CLEAR
  14490					;	R4 -- PICKED NODE ADDRESS
  14491					;
  14492					; ERROR CONDITIONS:
  14493					;
  14494					;	CC -- C BIT SET
  14495					;		NOTE -- THIS CONDITION CAN'T HAPPEN UNLESS R4 IS THE LISTHEAD
  14496					;	R4 -- ZERO
  14497					;-
  14498
  14499	045476				..PICK::
  14500	045476	000241 				CLC			; ASSUME SUCCESS
  14501	045500					.INH6			;;; INHIBIT ALL INTERRPUTS
	045500	013746 	177776 			MOV	@#PS,-(SP)
	045504	112737 	000300 	177776 		MOVB	#300,@#PS
  14502	045512	020414 				CMP	R4,@R4		;;; IS THERE A NODE TO PICK?
  14503	045514	001406 				BEQ	20$		;;; NO -- THEN DON'T PICK IT
  14504	045516	011404 				MOV	@R4,R4		;;;
  14505	045520					CALL	..NDEL		;;; DELETE THE NODE
	045520	004737 	045320'			JSR	PC,..NDEL
  14506	045524				10$:
  14507	045524					.ENB6			;;; ENABLE INTERRUPTS
	045524	012637 	177776 			MOV	(SP)+,@#PS
  14508	045530					RETURN			; RETURN TO CALLER
	045530	000207 				RTS	PC
  14509	045532				20$:
  14510	045532	005004 				CLR	R4		; NO NODE FOUND CLEAR RETURNED VALUE
  14511	045534	005216 				INC	@SP		; SET C BIT TO INDICATE ERROR
  14512	045536	000772 				BR	10$		; RETURN
  14513						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 268
SCOMM MODULE -- ..ENB0	(ENABLE TASK SWITCHING)

  14515						.SBTTL	SCOMM MODULE -- ..ENB0	(ENABLE TASK SWITCHING)
  14516
  14517					;+
  14518					; ..ENB0 -- ROUTINE TO ENABLE TASK SWITCHING
  14519					;
  14520					;	..ENB0 -- ENABLES TASK SWITCHING AND ALLOWS THE SYSTEM TO
  14521					;	UPDATE THE CLOCK AND RECOGNIZE SIGNIFIGANT EVENTS.  THIS
  14522					;	ROUTINE MUST BE ENTERED WITH THE PS SAVED ON THE TOP OF THE
  14523					;	STACK.  THE USUAL WAY OF SETTING UP TO USE THIS ROUTINE IS BY
  14524					;	USE OF THE .INH0 MACRO.
  14525					;
  14526					;	THIS ROUTINE WILL NOT ENABLE TASK SWITCHING IF THE PRIORITY SAVED
  14527					;	ON THE STACK DOES NOT INDICATE A RETURN TO PRIORITY 0.  I.E., NOT
  14528					;	ENTERED AT PROCESSOR PRIORITY LEVEL 3.
  14529					;
  14530					;	CALLING SEQUENCE:
  14531					;
  14532					;			CALL	..ENB0
  14533					;
  14534					; NOTE -- PS SAVED BY .INH0 MUST BE ON THE TOP OF THE STACK
  14535					;
  14536					;	.INH0 IS A MACRO DEFINED AS FOLLOWS:
  14537					;		.MACRO	.INH0
  14538					;			MOV	PS,-(SP)
  14539					;			BIS	#140,PS
  14540					;		.ENDM
  14541					;-
  14542
  14543	045540				..ENB0::
  14544	045540	010146 				MOV	R1,-(SP)	;;
  14545	045542	016601 	000004 			MOV	4(SP),R1	;; PICK UP THE STATUS WORD FROM THE STACK
  14546	045546	032701 	000340 			BIT	#340,R1		;; TEST THE STATUS RETURNING TO
  14547	045552	001003 				BNE	20$		;; IF RETURNING TO OTHER THAN 0 DON'T ENABLE TASK SWITCHING
  14548	045554				10$:
  14549	045554	010146 				MOV	R1,-(SP)	;; NEW STATUS WORD IN R1
  14550									;; PLACE IT ON THE STACK
  14551									;; TO SET UP FOR COMMON SCAN
  14552	045556	004737 	015062'			JSR	PC,..INTX	;; PUSH THE RETURN ADDRESS ON THE STACK
  14553	045562				20$:
  14554	045562	012601 				MOV	(SP)+,R1	; RESTORE R1 TO PRE-TASK SWITCHING STATE
  14555	045564	016637 	000002 	177776 		MOV	2(SP),@#PS	; SET UP THE NEW PROCESSOR STATUS
  14556	045572	000002 				RTI			; RTI POPS THE STACK TWICE AND RETURNS TO THE CALLER
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 269
SCOMM MODULE -- ..FSTD	(FIND STD ENTRY)

  14558						.SBTTL	SCOMM MODULE -- ..FSTD	(FIND STD ENTRY)
  14559
  14560					;+
  14561					; ..FSTD -- SUBROUTINE TO SEARCH THE SYSTEM TASK DIRECTORY FOR AN
  14562					;	    ENTRY FOR A NAMED TASK.
  14563					;
  14564					; ENTRY CONDITIONS:
  14565					;
  14566					;	R1 -- ADDRESS OF THE FIRST WORD OF A TWO WORD BLOCK CONTAINING A TASK
  14567					;	      NAME (RADIX-50), AND THE BLOCK CAN BE FETCHED
  14568					;
  14569					; CALLING SEQUENCE:
  14570					;
  14571					;	CALL  ..FSTD
  14572					;
  14573					; EXIT CONDITIONS:
  14574					;
  14575					;	R1 -- ADVANCED BY FOUR (2 WORDS),
  14576					;	R2 -- STD ENTRY ADDRESS, OR ZERO IF NAME NOT FOUND.
  14577					;	R3 -- 1 BEYOND ALPHA PLACE TO INSERT
  14578					;
  14579					;	CONDITION CODES SET PER "TST R2".
  14580					;-
  14581
  14582	045574				..FSTD::
  14583	045574	010546 				MOV	R5,-(SP)
  14584	045576	013703 	006364'			MOV	.STDTA,R3	; FIND THE BEGINNING
  14585	045602	010305 				MOV	R3,R5		; FIND THE END
  14586	045604	063705 	006370'			ADD	.STDTZ,R5
  14587	045610					MFPI	(R1)+		; FIND TASK NAME
	045610	012146 				MOV	(R1)+,-(SP)
  14588	045612					MFPI	(R1)+
	045612	012146 				MOV	(R1)+,-(SP)
  14589	045614				5$:
  14590	045614	012302 				MOV	(R3)+,R2
  14591	045616	021266 	000002 			CMP	@R2,2(SP)	; TASK NAME CORRECT?
  14592	045622	101007 				BHI	50$		; NO -- TRY NEXT ONE
  14593	045624	103404 				BLO	10$		; NO AND NOT HERE
  14594	045626	026216 	000002 			CMP	2(R2),@SP	; MAYBE CHECK SECOND HALF
  14595	045632	001404 				BEQ	30$		; GOT IT
  14596	045634	101002 				BHI	50$		; NO -- AND NOTHING THERE
  14597	045636				10$:
  14598	045636	020305 				CMP	R3,R5		; END OF LIST?
  14599	045640	101765 				BLOS	5$		; NO -- CONTUNUE
  14600	045642				50$:
  14601	045642	005002 				CLR	R2		; RETURN R2 0
  14602	045644				30$:
  14603	045644	022626 				CMP	(SP)+,(SP)+	; REMOVE NAME
  14604	045646	012605 				MOV	(SP)+,R5
  14605	045650	005702 				TST	R2		; RETURN CONDITIONS PER R2
  14606	045652				60$:
  14607	045652					RETURN			; RETURN TO CALLER
	045652	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 270
SCOMM MODULE -- ..ALCB/..ALC2	(ALLOCATE CORE)

  14609						.SBTTL	SCOMM MODULE -- ..ALCB/..ALC2	(ALLOCATE CORE)
  14610					;+
  14611					; ..ACLB -- SUBROUTINE TO ALLCOCATE A NODE FROM THE FREE POOL
  14612					;
  14613					; THIS ROUTINE IS CALLED TO ALLOCATE A CORE BUFFER. THE ALLOCATION
  14614					; ALGORITHM IS FIRST FIT AND BLOCKS ARE ALLOCATED IN MULTIPLES OF FOUR
  14615					; BYTES.
  14616					;
  14617					; INPUTS:
  14618					;
  14619					;	R0 -- ADDRESS OF CORE ALLOCATION LISTHEAD IF ENTRY AT ..ALC2.
  14620					;	R1 -- SIZE OF THE CORE BUFFER TO ALLOCATE IN BYTES.
  14621					;
  14622					; OUTPUTS:
  14623					;
  14624					;	CC-C SET IF INSUFFICIENT CORE IS AVAILABLE TO ALLOCATE THE BLOCK.
  14625					;
  14626					;	CC-C CLEAR IF THE BLOCK IS ALLOCATED.
  14627					;	R0 -- ADDRESS OF THE ALLOCATED BLOCK.
  14628					;	R1 -- SIZE OF THE ALLOCATED BLOCK
  14629					;-
  14630
  14631	045654				..ALCB::
  14632	045654	062701 	000003 			ADD	#3,R1		; MASK TO CORRECT SIZE
  14633	045660	042701 	000003 			BIC	#3,R1
  14637	045664	012700 	001426'			MOV	#.FREPL,R0	; POINT TO ALLOCATION LISTHEAD
  14638	045670				..ALC2::
  14639	045670	010346 				MOV	R3,-(SP)	; SAVE R3
  14640	045672	010246 				MOV	R2,-(SP)	; [4.1.1013] SAVE REGISTERS
  14641	045674	000241 				CLC			; [4.1.1013] ASSUME SUCCESS
  14642	045676					.INH6			; [4.1.1013] INHIBIT INTERRUPTS
	045676	013746 	177776 			MOV	@#PS,-(SP)
	045702	112737 	000300 	177776 		MOVB	#300,@#PS
  14643	045710	010003 				MOV	R0,R3		;;; [4.1.1013] COPY LISTHEAD POINTER TO R3
  14644	045712	160163 	000002 			SUB	R1,2(R3)	;;; [4.1.1013] CHECK TO SEE IF POOL OK
  14645	045716	100424 				BMI	40$		;;; [4.1.1013] FREE-POOL EXHAUSTED
  14646					;
  14647					; HERE TO SCAN FREE-POOL FOR A BLOCK
  14648					;
  14649	045720				10$:
  14650	045720	010002 				MOV	R0,R2		;;; SAVE ADDRESS OF CURRENT BLOCK
  14651	045722	011200 				MOV	@R2,R0		;;; GET ADDRESS OF NEXT BLOCK
  14652	045724	001421 				BEQ	40$		;;; IF EQ END OF CHAIN
  14653	045726	026001 	000002 			CMP	2(R0),R1	;;; BLOCK BIG ENOUGH?
  14654	045732	103772 				BLO	10$		;;; IF LO NO
  14655	045734	001407 				BEQ	20$		;;; IF EQ BLOCK IS EXACT SIZE
  14656					;
  14657					; HERE IF A LARGER BLOCK HAS BEEN FOUND
  14658					;
  14659	045736	005720 				TST	(R0)+		;;; POINT TO SIZE
  14660	045740	160110 				SUB	R1,@R0		;;; ALLOCATE BLOCK
  14661	045742	060001 				ADD	R0,R1		;;; POINT TO NEXT FREE SPACE
  14662	045744	011011 				MOV	@R0,@R1		;;; STORE NEW POINTER
  14663	045746	014041 				MOV	-(R0),-(R1)	;;; STORE ADDRESS
  14664	045750	010110 				MOV	R1,@R0		;;; STORE SIZE
  14665	045752	160001 				SUB	R0,R1
  14666					;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 270-1
SCOMM MODULE -- ..ALCB/..ALC2	(ALLOCATE CORE)

  14667					; HERE IF AN EXACT FIT HAS BEEN FOUND
  14668					;
  14669	045754				20$:
  14670	045754	011012 				MOV	@R0,@R2		;;; REMOVE BLOCK FROM LIST
  14687	045756				30$:
  14688	045756					.ENB6			;;; ENABLE INTERRUPTS AND SET EXIT CONDITIONS
	045756	012637 	177776 			MOV	(SP)+,@#PS
  14689	045762	012602 				MOV	(SP)+,R2	; RESTORE REGISTERS
  14690	045764	012603 				MOV	(SP)+,R3	; RESTORE R3
  14691	045766					RETURN			; RETURN WITH R0 POINTING TO CALLER'S NODE
	045766	000207 				RTS	PC
  14692					;
  14693					; HERE TO SET UP ERROR EXIT
  14694					;
  14695	045770				40$:
  14696	045770	005216 				INC	@SP		;;; SET CARRY
  14697	045772	060163 	000002 			ADD	R1,2(R3)	;;; RESET COUNTER
  14698	045776	000767 				BR	30$		;;; AND RETURN
  14699						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 271
SCOMM MODULE -- ..DECB/..DECN/..DEC2 (DEALLOCATE CORE)

  14701						.SBTTL	SCOMM MODULE -- ..DECB/..DECN/..DEC2 (DEALLOCATE CORE)
  14702
  14703					;+
  14704					; ..DECB -- SUBROUTINE TO RETURN A BLOCK TO THE FREE POOL
  14705					;
  14706					; THESE ROUTINES ARE CALLED TO DEALLOCATE AN EXEC CORE BUFFER.  THE BLOCK IS
  14707					; INSERTED INTO THE FREE BLOCK CHAIN BY CORE ADDRESS.  IF AN ADJACENT
  14708					; BLOCK IS CURRENTLY FREE, THEN THE TWO BLOCKS ARE MERGED AND INSERTED
  14709					; IN THE FREE BLOCK CHAIN.
  14710					;
  14711					; INPUTS:
  14712					;
  14713					;	R0 -- ADDRESS OF THE CORE BUFFER TO BE DEALLOCATED.
  14714					;	R1 -- SIZE OF THE CORE BUFFER TO DEALLOCATE IN BYTES.
  14715					;	R3 -- ADDRESS OF CORE ALLOCATION LISTHEAD IF ENTRY AT ..DEC2.
  14716					;
  14717					; OUTPUTS:
  14718					;
  14719					;	THE CORE BLOCK IS MERGED INTO THE FREE CORE CHAIN BY CORE
  14720					;	ADDRESS AND IS AGCOMERATED IF NECESSARY WITH ADJACENT BLOCKS.
  14721					;-
  14722
  14723						.ENABL	LSB
  14724
  14725	046000				..DEC2::
  14726	046000	010346 				MOV	R3,-(SP)	; SAVE REGISTERS
  14727	046002	000411 				BR	10$
  14728						;
  14729	046004				..DECN::
  14730	046004	016001 	000002 			MOV	T.HBCT(R0),R1	; PACKET SIZE TO R1
  14731	046010				..DECB::
  14732	046010	010346 				MOV	R3,-(SP)	; SAVE REGISTERS
  14733	046012	062701 	000003 			ADD	#3,R1		; ROUND OFF
  14734	046016	042701 	000003 			BIC	#3,R1
  14735	046022	012703 	001426'			MOV	#.FREPL,R3
  14736	046026				10$:
  14737	046026	010246 				MOV	R2,-(SP)
  14738	046030	010146 				MOV	R1,-(SP)
  14739	046032	010046 				MOV	R0,-(SP)
  14740	046034					.INH6			; INHIBIT INTERRUPTS
	046034	013746 	177776 			MOV	@#PS,-(SP)
	046040	112737 	000300 	177776 		MOVB	#300,@#PS
  14759	046046	060163 	000002 			ADD	R1,2(R3)	;;; [4.1.1104] UPDATE SIZE
  14760	046052				40$:
  14761	046052	010302 				MOV	R3,R2		;;; SAVE ADDRESS OF CURRENT BLOCK
  14762	046054	011203 				MOV	@R2,R3		;;; GET ADDRESS OF NEXT BLOCK
  14763	046056	001402 				BEQ	50$		;;; IF EQ END OF CHAIN
  14764	046060	020003 				CMP	R0,R3		;;; BLOCK GO HERE?
  14765	046062	103373 				BHIS	40$		;;; IF HIS NO
  14766	046064				50$:
  14767	046064	010310 				MOV	R3,@R0		;;; ASSUME NO AGLOMERATION
  14768	046066	010046 				MOV	R0,-(SP)	;;; CALCULATE ADDRESS OF NEW BLOCK
  14769	046070	060116 				ADD	R1,@SP		;;;
  14770	046072	020326 				CMP	R3,(SP)+	;;; EQUAL TO NEXT IN CHAIN?
  14771	046074	001002 				BNE	60$		;;; IF NE NO
  14772	046076	012310 				MOV	(R3)+,@R0	;;; MOVE LINK WORD TO BLOCK RELEASED
  14773	046100	061301 				ADD	@R3,R1		;;; MERGE TWO BLOCKS
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 271-1
SCOMM MODULE -- ..DECB/..DECN/..DEC2 (DEALLOCATE CORE)

  14774	046102				60$:
  14775	046102	010246 				MOV	R2,-(SP)	;;; SAVE ADDRESS OF PREVIOUS BLOCK
  14776	046104	010022 				MOV	R0,(R2)+	;;; ASSUME NO AGLOMERATION
  14777	046106	061216 				ADD	@R2,@SP		;;; CALCULATE ADDRESS OF NEXT BLOCK
  14778	046110	020026 				CMP	R0,(SP)+	;;; EQUAL TO BLOCK BEING RELEASED?
  14779	046112	001003 				BNE	70$		;;; IF NE NO
  14780	046114	061201 				ADD	@R2,R1		;;; MERGE TWO BLOCKS
  14781	046116	011042 				MOV	@R0,-(R2)	;;; MOVE LINK WORD TO PREVIOUS BLOCK
  14782	046120	010200 				MOV	R2,R0		;;; SET NEW ADDRESS OF BLOCK
  14783	046122				70$:
  14784	046122	010160 	000002 			MOV	R1,2(R0)	;;; SET SIZE OF BLOCK RELEASED
  14785	046126					.ENB6			;;; ENABLE INTERRUPTS
	046126	012637 	177776 			MOV	(SP)+,@#PS
  14786	046132	012600 				MOV	(SP)+,R0	; RESTORE REGISTERS
  14787	046134	012601 				MOV	(SP)+,R1
  14788	046136	012602 				MOV	(SP)+,R2
  14789	046140	012603 				MOV	(SP)+,R3
  14790	046142					RETURN
	046142	000207 				RTS	PC
  14791						.DSABL	LSB
  14792
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 272
SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)

  14798						.SBTTL	SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)
  14799
  14800					;+
  14801					;	..ALOW -- SUBROUTINE TO ALLOCATE A BUFFER (..ALCB) OR WAIT
  14802					;		  IF ONE IS NOT AVAILABLE
  14803					;
  14804					;CALLING SEQUENCE:
  14805					;
  14806					;	SAME AS ..ALCB (Q.V.)
  14807					;
  14808					;-
  14809
  14810	046144				..ALOW::
  14811	046144					CALL	..ALCB		; TRY TO ALLOCATE A CORE BUFFER
	046144	004737 	045654'			JSR	PC,..ALCB
  14812	046150	103004 				BCC	10$		; RETURN IF SUCCESSFUL
  14813	046152					WSIG$S			; WAIT FOR SIG EVENT
	046152	012746 				MOV	(PC)+,-(SP)
	046154	   061 	   001 			.BYTE	49.,1
	046156	104375 				EMT	375
  14814	046160	000771 				BR	..ALOW		; AND TRY AGAIN
  14815						;
  14816	046162				10$:
  14817	046162					RETURN			; RETURN TO CALLER
	046162	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 273
SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)

  14819						.SBTTL	SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)
  14820
  14821					;+
  14822					; ..STTY -- START TERMINAL OUTPUT
  14823					;
  14824					; THIS SUBROUTINE WILL ENTER A TERMINAL OUTPUT PACKET IN A TERMINAL'S THREAD
  14825					; LIST AND START THE LINE IF THIS IS REQUIRED.  IF THE REQUEST IS FOR THE CTY
  14826					; AND KLINIK IS ACTIVE IN REMOTE MODE, THE REQUEST WILL BE PROCESSED FOR BOTH
  14827					; THE REMOTE AND LOCAL CTYS.
  14828					;
  14829					; REQUESTS FOR SENDALL PACKETS ARE NOT QUEUED UP FOR DH-11S, RATHER THEY ARE
  14830					; LEFT IN THE SENDALL RING BUFFERS.  SENDALL PACKETS FOR DL-11S ARE SIMPLY
  14831					; QUEUED UP AS NORMAL OUTPUT BY THE SENDALL SERVICE.
  14832					;
  14833					; NORMAL OUTPUT PACKETS ARE NOT QUEUED UP, BUT IMMEDIATELY DEALLOCATED IF:
  14834					;
  14835					;	1. THE DEVICE DOES NOT EXIST.
  14836					;	2. THE DEVICE IS IN AUTO-BAUD WAIT.
  14837					;
  14838					; NORMAL OUTPUT PACKETS ARE NOT STARTED IF:
  14839					;
  14840					;	1. THE DEVICE IS ALREADY OUTPUT ACTIVE.
  14841					;	2. THE DEVICE IS X'D-OFF.
  14842					;	3. THE DEVICE IS A CTY IN PDP-11 I/O WAIT.
  14843					;
  14844					; SENDALL PACKETS ARE ALWAYS STARTED ON X'D-OFF LINES.  THIS ROUTINE ASSUMES
  14845					; THAT THE SENDALL SERVICE WILL NOT ATTEMPT TO START A SENDALL ON A LINE WHICH:
  14846					;
  14847					;	1. IS OUTPUT ACTIVE.
  14848					;	2. IS SUPPRESSING SENDALLS.
  14849					;	3. DOES NOT EXIST.
  14850					;	4. IS IN AUTO-BAUD WAIT.
  14851					;
  14852					; INPUTS:
  14853					;
  14854					;	R0 -- POINTS TO OUTPUT PACKET
  14855					;	R2 -- POINTS TO DATA LINE SCANNER TABLE ENTRY FOR THIS LINE
  14856					;	R4 -- POINTS TO QUEUED PROTOCOL PACKET CONTAINING REQUEST
  14857					;
  14858					; OUTPUTS:
  14859					;
  14860					;	NO REGISTERS ARE ALTERED
  14861					;-
  14862
  14863	046164				..STTY::
  14864	046164	010546 				MOV	R5,-(SP)	;;; SAVE REGISTERS
  14865	046166	010446 				MOV	R4,-(SP)
  14866	046170	010246 				MOV	R2,-(SP)
  14867	046172	010146 				MOV	R1,-(SP)
  14868	046174	010046 				MOV	R0,-(SP)
  14869	046176	010205 				MOV	R2,R5		;;; COPY DLS TABLE POINTER TO R5
  14870	046200	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  14871	046206	001415 				BEQ	10$		;;; NO -- GO ON
  14872	046210	105737 	001234'			TSTB	.KLNSW+0	;;; YES -- IS REMOTE KLINIK ACTIVE??
  14873	046214	003412 				BLE	10$		;;; NO -- GO ON
  14874	046216	010004 				MOV	R0,R4		;;; [4.2265] YES -- COPY BUFFER
  14875	046220					CALL	COPBUF		;;; SO
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 273-1
SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)

	046220	004737 	030130'			JSR	PC,COPBUF
  14876	046224	013705 	002644'			MOV	KLNPTR,R5	;;; SUBSTITUTE KLINIK POINTER
  14877	046230					CALL	20$		;;; START THE KLINIK LINE
	046230	004737 	046262'			JSR	PC,20$
  14878	046234	016605 	000004 			MOV	4(SP),R5	;;; GET CTY POINTER
  14879	046240	011600 				MOV	(SP),R0		;;; [4.2265] AND THE BUFFER POINTER
  14880	046242				10$:
  14881	046242					CALL	20$		;;; START UP THE LINE
	046242	004737 	046262'			JSR	PC,20$
  14882	046246	012600 				MOV	(SP)+,R0	;;; RESTORE REGISTERS
  14883	046250	012601 				MOV	(SP)+,R1
  14884	046252	012602 				MOV	(SP)+,R2
  14885	046254	012604 				MOV	(SP)+,R4
  14886	046256	012605 				MOV	(SP)+,R5
  14887	046260					RETURN			;;; TO CALLER
	046260	000207 				RTS	PC
  14888					;
  14889					; HERE TO SEE IF A SENDALL MUST BE STARTED ON THIS LINE
  14890					;
  14891	046262				20$:
  14892	046262	005765 	000002 			TST	TTYEXP(R5)	;;; DOES THE DEVICE EXIST??
  14900	046266	001646 				BEQ	..DECN		;;; NO -- DEALLOCATE AND EXIT
  14902	046270	105060 	000007 			CLRB	T.HFCN(R0)	;;; CLEAR THE FUNCTION CODE
  14903	046274	020037 	002634'			CMP	R0,.CRSND	;;; IS THIS A SENDALL??
  14904	046300	001416 				BEQ	40$		;;; YES -- START IT UP
  14905					;
  14906					; HERE TO START NORMAL OUTPUT ON THIS LINE
  14907					;
  14908	046302	032765 	000010 	000006 		BIT	#TT.ABW,STSW1(R5) ;;; IS THIS LINE IN AUTO-BAUD WAIT??
  14912	046310	001235 				BNE	..DECN		;;; YES -- DEALLOCATE THE NODE AND EXIT
  14914	046312	010501 				MOV	R5,R1		;;; NO -- SET UP TO FIND END OF THREAD LIST
  14915	046314				30$:
  14916	046314	010102 				MOV	R1,R2		;;; COPY NODE POINTER TO R2
  14917	046316	011201 				MOV	(R2),R1		;;; FIND END OF LIST
  14918	046320	001375 				BNE	30$		;;; KEEP GOING
  14919	046322	010012 				MOV	R0,(R2)		;;; SET THIS NODE IN THE THREAD LIST
  14920	046324	005010 				CLR	(R0)		;;; MARK THE END OF THE LIST
  14921	046326	032765 	000201 	000006 		BIT	#TT.XOF!TT.OUT,STSW1(R5) ;;; IS THE LINE X'D OFF
  14922									;;; OR ALREADY ACTIVE??
  14923	046334	001016 				BNE	60$		;;; YES -- JUST EXIT
  14924					;
  14925					; HERE TO START UP THE DEVICE
  14926					;
  14927	046336				40$:
  14928	046336	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  14929	046344	001403 				BEQ	50$		;;; NO -- GO ON
  14930	046346	005737 	002640'			TST	.TTP11		;;; YES -- IN PDP-11 I/O WAIT??
  14931	046352	001007 				BNE	60$		;;; YES -- JUST EXIT
  14932					;
  14933					; HERE TO START UP A DH-11 LINE
  14934					;
  14935	046354				50$:
  14936	046354	016504 	000002 			MOV	TTYEXP(R5),R4	;;; [5.1015] EXTERNAL PAGE POINTER TO R4
  14937	046360					CALL	.STDHL		;;; SET THE LINE NUMBER IN THE DH-11
	046360	004737 	040476'			JSR	PC,.STDHL
  14938	046364	100403 				BMI	70$		;;; [5.1015] GO START DL-11
  14939	046366	000137 	035034'			JMP	.DHSTO		;;; START THE DH-11 OUTPUT AND EXIT
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 273-2
SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)

  14940						;
  14941	046372				60$:
  14942	046372					RETURN			;;; EXIT
	046372	000207 				RTS	PC
  14943					;
  14944					; HERE TO START UP A DL-11 LINE
  14945					;
  14946	046374				70$:
  14947	046374	000137 	035210'			JMP	.DLSTO		;;; START DL-11 OUTPUT
  14948						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 274
SCOMM MODULE -- ..STPT	(STOP TTY)

  14950						.SBTTL	SCOMM MODULE -- ..STPT	(STOP TTY)
  14951
  14952					;+
  14953					; ..STPT -- SUBROUTINE TO STOP TTY OUTPUT AND FLUSH THE BUFFERS
  14954					;
  14955					; ENTRY CONDITIONS:
  14956					;
  14957					;	R2 -- POINTER TO TTYTBL (TABLE WHERE QUEUE FOR THIS LINE IS)
  14958					;
  14959					;	CALL	..STPT
  14960					;
  14961					; EXIT CONDITIONS:
  14962					;
  14963					;	CC-C CLEAR
  14964					;	NO REGISTERS ALTERED
  14965					;-
  14966
  14967	046400				..STPT::
  14968	046400	010046 				MOV	R0,-(SP)	;;; [5.1015] SAVE R0
  14969	046402	010446 				MOV	R4,-(SP)	;;; [5.1015] AND R4
  14970	046404	010546 				MOV	R5,-(SP)	;;; [5.1015] AND R5
  14971	046406	010205 				MOV	R2,R5		;;; [5.1015] COPY DLS POINTER TO R5
  14972	046410	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  14973	046416	001411 				BEQ	10$		;;; NO -- GO ON
  14974	046420	105737 	001234'			TSTB	.KLNSW+0	;;; YES -- IS KLINIK ACTIVE??
  14975	046424	003406 				BLE	10$		;;; NOT THAT WE CARE
  14976	046426	010546 				MOV	R5,-(SP)	;;; YES -- SAVE R5
  14977	046430	013705 	002644'			MOV	KLNPTR,R5	;;; KLINIK LINE POINTER TO R5
  14978	046434					CALL	20$		;;; DEQUEUE AND STOP KLINIK LINE
	046434	004737 	046456'			JSR	PC,20$
  14979	046440	012605 				MOV	(SP)+,R5	;;; RESTORE R5
  14980	046442				10$:
  14981	046442					CALL	20$		;;; DEQUEUE AND STOP LINE
	046442	004737 	046456'			JSR	PC,20$
  14982	046446	012605 				MOV	(SP)+,R5	;;; [5.1015] RESTORE REGISTERS
  14983	046450	012604 				MOV	(SP)+,R4
  14984	046452	012600 				MOV	(SP)+,R0
  14985	046454					RETURN			;;; AND EXIT
	046454	000207 				RTS	PC
  14986					;
  14987					; HERE TO FLUSH OUTPUT LIST AND STOP LINE
  14988					;
  14989	046456				20$:
  14990	046456	005715 				TST	(R5)		;;; [5.1015] IS THERE A LIST TO BEGIN WITH??
  14991	046460	001440 				BEQ	60$		;;; [5.1015] NO -- JUST EXIT
  14992	046462	010546 				MOV	R5,-(SP)	;;; YES -- SAVE DLS POINTER
  14993	046464	011505 				MOV	(R5),R5		;;; MOVE OVER FIRST NODE
  14994	046466	005065 	000006 			CLR	T.HCBC(R5)	;;; [5.1015] ZERO THE BYTE COUNT
  14995	046472	005705 				TST	R5		;;; [5.1015] LOOK AT THE LINK
  14996	046474	001402 				BEQ	30$		;;; ONLY ONE NODE -- FORGET IT
  14997	046476					CALL	50$		;;; FLUSH THE THREAD LIST
	046476	004737 	046546'			JSR	PC,50$
  14998					;
  14999					; HERE TO STOP A DH-11 LINE
  15000					;
  15001	046502				30$:
  15002	046502	012605 				MOV	(SP)+,R5	;;; RESTORE DLS POINTER
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 274-1
SCOMM MODULE -- ..STPT	(STOP TTY)

  15003	046504	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; [5.1015] IS THIS A CTY??
  15004	046512	001403 				BEQ	40$		;;; [5.1015] NO -- GO ON
  15005	046514	005737 	002640'			TST	.TTP11		;;; [5.1015] YES -- -11 I/O WAIT??
  15006	046520	001012 				BNE	50$		;;; [5.1015] YES -- GET RID OF FIRST NODE AND EXIT
  15007	046522				40$:
  15008	046522	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; [5.1015] OUTPUT ACTIVE??
  15009	046530	001406 				BEQ	50$		;;; [5.1015] NO -- GET RID OF FIRST NODE AND EXIT
  15010	046532	032765 	001000 	000006 		BIT	#TT.SIP,STSW1(R5) ;;; [5.1015] MAYBE -- CHECK FOR SENDALL
  15011	046540	001002 				BNE	50$		;;; [5.1015] YES -- GET RID OF FIRST NODE AND EXIT
  15012	046542	000137 	043056'			JMP	.TTSTP		;;; [5.1015] NO -- STOP OUTPUT
  15013						;
  15014					;
  15015					; INTERNAL SUBROUTINE TO REMOVE THREAD LIST ENTRIES UP TO THAT
  15016					; POINTED TO BY R5
  15017					;
  15018	046546				50$:
  15019	046546	011500 				MOV	(R5),R0		;;; GET THIS NODE POINTER
  15020	046550	001404 				BEQ	60$		;;; END OF LIST IF .EQ. 0
  15021	046552	011015 				MOV	(R0),(R5)	;;; DELINK AND
  15022	046554					CALL	..DECN		;;; DEALLOACATE THIS NODE
	046554	004737 	046004'			JSR	PC,..DECN
  15023	046560	000772 				BR	50$		;;; DO THE NEXT NODE
  15024						;
  15025	046562				60$:
  15026	046562					RETURN			;;; TO CALLER
	046562	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 275
SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 QUEUE)

  15028						.SBTTL	SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 QUEUE)
  15029
  15030					;+
  15031					; ..STCH -- SUBROUTINE TO STORE A CHARACTER IN THE TO 10
  15032					;	    QUEUE AND IF THAT QUEUE IS FULL SEND IT TO THE KL10 BY
  15033					;	    ENTERING IT IN THE TO 10 QUEUE.
  15034					;
  15035					; CALLING SEQUENCE:
  15036					;
  15037					;	SP -- POINTS TO CHARACTER
  15038					;	R5 -- POINTER TO DEVICE TABLE ENTRY
  15039					;
  15040					;	CALL	..STCH
  15041					;
  15042					;	REGISTERS ALTERED: NONE
  15043					;-
  15044
  15045						.ENABL	LSB
  15046
  15047	046564				..STCH::
  15048	046564	010446 				MOV	R4,-(SP)	; SAVE REGISTERS
  15049	046566	010346 				MOV	R3,-(SP)
  15050	046570	010146 				MOV	R1,-(SP)
  15051	046572	012703 	000004 			MOV	#D.CDLS,R3	; SET UP AS DATA/LINE SCANNER
  15052	046576					CALL	STLN		; GET LINE NUMBER
	046576	004737 	046650'			JSR	PC,STLN
  15053	046602	000304 				SWAB	R4		; AND PUT IN HIGH ORDER BYTE
  15054	046604	156604 	000010 			BISB	10(SP),R4	; SET CHARACTER
  15055	046610	012701 	000004 			MOV	#BC.LNC,R1	; SET LINE NUMBER/CHARACTER
  15056					;
  15057					;	LOCAL COMMON QUEUE STORAGE SUBROUTINE
  15058					;
  15059	046614				STCM:
  15060	046614					CALL	..STFC		; STORE FUNCTION
	046614	004737 	046714'			JSR	PC,..STFC
  15061	046620	012601 				MOV	(SP)+,R1	; RESTORE
  15062	046622	012603 				MOV	(SP)+,R3
  15063	046624	012604 				MOV	(SP)+,R4
  15064	046626				10$:
  15065	046626					RETURN
	046626	000207 				RTS	PC
  15066
  15067						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 276
SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)

  15069						.SBTTL	SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)
  15070
  15071					;+
  15072					; ..SACK -- SUBROUTINE TO ACKNOWLEDGE THE OUTPUT OF CHARACTER OR STRINGS
  15073					;
  15074					; CALLING SEQUENCE:
  15075					;
  15076					;	R3 -- DEVICE ID
  15077					;	R5 -- DEVICE TABLE POINTER
  15078					;
  15079					; EXIT CONDITIONS:
  15080					;
  15081					;	NO REGISTERS ALTERED
  15082					;
  15083					;-
  15084
  15085	046630				..SACK::
  15086	046630	010446 				MOV	R4,-(SP)	; SAVE REGISTERS
  15087	046632	010346 				MOV	R3,-(SP)
  15088	046634	010146 				MOV	R1,-(SP)
  15089	046636					CALL	STLN		; GET LINE NUMBER.
	046636	004737 	046650'			JSR	PC,STLN
  15090	046642	012701 	000017 			MOV	#BC.SAK,R1
  15091	046646	000762 				BR	STCM		; STORE COMMON
  15092						;
  15093					;
  15094					;	LOCAL SUBROUTINE TO COMPUTE LINE NUMBER
  15095					;
  15096	046650				STLN:
  15097	046650	010246 				MOV	R2,-(SP)
  15098	046652	005004 				CLR	R4		; DEFAULT LINE # TO ZERO.
  15099	046654	010302 				MOV	R3,R2		; COMPUTE OFFSET TO
  15100	046656	006302 				ASL	R2		; DEVICE QUEUE ENTRY
  15101	046660	006302 				ASL	R2
  15102	046662	006302 				ASL	R2
  15103	046664	006302 				ASL	R2
  15104	046666	010501 				MOV	R5,R1		; NOW COMPUTE OFFSET
  15105	046670	166201 	010042'			SUB	.DQPBA-20(R2),R1 ; INTO DEVICE LINE TABLE
  15106	046674	001405 				BEQ	20$		; FIRST ENTRY - ALL DONE.
  15107	046676	116202 	010044'			MOVB	.DQPBA-20+2(R2),R2 ; GET TABLE ENTRY SIZE
  15108	046702				10$:
  15109	046702	005204 				INC	R4		; AND MARCH THROUGH
  15110	046704	160201 				SUB	R2,R1
  15111	046706	003375 				BGT	10$
  15112	046710				20$:
  15113	046710	012602 				MOV	(SP)+,R2
  15114	046712					RETURN			; GOOD-BYE !
	046712	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 277
SCOMM MODULE -- ..STFC	(STORE FUNCTION)

  15116						.SBTTL	SCOMM MODULE -- ..STFC	(STORE FUNCTION)
  15117
  15118					;+
  15119					; ..STFC -- SUBROUTINE TO START A ONE WORD FUNCTION OF CHARACTER
  15120					;
  15121					; CALLING SEQUENCE:
  15122					;
  15123					;	R1 -- FUNCTION CODE
  15124					;	R3 -- DEVICE ID
  15125					;	R4 -- CHARACTER TO BE SENT TO 10 AND LINE NUMBER
  15126					;-
  15127
  15128	046714				..STFC::
  15129	046714	010546 				MOV	R5,-(SP)	; SAVE R5
  15130	046716					.INH6
	046716	013746 	177776 			MOV	@#PS,-(SP)
	046722	112737 	000300 	177776 		MOVB	#300,@#PS
  15131	046730	020137 	001260'			CMP	R1,.CPFN	; THE CORRECT CURRENT FUNCTION?
  15132	046734	001026 				BNE	10$		; NO -- MUST RESET
  15133	046736	020337 	001262'			CMP	R3,.CPDV	; SAME DEVICE?
  15134	046742	001023 				BNE	10$		; MUST RESET HERE ALSO
  15135	046744				5$:
  15136	046744	010477 	132316 			MOV	R4,@.CRPB	; SET THE LINE NUMBER
  15137	046750	012705 	000002 			MOV	#2,R5
  15138	046754	060537 	001266'			ADD	R5,.CRPB
  15139	046760	060577 	132306 			ADD	R5,@.CRSB
  15140	046764	060537 	001256'			ADD	R5,.CRQZ
  15141	046770	160537 	001264'			SUB	R5,.CRSZ
  15142	046774	001002 				BNE	7$		; YES -- RETURN TO CALLER
  15143	046776					CALL	..STQ		; NO -- BETTER START QUEUE
	046776	004737 	047304'			JSR	PC,..STQ
  15144	047002				7$:
  15145	047002					.ENB6			; ENABLE INTERRUPTS
	047002	012637 	177776 			MOV	(SP)+,@#PS
  15146	047006	012605 				MOV	(SP)+,R5	; RESTORE
  15147	047010					RETURN			; RETURN TO CALLER
	047010	000207 				RTS	PC
  15148					;
  15149	047012				10$:
  15150	047012	022737 	000012 	001264'		CMP	#10.,.CRSZ	; IS THERE ROOM?
  15151	047020	101402 				BLOS	15$		; YES -- START NEW ENTRY
  15152	047022				13$:
  15153	047022					CALL	..STQ		; NO -- ENTER IT IN THE QUEUE
	047022	004737 	047304'			JSR	PC,..STQ
  15154	047026				15$:
  15155	047026	010046 				MOV	R0,-(SP)	; SAVE R0
  15156	047030	012705 	000010 			MOV	#10,R5
  15157	047034	013700 	001266'			MOV	.CRPB,R0	; FIND CURRENT BUFFER POINTER
  15158	047040	060537 	001256'			ADD	R5,.CRQZ	; UPDATE QUEUE COUNTS
  15159	047044	160537 	001264'			SUB	R5,.CRSZ
  15160	047050	010037 	001272'			MOV	R0,.CRSB	; SET UP CURRENT BUFFER POINTER
  15161	047054	010520 				MOV	R5,(R0)+	; SET UP CURRENT SIZE
  15162	047056	010120 				MOV	R1,(R0)+	; SET THE FUNCTION CODE
  15163	047060	010137 	001260'			MOV	R1,.CPFN	; SAVE CURRENT FUNCTION
  15164	047064	010320 				MOV	R3,(R0)+	; SET DEVICE CODE
  15165	047066	010337 	001262'			MOV	R3,.CPDV	; SET DEVICE CODE FOR REFER LATER
  15166	047072	005020 				CLR	(R0)+		; CLEAR SPARE WORD
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 277-1
SCOMM MODULE -- ..STFC	(STORE FUNCTION)

  15167	047074	010037 	001266'			MOV	R0,.CRPB	; SET CURRENT BUFFER POINTER
  15168	047100	012600 				MOV	(SP)+,R0	; RESTORE R0
  15169	047102	000720 				BR	5$		; AND SET FUNCTION
  15170						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 278
SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)

  15172						.SBTTL	SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)
  15173
  15174					;+
  15175					; ..STIN -- SUBROUTINE TO START AN INDIRECT DTE20 FUNCTION TO THE 10
  15176					;
  15177					;  ENTRY CONDITIONS:
  15178					;
  15179					;	R0 -- BUFFER ADDRESS
  15180					;	R1 -- FUNCTION +100000
  15181					;	R2 -- EFN/BUFFER SIZE
  15182					;	R3 -- DEVICE ID
  15183					;
  15184					;	NOTE :  THE FIRST WORD OF THE BUFFER MUST CONTAIN THE
  15185					;	LINE NUMBER AND BUFFER SIZE
  15186					;
  15187					;	MAY NOT BE CALLED FROM ISR
  15188					;
  15189					;	CALL	..STIN
  15190					;
  15191					;  EXIT CONDITIONS:
  15192					;
  15193					;	CC-C CLEAR SUCCESS
  15194					;	CC-C SET FAILURE -- PRIMARY PROTOCOL NOT IN USE
  15195					;
  15196					;-
  15197					;
  15198	047104				..STIN::
  15199	047104	005737 	001012'			TST	.COMEF+2	; [4.1.1105] IS PRIMARY PROTOCOL RUNNING??
  15200	047110	100402 				BMI	10$		; [4.1.1105] YES -- GO ON
  15201	047112	000261 				SEC			; [4.2208] NO -- SET ERROR RETURN
  15202	047114	000472 				BR	40$		; [4.2208] AND EXIT
  15203						;
  15204	047116				10$:
  15205	047116	010546 				MOV	R5,-(SP)	; SAVE REGISTERS
  15206	047120	010046 				MOV	R0,-(SP)
  15207	047122	010146 				MOV	R1,-(SP)
  15208	047124	012701 	000030 			MOV	#30,R1		; SET UP TO ALLOCATE A BUFFER
  15209	047130					CALL	..ALOW		; ALLOCATE BUFFER
	047130	004737 	046144'			JSR	PC,..ALOW
  15210	047134				20$:
  15211	047134	010005 				MOV	R0,R5		; MOVE BUFFER ADDRESS TO R5
  15212	047136	022525 				CMP	(R5)+,(R5)+	; MOVE OVER THE LISTHEAD
  15213	047140	010125 				MOV	R1,(R5)+	; STORE THE BUFFER SIZE
  15214	047142	012715 	000012 			MOV	#12,@R5		; PUT IN THE SIZE OF THIS HEADER PACKET
  15215	047146	012525 				MOV	(R5)+,(R5)+	; ALSO PUT IT IN FIRST WORD TO 10
  15216	047150	011625 				MOV	@SP,(R5)+	; STORE FUNCTION CODE
  15217	047152	010325 				MOV	R3,(R5)+	; STORE THE DEVICE I/D
  15218	047154	005025 				CLR	(R5)+		; CLEAR THE SPARE WORD
  15219	047156	016601 	000002 			MOV	2(SP),R1	; RESTORE BUFFER ADDRESS
  15220	047162	012125 				MOV	(R1)+,(R5)+	; SET BYTE COUNT/LINE NUMBER
  15221	047164	010125 				MOV	R1,(R5)+	; SET UP BUFFER ADDRESS
  15222	047166	010246 				MOV	R2,-(SP)	; SAVE REGISTERS MODIFIED
  15223	047170	010346 				MOV	R3,-(SP)
  15224	047172	010546 				MOV	R5,-(SP)
  15225	047174	013705 	001006'			MOV	.CRTSK,R5	; SET UP TO CONVERT EFN
  15226	047200	010203 				MOV	R2,R3
  15227	047202					CALL	.CEFN3		; CONVERT EFN
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 278-1
SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)

	047202	004737 	044324'			JSR	PC,.CEFN3
  15228	047206	012605 				MOV	(SP)+,R5	; RESTORE R5
  15229	047210	010325 				MOV	R3,(R5)+	; SET MASK
  15230	047212	010225 				MOV	R2,(R5)+	; SET ADDRESS
  15231	047214	012603 				MOV	(SP)+,R3	; RESTORE REGISTERS
  15232	047216	012602 				MOV	(SP)+,R2
  15233	047220	010446 				MOV	R4,-(SP)	; SAVE R4
  15234	047222	010001 				MOV	R0,R1		; SET UP TO ENTER NODE
  15235	047224					.INH6			; INHIBIT DTE20 INTERRUPTS
	047224	013746 	177776 			MOV	@#PS,-(SP)
	047230	112737 	000300 	177776 		MOVB	#300,@#PS
  15236	047236	012704 	001334'			MOV	#TO10Q,R4	;;; START TO 10 QUEUE IF NECESSARY
  15237	047242	021404 				CMP	@R4,R4		;;; CHECK TO SEE IF ALREADY GOING
  15238	047244	001003 				BNE	30$		;;; YES -- JUST ENTER IN QUEUE
  15239	047246	010104 				MOV	R1,R4		;;; NO -- SET NODE ADDRESS
  15240	047250					CALL	.STTNQ		;;; [4.1.1121] START QUEUE
	047250	004737 	032200'			JSR	PC,.STTNQ
  15241	047254				30$:
  15242	047254	013704 	001336'			MOV	TO10Q+2,R4	;;; ENTER QUEUE
  15243	047260					CALL	..NADD		;;; ADD NODE
	047260	004737 	045434'			JSR	PC,..NADD
  15244	047264					.ENB6			;;; ENABLE INTERRUPTS
	047264	012637 	177776 			MOV	(SP)+,@#PS
  15245	047270	012604 				MOV	(SP)+,R4	;;; RESTORE REGISTERS
  15246	047272	012601 				MOV	(SP)+,R1
  15247	047274	012600 				MOV	(SP)+,R0
  15248	047276	012605 				MOV	(SP)+,R5
  15249	047300	000241 				CLC			; CLEAR C
  15250	047302				40$:				; [4.2208]
  15251	047302					RETURN			; RETURN TO CALLER
	047302	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 279
SCOMM MODULE -- ..STQ	(STORE IN TO 10 QUEUE)

  15253						.SBTTL	SCOMM MODULE -- ..STQ	(STORE IN TO 10 QUEUE)
  15254
  15255					;+
  15256					; ..STQ -- SUBROUTINE TO STORE IN THE TO 10 QUEUE AND GET ANOTHER BUFFER
  15257					;	   FOR TRANSFERRING TO THE TO 10 QUEUE.
  15258					;
  15259					; INIAN -- SPECIAL ENTRY POINT FOR INITIALIZATION, IT SHOULD BE
  15260					;	   USED BY NO OTHERS!!
  15261					;
  15262					; CALLING SEQUENCE:
  15263					;
  15264					;	.CP?? MUST BE SETUP TO THE LAST QUEUE ENTRY
  15265					;	CALL	..STQ
  15266					;
  15267					; EXIT CONDITIONS:
  15268					;
  15269					;	.CP?? IS SET UP TO POINT TO A NEW QUEUE
  15270					;-
  15271
  15272						.ENABL	LSB
  15273
  15274	047304				..STQ::
  15275	047304	010046 				MOV	R0,-(SP)	; SAVE REGISTERS
  15276	047306	010146 				MOV	R1,-(SP)
  15277	047310	010446 				MOV	R4,-(SP)
  15278	047312	013704 	001270'			MOV	.CRHD,R4	; FIND THE HEADER OF THE CURRENT BUFFER
  15279	047316	013764 	001256'	000006 		MOV	.CRQZ,6(R4)	; SET THE CURRENT QUEUE SIZE IN THE BUFFER
  15280									; AND CHECK TO SEE IF ANYTHING THERE
  15281	047324	001447 				BEQ	40$		; NO -- DON'T ATTEMPT TO SEND TO 10
  15282	047326	012701 	001334'			MOV	#TO10Q,R1	; FIND THE LISTHEAD OF THE TO 10 QUEUE
  15283	047332	021101 				CMP	@R1,R1		; IS THERE AN ENTRY?
  15284	047334	001003 				BNE	10$		; ALREADY STARTED?
  15285	047336					CALL	.STTNQ		; [4.1.1121] START THE QUEUE UP
	047336	004737 	032200'			JSR	PC,.STTNQ
  15286	047342	000404 				BR	20$
  15287						;
  15288	047344				10$:
  15289	047344	022737 	000014 	001264'		CMP	#14,.CRSZ
  15290	047352	101434 				BLOS	40$		; YES -- DON'T QUEUE IT YET
  15291	047354				20$:
  15292	047354	010401 				MOV	R4,R1		; SET UP THE NODE ADDRESS
  15293	047356	013704 	001336'			MOV	TO10Q+2,R4	; SET UP LISTHEAD ADDRESS
  15294	047362					CALL	..NADD		; ADD THE NODE TO THE LIST
	047362	004737 	045434'			JSR	PC,..NADD
  15295	047366				INIAN::
  15296	047366	012701 	000060 			MOV	#E.OPSZ,R1	 ; [4.1.1137] SET UP THE BUFFER SIZE
  15297	047372					CALL	..ALCB		; GET A NODE FROM THE POOL
	047372	004737 	045654'			JSR	PC,..ALCB
  15298	047376	103003 				BCC	30$		; [4.1.1137] ALL OK IF CC-C IS CLEAR
  15299	047400					.CRASH	B03		; ALLOCATION FAILED -- CRASH!
	047400	000004 				IOT
	047402	   102 	   060 	   063 		.ASCIZ	/B03/
	047405	   000
  15300						;
  15301	047406				30$:
  15302	047406	010037 	001270'			MOV	R0,.CRHD	; SET UP THE POINTER TO THE HEAD OF THE BUFFER
  15303	047412	005037 	001262'			CLR	.CPDV		; SET NO DEVICE IN USE
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 279-1
SCOMM MODULE -- ..STQ	(STORE IN TO 10 QUEUE)

  15304	047416	022020 				CMP	(R0)+,(R0)+	; MOVE OVER THE FORWARD/BACKWARD POINTERS
  15305	047420	010120 				MOV	R1,(R0)+	; SET UB NODE SIZE
  15306	047422	005020 				CLR	(R0)+		; SET UP CURRENT SIZE OF Q
  15307	047424	010037 	001266'			MOV	R0,.CRPB	; SET THE CURRENT BUFFER POINTER
  15308	047430	162701 	000012 			SUB	#10.,R1		; DON'T WANT TO INCLUDE HEADER
  15309	047434	010137 	001264'			MOV	R1,.CRSZ	; SET UP SIZE OF QUEUE (MAX)
  15310	047440	005037 	001256'			CLR	.CRQZ		; CLEAR CURRENT QUEUE SIZE
  15311	047444				40$:
  15312	047444	012604 				MOV	(SP)+,R4	; RESTORE REGISTSERS
  15313	047446	012601 				MOV	(SP)+,R1
  15314	047450	012600 				MOV	(SP)+,R0
  15315	047452					RETURN			; RETURN TO CALLER
	047452	000207 				RTS	PC
  15316
  15317						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 280
SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)

  15319						.SBTTL	SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)
  15320
  15321					;+
  15322					; ..WFED -- WAITS FOR EXAMINE/DEPOSIT TRANSFERS AND CHECKS TO SEE
  15323					;	  THAT E-BOX HAS NOT STOPPED OR ENCOUNTERED AN EBUS PARITY ERROR.
  15324					;
  15325					;	ERRORS DETECTED HERE ARE:
  15326					;
  15327					;	1. DEX -- DEPOSIT/EXAMINE TIMED OUT
  15328					;	2. EPE -- EBUS PARITY ERROR
  15329					;	3. CES -- CLOCK ERROR STOP
  15330					;	4. TSP -- KL IS HALTED (STOPPED)
  15331					;
  15332					;	IN THE CASE OF AN EBUS PARITY ERROR OR DEX ERROR, THE TRANSFER IS
  15333					;	RETRIED ONCE.  IF THE RETRY SUCCEEDS, A SNAPSHOT OF THE DTE-20 ON
  15334					;	BOTH THE INITIAL FAILURE AND SUCCESSFUL RETRY ARE LOGGED TO THE
  15335					;	KL.  IF THE RETRY FAILS, THE KL IS RELOADED.  MULTIPLE ERRORS DURING
  15336					;	ANY RETRY ATTEMPT ARE CONSIDERED FATAL.
  15337					;
  15338					;	THE RETRY COUNT/FLAG BYTES ".EBRTY" AND ".DXRTY" ARE CONTIGUOUS AND
  15339					;	ON A WORD BOUNDARY IN LOW CORE.  THE SIGNIFICANCE OF THE CONTENT OF
  15340					;	THESE BYTES IS AS FOLLOWS:
  15341					;
  15342					;		+1 -- NO ERROR
  15343					;		 0 -- RETRY SUCCEEDED, ERROR LOGGING REQUESTED
  15344					;		      (EBUS PARITY ERROR ONLY, DEX ERRORS ARE ALWAYS FATAL)
  15345					;		-1 -- EBUS PARITY ERROR RETRY FAILED OR DEX ERROR, KL RELOAD REQUESTED
  15346					;
  15347					;	THE ACTUAL ERROR LOGGING IS DONE BY THE TERMINAL TASK ON THE SOFTWARE
  15348					;	CLOCK.  A MAXIMUM OF TWO SNAPSHOTS IS ALLOWED IN THE DTE-20 ERROR
  15349					;	LOGGING QUEUE, AS A CONSIDERATION FOR THE FREE-CORE RESOURCE.
  15350					;
  15351					; CALLING SEQUENCE:
  15352					;
  15353					;	CALL	..WFED
  15354					;
  15355					; ENTRY CONDITIONS:
  15356					;
  15357					;	R0 -- ADDRESS OF DTE20
  15358					;	IF ".NOERR" .NE. 0 -- ONLY CHECK TIMEOUT, ELSE CHECK ALL ERRORS
  15359					;
  15360					; EXIT CONDITIONS:
  15361					;
  15362					; SUCCESS:
  15363					;
  15364					;	NO REGISTERS ALTERED CC-C CLEAR
  15365					;
  15366					; NORMAL ERROR CONDITIONS:
  15367					;
  15368					;	CC-C SET -- E-BOX STOPPED (PROTOCOL STOPPED - KS.CES SET IN .KLITK)
  15369					;	CC-C SET -- DEP/EX FAILURE (PROTOCOL STOPPED - KS.DEX SET IN .KLITK)
  15370					;
  15371					;	CC-C CLEAR -- E-BUS PARITY ERROR (PROTOCOL UNCHANGED -- KS.EPE SET IN .KLITK)
  15372					;	CC-C CLEAR -- TEN STOPPED (PROTOCOL STOPPED -- KS.TSP SET IN .KLITK)
  15373					;
  15374					; SPECIAL ERROR CONDITIONS:
  15375					;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 280-1
SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)

  15376					;	TIMEOUT AND ".NOERR" .NE. 0 - CC-C SET
  15377					;
  15378					; NOTE:
  15379					;
  15380					;	**** THIS ROUTINE MUST BE ENTERED AT PRI6 ****
  15381					;-
  15382
  15383	047454				..WFED::
  15384	047454	010146 				MOV	R1,-(SP)	;;; [4.2217] SAVE R1
  15385	047456	010246 				MOV	R2,-(SP)	;;; [4.2217] AND R2
  15386	047460	010546 				MOV	R5,-(SP)	;;; [5.1008] AND R5
  15387	047462	012705 	001372'			MOV	#.DXRTY,R5	;;; [5.1008] FOR EXIT CODE
  15388	047466	012715 	000401 			MOV	#401,(R5)	;;; [5.1008] INIT THE RETRY FLAGS
  15389					;
  15390					; REGISTER USAGE:
  15391					;
  15392					;	R0 -- DTE-20 BASE ADDRESS
  15393					;	R1 -- POINTS TO FIRST FREE WORD IN ERROR LOGGING PACKET
  15394					;	R2 -- POINTER TO DTE-20 "TENAD1" REGISTER ON RETRY
  15395					;	R5 -- POINTER TO ERROR FLAGS BYTES
  15396					;
  15397	047472				10$:
  15398	047472	012737 	003000 	001352'		MOV	#3000,DEXST	;;; [4.2217] SET UP TIMEOUT COUNT
  15399					;
  15400					; TIMEOUT A DEPOSIT OR EXAMINE
  15401					;
  15402	047500				15$:
  15403	047500	032760 	000004 	000034 		BIT	#DEXDON,STATD(R0) ;;; [4.2217] TRANSFER COMPLETED??
  15404	047506	001030 				BNE	25$		;;; [4.2217] YES -- GO ON
  15405	047510	005337 	001352'			DEC	DEXST		;;; [4.2217] NO -- TIMED OUT??
  15406	047514	001371 				BNE	15$		;;; [4.2217] NO -- GO ON
  15407					;
  15408					; HERE TO CHECK TIMEOUT ERRORS
  15409					;
  15410	047516	005060 	000030 			CLR	DAG1(R0)	;;; [4.2217] YES -- CLEAR FLAGS
  15411	047522	105737 	001122'			TSTB	.NOERR		;;; [4.2217] IGNORE ERRORS??
  15412	047526	001110 				BNE	60$		;;; [4.2217] YES -- FLAG TIMEOUT AND EXIT
  15413	047530	032760 	004000 	000030 		BIT	#DS04,DAG1(R0)	;;; [4.2217] NO -- CLOCK ERROR STOP??
  15414	047536	001404 				BEQ	20$		;;; [4.2217] NO -- GO ON
  15415	047540	052737 	000002 	001126'		BIS	#KS.CES,.KLITK	;;; [4.2217] YES -- FLAG IT
  15416	047546	000472 				BR	55$		;;; [4.2217] AND EXIT
  15417						;
  15418	047550				20$:
  15419	047550	052737 	000010 	001126'		BIS	#KS.DEX,.KLITK	;;; [4.2217] SET DEPOSIT/EXAMINE FAILURE
  15420	047556	105437 	001372'			NEGB	.DXRTY		;;; [4.1.1065] DEX ERRORS ARE ALWAYS FATAL
  15421	047562					CALL	DTESNP		;;; [5.1008] SNAPSHOT THE DTE-20
	047562	004737 	047772'			JSR	PC,DTESNP
  15422	047566	000462 				BR	55$		;;; [5.1008] AND CRASH HIM
  15423						;
  15424					;
  15425					; HERE TO CHECK NON-TIMEOUT ERRORS
  15426					;
  15427	047570				25$:
  15428	047570	105737 	001122'			TSTB	.NOERR		;;; [4.2217] IGNORE ERRORS??
  15429	047574	001066 				BNE	65$		;;; [4.2217] YES -- JUST EXIT
  15430	047576	032760 	000020 	000034 		BIT	#BPARER,STATD(R0) ;;; [4.2217] EBUS PARITY ERROR??
  15431	047604	001422 				BEQ	40$		;;; [5.1008] NO -- SEE ABOUT OTHER ERRORS
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 280-2
SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)

  15432					;
  15433					; HERE TO SNAPSHOT AN EBUS PARITY ERROR
  15434					;
  15435	047606				30$:
  15436	047606	052737 	000004 	001126'		BIS	#KS.EPE,.KLITK	;;; [4.2217] FLAG THE EBUS PARITY ERROR
  15437	047614					CALL	DTESNP		;;; [4.2217] GET THE ADDRESS AND DATA
	047614	004737 	047772'			JSR	PC,DTESNP
  15438	047620	103445 				BCS	55$		;;; [5.1008] ERROR IF CC-C IS SET
  15439	047622	105337 	001373'			DECB	.EBRTY		;;; [5.1008] IS THIS A RETRY??
  15440	047626	100442 				BMI	55$		;;; [5.1008] YES -- ONLY ONE ALLOWED
  15441	047630	105737 	001372'			TSTB	.DXRTY		;;; [5.1008] NO -- MULTIPLE ERRORS??
  15442	047634	002437 				BLT	55$		;;; [5.1008] YES -- CRASH HIM
  15443					;
  15444					; HERE TO RETRY A TRANSFER
  15445					;
  15446	047636				35$:
  15447	047636	012760 	000100 	000032 		MOV	#DRESET,DAG2(R0) ;;; [4.2217] NO -- RESET THE DTE-20
  15448	047644	011222 				MOV	(R2),(R2)+	;;; [4.2217] AND RESTART THE TRANSFER
  15449	047646	011212 				MOV	(R2),(R2)	;;; [4.2217] SO
  15450	047650	000710 				BR	10$		;;; [4.2217] TIME THE RETRY OUT
  15451						;
  15452					;
  15453					; HERE TO CHECK OTHER NON-TIMEOUT ERRORS
  15454					;
  15455	047652				40$:
  15456	047652	005060 	000030 			CLR	DAG1(R0)	;;; [4.2217] RESET FLAGS
  15457	047656	105737 	001123'			TSTB	.NOHLT		;;; [4.2217] HALTS ALLOWED??
  15458	047662	001010 				BNE	45$		;;; [4.2217] YES -- JUST EXIT
  15459	047664	032760 	001000 	000030 		BIT	#DS06,DAG1(R0)	;;; [4.2217] NO -- IS THE KL HALTED??
  15460	047672	001404 				BEQ	45$		;;; [4.2217] NO -- JUST EXIT
  15461	047674	052737 	000001 	001126'		BIS	#KS.TSP,.KLITK	;;; [4.2217] YES -- FLAG THE ERROR
  15462	047702	000414 				BR	55$		;;; [5.1008] AND FLAG THE RELOAD
  15463						;
  15464					;
  15465					; HERE FOR NORMAL EXIT
  15466					;
  15467	047704				45$:
  15468	047704	105737 	001373'			TSTB	.EBRTY		;;; [5.1008] DID WE RECOVER AN EBUS PARITY ERROR??
  15469	047710	001020 				BNE	65$		;;; [5.1008] NO -- JUST EXIT
  15470					;
  15471					; HERE TO SNAPSHOT A RECOVERED EBUS PARITY ERROR
  15472					;
  15473	047712				50$:
  15474	047712					CALL	DTESNP		;;; [4.2217] YES -- SAVE RECOVERED DATA
	047712	004737 	047772'			JSR	PC,DTESNP
  15475	047716	042737 	000004 	001126'		BIC	#KS.EPE,.KLITK	;;; [5.1008] RESET TKTN FLAGS
  15476	047724	042765 	000200 	177776 		BIC	#DV.URE,-2(R5)	;;; [5.1008] RESET UNRECOVERABLE FLAG
  15477	047732	000407 				BR	65$		;;; [5.1008] TAKE NORMAL EXIT
  15478						;
  15479					;
  15480					; HERE ON A FATAL ERROR
  15481					;
  15482	047734				55$:
  15483	047734	105237 	001122'			INCB	.NOERR		;;; [4.2217] RECOGNIZE THE ERROR
  15484	047740					CALL	..DTSP		;;; [4.2217] STOP ALL PROTOCOLS
	047740	004737 	050226'			JSR	PC,..DTSP
  15485	047744	105237 	001124'			INCB	.TKTN		;;; [4.2217] REQUEST NOTIFICATION
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 280-3
SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)

  15486					;
  15487					; ERROR EXIT
  15488					;
  15489	047750				60$:
  15490	047750	000261 				SEC			;;; [4.2217] SET ERROR RETURN
  15491					;
  15492					; NORMAL EXIT
  15493					;
  15494	047752				65$:
  15495	047752	113725 	001372'			MOVB	.DXRTY,(R5)+	;;; [5.1008] SET THE RETRY FLAGS
  15496	047756	113715 	001373'			MOVB	.EBRTY,(R5)	;;; [5.1008] SO
  15497	047762	012605 				MOV	(SP)+,R5	;;; [5.1008] RESTORE R5
  15498	047764	012602 				MOV	(SP)+,R2	;;; [4.2217] RESTORE REGISTERS
  15499	047766	012601 				MOV	(SP)+,R1	;;; [4.2217] SO
  15500	047770					RETURN			;;; [4.2217] TO CALLER
	047770	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 281
SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)

  15502					;
  15503					; INTERNAL SUBROUTINE TO SNAPSHOT THE DTE-20
  15504					;
  15505					;	THIS ROUTINE WILL INITIALIZE AND APPEND TO A DTE-20 ERROR LOGGING
  15506					;	PACKET.  AFTER THE FIRST INVOCATION FOR EACH ERROR, THIS ROUTINE
  15507					;	RETURNS:
  15508					;
  15509					;	R1 -- POINTS TO FIRST FREE WORD IN RETRY SNAPSHOT
  15510					;	R2 -- POINTS TO "TENAD1" REGISTER IN THE DTE-20
  15511					;	R5 -- POINTS TO FLAGS WORD IN ERROR LOGGING PACKET
  15512					;
  15513
  15514	047772				DTESNP:
  15515	047772	010046 				MOV	R0,-(SP)	;;; [4.2217] SAVE THE DTE-20 POINTER
  15516	047774	005737 	001012'			TST	.COMEF+2	;;; [4.1.1105] IS PRIMARY PROTOCOL RUNNING??
  15517	050000	100045 				BPL	50$		;;; [4.1.1105] NO -- JUST EXIT
  15518	050002	105737 	001373'			TSTB	.EBRTY		;;; [5.1008] YES -- IS THIS AN EBUS PARITY ERROR RETRY??
  15519	050006	001436 				BEQ	30$		;;; [5.1008] YES -- GO ON
  15520	050010	023727 	001376'	000002 		CMP	.EBPEC,#2	;;; [5.1008] NO -- IS THE QUEUE FULL??
  15521	050016	001436 				BEQ	50$		;;; [5.1008] YES -- NO MORE ALLOWED
  15522	050020	005237 	001376'			INC	.EBPEC		;;; [5.1008] NO -- COUNT THIS NODE
  15523	050024	012701 	000112 			MOV	#112,R1		;;; [4.2217] NO -- SET UP BUFFER SIZE
  15524	050030					CALL	..ALCB		;;; [4.2217] ALLOCATE A BLOCK
	050030	004737 	045654'			JSR	PC,..ALCB
  15525	050034	103427 				BCS	50$		;;; [4.2217] ERROR IF CC-C IS SET
  15526	050036	010046 				MOV	R0,-(SP)	;;; [5.1008] SAVE NODE POINTER
  15527	050040	012700 	001374'			MOV	#.EBPEQ,R0	;;; [5.1008] MOVE THE LISTHEAD POINTER TO R0
  15528	050044				10$:
  15529	050044	011002 				MOV	(R0),R2		;;; [5.1008] FIND THE END OF THE LIST
  15530	050046	001402 				BEQ	20$		;;; [5.1008] FOUND IT -- GO ON
  15531	050050	010200 				MOV	R2,R0		;;; [5.1008] NOT YET -- KEEP GOING
  15532	050052	000774 				BR	10$		;;; [5.1008] TRY AGAIN
  15533						;
  15534	050054				20$:
  15535	050054	011610 				MOV	(SP),(R0)	;;; [5.1008] SET THE NODE IN THE LIST
  15536	050056	012600 				MOV	(SP)+,R0	;;; [5.1008] RESTORE NODE POINTER
  15537	050060	005020 				CLR	(R0)+		;;; [5.1008] CLEAR AND GET OVER THE LINKAGE
  15538	050062	010120 				MOV	R1,(R0)+	;;; [4.2217] SET THE NODE SIZE
  15539	050064	012720 	000106 			MOV	#106,(R0)+	;;; [5.1008] SET THE TRANSFER SIZE
  15540	050070	012720 	000300 			MOV	#DV.LOG!DV.URE,(R0)+ ;;; [5.1008] SET STANDARD STATUS
  15541	050074	010005 				MOV	R0,R5		;;; [5.1008] COPY FLAG POINTER TO R5
  15542	050076	005020 				CLR	(R0)+		;;; [5.1008] INIT AND GET OVER THE FLAGS
  15543	050100	010001 				MOV	R0,R1		;;; [4.2217] BUFFER POINTER TO R1
  15544	050102	011600 				MOV	(SP),R0		;;; [4.2217] RESTORE DTE-20 POINTER
  15545	050104				30$:
  15546	050104	012702 	000020 			MOV	#20,R2		;;; [4.2217] INIT LOOP COUNTER
  15547	050110				40$:
  15548	050110	012021 				MOV	(R0)+,(R1)+	;;; [4.2217] SNAPSHOT THE DTE-20
  15549	050112	077202 				SOB	R2,40$		;;; [4.2217] SO
  15550	050114				50$:
  15551	050114	011602 				MOV	(SP),R2		;;; [4.2217] GET DTE-20 POINTER
  15552	050116	062702 	000010 			ADD	#TNAD1,R2	;;; [4.2217] POINT TO THE ADDRESS WORDS
  15553	050122	012600 				MOV	(SP)+,R0	;;; [4.2217] RESTORE R0
  15554	050124					RETURN			;;; [4.2217] TO CALLER
	050124	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 282
SCOMM MODULE -- ..SWED	(START AND WAIT FOR EXAMINE/DEPOSIT)

  15556						.SBTTL	SCOMM MODULE -- ..SWED	(START AND WAIT FOR EXAMINE/DEPOSIT)
  15557
  15558					;+
  15559					; ..SWED -- STARTS A DEPOSIT/EXAMINE SEQUENCE AND WAITS FOR ITS COMPLETION.
  15560					;
  15561					;	NOTE: **** THIS ROUTINE MUST BE ENTERED AT PRI6 ****
  15562					;
  15563					; CALLING SEQUENCE:
  15564					;
  15565					;	R0 -- ADDRESS OF DTE-20
  15566					;	R1 -- HIGH ORDER EXAMINE/DEPOSIT ADDRESS WORD (FOR TENAD1)
  15567					;	R2 -- LOW ORDER EXAMINE/DEPOSIT ADDRESS WORD (FOR TENAD2)
  15568					;	R3 -- ADDRESS TO TRANSFER 3 WORD BLOCK TO OR FROM
  15569					;
  15570					;	CALL	..SWED
  15571					;
  15572					; EXIT CONDITIONS:
  15573					;
  15574					;	SUCCESS -- NO REGISTERS ALTERED, CC-C CLEAR
  15575					;
  15576					;	FAILURE -- NO REGISTERS ALTERED, CC-C SET
  15577					;-
  15578
  15579	050126				..SWED::
  15580	050126	010346 				MOV	R3,-(SP)	;;; SAVE REGISTERS
  15581	050130	032701 	010000 			BIT	#DEP,R1		;;; CHECK FOR DEPOSIT
  15582	050134	001016 				BNE	10$		;;; YES -- GO TO DEPOSIT PART OF SUBROUTINE
  15583					;
  15584					;	HERE TO START AN EXAMINE
  15585					;
  15586	050136	010160 	000010 			MOV	R1,TNAD1(R0)	;;; NO -- SET UP ADDRESS OF TRANSFER IN DTE
  15587	050142	010260 	000012 			MOV	R2,TNAD2(R0)	;;; START TRANSFER
  15588	050146					CALL	..WFED		;;; WAIT FOR EXAMINE/DEPOSIT
	050146	004737 	047454'			JSR	PC,..WFED
  15589	050152	103423 				BCS	20$		;;; COMPLAIN ABOUT ERRORS
  15590	050154					MTPS	DXWD3(R0),(R3)+	;;; STORE THE WORD TRANSFERED
	050154	016023 	000002 			MOV	DXWD3(R0),(R3)+
  15591	050160					MTPS	DXWD2(R0),(R3)+
	050160	016023 	000004 			MOV	DXWD2(R0),(R3)+
  15592	050164					MTPS	DXWD1(R0),(R3)+
	050164	016023 	000006 			MOV	DXWD1(R0),(R3)+
  15593	050170	000414 				BR	20$		;;; ALL DONE.
  15594						;
  15595					;
  15596					;	HERE TO START A DEPOSIT
  15597					;
  15598	050172				10$:
  15599	050172					MFPS	(R3)+,DXWD3(R0) ;;; TRANSFER TO 10
	050172	012360 	000002 			MOV	(R3)+,DXWD3(R0)
  15600	050176					MFPS	(R3)+,DXWD2(R0) ;;; SET UP WORD IN DTE
	050176	012360 	000004 			MOV	(R3)+,DXWD2(R0)
  15601	050202					MFPS	(R3)+,DXWD1(R0)	;;; SO
	050202	012360 	000006 			MOV	(R3)+,DXWD1(R0)
  15602	050206	010160 	000010 			MOV	R1,TNAD1(R0)	;;; SET HIGH ORDER ADDRESS
  15603	050212	010260 	000012 			MOV	R2,TNAD2(R0)	;;; START THE TRANSFER
  15604	050216					CALL	..WFED		;;; WAIT FOR EXAMINE/DEPOSIT
	050216	004737 	047454'			JSR	PC,..WFED
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 282-1
SCOMM MODULE -- ..SWED	(START AND WAIT FOR EXAMINE/DEPOSIT)

  15605	050222				20$:
  15606	050222	012603 				MOV	(SP)+,R3	;;; RESTORE R3
  15607	050224					RETURN			;;; RETURN TO CALLER
	050224	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 283
SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)

  15609						.SBTTL	SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)
  15610
  15611					;+
  15612					; ..DTSP -- SUBROUTINE TO TURN OFF PRIMARY AND SECONDARY PROTOCOLS.
  15613					;	    THIS REQUIRES TURNING OFF THE DTE INTERRUPT.
  15614					;
  15615					; CALLING SEQUENCE:
  15616					;
  15617					;	CALL	..DTSP
  15618					;
  15619					; EXIT CONDITIONS:
  15620					;
  15621					;	SUCCESS IS ASSURED, CC-C IS CLEARED
  15622					;	NO REGISTERS ALTERED
  15623					;	THERE ARE NO ERRORS
  15624					;-
  15625
  15626						.ENABL	LSB
  15627
  15628	050226				..DTSP::
  15629	050226	012777 	000010 	131130 		MOV	#INTROF,@.PRSTA	;; TURN OFF DTE INTERRUPTS
  15630	050234	042737 	120000 	001012'		BIC	#EF.PR1!EF.PR2,.COMEF+2 ;; AND PROTOCOLS
  15631	050242	000421 				BR	30$		;; AND EXIT
  15632						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 284
SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)

  15634						.SBTTL	SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)
  15635
  15636					;+
  15637					; ..DTP2 -- SUBROUTINE TO TURN ON SECONDARY PROTOCOL.
  15638					;	    A CHECK IS MADE TO MAKE SURE PRIMARY PROTOCOL IS OFF.
  15639					;
  15640					; CALLING SEQUENCE:
  15641					;
  15642					;	CALL	..DTP2
  15643					;
  15644					; EXIT CONDITIONS:
  15645					;
  15646					;	SUCCESS IS ASSURED, CC-C IS CLEARED
  15647					;	NO REGISTERS ALTERED
  15648					;	THERE ARE NO ERRORS
  15649					;-
  15650
  15651	050244				..DTP2::
  15652	050244	005737 	001012'			TST	.COMEF+2	;; [4.1.1105] IF PRIMARY PROTOCOL IS ON,
  15653	050250	100002 				BPL	10$		;; [4.1.1105] THEN
  15654	050252					CALL	..DTSP		;; TURN IT OFF
	050252	004737 	050226'			JSR	PC,..DTSP
  15655	050256				10$:
  15656	050256	012777 	004010 	131100 		MOV	#INTROF!INT11S,@.PRSTA ;; DISABLE INTERRUPTS
  15657	050264	052737 	020000 	001012'		BIS	#EF.PR2,.COMEF+2 ;; LET THE BOOT PROTOCOL TASK GO
  15658	050272	000403 				BR	20$		;; AND RETURN
  15659						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 285
SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)

  15661						.SBTTL	SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)
  15662
  15663					;+
  15664					; ..DTP1 -- SUBROUTINE TO TURN ON PRIMARY PROTOCOL.
  15665					;
  15666					; CALLING SEQUENCE:
  15667					;
  15668					;	CALL	..DTP1
  15669					;
  15670					; EXIT CONDITIONS:
  15671					;
  15672					;	SUCCESS IS ASSURED , CC-C IS CLEARED
  15673					;	NO REGISTERS ALTERED
  15674					;	THERE ARE NO ERRORS
  15675					;-
  15676
  15677	050274				..DTP1::
  15678	050274	052737 	100000 	001012'		BIS	#EF.PR1,.COMEF+2 ;; ENABLE THE PRIMARY PROTOCOL TASK
  15679	050302				20$:
  15680	050302					CALL	..DSEV		;; DECLARE A SIGNIFICANT EVENT
	050302	004737 	045264'			JSR	PC,..DSEV
  15681	050306				30$:
  15682	050306	000241 				CLC			;; MAKE SURE CC-C
  15683	050310					RETURN			;; AND RETURN
	050310	000207 				RTS	PC
  15684
  15685						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 286
SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)

  15687						.SBTTL	SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)
  15688
  15689					;+
  15690					; ..VXFR -- ROUTINE TO VALIDATE A USER'S TRANSFER REQUEST
  15691					;
  15692					;	..VXFR CHECKS TO SEE IF A USER'S REQUEST TO TRANSFERINTO OR OUT
  15693					;	OF HIS SPACE IS LEGAL.  ..VXFR WILL CHECK TO SEE THAT TRANSFERS
  15694					;	ACROSS VIRTUAL BOUNDARIES ARE ALSO TRANSFERS IN CONTIGUOUS CORE.
  15695					;	THIS MEANS THAT AFTER VALIDATION A HANDLER TASK DOES NOT HAVE TO
  15696					;	WORRY ABOUT THE VALIDITY OF TRANSFERING A CONTIGUOUS BLOCK OF
  15697					;	CORE INTO THE USER'S AREA.  ..VXFR WILL ALSO RETURN TO THE CALLER
  15698					;	THE PHYSICAL 18 BIT ADDRESS OF THE USER'S BUFFER.  ..VXFR WILL NOT
  15699					;	LET THE USER TRANSFER INTO READ-ONLY SPACE IF THE DIRECTION
  15700					;	SPECIFIED BY THE HANDLER IS WRITE.
  15701					;
  15702					; CALLING SEQUENCE:
  15703					;
  15704					;	R1 -- REQUEST NODE ADDRESS
  15705					;	R2 -- STARTING ADDRESS (VIRTUAL)
  15706					;	R3 -- TRANSFER LENGTH
  15707					;
  15708					;	CALL	..VXFR
  15709					;
  15710					; EXIT CONDITIONS:
  15711					;
  15712					;	R4 -- HIGH ORDER ADDRESS (BITS 4,5)
  15713					;	R5 -- LOW ORDER ADDRESS
  15714					;
  15715					;	ERROR EXIT -- CC-C SET
  15716					;-
  15717
  15719	050312				..VXFR::
  15720	050312	010205 				MOV	R2,R5		; IF NOT KT11 THEN JUST RETURN CURRENT ADDRESS
  15721	050314	005004 				CLR	R4
  15722	050316					RETURN
	050316	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 287
SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)

  15841						.SBTTL	SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)
  15842
  15843					;+
  15844					; ..BLXO -- ROUTINE TO PASS INFORMATION TO A USER'S PARTITION
  15845					;
  15846					;	..BLXO VALIDATES THE TRANSFER OF THE REQUEST TO TRANSFER
  15847					;	TO OR FROM A HANDLER TASK'S AREA.
  15848					;
  15849					; ..BLXI -- ROUTINE TO PASS INFORMATION FROM A TASK'S PARTITION
  15850					;
  15851					;	..BLXI VALIDATES THE TRANSFER OF THE REQUEST TO TRANSFER
  15852					;	TO A HANDLER TASK'S AREA.
  15853					;
  15854					; CALLING SEQUENCE:
  15855					;
  15856					;	R1 -- REQUEST NODE ADDRESS
  15857					;	R2 -- STARTING ADDRESS (VIRTUAL)
  15858					;	R3 -- TRANSFER LENGTH (BYTES)
  15859					;	R4 -- HANDLER VIRTUAL ADDRESS
  15860					;
  15861					;	CALL	..BLXO
  15862					;
  15863					;	-  OR --
  15864					;
  15865					;	CALL ..BLXI
  15866					;
  15867					; NOTE -- RESTRICTED TO 4K-64 (10) WORD TRANSFER'S
  15868					;-
  15869
  15870	050320				..BLXI::
  15871	050320	010446 				MOV	R4,-(SP)
  15872	050322	010546 				MOV	R5,-(SP)
  15873	050324	012705 	000001 			MOV	#1,R5		; SET DIRECTION OF TRANSFER TO IN
  15874	050330	000403 				BR	BLXCOM		; AND ENTER COMMON CODE
  15875						;
  15876	050332				..BLXO::
  15877	050332	010446 				MOV	R4,-(SP)	; SAVE THE REGISTERS
  15878	050334	010546 				MOV	R5,-(SP)
  15879	050336	005005 				CLR	R5		; INDICATE TRANSFER OUT
  15880	050340				BLXCOM:
  15881	050340	010546 				MOV	R5,-(SP)	; SAVE THE DIRECTION OF TRANSFER
  15882	050342					CALL	..VXFR		; VALADATE TRANSFER
	050342	004737 	050312'			JSR	PC,..VXFR
  15895	050346	010346 				MOV	R3,-(SP)	; SAVE R3
  15900	050350	016604 	000006 			MOV	6(SP),R4	; SET UP THE FROM ADDRESS
  15901	050354	005766 	000002 			TST	2(SP)
  15903	050360	001403 				BEQ	BLXPLP		; DIRECTION OK FOR OUTPUT --DO TRANSFER
  15910	050362	010546 				MOV	R5,-(SP)
  15911	050364	010405 				MOV	R4,R5
  15912	050366	012604 				MOV	(SP)+,R4
  15914	050370				BLXPLP:
  15915	050370	112425 				MOVB	(R4)+,(R5)+	; MOVE A BYTE
  15916	050372	077302 				SOB	R3,BLXPLP	; YES -- FINISHED?
  15917	050374	012603 				MOV	(SP)+,R3	; RESTORE R3
  15922									; CLEAR C BIT TO INDICATE LEGAL TRANSFER
  15923	050376	005726 				TST	(SP)+		; REMOVE THE DIRECTION WORD FROM THE STACK
  15924	050400				BLXRTN:
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 287-1
SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)

  15925	050400	012605 				MOV	(SP)+,R5	; RESTORE REGISTERS
  15926	050402	012604 				MOV	(SP)+,R4
  15927	050404					RETURN			; RETURN TO CALLER
	050404	000207 				RTS	PC
  15928					;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 288
SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL

  15938						.SBTTL	SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL)
  15939
  15940					;+
  15941					;
  15942					;CALL:	JSR	PC,..VTOL	;CLOSED, RETURN IN-LINE
  15943					;
  15944					;IN:	R1 - POINTER TO REQUEST NODE, CONTAINING:
  15945					;	R.AT - ATL OF CALLING TASK
  15946					;	R.LU - LUN HAVING WINDOW IN LUT(N2)
  15947					;	R.FC - I/O FUNCTION CODE, VIRTUAL READ OR WRITE
  15948					;	R.PB+6,+10 - VIRTUAL BLOCK NUMBER TO MAP
  15949					;
  15950					;OUT:	C=0 - MAPPING SUCCESSFUL
  15951					;	R1 - POINTER TO REQUEST NODE, CONTAINING
  15952					;	R.FC - I/O FUNCTION CODE, LOGICAL READ OR WRITE
  15953					;	R.PB+6,+10 - LOGICAL BLOCK NUMBER MAPPED
  15954					;
  15955					;	C=1 MAPPING FAILURE
  15956					;
  15957					;NOTE:	THIS LIBRARY ROUTINE USES THE FOLLOWING
  15958					;	OTHER LIBRARY ROUTINES---
  15959					;
  15960					;	..VVLL - INTERNAL VIRTUAL TO LOGICAL FILE FUNCTION
  15961					;
  15962					;-
  15963
  15964	050406				..VTOL::
  15965	050406	010046 				MOV	R0,-(SP)	;SAVE WORKING REGISTERS
  15966	050410	010146 				MOV	R1,-(SP)
  15967	050412	010246 				MOV	R2,-(SP)
  15968	050414	010346 				MOV	R3,-(SP)
  15969	050416	010446 				MOV	R4,-(SP)
  15970
  15971					; GET WINDOW POINTER FROM LUT(N2) IN TASK HEADER
  15972
  15973	050420	010104 				MOV	R1,R4		; SAVE POINTER TO REQUEST NODE
  15974	050422	016402 	000006 			MOV	R.AT(R4),R2	; POINT TO ATL NODE
  15975	050426	116403 	000012 			MOVB	R.LU(R4),R3	; GET LUN
  15976	050432	006303 				ASL	R3
  15977	050434	006303 				ASL	R3
  15978	050436	066203 	000012 			ADD	A.HA(R2),R3	; !!!!!DOESN'T WORK IF MACY11 CONDITIONAL IS OFF
  15979	050442	016301 	000130 			MOV	H.LUT(R3),R1	; GET WINDOW POINTER FROM LUT
  15980	050446	001441 				BEQ	30$		; NO WINDOW, NO MAP....
  15981	050450	030127 	000001 			BIT	R1,#1		; SEE IF WINDOW POINTER IS ODD
  15982	050454	001036 				BNE	30$		; ECCCHH!
  15983
  15984					; SEE IF THIS IS A READ OR WRITE AND CHECK PERMISSIONS APPROPRIATELY.
  15985
  15986	050456	012746 	001000 			MOV	#IO.RLB,-(SP)	; SET UP FOR A READ
  15987	050462	026427 	000014 	010400 		CMP	R.FC(R4),#IO.RVB ; SEE IF IT IS A READ
  15988	050470	001405 				BEQ	10$		; YES
  15989	050472	012716 	000400 			MOV	#IO.WLB,(SP)	; NO, MUST BE A WRITE
  15990	050476	031127 	001000 			BIT	(R1),#WI.WRV	; SEE IF THE FILE IS WRITE ACCESSED
  15991	050502	001422 				BEQ	20$		; IF NOT, CAN'T WRITE IT
  15992
  15993					; NOW DO THE MAPPING ALREADY
  15994
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 288-1
SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL

  15995	050504				10$:
  15996	050504	016400 	000026 			MOV	R.PB+2(R4),R0	; GET BYTE COUNT
  15997	050510	016402 	000032 			MOV	R.PB+6.(R4),R2	; HIGH ORDER VBN
  15998	050514	016403 	000034 			MOV	R.PB+8.(R4),R3	; LOW ORDER VBN
  15999	050520					CALL	..VVLL		; CALL THE MAPPER
	050520	004737 	050570'			JSR	PC,..VVLL
  16000	050524	103411 				BCS	20$		; NO SUCH LUCK
  16001	050526	005700 				TST	R0		; CHECK IF MAPPING IS COMPLETE
  16002	050530	001007 				BNE	20$		; NO
  16003
  16004					; SUCCESSFUL MAPPING - TURN THE NODE INTO A LOGICAL TRANSFER
  16005
  16006	050532	010264 	000032 			MOV	R2,R.PB+6.(R4)	; SET HIGH ORDER LBN
  16007	050536	010364 	000034 			MOV	R3,R.PB+8.(R4)	; SET LOW ORDER LBN
  16008	050542	012664 	000014 			MOV	(SP)+,R.FC(R4)	; SET FUNCTION CODE
  16009	050546	000402 				BR	40$
  16010						;
  16011	050550				20$:
  16012	050550	005726 				TST	(SP)+		; CLEAN THE STACK
  16013	050552				30$:
  16014	050552	000261 				SEC			; SET FAILURE
  16015	050554				40$:
  16016	050554	012604 				MOV	(SP)+,R4	; RESTORE REGISTERS
  16017	050556	012603 				MOV	(SP)+,R3
  16018	050560	012602 				MOV	(SP)+,R2
  16019	050562	012601 				MOV	(SP)+,R1
  16020	050564	012600 				MOV	(SP)+,R0
  16021	050566					RETURN
	050566	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 289
SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL

  16023						.SBTTL	SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL)
  16024
  16025					;+
  16026					;
  16027					;CALL:	JSR	PC,..VVLL	;CLOSED, RETURN IN-LINE
  16028					;
  16029					;IN:	R0 - NUMBER OF BYTES IN TRANSFER
  16030					;	R1 - ADDRESS OF WINDOW
  16031					;	R2,R3 - VBN TO MAP
  16032					;
  16033					;OUT:	SUCCESS - C=0
  16034					;	R0 - NUMBER OF BLOCKS NOT MAPPED
  16035					;	R2,R3 - LOGICAL BLOCK NUMBER DESIRED
  16036					;
  16037					;	FAILURE - C=1
  16038					;	R0,R2,R3 - GARBAGED
  16039					;
  16040					;NOTE:	THIS ROUTINE MAKES NO EXTERNAL CALLS.
  16041					;	THIS ROUTINES IS USED BY---
  16042					;
  16043					;	..VTOL	EXTERNAL VIRTUAL TO LOGICAL MAPPER
  16044					;		WINDOW TURN FILE CONTROL PRIMITIVE
  16045					;		INDEX FILE FILE CONTROL UTILITY
  16046					;
  16047					;-
  16048
  16049	050570				..VVLL::
  16050	050570	010146 				MOV	R1,-(SP)	; SAVE WORKING REGISTERS
  16051	050572	010446 				MOV	R4,-(SP)
  16052	050574	010546 				MOV	R5,-(SP)
  16053	050576					.INH0			; INHIBIT TASK SWITCHING
	050576	013746 	177776 			MOV	@#PS,-(SP)
	050602	112737 	000140 	177776 		MOVB	#140,@#PS
  16054	050610	062700 	000777 			ADD	#511.,R0	;; ROUND UP BYTE COUNT TO NEXT BLOCK
  16055	050614	006000 				ROR	R0		;; RECOVER CARRY
  16056	050616	105000 				CLRB	R0		;; CLEAR FRACTIONAL PART
  16057	050620	000300 				SWAB	R0		;; AND CONVERT TO BLOCK COUNT
  16058
  16059					; GET STARTING VBN OF CURRENT WINDOW
  16060
  16061	050622	111104 				MOVB	(R1),R4		;; GET COUNT OF RETRIEVAL POINTERS
  16062	050624	001417 				BEQ	40$		;; EMPTY WINDOW
  16063	050626	062701 	000006 			ADD	#W.VBN,R1	;; POINT TO STARTING VBN IN WINDOW
  16064	050632	012105 				MOV	(R1)+,R5	;; GET HIGH ORDER VBN
  16065	050634	042705 	177400 			BIC	#177400,R5	;; MASK OFF HIGH BYTE
  16066	050640	160502 				SUB	R5,R2		;; SUBTRACT FROM DESIRED VBN
  16067	050642	162103 				SUB	(R1)+,R3	;; SUBTRACT LOW ORDER
  16068	050644	005602 				SBC	R2		;; AND THE CARRY
  16069	050646	002406 				BLT	40$		;; WINDOW IS PAST VBN - OUT
  16070
  16071					; NOW SCAN THE WINDOW FOR THE DESIRED VBN
  16072
  16073	050650				10$:
  16074	050650	161103 				SUB	(R1),R3		;; ACCUMULATE BLOCK COUNT
  16075	050652	005602 				SBC	R2
  16076	050654	103407 				BLO	20$		;; BRANCH IF WE GO BELOW ZERO
  16077	050656	062701 	000006 			ADD	#6,R1		;; SKIP OVER THIS RETRIEVAL POINTER
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 289-1
SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL

  16078	050662	077406 				SOB	R4,10$		;; AND LOOP FOR RETRIEVAL POINTERS
  16079	050664				40$:
  16080	050664					.ENB0			;; OUT OF POINTERS - VBN IS BEYOND WINDOW
	050664	004737 	045540'			JSR	PC,..ENB0
  16081	050670	000261 				SEC			; SET FAILURE
  16082	050672	000430 				BR	50$		; RETURN
  16083						;
  16084					;
  16085					; FOUND THE RIGHT RETRIEVAL POINTER - COMPUTE LBN
  16086					;
  16087	050674				20$:
  16088	050674	010305 				MOV	R3,R5		;; R5 = - (BLOCKS IN THIS EXTENT PAST VBN)
  16089									;; COMPUTE NUMBER OF CONTIGUOUS BLOCKS
  16090	050676	005405 				NEG	R5		;; STARTING AT DESIRED VBN
  16091	050700	062103 				ADD	(R1)+,R3	;; COMPUTE LBN OFFSET IN THIS EXTENT
  16092	050702	005502 				ADC	R2
  16093	050704	062102 				ADD	(R1)+,R2	;; GET HIGH ORDER LBN
  16094	050706	062103 				ADD	(R1)+,R3	;; AND LOW ORDER LBN
  16095	050710	005502 				ADC	R2
  16096	050712	160500 				SUB	R5,R0		;; SEE IF THE TRANSFER LIES WITHIN THIS EXTENT
  16097	050714	101413 				BLOS	25$		;; YES
  16098
  16099	050716	005304 				DEC	R4		;; SEE IF THERE IS ANOTHER POINTER
  16100	050720	001412 				BEQ	30$		;; NO
  16101	050722	020021 				CMP	R0,(R1)+	;; SEE IF REMAINDER OF TRANSFER LIES IN NEXT EXTENT
  16102	050724	101010 				BHI	30$		;; NO
  16103	050726	060305 				ADD	R3,R5		;; COMPUTE END LBN + 1
  16104	050730	010204 				MOV	R2,R4
  16105	050732	005504 				ADC	R4		;; COMPUTE HIGH ORDER
  16106	050734	020421 				CMP	R4,(R1)+	;; SEE IF NEXT EXTENT IS CONTIGUOUS WITH THIS ONE
  16107	050736	001003 				BNE	30$		;; NO
  16108	050740	020521 				CMP	R5,(R1)+	;; COMPARE LOW ORDER
  16109	050742	001001 				BNE	30$		;; NO
  16110
  16111	050744				25$:
  16112	050744	005000 				CLR	R0		;; TRANSFER IS COMPLETELY MAPPED
  16113	050746				30$:
  16114	050746					.ENB0			; ENABLE TASK SWITCHING
	050746	004737 	045540'			JSR	PC,..ENB0
  16115	050752	000241 				CLC			; SET SUCCESS
  16116	050754				50$:
  16117	050754	012605 				MOV	(SP)+,R5	; RESTORE REGISTES
  16118	050756	012604 				MOV	(SP)+,R4
  16119	050760	012601 				MOV	(SP)+,R1
  16120	050762					RETURN
	050762	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291
SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL

  16124
  16125						.SBTTL	END
  16126					;
  16127					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
  16128					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
  16129					;			ALL RIGHTS RESERVED.
  16130					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
  16131					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
  16132					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
  16133					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
  16134					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
  16135					;
  16136					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
  16137					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
  16138					;       CORPORATION.
  16139					;
  16140					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
  16141					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
  16142					;
  16143		011454'				.END	INITLM
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291-1
SYMBOL TABLE

ABCHAR  011364RG 	BC.TDU= 000015 G 	CNT     002732RG 	CTLO  = 000040   	DE.02 = 000376 G
ACKNOW  026344RG 	BC.THU= 000016 G 	CNUPE = 000002   	CTRLC   033054R  	DE.03 = 000375 G
ADRSAV  005604RG 	BC.XEN= 000034 G 	COMBSE  001236RG 	CTRLU   033060R  	DE.04 = 000374 G
AF.PP = 000200 G 	BC.XOF= 000020 G 	COMTRP  011562R  	CTRLZ   033064R  	DE.05 = 000373 G
ASXCMN  014210R  	BC.XON= 000021 G 	COPBUF  030130RG 	CTYPTR  002642RG 	DE.06 = 000372 G
ASXDT   014064R  	BELADR  037216RG 	CPUERR  021102R  	CTYSTS  002672RG 	DE.07 = 000371 G
ASXEXT  014400R  	BITTBL  044260RG 	CPUNUM= 000002   	CURBF = 000006   	DE.08 = 000370 G
ASXE1   014040RG 	BIT0  = 000001   	CPYRGT  011374RG 	C.AS  = 000002 G 	DE.09 = 000367 G
ASXE2   014054R  	BIT1  = 000002   	CRADR   002736RG 	C.AT  = 000000 G 	DE.10 = 000366 G
ASXLRF  014224R  	BIT10 = 002000   	CRBFLN= 000240 G 	C.FA  = 000012 G 	DE.11 = 000365 G
ASXLRQ  014262R  	BIT11 = 004000   	CRBUFF  005762RG 	C.FM  = 000010 G 	DE.80 = 000260 G
ASXSCN  014052R  	BIT12 = 010000   	CRBUFH  005760RG 	C.HALT= 000033 G 	DE.81 = 000257 G
ASXTE   014672R  	BIT13 = 020000   	CRCEVF  005732RG 	C.HCRT= 000015 G 	DE.90 = 000246 G
ASXWR0  014112R  	BIT14 = 040000   	CREVFG  005730RG 	C.HEOF= 000032 G 	DE.91 = 000245 G
ASXWR1  014122R  	BIT15 = 100000   	CREXP = 006226RG 	C.HESC= 000033 G 	DE.92 = 000244 G
ASXWR2  014132R  	BIT2  = 000004   	CRHD  = ****** GX	C.HFFD= 000014 G 	DE.93 = 000243 G
ASXWR3  014142R  	BIT3  = 000010   	CRHUNG  005734RG 	C.HLFD= 000012 G 	DE.94 = 000242 G
ASXWR4  014152R  	BIT4  = 000020   	CRJT  = 001000   	C.HPAR= 000200 G 	DE.95 = 000241 G
A.EF  = 000020 G 	BIT5  = 000040   	CROBAR  001034RG 	C.HSPC= 000040 G 	DE.96 = 000240 G
A.FB  = 000015 G 	BIT6  = 000100   	CRSIZE= 000010 G 	C.HTAB= 000011 G 	DE.97 = 000237 G
A.FM  = 000024 G 	BIT7  = 000200   	CRSTB   011744R  	C.HVTB= 000013 G 	DE.98 = 000236 G
A.HA  = 000012 G 	BIT8  = 000400   	CRSTBH  005740RG 	C.HXOF= 000023 G 	DE.99 = 000235 G
A.PD  = 000006 G 	BIT9  = 001000   	CRSTBK  005742RG 	C.HXON= 000021 G 	DFTBL   025734RG
A.PF  = 000034 G 	BLDPKT  044140R  	CRSTK = ****** GX	C.RS  = 000006 G 	DFTSZ = 000100
A.RP  = 000010 G 	BLKTT   005654RG 	CRSTLN= 000016 G 	C.SD  = 000004 G 	DFUNC = 000200
A.SP  = 000004 G 	BLXCOM  050340R  	CRSTS = 006230RG 	C.SZ  = 000014 G 	DF.DMG= 000004
A.SZ  = 000036 G 	BLXPLP  050370R  	CRTBL   006224RG 	C1    = 140010   	DF.DMN= 000007
A.TD  = 000016 G 	BLXRTN  050400R  	CRTHD = 006224RG 	C1DB  = 140110   	DF.DOR= 000001
A.TS  = 000014 G 	BPARER= 000020   	CRTNXA  015120R  	DAG1  = 000030   	DF.EHG= 000010
BC.AKA= 000025 G 	BPTTRP  012032R  	CRTNX1  015112R  	DAG2  = 000032   	DF.EHM= 000011
BC.BTP= 000024 G 	BTPHD   016262RG 	CRTNX2  015120R  	DAG3  = 000036   	DF.EMG= 000005
BC.BTW= 000035 G 	BTPRO   016562R  	CRTNX3  015122R  	DBLDON  031662R  	DF.EMN= 000006
BC.DEB= 000036 G 	BTWCHR  026702RG 	CRTY  = 002000   	DBLEPP  031462R  	DF.KLR= 000012
BC.DES= 000010 G 	BYCNT   002734RG 	CR$BO5= 044206RG 	DBLEPX  031466R  	DF.KLW= 000013
BC.EDR= 000027 G 	BYTESA  005606RG 	CR$B03= 047402RG 	DBLHDR  031556R  	DF.KLX= 000014
BC.FNM= 000041 G 	CDBA  = 177164 G 	CR$CBR= 020344RG 	DBLPWR  031516R  	DF.OFF= 000002
BC.FOD= 000013 G 	CDCC  = 177162 G 	CR$DTB= 031124RG 	DBLRLD  031472R  	DF.ON = 000003
BC.HAD= 000002 G 	CDD   = 000020   	CR$DTD= 012020RG 	DBLXFR  031526R  	DF.PDP= 000016
BC.HDS= 000007 G 	CDDB  = 177166 G 	CR$DTF= 030610RG 	DBLXIT  031674R  	DF.PEX= 000015
BC.HSN= 000040 G 	CDRTPD  007722RG 	CR$ETE= 030522RG 	DCOMST= 000001   	DHBUF = 000020
BC.HTD= 000012 G 	CDST  = 177160 G 	CR$FTA= 011722RG 	DEAND1  026762R  	DHCNT = 000200 G
BC.LDR= 000030 G 	CDTSK   007342RG 	CR$IAS= 015272RG 	DEAND2  026374R  	DHERLG  042316R
BC.LDV= 000031 G 	CESCHK  022166R  	CR$ILF= 026036RG 	DEAND3  026126R  	DHISTQ  036434R
BC.LNC= 000004 G 	CH    = 063400 G 	CR$ILQ= 031600RG 	DEANOD  027472R  	DHSAV   040354R
BC.NDM= 000037 G 	CHNPNT= 000001   	CR$LRF= 014256RG 	DEP   = 010000   	DHSTSV  002660RG
BC.NSA= 000032 G 	CH.FOR= 000100 G 	CR$MPE= 012064RG 	DEPOF   001242RG 	DHTBL   003054RG
BC.RDS= 000005 G 	CH.LAB= 000001 G 	CR$PT1= 031216RG 	DEX   = 000400   	DHTMP   002654RG
BC.RQD= 000001 G 	CH.NAT= 000020 G 	CR$PT2= 031234RG 	DEXCOM  013674R  	DH.FER= 020000 G
BC.RTD= 000011 G 	CH.NDC= 000010 G 	CR$PT3= 031544RG 	DEXDON= 000004   	DIAG1 = 174430
BC.SAK= 000017 G 	CH.OFF= 000200 G 	CR$PT4= 031650RG 	DEXST   001352RG 	DIAG2 = 174432
BC.SDS= 000006 G 	CH.UNL= 000040 G 	CR$RES= 012026RG 	DEXTM1  001360RG 	DIAG3 = 174436
BC.SKP= 000033 G 	CKDLEN  041674R  	CR$TBT= 012034RG 	DEXTM2  001356RG 	DIALUP  026130RG
BC.SLA= 000023 G 	CLRDEB  027610RG 	CR$TET= 030504RG 	DEXTM3  001354RG 	DIKL10= 000010
BC.SNA= 000014 G 	CMEDP   021544R  	CR$T04= 011776RG 	DEXWD1= 174406   	DIRDPT  013446R
BC.SPT= 000026 G 	CMNABO  011664RG 	CR$UIE= 031456RG 	DEXWD2= 174404   	DIRMAX= 000102
BC.STR= 000003 G 	CMNABT  013572R  	CSDONE  015042R  	DEXWD3= 174402   	DIROK   013442R
BC.STS= 000022 G 	CMSG    012366R  	CS.EXP= 177670   	DE.01 = 000377 G 	DIV216  045274RG
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291-2
SYMBOL TABLE

DLCNT = 000005 G 	DTEF11= 000450   	D.CKLE= 000201 G 	ERRTRR= 000012 G 	FNDDM   030204R
DLECNT= 000004 G 	DTEHD   025304RG 	D.CKLN= 000210 G 	ERRTSP= 000011 G 	FNDSPD  030236R
DLETBL  003014RG 	DTEMSK  001274RG 	D.CLOG= 000205 G 	ERR10C= 010000   	FORPRO= 000020
DLHUPX  041464R  	DTEMTD= 000455   	D.CLPT= 000005 G 	ERR10S= 020000   	FW    = 000300
DLTBL   003004RG 	DTEMTI= 000456   	D.CRJP= 000203 G 	ERR11C= 000001   	F.DREF  000042
DLTMP   002656RG 	DTENM = 000000   	D.FA  = 000004 G 	ERR11S= 000002   	F.DRNM  000044
DLYCNT= 174400   	DTESNP  047772R  	D.FEPD= 000010 G 	EV.AS = 000002 G 	F.FEXT  000002
DL.CAR= 010000 G 	DTESP   025564RG 	D.FM  = 000002 G 	EV.PF = 000200 G 	F.FNUM  000006
DL.CTS= 020000 G 	DTETPD  007622RG 	D.SZ  = 000006 G 	EV.SE = 000001 G 	F.FOWN  000014
DL.DEN= 000040 G 	DTETSK  007142RG 	D1011 = 000040   	EXCMN   021574R  	F.FPRO  000016
DL.DSC= 100000 G 	DTEXIT  030544R  	EBSEL = 000100   	EXKAL   033076R  	F.FSEQ  000010
DL.DTR= 000002 G 	DTTSK   007402RG 	EBUSPC= 000020   	E.BOV = 000006 G 	F.FSQN  000013
DL.FER= 020000 G 	DUPE  = 000020   	EBUSPS= 000004   	E.CLK = 000002 G 	F.FVBN  000046
DL.RAC= 004000 G 	DURE  = 000004   	ECHOB   035654R  	E.DTE = 000001 G 	F.HDLB  000022
DL.RDE= 000001 G 	DVCH  = 110220   	EDONES= 040000   	E.DV  = 000006 G 	F.LBN   000026
DL.RDN= 000200 G 	DV.CFG= 004000 G 	EDRMT   026042RG 	E.FCRI= 000073 G 	F.LGTH  000052
DL.REN= 000100 G 	DV.EOF= 000040 G 	EF.BOV= 000040 G 	E.FCTC= 000077 G 	F.LINK  000000
DL.RNG= 040000 G 	DV.F11= 000400 G 	EF.CLK= 000002 G 	E.FFCP= 000072 G 	F.NACS  000036
DL.RTS= 000004 G 	DV.HNG= 001000 G 	EF.CRI= 002000 G 	E.FN  = 000004 G 	F.NLCK  000037
DL.SRD= 002000 G 	DV.IOP= 000020 G 	EF.CTC= 040000 G 	E.FP  = 000000 G 	F.NWAC  000040
DL.STD= 000010 G 	DV.LIN= 002000 G 	EF.DTE= 000001 G 	E.FPFR= 000074 G 	F.RVN   000012
DL.UNA= 001420 G 	DV.LOG= 000100 G 	EF.FCP= 001000 G 	E.FPR1= 000100 G 	F.SCHA  000021
DL.XEN= 000100 G 	DV.NXD= 000001 G 	EF.IOD= 000020 G 	E.FPR2= 000076 G 	F.SIZE  000032
DMTBE = 003004RG 	DV.OFL= 000002 G 	EF.NIR= 000010 G 	E.FRKP= 000075 G 	F.STAT  000040
DMTBL   002742RG 	DV.OIR= 000004 G 	EF.PFR= 004000 G 	E.FSND= 000040 G 	F.STD   000004
DMTMP   002652RG 	DV.SCN= 000010 G 	EF.PR1= 100000 G 	E.FW  = 000010 G 	F.UCHA  000020
DMTNXM  042276R  	DV.URE= 000200 G 	EF.PR2= 020000 G 	E.IOD = 000005 G 	F11TPD  010022RG
DMYN  = 000004 G 	DWNMS   013220R  	EF.RKH= 002000 G 	E.LS  = 000002 G 	GENTPD  010042RG
DNBLK   005636RG 	DWNMSG  013206R  	EF.RKP= 010000 G 	E.NIR = 000004 G 	GETBUF  032430R
DNFCN   005640RG 	DWNMSZ= 000043   	EF.RKR= 001000 G 	E.OPSZ= 000060 G 	HANGUP  026176RG
DNSTS   005646RG 	DXBUF   005504RG 	EF.RQM= 000200 G 	E.RKH = 000013 G 	HIBYTE= 177400
DON10C= 040000   	DXCNT   005502RG 	EF.RSS= 004000 G 	E.RKR = 000012 G 	HICTS   026766RG
DON10S= 100000   	DXHD  = ****** GX	EF.SND= 100000 G 	E.RQM = 000010 G 	HIDVST  027236RG
DON11C= 000100   	DXPKT   005524RG 	EF.TED= 000100 G 	E.RSS = 000014 G 	HISN    027120RG
DON11S= 000200   	DXRTC   005500RG 	EF.TMO= 000100 G 	E.TMO = 000007 G 	HORPS = 000016
DPCMN   021540R  	DXSTK = ****** GX	EF.TTY= 000004 G 	E.TTY = 000003 G 	HSPMSK= 000376
DPMSEP  021566R  	DXTPD   007762RG 	EF.WFM= 000400 G 	E.WFM = 000011 G 	HSPSPD  033220RG
DPSEC   021564R  	DXTSK   007442RG 	EHSG  = 000006 G 	FC.CEF= 020000   	HSPTAB  033173RG
DPS4  = 040000   	DXUNIT  005522RG 	EHSM  = 000010 G 	FC.DIR= 040000   	HSPTLN= 000014
DQNXT   034042R  	DXVCB   005506RG 	EMGSTK  011562RG 	FC.FCO= 010000   	H.CSP = 000000 G
DRESET= 000100   	DXWD1 = 000006   	EMTSTK  001116RG 	FC.WAC= 100000   	H.DSW = 000046 G
DRXCOM  013710R  	DXWD2 = 000004   	EMTTRP  013266RG 	FDVNM   030302R  	H.FCP = 000050 G
DRXRR   013722R  	DXWD3 = 000002   	EMYN  = 000002 G 	FDVNMF  030414R  	H.FOR = 000052 G
DR.DTE= 000011   	DXWRD1= 002000   	EM.DRO= 000020 G 	FDVNMM  030266R  	H.HSZ = 000002 G
DR.00 = 000000 G 	DX0PEN  011032RG 	ENBXOF  026052RG 	FEHD  = ****** GX	H.IPC = 000076 G
DR.01 = 000001 G 	DX1PEN  011102RG 	ENTELQ  031136R  	FELXFR  031174R  	H.IPS = 000074 G
DR.02 = 000002 G 	D$$H11= 000010   	EOLS  = 000400   	FERCHK  036740RG 	H.ISP = 000100 G
DR.03 = 000003 G 	D.AT  = 000000 G 	EPTR  = 000000   	FESTK = ****** GX	H.KCAC= 000020 G
DSEND = 000004   	D.CCDR= 000006 G 	EQSZ    001340RG 	FETBL   005572RG 	H.KCHN= 000010 G
DS.99   013440R  	D.CCLK= 000007 G 	ERRCES= 000001 G 	FETPD   007642RG 	H.KEXT= 000004 G
DS04  = 004000   	D.CCPU= 000200 G 	ERRCPE= 000007 G 	FETSK   007402RG 	H.KMOS= 000002 G
DS05  = 002000   	D.CCTY= 000001 G 	ERRCST= 000004 G 	FE0PUD  011222RG 	H.KPWR= 000040 G
DS06  = 001000   	D.CDH1= 000003 G 	ERRDEX= 000003 G 	FLBT  = 000001   	H.KUDF= 000001 G
DTEADR  001276RG 	D.CDLS= 000004 G 	ERRDPE= 000010 G 	FLBYT = 000011   	H.LUT = 000130 G
DTECMD= 000451   	D.CDL1= 000002 G 	ERREPE= 000002 G 	FLCT  = 000017   	H.OVL = 000054 G
DTEDSP  021044R  	D.CDMB= 000204 G 	ERRFME= 000006 G 	FLDVOT  027502RG 	H.TKVA= 000106 G
DTEFLG= 000444   	D.CDTE= 000202 G 	ERRPTO= 000005 G 	FNBYT = 000005   	IE.ABO= 177761
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291-3
SYMBOL TABLE

IE.ACT= 177771   	IE.NOD= 177751   	IO.CON= 015400   	IO.SDO= 012400   	KPAR1 = 172362
IE.ADP= 177636   	IE.NSF= 177746   	IO.CRC= 001020   	IO.SEC= 002520   	KPAR2 = 172364
IE.ALN= 177736   	IE.OFL= 177677   	IO.CRE= 012000   	IO.SEM= 002440   	KPAR3 = 172366
IE.AST= 177660   	IE.ONP= 177773   	IO.CTI= 015400   	IO.SHT= 002410   	KPAR4 = 172370
IE.BAD= 177777   	IE.OVR= 177756   	IO.CTL= 016400   	IO.SLO= 005400   	KPAR5 = 172372
IE.BBE= 177710   	IE.PRI= 177760   	IO.DAC= 010000   	IO.SMO= 002560   	KPAR6 = 172374
IE.BDI= 177714   	IE.RAC= 177724   	IO.DCI= 014400   	IO.SNM= 002450   	KPAR7 = 172376
IE.BDR= 177716   	IE.RAT= 177723   	IO.DCT= 002470   	IO.SPB= 002420   	KPDR0 = 172300
IE.BDV= 177711   	IE.RBG= 177730   	IO.DEL= 012400   	IO.SPF= 002440   	KPDR1 = 172302
IE.BHD= 177700   	IE.RCN= 177722   	IO.DET= 002000   	IO.SSO= 004400   	KPDR2 = 172304
IE.BLK= 177754   	IE.RER= 177740   	IO.DIS= 016000   	IO.SST= 002430   	KPDR3 = 172306
IE.BNM= 177712   	IE.RNM= 177715   	IO.DTI= 016000   	IO.STC= 002500   	KPDR4 = 172310
IE.BTF= 177675   	IE.RSU= 177757   	IO.ENA= 006000   	IO.STP= 016400   	KPDR5 = 172312
IE.BTP= 177725   	IE.SDP= 177635   	IO.EOF= 003000   	IO.SYN= 003040   	KPDR6 = 172314
IE.BVR= 177701   	IE.SNC= 177735   	IO.ESA= 002500   	IO.TRM= 002410   	KPDR7 = 172316
IE.BYT= 177755   	IE.SPC= 177772   	IO.EXT= 011400   	IO.UNL= 000042   	KS.CES= 000002 G
IE.CKP= 177766   	IE.SQC= 177734   	IO.FDX= 003020   	IO.WAT= 013400   	KS.CPE= 001000 G
IE.CKS= 177742   	IE.SRE= 177762   	IO.FNA= 004400   	IO.WLB= 000400   	KS.CST= 000020 G
IE.CLO= 177732   	IE.STK= 177706   	IO.HDX= 003010   	IO.WLS= 000410   	KS.DEX= 000010 G
IE.CON= 177752   	IE.ULN= 177773   	IO.HIS= 015000   	IO.WLV= 000500   	KS.DPE= 002000 G
IE.DAA= 177770   	IE.UPN= 177777   	IO.INL= 002400   	IO.WVB= 011000   	KS.EPE= 000004 G
IE.DAO= 177763   	IE.VER= 177774   	IO.ITI= 017000   	IO.XMT= 014400   	KS.FCF= 004000 G
IE.DFU= 177750   	IE.WAC= 177743   	IO.KIL= 000012   	IO.XNA= 014410   	KS.FME= 000400 G
IE.DNA= 177771   	IE.WAT= 177741   	IO.LED= 012000   	IQ.Q  = 000002   	KS.PFT= 000100 G
IE.DNR= 177775   	IE.WER= 177737   	IO.LOV= 001010   	IQ.X  = 000001   	KS.PTO= 000200 G
IE.DUN= 177767   	IE.WLK= 177764   	IO.LTK= 000050   	IS.BV = 000005   	KS.TRR= 000040 G
IE.DUP= 177707   	IE.2DV= 177720   	IO.MCS= 013400   	IS.CLR= 000000   	KS.TSP= 000001 G
IE.EBX= 177776   	IFLOP = 100000   	IO.MDA= 016000   	IS.CR = 006401   	K.LBPW= 000005 G
IE.EOF= 177766   	IGNO    012364RG 	IO.MDI= 014400   	IS.ESC= 015401   	K.LCKL= 177777 G
IE.EOT= 177702   	INIAN   047366RG 	IO.MDO= 015400   	IS.PND= 000000   	K.LCON= 000004 G
IE.EOV= 177765   	INITLM  011454RG 	IO.MLO= 006000   	IS.RDD= 000002   	K.LDCM= 000001 G
IE.EXP= 177676   	INPPT   035606R  	IO.MOD= 003000   	IS.SET= 000002   	K.LDRP= 177777 G
IE.FEX= 177717   	INPT0   035614R  	IO.MSO= 005000   	IS.SUC= 000001   	K.LDSC= 000003 G
IE.FHE= 177705   	INPT1   036152R  	IO.RAL= 001010   	KBB0  = 177562 G 	K.LLTO= 000006 G
IE.FOP= 177713   	INSHD = ****** GX	IO.RAT= 013000   	KBB1  = 175612 G 	K.LRAC= 000001 G
IE.HFU= 177744   	INSTAL= ****** GX	IO.RBC= 003000   	KBS0  = 177560 G 	K.LRBA= 000007 G
IE.HWR= 177772   	INSTK = ****** GX	IO.RCI= 015000   	KBS1  = 175610 G 	K.LRMN= 000003 G
IE.IDU= 177644   	INSTPD  007602RG 	IO.RCV= 015000   	KLCST   021654R  	K.LRNG= 000002 G
IE.IEF= 177637   	INTLPS  030456R  	IO.RDB= 001200   	KLNLGL= 000016 G 	K.LROP= 000001 G
IE.IFC= 177776   	INTROF= 000010   	IO.RDN= 000022   	KLNPLN= 000026 G 	K.LRPR= 000002 G
IE.IFU= 177747   	INTRON= 000040   	IO.REL= 013400   	KLNPTR  002644RG 	K.LRRJ= 177777 G
IE.ILL= 177726   	INTSON= 000001   	IO.RHD= 001010   	KLPWRF= 000010   	K.LSCK= 000001 G
IE.ILU= 177640   	INT10S= 000400   	IO.RLB= 001000   	KL.ABO= 010000 G 	K.LSKL= 000001 G
IE.INS= 177776   	INT11C= 002000   	IO.RLV= 001100   	KL.CFL= 000400 G 	K.LUND= 000000 G
IE.IPR= 177641   	INT11S= 004000   	IO.RNA= 005400   	KL.CFM= 000002 G 	K.LUSR= 177777 G
IE.ISQ= 177703   	IOPSIZ= 007777   	IO.RNC= 001004   	KL.DEF= 002000 G 	LDLPR   027236RG
IE.ITI= 177643   	IOTTRP  012070R  	IO.RNE= 001020   	KL.KAC= 001000 G 	LDLPV   027236RG
IE.ITS= 177770   	IO.ACE= 007400   	IO.RTC= 003400   	KL.LCA= 000100 G 	LFBT  = 004000
IE.LCK= 177745   	IO.ACR= 006400   	IO.RTI= 016400   	KL.LRM= 000001 G 	LFCT  = 074000
IE.LNL= 177646   	IO.ACW= 007000   	IO.RTK= 000060   	KL.LVB= 000004 G 	LINCHR  027302RG
IE.MBK= 177721   	IO.ADS= 014000   	IO.RVB= 010400   	KL.REQ= 004000 G 	LKS   = 177546 G
IE.MOD= 177753   	IO.APC= 014000   	IO.RWD= 002400   	KL.SPF= 000040 G 	LOAD11= 000004
IE.NBF= 177731   	IO.APV= 014010   	IO.RWU= 002540   	KL.VBD= 000020 G 	LODNOD  032530R
IE.NBK= 177727   	IO.ATT= 001400   	IO.R1C= 002400   	KL.VBN= 000010 G 	LOWCOD= 000000RG
IE.NFI= 177704   	IO.CCI= 014000   	IO.SAO= 004000   	KPAL0   001404RG 	LPCEVF  006240RG
IE.NLN= 177733   	IO.CCT= 002460   	IO.SCS= 013000   	KPAL1   001414RG 	LPCSA = 000002 G
IE.NNC= 177674   	IO.CLN= 003400   	IO.SDI= 013000   	KPAR0 = 172360   	LPCSM = 000022 G
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291-4
SYMBOL TABLE

LPEVFG  006236RG 	N.OVPT= 000054 G 	Q.AK  = 000012 G 	R.LU  = 000012 G 	STNXT   034732R
LPEXPA= 175400 G 	N.PR  = 000010 G 	Q.DA  = 000000 G 	R.PB  = 000024 G 	STPLIN  026604RG
LPEXPZ= 000020 G 	OKPAL0  001412RG 	Q.DZ  = 000016 G 	R.PR  = 000010 G 	STRBF = 000002
LPHD  = ****** GX	OUTPT   035416R  	Q.D1  = 000006 G 	R.QSGC= 000015   	STRDAT  027236RG
LPHUNG  006242RG 	OUTPT3  035336R  	Q.IOAE= 000012   	R.QSPC= 000014   	STSTT   001326RG
LPITH = 000006 G 	PARLOA  020670R  	Q.IOEF= 000006   	R.QSPN= 000006   	STSWD   005610RG
LPMCB = 000020 G 	PARLOT  020742R  	Q.IOFN= 000002   	R.QSPR= 000012   	STSW0 = 000004 G
LPRMA = 000040 G 	PARSAV  001022RG 	Q.IOLU= 000004   	R.QSTN= 000002   	STSW1 = 000006 G
LPRMC = 000044 G 	PB    = 000200 G 	Q.IOPL= 000014   	R.SB  = 000016 G 	STSW2   005066RG
LPRMZ = 000042 G 	PERCLR= 001000   	Q.IOPR= 000007   	R.TD  = 000004 G 	STTYDN  034546R
LPRTY = 000024 G 	PHYS  = 100000   	Q.IOSB= 000010   	R.UI  = 000022 G 	STTYO   035142R
LPSIZE= 000010 G 	PIDENT= 000000   	Q.SI  = 000004 G 	SCD   = 000040   	STXAS = 000000 G
LPSTBH  006246RG 	PRB0  = 177566 G 	Q.SP  = 000006 G 	SETDEB  027600RG 	STXCS = 000000 G
LPSTBK  006250RG 	PRB1  = 175616 G 	Q.ST  = 000004 G 	SETLIN  026356RG 	STXDX = 000000 G
LPSTK = ****** GX	PRI7  = 000340 G 	Q.SZ  = 000020 G 	SETSPD  026376RG 	SWR   = 177570
LPSTLN= 000030 G 	PRMBLK  023634R  	Q.TS  = 000002 G 	SEXCM   022506R  	SWSLLT= 100000
LPSTS = 000000 G 	PRMEMN  001240RG 	RAMIS0= 010000   	SEXP0   022514R  	SY0PUD  011272RG
LPTBL   006300RG 	PROPNT= 000021   	RCVKLP  027540RG 	SEXP1   022574R  	S.BA  = 000012 G
LPTBL2  006320RG 	PROTBL  001244RG 	RESERV  012024R  	SEXP2   022476R  	S.DI  = 000011 G
LPTBL3  006340RG 	PRS0  = 177564 G 	RETTOD  027444RG 	SEX97   022576R  	S.DL  = 000032 G
LPTHD = 000004 G 	PRS1  = 175614 G 	RFMAD0= 100000   	SF.EX = 000004 G 	S.DP  = 000010 G
LPTPD   007702RG 	PRTOFF= 004000   	RFMAD1= 040000   	SF.FX = 000002 G 	S.FW  = 000006 G
LPTSK   007302RG 	PRVCM   022114R  	RFMAD2= 020000   	SF.IR = 040000 G 	S.LZ  = 000014 G
LPUNIT  006234RG 	PRVTSK= 007502RG 	RFMAD3= 010000   	SF.PT = 000001 G 	S.PC  = 000020 G
LPUTBL  006360RG 	PR0   = 000000   	RF.XR = 000002 G 	SF.ST = 100000 G 	S.RB  = 000026 G
LP0PUD  011152RG 	PR1   = 000040   	RM    = 000010   	SF.TA = 000001 G 	S.RF  = 000024 G
LSPCHR= 000000   	PR2   = 000100   	RMBYT = 000004   	SKX     023664R  	S.SP  = 000022 G
LSPSPD  033207RG 	PR3   = 000140   	RPBUF   005532RG 	SNDALL  027616RG 	S.SS  = 000030 G
LSPTAB  033162RG 	PR4   = 000200   	RPCNT   005536RG 	SNDBEL  037144RG 	S.STBK= 000012
LSPTLN= 000011   	PR5   = 000240   	RPCW2   005542RG 	SNDMSG  013264RG 	S.SZ  = 000036 G
LSP.IG= 000200   	PR6   = 000300   	RPHD  = ****** GX	SNDSTS  032354R  	S.TD  = 000004 G
LSP.SP= 000017   	PR7   = 000340 G 	RPPEN   010332RG 	SPDPAR  033234RG 	S.TN  = 000000 G
L$$P20= 000002   	PS    = 177776 G 	RPRNA   005530RG 	SPDTBL  025244RG 	S.TZ  = 000016 G
L.DT0 = 000003 G 	PSWW1 = 000005   	RPRTC   005526RG 	SPDTBZ= 000020   	S0.ABR= 100000 G
L.DX0 = 000005 G 	PSWW10= 000014   	RPSTK = ****** GX	SPSAV   001020RG 	S0.CON= 040000 G
L.DX1 = 000006 G 	PSWW11= 000015   	RPTPD   010002RG 	STAT  = 174434   	S0.ISP= 001700 G
L.RP4 = 000002 G 	PSWW12= 000016   	RPTSK   007242RG 	STATD = 000034   	S0.MSK= 140000 G
L.TTY = 000001 G 	PSWW13= 000017   	RPUNIT  005540RG 	STATI   001344RG 	S0.OSP= 036000 G
MBUFR = 000014   	PSWW2 = 000006   	RQKLD   033144R  	STATS = 000000   	S0.SPD= 037700 G
MEBUF = 000012   	PSWW3 = 000007   	RQKLR   033126R  	STATUS= 000022   	S2.CHR= 000377 G
MECNT = 000010   	PSWW4 = 000010   	RQMCR   033110R  	STBXFR  032506R  	S2.CNT= 001400 G
MF2NUM= 000004 G 	PSWW5 = 000011   	RQSPB   024522R  	STCM    046614R  	S2.DDN= 100000 G
MF2RTY= 000001   	PSWW6 = 000012   	RQSPT   024516RG 	STDCDR  006776RG 	S2.DIP= 040000 G
MODE  = 100000   	PSWW7 = 000013   	RQSTD   024534R  	STDDTE  006436RG 	S2.DIS= 020000 G
MPE11 = 001000   	PULSE = 000020   	RSX$$E= 000050   	STDDX   006536RG 	S2.ENB= 010000 G
M.PARQ= 000002 G 	PWRXSP  001032RG 	RSX$$F= 000102   	STDFED  006476RG 	S2.LCL= 004000 G
NODADR  005602RG 	PWR.UP  020314RG 	RSX$$K= 000126   	STDF11  006576RG 	S2.RES= 002000 G
NOSNDA  026060RG 	QNDSV   023626R  	RSX$$V= 000015   	STDINS  006676RG 	S2.SSZ= 001000 G
NTKXEN  012772R  	QPRDTC  025604RG 	RTDVST  027236RG 	STDLPT  006736RG 	TBIT  = 000020 G
NTKXEP  012776R  	QPRDTE  025610RG 	RTNTOD  027212RG 	STDQPR  007076RG 	TEDXIT  031352R
NTKXSP  012752RG 	QPRDTF  027476R  	RUBP  = 000020   	STDRPT  006636RG 	TENAD1= 174410
NULHD   012472RG 	QPRDTL  025666R  	R$$11D= 000001   	STDTTY  007036RG 	TENAD2= 174412
NULSTP= 000040   	QPROAD  020162R  	R.AS  = 000020 G 	STDVST  027236RG 	TF.OU = 000002 G
NULTSK  007542RG 	QPROMS  020140R  	R.AT  = 000006 G 	STELIG  032120R  	THRED = 000000 G
NUPE  = 000002   	QPRTPD  007742RG 	R.DP  = 000011 G 	STELIX  032142R  	TMOCNT  002670RG
N.BP  = 000002 G 	QPRTSK  007502RG 	R.FC  = 000014 G 	STIND2  030720R  	TNAD1 = 000010
N.FP  = 000000 G 	QSIZE = 000023   	R.FN  = 000013 G 	STLN    046650R  	TNAD2 = 000012
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291-5
SYMBOL TABLE

TN.EMT= 000012 G 	TTINO   034416R  	T.RAPT= 000014 G 	U.CH  = 000032 G 	W.STD   000004
TN.LRF= 000040 G 	TTINPA  037240R  	T.RAP4= 000000 G 	U.C1  = 000004 G 	W.VBN   000006
TN.TRP= 000014 G 	TTINPB  037440R  	T.RB  = 000016 G 	U.C2  = 000006 G 	W.WISZ  000007
TOBM  = 000004   	TTINX   034412R  	T.RF  = 000014 G 	U.C3  = 000010 G 	XOFF    026730RG
TOIP  = 000002   	TTOUTR  035236R  	T.SZ  = 000020 G 	U.C4  = 000012 G 	XON     026744RG
TOIT  = 000001   	TTOUTX  035230R  	T10AD = 000020   	U.DACP= 000036 G 	X.X94   016100R
TOITDN  031340R  	TTPEN   010262RG 	T11AD = 000022   	U.DN  = 000000 G 	X.X95   016102R
TOXQIP  001401RG 	TTPKT   002740RG 	T11BC = 000016   	U.FB  = 000003 G 	X8X97   044404RG
TO10  = 000200   	TTSAV   040412R  	U     = 000040   	U.FO  = 000043 G 	X9X96   016156R
TO10AD= 174420   	TTSTCH  037264R  	UC.CCL= 000002 G 	U.GC  = 000031 G 	ZSTOP = 040000
TO10AS  001324RG 	TTTBL   003004RG 	UC.COM= 020000 G 	U.HA  = 000020 G 	$BTMSK  002650RG
TO10BC= 174414   	TTTMSG  012402R  	UC.DIR= 000010 G 	U.LBH = 000044 G 	$CDINT= ****** GX
TO10BM= 000001   	TTWLO   033070R  	UC.ETB= 000100 G 	U.LBN = 000046 G 	$CD11 = 000001
TO10DB= 000400   	TTYDNE  035524R  	UC.F11= 040000 G 	U.PC  = 000030 G 	$DBDTE= 000001
TO10DN= 100000   	TTYDNX  035570R  	UC.INB= 000400 G 	U.PR  = 000042 G 	$DHINP  036400RG
TO10DT= 174424   	TTYEND= 005054RG 	UC.ISP= 002000 G 	U.RB  = 000024 G 	$DHOUT  034422RG
TO10ER= 020000   	TTYEXP= 000002 G 	UC.MNT= 100000 G 	U.RF  = 000022 G 	$DH11 = 000001
TO10PK  005614RG 	TTYHD   032554RG 	UC.PSE= 010000 G 	U.RP  = 000016 G 	$DIV  = ****** GX
TO10Q   001334RG 	TTYSP   033034RG 	UC.REC= 000001 G 	U.SZ  = 000050 G 	$DMINT  040766RG
TO10QC= 001332RG 	TTYTPD  007662RG 	UC.SDI= 000020 G 	U.TF  = 000042 G 	$DORBL  021104RG
TO10SZ  001322RG 	TTYTSK  007202RG 	UC.SQD= 000040 G 	U.UI  = 000030 G 	$DPMYG  021536RG
TO11  = 000100   	TT.ABL= 000040 G 	UC.SWL= 001000 G 	U.UN  = 000002 G 	$DPMYN  021606RG
TO11AD= 174422   	TT.ABW= 000010 G 	UC.TTY= 000004 G 	U.VA  = 000026 G 	$DSW  = 000046 G
TO11AS  001316RG 	TT.BRK= 004000 G 	UC.0SP= 004000 G 	U.VP  = 000032 G 	$DTE  = 000001
TO11BC= 174416   	TT.CRW= 000004 G 	UF.OFL= 000040 G 	VC.BMW= 000002   	$DTEOF  021106RG
TO11BM= 020000   	TT.CTY= 000002 G 	UF.RD = 000040 G 	VC.IFW= 000001   	$DTEON  021114RG
TO11BS  001320RG 	TT.FEC= 014000 G 	UF.RH = 000200 G 	V.FCB   000006   	$DXINT= ****** GX
TO11DB= 004000   	TT.FEI= 004000 G 	UF.TL = 000100 G 	V.FFNU  000055   	$EXHSG  021614RG
TO11DN= 000200   	TT.IGN= 010000 G 	UNASG1= 000032   	V.FIEX  000025   	$EXHSM  021622RG
TO11DT= 174426   	TT.LSP= 020000 G 	UNASG2= 000033   	V.FMAX  000016   	$EXMYG  021570RG
TO11DV  001306RG 	TT.NSA= 000400 G 	UNASG3= 000034   	V.FPRO  000030   	$EXMYN  021600RG
TO11ER= 000002   	TT.OUT= 000001 G 	UNASG4= 000035   	V.FRBK  000034   	$FE   = 000001
TO11FN  001304RG 	TT.RIP= 002000 G 	UNASG5= 000036   	V.IBLB  000012   	$F11  = 000001
TO11FW  001312RG 	TT.RMT= 000100 G 	UNASG6= 000037   	V.IBSZ  000013   	$KLDFC  022010RG
TO11GW  001314RG 	TT.RSI= 020000 G 	UNRGFN  026034RG 	V.IFWI  000002   	$KLDFR  021630RG
TO11HD  001302RG 	TT.SIP= 001000 G 	UPAR0 = 177640   	V.LABL  000040   	$KLDFW  021770RG
TO11NP  001300RG 	TT.SND= 140000 G 	UPAR1 = 177642   	V.LGTH  000056   	$KLDFX  021746RG
TO11Q   001342RG 	TT.SNI= 040000 G 	UPAR2 = 177644   	V.LRUC  000035   	$LPINT= ****** GX
TO11QC= 001333RG 	TT.XEN= 000020 G 	UPAR3 = 177646   	V.SBCL  000021   	$LP20 = 000001
TO11SP  001310RG 	TT.XOF= 000200 G 	UPAR4 = 177650   	V.SBLB  000024   	$MUL  = ****** GX
TRPASV  001120RG 	T.BA  = 000004 G 	UPAR5 = 177652   	V.SBSZ  000022   	$PRVDP  022066RG
TRPXIT  011726R  	T.FW  = 000010 G 	UPAR6 = 177654   	V.STAT  000054   	$PRVEX  022102RG
TRP4    011754R  	T.HBCT= 000002 G 	UPAR7 = 177656   	V.STD   000004   	$RP04 = 000001
TS.EXT= 000026 G 	T.HCAD= 000004 G 	UPDR0 = 177600   	V.TRCT  000000   	$RWDRG  022136RG
TS.LRF= 000006 G 	T.HCBC= 000006 G 	UPDR1 = 177602   	V.WISZ  000020   	$RX11 = 000001
TS.LRQ= 000002 G 	T.HFCN= 000007 G 	UPDR2 = 177604   	WEP   = 000010   	$TOP20= 000001
TS.RUN= 000010 G 	T.HHDS= 000010 G 	UPDR3 = 177606   	WFXSET  014212R  	$TTINP  037220RG
TS.SUS= 000012 G 	T.HP  = 000012 G 	UPDR4 = 177610   	WI.BPS= 100000   	$TTOUT  035074RG
TS.TKN= 000004 G 	T.HRED= 000000 G 	UPDR5 = 177612   	WI.DLK= 010000   	$UNIT   002646RG
TS.WF0= 000014 G 	T.PN  = 000000 G 	UPDR6 = 177614   	WI.EXT= 002000   	$$    = 000037
TS.WF1= 000016 G 	T.PZ  = 000006 G 	UPDR7 = 177616   	WI.LCK= 004000   	$$MSG = 000000
TS.WF2= 000020 G 	T.RAPB= 000004 G 	UT.LG = 000004 G 	WI.RDV= 000400   	$$$   = 010046R
TS.WF3= 000022 G 	T.RAPE= 000012 G 	UT.PR = 000001 G 	WI.WRV= 001000   	$$$ARG= 000011
TS.WF4= 000024 G 	T.RAPF= 000016 G 	UT.SL = 000002 G 	WTLODT  025220R  	$$$OST= 000016
TTCNT = 000205 G 	T.RAPI= 000006 G 	U.ACP = 000040 G 	W.CTL   000000   	$$$T1 = 000000
TTCTY   037726R  	T.RAPM= 000002 G 	U.AF  = 000014 G 	W.FCB   000002   	$$$UNI= 000002
TTINI   033254RG 	T.RAPR= 000010 G 	U.AR  = 000034 G 	W.RTRV  000012   	.ABCNT  002606RG
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291-6
SYMBOL TABLE

.ABFLG  002610RG 	.DLXOF  043046RG 	.ERRPC  011346RG 	.LDBRR= 042000   	.REQS   015276RG
.ACKAL  001164RG 	.DLXON  043226RG 	.EXEND  001002RG 	.LDCK1= 046000   	.RHPB   005550RG
.ATLLH  007136RG 	.DMHUP  041276RG 	.FEACK= ****** GX	.LDCK2= 047000   	.RHPD   011366RG
.BGBST= 076000 G 	.DMTMO  042336RG 	.FEACT  005716RG 	.LDDIS= 045000   	.RHSN   005552RG
.BGBUF  001422RG 	.DMUHU  041326RG 	.FEMOD  001170RG 	.LDRJD= 064000   	.RPADR  005720RG
.BGLEN= 002000 G 	.DOW    001147RG 	.FEPPU  016000RG 	.LDRJV= 063000   	.RPELC  005546RG
.BM873= 173000 G 	.DQCDR  010202RG 	.FEST = ****** GX	.LDRM1= 060000   	.RPELQ  005544RG
.BRCLK= 005000   	.DQDH0  010122RG 	.FESTB  001000RG 	.LDRM2= 061000   	.RPSIZ  005724RG
.BRKCH  002636RG 	.DQDLS  010142RG 	.FREPL  001426RG 	.LDRM3= 062000   	.RPUNT  005714RG
.BTPRM  001160RG 	.DQDL1  010102RG 	.FSRPT= 000050 G 	.LDSEL= 044000   	.RP1PE  010402RG
.BTSCH  001162RG 	.DQLPT  010162RG 	.GFNR = 102000   	.LPPFL  006244RG 	.RP2PE  010452RG
.BTSTK  016542RG 	.DQPBA  010062RG 	.HRDWR  011344RG 	.MEMRS= 076000   	.RP3PE  010522RG
.CECLK= 004000   	.DQPEA  010262RG 	.IBFLO  005062RG 	.MISC   011362RG 	.RP4PE  010572RG
.CEFN   044320RG 	.DQPSZ= 000010 G 	.IBFOK  005064RG 	.MNITS= 000002   	.RP5PE  010642RG
.CEFN3  044324RG 	.DRBEL  031356RG 	.INHDM  002604RG 	.MNTNX= 000003   	.RP6PE  010712RG
.CKASS  001050RG 	.DRLTC= 015000   	.INICL= 070000   	.MNT10= 000001   	.RP7PE  010762RG
.CKDEL  044406RG 	.DRSRN  013602RG 	.INTEN= 000100 G 	.MNT20= 000004   	.RQESD  015770RG
.CLKBA  002376RG 	.DR.NS  013710RG 	.IODBG  011372RG 	.MON    001145RG 	.RQSPD  025226RG
.CLKEA  002602RG 	.DSACF= 066000   	.IOSNP  012406R  	.MSIZE  001114RG 	.SECLK= 003000
.CLKSW  001136RG 	.DSIOJ= 065000   	.IRLTC= 014000   	.NOERR  001122RG 	.SEND   024006RG
.CLKSZ= 000007 G 	.DST    001146RG 	.KACFL  001420RG 	.NOHLT= 001123RG 	.SERFG  001014RG
.CLRMR= 006000   	.DTBLK  001402RG 	.KALSC= 000005 G 	.OBFLO= 001200 G 	.SETMR= 007000
.CLRUN= 010000   	.DTINT  030442RG 	.KLCPU  001176RG 	.PARER  012040R  	.SETRN= 011000
.COMEF  001010RG 	.DXRTY  001372RG 	.KLERQ  001130RG 	.PARRG= 172100 G 	.SEWFL  001016RG
.CONBT= 012000   	.D.ASS  022212RG 	.KLERW  001166RG 	.PAT1.  000040RG 	.SNDAL  027624RG
.CPDV   001262RG 	.D.CEF  022462RG 	.KLFCF  001173RG 	.PAT2.  000120RG 	.SNDBF  002614RG
.CPFN   001260RG 	.D.CMT  023100RG 	.KLFLG  001174RG 	.PAT3.  000234RG 	.SNDCN  002624RG
.CPUSN  011342RG 	.D.DSE  022516RG 	.KLITK  001126RG 	.PAT4.  000520RG 	.SNDLP  002612RG
.CRHD   001270RG 	.D.DTE  020746RG 	.KLIWD  001132RG 	.PCAB1= 150000   	.SSCLK= 002000
.CRPB   001266RG 	.D.EXT  023146RG 	.KLMF2  001200RG 	.PCAB2= 151000   	.SSM    001150RG
.CRPFL  005736RG 	.D.GLI  022316RG 	.KLMON  001177RG 	.PCAB3= 152000   	.SSTCO  013556RG
.CRQZ   001256RG 	.D.GMP  024660RG 	.KLNBC  001206RG 	.PCAB4= 153000   	.SSTET  013550RG
.CRSB   001272RG 	.D.GPP  024536RG 	.KLNFD  001212RG 	.PDP11= 000050   	.STAST  016160RG
.CRSND  002634RG 	.D.GTP  022346RG 	.KLNFT  001210RG 	.PFAIL  001026RG 	.STDHL  040476RG
.CRSZ   001264RG 	.D.MKT  022776RG 	.KLNLB  001206RG 	.PFASS  001052RG 	.STDTA  006364RG
.CRTSK  001006RG 	.D.PUT  024266RG 	.KLNMD  001224RG 	.PFDBG  011370RG 	.STDTB  006372RG
.CSHRG= 164000   	.D.QIO  023170RG 	.KLNPB  001204RG 	.PFIOW  001030RG 	.STDTC  006366RG
.CTYPT  002642RG 	.D.RAF  022554RG 	.KLNPE= 001226RG 	.PFRST  020522RG 	.STDTZ  006370RG
.CYLTM= 000074 G 	.D.REC  024106RG 	.KLNPT  002644RG 	.POLLH  001432RG 	.STELD  031700RG
.DATE   001140RG 	.D.REF  022540RG 	.KLNPW  001226RG 	.POLND  002336RG 	.STELI  031766RG
.DATE3  001140RG 	.D.REQ  024310RG 	.KLNSW  001234RG 	.POLST  001436RG 	.STPCL= 000000
.DAY    001144RG 	.D.ROE  024106RG 	.KLNTD  001220RG 	.PRADR  001362RG 	.STPDM  041356RG
.DBINT= ****** GX	.D.ROS  024106RG 	.KLNTT  001216RG 	.PRDCT  001370RG 	.STRCL= 001000
.DHSPA  040562RG 	.D.SAR  023654RG 	.KLRLD  001172RG 	.PRDTE  001366RG 	.STTNF  032206RG
.DHSPC  040666R  	.D.SEF  022500RG 	.KPAC   001416RG 	.PRPSE  001400RG 	.STTNQ  032200RG
.DHSPD  040714RG 	.D.SEN  023640RG 	.KPALV  032144RG 	.PRSTA  001364RG 	.STTYD  041212RG
.DHSPF  040654RG 	.D.STV  024254RG 	.KW11S  036236RG 	.PUDBA  010262RG 	.STTYH  041226RG
.DHSPR  040602RG 	.D.WFL  022656RG 	.LCEND= 011374RG 	.PUDEA  011342RG 	.SYUIC  001156RG
.DHSPZ  040540RG 	.D.WFO  022602RG 	.LCRDL= 052000   	.PWRDN  020164RG 	.S2IDC  005056RG
.DHSTO  035034RG 	.D.WFS  022600RG 	.LCRDR= 051000   	.RCRM1= 147000   	.S2ITP  005060RG
.DHTMO  042030RG 	.D.WSE  022764RG 	.LCRM1= 057000   	.RCRM2= 146000   	.TENDN  030564RG
.DHXOF  043040RG 	.EBPEC  001376RG 	.LCRM2= 056000   	.RCRM3= 145000   	.TFXOF  044242RG
.DHXON  043162RG 	.EBPEQ  001374RG 	.LCRM3= 055000   	.RCRM4= 144000   	.TFXON  044232RG
.DLHUP  041376RG 	.EBRTY  001373RG 	.LCRM4= 054000   	.RCSPF= 141000   	.TICK   025012RG
.DLINT  037544RG 	.EIOJA= 067000   	.LCRM5= 053000   	.RDJ14= 134000   	.TICKS  001134RG
.DLSTO  035210RG 	.ELEDN  031052RG 	.LDAR = 077000   	.RDJ71= 135000   	.TKPS   001154RG
.DLTMO  041520RG 	.ERRCD  011354RG 	.LDBRL= 043000   	.RDMAB= 133000   	.TKTN   001124RG
SCOMM	- COMMON DATA AND SUBRO	MACRO M1113  03-APR-86 18:57  PAGE 291-7
SYMBOL TABLE

.TKTN.  013170R  	.TTIXC  043462RG 	.X.02   023662R  	..DTP2  050244RG 	..STCH  046564RG
.TOD.   013152R  	.TTP11  002640RG 	.YEAR   001142RG 	..DTSP  050226RG 	..STCR= ****** GX
.TPDBA  007602RG 	.TTQDS  043412RG 	..AKCR= ****** GX	..ENB0  045540RG 	..STFC  046714RG
.TPDEA  010062RG 	.TTQEN  043422RG 	..AKLP= ****** GX	..ERLG  044450RG 	..STIN  047104RG
.TTACK  035240RG 	.TTRNG  037712R  	..ALCB  045654RG 	..FSTD  045574RG 	..STLP= ****** GX
.TTBTW  044042RG 	.TTRST  043242RG 	..ALC2  045670RG 	..INTX  015062RG 	..STPT  046400RG
.TTCHK  043332RG 	.TTSCW  037716R  	..ALOW  046144RG 	..IODN  044550RG 	..STQ   047304RG
.TTDIS  043520RG 	.TTSTP  043056RG 	..BLXI  050320RG 	..IPRI  045360RG 	..STTY  046164RG
.TTELB  002666RG 	.TTSW2  044212RG 	..BLXO  050332RG 	..NADD  045434RG 	..SWED  050126RG
.TTELC  002664RG 	.TTS2F  005054RG 	..DECB  046010RG 	..NDEL  045320RG 	..VTOL  050406RG
.TTELQ  002662RG 	.TTXOF  042762RG 	..DECN  046004RG 	..PICK  045476RG 	..VVLL  050570RG
.TTENB  043676RG 	.TTXON  043104RG 	..DEC2  046000RG 	..SACK  046630RG 	..VXFR  050312RG
.TTERL  042634RG 	.VCLUN  016104RG 	..DQRN  044670RG 	..SEFN  045212RG 	..WFED  047454RG
.TTFDI  042566RG 	.VERNO  001036RG 	..DSEV  045264RG 	..SPLP= ****** GX	...GBL= 000000
.TTICK  043356RG 	.WRMBX= 071000   	..DTP1  050274RG

. ABS.	000056	   000
      	050764	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  19305 WORDS  ( 76 PAGES)
DYNAMIC MEMORY:  20774 WORDS  ( 79 PAGES)
ELAPSED TIME:  00:07:17
,[100,20]RSXTOPS20.LST/-SP/CRF=[100,30]RSXTOPS20.TMP
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ABCHAR	  011364 RG	#41-1734   *214-11625 
ACKNOW	  026344 RG	 148-8400  #155-8556  
ADRSAV	  005604 RG	#33-1104   
AF.PP 	= 000200  G	#53-2464   
ASXCMN	  014210 R	 70-3265    70-3270    70-3275    70-3280   #70-3291   
ASXDT 	  014064 R	 69-3222   #69-3224   
ASXEXT	  014400 R	 69-3253   #73-3342   
ASXE1 	  014040 RG	 42-1769   #69-3209    74-3438    75-3623   
ASXE2 	  014054 R	 67-3156   #69-3221    71-3303    73-3423   
ASXLRF	  014224 R	 69-3235   #71-3299    72-3312   
ASXLRQ	  014262 R	 69-3231   #72-3309   
ASXSCN	  014052 R	#69-3220    69-3233    69-3239    70-3291    72-3310   
ASXTE 	  014672 R	 69-3237    70-3294    72-3337   #74-3434   
ASXWR0	  014112 R	 69-3243   #70-3264   
ASXWR1	  014122 R	 69-3245   #70-3269   
ASXWR2	  014132 R	 69-3247   #70-3274   
ASXWR3	  014142 R	 69-3249   #70-3279   
ASXWR4	  014152 R	 69-3251   #70-3284   
A.EF  	= 000020  G	 15-836    #53-2433    70-3264    70-3269    70-3284    70-3286   *72-3309    72-3329   *76-3715   
                        *76-3767   *76-3771   *81-4053    113-5987   113-5988  *124-6853  *147-8358  *179-9627   193-10664 
                        *193-10665 *210-11292 *217-11871 *218-11913 *224-12292 *231-12605  255-13970  258-14097 *258-14103 
                        *260-14208 *260-14263  261-14321 
A.FB  	= 000015  G	#53-2431   
A.FM  	= 000024  G	*43-1840   #53-2435    70-3264    70-3269    70-3274    70-3279    70-3284    70-3286    70-3288   
                         70-3290   *71-3299    72-3311   *76-3752   *114-6054   115-6120  *115-6146  *122-6499   260-14258 
A.HA  	= 000012  G	#53-2429    72-3314    74-3451    74-3466    78-3887    139-7852   288-15978 
A.PD  	= 000006  G	 43-1843   #53-2427    71-3302    73-3348    139-7851   141-7974  
A.PF  	= 000034  G	#53-2439   *76-3715   *135-7585   135-7588  
A.RP  	= 000010  G	#53-2428    124-6722   139-7861  
A.SP  	= 000004  G	#53-2425   *72-3334   *74-3464    74-3465    79-3941   
A.SZ  	= 000036  G	#53-2441   
A.TD  	= 000016  G	 43-1829   #53-2432    67-2920    67-3088    72-3335    73-3347    124-6782   127-7080   127-7106  
                         131-7330   133-7494   139-7850  
A.TS  	= 000014  G	*43-1841   #53-2430    69-3221   *70-3293   *71-3300   *72-3313   *114-6055  *115-6133  *115-6145  
                        *122-6498   127-7108  *127-7110  
BC.AKA	= 000025  G	#146-8297   195-10723 
BC.BTP	= 000024  G	#146-8296   162-8788  
BC.BTW	= 000035  G	#146-8305  
BC.DEB	= 000036  G	#146-8306  
BC.DES	= 000010  G	#146-8284  
BC.EDR	= 000027  G	#146-8299  
BC.FNM	= 000041  G	#146-8309   179-9642  
BC.FOD	= 000013  G	#146-8287  
BC.HAD	= 000002  G	#146-8278   162-8756  
BC.HDS	= 000007  G	#146-8283   258-14092 
BC.HSN	= 000040  G	#146-8308   162-8780  
BC.HTD	= 000012  G	#146-8286  
BC.LDR	= 000030  G	#146-8300  
BC.LDV	= 000031  G	#146-8301  
BC.LNC	= 000004  G	#146-8280   275-15055 
BC.NDM	= 000037  G	#146-8307  
BC.NSA	= 000032  G	#146-8302  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

BC.RDS	= 000005  G	#146-8281  
BC.RQD	= 000001  G	#146-8277  
BC.RTD	= 000011  G	#146-8285  
BC.SAK	= 000017  G	#146-8291   175-9333   276-15090 
BC.SDS	= 000006  G	#146-8282  
BC.SKP	= 000033  G	#146-8303   162-8768  
BC.SLA	= 000023  G	#146-8295   195-10719 
BC.SNA	= 000014  G	#146-8288  
BC.SPT	= 000026  G	#146-8298  
BC.STR	= 000003  G	#146-8279  
BC.STS	= 000022  G	#146-8294  
BC.TDU	= 000015  G	#146-8289   227-12471 
BC.THU	= 000016  G	#146-8290   227-12477 
BC.XEN	= 000034  G	#146-8304  
BC.XOF	= 000020  G	#146-8292  
BC.XON	= 000021  G	#146-8293  
BELADR	  037216 RG	 215-11735 #215-11743 
BITTBL	  044260 RG	 206-11125  215-11740 #254-13889  255-13962  261-14323 
BIT0  	= 000001	#7-288      41-1699   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                         190-10513 #253-13882 
BIT1  	= 000002	#7-288      41-1700    41-1732   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  
                        #190-10388  190-10512 #253-13882 
BIT10 	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10484 
                         190-10506 #253-13882 
BIT11 	= 004000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10483 
                         190-10505 #253-13882 
BIT12 	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10482 
                         190-10504 #253-13882 
BIT13 	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10481 
                         190-10503  190-10518  190-10526 #253-13882 
BIT14 	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240   157-8623  #176-9385  #190-10388 
                         190-10480  190-10502 #253-13882 
BIT15 	= 100000	#7-288     #48-2204   #80-4024    81-4053   #82-4348   #86-4617   #145-8240   162-8780  #176-9385  
                        #190-10388  190-10479  190-10501 #253-13882  258-14092 
BIT2  	= 000004	#7-288      41-1701   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                         190-10511 #253-13882 
BIT3  	= 000010	#7-288      41-1702   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                         190-10510 #253-13882 
BIT4  	= 000020	#7-288      41-1703   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                         190-10514 #253-13882 
BIT5  	= 000040	#7-288      41-1704   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                         190-10509 #253-13882 
BIT6  	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10508 
                         190-10522 #253-13882 
BIT7  	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10507 
                        #253-13882 
BIT8  	= 000400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10486 
                         190-10514 #253-13882 
BIT9  	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  190-10485 
                         190-10486  190-10514 #253-13882 
BLDPKT	  044140 R	 247-13672  247-13672 #248-13715 
BLKTT 	  005654 RG	#33-1121   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

BLXCOM	  050340 R	 287-15874 #287-15880 
BLXPLP	  050370 R	 287-15903 #287-15914  287-15916 
BLXRTN	  050400 R	#287-15924 
BPARER	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
                         280-15430 
BPTTRP	  012032 R	 43-1860   #43-1881   
BTPHD 	  016262 RG	 36-1386    37-1454    38-1494   #81-4047   
BTPRO 	  016562 R	 81-4048    81-4048   #81-4050    81-4095    81-4171    81-4291   
BTWCHR	  026702 RG	 148-8414  #159-8670  
BYCNT 	  002734 RG	#18-928    *198-10864  200-10901  210-11275 *210-11277 
BYTESA	  005606 RG	#33-1106   
CDBA  	= 177164  G	#34-1138   
CDCC  	= 177162  G	#34-1137   
CDD   	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
CDDB  	= 177166  G	#34-1139    34-1153   
CDRTPD	  007722 RG	 36-1379    37-1423   #38-1489   
CDST  	= 177160  G	#34-1136    34-1153    34-1169   
CDTSK 	  007342 RG	 37-1416   #37-1422    37-1424   
CESCHK	  022166 R	 97-5152    97-5152    97-5184    97-5184    97-5192    97-5192   #101-5334  
CH    	= 063400  G	#66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881   
                         66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   
                         66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   #66-2881    66-2881    66-2881   
                        #66-2881    66-2881    66-2881   #66-2881   
CHNPNT	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
CH.FOR	= 000100  G	#57-2613   
CH.LAB	= 000001  G	#57-2617   
CH.NAT	= 000020  G	#57-2615   
CH.NDC	= 000010  G	#57-2616   
CH.OFF	= 000200  G	#57-2612   
CH.UNL	= 000040  G	#57-2614   
CKDLEN	  041674 R	 232-12660  232-12660  232-12672  232-12672 #232-12715 
CLRDEB	  027610 RG	 148-8416  #169-8959  
CMEDP 	  021544 R	#91-4928    92-4976   
CMNABO	  011664 RG	 43-1831    43-1834   #43-1838    67-3043   
CMNABT	  013572 R	 67-2927   #67-3042    67-3094   
CMSG  	  012366 R	 44-1913    44-1925   #44-1995   
CNT   	  002732 RG	#18-926    *198-10865  219-12042 
CNUPE 	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

COMBSE	  001236 RG	#11-635    *90-4803    90-4866   
COMTRP	  011562 R	 8-347      8-349      8-351      8-353     #43-1814   
COPBUF	  030130 RG	 66-2847    66-2847    170-9035   170-9035  #171-9133   273-14875  273-14875 
CPUERR	  021102 R	 87-4668   #87-4694   
CPUNUM	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    90-4815   #145-8240  #176-9385  #190-10388 
                        #253-13882 
CPYRGT	  011374 RG	#41-1742   
CRADR 	  002736 RG	#18-930    *198-10866  199-10885  200-10900  200-10902  210-11279 *210-11281 *210-11290 *212-11445 
                        *212-11457 
CRBFLN	= 000240  G	#34-1160   
CRBUFF	  005762 RG	#34-1158    34-1160   
CRBUFH	  005760 RG	#34-1156   
CRCEVF	  005732 RG	 34-1142   #34-1143   
CREVFG	  005730 RG	#34-1141   
CREXP 	= 006226 RG	#34-1168   
CRHD  	= ******  GX	 36-1379    37-1423    38-1490   
CRHUNG	  005734 RG	#34-1145   
CRJT  	= 001000	#190-10414  200-10903  212-11381  212-11390  212-11401 
CROBAR	  001034 RG	#9-496     *83-4422   *84-4447   
CRSIZE	= 000010  G	#34-1174   
CRSTB 	  011744 R	 43-1854   #43-1857   
CRSTBH	  005740 RG	#34-1150   
CRSTBK	  005742 RG	#34-1152    34-1154   
CRSTK 	= ******  GX	 37-1423   
CRSTLN	= 000016  G	#34-1154   
CRSTS 	= 006230 RG	#34-1170   
CRTBL 	  006224 RG	#34-1165    34-1174    39-1550   
CRTHD 	= 006224 RG	#34-1166   
CRTNXA	  015120 R	 75-3580   #75-3589   
CRTNX1	  015112 R	 75-3583   #75-3586   
CRTNX2	  015120 R	#75-3595   
CRTNX3	  015122 R	 75-3587   #75-3610    75-3641   
CRTY  	= 002000	#190-10413  200-10899  201-10920  201-10926  210-11286 
CR$BO5	= 044206 RG	#248-13731 
CR$B03	= 047402 RG	#279-15299 
CR$CBR	= 020344 RG	#84-4449   
CR$DTB	= 031124 RG	#179-9610  
CR$DTD	= 012020 RG	#43-1876   
CR$DTF	= 030610 RG	#178-9497  
CR$ETE	= 030522 RG	#177-9445  
CR$FTA	= 011722 RG	#43-1845   
CR$IAS	= 015272 RG	#75-3653   
CR$ILF	= 026036 RG	#149-8428  
CR$ILQ	= 031600 RG	#180-9796  
CR$LRF	= 014256 RG	#71-3304   
CR$MPE	= 012064 RG	#43-1893   
CR$PT1	= 031216 RG	#179-9639  
CR$PT2	= 031234 RG	#179-9644  
CR$PT3	= 031544 RG	#180-9776  
CR$PT4	= 031650 RG	#180-9807  
CR$RES	= 012026 RG	#43-1879   
CR$TBT	= 012034 RG	#43-1882   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CR$TET	= 030504 RG	#177-9439  
CR$T04	= 011776 RG	#43-1869   
CR$UIE	= 031456 RG	#180-9739  
CSDONE	  015042 R	 74-3435   #74-3525   
CS.EXP	= 177670	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
CTLO  	= 000040	#190-10416  198-10871  201-10918  212-11406  219-11962  219-11963 
CTRLC 	  033054 R	#191-10551  219-12069 
CTRLU 	  033060 R	#191-10553  219-12040 
CTRLZ 	  033064 R	#191-10555  219-12060 
CTYPTR	  002642 RG	#17-886     162-8757   198-10848  198-10867  209-11214  209-11221  210-11244  210-11262  217-11861 
                         219-11956 
CTYSTS	  002672 RG	#18-922     198-10868  210-11263 *212-11424  212-11429  212-11444  219-11957 
CURBF 	= 000006	#190-10400 *200-10900  219-12004 *219-12005 *219-12008  219-12020 *219-12022  219-12023 *219-12043 
C.AS  	= 000002  G	#54-2478   
C.AT  	= 000000  G	#54-2477    120-6407  
C.FA  	= 000012  G	#54-2482   
C.FM  	= 000010  G	#54-2481   
C.HALT	= 000033  G	#190-10539 
C.HCRT	= 000015  G	#190-10534  210-11285  212-11357  219-11991 
C.HEOF	= 000032  G	#190-10537  219-11989 
C.HESC	= 000033  G	#190-10538  190-10539  219-11987 
C.HFFD	= 000014  G	#190-10533 
C.HLFD	= 000012  G	#190-10531  211-11327  212-11360 
C.HPAR	= 000200  G	#190-10541  250-13788 
C.HSPC	= 000040  G	#190-10540 
C.HTAB	= 000011  G	#190-10530  212-11362 
C.HVTB	= 000013  G	#190-10532 
C.HXOF	= 000023  G	#190-10536  217-11844  250-13788 
C.HXON	= 000021  G	#190-10535  217-11840  250-13783 
C.RS  	= 000006  G	#54-2480   
C.SD  	= 000004  G	#54-2479   
C.SZ  	= 000014  G	#15-828     15-837    #54-2484    118-6309   120-6418   143-8112   256-14004 
C1    	= 140010	#40-1591    40-1653    40-1658    40-1670   
C1DB  	= 140110	#40-1593    40-1597    40-1603    40-1608    40-1613    40-1618    40-1623    40-1628    40-1633   
DAG1  	= 000030	#3-129      81-4082    81-4132   *97-5157    97-5160    97-5173   *97-5202   *100-5313   100-5317  
                        *101-5335   101-5336  *280-15410  280-15413 *280-15456  280-15459 
DAG2  	= 000032	#3-128     *84-4455   *101-5338  *280-15447 
DAG3  	= 000036	#3-126     *178-9556  *184-10039 
DBLDON	  031662 R	 180-9757   180-9792  #180-9813  
DBLEPP	  031462 R	 180-9727  #180-9744  
DBLEPX	  031466 R	 180-9722  #180-9746  
DBLHDR	  031556 R	 180-9773  #180-9790  
DBLPWR	  031516 R	 180-9738  #180-9762  
DBLRLD	  031472 R	 180-9736  #180-9752  
DBLXFR	  031526 R	 180-9734  #180-9771  
DBLXIT	  031674 R	 180-9764   180-9783   180-9811  #180-9816  
DCOMST	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    97-5154    97-5160    97-5186    97-5194   
                        #145-8240  #176-9385  #190-10388 #253-13882 
DEAND1	  026762 R	 148-8406   156-8573   157-8608   157-8619   157-8630   158-8652   159-8676   159-8678   160-8706  
                        #161-8737  
DEAND2	  026374 R	 152-8471   152-8474   153-8489   153-8495   153-8497   154-8530   154-8533   154-8540   154-8547  
                         155-8559  #156-8572  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DEAND3	  026126 R	 150-8439  #152-8473  
DEANOD	  027472 R	 161-8738   162-8790   163-8804   164-8835   165-8878   166-8894  #166-8903   167-8925   168-8937  
                         168-8945   169-8957   169-8961   175-9325  
DEP   	= 010000	#7-288      44-1960   #48-2204   #80-4024    81-4114    81-4152    81-4158    81-4202    81-4229   
                         81-4283   #82-4348   #86-4617    91-4927    97-5203    98-5240    99-5270   #145-8240  #176-9385  
                         178-9549   183-9988   184-10042  185-10079 #190-10388 #253-13882  282-15581 
DEPOF 	  001242 RG	#11-639    *90-4805    90-4861    92-4973   
DEX   	= 000400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DEXCOM	  013674 R	#67-3100   
DEXDON	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
                         280-15403 
DEXST 	  001352 RG	#12-728    *97-5158   *97-5162   *280-15398 *280-15405 
DEXTM1	  001360 RG	#12-734     90-4818    90-4841   
DEXTM2	  001356 RG	#12-732     90-4798    90-4810    90-4837    90-4874   
DEXTM3	  001354 RG	#12-730     90-4794    90-4817   
DEXWD1	= 174406	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DEXWD2	= 174404	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DEXWD3	= 174402	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DE.01 	= 000377  G	#67-3057    76-3790    118-6306   124-6754   137-7709   137-7716  
DE.02 	= 000376  G	#67-3058    87-4695    91-4937    97-5164    99-5280    127-7045   131-7355   141-7982  
DE.03 	= 000375  G	#67-3059    77-3837    91-4940   
DE.04 	= 000374  G	#67-3060    128-7167  
DE.05 	= 000373  G	#67-3061    105-5578   124-6687  
DE.06 	= 000372  G	#67-3062   
DE.07 	= 000371  G	#67-3063    76-3788   
DE.08 	= 000370  G	#67-3064    131-7405   135-7590  
DE.09 	= 000367  G	#67-3065   
DE.10 	= 000366  G	#67-3066   
DE.11 	= 000365  G	#67-3067   
DE.80 	= 000260  G	#67-3068   
DE.81 	= 000257  G	#67-3069   
DE.90 	= 000246  G	#67-3070    103-5482  
DE.91 	= 000245  G	#67-3071   
DE.92 	= 000244  G	#67-3072    103-5458  
DE.93 	= 000243  G	#67-3073   
DE.94 	= 000242  G	#67-3074    77-3846   
DE.95 	= 000241  G	#67-3075    77-3847   
DE.96 	= 000240  G	#67-3076    78-3914   
DE.97 	= 000237  G	#67-3077    113-5994   118-6278   120-6416   255-13976 
DE.98 	= 000236  G	#67-3078    115-6149  
DE.99 	= 000235  G	 67-2984   #67-3079    88-4725   
DFTBL 	  025734 RG	 147-8366  #148-8385   148-8419  
DFTSZ 	= 000100	#148-8419  
DFUNC 	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    97-5154    97-5186    97-5194   #145-8240  
                        #176-9385  #190-10388 #253-13882 
DF.DMG	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.DMN	= 000007	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.DOR	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.EHG	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388  191-10561 
                        #253-13882 
DF.EHM	= 000011	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.EMG	= 000005	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DF.EMN	= 000006	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.KLR	= 000012	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.KLW	= 000013	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.KLX	= 000014	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.OFF	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.ON 	= 000003	#7-288     #48-2204   #80-4024    81-4276   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                        #253-13882 
DF.PDP	= 000016	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DF.PEX	= 000015	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DHBUF 	= 000020	#190-10406 *212-11424  212-11429 
DHCNT 	= 000200  G	#28-1020    39-1538   
DHERLG	  042316 R	 232-12749  232-12749  233-12852  233-12852 #233-12944  234-13024  234-13024 
DHISTQ	  036434 R	 213-11508  213-11514  213-11516  213-11520  213-11522 #214-11590  216-11774 
DHSAV 	  040354 R	 202-10945  213-11483  214-11581 #220-12114 
DHSTSV	  002660 RG	#17-901    *214-11584  214-11606 
DHTBL 	  003054 RG	 19-944     19-945     19-946     19-947     19-948     19-949     19-950     19-951    #21-987    
                         28-1020    39-1538    153-8488   154-8520   170-9040   172-9173   210-11240  210-11304  212-11422 
                         220-12125  221-12179  233-12814 
DHTMP 	  002654 RG	#17-897    *202-10944 *214-11580  220-12121 
DH.FER	= 020000  G	#190-10526  214-11677 
DIAG1 	= 174430	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DIAG2 	= 174432	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DIAG3 	= 174436	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DIALUP	  026130 RG	 148-8398  #153-8485  
DIKL10	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    97-5154    97-5194    97-5202   #145-8240  
                        #176-9385  #190-10388 #253-13882 
DIRDPT	  013446 R	 67-2985   #67-2987    67-3025   
DIRMAX	= 000102	 67-2982   #67-3025   
DIROK 	  013442 R	 67-2983   #67-2985   
DIV216	  045274 RG	 114-6042   114-6042   255-13959  255-13959  261-14311  261-14311 #263-14365 
DLCNT 	= 000005  G	#20-982     39-1534    153-8492   154-8527   157-8607  
DLECNT	= 000004  G	#20-983     232-12667 
DLETBL	  003014 RG	 17-890    #20-977     20-983     232-12666 
DLHUPX	  041464 R	 228-12518 #231-12614 
DLTBL 	  003004 RG	 17-887    #20-975     20-982     39-1534    170-9023   232-12657 
DLTMP 	  002656 RG	#17-899    *207-11135 *216-11768  220-12138 
DLYCNT	= 174400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DL.CAR	= 010000  G	#190-10504  218-11918  232-12676 
DL.CTS	= 020000  G	#190-10503 
DL.DEN	= 000040  G	#190-10509  218-11903  231-12612  232-12745  232-12761 
DL.DSC	= 100000  G	#190-10501 
DL.DTR	= 000002  G	#190-10512  218-11903  218-11930  232-12680 
DL.FER	= 020000  G	#190-10518  216-11776 
DL.RAC	= 004000  G	#190-10505 
DL.RDE	= 000001  G	#190-10513 
DL.RDN	= 000200  G	#190-10507 
DL.REN	= 000100  G	#190-10508  218-11923  231-12612  232-12728  232-12756  245-13557  246-13614 
DL.RNG	= 040000  G	#190-10502  218-11901 
DL.RTS	= 000004  G	#190-10511  218-11903  218-11920  232-12678  232-12680 
DL.SRD	= 002000  G	#190-10506 
DL.STD	= 000010  G	#190-10510 
DL.UNA	= 001420  G	#190-10514 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DL.XEN	= 000100  G	#190-10522  208-11181  212-11416  212-11436  232-12734  232-12758 
DMTBE 	= 003004 RG	#19-953     234-12985 
DMTBL 	  002742 RG	#19-943     172-9172   226-12378  226-12386  234-12978 
DMTMP 	  002652 RG	#17-895    *226-12372  226-12374 
DMTNXM	  042276 R	 233-12817 #233-12929  233-12932 
DMYN  	= 000004  G	#11-652    *90-4860   *90-4861    94-5043    178-9548   184-10040  185-10078 
DNBLK 	  005636 RG	#33-1113   
DNFCN 	  005640 RG	#33-1115   
DNSTS 	  005646 RG	#33-1118   
DON10C	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   178-9492  #190-10388 
                        #253-13882 
DON10S	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DON11C	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   179-9597  #190-10388 
                        #253-13882 
DON11S	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DPB.CK	= ******	 103-5440   105-5567  
DPCMN 	  021540 R	#91-4926    94-5044   
DPMSEP	  021566 R	 91-4930   #91-4939   
DPSEC 	  021564 R	 91-4933   #91-4936   
DPS4  	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DQNXT 	  034042 R	#198-10838  199-10883  199-10890 
DRESET	= 000100	#7-288     #48-2204   #80-4024   #82-4348    84-4455   #86-4617    101-5338  #145-8240  #176-9385  
                        #190-10388 #253-13882  280-15447 
DRXCOM	  013710 R	 67-3099   #67-3105   
DRXRR 	  013722 R	 67-3102   #67-3107   
DR.DTE	= 000011	#7-288     #48-2204   #80-4024    81-4276   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                         191-10561 #253-13882 
DR.00 	= 000000  G	#67-3050    110-5842   111-5892   112-5951  
DR.01 	= 000001  G	#67-3051    76-3787    76-3789    89-4762    91-4934    97-5179    99-5277    100-5319   103-5484  
                         105-5587   107-5696   113-5992   114-6057   115-6135   115-6147   116-6183   118-6320   120-6405  
                         122-6500   124-6859   126-6967   131-7389   133-7496   135-7586   139-7877  
DR.02 	= 000002  G	#67-3052    109-5792   127-7112  
DR.03 	= 000003  G	#67-3053    127-7114  
DSEND 	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    97-5194    97-5199    97-5202   #145-8240  
                        #176-9385  #190-10388 #253-13882 
DS.99 	  013440 R	#67-2984    67-3001    67-3009    67-3010    67-3017    67-3018    67-3022   
DS04  	= 004000	#7-288     #48-2204   #80-4024    81-4082    81-4132   #82-4348   #86-4617    101-5336  #145-8240  
                        #176-9385  #190-10388 #253-13882  280-15413 
DS05  	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DS06  	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
                         280-15459 
DTEADR	  001276 RG	#12-684     178-9511  *178-9562  
DTECMD	= 000451	#7-288     #48-2204   #80-4024    81-4101    81-4178   #82-4348   #86-4617   #145-8240  #176-9385  
                        #190-10388 #253-13882 
DTEDSP	  021044 R	 87-4674   #87-4678   
DTEFLG	= 000444	#7-288     #48-2204   #80-4024    81-4115    81-4284   #82-4348   #86-4617   #145-8240  #176-9385  
                        #190-10388 #253-13882 
DTEF11	= 000450	#7-288     #48-2204   #80-4024    81-4153   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                        #253-13882 
DTEHD 	  025304 RG	 36-1332    37-1399    38-1473   #147-8346  
DTEMSK	  001274 RG	#12-682     178-9511  *178-9561  
DTEMTD	= 000455	#7-288     #48-2204   #80-4024    81-4203   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #253-13882 
DTEMTI	= 000456	#7-288     #48-2204   #80-4024    81-4142    81-4159   #82-4348   #86-4617   #145-8240  #176-9385  
                        #190-10388 #253-13882 
DTENM 	= 000000	#11-648    
DTESNP	  047772 R	 280-15421  280-15421  280-15437  280-15437  280-15474  280-15474 #281-15514 
DTESP 	  025564 RG	 37-1399    147-8347  #147-8347  
DTETPD	  007622 RG	 36-1332   #38-1472   
DTETSK	  007142 RG	 37-1394   #37-1398    37-1400   *179-9627  
DTEXIT	  030544 R	 177-9449  #177-9453   180-9747  
DTTSK 	  007402 RG	 37-1423   #37-1434   
DUPE  	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DURE  	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DVCH  	= 110220	#40-1587    40-1597    40-1603    40-1608    40-1613    40-1618    40-1623    40-1628    40-1633   
                         40-1653    40-1658    40-1670   
DV.CFG	= 004000  G	#60-2675   
DV.EOF	= 000040  G	#60-2669   
DV.F11	= 000400  G	#60-2672   
DV.HNG	= 001000  G	#60-2673   
DV.IOP	= 000020  G	#60-2668   
DV.LIN	= 002000  G	#60-2674    233-12947 
DV.LOG	= 000100  G	#60-2670    214-11724  233-12947  281-15540 
DV.NXD	= 000001  G	#60-2664   
DV.OFL	= 000002  G	#60-2665   
DV.OIR	= 000004  G	#60-2666   
DV.SCN	= 000010  G	#60-2667   
DV.URE	= 000200  G	#60-2671    214-11724  280-15476  281-15540 
DWNMS 	  013220 R	 66-2875   #66-2877    66-2887   
DWNMSG	  013206 R	 66-2846   #66-2874   
DWNMSZ	= 000043	 66-2875    66-2875   #66-2887   
DXBUF 	  005504 RG	#31-1064   
DXCNT 	  005502 RG	#31-1062   
DXHD  	= ******  GX	 36-1346    37-1447    38-1503   
DXPKT 	  005524 RG	#31-1070   
DXRTC 	  005500 RG	#31-1060   
DXSTK 	= ******  GX	 37-1447   
DXTPD 	  007762 RG	 36-1346   #38-1502   
DXTSK 	  007442 RG	 37-1439   #37-1446    37-1448    40-1653    40-1658   
DXUNIT	  005522 RG	#31-1068   
DXVCB 	  005506 RG	#31-1066   
DXWD1 	= 000006	#3-135     *81-4151   *81-4213    97-5169   *97-5198   *178-9538   180-9726  *184-10031 *185-10074 
                         282-15592 *282-15601 
DXWD2 	= 000004	#3-136      81-4146   *81-4150    81-4214   *81-4215   *81-4219   *81-4223    97-5168   *97-5197   
                        *178-9539   180-9725  *184-10032 *185-10075  282-15591 *282-15600 
DXWD3 	= 000002	#3-137      81-4076    81-4106   *81-4113   *81-4149   *81-4157    81-4185    81-4187    81-4189   
                         81-4197   *81-4201   *81-4216   *81-4220   *81-4224    81-4243   *81-4282    97-5167   *97-5196   
                        *178-9544   180-9724   180-9804   182-9924   182-9937  *184-10036 *185-10076  282-15590 *282-15599 
DXWRD1	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
DX0PEN	  011032 RG	 36-1352   #40-1652    40-1653    40-1675   
DX1PEN	  011102 RG	#40-1657    40-1658   
D$$H11	= 000010	#1-44       8-427     
D.AT  	= 000000  G	#55-2500   
D.CCDR	= 000006  G	#39-1548   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

D.CCLK	= 000007  G	#39-1552   
D.CCPU	= 000200  G	#39-1566    162-8770  
D.CCTY	= 000001  G	#39-1528    162-8755  
D.CDH1	= 000003  G	#39-1536   
D.CDLS	= 000004  G	#39-1540    175-9305   197-10822  209-11227  227-12485  275-15051 
D.CDL1	= 000002  G	#39-1532   
D.CDMB	= 000204  G	#39-1570   
D.CDTE	= 000202  G	#39-1568    197-10824 
D.CKLE	= 000201  G	#39-1567   
D.CKLN	= 000210  G	#39-1572   
D.CLOG	= 000205  G	#39-1571   
D.CLPT	= 000005  G	#39-1544    195-10717 
D.CRJP	= 000203  G	#39-1569    162-8782   197-10827 
D.FA  	= 000004  G	#55-2502   
D.FEPD	= 000010  G	#39-1555   
D.FM  	= 000002  G	#55-2501   
D.SZ  	= 000006  G	#55-2504   
D1011 	= 000040	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
EBSEL 	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
EBUSPC	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
EBUSPS	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
ECHOB 	  035654 R	 210-11282  210-11287  211-11328  211-11337 #212-11353  219-12084 
EDONES	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
EDRMT 	  026042 RG	 148-8408  #150-8437  
EF.BOV	= 000040  G	#49-2288   
EF.CLK	= 000002  G	#49-2280   
EF.CRI	= 002000  G	#49-2320    81-4069    81-4087    81-4241    83-4388   
EF.CTC	= 040000  G	#49-2312    217-11866 
EF.DTE	= 000001  G	#49-2278   
EF.FCP	= 001000  G	#49-2322    81-4098   
EF.IOD	= 000020  G	#49-2286    191-10559  198-10834  210-11292 
EF.NIR	= 000010  G	#49-2284    76-3767    124-6853   191-10559  260-14208  260-14263 
EF.PFR	= 004000  G	 43-1874   #49-2318    81-4241    83-4388    85-4539    180-9763  
EF.PR1	= 100000  G	#49-2310    283-15630  285-15678 
EF.PR2	= 020000  G	#49-2314    217-11878  283-15630  284-15657 
EF.RKH	= 002000  G	#49-2298    191-10559  193-10677  231-12605 
EF.RKP	= 010000  G	#49-2316    168-8940   168-8944  
EF.RKR	= 001000  G	#49-2296    191-10559  193-10673  218-11913 
EF.RQM	= 000200  G	#49-2292    191-10559  193-10668  217-11871 
EF.RSS	= 004000  G	#49-2300    191-10559  193-10681  224-12292 
EF.SND	= 100000  G	#49-2305   
EF.TED	= 000100  G	#146-8265   146-8315   179-9627  
EF.TMO	= 000100  G	 15-835    #49-2290    191-10559  194-10695  196-10769 
EF.TTY	= 000004  G	#49-2282   
EF.WFM	= 000400  G	#49-2294   
EHSG  	= 000006  G	#11-654    *90-4867    95-5078   
EHSM  	= 000010  G	#11-656    *90-4883    96-5112    180-9719   180-9800   182-9920  
EIS   	= ******	 287-15904  287-15909 
EMGSTK	  011562 RG	#42-1773    43-1819    44-1922   
EMTSTK	  001116 RG	#9-510     *43-1835   *67-2917   *67-2936    67-3039    67-3042   *67-3086    67-3100    67-3105   
                         67-3127   
EMTTRP	  013266 RG	 8-357     #67-2912   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

EMYN  	= 000002  G	#11-650    *90-4858    93-5009   
EM.DRO	= 000020  G	#67-2908    67-2938    67-2970   *67-3101   *67-3106    67-3126   *122-6494  
ENBXOF	  026052 RG	 148-8413  #151-8450  
ENTELQ	  031136 R	#179-9618   179-9662  
EOLS  	= 000400	#190-10415  200-10899  201-10920  211-11318  219-12009  219-12071  219-12080 
EPTR  	= 000000	#7-288     #48-2204   #80-4024    81-4100    81-4114    81-4141    81-4152    81-4158    81-4177   
                         81-4202    81-4229    81-4283   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
EQSZ  	  001340 RG	#12-721    *179-9666  *180-9804   180-9805   181-9863  *181-9879  
ERRCES	= 000001  G	#41-1718   
ERRCPE	= 000007  G	#41-1724   
ERRCST	= 000004  G	#41-1721   
ERRDEX	= 000003  G	#41-1720   
ERRDPE	= 000010  G	#41-1725   
ERREPE	= 000002  G	#41-1719   
ERRFME	= 000006  G	#41-1723   
ERRPTO	= 000005  G	#41-1722   
ERRTRR	= 000012  G	#41-1727   
ERRTSP	= 000011  G	#41-1726   
ERR10C	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
ERR10S	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
ERR11C	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
ERR11S	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
EV.AS 	= 000002  G	#64-2783    75-3626    75-3642    79-3956   
EV.PF 	= 000200  G	 42-1767   #64-2784    75-3619    75-3649    84-4471   
EV.SE 	= 000001  G	#64-2780    69-3209    74-3436    75-3619    116-6182   262-14344 
EXCMN 	  021574 R	#92-4974    93-5010    95-5079    96-5113   
EXKAL 	  033076 R	#191-10560  196-10775 
E.BOV 	= 000006  G	#49-2289   
E.CLK 	= 000002  G	#49-2281   
E.DTE 	= 000001  G	#49-2279   
E.DV  	= 000006  G	#146-8272   165-8852   167-8922   174-9247  
E.FCRI	= 000073  G	#49-2321   
E.FCTC	= 000077  G	#49-2313   
E.FFCP	= 000072  G	#49-2323   
E.FN  	= 000004  G	#146-8271   147-8364   165-8849  
E.FP  	= 000000  G	#146-8269  
E.FPFR	= 000074  G	#49-2319   
E.FPR1	= 000100  G	#49-2311   
E.FPR2	= 000076  G	#49-2315    81-4052    81-4275   
E.FRKP	= 000075  G	#49-2317   
E.FSND	= 000040  G	#49-2306   
E.FW  	= 000010  G	#146-8273   150-8438  *152-8464   152-8470   153-8491   154-8526  *156-8569   156-8571   157-8584  
                         157-8589   157-8599   157-8606  *157-8610   157-8615   157-8623  *158-8639   158-8657  *159-8671  
                         159-8675   162-8751   165-8850   165-8853   166-8892   168-8935   174-9248  
E.IOD 	= 000005  G	#49-2287   
E.LS  	= 000002  G	#146-8270  
E.NIR 	= 000004  G	#49-2285   
E.OPSZ	= 000060  G	#146-8261   279-15296 
E.RKH 	= 000013  G	#49-2299   
E.RKR 	= 000012  G	#49-2297   
E.RQM 	= 000010  G	#49-2293   
E.RSS 	= 000014  G	#49-2301   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

E.TMO 	= 000007  G	#49-2291   
E.TTY 	= 000003  G	#49-2283   
E.WFM 	= 000011  G	#49-2295   
FDVNM 	  030302 R	 164-8834   164-8834   165-8870   165-8870  #175-9281  
FDVNMF	  030414 R	 173-9212  #175-9322  
FDVNMM	  030266 R	 152-8465   152-8465   153-8486   153-8486   154-8506   154-8506   155-8557   155-8557   156-8570  
                         156-8570   157-8611   157-8611   158-8640   158-8640   159-8672   159-8672   160-8703   160-8703  
                         161-8732   161-8732   167-8916   167-8916  #174-9246  
FEHD  	= ******  GX	 36-1336    37-1439    38-1477   
FELXFR	  031174 R	 179-9614  #179-9634  
FERCHK	  036740 RG	 214-11608  214-11610  214-11624 #214-11676 
FESTK 	= ******  GX	 37-1439   
FETBL 	  005572 RG	#33-1097    39-1556   
FETPD 	  007642 RG	 36-1336   #38-1476   
FETSK 	  007402 RG	#37-1438    37-1440    40-1670   *81-4053   
FE0PUD	  011222 RG	#40-1669    40-1670   
FLBT  	= 000001	#190-10419 
FLBYT 	= 000011	#190-10402  211-11344 *212-11371 *212-11394 
FLCT  	= 000017	#190-10418  201-10920  210-11264 
FLDVOT	  027502 RG	 148-8396  #167-8915  
FNBYT 	= 000005	#190-10399 *219-12050 *219-12058 *219-12067 *219-12078 
FNDDM 	  030204 R	 153-8494   153-8494   154-8529   154-8529   157-8618   157-8618  #172-9170  
FNDSPD	  030236 R	 157-8585   157-8585   157-8590   157-8590  #173-9203  
FORPRO	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    90-4821    90-4862    90-4868   #145-8240  
                        #176-9385   178-9547   180-9718   180-9799   182-9919   184-10041  185-10077 #190-10388 #253-13882 
FW    	= 000300	#40-1589    40-1597    40-1603    40-1608    40-1613    40-1618    40-1623    40-1628    40-1633   
                         40-1653    40-1658   
F11TPD	  010022 RG	 36-1352   #38-1512    43-1843    71-3302   
GENTPD	  010042 RG	#38-1516   
GETBUF	  032430 R	 181-9865   181-9865   182-9926   182-9926  #186-10114 
HANGUP	  026176 RG	 148-8399  #154-8505  
HDR64 	= ******	 72-3315    74-3452    74-3467    78-3888    141-7996   260-14250 
HIBYTE	= 177400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
HICTS 	  026766 RG	 148-8386  #162-8749  
HIDVST	  027236 RG	 148-8392  #164-8818  
HISN  	  027120 RG	 148-8417  #162-8776  
HORPS 	= 000016	#190-10405  212-11367 *212-11383 *212-11402 
HSPMSK	= 000376	#192-10572  214-11640 
HSPSPD	  033220 RG	#192-10624 
HSPTAB	  033173 RG	#192-10590  192-10603  214-11641 
HSPTLN	= 000014	#192-10603  214-11642 
H.CSP 	= 000000  G	#51-2357   
H.DSW 	= 000046  G	#51-2359    74-3458    74-3473   
H.FCP 	= 000050  G	#51-2360   
H.FOR 	= 000052  G	#51-2361   
H.HSZ 	= 000002  G	#51-2358   
H.IPC 	= 000076  G	#51-2364    72-3322   
H.IPS 	= 000074  G	#51-2363    72-3323   
H.ISP 	= 000100  G	#51-2365    72-3330   
H.KCAC	= 000020  G	#41-1703   
H.KCHN	= 000010  G	#41-1702   
H.KEXT	= 000004  G	#41-1701   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

H.KMOS	= 000002  G	#41-1700   
H.KPWR	= 000040  G	#41-1704   
H.KUDF	= 000001  G	#41-1699   
H.LUT 	= 000130  G	#51-2367    72-3324    72-3327    78-3894    139-7858   288-15979 
H.OVL 	= 000054  G	#51-2362   
H.TKVA	= 000106  G	#51-2366    72-3321    139-7855  
IE.ABO	= 177761	 212-11454 
IFLOP 	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   179-9669   181-9881  
                         182-9948  #190-10388 #253-13882 
IGNO  	  012364 RG	 39-1530    39-1530    39-1534    39-1534    39-1538    39-1538    39-1542    39-1542    39-1546   
                         39-1550    39-1550    39-1553    39-1553    39-1553    39-1553    39-1556    39-1556    44-1982   
                        #44-1986   
INIAN 	  047366 RG	 42-1771   #279-15295 
INITLM	  011454 RG	#42-1752    291-16143 
INPPT 	  035606 R	 210-11271 #211-11317 
INPT0 	  035614 R	#211-11320 
INPT1 	  036152 R	 211-11319 #212-11443 
INSHD 	= ******  GX	 36-1369    38-1469   
INSTAL	= ******  GX	 36-1369   
INSTK 	= ******  GX	 36-1369   
INSTPD	  007602 RG	 36-1369   #38-1468   
INTLPS	  030456 R	#177-9432   178-9525   178-9527   178-9564   179-9680   180-9817  
INTROF	= 000010	#7-288     #48-2204   #80-4024    81-4061   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                        #253-13882  283-15629  284-15656 
INTRON	= 000040	#7-288     #48-2204   #80-4024    81-4287   #82-4348   #86-4617    90-4856   #145-8240  #176-9385  
                        #190-10388 #253-13882 
INTSON	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
INT10S	= 000400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
INT11C	= 002000	#7-288     #48-2204   #80-4024    81-4105    81-4180    81-4191   #82-4348   #86-4617   #145-8240  
                        #176-9385   180-9716  #190-10388 #253-13882 
INT11S	= 004000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
                         284-15656 
IOPSIZ	= 007777	#45-2024    45-2034   
IOTTRP	  012070 R	 43-1861   #44-1909   
IO.ATT	= 001400	 260-14235 
IO.DET	= 002000	 260-14237 
IO.LOV	= 001010	 260-14239 
IO.LTK	= 000050	 76-3738    260-14247 
IO.RLB	= 001000	 124-6823   198-10872  260-14245  288-15986 
IO.RVB	= 010400	 124-6821   124-6829   288-15987 
IO.STC	= 002500	 124-6811  
IO.WLB	= 000400	 81-4294    124-6820   198-10869  288-15989 
IO.WVB	= 011000	 124-6818   124-6831  
IS.SUC	= 000001	 198-10874  210-11290  212-11448 
KBB0  	= 177562  G	#49-2213   
KBB1  	= 175612  G	#49-2217   
KBS0  	= 177560  G	#49-2212   
KBS1  	= 175610  G	#49-2216   
KLCST 	  021654 R	#97-5156    97-5200    97-5210   
KLNLGL	= 000016  G	#10-621    
KLNPLN	= 000026  G	 10-603     10-607    #10-626     162-8767  
KLNPTR	  002644 RG	#17-889     154-8516   158-8647   170-9025   198-10844  210-11248  210-11298  212-11412  217-11817 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         218-11905  218-11924  231-12600  237-13175  239-13253  273-14876  274-14977 
KLPWRF	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   180-9737  #190-10388 
                        #253-13882 
KL.ABO	= 010000  G	#56-2524   
KL.CFL	= 000400  G	#56-2520   
KL.CFM	= 000002  G	#56-2511   
KL.DEF	= 002000  G	#56-2522   
KL.KAC	= 001000  G	#56-2521   
KL.LCA	= 000100  G	#56-2516   
KL.LRM	= 000001  G	#56-2510   
KL.LVB	= 000004  G	#56-2512   
KL.REQ	= 004000  G	#56-2523   
KL.SPF	= 000040  G	#56-2515   
KL.VBD	= 000020  G	#56-2514   
KL.VBN	= 000010  G	#56-2513   
KPAL0 	  001404 RG	#13-773     90-4889    191-10561  196-10777  196-10806 
KPAL1 	  001414 RG	#13-777    *183-9982   183-9985  
KPAR0 	= 172360	#49-2227   
KPAR1 	= 172362	#49-2228   
KPAR2 	= 172364	#49-2229   
KPAR3 	= 172366	#49-2230   
KPAR4 	= 172370	#49-2231   
KPAR5 	= 172372	#49-2232   
KPAR6 	= 172374	#49-2233   
KPAR7 	= 172376	#49-2234   
KPDR0 	= 172300	#49-2236   
KPDR1 	= 172302	#49-2237   
KPDR2 	= 172304	#49-2238   
KPDR3 	= 172306	#49-2239   
KPDR4 	= 172310	#49-2240   
KPDR5 	= 172312	#49-2241   
KPDR6 	= 172314	#49-2242   
KPDR7 	= 172316	#49-2243   
KS.CES	= 000002  G	#56-2532    280-15415 
KS.CPE	= 001000  G	#56-2540   
KS.CST	= 000020  G	#56-2535    196-10798 
KS.DEX	= 000010  G	#56-2534    280-15419 
KS.DPE	= 002000  G	#56-2541   
KS.EPE	= 000004  G	#56-2533    280-15436  280-15475 
KS.FCF	= 004000  G	#56-2542   
KS.FME	= 000400  G	#56-2539   
KS.PFT	= 000100  G	#56-2537    84-4467   
KS.PTO	= 000200  G	#56-2538    81-4092   
KS.TRR	= 000040  G	#56-2536    180-9753  
KS.TSP	= 000001  G	#56-2531    280-15461 
KT11  	= ******	 67-2937    67-2940    67-3033    67-3113    67-3116    67-3125    67-3129    74-3446    74-3485   
                         74-3526    75-3632    78-3883    79-3943    124-6826   137-7737   141-8010   286-15718  286-15724 
                         287-15883  287-15896  287-15899  287-15918  287-15929 
K.LBPW	= 000005  G	#61-2702   
K.LCKL	= 177777  G	#61-2686   
K.LCON	= 000004  G	#61-2696   
K.LDCM	= 000001  G	#61-2693   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

K.LDRP	= 177777  G	#61-2694   
K.LDSC	= 000003  G	#61-2692   
K.LLTO	= 000006  G	#61-2704   
K.LRAC	= 000001  G	#61-2689   
K.LRBA	= 000007  G	#61-2706   
K.LRMN	= 000003  G	#61-2699   
K.LRNG	= 000002  G	#61-2688   
K.LROP	= 000001  G	#61-2697   
K.LRPR	= 000002  G	#61-2698   
K.LRRJ	= 177777  G	#61-2690   
K.LSCK	= 000001  G	#61-2684   
K.LSKL	= 000001  G	#61-2685   
K.LUND	= 000000  G	#61-2682   
K.LUSR	= 177777  G	#61-2700   
LDLPR 	  027236 RG	 148-8409  #164-8819  
LDLPV 	  027236 RG	 148-8410  #164-8820  
LFBT  	= 004000	#190-10412  200-10906  211-11326 
LFCT  	= 074000	#190-10411  201-10920  210-11266  219-12082 
LINCHR	  027302 RG	 148-8389  #165-8846  
LKS   	= 177546  G	#49-2211    84-4477   *84-4479   *85-4540   
LOAD11	= 000004	#7-288      44-1959   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   180-9735  
                        #190-10388 #253-13882 
LODNOD	  032530 R	 179-9657   179-9657   182-9934   182-9934  #188-10183 
LOWCOD	= 000000 RG	#8-344      8-345      8-364      8-364      8-364      8-364      8-371      8-371      8-377     
                         8-377      8-384      8-384      8-384      8-384      8-384      8-384      8-384      8-384     
                         8-384      8-384      8-384      8-384      8-384      8-384      8-384      8-389      8-394     
                         8-394      8-401      8-401      8-401      8-401      8-405      8-413      8-414      8-419     
                         8-420      8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     
                         8-432      8-432      8-432      8-432      8-432      8-432      8-432      8-432      8-432     
                         8-432      8-432      8-432      8-432      8-432      8-432      8-432      8-432      8-432     
                         8-432      8-432      8-432      8-432      8-432      8-432      8-432      8-432      8-432     
                         8-432      8-432      8-432      8-432      8-432     
LPCEVF	  006240 RG	 35-1191   #35-1193   
LPCSA 	= 000002  G	#35-1230   #35-1230   
LPCSM 	= 000022  G	#35-1241   
LPEVFG	  006236 RG	#35-1190   
LPEXPA	= 175400  G	#35-1181    35-1230    35-1230   
LPEXPZ	= 000020  G	#35-1182    35-1205   
LPHD  	= ******  GX	 36-1374    37-1416    38-1485   
LPHUNG	  006242 RG	#35-1196   
LPITH 	= 000006  G	#35-1230   #35-1230   
LPMCB 	= 000020  G	#35-1240   
LPRMA 	= 000040  G	#35-1251   
LPRMC 	= 000044  G	#35-1253   
LPRMZ 	= 000042  G	#35-1252   
LPRTY 	= 000024  G	#35-1242   
LPSIZE	= 000010  G	#35-1231    35-1236    35-1247    35-1262    35-1262   
LPSTBH	  006246 RG	#35-1202   
LPSTBK	  006250 RG	#35-1204    35-1207   
LPSTK 	= ******  GX	 37-1416   
LPSTLN	= 000030  G	#35-1207   
LPSTS 	= 000000  G	#35-1230   #35-1230   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

LPTBL 	  006300 RG	#35-1213    35-1231    35-1240    35-1241    35-1242    35-1251    35-1252    35-1253    35-1262   
                         35-1262    39-1546   
LPTBL2	  006320 RG	#35-1235    35-1240    35-1241    35-1242   
LPTBL3	  006340 RG	#35-1246    35-1251    35-1252    35-1253   
LPTHD 	= 000004  G	#35-1230   #35-1230   
LPTPD 	  007702 RG	 36-1374   #38-1484   
LPTSK 	  007302 RG	 37-1408   #37-1415    37-1417    40-1665   
LPUNIT	  006234 RG	#35-1187   
LPUTBL	  006360 RG	#35-1257   
LP0PUD	  011152 RG	#40-1664    40-1665   
LSPCHR	= 000000	#192-10573  214-11634 
LSPSPD	  033207 RG	#192-10610  214-11658 
LSPTAB	  033162 RG	#192-10575  192-10585  214-11641  214-11644 
LSPTLN	= 000011	#192-10585  214-11630 
LSP.IG	= 000200	#192-10607  192-10612  192-10613  192-10614  192-10626 
LSP.SP	= 000017	#192-10608  214-11662 
L$$P20	= 000002	#1-38       35-1215    35-1231    35-1236    35-1247    35-1259   
L.DT0 	= 000003  G	#40-1638   
L.DX0 	= 000005  G	#40-1651   
L.DX1 	= 000006  G	#40-1656   
L.RP4 	= 000002  G	#40-1585   
L.TTY 	= 000001  G	#40-1581   
MACY11	= ******	 48-2196    82-4346   
MBUFR 	= 000014	#190-10404 *219-12031 *219-12087  219-12091 
MEBUF 	= 000012	#190-10403  211-11334 *211-11335 *219-12093 
MECNT 	= 000010	#190-10401  210-11268 *211-11336 *219-12094 
MF2NUM	= 000004  G	#9-588      9-591     
MF2RTY	= 000001	#9-587      9-593      9-593      9-593      9-593     
MODE  	= 100000	#190-10410  200-10899  201-10921 
MPE11 	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   177-9436  #190-10388 
                        #253-13882 
MSETRP	= ******	 270-14634  270-14671  271-14741  271-14793  273-14893  273-14909 
M.PARQ	= 000002  G	#41-1732    193-10670  198-10840 
NODADR	  005602 RG	#33-1102   
NOSNDA	  026060 RG	 148-8411  #152-8461  
NTKXEN	  012772 R	#66-2809    66-2835   
NTKXEP	  012776 R	 65-2807    65-2807   #66-2811    66-2828    66-2839   
NTKXSP	  012752 RG	 37-1458    65-2807   #65-2807   
NULHD 	  012472 RG	 37-1458   #65-2807   
NULSTP	= 000040	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
NULTSK	  007542 RG	 37-1395    37-1454   #37-1457   
NUPE  	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
N.BP  	= 000002  G	#49-2328    265-14435 
N.FP  	= 000000  G	#49-2327   
N.OVPT	= 000054  G	#49-2265   
N.PR  	= 000010  G	#49-2329    265-14432  265-14432 
OKPAL0	  001412 RG	#13-775    *90-4889    196-10777 *196-10806 
OUTPT 	  035416 R	 201-10931  201-10931  210-11238 #210-11261  212-11374  219-12095 
OUTPT3	  035336 R	 202-10976  202-10976  207-11143 #210-11236 
PARLOA	  020670 R	#85-4528    85-4531   
PARLOT	  020742 R	 85-4524   #85-4548   
PARSAV	  001022 RG	#9-481      43-1887    44-1932   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PB    	= 000200  G	#66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
                        #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881   
                         66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   #66-2881    66-2881   
PERCLR	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PHYS  	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PIDENT	= 000000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PRB0  	= 177566  G	*44-1970   *44-1983   #49-2215   
PRB1  	= 175616  G	*44-1968   #49-2219   
PRI7  	= 000340  G	#7-288     #48-2204   #49-2224    67-3146   #80-4024   #82-4348   #86-4617   #145-8240   162-8771  
                         162-8783   165-8856   171-9135  #176-9385  #190-10388 #253-13882 
PRMBLK	  023634 R	 124-6837  #124-6867  
PRMEMN	  001240 RG	#11-637    *90-4801    90-4872   
PROPNT	= 000021	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    90-4862   #145-8240  #176-9385  #190-10388 
                        #253-13882 
PROTBL	  001244 RG	#11-658     87-4672    90-4826   
PRS0  	= 177564  G	 44-1972    44-1984   #49-2214   
PRS1  	= 175614  G	 44-1976   #49-2218   
PRTOFF	= 004000	#7-288     #48-2204   #80-4024    81-4100    81-4114    81-4141    81-4152    81-4158    81-4177   
                         81-4202    81-4229    81-4283   #82-4348   #86-4617    99-5272   #145-8240  #176-9385  #190-10388 
                        #253-13882 
PRVCM 	  022114 R	 98-5241   #99-5271   
PRVTSK	= 007502 RG	#37-1400    37-1403   #37-1404    37-1408   #37-1409    37-1416   #37-1417    37-1423   #37-1424   
                         37-1439   #37-1440    37-1447   #37-1448    37-1454   #37-1455    37-1458   
PR0   	= 000000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PR1   	= 000040	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PR2   	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PR3   	= 000140	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PR4   	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PR5   	= 000240	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PR6   	= 000300	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PR7   	= 000340  G	#7-288     #48-2204   #49-2223   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 
                        #253-13882 
PS    	= 177776  G	#7-288     *42-1768    43-1815   #48-2204   #49-2210   *66-2810    66-2815   *66-2815   *66-2826   
                        *66-2837   *74-3440   *74-3523   *75-3578    79-3938   *79-3938   #80-4024   *81-4065    81-4068   
                        *81-4068   *81-4094   *81-4127    81-4129   *81-4129   *81-4198    81-4200   *81-4200   #82-4348   
                        #86-4617   #145-8240  *147-8352   147-8356  *147-8356  *147-8369   147-8373  *147-8373   162-8771  
                        *162-8771  *162-8773   162-8783  *162-8783  *162-8785   165-8856  *165-8856  *165-8858   171-9135  
                        *171-9135  *171-9137  #176-9385  #190-10388  193-10662 *193-10662 *193-10666  194-10697 *194-10697 
                        *194-10709  196-10813 *196-10813 *196-10816  198-10839 *198-10839 *198-10856  201-10930 *201-10930 
                        *201-10933  202-10944  207-11135  214-11580  216-11768  226-12372 #253-13882  260-14218 *260-14218 
                         264-14394 *264-14394 *264-14398  265-14427 *265-14427  266-14461 *266-14461 *266-14466  267-14501 
                        *267-14501 *267-14507 *268-14555  270-14642 *270-14642 *270-14688  271-14740 *271-14740 *271-14785 
                         277-15130 *277-15130 *277-15145  278-15235 *278-15235 *278-15244  289-16053 *289-16053 
PSWW1 	= 000005	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   183-9989  #190-10388 
                         191-10561 #253-13882 
PSWW10	= 000014	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW11	= 000015	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW12	= 000016	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW13	= 000017	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW2 	= 000006	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW3 	= 000007	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW4 	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW5 	= 000011	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW6 	= 000012	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PSWW7 	= 000013	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PULSE 	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
PWRXSP	  001032 RG	#9-494     *83-4420    84-4444   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 20

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PWR.UP	  020314 RG	 83-4421   #84-4443    84-4445   
QNDSV 	  023626 R	*124-6809  *124-6835  *124-6836  #124-6865   124-6867  
QPRDTC	  025604 RG	#147-8351   147-8361  
QPRDTE	  025610 RG	 147-8347   147-8347  #147-8353  
QPRDTF	  027476 R	 164-8837  #166-8905   170-8971  
QPRDTL	  025666 R	#147-8368   166-8906  
QPROAD	  020162 R	*81-4197    81-4294   #81-4295   
QPROMS	  020140 R	 81-4199   #81-4293   
QPRTPD	  007742 RG	 36-1386   #38-1493   
QPRTSK	  007502 RG	 37-1447   #37-1453    37-1455   
QSIZE 	= 000023	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   178-9547   180-9799  
                         182-9919   184-10041 #190-10388 #253-13882 
Q.AK  	= 000012  G	#59-2647    155-8558   155-8558  
Q.DA  	= 000000  G	#59-2642    167-8920   175-9292  
Q.DZ  	= 000016  G	#59-2649    170-9019   175-9296  
Q.D1  	= 000006  G	#58-2636    128-7170  
Q.IOAE	= 000012	#81-4294   
Q.IOEF	= 000006	#81-4294   
Q.IOFN	= 000002	#81-4294   
Q.IOLU	= 000004	#81-4294   
Q.IOPL	= 000014	#81-4294   
Q.IOPR	= 000007	#81-4294   
Q.IOSB	= 000010	#81-4294   
Q.SI  	= 000004  G	#58-2635   *128-7178   131-7363   131-7373  
Q.SP  	= 000006  G	#59-2645    167-8918   167-8918  
Q.ST  	= 000004  G	#59-2644    164-8836   164-8836   165-8872   165-8872  
Q.SZ  	= 000020  G	#39-1526    39-1560   #59-2650   
Q.TS  	= 000002  G	#59-2643    175-9291  
RAMIS0	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RCVKLP	  027540 RG	 148-8412  #168-8934  
RESERV	  012024 R	 43-1859   #43-1878   
RETTOD	  027444 RG	 148-8395  #166-8891  
RFMAD0	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RFMAD1	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RFMAD2	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RFMAD3	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RF.XR 	= 000002  G	#63-2756   
RM    	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RMBYT 	= 000004	#190-10398 *200-10901 *219-12006 *219-12024 *219-12042 
RPBUF 	  005532 RG	#32-1080   
RPCNT 	  005536 RG	#32-1082   
RPCW2 	  005542 RG	#32-1086   
RPHD  	= ******  GX	 36-1364    37-1408    38-1508   
RPPEN 	  010332 RG	#40-1596    40-1597   
RPRNA 	  005530 RG	#32-1078   
RPRTC 	  005526 RG	#32-1076   
RPSTK 	= ******  GX	 37-1408   
RPTPD 	  010002 RG	 36-1364   #38-1507   
RPTSK 	  007242 RG	 37-1403   #37-1407    37-1409    40-1597    40-1603    40-1608    40-1613    40-1618    40-1623   
                         40-1628    40-1633   
RPUNIT	  005540 RG	#32-1084   
RQKLD 	  033144 R	#191-10566  193-10679 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 21

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RQKLR 	  033126 R	#191-10564  193-10675 
RQMCR 	  033110 R	#191-10562  193-10671 
RQSPB 	  024522 R	 137-7699   137-7720   137-7748  #137-7750  
RQSPT 	  024516 RG	 137-7741  #137-7748  
RQSTD 	  024534 R	*137-7718   137-7728  #137-7751  
RSX$$E	= 000050	#3-101      9-499      86-4559   
RSX$$F	= 000102	#3-109     #3-118      3-120      6-192      6-192      9-499      46-2053    46-2053    86-4559   
                         86-4559    144-8128   144-8128   189-10194  189-10194  252-13802  252-13802 
RSX$$K	= 000126	#3-105      9-499     
RSX$$V	= 000015	#3-100      9-499      86-4559   
RTDVST	  027236 RG	 148-8390  #164-8822  
RTNTOD	  027212 RG	 148-8394  #163-8798  
RUBP  	= 000020	#190-10417  201-10920  219-12011  219-12013  219-12025  219-12027  219-12041 
R$$11D	= 000001	#1-47      
R.AS  	= 000020  G	#63-2743    259-14156 
R.AT  	= 000006  G	#63-2736    259-14152  259-14159  260-14257  260-14274  288-15974 
R.DP  	= 000011  G	#63-2738   
R.FC  	= 000014  G	#63-2741    124-6810  *124-6820  *124-6823   124-6836   198-10869  198-10872  260-14234 *260-14245 
                         260-14247  288-15987 *288-16008 
R.FN  	= 000013  G	#63-2740    259-14150 
R.LU  	= 000012  G	#63-2739    288-15975 
R.PB  	= 000024  G	#63-2745    199-10884  201-10922  201-10924 *212-11458 *260-14241 *260-14242 *260-14243 *260-14256 
                         260-14264  260-14265  288-15996  288-15997  288-15998 *288-16006 *288-16007 
R.PR  	= 000010  G	#63-2737   
R.QSGC	= 000015	#66-2854   #66-2858   #146-8318  #191-10563 #191-10565 #191-10567 
R.QSPC	= 000014	#66-2854   #66-2858   #146-8318  #191-10563 #191-10565 #191-10567 
R.QSPN	= 000006	#66-2854   #66-2858   #146-8318  #191-10563 #191-10565 #191-10567 
R.QSPR	= 000012	#66-2854   #66-2858   #146-8318  #191-10563 #191-10565 #191-10567 
R.QSTN	= 000002	#66-2854   #66-2858   #146-8318  #191-10563 #191-10565 #191-10567 
R.SB  	= 000016  G	#63-2742    259-14144 *260-14259 
R.TD  	= 000004  G	#63-2735    260-14232 
R.UI  	= 000022  G	#63-2744   
SCD   	= 000040	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
SETDEB	  027600 RG	 148-8415  #169-8955  
SETLIN	  026356 RG	 148-8404  #156-8568  
SETSPD	  026376 RG	 148-8403  #157-8583  
SEXCM 	  022506 R	#110-5839   111-5903  
SEXP0 	  022514 R	 109-5790  #110-5842  
SEXP1 	  022574 R	 111-5902  #113-5992  
SEXP2 	  022476 R	#109-5792   110-5840   112-5950  
SEX97 	  022576 R	 109-5788   110-5838   112-5948  #113-5994   114-6036   114-6038   115-6131  
SF.EX 	= 000004  G	#52-2409    73-3367    137-7724  
SF.FX 	= 000002  G	 36-1332    36-1336    36-1346    36-1364    36-1369    36-1374    36-1379    36-1383    36-1386   
                        #52-2408    73-3351    76-3698   
SF.IR 	= 040000  G	#52-2410    137-7724  
SF.PT 	= 000001  G	#52-2407   
SF.ST 	= 100000  G	 36-1332    36-1336    36-1346    36-1352    36-1364    36-1369    36-1374    36-1379    36-1383   
                         36-1386   #52-2411   
SF.TA 	= 000001  G	 36-1332    36-1336    36-1346    36-1364    36-1374    36-1379    36-1383    36-1386   #52-2406   
                         73-3349    73-3402    76-3678    76-3716    76-3776    137-7724  
SKX   	  023664 R	 127-7044  #127-7047  
SNDALL	  027616 RG	 148-8397  #170-8969  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 22

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

SNDBEL	  037144 RG	 214-11688 #215-11730  217-11833 
SNDMSG	  013264 RG	*66-2820    66-2844   *66-2850   #66-2889   *169-8956  *169-8960  
SNDSTS	  032354 R	 178-9557   178-9557   179-9678   179-9678   180-9815   180-9815   182-9953   182-9953   184-10046 
                         184-10046 #185-10071 
SPDPAR	  033234 RG	#192-10641  214-11664 
SPDTBL	  025244 RG	#146-8324   146-8342   173-9204  
SPDTBZ	= 000020	#146-8342   173-9205  
SPSAV 	  001020 RG	#9-478     *44-1921   
STAT  	= 174434	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
STATD 	= 000034	#3-127     *90-4856    280-15403  280-15430 
STATI 	  001344 RG	#12-726     180-9723   182-9942  
STATS 	= 000000	#190-10396 
STATUS	= 000022	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   180-9718   185-10077 
                        #190-10388 #253-13882 
STBXFR	  032506 R	 179-9670   179-9670   182-9951   182-9951  #187-10159 
STCM  	  046614 R	#275-15059  276-15091 
STDCDR	  006776 RG	 36-1280   #36-1378    37-1423   
STDDTE	  006436 RG	 36-1282   #36-1331    37-1399   
STDDX 	  006536 RG	 36-1290   #36-1345    37-1447   
STDFED	  006476 RG	 36-1287   #36-1335    37-1439   
STDF11	  006576 RG	 36-1293   #36-1350   
STDINS	  006676 RG	 36-1304   #36-1368    137-7740  
STDLPT	  006736 RG	 36-1296   #36-1373    37-1416   
STDQPR	  007076 RG	 36-1298   #36-1385    37-1454   
STDRPT	  006636 RG	 36-1300   #36-1363    37-1408   
STDTTY	  007036 RG	 36-1302   #36-1382    37-1403   
STDVST	  027236 RG	 148-8391  #164-8821  
STELIG	  032120 R	 181-9885  #182-9950  
STELIX	  032142 R	 181-9868   182-9929  #182-9955  
STIND2	  030720 R	 178-9506  #178-9532  
STLN  	  046650 R	 275-15052  275-15052  276-15089  276-15089 #276-15096 
STNXT 	  034732 R	 203-11014  203-11026  204-11038  204-11047 #205-11073 
STPLIN	  026604 RG	 148-8407  #158-8638  
STRBF 	= 000002	#190-10397 *200-10902  219-12020  219-12043 
STRDAT	  027236 RG	 148-8388  #164-8823  
STSTT 	  001326 RG	#12-712     12-715     12-716    *178-9513  *178-9555  *179-9677  *180-9814  *182-9952   185-10073 
STSWD 	  005610 RG	#33-1108   
STSW0 	= 000004  G	#190-10425  214-11668  216-11778  222-12213  223-12251 *224-12286 *225-12328 *225-12329  226-12417 
                        *227-12470 *227-12476 *231-12613 *232-12718  232-12726  232-12754  233-12882 *240-13316 *245-13556 
                         246-13607 *246-13613 
STSW1 	= 000006  G	*152-8466  *152-8469  *152-8472   154-8508   154-8532  *154-8534   154-8535  *154-8537  *157-8620  
                        *157-8625  *157-8626   158-8642   170-9032   170-9045   170-9047   170-9052  *170-9057  *170-9108  
                        #190-10430  198-10845  198-10849  202-10950 *202-10962  202-10963  203-11003 *203-11005  203-11006 
                        *203-11007 *203-11024 *203-11025  205-11075  205-11077  205-11084 *205-11089  205-11095  207-11137 
                        *207-11139  207-11140  207-11152  207-11157 *208-11183  209-11208  210-11242  210-11250 *212-11417 
                         214-11609  214-11614 *214-11616  214-11623  214-11626 *214-11628 *214-11636 *214-11657 *214-11660 
                         214-11679 *214-11682 *214-11689  214-11697  214-11701 *214-11703 *214-11704 *214-11709  214-11713 
                        *214-11715  214-11718  215-11731  217-11822  217-11825  217-11836  218-11899 *218-11922 *218-11949 
                         223-12243 *223-12245  223-12249  223-12253  226-12387 *226-12416  226-12419 *226-12425 *226-12432 
                         228-12512  229-12540  231-12597 *231-12617  232-12690  232-12692 *232-12694  233-12870  233-12875 
                        *233-12885  233-12896  234-13002  234-13004 *234-13011  234-13013  237-13164  237-13166  237-13168 
                        *237-13188  239-13241  239-13243  239-13246 *239-13280 *240-13314 *240-13327  242-13396  245-13519 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 23

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         246-13619  247-13670  273-14870  273-14908  273-14921  273-14928  274-14972  274-15003  274-15008 
                         274-15010 
STSW2 	  005066 RG	#29-1037    249-13753 
STTYDN	  034546 R	 202-10966  202-10966 #203-11002  210-11306 
STTYO 	  035142 R	 207-11141 #207-11144  210-11300  210-11300  210-11309 
STXAS 	= 000000  G	#49-2272    67-3155   
STXCS 	= 000000  G	#49-2273   
STXDX 	= 000000  G	 8-357     #49-2274   
SWR   	= 177570	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
SWSLLT	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
SY0PUD	  011272 RG	#40-1673   
S.BA  	= 000012  G	#52-2389    76-3711    260-14249 
S.DI  	= 000011  G	#52-2388    76-3759   
S.DL  	= 000032  G	#52-2397    76-3744    76-3745    260-14241  260-14243 
S.DP  	= 000010  G	#52-2387    76-3688    137-7725  
S.FW  	= 000006  G	#52-2386   *73-3349    73-3351    73-3367   *73-3402    76-3678    76-3698   *76-3716   *76-3776   
                         139-7856  
S.LZ  	= 000014  G	#52-2390    76-3742   
S.PC  	= 000020  G	#52-2392    76-3703   
S.RB  	= 000026  G	#52-2395    128-7180  
S.RF  	= 000024  G	#52-2394    131-7331   137-7725  
S.SP  	= 000022  G	#52-2393    76-3701    76-3708   
S.SS  	= 000030  G	 43-1830   #52-2396    67-2921    67-3089   *72-3336   *133-7495  
S.SZ  	= 000036  G	#52-2400   
S.TD  	= 000004  G	#52-2385    76-3685   
S.TN  	= 000000  G	#52-2383    131-7378   131-7379   139-7866   139-7867  
S.TZ  	= 000016  G	#52-2391    77-3833   
S0.ABR	= 100000  G	#190-10434  190-10438  224-12286 
S0.CON	= 040000  G	#190-10435  190-10438  214-11668  226-12417  227-12470  227-12476 
S0.ISP	= 001700  G	#190-10436  190-10439  222-12214 
S0.MSK	= 140000  G	#190-10438  225-12320  225-12328  233-12883  240-13316  246-13608 
S0.OSP	= 036000  G	#190-10437  190-10439 
S0.SPD	= 037700  G	#190-10439 
S2.CHR	= 000377  G	#190-10488 
S2.CNT	= 001400  G	#190-10486  245-13559  246-13630 
S2.DDN	= 100000  G	#190-10479  233-12880  240-13319  240-13322  242-13400  243-13440  245-13513  245-13560  246-13594 
                         246-13630 
S2.DIP	= 040000  G	#190-10480  213-11494  217-11850  233-12880  240-13319  242-13400  243-13440  245-13513  245-13538 
                         245-13559  246-13594  246-13597 
S2.DIS	= 020000  G	#190-10481  240-13319  244-13473  245-13524  245-13536  246-13638 
S2.ENB	= 010000  G	#190-10482  240-13319  244-13470  245-13525  246-13630  246-13637 
S2.LCL	= 004000  G	#190-10483  235-13072  242-13402  243-13431  243-13436  243-13445  245-13532  245-13550  245-13561 
                         246-13621  246-13627  246-13630 
S2.RES	= 002000  G	#190-10484 
S2.SSZ	= 001000  G	#190-10485  241-13364  245-13546 
TBIT  	= 000020  G	#49-2270   
TEDXIT	  031352 R	 179-9671  #179-9679  
TENAD1	= 174410	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TENAD2	= 174412	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TF.OU 	= 000002  G	 38-1469    38-1473    38-1477    38-1481    38-1485    38-1490    38-1494    38-1503    38-1508   
                        #50-2351    73-3358    73-3388    76-3720    76-3748    76-3757   
THRED 	= 000000  G	#190-10423 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 24

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TMOCNT	  002670 RG	#17-915    *194-10698 *194-10700 *194-10704 *194-10706 
TNAD1 	= 000010	#3-133     *81-4072   *81-4100   *81-4114   *81-4141   *81-4152   *81-4158   *81-4177   *81-4202   
                        *81-4229   *81-4283   *97-5203   *178-9549  *180-9717  *180-9801  *182-9921  *184-10042 *185-10079 
                         281-15552 *282-15586 *282-15602 
TNAD2 	= 000012	#3-134     *81-4073   *81-4101   *81-4115   *81-4142   *81-4153   *81-4159   *81-4178   *81-4203   
                        *81-4230   *81-4284   *97-5204   *178-9550  *180-9720  *180-9802  *182-9922  *184-10043 *185-10080 
                        *282-15587 *282-15603 
TN.EMT	= 000012  G	#58-2629    67-2926   
TN.LRF	= 000040  G	#58-2631    71-3299   
TN.TRP	= 000014  G	#58-2630    67-3093   
TOBM  	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   178-9513   178-9555  
                         182-9942  #190-10388 #253-13882 
TOIP  	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   178-9513   178-9555  
                         180-9772  #190-10388 #253-13882 
TOIT  	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   179-9677   180-9814  
                         182-9952  #190-10388 #253-13882 
TOITDN	  031340 R	 179-9629   179-9653  #179-9676  
TOXQIP	  001401 RG	#12-765    *81-4274   *178-9522   184-10024 *184-10048 
TO10  	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO10AD	= 174420	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO10AS	  001324 RG	#12-708     178-9494  *178-9503  *178-9545  *184-10038 
TO10BC	= 174414	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO10BM	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO10DB	= 000400	#7-288      44-1962   #48-2204   #80-4024    81-4118    81-4162    81-4206    81-4287   #82-4348   
                         85-4542   #86-4617   #145-8240  #176-9385   178-9563   184-10047 #190-10388 #253-13882 
TO10DN	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   177-9436  #190-10388 
                        #253-13882 
TO10DT	= 174424	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO10ER	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   177-9436  #190-10388 
                        #253-13882 
TO10PK	  005614 RG	#33-1110   
TO10Q 	  001334 RG	#12-718     81-4248    81-4249    147-8374   147-8375   178-9504   178-9523   178-9524   278-15236 
                         278-15242  279-15282  279-15293 
TO10QC	= 001332 RG	#12-715    *81-4262    180-9791  *180-9793   180-9794   181-9871  
TO10SZ	  001322 RG	#12-706     178-9493  *178-9543  *184-10035 
TO11  	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO11AD	= 174422	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO11AS	  001316 RG	#12-702     179-9605  *187-10161 
TO11BC	= 174416	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO11BM	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   179-9601   179-9669  
                         181-9884   182-9946  #190-10388 #253-13882 
TO11BS	  001320 RG	#12-704     179-9598   179-9601  *187-10160 
TO11DB	= 004000	#7-288     #48-2204   #80-4024    81-4085    81-4130   #82-4348   #86-4617   #145-8240  #176-9385  
                         177-9448  #190-10388 #253-13882 
TO11DN	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   177-9442  #190-10388 
                        #253-13882 
TO11DT	= 174426	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
TO11DV	  001306 RG	#12-693    *179-9636   179-9637   188-10187 
TO11ER	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385   177-9442  #190-10388 
                        #253-13882 
TO11FN	  001304 RG	#12-691    *179-9613   179-9642   179-9647  *179-9659   180-9774  *182-9949   188-10185 
TO11FW	  001312 RG	#12-697     188-10188 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 25

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TO11GW	  001314 RG	#12-700    
TO11HD	  001302 RG	#12-689    *179-9635   179-9660   181-9883   188-10186 
TO11NP	  001300 RG	#12-687     179-9619   179-9650   179-9656   182-9933  *186-10135 
TO11Q 	  001342 RG	#12-724     147-8360  *147-8362   179-9620   184-10021  186-10116 
TO11QC	= 001333 RG	#12-716    *184-10045 
TO11SP	  001310 RG	#12-695    
TRPASV	  001120 RG	#9-512     *43-1815   *43-1816    43-1832    43-1840    43-1853   *67-2926   *67-3093   
TRPXIT	  011726 R	#43-1847    43-1875   
TRP4  	  011754 R	 43-1858   #43-1863   
TS.EXT	= 000026  G	#69-3252    122-6498  
TS.LRF	= 000006  G	#69-3234   
TS.LRQ	= 000002  G	#69-3230    76-3753    76-3772   
TS.RUN	= 000010  G	 37-1399    37-1403    37-1408    37-1416    37-1423    37-1439    37-1447    37-1454    37-1458   
                        #69-3236    70-3293    72-3313    76-3705    127-7110  
TS.SUS	= 000012  G	#69-3238    127-7108  
TS.TKN	= 000004  G	 43-1841   #69-3232    71-3300   
TS.WF0	= 000014  G	#69-3240    114-6052   115-6144  
TS.WF1	= 000016  G	#69-3244   
TS.WF2	= 000020  G	#69-3246   
TS.WF3	= 000022  G	#69-3248   
TS.WF4	= 000024  G	#69-3250    115-6133  
TTCNT 	= 000205  G	#28-1021    29-1038    39-1530    39-1542    213-11491 
TTCTY 	  037726 R	 217-11877 #219-11955 
TTINI 	  033254 RG	 191-10544  191-10544 #193-10660  201-10935 
TTINO 	  034416 R	 198-10837 #201-10934 
TTINPA	  037240 R	#216-11773  218-11936 
TTINPB	  037440 R	 214-11651  214-11706  214-11710  214-11714  215-11732  215-11741  216-11777  216-11779  217-11820 
                         217-11826  217-11830  217-11853 #217-11857  217-11873 
TTINX 	  034412 R	 198-10846  198-10850  198-10854 #201-10932 
TTOUTR	  035236 R	 205-11076  205-11096  207-11153  207-11158 #208-11184 
TTOUTX	  035230 R	 206-11126 #208-11182  212-11438 
TTPEN 	  010262 RG	#40-1582    40-1583    65-2807    81-4048    147-8347   191-10544  201-10916 
TTPKT 	  002740 RG	#18-932     198-10836 *198-10863  199-10882 *199-10889  212-11456 
TTSAV 	  040412 R	 207-11136  216-11769 #220-12131  226-12373 
TTSTCH	  037264 R	 214-11671  214-11683  214-11690  214-11720  214-11727 #217-11816 
TTTBL 	  003004 RG	#20-974     28-1021    29-1032    39-1530    39-1542    162-8758   213-11490  220-12143  227-12481 
                         232-12743  232-12759  235-13078  249-13750 
TTTMSG	  012402 R	 44-1915   #44-1997   
TTWLO 	  033070 R	#191-10558  193-10661 
TTYDNE	  035524 R	#210-11291  212-11460 
TTYDNX	  035570 R	 210-11295 #210-11303 
TTYEND	= 005054 RG	#28-1022    170-9060   233-12915  235-13076 
TTYEXP	= 000002  G	 170-9030   170-9054   175-9307  #190-10424  202-10957  210-11299  212-11413  212-11421  220-12145 
                         221-12176  231-12599  232-12658  232-12669 *232-12709  233-12841 *233-12930  234-12994  273-14892 
                         273-14936 
TTYHD 	  032554 RG	 36-1383    37-1403    38-1481   #191-10543 
TTYSP 	  033034 RG	 37-1403    191-10544 #191-10544 
TTYTPD	  007662 RG	 36-1383   #38-1480   
TTYTSK	  007202 RG	 15-831     15-836     37-1399   #37-1402    37-1404    40-1583   *210-11292 *217-11871 *218-11913 
                        *224-12292 *231-12605 
TT.ABL	= 000040  G	 154-8532   157-8625  #190-10470  214-11609  214-11679  214-11697  223-12243  223-12249  226-12419 
                         233-12870 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 26

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TT.ABW	= 000010  G	 154-8537   157-8625   170-9045  #190-10472  214-11623  214-11657  214-11704  226-12425  231-12617 
                         234-13002  240-13314  273-14908 
TT.BRK	= 004000  G	 157-8626  #190-10459  214-11682  214-11701  214-11703  214-11709 
TT.CRW	= 000004  G	#190-10473  217-11825  218-11922  218-11949  226-12416  226-12432  231-12617  232-12690  234-13002 
TT.CTY	= 000002  G	 20-976     154-8508   158-8642   170-9047  #190-10474  202-10963  207-11140  209-11208  217-11822 
                         237-13168  239-13246  242-13396  273-14870  273-14928  274-14972  274-15003 
TT.FEC	= 014000  G	#190-10452  214-11689  214-11719  240-13327 
TT.FEI	= 004000  G	#190-10453  214-11715 
TT.IGN	= 010000  G	 154-8534   157-8626  #190-10458  214-11614  214-11616  214-11636  214-11657  214-11660 
TT.LSP	= 020000  G	 154-8534   157-8626  #190-10457  214-11626  214-11628  214-11636  214-11703  223-12245  223-12253 
                         233-12896 
TT.NSA	= 000400  G	 152-8462   170-9032   170-9045  #190-10463  205-11084  231-12617  240-13314 
TT.OUT	= 000001  G	 170-9052  #190-10475  198-10845  198-10849  202-10950  202-10962  205-11075  207-11137  207-11139 
                         207-11152  208-11183  210-11242  210-11250  212-11417  215-11731  239-13243  240-13314  245-13519 
                         246-13619  247-13670  273-14921  274-15008 
TT.RIP	= 002000  G	#190-10461  218-11922  218-11949  226-12416  226-12425  226-12432  231-12617  232-12692  232-12694 
                         234-13004  234-13011 
TT.RMT	= 000100  G	 20-978     20-979     20-980     20-981     154-8535   157-8620  #190-10469  218-11899  226-12387 
                         228-12512  229-12540  231-12597  234-13013 
TT.RSI	= 020000  G	#190-10451  214-11713  233-12875  233-12885  240-13314 
TT.SIP	= 001000  G	 170-9057  #190-10462  203-11003  203-11005  205-11089  237-13166  239-13243  240-13314  274-15010 
TT.SND	= 140000  G	#190-10445  240-13314 
TT.SNI	= 040000  G	 170-9108  #190-10446  203-11007 
TT.XEN	= 000020  G	 151-8451   152-8467  #190-10471  217-11836  240-13327 
TT.XOF	= 000200  G	 152-8469  #190-10467  237-13188  239-13280  240-13327  273-14921 
T.BA  	= 000004  G	#50-2339   
T.FW  	= 000010  G	#50-2341   *73-3358    73-3388    76-3720    76-3748   *76-3757   
T.HBCT	= 000002  G	*186-10134 #190-10493 *236-13115  271-14730 
T.HCAD	= 000004  G	*171-9144  *171-9145  #190-10494  204-11042 *204-11043  206-11119  208-11179 *208-11180 *239-13264 
                         239-13265 
T.HCBC	= 000006  G	#190-10495  204-11041 *204-11046  206-11120 *207-11147  239-13262 *239-13266 *274-14994 
T.HFCN	= 000007  G	#190-10496 *273-14902 
T.HHDS	= 000010  G	 165-8855   165-8863   171-9145  #190-10497 
T.HP  	= 000012  G	#50-2342   
T.HRED	= 000000  G	#190-10492 
T.PN  	= 000000  G	#50-2337    139-7864   139-7865   141-7975   141-7976  
T.PZ  	= 000006  G	#50-2340    77-3835    139-7853  
T.RAPB	= 000004  G	#62-2713   
T.RAPE	= 000012  G	#62-2716    67-2923   
T.RAPF	= 000016  G	#62-2718   
T.RAPI	= 000006  G	#62-2714   
T.RAPM	= 000002  G	#62-2712   
T.RAPR	= 000010  G	#62-2715   
T.RAPT	= 000014  G	#62-2717    67-3091   
T.RAP4	= 000000  G	#62-2711   
T.RB  	= 000016  G	#50-2344   
T.RF  	= 000014  G	#50-2343    73-3391    76-3782   
T.SZ  	= 000020  G	#50-2346    77-3828    141-7984  
T10AD 	= 000020	#3-131      178-9495  *178-9546  *184-10037 
T11AD 	= 000022	#3-130      179-9606   179-9608  *187-10162 
T11BC 	= 000016	#3-132     *187-10163 
U     	= 000040	#8-422     #8-427      8-430     
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 27

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

UC.CCL	= 000002  G	 40-1583    40-1665   #57-2595   
UC.COM	= 020000  G	#57-2606   
UC.DIR	= 000010  G	#57-2597   
UC.ETB	= 000100  G	#57-2600   
UC.F11	= 040000  G	#57-2607   
UC.INB	= 000400  G	#57-2601   
UC.ISP	= 002000  G	#57-2603   
UC.MNT	= 100000  G	#57-2608   
UC.PSE	= 010000  G	#57-2605   
UC.REC	= 000001  G	 40-1583    40-1665   #57-2594   
UC.SDI	= 000020  G	#57-2598   
UC.SQD	= 000040  G	#57-2599   
UC.SWL	= 001000  G	#57-2602   
UC.TTY	= 000004  G	 40-1583   #57-2596   
UC.0SP	= 004000  G	#57-2604   
UF.OFL	= 000040  G	#57-2590   
UF.RD 	= 000040  G	#57-2587   
UF.RH 	= 000200  G	 40-1670   #57-2588   
UF.TL 	= 000100  G	#57-2589   
UNASG1	= 000032	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
UNASG2	= 000033	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
UNASG3	= 000034	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
UNASG4	= 000035	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
UNASG5	= 000036	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
UNASG6	= 000037	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
UNRGFN	  026034 RG	 148-8387   148-8393   148-8405  #149-8427  
UPAR0 	= 177640	#49-2245   
UPAR1 	= 177642	#49-2246   
UPAR2 	= 177644	#49-2247   
UPAR3 	= 177646	#49-2248   
UPAR4 	= 177650	#49-2249   
UPAR5 	= 177652	#49-2250   
UPAR6 	= 177654	#49-2251   
UPAR7 	= 177656	#49-2252   
UPDR0 	= 177600	#49-2254   
UPDR1 	= 177602	#49-2255   
UPDR2 	= 177604	#49-2256   
UPDR3 	= 177606	#49-2257   
UPDR4 	= 177610	#49-2258   
UPDR5 	= 177612	#49-2259   
UPDR6 	= 177614	#49-2260   
UPDR7 	= 177616	#49-2261   
UT.LG 	= 000004  G	#57-2623   
UT.PR 	= 000001  G	#57-2621   
UT.SL 	= 000002  G	#57-2622   
U.ACP 	= 000040  G	#57-2577    124-6816  
U.AF  	= 000014  G	#57-2559    201-10916 *260-14274 *260-14284 
U.AR  	= 000034  G	#57-2575   
U.CH  	= 000032  G	#57-2573   
U.C1  	= 000004  G	#57-2555   
U.C2  	= 000006  G	#57-2556   
U.C3  	= 000010  G	#57-2557   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 28

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

U.C4  	= 000012  G	#57-2558   
U.DACP	= 000036  G	#57-2576   
U.DN  	= 000000  G	#57-2552   
U.FB  	= 000003  G	#57-2554   
U.FO  	= 000043  G	#57-2580   
U.GC  	= 000031  G	#57-2571   
U.HA  	= 000020  G	#57-2561    124-6803  
U.LBH 	= 000044  G	#57-2581   
U.LBN 	= 000046  G	#57-2582   
U.PC  	= 000030  G	#57-2570   
U.PR  	= 000042  G	#57-2579   
U.RB  	= 000024  G	#57-2563   
U.RF  	= 000022  G	#57-2562    76-3764    124-6850   260-14217  260-14225  260-14225  260-14268 *260-14274 *260-14284 
U.RP  	= 000016  G	#57-2560    78-3904   
U.SZ  	= 000050  G	 36-1352   #57-2583    76-3761    103-5465   260-14213  260-14224  260-14225 
U.TF  	= 000042  G	#57-2578   
U.UI  	= 000030  G	#57-2569   
U.UN  	= 000002  G	#57-2553    103-5461   260-14268 
U.VA  	= 000026  G	#57-2568   
U.VP  	= 000032  G	#57-2572   
WEP   	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
WFXSET	  014212 R	 70-3285    70-3287    70-3289   #70-3292   
WI.WRV	= 001000	 288-15990 
WTLODT	  025220 R	#146-8314   147-8354  
W.VBN 	  000006	 289-16063 
XOFF  	  026730 RG	 148-8401  #160-8702  
XON   	  026744 RG	 148-8402  #161-8731  
X.X94 	  016100 R	 77-3827   #77-3846   
X.X95 	  016102 R	 77-3842   #77-3847   
X8X97 	  044404 RG	 255-13956 #255-13975 
X9X96 	  016156 R	 78-3898   #78-3914   
ZSTOP 	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
$BTMSK	  002650 RG	#17-893     212-11431 
$CDINT	= ******  GX	 8-396     
$CD11 	= 000001	#1-39       33-1132    36-1279    36-1316    36-1376    37-1421    38-1487   
$DBDTE	= 000001	#1-45       12-699    
$DHINP	  036400 RG	 8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     #214-11579 
$DHOUT	  034422 RG	 8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     #202-10943 
$DH11 	= 000001	#1-43      
$DIV  	= ******  GX	 107-5666   107-5666   107-5670   107-5670  
$DMINT	  040766 RG	 8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     #226-12371 
$DORBL	  021104 RG	 87-4678   #88-4707   
$DPMYG	  021536 RG	 87-4681   #91-4924   
$DPMYN	  021606 RG	 87-4684   #94-5042   
$DSW  	= 000046  G	#49-2263   *67-3108    74-3459    74-3474   
$DTA  	= ******	 8-386      29-1039    36-1283    36-1325    36-1338    37-1429    38-1495    40-1639   
$DTE  	= 000001	#1-46       85-4541   
$DTEDR	= ******	 15-843     67-3013    88-4708    256-14015 
$DTEOF	  021106 RG	 87-4679   #89-4748   
$DTEON	  021114 RG	 87-4680   #90-4789   
$DXINT	= ******  GX	 8-408     
$EXHSG	  021614 RG	 87-4685   #95-5077   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 29

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$EXHSM	  021622 RG	 87-4686   #96-5111   
$EXMYG	  021570 RG	 87-4682   #92-4972   
$EXMYN	  021600 RG	 87-4683   #93-5008   
$FE   	= 000001	#1-41       36-1286    36-1322    36-1333    37-1437    38-1474    40-1667   
$F11  	= 000001	#1-42       36-1292    36-1303    36-1307    36-1348    36-1366    38-1466    38-1510    66-2825   
                         288-15937 
$KLDFC	  022010 RG	 97-5187   #97-5195   
$KLDFR	  021630 RG	 87-4687   #97-5149   
$KLDFW	  021770 RG	 87-4688   #97-5189   
$KLDFX	  021746 RG	 87-4689   #97-5181   
$LPINT	= ******  GX	 8-444      8-445     
$LP20 	= 000001	#1-37       8-443      34-1177    36-1295    36-1310    36-1371    37-1414    38-1482    40-1662   
$MUL  	= ******  GX	 81-4057    81-4057   
$PRVDP	  022066 RG	 87-4691   #98-5237   
$PRVEX	  022102 RG	 87-4690   #99-5267   
$RP04 	= 000001	#1-40       36-1299    36-1313    36-1361    37-1406    38-1505    40-1595   
$RWDRG	  022136 RG	 87-4692   #100-5307  
$RX11 	= 000001	#1-62       8-407      30-1056    36-1289    36-1319    36-1343    36-1351    37-1445    38-1500   
                         40-1649   
$TOP10	= ******	 1-53       3-110      40-1678    56-2517    66-2880   
$TOP20	= 000001	#1-35       1-61       3-117      40-1674   
$TTINP	  037220 RG	 8-366      8-416      8-434      8-437      8-440     #216-11767 
$TTOUT	  035074 RG	 8-367      8-417      8-435      8-438      8-441     #207-11134 
$T1091	= ******	 1-49      
$UNIT 	  002646 RG	#17-891     212-11426 
$$    	= 000037	#44-1914    44-1914   #44-1916    44-1916   #44-1923    44-1923   #44-1926    44-1926   #44-1941   
                         44-1941   #66-2847    66-2847   #66-2849    66-2849   #73-3364    73-3364   #73-3366    73-3366   
                        #73-3386    73-3386   #73-3392    73-3392   #73-3400    73-3400   #73-3403    73-3403   #75-3650   
                         75-3650   #76-3692    76-3692   #76-3724    76-3724   #76-3729    76-3729   #76-3765    76-3765   
                        #76-3768    76-3768   #76-3783    76-3783   #79-3935    79-3935   #79-3950    79-3950   #81-4057   
                         81-4057   #81-4074    81-4074   #81-4093    81-4093   #81-4102    81-4102   #81-4116    81-4116   
                        #81-4144    81-4144   #81-4154    81-4154   #81-4160    81-4160   #81-4168    81-4168   #81-4170   
                         81-4170   #81-4179    81-4179   #81-4204    81-4204   #81-4217    81-4217   #81-4221    81-4221   
                        #81-4225    81-4225   #81-4231    81-4231   #81-4251    81-4251   #81-4258    81-4258   #81-4285   
                         81-4285   #81-4288    81-4288   #84-4453    84-4453   #84-4454    84-4454   #84-4469    84-4469   
                        #85-4509    85-4509   #85-4512    85-4512   #85-4513    85-4513   #85-4514    85-4514   #89-4761   
                         89-4761   #90-4795    90-4795   #90-4806    90-4806   #90-4816    90-4816   #90-4823    90-4823   
                        #90-4863    90-4863   #90-4870    90-4870   #90-4890    90-4890   #91-4932    91-4932   #97-5152   
                         97-5152   #97-5184    97-5184   #97-5192    97-5192   #97-5208    97-5208   #99-5275    99-5275   
                        #103-5434   103-5434  #105-5575   105-5575  #107-5666   107-5666  #107-5670   107-5670  #109-5780  
                         109-5780  #110-5830   110-5830  #111-5889   111-5889  #111-5893   111-5893  #112-5940   112-5940  
                        #114-6042   114-6042  #118-6270   118-6270  #120-6410   120-6410  #124-6683   124-6683  #124-6706  
                         124-6706  #124-6751   124-6751  #124-6833   124-6833  #124-6838   124-6838  #124-6842   124-6842  
                        #124-6852   124-6852  #124-6854   124-6854  #126-6955   126-6955  #126-6965   126-6965  #127-7038  
                         127-7038  #127-7053   127-7053  #127-7059   127-7059  #127-7084   127-7084  #128-7154   128-7154  
                        #128-7165   128-7165  #128-7181   128-7181  #131-7339   131-7339  #131-7348   131-7348  #131-7365  
                         131-7365  #131-7387   131-7387  #137-7665   137-7665  #137-7673   137-7673  #137-7693   137-7693  
                        #137-7707   137-7707  #137-7715   137-7715  #137-7742   137-7742  #143-8100   143-8100  #143-8106  
                         143-8106  #143-8113   143-8113  #147-8377   147-8377  #152-8465   152-8465  #153-8486   153-8486  
                        #153-8494   153-8494  #153-8496   153-8496  #154-8506   154-8506  #154-8517   154-8517  #154-8529  
                         154-8529  #154-8531   154-8531  #154-8539   154-8539  #154-8546   154-8546  #155-8557   155-8557  
                        #155-8558   155-8558  #156-8570   156-8570  #157-8585   157-8585  #157-8590   157-8590  #157-8611  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 30

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         157-8611  #157-8618   157-8618  #157-8621   157-8621  #157-8629   157-8629  #158-8640   158-8640  
                        #158-8648   158-8648  #158-8651   158-8651  #158-8655   158-8655  #159-8672   159-8672  #159-8677  
                         159-8677  #160-8703   160-8703  #160-8705   160-8705  #161-8732   161-8732  #161-8735   161-8735  
                        #162-8762   162-8762  #162-8772   162-8772  #162-8784   162-8784  #162-8789   162-8789  #164-8834  
                         164-8834  #164-8836   164-8836  #165-8857   165-8857  #165-8870   165-8870  #165-8872   165-8872  
                        #165-8881   165-8881  #166-8904   166-8904  #167-8916   167-8916  #167-8918   167-8918  #167-8923  
                         167-8923  #170-8970   170-8970  #170-9035   170-9035  #170-9037   170-9037  #170-9056   170-9056  
                        #170-9106   170-9106  #171-9136   171-9136  #175-9334   175-9334  #178-9512   178-9512  #178-9518  
                         178-9518  #178-9521   178-9521  #178-9526   178-9526  #178-9551   178-9551  #178-9557   178-9557  
                        #179-9628   179-9628  #179-9651   179-9651  #179-9657   179-9657  #179-9670   179-9670  #179-9678  
                         179-9678  #180-9721   180-9721  #180-9745   180-9745  #180-9755   180-9755  #180-9782   180-9782  
                        #180-9803   180-9803  #180-9810   180-9810  #180-9815   180-9815  #181-9865   181-9865  #181-9873  
                         181-9873  #182-9923   182-9923  #182-9926   182-9926  #182-9934   182-9934  #182-9951   182-9951  
                        #182-9953   182-9953  #184-10044  184-10044 #184-10046  184-10046 #185-10081  185-10081 #186-10132 
                         186-10132 #194-10701  194-10701 #194-10702  194-10702 #194-10707  194-10707 #195-10720  195-10720 
                        #195-10722  195-10722 #195-10726  195-10726 #196-10792  196-10792 #196-10815  196-10815 #197-10823 
                         197-10823 #197-10826  197-10826 #197-10829  197-10829 #198-10853  198-10853 #199-10887  199-10887 
                        #201-10931  201-10931 #202-10945  202-10945 #202-10966  202-10966 #202-10976  202-10976 #202-10978 
                         202-10978 #204-11050  204-11050 #205-11074  205-11074 #207-11136  207-11136 #207-11150  207-11150 
                        #207-11151  207-11151 #209-11222  209-11222 #209-11228  209-11228 #210-11293  210-11293 #210-11300 
                         210-11300 #213-11483  213-11483 #213-11493  213-11493 #213-11496  213-11496 #213-11509  213-11509 
                        #213-11510  213-11510 #213-11519  213-11519 #213-11521  213-11521 #214-11581  214-11581 #214-11593 
                         214-11593 #214-11649  214-11649 #214-11665  214-11665 #214-11666  214-11666 #214-11667  214-11667 
                        #214-11686  214-11686 #214-11705  214-11705 #214-11723  214-11723 #214-11726  214-11726 #216-11769 
                         216-11769 #217-11842  217-11842 #217-11846  217-11846 #217-11848  217-11848 #217-11849  217-11849 
                        #217-11852  217-11852 #217-11856  217-11856 #217-11867  217-11867 #217-11872  217-11872 #218-11907 
                         218-11907 #218-11914  218-11914 #218-11926  218-11926 #218-11932  218-11932 #218-11944  218-11944 
                        #220-12146  220-12146 #223-12261  223-12261 #225-12321  225-12321 #225-12322  225-12322 #226-12373 
                         226-12373 #226-12408  226-12408 #226-12421  226-12421 #227-12475  227-12475 #227-12486  227-12486 
                        #228-12514  228-12514 #229-12542  229-12542 #231-12620  231-12620 #232-12660  232-12660 #232-12672 
                         232-12672 #232-12698  232-12698 #232-12719  232-12719 #232-12749  232-12749 #233-12852  233-12852 
                        #233-12866  233-12866 #233-12879  233-12879 #233-12898  233-12898 #233-12948  233-12948 #234-13006 
                         234-13006 #234-13007  234-13007 #234-13015  234-13015 #234-13024  234-13024 #235-13071  235-13071 
                        #236-13113  236-13113 #237-13176  237-13176 #237-13182  237-13182 #238-13211  238-13211 #239-13254 
                         239-13254 #239-13268  239-13268 #239-13271  239-13271 #239-13278  239-13278 #240-13317  240-13317 
                        #240-13323  240-13323 #240-13326  240-13326 #241-13366  241-13366 #244-13469  244-13469 #244-13479 
                         244-13479 #245-13534  245-13534 #245-13548  245-13548 #245-13552  245-13552 #246-13605  246-13605 
                        #246-13623  246-13623 #247-13669  247-13669 #247-13672  247-13672 #247-13677  247-13677 #247-13679 
                         247-13679 #247-13683  247-13683 #247-13689  247-13689 #248-13718  248-13718 #250-13790  250-13790 
                        #255-13959  255-13959 #258-14093  258-14093 #258-14108  258-14108 #259-14146  259-14146 #259-14153 
                         259-14153 #259-14155  259-14155 #259-14160  259-14160 #259-14165  259-14165 #260-14221  260-14221 
                        #260-14266  260-14266 #260-14270  260-14270 #260-14276  260-14276 #260-14279  260-14279 #261-14311 
                         261-14311 #265-14436  265-14436 #265-14437  265-14437 #267-14505  267-14505 #272-14811  272-14811 
                        #273-14875  273-14875 #273-14877  273-14877 #273-14881  273-14881 #273-14937  273-14937 #274-14978 
                         274-14978 #274-14981  274-14981 #274-14997  274-14997 #274-15022  274-15022 #275-15052  275-15052 
                        #275-15060  275-15060 #276-15089  276-15089 #277-15143  277-15143 #277-15153  277-15153 #278-15209 
                         278-15209 #278-15227  278-15227 #278-15240  278-15240 #278-15243  278-15243 #279-15285  279-15285 
                        #279-15294  279-15294 #279-15297  279-15297 #280-15421  280-15421 #280-15437  280-15437 #280-15474 
                         280-15474 #280-15484  280-15484 #281-15524  281-15524 #282-15588  282-15588 #282-15604  282-15604 
                        #284-15654  284-15654 #285-15680  285-15680 #287-15882  287-15882 #288-15999  288-15999 #289-16080 
                         289-16080 #289-16114  289-16114 
$$$   	= 010046 R	#38-1469    38-1469   #38-1473    38-1473   #38-1477    38-1477   #38-1481    38-1481   #38-1485   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 31

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         38-1485   #38-1490    38-1490   #38-1494    38-1494   #38-1503    38-1503   #38-1508    38-1508   
                        #38-1513    38-1513   #38-1517    38-1517   
$$$ARG	= 000011	#81-4294    81-4294   #81-4294    81-4294   #81-4294    81-4294   #81-4294    81-4294   
$$$GLB	= ******	 66-2854    66-2854    66-2854    66-2854    66-2854    66-2854    66-2858    66-2858    66-2858   
                         66-2858    66-2858    66-2858    81-4294    81-4294    81-4294    81-4294    81-4294    81-4294   
                         81-4294    81-4294    146-8315   146-8318   146-8318   146-8318   146-8318   146-8318   146-8318  
                         191-10559  191-10563  191-10563  191-10563  191-10563  191-10563  191-10563  191-10565  191-10565 
                         191-10565  191-10565  191-10565  191-10565  191-10567  191-10567  191-10567  191-10567  191-10567 
                         191-10567 
$$$OST	= 000016	#66-2854    66-2854    66-2854   #66-2854    66-2854    66-2854   #66-2854    66-2854    66-2854   
                        #66-2854    66-2854    66-2854   #66-2854    66-2854    66-2854   #66-2854   #66-2858    66-2858   
                         66-2858   #66-2858    66-2858    66-2858   #66-2858    66-2858    66-2858   #66-2858    66-2858   
                         66-2858   #66-2858    66-2858    66-2858   #66-2858   #81-4294    81-4294    81-4294   #81-4294   
                         81-4294    81-4294   #81-4294    81-4294    81-4294   #81-4294    81-4294    81-4294   #81-4294   
                         81-4294    81-4294   #81-4294    81-4294    81-4294   #81-4294    81-4294   #146-8318   146-8318  
                         146-8318  #146-8318   146-8318   146-8318  #146-8318   146-8318   146-8318  #146-8318   146-8318  
                         146-8318  #146-8318   146-8318   146-8318  #146-8318  #191-10563  191-10563  191-10563 #191-10563 
                         191-10563  191-10563 #191-10563  191-10563  191-10563 #191-10563  191-10563  191-10563 #191-10563 
                         191-10563  191-10563 #191-10563 #191-10565  191-10565  191-10565 #191-10565  191-10565  191-10565 
                        #191-10565  191-10565  191-10565 #191-10565  191-10565  191-10565 #191-10565  191-10565  191-10565 
                        #191-10565 #191-10567  191-10567  191-10567 #191-10567  191-10567  191-10567 #191-10567  191-10567 
                         191-10567 #191-10567  191-10567  191-10567 #191-10567  191-10567  191-10567 #191-10567 
$$$T1 	= 000000	#66-2854    66-2854    66-2854    66-2854   #66-2854    66-2854   #66-2858    66-2858    66-2858   
                         66-2858   #66-2858    66-2858   #146-8318   146-8318   146-8318   146-8318  #146-8318   146-8318  
                        #191-10563  191-10563  191-10563  191-10563 #191-10563  191-10563 #191-10565  191-10565  191-10565 
                         191-10565 #191-10565  191-10565 #191-10567  191-10567  191-10567  191-10567 #191-10567  191-10567 
$$$UNI	= 000002	#35-1214    35-1230    35-1230    35-1230   #35-1230    35-1230    35-1230    35-1230   #35-1230   
                        #35-1258    35-1262    35-1262   #35-1262    35-1262    35-1262   #35-1262   
.ABCNT	  002606 RG	#17-866    *85-4517    193-10685 *224-12285 
.ABFLG	  002610 RG	#17-868    *85-4518   *163-8801   193-10683 *193-10685 
.ACKAL	  001164 RG	#9-563      66-2818   *81-4289    195-10714 *195-10716 
.ATLLH	  007136 RG	#37-1393    37-1399    37-1458    69-3210    76-3717    127-7100   127-7103  
.BGBST	= 076000  G	#14-787     14-794     42-1757   
.BGBUF	  001422 RG	#14-793     42-1762   
.BGLEN	= 002000  G	#14-788     14-795     42-1764   
.BM873	= 173000  G	#49-2220    83-4411   
.BRCLK	= 005000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.BRKCH	  002636 RG	#17-881     217-11869 
.BTPRM	  001160 RG	#9-559      162-8787  
.BTSCH	  001162 RG	#9-561     *81-4119    81-4135   *81-4156   *217-11880 
.BTSTK	  016542 RG	 37-1454    81-4048   #81-4048   
.CECLK	= 004000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.CEFN 	  044320 RG	 109-5780   109-5780   110-5830   110-5830   111-5893   111-5893   112-5940   112-5940   118-6270  
                         118-6270   124-6706   124-6706   128-7154   128-7154  #255-13949 
.CEFN3	  044324 RG	#255-13952  278-15227  278-15227 
.CKASS	  001050 RG	#9-501      75-3637   *75-3639   *143-8108  
.CKDEL	  044406 RG	 120-6410   120-6410   143-8113   143-8113  #256-14000 
.CLKBA	  002376 RG	#15-830     118-6303   120-6400   143-8091  
.CLKEA	  002602 RG	#15-840     118-6304   120-6402  
.CLKSW	  001136 RG	#9-536      66-2834   *66-2836   *143-8078  *143-8081  
.CLKSZ	= 000007  G	#15-827     15-837    
.CLRMR	= 006000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 32

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.CLRUN	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.COMEF	  001010 RG	#9-471      43-1874    66-2816    70-3274    70-3279    70-3288    70-3290    81-4069    81-4087   
                        *81-4098   *81-4241   *83-4388   *85-4539    91-4929    113-5989   113-5990   147-8371  *168-8940  
                        *168-8944  *180-9763   196-10771  213-11513  214-11591  214-11607  217-11827 *217-11866  217-11878 
                         224-12288  226-12389  231-12615  236-13104  255-13965  258-14086  261-14316  278-15199  281-15516 
                        *283-15630  284-15652 *284-15657 *285-15678 
.CONBT	= 012000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.CPDV 	  001262 RG	#12-671    *81-4263    277-15133 *277-15165 *279-15303 
.CPFN 	  001260 RG	#12-669     277-15131 *277-15163 
.CPUSN	  011342 RG	#41-1691   
.CRHD 	  001270 RG	#12-677     81-4264    279-15278 *279-15302 
.CRPB 	  001266 RG	#12-675    *81-4266    277-15136 *277-15138  277-15157 *277-15167 *279-15307 
.CRPFL	  005736 RG	#34-1147   *85-4516   
.CRQZ 	  001256 RG	#12-667    *81-4271   *277-15140 *277-15158  279-15279 *279-15310 
.CRSB 	  001272 RG	#12-679     277-15139 *277-15160 
.CRSND	  002634 RG	#17-879    *170-9043  *170-9063   273-14903 
.CRSZ 	  001264 RG	#12-673    *81-4270   *277-15141  277-15150 *277-15159  279-15289 *279-15309 
.CRTSK	  001006 RG	#9-468      43-1827    43-1839    67-2919    67-2981    67-3087    73-3418   *73-3421    74-3434   
                         74-3441   *74-3522    79-3939    147-8357   193-10663  258-14095  260-14207  260-14233  278-15225 
.CSHRG	= 164000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.CTYPT	  002642 RG	#17-885    
.CYLTM	= 000074  G	 9-555      15-833     15-834    #54-2487   
.DATE 	  001140 RG	#9-538      81-4215    166-8895  
.DATE3	  001140 RG	#9-539      163-8799   224-12290 
.DAY  	  001144 RG	#9-544      81-4219    107-5677  
.DBINT	= ******  GX	 8-403     
.DHSPA	  040562 RG	#223-12242  227-12475  227-12475  233-12898  233-12898  234-13007  234-13007 
.DHSPC	  040666 R	 223-12264 #224-12287 
.DHSPD	  040714 RG	 157-8629   157-8629   214-11665  214-11665  223-12261  223-12261 #225-12317 
.DHSPF	  040654 RG	 214-11666  214-11666 #224-12284 
.DHSPR	  040602 RG	 154-8539   154-8539   214-11649  214-11649  214-11705  214-11705 #223-12248 
.DHSPZ	  040540 RG	 214-11723  214-11723 #222-12211  245-13552  245-13552 
.DHSTO	  035034 RG	 205-11090 #206-11118  239-13271  239-13271  247-13679  247-13679  273-14939 
.DHTMO	  042030 RG	 85-4512    85-4512    194-10701  194-10701 #233-12813 
.DHXOF	  043040 RG	 237-13169  237-13173  237-13176  237-13176 #237-13181 
.DHXON	  043162 RG	 239-13247  239-13251  239-13254  239-13254 #239-13259 
.DLHUP	  041376 RG	 154-8517   154-8517   154-8546   154-8546  #231-12596  232-12698  232-12698 
.DLINT	  037544 RG	 216-11772 #218-11898 
.DLSTO	  035210 RG	#208-11178  239-13278  239-13278  247-13683  247-13683  273-14947 
.DLTMO	  041520 RG	 85-4513    85-4513    194-10702  194-10702 #232-12656 
.DLXOF	  043046 RG	 237-13167 #237-13187 
.DLXON	  043226 RG	 239-13269 #239-13277 
.DMHUP	  041276 RG	 154-8531   154-8531   157-8621   157-8621  #228-12511  234-13006  234-13006 
.DMTMO	  042336 RG	 85-4514    85-4514    194-10707  194-10707 #234-12977 
.DMUHU	  041326 RG	 153-8496   153-8496  #229-12539 
.DOW  	  001147 RG	#9-550     
.DQCDR	  010202 RG	#39-1549   
.DQDH0	  010122 RG	#39-1537    170-9019  
.DQDLS	  010142 RG	#39-1541   
.DQDL1	  010102 RG	#39-1533   
.DQLPT	  010162 RG	#39-1545   
.DQPBA	  010062 RG	#39-1529    39-1560    155-8558   155-8558  *156-8571   164-8836   164-8836   165-8872   165-8872  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 33

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         167-8918   167-8918   167-8920   175-9291   175-9292   175-9296   276-15105  276-15107 
.DQPEA	  010262 RG	#39-1559    39-1560   
.DQPSZ	= 000010  G	#39-1560    179-9637  
.DRBEL	  031356 RG	 177-9451  #180-9715  
.DRLTC	= 015000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.DRSRN	  013602 RG	 8-359     #67-3081   
.DR.NS	  013710 RG	#67-3104    90-4893    141-8013  
.DSACF	= 066000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.DSIOJ	= 065000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.DST  	  001146 RG	#9-548      81-4220   
.DTBLK	  001402 RG	#12-768    *81-4239   *181-9867  *182-9928  *182-9954   196-10811  213-11515  213-11519  213-11519 
.DTINT	  030442 RG	 8-453      8-453      8-453      8-453     #177-9425  
.DXRTY	  001372 RG	#12-747     280-15387 *280-15420  280-15441  280-15495 
.D.ASS	  022212 RG	 67-2990   #103-5431  
.D.CEF	  022462 RG	 67-3002   #109-5780  
.D.CMT	  023100 RG	 67-3000   #120-6399  
.D.DSE	  022516 RG	 67-3004   #111-5889  
.D.DTE	  020746 RG	 67-2991   #87-4651   
.D.EXT	  023146 RG	 67-3012   #122-6494   131-7402  
.D.GLI	  022316 RG	 67-2989   #105-5566  
.D.GMP	  024660 RG	 67-3024   #141-7968  
.D.GPP	  024536 RG	 67-3023   #139-7848  
.D.GTP	  022346 RG	 67-3021   #107-5662  
.D.MKT	  022776 RG	 67-2998   #118-6270  
.D.PUT	  024266 RG	 67-2999   #135-7583  
.D.QIO	  023170 RG	 67-2987    67-2988   #124-6677  
.D.RAF	  022554 RG	 67-3006   #113-5987  
.D.REC	  024106 RG	 67-2995   #131-7327  
.D.REF	  022540 RG	 67-3005   #112-5940  
.D.REQ	  024310 RG	 67-2992   #137-7665  
.D.ROE	  024106 RG	 67-2996   #131-7328  
.D.ROS	  024106 RG	 67-2997   #131-7329  
.D.SAR	  023654 RG	 67-2994   #127-7038  
.D.SEF	  022500 RG	 67-3003   #110-5830  
.D.SEN	  023640 RG	 67-2993   #126-6955  
.D.STV	  024254 RG	 67-3020   #133-7494  
.D.WFL	  022656 RG	 67-3008   #115-6117  
.D.WFO	  022602 RG	#114-6035   124-6863  
.D.WFS	  022600 RG	 67-3007   #114-6033  
.D.WSE	  022764 RG	 67-3011   #116-6181  
.EBPEC	  001376 RG	#12-760     281-15520 *281-15522 
.EBPEQ	  001374 RG	#12-757     197-10825  281-15527 
.EBRTY	  001373 RG	#12-749    *280-15439  280-15468  280-15496  281-15518 
.EIOJA	= 067000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.ELEDN	  031052 RG	 177-9443  #179-9596  
.ERRCD	  011354 RG	#41-1713   
.ERRPC	  011346 RG	#41-1711   
.EXEND	  001002 RG	#9-460      42-1753   
.FEACK	= ******  GX	 39-1556   
.FEACT	  005716 RG	#33-1125   *81-4290   
.FEMOD	  001170 RG	#9-567     
.FEPPU	  016000 RG	#77-3820    127-7059   127-7059   137-7673   137-7673  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 34

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.FEST 	= ******  GX	 39-1556   
.FESTB	  001000 RG	#9-458      9-459     
.FREPL	  001426 RG	#14-797    *42-1756   *42-1761    186-10130  213-11507  217-11831  242-13398  243-13438  270-14637 
                         271-14735 
.FSRPT	= 000050  G	#49-2264   
.GFNR 	= 102000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.HRDWR	  011344 RG	#41-1696   
.IBFLO	  005062 RG	#29-1033    242-13398 
.IBFOK	  005064 RG	#29-1035    213-11507  243-13438 
.INHDM	  002604 RG	#17-864    *150-8438   226-12391 
.INICL	= 070000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.INTEN	= 000100  G	#49-2225    85-4540   
.IODBG	  011372 RG	#41-1739    44-1910   *44-1919   *44-1953   
.IOSNP	  012406 R	 44-1923    44-1923   #45-2026   
.IRLTC	= 014000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.KACFL	  001420 RG	#13-781     196-10784 
.KALSC	= 000005  G	#54-2489    90-4887    196-10804 
.KLCPU	  001176 RG	#9-575     *90-4817   
.KLERQ	  001130 RG	#9-528     
.KLERW	  001166 RG	#9-565     
.KLFCF	  001173 RG	#9-571     
.KLFLG	  001174 RG	#9-573     
.KLITK	  001126 RG	#9-525     *81-4092   *84-4467   *180-9753  *196-10798 *280-15415 *280-15419 *280-15436 *280-15461 
                        *280-15475 
.KLIWD	  001132 RG	#9-531     
.KLMF2	  001200 RG	#9-590     
.KLMON	  001177 RG	#9-577     *90-4818   
.KLNBC	  001206 RG	#10-606     10-626    
.KLNFD	  001212 RG	#10-611    
.KLNFT	  001210 RG	#10-608     10-621     168-8939  
.KLNLB	  001206 RG	#10-605    
.KLNMD	  001224 RG	#10-618     162-8763  
.KLNPB	  001204 RG	#10-602     162-8766  
.KLNPE	= 001226 RG	#10-622    
.KLNPT	  002644 RG	#17-888    
.KLNPW	  001226 RG	#10-623    
.KLNSW	  001234 RG	#10-627     44-1966    44-1974    154-8510   158-8644   170-9027   198-10842  209-11212  209-11216 
                         210-11237  210-11294  212-11409  217-11819  218-11911  231-12602 *231-12604  237-13172  239-13250 
                         273-14872  274-14974 
.KLNTD	  001220 RG	#10-616    
.KLNTT	  001216 RG	#10-613    
.KLRLD	  001172 RG	#9-569     
.KPAC 	  001416 RG	#13-779    *90-4887   *90-4888   *196-10779 *196-10782 *196-10804 
.KPALV	  032144 RG	 181-9873   181-9873  #183-9981   196-10815  196-10815  213-11521  213-11521 
.KW11S	  036236 RG	 8-373     #213-11482 
.LCEND	= 011374 RG	 9-459     #41-1741   
.LCRDL	= 052000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LCRDR	= 051000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LCRM1	= 057000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LCRM2	= 056000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LCRM3	= 055000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LCRM4	= 054000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 35

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.LCRM5	= 053000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDAR 	= 077000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDBRL	= 043000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDBRR	= 042000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDCK1	= 046000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDCK2	= 047000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDDIS	= 045000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDRJD	= 064000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDRJV	= 063000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDRM1	= 060000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDRM2	= 061000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDRM3	= 062000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LDSEL	= 044000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.LPPFL	  006244 RG	#35-1199   *85-4515   
.MEMRS	= 076000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.MISC 	  011362 RG	#41-1729   *193-10670  198-10840 
.MNITS	= 000002	#9-583     
.MNTNX	= 000003	#9-584     
.MNT10	= 000001	#9-582     
.MNT20	= 000004	#9-585     
.MON  	  001145 RG	#9-546      107-5680  
.MSIZE	  001114 RG	#9-508     
.NOERR	  001122 RG	#9-519      9-521     *42-1765   *81-4091   *84-4468   *180-9754   196-10773 *196-10793  280-15411 
                         280-15428 *280-15483 
.NOHLT	= 001123 RG	#9-521      280-15457 
.OBFLO	= 001200  G	#186-10111  186-10130 
.PARER	  012040 R	 8-379     #43-1884   
.PARRG	= 172100  G	 43-1885   #49-2221    85-4523   
.PAT1.	  000040 RG	#8-361     
.PAT2.	  000120 RG	#8-381     
.PAT3.	  000234 RG	#8-398     
.PAT4.	  000520 RG	#8-429     
.PCAB1	= 150000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.PCAB2	= 151000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.PCAB3	= 152000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.PCAB4	= 153000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.PDP11	= 000050	#139-7834   139-7857  
.PFAIL	  001026 RG	#9-490      75-3582   *83-4394   *84-4456   
.PFASS	  001052 RG	#9-503      75-3640    75-3645   *75-3646   
.PFDBG	  011370 RG	#41-1737    44-1981   *83-4389   *85-4521   
.PFIOW	  001030 RG	#9-492     *84-4457   *85-4501   *85-4520    232-12662  232-12716  233-12815  233-12864  233-12945 
                         234-12979  234-12996  240-13309 
.PFRST	  020522 RG	 75-3650    75-3650   #85-4492   
.POLLH	  001432 RG	#14-801     14-807     14-817     73-3365    73-3399    76-3691    76-3728    128-7164   131-7386  
                         137-7706   137-7712  
.POLND	  002336 RG	 14-803    #14-816    
.POLST	  001436 RG	 14-802    #14-805    
.PRADR	  001362 RG	#12-736    *90-4852    177-9434   184-10030  213-11518 
.PRDCT	  001370 RG	#12-742    *81-4099   *81-4176   *177-9450  
.PRDTE	  001366 RG	#12-740     44-1957    81-4059    84-4452    90-4850    177-9433   184-10029  196-10814  213-11517 
.PRPSE	  001400 RG	#12-763     66-2842   *81-4051   *81-4071   *81-4112   *85-4519    217-11829 
.PRSTA	  001364 RG	#12-738     43-1867    44-1962    81-4060    84-4481    85-4542    177-9435   178-9563   184-10047 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 36

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         283-15629  284-15656 
.PUDBA	  010262 RG	 36-1352   #40-1579    76-3760    103-5454   260-14209 
.PUDEA	  011342 RG	#40-1685    103-5456  
.PWRDN	  020164 RG	 8-355      75-3584   #83-4387    84-4466   
.RCRM1	= 147000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.RCRM2	= 146000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.RCRM3	= 145000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.RCRM4	= 144000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.RCSPF	= 141000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.RDJ14	= 134000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.RDJ71	= 135000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.RDMAB	= 133000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.REQS 	  015276 RG	 73-3403    73-3403   #76-3678    124-6842   124-6842   127-7084   127-7084   137-7693   137-7693  
.RHPB 	  005550 RG	#32-1092    162-8779  
.RHPD 	  011366 RG	#41-1736   
.RHSN 	  005552 RG	#32-1093   
.RPADR	  005720 RG	#33-1127   
.RPELC	  005546 RG	#32-1090   
.RPELQ	  005544 RG	#32-1088    197-10828 
.RPSIZ	  005724 RG	#33-1129   
.RPUNT	  005714 RG	#33-1123   
.RP1PE	  010402 RG	#40-1602    40-1603   
.RP2PE	  010452 RG	#40-1607    40-1608   
.RP3PE	  010522 RG	#40-1612    40-1613   
.RP4PE	  010572 RG	#40-1617    40-1618   
.RP5PE	  010642 RG	#40-1622    40-1623   
.RP6PE	  010712 RG	#40-1627    40-1628   
.RP7PE	  010762 RG	#40-1632    40-1633   
.RQESD	  015770 RG	#76-3787    127-7090   137-7696  
.RQSPD	  025226 RG	#146-8317   163-8803   193-10687 
.SECLK	= 003000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.SEND 	  024006 RG	 124-6838   124-6838   126-6965   126-6965   127-7053   127-7053  #128-7147   137-7742   137-7742  
.SERFG	  001014 RG	#9-474     *42-1767   *69-3209    74-3436    75-3586    75-3614    75-3619    75-3626   *75-3642   
                        *75-3649   *79-3956   *83-4395   *84-4471   *143-8116  *143-8120  *213-11484 *262-14344 
.SETMR	= 007000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.SETRN	= 011000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.SEWFL	  001016 RG	#9-476     *116-6182   143-8120  *143-8121  
.SNDAL	  027624 RG	 66-2849    66-2849    170-8970   170-8970  #170-9006  
.SNDBF	  002614 RG	#17-875    *170-9021  *170-9105   203-11029 *203-11030  205-11087 
.SNDCN	  002624 RG	#17-877    *170-9019  *170-9101  *203-11013 
.SNDLP	  002612 RG	#17-873     85-4502    170-9013  *170-9018   170-9097   203-11019  205-11082 
.SSCLK	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.SSM  	  001150 RG	#9-552      81-4223    81-4224    107-5664  *143-8073  *143-8075   143-8076  
.SSTCO	  013556 RG	 43-1836   #67-3032   
.SSTET	  013550 RG	 67-2924   #67-3029    67-3092   
.STAST	  016160 RG	#79-3933    143-8106   143-8106   259-14160  259-14160 
.STDHL	  040476 RG	#221-12175  225-12322  225-12322  238-13211  238-13211  239-13268  239-13268  245-13548  245-13548 
                         246-13605  246-13605  247-13677  247-13677  273-14937  273-14937 
.STDTA	  006364 RG	#36-1271    73-3370    269-14584 
.STDTB	  006372 RG	 36-1272   #36-1278   
.STDTC	  006366 RG	#36-1273   
.STDTZ	  006370 RG	#36-1275    73-3371   *73-3372   *137-7736   269-14586 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 37

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.STELD	  031700 RG	 180-9810   180-9810  #181-9862   181-9867  
.STELI	  031766 RG	 180-9782   180-9782  #182-9918   182-9928  
.STPCL	= 000000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.STPDM	  041356 RG	 228-12514  228-12514  229-12542  229-12542 #230-12566  234-13015  234-13015 
.STRCL	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.STTNF	  032206 RG	 147-8377   147-8377  #184-10023 
.STTNQ	  032200 RG	 178-9526   178-9526  #184-10020  278-15240  278-15240  279-15285  279-15285 
.STTYD	  041212 RG	 214-11667  214-11667  218-11926  218-11926  226-12421  226-12421 #227-12469 
.STTYH	  041226 RG	 218-11944  218-11944  226-12408  226-12408 #227-12474  231-12620  231-12620 
.SYUIC	  001156 RG	#9-557      124-6791   139-7859  
.S2IDC	  005056 RG	#29-1029    213-11502 *243-13443 *245-13563 *246-13629 
.S2ITP	  005060 RG	#29-1031    235-13067 *235-13082 
.TENDN	  030564 RG	 177-9437  #178-9491  
.TFXOF	  044242 RG	 245-13534  245-13534 #250-13786 
.TFXON	  044232 RG	 246-13623  246-13623 #250-13781 
.TICK 	  025012 RG	 75-3617   #143-8065   143-8117  
.TICKS	  001134 RG	#9-534      143-8065  
.TKPS 	  001154 RG	#9-554      81-4054    107-5662   143-8067  *162-8750  *162-8753  
.TKTN 	  001124 RG	#9-523     *43-1842    66-2822   *66-2824   *71-3301   *81-4090   *84-4470   *180-9756  *196-10799 
                        *280-15485 
.TKTN.	  013170 R	 66-2827   #66-2857   
.TOD. 	  013152 R	 66-2838   #66-2853   
.TPDBA	  007602 RG	#38-1465    77-3825    77-3826    141-7980  
.TPDEA	  010062 RG	#38-1519    141-7978  
.TTACK	  035240 RG	 205-11094  207-11138  207-11146  207-11156 #209-11207 
.TTBTW	  044042 RG	 159-8677   159-8677   244-13479  244-13479 #247-13665  250-13790  250-13790 
.TTCHK	  043332 RG	 213-11496  213-11496  217-11852  217-11852 #241-13362 
.TTDIS	  043520 RG	 241-13366  241-13366  242-13403  243-13433  244-13474 #245-13509 
.TTELB	  002666 RG	#17-910    *214-11725 *232-12748 *234-13023  236-13132 *236-13134 
.TTELC	  002664 RG	#17-908     236-13106 
.TTELQ	  002662 RG	#17-903     197-10821  236-13116 
.TTENB	  043676 RG	 213-11510  213-11510  240-13323  240-13323  243-13439  244-13471 #246-13590 
.TTERL	  042634 RG	 214-11726  214-11726  233-12948  233-12948 #236-13103 
.TTFDI	  042566 RG	 213-11509  213-11509 #235-13066 
.TTICK	  043356 RG	 217-11856  217-11856 #242-13395 
.TTIXC	  043462 RG	 202-10978  202-10978  205-11074  205-11074  207-11151  207-11151 #244-13468 
.TTP11	  002640 RG	#17-883     170-9049  *198-10855 *199-10888  202-10973  207-11142  209-11210  217-11876  237-13170 
                         239-13248  273-14930  274-15005 
.TTQDS	  043412 RG	 158-8656  #243-13430 
.TTQEN	  043422 RG	 158-8659  #243-13435 
.TTRNG	  037712 R	 218-11907  218-11907 #218-11943 
.TTRST	  043242 RG	 231-12624  232-12719  232-12719  233-12866  233-12866 #240-13307 
.TTSCW	  037716 R	 218-11932  218-11932 #218-11948 
.TTSTP	  043056 RG	 237-13182  237-13182 #238-13210  247-13689  247-13689  274-15012 
.TTSW2	  044212 RG	 158-8655   158-8655   213-11493  213-11493  214-11686  214-11686  217-11849  217-11849  225-12321 
                         225-12321  233-12879  233-12879  235-13071  235-13071  240-13317  240-13317  244-13469  244-13469 
                         247-13669  247-13669 #249-13748 
.TTS2F	  005054 RG	#29-1027    213-11485 *241-13367 *245-13539 *246-13598 
.TTXOF	  042762 RG	 160-8705   160-8705   217-11846  217-11846 #237-13163 
.TTXON	  043104 RG	 161-8735   161-8735   217-11842  217-11842 #239-13240 
.VCLUN	  016104 RG	#78-3879    103-5434   103-5434   105-5575   105-5575   124-6683   124-6683  
.VERNO	  001036 RG	#9-498      162-8776  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 38

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.WRMBX	= 071000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9385  #190-10388 #253-13882 
.X.02 	  023662 R	 126-6961  #127-7045  
.YEAR 	  001142 RG	#9-542      81-4216    107-5682  
..AKCR	= ******  GX	 39-1550   
..AKLP	= ******  GX	 39-1546   
..ALCB	  045654 RG	 76-3724    76-3724    124-6751   124-6751   186-10132  186-10132  236-13113  236-13113  248-13718 
                         248-13718 #270-14631  272-14811  272-14811  279-15297  279-15297  281-15524  281-15524 
..ALC2	  045670 RG	#270-14638 
..ALOW	  046144 RG	 165-8857   165-8857   171-9136   171-9136  #272-14810  272-14814  278-15209  278-15209 
..BLXI	  050320 RG	#287-15870 
..BLXO	  050332 RG	 259-14146  259-14146 #287-15876 
..DECB	  046010 RG	 81-4258    81-4258    178-9521   178-9521   259-14165  259-14165 #271-14731 
..DECN	  046004 RG	 85-4509    85-4509    165-8881   165-8881   166-8904   166-8904   170-9106   170-9106   179-9651  
                         179-9651   204-11050  204-11050  207-11150  207-11150  258-14108  258-14108 #271-14729  273-14900 
                         273-14912  274-15022  274-15022 
..DEC2	  046000 RG	#271-14725 
..DQRN	  044670 RG	 198-10853  198-10853 #260-14206  260-14280 
..DSEV	  045264 RG	 76-3768    76-3768    79-3935    79-3935    111-5889   111-5889   124-6854   124-6854   128-7187  
                         143-8100   143-8100   178-9512   178-9512   179-9628   179-9628   210-11293  210-11293  217-11867 
                         217-11867  217-11872  217-11872  218-11914  218-11914  224-12293  231-12606  259-14155  259-14155 
                        #262-14343  285-15680  285-15680 
..DTP1	  050274 RG	 90-4890    90-4890   #285-15677 
..DTP2	  050244 RG	 89-4761    89-4761    180-9745   180-9745  #284-15651 
..DTSP	  050226 RG	 81-4093    81-4093    84-4469    84-4469    180-9755   180-9755   196-10792  196-10792  280-15484 
                         280-15484 #283-15628  284-15654  284-15654 
..ENB0	  045540 RG	 79-3950    79-3950    81-4170    81-4170    81-4288    81-4288    260-14270  260-14270  260-14276 
                         260-14276  265-14437  265-14437 #268-14543  289-16080  289-16080  289-16114  289-16114 
..ERLG	  044450 RG	 197-10823  197-10823  197-10826  197-10826  197-10829  197-10829 #258-14085  258-14109 
..FSTD	  045574 RG	 126-6955   126-6955   127-7038   127-7038   131-7348   131-7348   137-7665   137-7665  #269-14582 
..INTX	  015062 RG	 43-1850   #75-3577    84-4472    143-8122   177-9460   220-12153  268-14552 
..IODN	  044550 RG	 199-10887  199-10887 #259-14136  260-14279  260-14279 
..IPRI	  045360 RG	 76-3765    76-3765    76-3783    76-3783    124-6852   124-6852  #265-14424 
..NADD	  045434 RG	 73-3366    73-3366    73-3386    73-3386    73-3400    73-3400    76-3729    76-3729    128-7181  
                         128-7181   131-7387   131-7387   137-7715   137-7715   265-14436  265-14436 #266-14458  278-15243 
                         278-15243  279-15294  279-15294 
..NDEL	  045320 RG	 73-3364    73-3364    81-4251    81-4251    131-7365   131-7365   178-9518   178-9518  #264-14392 
                         267-14505  267-14505 
..PICK	  045476 RG	 73-3392    73-3392    76-3692    76-3692    128-7165   128-7165   131-7339   131-7339   137-7707  
                         137-7707   260-14221  260-14221 #267-14499 
..SACK	  046630 RG	 167-8923   167-8923   209-11228  209-11228 #276-15085 
..SEFN	  045212 RG	 259-14153  259-14153 #261-14305 
..SPLP	= ******  GX	 39-1546   
..STCH	  046564 RG	 217-11848  217-11848 #275-15047 
..STCR	= ******  GX	 39-1550   
..STFC	  046714 RG	 162-8762   162-8762   162-8789   162-8789   175-9334   175-9334   195-10720  195-10720  195-10722 
                         195-10722  195-10726  195-10726  227-12486  227-12486  275-15060  275-15060 #277-15128 
..STIN	  047104 RG	 162-8772   162-8772   162-8784   162-8784   258-14093  258-14093 #278-15198 
..STLP	= ******  GX	 39-1546   
..STPT	  046400 RG	 39-1530    39-1534    39-1538    39-1542    240-13326  240-13326 #274-14967 
..STQ 	  047304 RG	 214-11593  214-11593  277-15143  277-15143  277-15153  277-15153 #279-15274 
..STTY	  046164 RG	 39-1530    39-1534    39-1538    39-1542    170-9037   170-9037   170-9056   170-9056  #273-14863 
..SWED	  050126 RG	 90-4795    90-4795    90-4806    90-4806    90-4816    90-4816    90-4823    90-4823    90-4863   
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 39

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         90-4863    90-4870    90-4870    91-4932    91-4932    99-5275    99-5275   #282-15579 
..VTOL	  050406 RG	 124-6833   124-6833  #288-15964 
..VVLL	  050570 RG	 288-15999  288-15999 #289-16049 
..VXFR	  050312 RG	 260-14266  260-14266 #286-15719  287-15882  287-15882 
..WFED	  047454 RG	 81-4074    81-4074    81-4102    81-4102    81-4116    81-4116    81-4144    81-4144    81-4154   
                         81-4154    81-4160    81-4160    81-4168    81-4168    81-4179    81-4179    81-4204    81-4204   
                         81-4231    81-4231    81-4285    81-4285    97-5208    97-5208    178-9551   178-9551   180-9721  
                         180-9721   180-9803   180-9803   182-9923   182-9923   183-9990   184-10044  184-10044  185-10081 
                         185-10081 #280-15383  282-15588  282-15588  282-15604  282-15604 
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 40

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		#7-283     #44-1914   #44-1916   #44-1923   #44-1926   #44-1941   #48-2201   #66-2847   #66-2849   #73-3364   
                #73-3366   #73-3386   #73-3392   #73-3400   #73-3403   #75-3650   #76-3692   #76-3724   #76-3729   #76-3765   
                #76-3768   #76-3783   #79-3935   #79-3950   #80-4022   #81-4057   #81-4074   #81-4093   #81-4102   #81-4116   
                #81-4144   #81-4154   #81-4160   #81-4168   #81-4170   #81-4179   #81-4204   #81-4217   #81-4221   #81-4225   
                #81-4231   #81-4251   #81-4258   #81-4285   #81-4288   #82-4347   #84-4453   #84-4454   #84-4469   #85-4509   
                #85-4512   #85-4513   #85-4514   #86-4615   #89-4761   #90-4795   #90-4806   #90-4816   #90-4823   #90-4863   
                #90-4870   #90-4890   #91-4932   #97-5152   #97-5184   #97-5192   #97-5208   #99-5275   #102-5379  #103-5434  
                #104-5522  #105-5575  #106-5627  #107-5666  #107-5670  #108-5742  #109-5780  #110-5830  #111-5889  #111-5893  
                #112-5940  #114-6042  #117-6223  #118-6270  #119-6361  #120-6410  #121-6459  #123-6542  #124-6683  #124-6706  
                #124-6751  #124-6833  #124-6838  #124-6842  #124-6852  #124-6854  #125-6911  #126-6955  #126-6965  #127-7038  
                #127-7053  #127-7059  #127-7084  #128-7154  #128-7165  #128-7181  #131-7339  #131-7348  #131-7365  #131-7387  
                #132-7444  #134-7535  #136-7629  #137-7665  #137-7673  #137-7693  #137-7707  #137-7715  #137-7742  #142-8059  
                #143-8100  #143-8106  #143-8113  #145-8238  #147-8377  #152-8465  #153-8486  #153-8494  #153-8496  #154-8506  
                #154-8517  #154-8529  #154-8531  #154-8539  #154-8546  #155-8557  #155-8558  #156-8570  #157-8585  #157-8590  
                #157-8611  #157-8618  #157-8621  #157-8629  #158-8640  #158-8648  #158-8651  #158-8655  #159-8672  #159-8677  
                #160-8703  #160-8705  #161-8732  #161-8735  #162-8762  #162-8772  #162-8784  #162-8789  #164-8834  #164-8836  
                #165-8857  #165-8870  #165-8872  #165-8881  #166-8904  #167-8916  #167-8918  #167-8923  #170-8970  #170-9035  
                #170-9037  #170-9056  #170-9106  #171-9136  #175-9334  #176-9383  #178-9512  #178-9518  #178-9521  #178-9526  
                #178-9551  #178-9557  #179-9628  #179-9651  #179-9657  #179-9670  #179-9678  #180-9721  #180-9745  #180-9755  
                #180-9782  #180-9803  #180-9810  #180-9815  #181-9865  #181-9873  #182-9923  #182-9926  #182-9934  #182-9951  
                #182-9953  #184-10044 #184-10046 #185-10081 #186-10132 #190-10386 #194-10701 #194-10702 #194-10707 #195-10720 
                #195-10722 #195-10726 #196-10792 #196-10815 #197-10823 #197-10826 #197-10829 #198-10853 #199-10887 #201-10931 
                #202-10945 #202-10966 #202-10976 #202-10978 #204-11050 #205-11074 #207-11136 #207-11150 #207-11151 #209-11222 
                #209-11228 #210-11293 #210-11300 #213-11483 #213-11493 #213-11496 #213-11509 #213-11510 #213-11519 #213-11521 
                #214-11581 #214-11593 #214-11649 #214-11665 #214-11666 #214-11667 #214-11686 #214-11705 #214-11723 #214-11726 
                #216-11769 #217-11842 #217-11846 #217-11848 #217-11849 #217-11852 #217-11856 #217-11867 #217-11872 #218-11907 
                #218-11914 #218-11926 #218-11932 #218-11944 #220-12146 #223-12261 #225-12321 #225-12322 #226-12373 #226-12408 
                #226-12421 #227-12475 #227-12486 #228-12514 #229-12542 #231-12620 #232-12660 #232-12672 #232-12698 #232-12719 
                #232-12749 #233-12852 #233-12866 #233-12879 #233-12898 #233-12948 #234-13006 #234-13007 #234-13015 #234-13024 
                #235-13071 #236-13113 #237-13176 #237-13182 #238-13211 #239-13254 #239-13268 #239-13271 #239-13278 #240-13317 
                #240-13323 #240-13326 #241-13366 #244-13469 #244-13479 #245-13534 #245-13548 #245-13552 #246-13605 #246-13623 
                #247-13669 #247-13672 #247-13677 #247-13679 #247-13683 #247-13689 #248-13718 #250-13790 #253-13878 #255-13959 
                #258-14093 #258-14108 #259-14146 #259-14153 #259-14155 #259-14160 #259-14165 #260-14221 #260-14266 #260-14270 
                #260-14276 #260-14279 #261-14311 #265-14436 #265-14437 #267-14505 #272-14811 #273-14875 #273-14877 #273-14881 
                #273-14937 #274-14978 #274-14981 #274-14997 #274-15022 #275-15052 #275-15060 #276-15089 #277-15143 #277-15153 
                #278-15209 #278-15227 #278-15240 #278-15243 #279-15285 #279-15294 #279-15297 #280-15421 #280-15437 #280-15474 
                #280-15484 #281-15524 #282-15588 #282-15604 #284-15654 #285-15680 #287-15882 #288-15999 #289-16080 #289-16114 
CLEF$ 		#190-10386 
CLEF$C		#48-2202   
CLEF$S		#48-2200   #80-4022   #81-4275   
CMKT$S		#48-2201   
DECL$S		#48-2201   
DHPSW 		#7-331      8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     
DIR$  		#48-2200   #66-2827   #66-2838   #81-4052   #81-4052   #81-4066   #81-4066   #81-4128   #81-4128   #81-4199   
                #81-4275   #81-4275   #81-4276   #81-4276   #142-8059  #145-8238  #147-8354  #163-8803  #190-10387 #193-10661 
                #193-10671 #193-10675 #193-10679 #193-10687 #193-10689 #193-10689 #196-10775 #253-13877 #258-14099 #258-14099 
                #272-14813 #272-14813 
DMYG$ 		#253-13877 
DTON$S		#48-2201   #80-4022    81-4276   
EHSG$ 		#190-10387 #191-10561 
EPASCI		#66-2862    66-2881   
ERR$  		#66-2827   #66-2838   #81-4052   #81-4066   #81-4128   #81-4199   #81-4275   #81-4276   #147-8354  #163-8803  
RSXTOPS20  CREATED BY  MACRO  ON 3-APR-86 AT 19:00	PAGE 41

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

                #193-10661 #193-10671 #193-10675 #193-10679 #193-10687 #193-10689 #196-10775 #258-14099 #272-14813 
F11DF$		#7-285      7-289     #253-13879  253-13883 
IDENT$		#4-148     #6-192     #6-192     #46-2053   #46-2053   #80-3964   #80-3964   #82-4301   #82-4301   #86-4559   
                #86-4559   #102-5346  #102-5346  #104-5489  #104-5489  #106-5594  #106-5594  #108-5703  #108-5703  #117-6190  
                #117-6190  #119-6327  #119-6327  #121-6425  #121-6425  #123-6507  #123-6507  #125-6873  #125-6873  #132-7411  
                #132-7411  #134-7502  #134-7502  #136-7596  #136-7596  #138-7758  #138-7758  #140-7883  #140-7883  #144-8128  
                #144-8128  #176-9344