Google
 

Trailing-Edge - PDP-10 Archives - tops10_tools_bb-fp64b-sb - 10,7/rsx20f/rsxtol/rsxt10.l10
There is 1 other file named rsxt10.l10 in the archive. Click here to see a list.
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45
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
    30- 1041	LOW CORE -- DECTAPE 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 V05.04  Monday 16-May-88 15:45
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 V05.04  Monday 16-May-88 15:45
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- 8790	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   164- 8805	QUEUED PROTOCOL DRIVER -- STRING DATA
   165- 8838	QUEUED PROTOCOL DRIVER -- LINE NUMBER - CHARACTER
   166- 8883	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   167- 8907	QUEUED PROTOCOL DRIVER -- FLUSH DEVICE OUTPUT QUEUE
   168- 8926	QUEUED PROTOCOL DRIVER -- RECIEVE KLINIK PARAMETERS
   169- 8946	QUEUED PROTOCOL DRIVER -- SET/CLEAR HOST DEBUG MODE
   170- 8961	QUEUED PROTOCOL DRIVER -- SENDALL
   171- 9110	QUEUED PROTOCOL DRIVER -- COPY BUFFER
   172- 9154	QUEUED PROTOCOL DRIVER -- MAP DH-11 TO DM-11
   173- 9183	QUEUED PROTOCOL DRIVER -- FIND LINE SPEED
   174- 9216	QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME
   175- 9251	QUEUED PROTOCOL DRIVER -- FIND DEVICE NAME
   176- 9341	DTE-20 DRIVER -- COPYRIGHT STATEMENT
   177- 9385	DTE-20 DRIVER -- DTE-20 INTERRUPT HEAD
   178- 9461	DTE-20 DRIVER -- TO-10 DONE SERVICE
   179- 9565	DTE-20 DRIVER -- TO-11 DONE SERVICE
   180- 9681	DTE-20 DRIVER -- DOORBELL SERVICE
   181- 9818	DTE-20 DRIVER -- START TO ELEVEN DIRECT TRANSFER
   182- 9886	DTE-20 DRIVER -- START TO ELEVEN INDIRECT TRANSFER
   183- 9956	DTE-20 DRIVER -- UPDATE AND TRANSMIT FRONT-END KEEP-ALIVE COUNT
   184- 9991	DTE-20 DRIVER -- START TO TEN QUEUE
   185-10052	DTE-20 DRIVER -- SEND STATUS TO TEN
   186-10087	DTE-20 DRIVER -- GET A BUFFER FOR INCOMING TRANSFER
   187-10138	DTE-20 DRIVER -- START BYTE TRANSFER
   188-10164	DTE-20 DRIVER -- LOAD TO-11 QUEUE NODE
   189-10191	TERMINAL DRIVER -- COPYRIGHT STATEMENT
   190-10379	TERMINAL DRIVER -- DEFINITIONS
   193-10650	TERMINAL DRIVER -- TTINI (TTY QUEUE SERVICE)
   194-10690	TERMINAL DRIVER -- TIMEOUT SERVICE
   195-10709	TERMINAL DRIVER -- ACK ALL SERVICE
   196-10726	TERMINAL DRIVER -- QUEUED PROTOCOL KEEP-ALIVE SERVICE
   197-10816	TERMINAL DRIVER -- GENERAL ERROR LOGGING
   198-10829	TERMINAL DRIVER -- CTY SERVICE
   199-10877	TERMINAL DRIVER -- CTY I/O DONE SERVICE
   200-10891	TERMINAL DRIVER -- CTY INPUT SERVICE
   201-10908	TERMINAL DRIVER -- CTY OUTPUT SERVICE
   202-10937	TERMINAL DRIVER -- $DHOUT (DH-11 OUTPUT INTERRUPT)
   203-10980	TERMINAL DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)
   205-11051	TERMINAL DRIVER -- STNXT (START NEXT OUTPUT OPERATION)
   206-11098	TERMINAL DRIVER -- .DHSTO (START DH-11 OUTPUT)
   207-11127	TERMINAL DRIVER -- $TTOUT (DL11 OUTPUT INTERRUPT)
   208-11158	TERMINAL DRIVER -- .DLSTO (START DL-11 OUTPUT)
   209-11185	TERMINAL DRIVER -- .TTACK (ACKNOWLEDGE A TTY LINE)
   210-11232	TERMINAL DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)
   211-11310	TERMINAL DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)
   212-11345	TERMINAL DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)
   213-11461	TERMINAL DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)
   214-11523	TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)
   216-11746	TERMINAL DRIVER -- $TTINP (DL-11 INPUT INTERRUPT)
   217-11779	TERMINAL DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)
   218-11884	TERMINAL DRIVER -- .DLINT (DL-11E DATASET INTERRUPT SERVICE)
   219-11950	TERMINAL DRIVER -- TTCTY (CTY SERVICE)
   220-12097	TERMINAL DRIVER -- DHSAV (DH-11 REGISTER SAVE/RESTORE CO-ROUTINE)
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45
Table of contents

   221-12156	TERMINAL DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROLLER)
   222-12190	TERMINAL DRIVER -- .DHSPZ (ZERO INPUT SPEED OF A LINE)
   223-12218	TERMINAL DRIVER -- .DHSPR (RESET TO DEFAULT AUTO-BAUD SPEED)
   224-12265	TERMINAL DRIVER -- .DHSPF (FLAG AUTO-BAUD REPORT)
   225-12294	TERMINAL DRIVER -- .DHSPD (SET LINE SPEED)
   226-12336	TERMINAL DRIVER -- $DMINT (DM-11/BB MODEM CONTROL INTERRUPT)
   227-12446	TERMINAL DRIVER -- .STTYD (DIALUP/HANGUP SERVICE)
   228-12490	TERMINAL DRIVER -- .DMHUP (DM-11 HANGUP)
   229-12519	TTY DRIVER -- .DMUHU (UN-HANGUP DM11)
   230-12546	TERMINAL DRIVER -- .STPDM (STOP DM-11/BB SCAN)
   231-12575	TERMINAL DRIVER -- .DLHUP (DL-11E HANGUP)
   232-12627	TERMINAL DRIVER -- .DLTMO (DL-11E MODEM CONTROL TIMEOUT)
   233-12763	TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)
   234-12950	TERMINAL DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)
   235-13045	TERMINAL DRIVER -- .TTFDI (INPUT CONTROL SERVICE)
   236-13083	TERMINAL DRIVER -- .TTERL (TERMINAL ERROR LOGGING)
   237-13140	TERMINAL DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)
   238-13192	TERMINAL DRIVER -- .TTSTP (STOP TERMINAL OUTPUT)
   239-13217	TERMINAL DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)
   240-13284	TERMINAL DRIVER -- .TTRST (RESET A TERMINAL LINE)
   241-13341	TERMINAL DRIVER -- CHECK INPUT XOFF DELAY
   242-13369	TERMINAL DRIVER -- .TTICK (INPUT BUFFER CHECKS)
   243-13404	TERMINAL DRIVER -- .TTQDS (QUEUED PROTOCOL INPUT DISABLE SERVICE)
   244-13449	TERMINAL DRIVER -- .TTIXC (INPUT CONTROL CHECKS)
   245-13482	TERMINAL DRIVER -- .TTDIS (DISABLE INPUT FROM LINE)
   246-13565	TERMINAL DRIVER -- .TTENB (ENABLE INPUT FOR LINE)
   247-13640	TERMINAL DRIVER -- .TTBTW (BREAK-THROUGH WRITE FUNCTION)
   248-13696	TERMINAL DRIVER -- BLDPKT (BUILD A TERMINAL PACKET)
   249-13732	TERMINAL DRIVER -- .TTSW2 (FIND OFFSET INTO "STSW2" TABLE)
   250-13754	TERMINAL DRIVER -- .TFXON (FORCE AN XON FOR A LINE)
   252-13799	SYSTEM COMMON SUBROUTINES -- COPYRIGHT STATEMENT
   254-13885	SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)
   255-13905	SCOMM MODULE -- .CEFN   (CONVERT EFN)
   256-13976	SCOMM MODULE -- .CKDEL  (CLOCK DELETE)
   258-14058	SCOMM MODULE -- ..ERLG	(ERROR LOGGING)
   259-14112	SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)
   260-14168	SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)
   261-14286	SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)
   262-14327	SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)
   263-14345	SCOMM MODULE -- DIV216   (DIV R2 BY 16)
   264-14373	SCOMM MODULE -- ..NDEL	(NODE DELETE)
   265-14400	SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)
   266-14439	SCOMM MODULE -- ..NADD	(NODE ADD)
   267-14468	SCOMM MODULE -- ..PICK	(PICK A NODE)
   268-14513	SCOMM MODULE -- ..ENB0	(ENABLE TASK SWITCHING)
   269-14556	SCOMM MODULE -- ..FSTD	(FIND STD ENTRY)
   270-14607	SCOMM MODULE -- ..ALCB/..ALC2	(ALLOCATE CORE)
   271-14699	SCOMM MODULE -- ..DECB/..DECN/..DEC2 (DEALLOCATE CORE)
   272-14796	SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)
   273-14817	SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)
   274-14948	SCOMM MODULE -- ..STPT	(STOP TTY)
   275-15026	SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 QUEUE)
   276-15067	SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)
   277-15114	SCOMM MODULE -- ..STFC	(STORE FUNCTION)
   278-15170	SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)
   279-15251	SCOMM MODULE -- ..STQ	(STORE IN TO 10 QUEUE)
   280-15317	SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45
Table of contents

   282-15554	SCOMM MODULE -- ..SWED	(START AND WAIT FOR EXAMINE/DEPOSIT)
   283-15607	SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)
   284-15632	SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)
   285-15659	SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)
   286-15685	SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)
   287-15839	SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)
   288-15936	SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL)
   289-16021	SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL)
   291-16123	END
RSXFC	-- RSX20F PARAMETER FIL	MACRO V05.04  Monday 16-May-88 15:45  Page 1


      1						.TITLE	RSXFC	-- RSX20F PARAMETER FILE (TOPS-10 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-10 SYSTEM.
     32					;
     33					; EQUATED SYMBOLS
     34					;
     35		000001 				$TOP10	=1	; DEFINE TOPS-10 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		000001 				$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 V05.04  Monday 16-May-88 15:45  Page 1-1


     58					.ENDC			; $T1091
     59					.ENDC			; $TOP10
     60
     61					.IF DF	$TOP20
     62						$RX11	=1	; INCLUDE FLOPPY DRIVER
     63					.ENDC			; $TOP20
RSXFC	-- RSX20F PARAMETER FIL	MACRO V05.04  Monday 16-May-88 15:45  Page 2


     65
     66						.TITLE	RSX20F	-- RESIDENT EXECUTIVE (SYSTEM DEFINITION)
     67						.IDENT	/016000/
     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 16-00
     91					;
     92					; MODIFIED BY:
     93					;
     94					; A. Puchrik	27-Jan-88	; bump to version 16-00
     95					;
RSX20F	-- RESIDENT EXECUTIVE (	MACRO V05.04  Monday 16-May-88 15:45  Page 3


     97					;
     98					; SET VERSION OF RSX20F EXEC HERE
     99					;
    100		000016 			RSX$$V	=	16		; VERSION 16
    101		000000 			RSX$$E	=	00		; EDIT 00
    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
    112		000101 			RSX$$F	=	'A		; TOPS-10 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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  Page 6


    190
    191						.TITLE	LC -- LOW CORE FOR RSX20F
    192	000000					IDENT$	15,05,RSX$$F
						.IDENT	/A15050/
    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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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	037210'				 .WORD	$TTINP
	000062	004300 				 .WORD	0+<40*6>+4000
    367	000064					PSW	6,$TTOUT,0	; TTY LINE 0 OUTPUT (CTY)
	000064	035064'				 .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 V05.04  Monday 16-May-88 15:45  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	036226'				 .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 V05.04  Monday 16-May-88 15:45  Page 8-2
LOW CORE -- TRAP VECTORS

    387	000214					PSW	6,$DTINT	; DECTAPE INTERRUPT
	000214	000000G				 .WORD	$DTINT
	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					;
    410	000264					PSW	6		; RX-11 INTERRUPT
	000264	000265 				 .WORD	.-LOWCOD+1
	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	037210'				 .WORD	$TTINP
	000302	004301 				 .WORD	1+<40*6>+4000
    417	000304					PSW	6,$TTOUT,1	; DL-11E # 0 OUTPUT (KLINIK) INTERRUPT
	000304	035064'				 .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 V05.04  Monday 16-May-88 15:45  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	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #0 INPUT INTERRUPT
	000332	004300 				 .WORD	0+<40*6>+4000
	000334	034412'				 .WORD	$DHOUT		; DH-11 #0 OUTPUT INTERRUPT
	000336	004300 				 .WORD	0+<40*6>+4000
	000340	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #1 INPUT INTERRUPT
	000352	004301 				 .WORD	1+<40*6>+4000
	000354	034412'				 .WORD	$DHOUT		; DH-11 #1 OUTPUT INTERRUPT
	000356	004301 				 .WORD	1+<40*6>+4000
	000360	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #2 INPUT INTERRUPT
	000372	004302 				 .WORD	2+<40*6>+4000
	000374	034412'				 .WORD	$DHOUT		; DH-11 #2 OUTPUT INTERRUPT
	000376	004302 				 .WORD	2+<40*6>+4000
	000400	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #3 INPUT INTERRUPT
	000412	004303 				 .WORD	3+<40*6>+4000
	000414	034412'				 .WORD	$DHOUT		; DH-11 #3 OUTPUT INTERRUPT
	000416	004303 				 .WORD	3+<40*6>+4000
	000420	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #4 INPUT INTERRUPT
	000432	004304 				 .WORD	4+<40*6>+4000
	000434	034412'				 .WORD	$DHOUT		; DH-11 #4 OUTPUT INTERRUPT
	000436	004304 				 .WORD	4+<40*6>+4000
	000440	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #5 INPUT INTERRUPT
	000452	004305 				 .WORD	5+<40*6>+4000
	000454	034412'				 .WORD	$DHOUT		; DH-11 #5 OUTPUT INTERRUPT
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  Page 8-4
LOW CORE -- TRAP VECTORS

	000456	004305 				 .WORD	5+<40*6>+4000
	000460	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #6 INPUT INTERRUPT
	000472	004306 				 .WORD	6+<40*6>+4000
	000474	034412'				 .WORD	$DHOUT		; DH-11 #6 OUTPUT INTERRUPT
	000476	004306 				 .WORD	6+<40*6>+4000
	000500	040756'				 .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	036370'				 .WORD	$DHINP		; DH-11 #7 INPUT INTERRUPT
	000512	004307 				 .WORD	7+<40*6>+4000
	000514	034412'				 .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 V05.04  Monday 16-May-88 15:45  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	037210'				 .WORD	$TTINP
	000722	004304 				 .WORD	4+<40*6>+4000
    435	000724					PSW	6,$TTOUT,4	; DL-11E # 3 OUTPUT (DN20 #2)
	000724	035064'				 .WORD	$TTOUT
	000726	004304 				 .WORD	4+<40*6>+4000
    436					;
    437	000730					PSW	6,$TTINP,3	; DL-11E # 2 INPUT (DN20 #1)
	000730	037210'				 .WORD	$TTINP
	000732	004303 				 .WORD	3+<40*6>+4000
    438	000734					PSW	6,$TTOUT,3	; DL-11E # 2 OUTPUT (DN20 #1)
	000734	035064'				 .WORD	$TTOUT
	000736	004303 				 .WORD	3+<40*6>+4000
    439					;
    440	000740					PSW	6,$TTINP,2	; DL-11E # 1 INPUT (DN20 #0)
	000740	037210'				 .WORD	$TTINP
	000742	004302 				 .WORD	2+<40*6>+4000
    441	000744					PSW	6,$TTOUT,2	; DL-11E # 1 OUTPUT (DN20 #0)
	000744	035064'				 .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 V05.04  Monday 16-May-88 15:45  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	030432'				 .WORD	.DTINT
	000762	004340 				 .WORD	0+<40*7>+4000
	000764	030432'				 .WORD	.DTINT
	000766	004340 				 .WORD	0+<40*7>+4000
	000770	030432'				 .WORD	.DTINT
	000772	004340 				 .WORD	0+<40*7>+4000
	000774	030432'				 .WORD	.DTINT
	000776	004340 				 .WORD	0+<40*7>+4000
    454					;
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  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 	   101 	   061 		.ASCIZ	<126><101>\16-00\<200>
	001041	   066 	   055 	   060
	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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  Page 30
LOW CORE -- DECTAPE DRIVER DATA BASE

   1041						.SBTTL	LOW CORE -- DECTAPE DRIVER DATA BASE
   1042	005500				DTRTC::
   1043	005500	000000 				.WORD	0		; ERROR RETRY COUNT AND DRIVE RESET FLAG
   1044	005502				DTRNA::
   1045	005502	000000 				.WORD	0		; REQUEST NODE ADDRESS
   1046	005504				DTBUF::
   1047	005504	000000 	000000 			.WORD	0,0		; DECTAPE BUFFER
   1048	005510				DTCNT::
   1049	005510	000000 				.WORD	0		; BUFFER SIZE
   1050	005512				DTCW2::
   1051	005512	000000 				.WORD	0
   1052	005514				DTCW3::
   1053	005514	000000 				.WORD	0
   1054	005516					.BLKB	10		; [4.2263] PADDING
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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
   1284	006376	006536'				.WORD	STDDTP		; DECTAPE
   1287	006400	006476'				.WORD	STDFED		; FE 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
   1320	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 V05.04  Monday 16-May-88 15:45  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
   1339					;
   1340	006536				STDDTP::
   1341	006536					.STDEN	DT....,DTTPD,SF.TA!SF.FX!SF.ST,176,0,DTHD,0,0,0,0,0,0
	006536	016074 	131574 			.RAD50	"DT...."
	006542	007762'				.WORD	DTTPD
	006544	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006546	   176 	   000 			.BYTE	176,0
	006550	000000G				.WORD	DTHD
	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::
   1355	006576					.STDEN	F11ACP,F11TPD,SF.ST,220,<<DT0PEN-.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,<DT0PEN-.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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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	032544'				.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 V05.04  Monday 16-May-88 15:45  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	033024'				.WORD	TTYSP
	007210	000000 				.WORD	0
	007212	000177 				.WORD	177
	007214	032544'				.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 V05.04  Monday 16-May-88 15:45  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					;
   1430	007402				DTTSK::
   1431	007402					.ATLEN	FETSK,PRVTSK,DTSTK,0,176,DTHD,TS.RUN,0,STDDTP,0,0,0,0,0,0,0
	007402	007442'				.WORD	FETSK
	007404	007342'				.WORD	PRVTSK
	007406	000000G				.WORD	DTSTK
	007410	000000 				.WORD	0
	007412	000176 				.WORD	176
	007414	000000G				.WORD	DTHD
	007416	   010 	   000 			.BYTE	TS.RUN,0
	007420	006536'				.WORD	STDDTP
	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
   1432		007402'				PRVTSK==DTTSK
   1436					;
   1438	007442				FETSK::
   1439	007442					.ATLEN	DXTSK,PRVTSK,FESTK,0,176,FEHD,TS.RUN,0,STDFED,0,0,0,0,0,0,0
	007442	007502'				.WORD	DXTSK
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  Page 37-2
LOW CORE -- ATL (ACTIVE TASK LIST)

	007444	007402'				.WORD	PRVTSK
	007446	000000G				.WORD	FESTK
	007450	000000 				.WORD	0
	007452	000176 				.WORD	176
	007454	000000G				.WORD	FEHD
	007456	   010 	   000 			.BYTE	TS.RUN,0
	007460	006476'				.WORD	STDFED
	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
   1440		007442'				PRVTSK==FETSK
   1444					;
   1450	007502				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 V05.04  Monday 16-May-88 15:45  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	032544'				.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 V05.04  Monday 16-May-88 15:45  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
   1496					;
   1497	007762				DTTPD::
   1498	007762					.TPDEN	DTTPD,DTHD,0,0,TF.OU
	007762	000000 	000000 			.WORD	0,0
	007762	016064 	062240 			.RAD50	"DTTPD"
	007766	000000G				.WORD	DTHD
	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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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	046154'				.WORD	..STTY
	010070	046370'				.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	046154'				.WORD	..STTY
	010110	046370'				.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	046154'				.WORD	..STTY
	010130	046370'				.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	046154'				.WORD	..STTY
	010150	046370'				.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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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
   1640	011032				DT0PEN::
   1641	011032					.PUDEN	DT,0,FW,C1,0,0,512.,DT0PEN,DTTSK,DVCH,F11,0
	011032	   104 	   124 			.ASCII	"DT"
	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	DT0PEN
	011052	007402'				.WORD	DTTSK
	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
   1642		011100'			.=.-2
   1643	011100	001102 				.WORD	1102
   1644	011102				DT1PEN::
   1645	011102					.PUDEN	DT,1,FW,C1,0,0,512.,DT1PEN,DTTSK,DVCH,F11,0
	011102	   104 	   124 			.ASCII	"DT"
	011104	   001 				.BYTE	1
	011105	   300 				.BYTE	FW
	011106	140010 				.WORD	C1
	011110	000000 				.WORD	0
	011112	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  Page 40-5
LOW CORE -- LOGICAL UNIT TABLES

	011114	001000 				.WORD	512.
	011116	000000 				.WORD	0
	011120	011102'				.WORD	DT1PEN
	011122	007402'				.WORD	DTTSK
	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
   1646		011150'			.=.-2
   1647	011150	001102 				.WORD	1102
   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	007442'				.WORD	FETSK
	011244	011244'				.WORD	.
	011246	011244'				.WORD	.-2
	011250	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  Page 40-6
LOW CORE -- LOGICAL UNIT TABLES

	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::
   1677
   1680	011272					.PUDEN	SY,0,0,0,0,0,0,DT0PEN,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	DT0PEN
	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
   1685	011342				.PUDEA::
   1686							; END OF LOGICAL UNIT ABLE
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	047356'			JMP	INIAN		; GO DO IT
   1772						;
   1773	011562				EMGSTK::			; EMERGENCY STACK AREA
LC -- LOW CORE FOR RSX20F	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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	/A15050/
   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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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
   2518		000200 			KL.SSC==200		; +001 START AT LOCATION 407 (AFTER SYSTEM CRASH)
   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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	030120'			JSR	PC,COPBUF
   2848	013136	010004 				MOV	R0,R4		;;; SET UP TO SEND IT
   2849	013140					CALL	.SNDAL		;;; SEND MESSAGE
	013140	004737 	027614'			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 V05.04  Monday 16-May-88 15:45  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
   2883	013225					EPASCI	<%DECsystem-10 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	   363 				.BYTE	PB+'s	;;STORE THE BYTE WITH THE PARITY BIT
	013232	   371 				.BYTE	PB+'y	;;STORE THE BYTE WITH THE PARITY BIT
	013233	   363 				.BYTE	PB+'s	;;STORE THE BYTE WITH THE PARITY BIT
	013234	   164 				.BYTE	PB+'t	;;STORE THE BYTE WITH THE PARITY BIT
	013235	   145 				.BYTE	PB+'e	;;STORE THE BYTE WITH THE PARITY BIT
	013236	   355 				.BYTE	PB+'m	;;STORE THE BYTE WITH THE PARITY BIT
	013237	   055 				.BYTE	PB+'-	;;STORE THE BYTE WITH THE PARITY BIT
	013240	   261 				.BYTE	PB+'1	;;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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045310'			JSR	PC,..NDEL
   3365	014460	012704 	001432'			MOV	#.POLLH,R4	;RETURN THE NODE TO THE POOL
   3366	014464					CALL	..NADD
	014464	004737 	045424'			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 	045424'			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 V05.04  Monday 16-May-88 15:45  Page 73-1
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

	014572	004737 	045466'			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 	045424'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045466'			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 V05.04  Monday 16-May-88 15:45  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 	045644'			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 	045424'			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 V05.04  Monday 16-May-88 15:45  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 	045350'			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 	045254'			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 	045350'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045254'			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 	045530'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	007462'		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 V05.04  Monday 16-May-88 15:45  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 	047444'			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 	050216'			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 V05.04  Monday 16-May-88 15:45  Page 81-2
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

	017044	004737 	047444'			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 	047444'			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 	047444'			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 V05.04  Monday 16-May-88 15:45  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 	047444'			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 	047444'			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 	047444'			JSR	PC,..WFED
   4169	017342				87$:
   4170	017342					.ENB0			;;; +++006 ENABLE INTERRUPTS
	017342	004737 	045530'			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 	047444'			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 V05.04  Monday 16-May-88 15:45  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 	047444'			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 	047444'			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 V05.04  Monday 16-May-88 15:45  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 	045310'			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 	046000'			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 	047444'			JSR	PC,..WFED
   4286	020114				130$:				;;;  +++006
   4287	020114	012715 	000440 			MOV	#INTRON!TO10DB,@R5 ;;;ENABLE INTERRUPTS
   4288	020120					.ENB0			;;;ENABLE INTERRUPTS
	020120	004737 	045530'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	050216'			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 V05.04  Monday 16-May-88 15:45  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 	045774'			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 	042020'			JSR	PC,.DHTMO
   4513	020606					CALL	.DLTMO
	020606	004737 	041510'			JSR	PC,.DLTMO
   4514	020612					CALL	.DMTMO
	020612	004737 	042326'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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	/A16000/
   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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	050234'			JSR	PC,..DTP2
   4762	021112	104401 				TRAP	DR.01		;RETURN STATUS OK
   4763						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO V05.04  Monday 16-May-88 15:45  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 	050116'			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 	050116'			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 	050116'			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 V05.04  Monday 16-May-88 15:45  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 	050116'			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 	050116'			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 	050116'			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 V05.04  Monday 16-May-88 15:45  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 	050264'			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 V05.04  Monday 16-May-88 15:45  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 	050116'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	047444'			JSR	PC,..WFED
   5209	022062	012600 				MOV	(SP)+,R0
   5210	022064	000673 				BR	KLCST
   5211						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	050116'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	044310'			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 V05.04  Monday 16-May-88 15:45  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 	044310'			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 V05.04  Monday 16-May-88 15:45  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 	045254'			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 	044310'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	044310'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045264'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	044310'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	044376'			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 V05.04  Monday 16-May-88 15:45  Page 120-1
DIRECTIVE -- CANCEL MARK-TIME REQUESTS

   6419	023144	000760 				BR	50$
   6420					;
DMCMT	- "CANCEL MARK TIME" DI	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	044310'			JSR	PC,.CEFN
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO V05.04  Monday 16-May-88 15:45  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 	045644'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	050376'			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 	045350'			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 	045254'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045564'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045564'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	044310'			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 	045466'			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 V05.04  Monday 16-May-88 15:45  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 	045424'			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 	045254'			JMP	..DSEV		;DECLARE A SIGNIFICANT EVENT AND EXIT
   7188						;
DMSAR	- SEND & RECEIVE DIRECT	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045466'			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 	045564'			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 	045310'			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 V05.04  Monday 16-May-88 15:45  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 	045424'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045564'			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 V05.04  Monday 16-May-88 15:45  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 	045466'			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 	045424'			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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	045254'			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 	044376'			JSR	PC,.CKDEL
   8114	025166	000741 				BR	10$		;AND TRY AGAIN
RUN	- CLOCK HANDLER	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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	/A15140/
   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 V05.04  Monday 16-May-88 15:45  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					; 4-MAY-88  MAKE DISK DRIVE SERIAL NUMBER REPORT WORK FOR TOPS10
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	032176'			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 V05.04  Monday 16-May-88 15:45  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	027226'				STRDAT			; (03) STRING DATA FOR DEVICE
   8389	025742	027272'				LINCHR			; (04) LINE NUMBER CHARACTER DATA FOR DEVICE
   8390	025744	027226'				RTDVST			; (05) RETURN DEVICE STATUS
   8391	025746	027226'				STDVST			; (06) SET DEVICE STATUS FOR DEVICE
   8392	025750	027226'				HIDVST			; (07) HERE IS DEVICE STATUS
   8393	025752	026034'				UNRGFN			; (10) ERROR DEVICE STATUS
   8394	025754	027202'				RTNTOD			; (11) RETURN TIME OF DAY
   8395	025756	027434'				RETTOD			; (12) SEND TIME OF DAY
   8396	025760	027472'				FLDVOT			; (13) FLUSH DEVICE OUTPUT QUEUE
   8397	025762	027606'				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	027226'				LDLPR			; (30) LOAD LP RAM
   8410	026014	027226'				LDLPV			; (31) LOAD LP VFU
   8411	026016	026060'				NOSNDA			; (32) SET OR CLEAR "SUPPRESS SEND-ALL" BIT
   8412	026020	027530'				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	027570'				SETDEB			; (36) HOST DEBUG MODE
   8416	026030	027600'				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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 V05.04  Monday 16-May-88 15:45  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 	030256'			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 V05.04  Monday 16-May-88 15:45  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 	030256'			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 	030174'			JSR	PC,FNDDM
   8495	026166	001502 				BEQ	DEAND2		; NOT THERE -- IGNORE
   8496	026170					CALL	.DMUHU		; RAISE DTR
	026170	004737 	041316'			JSR	PC,.DMUHU
   8497	026174	000477 				BR	DEAND2		; FREE THE NODE
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  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 	030256'			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 	041366'			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 	030174'			JSR	PC,FNDDM
   8530	026266	001442 				BEQ	DEAND2		  ; NOT THERE -- IGNORE
   8531	026270					CALL	.DMHUP		  ; HANGUP
	026270	004737 	041266'			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 	040572'			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 	041366'			JSR	PC,.DLHUP
   8547	026342	000414 				BR	DEAND2		;;; [4.1.1035] RETURN THE NODE
   8548						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  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 	030256'			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 V05.04  Monday 16-May-88 15:45  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 	030256'			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 V05.04  Monday 16-May-88 15:45  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 	030226'			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 	030226'			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 	030256'			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 	030174'			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 	041266'			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 V05.04  Monday 16-May-88 15:45  Page 157-1
QUEUED PROTOCOL DRIVER -- SET LINE SPEED

   8628	026576				40$:
   8629	026576					CALL	.DHSPD		  ; SET DH-11 LINE SPEED
	026576	004737 	040704'			JSR	PC,.DHSPD
   8630	026602	000467 				BR	DEAND1		  ; DEALLOCATE NODE
   8631						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  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 	030256'			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 	044202'			JSR	PC,.TTSW2
   8656	026662	012746 	043402'			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 	043412'			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 V05.04  Monday 16-May-88 15:45  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 	030256'			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 	044032'			JSR	PC,.TTBTW
   8678	026726	000415 				BR	DEAND1		;;; [5.1016] DEALLOCATE AND EXIT
   8679						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  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 	030256'			JSR	PC,FDVNMM
   8704	026734	010205 				MOV	R2,R5		;;; COPY DLS POINTER TO R5
   8705	026736					CALL	.TTXOF		;;; DO THE XOFF
	026736	004737 	042752'			JSR	PC,.TTXOF
   8706	026742	000407 				BR	DEAND1		;;; AND EXIT
   8707						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  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 	030256'			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 	043074'			JSR	PC,.TTXON
   8736	026760	012600 				MOV	(SP)+,R0	;;; [5.1248] RESTORE R0
   8737	026762				DEAND1:
   8738	026762	000137 	027462'			JMP	DEANOD		;;; [4.2181] DEALLOCATE THE NODE
   8739						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  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 	046704'			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 	047074'			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	010046 			HISN::	MOV	R0,-(SP)		;;; [**] SAVE R0
   8777	027122	012700 	005550'			MOV	#.RHPB,R0	;;; [**] FETCH BUFFER ADDRESS
   8778	027126	012701 	100040 			MOV	#BIT15!BC.HSN,R1 ;;; [**] SET UP FNC CODE (INDIRECT)
   8779	027132	005002 				CLR	R2		;;; [**] NO EVENT FLAG DESIRED
   8780	027134	012703 	000203 			MOV	#D.CRJP,R3	;;; [**] RP DEVICE CODE
   8781	027140					.ENBT			;;; [**] ENABLE TASK SWITCHING
	027140	013746 	177776 			 MOV	@#PS,-(SP)
	027144	042737 	000340 	177776 		 BIC	#PRI7,@#PS
   8782	027152					CALL	..STIN		; [**] SEND THE PACKET
	027152	004737 	047074'			JSR	PC,..STIN
   8783	027156					.INHT			; [**] DISABLE TASK SWITCHING
	027156	012637 	177776 			 MOV	(SP)+,@#PS
   8784	027162	012600 				MOV	(SP)+,R0		; [**] RESTORE R0
   8785	027164	013704 	001160'		30$:	MOV	.BTPRM,R4	;;; SEND BOOT PARAMETERS
   8786	027170	012701 	000024 			MOV	#BC.BTP,R1	;;; SET BOOT PARAMETERS
   8787	027174					CALL	..STFC		;;; [5.1004] SEND BOOT PARAMETERS
	027174	004737 	046704'			JSR	PC,..STFC
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 162-1
QUEUED PROTOCOL DRIVER -- HERE IS INITIAL STATUS

   8788	027200	000530 				BR	DEANOD		;;; [4.1.1035] DEALLOCATE NODE
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 163
QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY

   8790						.SBTTL	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   8791
   8792					;
   8793					;	RTNTOD -- RETURN TIME OF DAY TO KL -- FUNCTION 11
   8794					;
   8795
   8796	027202				RTNTOD::
   8797	027202	005737 	001140'			TST	.DATE3		;;; [5.1004] IS OUR DATE VALID??
   8798	027206	001403 				BEQ	10$		;;; [5.1004] NO -- JUST REPORT CONFIGURATION
   8799	027210	012737 	177777 	002610'		MOV	#-1,.ABFLG	;;; FLAG "SETSPD" TO REPORT ALL LINES
   8800	027216				10$:
   8801	027216					DIR$	#.RQSPD		;;; SET SPEED AND THEN RETURN TIME OF DAY
	027216	012746 	025226'			MOV	#.RQSPD,-(SP)
	027222	104375 				EMT	375
   8802	027224	000516 				BR	DEANOD		;;; [4.1.1035] DEALLOCATE THIS NODE
   8803						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 164
QUEUED PROTOCOL DRIVER -- STRING DATA

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

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

   8883						.SBTTL	QUEUED PROTOCOL DRIVER -- RETURN TIME OF DAY
   8884
   8885					;
   8886					;	RETTOD -- RETURN TIME OF DAY -- FUNCTION 12
   8887					;
   8888
   8889	027434				RETTOD::
   8890	027434	062704 	000010 			ADD	#E.FW,R4	;;; MOVE OVER THE HEADER
   8891	027440	005724 				TST	(R4)+		;;; MOVE OVER THE VALID BIT AND CHECK IT
   8892	027442	001407 				BEQ	DEANOD		;;; TIME NOT VALID FORGET IT
   8893	027444	012703 	001140'			MOV	#.DATE,R3	;;; SET UP TO SET DATE
   8894	027450	012423 				MOV	(R4)+,(R3)+	;;; SET UP VALIDITY BITS
   8895	027452	012423 				MOV	(R4)+,(R3)+	;;; SET UP YEAR
   8896	027454	012423 				MOV	(R4)+,(R3)+	;;; SET UP DAY
   8897									;;; SET UP MONTH
   8898	027456	012423 				MOV	(R4)+,(R3)+	;;; SAVE DAYLIGHT SAVINGS TIME INDICATOR (1=DST)
   8899									;;; SET UP DAY OF WEEK
   8900	027460	012423 				MOV	(R4)+,(R3)+	;;; SET SECONDS SINCE MIDNIGHT
   8901	027462				DEANOD:
   8902	027462					CALL	..DECN		;;; DEALLOCATE BUFFER
	027462	004737 	045774'			JSR	PC,..DECN
   8903	027466				QPRDTF:
   8904	027466	000137 	025666'			JMP	QPRDTL		;;; GO TO NEXT FUNCTION
   8905						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 167
QUEUED PROTOCOL DRIVER -- FLUSH DEVICE OUTPUT QUEUE

   8907						.SBTTL	QUEUED PROTOCOL DRIVER -- FLUSH DEVICE OUTPUT QUEUE
   8908
   8909					;
   8910					;	FLDVOT -- FLUSH OUTPUT FOR THIS DEVICE -- FUNCTION 13
   8911					;
   8912
   8913	027472				FLDVOT::
   8914	027472					CALL	FDVNMM		;;; FIND THE DEVICE POINTER
	027472	004737 	030256'			JSR	PC,FDVNMM
   8915	027476	010146 				MOV	R1,-(SP)
   8916	027500					CALL	@.DQPBA+Q.SP-20(R1) ;;; STOP DEVICE
	027500	004771 	010050'			JSR	PC,@.DQPBA+Q.SP-20(R1)
   8917	027504	012601 				MOV	(SP)+,R1
   8918	027506	016100 	010042'			MOV	.DQPBA+Q.DA-20(R1),R0 ;;; FIND DEVICE TABLE BASE ADDRESS
   8919	027512	010205 				MOV	R2,R5		;;; FIND THIS DEVICE ADDRESS
   8920	027514	016403 	000006 			MOV	E.DV(R4),R3	;;; FIND DEVICE NUMBER
   8921	027520					CALL	..SACK		;;; SEND ACKNOWLEDGEMENT
	027520	004737 	046620'			JSR	PC,..SACK
   8922	027524	010400 				MOV	R4,R0		;;; SET UP TO RETURN NODE
   8923	027526	000755 				BR	DEANOD		;;; DEALLOCATE NODE
   8924						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 168
QUEUED PROTOCOL DRIVER -- RECIEVE KLINIK PARAMETERS

   8926						.SBTTL	QUEUED PROTOCOL DRIVER -- RECIEVE KLINIK PARAMETERS
   8927
   8928					;
   8929					;	RCVKLP -- RECIEVE KLINIK PARAMETERS -- FUNCTION 33
   8930					;
   8931
   8932	027530				RCVKLP::
   8933	027530	062704 	000012 			ADD	#E.FW+2,R4	;;; GET OVER THE INDIRECT HEADER
   8934	027534	012402 				MOV	(R4)+,R2	;;; BYTE COUNT TO R2
   8935	027536	001751 				BEQ	DEANOD		;;; QUIT IF NULL
   8936	027540	006202 				ASR	R2		;;; MAKE A WORD COUNT
   8937	027542	012703 	001210'			MOV	#.KLNFT,R3	;;; BUFFER POINTER TO R3
   8938	027546	042737 	010000 	001012'		BIC	#EF.RKP,.COMEF+2 ;;; CLEAR THE FLAG
   8939	027554				10$:
   8940	027554	012423 				MOV	(R4)+,(R3)+	;;; LOAD THE PARAMETERS
   8941	027556	077202 				SOB	R2,10$		;;; LOOP TILL DONE
   8942	027560	052737 	010000 	001012'		BIS	#EF.RKP,.COMEF+2 ;;; SET THE EVENT FLAG
   8943	027566	000735 				BR	DEANOD		;;; DEQUEUE THIS NODE AND EXIT
   8944						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 169
QUEUED PROTOCOL DRIVER -- SET/CLEAR HOST DEBUG MODE

   8946						.SBTTL	QUEUED PROTOCOL DRIVER -- SET/CLEAR HOST DEBUG MODE
   8947
   8948					;
   8949					;	SETDEB -- SET HOST DEBUG MODE (36)
   8950					;	CLRDEB -- CLEAR HOST DEBUG MODE (37)
   8951					;
   8952
   8953	027570				SETDEB::
   8954	027570	112737 	177777 	013265'		MOVB	#-1,SNDMSG+1	;;; [5.1127] SET HOST DEBUG MODE
   8955	027576	000731 				BR	DEANOD		;;; [5.1127] AND RETURN
   8956
   8957	027600				CLRDEB::
   8958	027600	105037 	013265'			CLRB	SNDMSG+1	;;; [5.1127] CLEAR HOST DEBUG MODE
   8959	027604	000726 				BR	DEANOD		;;; [5.1127] AND RETURN
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 170
QUEUED PROTOCOL DRIVER -- SENDALL

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

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

   9099	030072	005361 	002624'			DEC	.SNDCN(R1)	;;; DECREMENT COUNT OF SENDALLS SENT
   9100	030076	003004 				BGT	80$		;;; IF SOME LEFT, DON'T FREE MESSAGE
   9101						;
   9102	030100				75$:
   9103	030100	005061 	002614'			CLR	.SNDBF(R1)	;;; INDICATE NONEXISTANT
   9104	030104					CALL	..DECN		;;; DEALLOCATE THE NODE
	030104	004737 	045774'			JSR	PC,..DECN
   9105	030110				80$:				;;; HERE TO FINISH DUMMY SENDALL
   9106	030110	062762 	040000 	000006 		ADD	#TT.SNI,STSW1(R2);;; BUMP INDEX TO NEXT SENDALL
   9107	030116	000747 				BR	50$		;;; AND DO THE NEXT LINE
   9108						;
QPRDRV	-- QUEUED PROTOCOL DRIV	MACRO V05.04  Monday 16-May-88 15:45  Page 171
QUEUED PROTOCOL DRIVER -- COPY BUFFER

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

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

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

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

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

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

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

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

   9439	030500				10$:
   9440	030500	132711 	000202 			BITB	#TO11DN!TO11ER,(R1) ;;; TO-11 DONE OR ERROR??
   9441	030504	100556 				BMI	.ELEDN		;;; TO-11 DONE
   9442	030506	001403 				BEQ	20$		;;; NO ERRORS -- GO ON
   9443	030510					.CRASH	ETE		;;; ERROR -- DIE AGAIN!
	030510	000004 				IOT
	030512	   105 	   124 	   105 		.ASCIZ	/ETE/
	030515	   000
   9444						;
   9445	030516				20$:
   9446	030516	032711 	004000 			BIT	#TO11DB,(R1)	;;; HOW ABOUT A DOORBELL??
   9447	030522	001404 				BEQ	DTEXIT		;;; NO -- DISMISS INTERRUPT
   9448	030524	005237 	001370'			INC	.PRDCT		;;; YES -- COUNT THE DOORBELL
   9449	030530	000137 	031346'			JMP	.DRBEL		;;; AND SERVICE IT
   9450						;
   9451	030534				DTEXIT:
   9452	030534	012605 				MOV	(SP)+,R5	;;; RESTORE THE REGISTERS
   9453	030536	012604 				MOV	(SP)+,R4
   9454	030540	012603 				MOV	(SP)+,R3
   9455	030542	012602 				MOV	(SP)+,R2
   9456	030544	012601 				MOV	(SP)+,R1
   9457	030546	012600 				MOV	(SP)+,R0
   9458	030550	000137 	015062'			JMP	..INTX		;;; COMMON INTERRUPT EXIT
   9459						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO V05.04  Monday 16-May-88 15:45  Page 178
DTE-20 DRIVER -- TO-10 DONE SERVICE

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

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

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

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

   9667	031316	052701 	120000 			BIS	#TO11BM!IFLOP,R1 ;;; SET THE MODE FLAGS
   9668	031322					CALL	STBXFR		;;; START THE TRANSFER
	031322	004737 	032476'			JSR	PC,STBXFR
   9669	031326	000405 				BR	TEDXIT		;;; AND EXIT
   9670						;
   9671					;
   9672					; HERE TO RETURN DONE STATUS TO THE KL
   9673					;
   9674	031330				TOITDN:
   9675	031330	042737 	000001 	001330'		BIC	#TOIT,STSTT+2	;;; CLEAR PROCESSING QUEUE STATUS
   9676	031336					CALL	SNDSTS		;;; SEND THE STATUS
	031336	004737 	032344'			JSR	PC,SNDSTS
   9677	031342				TEDXIT:
   9678	031342	000137 	030446'			JMP	INTLPS		;;; CHECK OTHER DTE-20 STATUS AND DISMISS
   9679						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO V05.04  Monday 16-May-88 15:45  Page 180
DTE-20 DRIVER -- DOORBELL SERVICE

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

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

   9785					;
   9786					;	R1 POINTS TO STATI+4
   9787					;
   9788	031546				DBLHDR:
   9789	031546	121137 	001332'			CMPB	(R1),TO10QC	;;; IS THIS THE SAME NODE??
   9790	031552	001437 				BEQ	DBLDON		;;; YES -- SEND STATUS AND EXIT
   9791	031554	105237 	001332'			INCB	TO10QC		;;; NO -- UPDATE THE QUEUE COUNT
   9792	031560	121137 	001332'			CMPB	(R1),TO10QC	;;; IS IT NOW CORRECT??
   9793	031564	001403 				BEQ	10$		;;; YES -- GO ON
   9794	031566					.CRASH	ILQ		;;; NO -- DIE!
	031566	000004 				IOT
	031570	   111 	   114 	   121 		.ASCIZ	/ILQ/
	031573	   000
   9795						;
   9796	031574				10$:
   9797	031574	012702 	000003 			MOV	#QSIZE-FORPRO,R2 ;;; POINT TO THE QUEUE SIZE
   9798	031600	066302 	000010 			ADD	EHSM(R3),R2	;;; IN HIS GENERAL SECTION FOR ME
   9799	031604	005060 	000010 			CLR	TNAD1(R0)	;;; CLEAR THE DEPOSIT BIT
   9800	031610	010260 	000012 			MOV	R2,TNAD2(R0)	;;; SET THE ADDRESS AND START THE EXAMINE
   9801	031614					CALL	..WFED		;;; WAIT FOR IT TO COMPLETE
	031614	004737 	047444'			JSR	PC,..WFED
   9802	031620	016037 	000002 	001340'		MOV	DXWD3(R0),EQSZ	;;; READ THE DIRECT SIZE
   9803	031626	023727 	001340'	000144 		CMP	EQSZ,#^D100	;;; IS THE NODE OF A LEGAL SIZE??
   9804	031634	103403 				BLO	20$		;;; YES -- GO ON
   9805	031636					.CRASH	PT4		;;; NO -- DIE!
	031636	000004 				IOT
	031640	   120 	   124 	   064 		.ASCIZ	/PT4/
	031643	   000
   9806						;
   9807	031644				20$:
   9808	031644					CALL	.STELD		;;; ALLOCATE AND START THIS HEADER
	031644	004737 	031670'			JSR	PC,.STELD
   9809	031650	000405 				BR	DBLXIT		;;; AND EXIT
   9810						;
   9811	031652				DBLDON:
   9812	031652	052737 	000001 	001330'		BIS	#TOIT,STSTT+2	;;; SET PROCESSING QUEUE STATUS
   9813	031660					CALL	SNDSTS		;;; SEND THE STATUS
	031660	004737 	032344'			JSR	PC,SNDSTS
   9814	031664				DBLXIT:
   9815	031664	000137 	030446'			JMP	INTLPS		;;; AND EXIT
   9816						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO V05.04  Monday 16-May-88 15:45  Page 181
DTE-20 DRIVER -- START TO ELEVEN DIRECT TRANSFER

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

   9873					; HERE TO START THE NEXT NODE IN THE TO-11 QUEUE
   9874					;
   9875	031726				20$:
   9876	031726	005001 				CLR	R1		;;; ASSUME NO INTERRUPT WANTED
   9877	031730	162737 	000012 	001340'		SUB	#^D10,EQSZ	;;; DISCOUNT THE HEADER
   9878	031736	001002 				BNE	30$		;;; DON'T NEED AN INTERRUPT THIS TIME
   9879	031740	052701 	100000 			BIS	#IFLOP,R1	;;; MUST INTERRUPT IF COUNT GOES TO ZERO
   9880	031744				30$:
   9881	031744	012702 	001302'			MOV	#TO11HD,R2	;;; ADDRESS TO R2
   9882	031750	052701 	027766 			BIS	#<-^D10&7777>!TO11BM,R1 ;;; SET UP BYTE COUNT AND MODE
   9883	031754	000455 				BR	STELIG		;;; START THE TRANSFER AND EXIT
   9884						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO V05.04  Monday 16-May-88 15:45  Page 182
DTE-20 DRIVER -- START TO ELEVEN INDIRECT TRANSFER

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

   9940	032062	032737 	000004 	001346'		BIT	#TOBM,STATI+2	;;; ARE WE IN WORD MODE??
   9941	032070	001003 				BNE	30$		;;; NO -- GO ON
   9942	032072	106101 				ROLB	R1		;;; YES -- RESTORE TO BYTE COUNT
   9943									;;; NOTE: >> SEE PREVIOUS NOTE
   9944	032074	052701 	020000 			BIS	#TO11BM,R1	;;; SET BYTE MODE
   9945	032100				30$:
   9946	032100	052701 	100000 			BIS	#IFLOP,R1	;;; INTERRUPT BOTH CPU'S WHEN DONE
   9947	032104	005037 	001304'			CLR	TO11FN		;;; RELEASE FIXED BUFFER
   9948	032110				STELIG:
   9949	032110					CALL	STBXFR		;;; START THE TRANSFER
	032110	004737 	032476'			JSR	PC,STBXFR
   9950	032114	052737 	000001 	001330'		BIS	#TOIT,STSTT+2	;;; SET QUEUE IN PROGRESS STATUS
   9951	032122					CALL	SNDSTS		;;; SEND THE STATUS
	032122	004737 	032344'			JSR	PC,SNDSTS
   9952	032126	005037 	001402'			CLR	.DTBLK		;;; CLEAR QUEUE BLOCKED FLAG (SETS CC-Z)
   9953	032132				STELIX:
   9954	032132					RETURN			;;; TO CALLER
	032132	000207 				RTS	PC
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO V05.04  Monday 16-May-88 15:45  Page 183
DTE-20 DRIVER -- UPDATE AND TRANSMIT FRONT-END KEEP-ALIVE COUN

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

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

  10046	032332	105237 	001401'			INCB	TOXQIP		;;; INTERLOCK THIS NODE
  10047	032336	012600 				MOV	(SP)+,R0	;;; RESTORE R0
  10048	032340	012603 				MOV	(SP)+,R3	;;; RESTORE R3
  10049	032342	000424 				BR	10$		;;; AND EXIT
  10050						;
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO V05.04  Monday 16-May-88 15:45  Page 185
DTE-20 DRIVER -- SEND STATUS TO TEN

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

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

  10138						.SBTTL	DTE-20 DRIVER -- START BYTE TRANSFER
  10139
  10140					;+
  10141					; STBXFR -- START A TO-11 BYTE TRANSFER
  10142					;
  10143					; THIS SUBROUTINE WILL START A TO-11 BYTE TRANSFER AND SAVE THE ADDRESS
  10144					; AND BYTE COUNT FOR END CHECKS
  10145					;
  10146					; INPUTS:
  10147					;
  10148					;	R0 -- POINTS TO THE DTE-20
  10149					;	R1 -- BYTE COUNT FOR TRANSFER
  10150					;	R2 -- ADDRESS FOR TRANSFER
  10151					;
  10152					; OUTPUTS:
  10153					;
  10154					;	NO REGISTERS ALTERED
  10155					;-
  10156
  10157	032476				STBXFR:
  10158	032476	010137 	001320'			MOV	R1,TO11BS	;;; SAVE THE BYTE COUNT
  10159	032502	010237 	001316'			MOV	R2,TO11AS	;;; AND THE ADDRESS
  10160	032506	010260 	000022 			MOV	R2,T11AD(R0)	;;; SET THE ADDRESS
  10161	032512	010160 	000016 			MOV	R1,T11BC(R0)	;;; SET THE BYTE COUNT AND START TRANSFER
  10162	032516					RETURN			;;; TO CALLER
	032516	000207 				RTS	PC
DTEDRV -- DTE-20 DRIVER FOR RSX	MACRO V05.04  Monday 16-May-88 15:45  Page 188
DTE-20 DRIVER -- LOAD TO-11 QUEUE NODE

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

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

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

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

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

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

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

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

  10541	032544				TTYHD::
  10542	032544					.STKM	0,0,0,0,0,0,0,TTINI,174000,TTYSP
	032612	000000 	000000 	000000 		.WORD	0,0,0,0
	032620	000000
	032640	174000 	033244'	033024'		.WORD	174000,TTINI,TTYSP
	032674	000005 				.WORD	5
	032676	010262'				.WORD	TTPEN
	032700	000000 				.WORD	0
	032702	000000 				.WORD	0
	032704	000000 				.WORD	0
	032706	000000 				.WORD	0
	032710	000000 				.WORD	0
	032712	000000 				.WORD	0
	032714	000000 				.WORD	0
	032716	000000 				.WORD	0
	032720	000000 				.WORD	0
	032722	000000 				.WORD	0
	033024	000000 				.WORD	0
	033026	000000 				.WORD	0
	033030	000000 				.WORD	0
	033032	000000 				.WORD	0
	033034	000000 				.WORD	0
	033036	000000 				.WORD	0
	033040	033244'				.WORD	TTINI
	033042	174000 				.WORD	174000
  10543					;
  10544					; LOCAL DATA
  10545					;
  10546					;
  10547					; CONTROL OUTPUT MESSAGES
  10548					;
  10549	033044				CTRLC:
  10550	033044	   136 	   103 	   015 		.ASCII	/^C/<15><12>
	033047	   012
  10551	033050				CTRLU:
  10552	033050	   136 	   125 	   015 		.ASCII	/^U/<15><12>
	033053	   012
  10553	033054				CTRLZ:
  10554	033054	   136 	   132 	   015 		.ASCII	/^Z/<15><12>
	033057	   012
  10555
  10556	033060				TTWLO:
  10557	033060					WTLO$	1,EF.NIR!EF.IOD!EF.TMO!EF.RQM!EF.RKR!EF.RKH!EF.RSS
	033060	   053 	   003 			.BYTE	43.,3
	033062	000001 				.WORD	1
	033064	007330 				.WORD	EF.NIR!EF.IOD!EF.TMO!EF.RQM!EF.RKR!EF.RKH!EF.RSS
  10558	033066				EXKAL:
  10559	033066					EHSG$	0,PSWW1,KPAL0
	033066	002411 				.WORD	400*5.+DR.DTE
	033070	000010 				.WORD	DF.EHG
	033072	000005 				.WORD	PSWW1
	033074	001404'				.WORD	KPAL0
	033076	000000 				.WORD	0
  10560	033100				RQMCR:
  10561	033100					RQST$	PARSER,,249.
	033100	   013 	   007 			.BYTE	11.,7
	033102	062072 	073632 			.RAD50	/PARSER/
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 191-1
TERMINAL DRIVER -- DEFINITIONS

	033106	000000 	000000 			.WORD	0,0
	033112	000371 				.WORD	249.
	033114	   000 	   000 			.BYTE	,
  10562	033116				RQKLR:
  10563	033116					RQST$	KLRING,,10
	033116	   013 	   007 			.BYTE	11.,7
	033120	043262 	035167 			.RAD50	/KLRING/
	033124	000000 	000000 			.WORD	0,0
	033130	000010 				.WORD	10
	033132	   000 	   000 			.BYTE	,
  10564	033134				RQKLD:
  10565	033134					RQST$	KLDISC,,10
	033134	   013 	   007 			.BYTE	11.,7
	033136	043244 	035473 			.RAD50	/KLDISC/
	033142	000000 	000000 			.WORD	0,0
	033146	000010 				.WORD	10
	033150	   000 	   000 			.BYTE	,
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 192
TERMINAL DRIVER -- DEFINITIONS

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

  10624	033211	   203 				.BYTE	LSP.IG!03	;1200 BAUD CR
  10625	033212	   004 				.BYTE	04		;1800 BAUD ^C
  10626	033213	   004 				.BYTE	04		;1800 BAUD CR
  10627	033214	   005 				.BYTE	05		;2400 BAUD ^C
  10628	033215	   005 				.BYTE	05		;2400 BAUD ^C
  10629	033216	   005 				.BYTE	05		;2400 BAUD CR
  10630	033217	   005 				.BYTE	05		;2400 BAUD CR
  10631	033220	   006 				.BYTE	06		;4800 BAUD ^C
  10632	033221	   006 				.BYTE	06		;4800 BAUD ^C
  10633	033222	   006 				.BYTE	06		;4800 BAUD ^C
  10634	033223	   007 				.BYTE	07		;9600 BAUD ^C, CR
  10635						.EVEN
  10636
  10637					;DH11 HARDWARE SPEEDS
  10638
  10639	033224				SPDPAR::
  10640	033224	006307 				.WORD	06307		;00  110 BAUD 8 BIT NO PARITY 2 STOP
  10641	033226	012503 				.WORD	12503		;01  150 BAUD 8 BIT NO PARITY 1 STOP
  10642	033230	016703 				.WORD	16703		;02  300 BAUD 8 BIT NO PARITY 1 STOP
  10643	033232	023103 				.WORD	23103		;03 1200 BAUD 8 BIT NO PARITY 1 STOP
  10644	033234	025203 				.WORD	25203		;04 1800 BAUD 8 BIT NO PARITY 1 STOP
  10645	033236	027303 				.WORD	27303		;05 2400 BAUD 8 BIT NO PARITY 1 STOP
  10646	033240	031403 				.WORD	31403		;06 4800 BAUD 8 BIT NO PARITY 1 STOP
  10647	033242	033503 				.WORD	33503		;07 9600 BAUD 8 BIT NO PARITY 1 STOP
  10648
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 193
TERMINAL DRIVER -- TTINI (TTY QUEUE SERVICE)

  10650						.SBTTL	TERMINAL DRIVER -- TTINI (TTY QUEUE SERVICE)
  10651
  10652						.ENABL	LSB
  10653
  10654					;
  10655					; TERMINAL DRIVER EVENT FLAG SERVICE
  10656					;
  10657
  10658	033244				TTINI::
  10659	033244					DIR$	#TTWLO		; WAIT FOR TTY
	033244	012746 	033060'			MOV	#TTWLO,-(SP)
	033250	104375 				EMT	375
  10660	033252					.INH6			;;; INHIBIT TASK SWITCHING
	033252	013746 	177776 			MOV	@#PS,-(SP)
	033256	112737 	000300 	177776 		MOVB	#300,@#PS
  10661	033264	013705 	001006'			MOV	.CRTSK,R5	;;; FIND THE CURRENT TASK POINTER
  10662	033270	016504 	000020 			MOV	A.EF(R5),R4	;;; FIND EVENT FLAGS
  10663	033274	005065 	000020 			CLR	A.EF(R5)	;;; CLEAR EVENT FLAGS
  10664	033300					.ENB6			; ENABLE TASK SWITCHING
	033300	012637 	177776 			MOV	(SP)+,@#PS
  10665	033304	010446 				MOV	R4,-(SP)	; [4.2247] STACK THE EVENT FLAGS
  10666	033306	032716 	000200 			BIT	#EF.RQM,(SP)	; [4.2247] REQUEST MCR??
  10667	033312	001406 				BEQ	10$		; NO -- MUST BE SOMETHING ELSE
  10668	033314	152737 	000002 	011362'		BISB	#M.PARQ,.MISC	; SET PRIORITY INPUT REQUEST
  10669	033322					DIR$	#RQMCR		; YES -- REQUEST PARSER
	033322	012746 	033100'			MOV	#RQMCR,-(SP)
	033326	104375 				EMT	375
  10670	033330				10$:
  10671	033330	032716 	001000 			BIT	#EF.RKR,(SP)	; [4.2247] KLINIK RING INTERRUPT??
  10672	033334	001403 				BEQ	15$		; NO -- FORGET IT
  10673	033336					DIR$	#RQKLR		; YES -- REQUEST KLRING
	033336	012746 	033116'			MOV	#RQKLR,-(SP)
	033342	104375 				EMT	375
  10674	033344				15$:
  10675	033344	032716 	002000 			BIT	#EF.RKH,(SP)	; [4.2247] KLINIK HANGUP??
  10676	033350	001403 				BEQ	20$		; NO -- GO ON
  10677	033352					DIR$	#RQKLD		; YES -- REQUEST KLDISC
	033352	012746 	033134'			MOV	#RQKLD,-(SP)
	033356	104375 				EMT	375
  10678	033360				20$:
  10679	033360	032716 	004000 			BIT	#EF.RSS,(SP)	; [4.2247] AUTO-BAUD REQUEST??
  10680	033364	001417 				BEQ	30$		; NO -- GO ON
  10681	033366	005737 	002610'			TST	.ABFLG		; YES -- INTERLOCK SET??
  10682	033372	001014 				BNE	30$		; YES -- GO ON
  10683	033374	013737 	002606'	002610'	25$:	MOV	.ABCNT,.ABFLG	; NO -- REAL REQUEST??
  10684	033402	001410 				BEQ	30$		; NO -- IGNORE IT
  10685	033404					DIR$	#.RQSPD		; YES -- REQUEST "SETSPD"
	033404	012746 	025226'			MOV	#.RQSPD,-(SP)
	033410	104375 				EMT	375
  10686	033412	103004 				BCC	30$		; [5.1011] ERROR FREE ??
  10687	033414					WSIG$S			; [5.1011] NO, WAIT A BIT
	033414	012746 				MOV	(PC)+,-(SP)
	033416	   061 	   001 			.BYTE	49.,1
	033420	104375 				EMT	375
  10688	033422	000764 				BR	25$		; [5.1011] RETRY THE REQUEST
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 194
TERMINAL DRIVER -- TIMEOUT SERVICE

  10690						.SBTTL	TERMINAL DRIVER -- TIMEOUT SERVICE
  10691
  10692	033424				30$:
  10693	033424	032716 	000100 			BIT	#EF.TMO,(SP)	; [4.2247] TIMEOUT??
  10694	033430	001431 				BEQ	45$		; [5.1008] NO -- GO ON
  10695	033432					.INH5			; [4.2309] YES -- DISALLOW TERMINAL INTERRUPTS
	033432	013746 	177776 			MOV	@#PS,-(SP)
	033436	112737 	000240 	177776 		MOVB	#240,@#PS
  10696	033444	105337 	002670'			DECB	TMOCNT+0	;;; [4.2309] ONLY DO TIMEOUT EVERY 10 SEC
  10697	033450	001007 				BNE	35$		;;; [5.1008] NOT YET -- SEE ABOUT ERROR LOGGING
  10698	033452	112737 	000012 	002670'		MOVB	#^D10,TMOCNT+0	;;; [4.2309] RESET TIMEOUT COUNT
  10699	033460					CALL	.DHTMO		;;; [4.2205] CHECK FOR TIMEOUT ON DM-11/BB'S AND DH-11'S
	033460	004737 	042020'			JSR	PC,.DHTMO
  10700	033464					CALL	.DLTMO		;;; CHECK FOR TIMEOUT ON DL-11E'S
	033464	004737 	041510'			JSR	PC,.DLTMO
  10701	033470				35$:
  10702	033470	105337 	002671'			DECB	TMOCNT+1	;;; [4.2309] MODEM TIMEOUT DUE??
  10703	033474	001005 				BNE	40$		;;; [5.1008] NO -- GO ON
  10704	033476	112737 	000026 	002671'		MOVB	#^D22,TMOCNT+1	;;; [4.2309] YES -- RESET TIMEOUT COUNT
  10705	033504					CALL	.DMTMO		;;; [4.2309] AND CHECK DM-11/BB'S
	033504	004737 	042326'			JSR	PC,.DMTMO
  10706	033510				40$:
  10707	033510					.ENB5			;;; [4.2054] ALLOW INTERRUPTS
	033510	012637 	177776 			MOV	(SP)+,@#PS
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 195
TERMINAL DRIVER -- ACK ALL SERVICE

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

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

  10781	033646	100404 				BMI	60$		; [4.2107] YES -- GO ON
  10782	033650	005737 	001420'			TST	.KACFL		; [4.2107] NO -- RETRIES ALLOWED??
  10783	033654	001005 				BNE	65$		; [4.2107] YES -- GO ON
  10784	033656	000771 				BR	55$		; [4.2107] NO -- FORCE SECOND ERROR
  10785						;
  10786					;
  10787					; HERE ON SECOND KEEP-ALIVE ERROR
  10788					;
  10789	033660				60$:
  10790	033660					CALL	..DTSP		; [4.2107] KILL ALL PROTOCOLS
	033660	004737 	050216'			JSR	PC,..DTSP
  10791	033664	105237 	001122'			INCB	.NOERR		; [4.2107] INDICATE WE ARE SERVICING A REAL ERROR
  10792					;
  10793					; HERE ON FIRST KEEP-ALIVE ERROR
  10794					;
  10795	033670				65$:
  10796	033670	052737 	000020 	001126'		BIS	#KS.CST,.KLITK	; [4.2107] FLAG THE ERROR
  10797	033676	105237 	001124'			INCB	.TKTN		; [4.2107] REQUEST TKTN
  10798					;
  10799					; HERE WHEN HIS KEEP-ALIVE IS RUNNING OR HAS TIMED OUT
  10800					;
  10801	033702				70$:
  10802	033702	112737 	000005 	001416'		MOVB	#.KALSC,.KPAC+0	; [4.2107] RESET RETRY COUNTER
  10803	033710				75$:
  10804	033710	013737 	001404'	001412'		MOV	KPAL0,OKPAL0	; [4.2107] SAVE HIS COUNT FOR THE NEXT TIME AROUND
  10805					;
  10806					; INCREMENT AND TRANSMIT OUR KEEP-ALIVE COUNT
  10807					;
  10808	033716				80$:
  10809	033716	005737 	001402'			TST	.DTBLK		; [4.1.1121] IS THE DTE-20 BLOCKED??
  10810	033722	001013 				BNE	85$		; [4.1.1121] YES -- GO ON
  10811	033724					.INH6			; [4.1.1104] NO -- DISALLOW INTERRUPTS
	033724	013746 	177776 			MOV	@#PS,-(SP)
	033730	112737 	000300 	177776 		MOVB	#300,@#PS
  10812	033736	013700 	001366'			MOV	.PRDTE,R0	;;; [4.1.1104] POINT TO THE DTE-20
  10813	033742					CALL	.KPALV		;;; [4.1.1104] DO KEEP-ALIVE
	033742	004737 	032134'			JSR	PC,.KPALV
  10814	033746					.ENB6			;;; [4.1.1104] ALLOW INTERRUPTS
	033746	012637 	177776 			MOV	(SP)+,@#PS
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 197
TERMINAL DRIVER -- GENERAL ERROR LOGGING

  10816						.SBTTL	TERMINAL DRIVER -- GENERAL ERROR LOGGING
  10817
  10818	033752				85$:
  10819	033752	012704 	002662'			MOV	#.TTELQ,R4	; [4.2245] POINT TO TERMINAL ERROR LOG QUEUE
  10820	033756	012703 	000004 			MOV	#D.CDLS,R3	; [5.1008] DEVICE CODE TO R3
  10821	033762					CALL	..ERLG		; [5.1008] DO TERMINAL ERROR LOGGING
	033762	004737 	044440'			JSR	PC,..ERLG
  10822	033766	012703 	000202 			MOV	#D.CDTE,R3	; [5.1008] DEVICE CODE TO R3
  10823	033772	012704 	001374'			MOV	#.EBPEQ,R4	; [5.1008] POINT TO DTE-20 ERROR LOG QUEUE
  10824	033776					CALL	..ERLG		; [5.1008] DO DTE-20 ERROR LOGGING
	033776	004737 	044440'			JSR	PC,..ERLG
  10825	034002	012703 	000203 			MOV	#D.CRJP,R3	; [5.1009] DEVICE CODE TO R3
  10826	034006	012704 	005544'			MOV	#.RPELQ,R4	; [5.1009] POINT TO ERROR LOG QUEUE
  10827	034012					CALL	..ERLG		; [5.1009] DO RH-11 ERROR LOGGING
	034012	004737 	044440'			JSR	PC,..ERLG
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 198
TERMINAL DRIVER -- CTY SERVICE

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

  10877						.SBTTL	TERMINAL DRIVER -- CTY I/O DONE SERVICE
  10878
  10879	034220				105$:
  10880	034220	013701 	002740'			MOV	TTPKT,R1	; FIND THE I/O PACKET
  10881	034224	001702 				BEQ	DQNXT
  10882	034226	016104 	000026 			MOV	R.PB+2(R1),R4	; SET THE COUNT XFERED
  10883	034232	013703 	002736'			MOV	CRADR,R3	; RETURN THE STATUS
  10884	034236				110$:
  10885	034236					CALL	..IODN		; CALL I/O DONE OUTINE
	034236	004737 	044540'			JSR	PC,..IODN
  10886	034242	005337 	002640'			DEC	.TTP11		; PDP11 INPUT NOT IN PROGREESS
  10887	034246	005037 	002740'			CLR	TTPKT		; SET NO PACKET IN USE
  10888	034252	000667 				BR	DQNXT		; AND WAIT FOR NEXT JOB
  10889						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 200
TERMINAL DRIVER -- CTY INPUT SERVICE

  10891						.SBTTL	TERMINAL DRIVER -- CTY INPUT SERVICE
  10892
  10893					;
  10894					; REQUEST IS A SOLICITED INPUT REQUEST-GET A BUFFER FOR INPUT
  10895					;
  10896	034254				115$:				; SET SOLICITED INPUT FLAG
  10897	034254	042713 	102400 			BIC	#MODE!EOLS!CRTY,@R3
  10898	034260	013763 	002736'	000006 		MOV	CRADR,CURBF(R3) ;SET RANDOM INPUT VALUES
  10899	034266	013763 	002734'	000004 		MOV	BYCNT,RMBYT(R3)
  10900	034274	013763 	002736'	000002 		MOV	CRADR,STRBF(R3)
  10901	034302	032713 	001000 			BIT	#CRJT,@R3	; CARRIAGE RETURN JUST TYPED?
  10902	034306	001426 				BEQ	135$		; NO -- NO CARRAGE CONTROL NECESSARY
  10903	034310				120$:
  10904	034310	062713 	004000 			ADD	#LFBT,@R3	; FORCE LINE FEED
  10905	034314	000423 				BR	135$		; AND FORCE IT OUT
  10906						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 201
TERMINAL DRIVER -- CTY OUTPUT SERVICE

  10908						.SBTTL	TERMINAL DRIVER -- CTY OUTPUT SERVICE
  10909
  10910					;
  10911					; REQUEST IS AN OUTPUT REQUEST-SET UP CARRIAGE CONTROL FLAGS
  10912					;
  10913	034316				125$:
  10914	034316	005737 	010276'			TST	TTPEN+U.AF	; CHECK FOR ATTACHED
  10915	034322	001002 				BNE	130$		; YES -- DON'T CLEAR STATUS FLAGS
  10916	034324	042713 	000040 			BIC	#CTLO,@R3	; ENABLE OUTPUT
  10917	034330				130$:
  10918	034330	042713 	076437 			BIC	#LFCT!CRTY!EOLS!RUBP!FLCT,@R3 ; CLEAR STATUS WORD
  10919	034334	052713 	100000 			BIS	#MODE,@R3	; SET OUTPUT MODE
  10920	034340	005761 	000030 			TST	R.PB+4(R1)	; CHECK FOR CARRAGE CONTROL
  10921	034344	001407 				BEQ	135$		; NO -- NOTHING TO DO
  10922	034346	122761 	000044 	000030 		CMPB	#'$,R.PB+4(R1)	; $?
  10923	034354	001755 				BEQ	120$		; YES -- DON'T FAKE CARRAGE CONTROL HERE
  10924	034356	052713 	002000 			BIS	#CRTY,@R3	; YES -- IT WILL ALWAYS BE ASSUMED ' '
  10925	034362	000752 				BR	120$		; OUTPUT CRLF
  10926						;
  10927	034364				135$:
  10928	034364					.INH6			; DISALLOW INTERRUPTS
	034364	013746 	177776 			MOV	@#PS,-(SP)
	034370	112737 	000300 	177776 		MOVB	#300,@#PS
  10929	034376					CALL	OUTPT		;;; START OUTPUT
	034376	004737 	035406'			JSR	PC,OUTPT
  10930	034402				TTINX:
  10931	034402					.ENB6			;;; ALLOW INTERRUPTS
	034402	012637 	177776 			MOV	(SP)+,@#PS
  10932	034406				TTINO:
  10933	034406	000137 	033244'			JMP	TTINI		; MAKE SURE OUTPUT IS ACTIVE
  10934						;
  10935						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 202
TERMINAL DRIVER -- $DHOUT (DH-11 OUTPUT INTERRUPT)

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

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

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

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

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

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

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

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

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

  11288	035506	012737 	000001 	002736'		MOV	#IS.SUC&377,CRADR ;;; SET SUCCESSFUL COMPLETION STATUS
  11289	035514				TTYDNE:
  11290	035514	052737 	000020 	007222'		BIS	#EF.IOD,TTYTSK+A.EF ;;; SET EVENT FLAG INDICATING I/O DONE
  11291	035522					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	035522	004737 	045254'			JSR	PC,..DSEV
  11292	035526	105737 	001234'			TSTB	.KLNSW+0	;;; IS KLINIK ACTIVE??
  11293	035532	003412 				BLE	TTYDNX		;;; NO -- GO ON
  11294	035534	010546 				MOV	R5,-(SP)	;;; YES -- SAVE R5
  11295	035536	010446 				MOV	R4,-(SP)	;;; AND R4
  11296	035540	013705 	002644'			MOV	KLNPTR,R5	;;; POINT TO THE KLINIK LINE
  11297	035544	016504 	000002 			MOV	TTYEXP(R5),R4	;;; I/O PAGE POINTER TO R5
  11298	035550					CALL	STTYO		;;; START OR DEALLOCATE
	035550	004737 	035132'			JSR	PC,STTYO
  11299	035554	012604 				MOV	(SP)+,R4	;;; RESTORE REGISTERS
  11300	035556	012605 				MOV	(SP)+,R5	;;; SO
  11301	035560				TTYDNX:
  11302	035560	022705 	003054'			CMP	#DHTBL,R5	;;; CALLED FROM DH-11??
  11303	035564	101002 				BHI	30$		;;; NO --TRY THE ONE ON DL-11
  11304	035566	000137 	034536'			JMP	STTYDN		;;; GO DO ACK AND CLEAR BUSY
  11305						;
  11306	035572				30$:
  11307	035572	000137 	035132'			JMP	STTYO		;;; SEE WHAT'S NEXT FOR DL-11
  11308						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 211
TERMINAL DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)

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

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

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

  11459						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 213
TERMINAL DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)

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

  11513	036336	005737 	001402'			TST	.DTBLK		;;; [4.1.1121] IS THE DTE BLOCKED??
  11514	036342	001430 				BEQ	DHISTQ		;;; [4.1.1121] NO -- START THE TO-10 QUEUE
  11515	036344	013700 	001366'			MOV	.PRDTE,R0	;;; [4.1.1121] POINT TO THE DTE-20
  11516	036350	013703 	001362'			MOV	.PRADR,R3	;;; [4.1.1121] AND THE PROCESSOR TABLE
  11517	036354					CALL	@.DTBLK		;;; [4.1.1121] TRY TO UNBLOCK THE DTE
	036354	004777 	143022 			JSR	PC,@.DTBLK
  11518	036360	001021 				BNE	DHISTQ		;;; [4.1.1121]  GO ON IF STILL BLOCKED
  11519	036362					CALL	.KPALV		;;; [4.1.1121] OTHERWISE DO KEEP-ALIVE
	036362	004737 	032134'			JSR	PC,.KPALV
  11520	036366	000416 				BR	DHISTQ		;;; [4.1.1066] START THE TO-10 QUEUE
  11521						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 214
TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)

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

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

  11634	036572	052765 	030000 	000006 		BIS	#TT.LSP!TT.IGN,STSW1(R5) ; YES, GO TO LOW SPEED AND IGNORE NEXT
  11635	036600	000413 				BR	90$		  ;
  11636						;
  11637	036602				70$:
  11638	036602	142716 	177401 			BICB	#^C<HSPMSK>,(SP)  ; CLEAR UNWANTED BITS FOR HIGH SPEED
  11639	036606	012702 	000011 			MOV	#HSPTAB-LSPTAB,R2 ; GET TABLE INDEX TO START
  11640	036612	012701 	000014 			MOV	#HSPTLN,R1	  ; TABLE LENGTH TO R1
  11641	036616				80$:
  11642	036616	121662 	033152'			CMPB	(SP),LSPTAB(R2)	  ; MATCH A BIT PATTERN??
  11643	036622	001406 				BEQ	110$		  ; YES -- DONE
  11644	036624	005202 				INC	R2		  ; NO -- NEXT PATTERN
  11645	036626	077105 				SOB	R1,80$		  ; TRY AGAIN
  11646	036630				90$:
  11647	036630					CALL	.DHSPR		  ; GO SET NEW DETECTION SPEED
	036630	004737 	040572'			JSR	PC,.DHSPR
  11648	036634				100$:
  11649	036634	000137 	037430'			JMP	TTINPB		  ; NO MATCH, FLUSH CHARACTER AND DISMISS
  11650						;
  11651					;
  11652					;	HERE ON AUTO-BAUD PATTERN MATCH
  11653					;
  11654	036640				110$:				  ; HERE ON BIT PATTERN MATCH
  11655	036640	042765 	010010 	000006 		BIC	#TT.ABW!TT.IGN,STSW1(R5) ; NO LONGER IN AUTO-BAUD WAIT
  11656	036646	116202 	033177'			MOVB	LSPSPD(R2),R2	  ; FIND INDEX FOR LINE SPEED
  11657	036652	100003 				BPL	120$		  ; IGNORING NEXT CHARACTER?
  11658	036654	052765 	010000 	000006 		BIS	#TT.IGN,STSW1(R5) ; YES -- SET IGNORE NEXT CHARACTER BIT
  11659	036662				120$:
  11660	036662	042702 	177760 			BIC	#^C<LSP.SP>,R2	  ; GET SPEED INDEX
  11661	036666	006302 				ASL	R2		  ; MAKE A WORD INDEX
  11662	036670	016203 	033224'			MOV	SPDPAR(R2),R3	  ; FIND THE SPEED
  11663	036674					CALL	.DHSPD		  ; SET THE LINE SPEED
	036674	004737 	040704'			JSR	PC,.DHSPD
  11664	036700					CALL	.DHSPF		  ; FLAG THE NEW SPEED
	036700	004737 	040644'			JSR	PC,.DHSPF
  11665	036704					CALL	.STTYD		  ; RING THE LINE
	036704	004737 	041202'			JSR	PC,.STTYD
  11666	036710	032765 	040000 	000004 		BIT	#S0.CON,STSW0(R5) ; ALREADY CONNECTED?
  11667	036716	001746 				BEQ	100$		  ; NO -- DUMP THE CHAR
  11668	036720	112716 	000015 			MOVB	#15,(SP)	  ; YES -- FUDGE A <CR>
  11669	036724	000137 	037254'			JMP	TTSTCH		  ; AND GO STORE IT (SO USERS DON'T HAVE TO)
  11670						;
  11671					;
  11672					; HERE TO CHECK FOR A FRAMING ERROR
  11673					;
  11674	036730				FERCHK::
  11675	036730	032716 	020000 			BIT	#DH.FER,(SP)	  ; FRAMING ERROR PRESENT??
  11676	036734	001020 				BNE	230$		  ; YES -- COUNT IT UP
  11677	036736	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ; AUTOBAUD?
  11678	036744	001404 				BEQ	220$		  ; NO, CLEAR FRAMING ERROR COUNT
  11679	036746				210$:
  11680	036746	042765 	004000 	000006 		BIC	#TT.BRK,STSW1(R5) ; YES, CLEAR LAST CHAR BREAK FLAG
  11681	036754	000537 				BR	TTSTCH		  ; STORE CHARACTER AND RETURN
  11682						;
  11683	036756				220$:
  11684	036756					CALL	.TTSW2		  ; FIND OUR STSW2 ENTRY
	036756	004737 	044202'			JSR	PC,.TTSW2
  11685	036762	005712 				TST	(R2)		  ; LINE SHUT OFF BY US ?
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 214-3
TERMINAL DRIVER -- $DHINP (DH-11 INPUT INTERRUPT)

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

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

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

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

  11836	037346	011646 				MOV	(SP),-(SP)	;;; [4.2181] YES -- GET CHARACTER FOR INPUT CHECK
  11837	037350	042716 	177600 			BIC	#^C177,(SP)	;;; [4.2181] FLUSH LINE NUMBER AND PARITY
  11838	037354	022716 	000021 			CMP	#C.HXON,(SP)	;;; [6.1480] IS IT AN XON?
  11839	037360	001002 				BNE	35$		;;; [6.1480] NO -- GO ON
  11840	037362					CALL	.TTXON		;;; [6.1480] YES -- PROCESS XON
	037362	004737 	043074'			JSR	PC,.TTXON
  11841	037366				35$:				;;; [6.1480]
  11842	037366	022726 	000023 			CMP	#C.HXOF,(SP)+	;;; [4.2181] IS IT AN XOFF??
  11843	037372	001002 				BNE	40$		;;; [4.2211] NO -- GO ON
  11844	037374					CALL	.TTXOF		;;; [4.2181] YES -- PROCESS XOFF
	037374	004737 	042752'			JSR	PC,.TTXOF
  11845	037400				40$:				;;; [4.2211]
  11846	037400					CALL	..STCH		;;; STORE CHARACTER WITH PARITY
	037400	004737 	046554'			JSR	PC,..STCH
  11847	037404					CALL	.TTSW2		;;; [5.1099] FIND OUR "STSW2" ENTRY
	037404	004737 	044202'			JSR	PC,.TTSW2
  11848	037410	032712 	040000 			BIT	#S2.DIP,(R2)	;;; [5.1099] INPUT XOFF IN PROGRESS??
  11849	037414	001403 				BEQ	45$		;;; [5.1099] NO -- CHECK FREE-POOL THRESHOLD
  11850	037416					CALL	.TTCHK		;;; [5.1099] YES -- COUNT THIS CHARACTER
	037416	004737 	043322'			JSR	PC,.TTCHK
  11851	037422	000402 				BR	TTINPB		;;; [5.1099] AND EXIT
  11852						;
  11853	037424				45$:
  11854	037424					CALL	.TTICK		;;; [4.1.1092] CHECK THE BUFFER
	037424	004737 	043346'			JSR	PC,.TTICK
  11855	037430				TTINPB:
  11856	037430	005726 				TST	(SP)+		;;; REMOVE THE CHARACTER
  11857	037432					RETURN			;;; AND EXIT
	037432	000207 				RTS	PC
  11858	037434				50$:
  11859	037434	013705 	002642'			MOV	CTYPTR,R5	;;; POINT TO REAL CTY
  11860	037440	011600 				MOV	(SP),R0		;;; GET THE CHARACTER AND
  11861	037442	042700 	177600 			BIC	#^C177,R0	;;; MASK OFF PARITY
  11862	037446	122700 	000003 			CMPB	#'C-100,R0	;;; ^C?
  11863	037452	001005 				BNE	60$		;;; NO -- DON'T SET EVENT FLAG
  11864	037454	052737 	040000 	001012'		BIS	#EF.CTC,.COMEF+2 ;;; TELL THE MONITOR
  11865	037462					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	037462	004737 	045254'			JSR	PC,..DSEV
  11866	037466				60$:
  11867	037466	123700 	002636'			CMPB	.BRKCH,R0	;;; NULL CHARACTER?
  11868	037472	001006 				BNE	70$		;;; NO -- ALL OK
  11869	037474	052737 	000200 	007222'		BIS	#EF.RQM,TTYTSK+A.EF ;;; START PARSER TASK
  11870	037502					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	037502	004737 	045254'			JSR	PC,..DSEV
  11871	037506	000750 				BR	TTINPB		;;; IGNORE CHARACTER
  11872						;
  11873	037510				70$:
  11874	037510	005737 	002640'			TST	.TTP11		;;; IS THIS PDP11 INPUT?
  11875	037514	001100 				BNE	TTCTY		;;; YES -- GO DO ECHO ETC
  11876	037516	032737 	020000 	001012'		BIT	#EF.PR2,.COMEF+2 ;;; IS THIS BOOT PROTOCOL?
  11877	037524	001665 				BEQ	20$		;;; [4.2211] NO -- THEN JUST TREAT IT AS A NORMAL REQUEST
  11878	037526	112637 	001162'			MOVB	(SP)+,.BTSCH	;;; STORE CHARACTER FOR BOOT PROTOCOL
  11879	037532				80$:
  11880	037532					RETURN
	037532	000207 				RTS	PC
  11881
  11882						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 218
TERMINAL DRIVER -- .DLINT (DL-11E DATASET INTERRUPT SERVICE)

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

  11937	037700					RETURN			;;; TO CALLER
	037700	000207 				RTS	PC
  11938					;
  11939					; RING TRANSITION
  11940					;
  11941	037702				.TTRNG:
  11942	037702					CALL	.STTYH		;;; [4.2055] TRANSMIT HANGUP
	037702	004737 	041216'			JSR	PC,.STTYH
  11943					;
  11944					; CARRIER DROP TRANSITION
  11945					;
  11946	037706				.TTSCW:
  11947	037706	052765 	002004 	000006 		BIS	#TT.CRW!TT.RIP,STSW1(R5) ;;; [4.2055] SET CARRIER WAIT
  11948	037714					RETURN			;;; [4.2055] DISMISS AND RETURN
	037714	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 219
TERMINAL DRIVER -- TTCTY (CTY SERVICE)

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

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

  12063					;
  12064	040246				21$:
  12065	040246	111663 	000005 			MOVB	@SP,FNBYT(R3)	;;; SET IN LAST CHARACTER
  12066	040252	012716 	000004 			MOV	#4,@SP		;;; SET COUNT
  12067	040256	012746 	033044'			MOV	#CTRLC,-(SP)	;;; SET  CNTRL C
  12068	040262				31$:
  12069	040262	052713 	000400 			BIS	#EOLS,@R3	;;; SET END OF LINE
  12070	040266	000420 				BR	91$		;;; AND ECHO
  12071						;
  12072					;
  12073					; CARRIAGE RETURN /CNTRL Z
  12074					;
  12075	040270				41$:
  12076	040270	111663 	000005 			MOVB	@SP,FNBYT(R3)
  12077	040274				51$:
  12078	040274	052713 	000400 			BIS	#EOLS,@R3	;;; SET END OF LINE SEEN
  12079	040300				61$:
  12080	040300	032713 	074000 			BIT	#LFCT,@R3	;;; ANY LINE FEEDS WAITING?
  12081	040304	001002 				BNE	71$		;;; IF NE YES
  12082	040306	000137 	035644'			JMP	ECHOB		;;; ECHO BYTE
  12083						;
  12084	040312				71$:
  12085	040312	111663 	000014 			MOVB	@SP,MBUFR(R3)	;;; SET FOR MULTI-ECHO OF ONE BYTE
  12086	040316	012716 	000001 			MOV	#1,@SP		;;; SET LENGTH OF BUFFER
  12087	040322				81$:
  12088	040322	010346 				MOV	R3,-(SP)	;;; CALCULATE ADDRESS OF MULTI-ECHO BUFFER
  12089	040324	062716 	000014 			ADD	#MBUFR,@SP
  12090	040330				91$:
  12091	040330	012663 	000012 			MOV	(SP)+,MEBUF(R3)	;;; INSERT ADDRESS OF MULTI-ECHO BUFFER
  12092	040334	112663 	000010 			MOVB	(SP)+,MECNT(R3)	;;; INSERT LENGTH OF BUFFER
  12093	040340	000137 	035406'			JMP	OUTPT		;;; START OUTPUT
  12094						;
  12095						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 220
TERMINAL DRIVER -- DHSAV (DH-11 REGISTER SAVE/RESTORE CO-ROUTI

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

  12153
  12154						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 221
TERMINAL DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROL

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

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

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

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

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

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

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

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

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

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

  12546						.SBTTL	TERMINAL DRIVER -- .STPDM (STOP DM-11/BB SCAN)
  12547
  12548					;+
  12549					; .STPDM -- STOP DM-11/BB SCAN
  12550					;
  12551					; THIS SUBROUTINE WILL DISABLE THE SCAN AND CLEAR THE UNIT SELECT BITS ON
  12552					; A DM-11/BB MODEM CONTROL UNIT.
  12553					;
  12554					; INPUTS:
  12555					;
  12556					;	R4 -- POINTS TO DM-11/BB CSR
  12557					;
  12558					; OUTPUTS:
  12559					;
  12560					;	SCAN IS STOPPED
  12561					;	NO REGISTERS ALTERED
  12562					;-
  12563
  12564	041346				.STPDM::
  12565	041346	042714 	001040 			BIC	#1040,(R4)	;;; DISABLE SCAN
  12566	041352				10$:
  12567	041352	032714 	000020 			BIT	#20,(R4)	;;; SCAN STOPPED??
  12568	041356	001375 				BNE	10$		;;; NO -- WAIT FOR IT
  12569	041360	042714 	001017 			BIC	#1017,(R4)	;;; YES -- CLEAR CURRENT UNIT
  12570	041364				20$:
  12571	041364					RETURN			;;; TO CALLER
	041364	000207 				RTS	PC
  12572
  12573						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 231
TERMINAL DRIVER -- .DLHUP (DL-11E HANGUP)

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

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

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

  12736						;
  12737					;
  12738					; CHECK DATASET INTERRUPT ENABLE
  12739					;
  12740	041736				30$:
  12741	041736	022705 	003004'			CMP	#TTTBL,R5	;;; [5.1007] IS THIS THE CTY??
  12742	041742	001410 				BEQ	50$		;;; [5.1007] YES -- GO ON
  12743	041744	032714 	000040 			BIT	#DL.DEN,(R4)	;;; [5.1007] NO -- DATASET INTERRUPT ENABLED??
  12744	041750	001005 				BNE	50$		;;; [5.1007] YES -- ENABLE INTERRUPTS AND EXIT
  12745	041752				40$:
  12746	041752	016437 	000004 	002666'		MOV	4(R4),.TTELB	;;; [5.1007] NO -- SET ALTERNATE STATUS
  12747	041760					CALL	DHERLG		;;; [5.1007] LOG THE ERROR
	041760	004737 	042306'			JSR	PC,DHERLG
  12748					;
  12749					; ENABLE INTERRUPTS FOR THIS LINE
  12750					;
  12751	041764				50$:
  12752	041764	105765 	000004 			TSTB	STSW0(R5)	;;; [5.1007] INPUT ALLOWED ON THIS LINE??
  12753	041770	001002 				BNE	60$		;;; [5.1007] NO -- GO ON
  12754	041772	052714 	000100 			BIS	#DL.REN,(R4)	;;; [4.2309] YES -- ENABLE INPUT INTERRUPTS
  12755	041776				60$:
  12756	041776	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; [5.1007] ENABLE OUTPUT INTERRUPTS
  12757	042004	022705 	003004'			CMP	#TTTBL,R5	;;; [5.1007] IS THIS THE CTY??
  12758	042010	001402 				BEQ	70$		;;; [5.1007] YES -- EXIT
  12759	042012	052714 	000040 			BIS	#DL.DEN,(R4)	;;; [5.1007] NO -- ENABLE DATASET INTERRUPTS
  12760	042016				70$:
  12761	042016					RETURN
	042016	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 233
TERMINAL DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

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

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

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

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

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

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

  13045						.SBTTL	TERMINAL DRIVER -- .TTFDI (INPUT CONTROL SERVICE)
  13046
  13047					;+
  13048					; .TTFDI -- INPUT CONTROL SERVICE
  13049					;
  13050					; THIS SUBROUTINE WILL RETURN POINTERS TO THE NEXT LINE TO BE SERVICED FOR
  13051					; INPUT CONTROL (ENABLE) IN R2 AND R5.
  13052					;
  13053					; INPUTS:
  13054					;
  13055					;	.S2ITP -- POINTER TO THE LAST LINE TO BE SERVICED FOR INPUT CONTROL
  13056					;
  13057					; OUTPUTS:
  13058					;
  13059					;	R2 -- POINTER TO "STSW2" ENTRY FOR NEXT LINE TO BE SERVICED
  13060					;	R5 -- POINTER TO DLS TABLE ENTRY FOR NEXT LINE TO BE SERVICED
  13061					;	.S2ITP -- UPDATED TO POINT TO CURRENT LINE
  13062					;-
  13063
  13064	042556				.TTFDI::
  13065	042556	013705 	005060'			MOV	.S2ITP,R5	;;; [4.1.1092] GET POINTER TO THE LAST LINE
  13066	042562	000405 				BR	20$		;;; [4.1.1092] AND GO ON
  13067						;
  13068	042564				10$:
  13069	042564					CALL	.TTSW2		;;; [4.1.1092] FIND "STSW2" ENTRY FOR THIS LINE
	042564	004737 	044202'			JSR	PC,.TTSW2
  13070	042570	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [4.1.1092] HAVE WE FOUND A LINE??
  13071	042574	001010 				BNE	30$		;;; [4.1.1092] YES -- EXIT
  13072	042576				20$:
  13073	042576	062705 	000010 			ADD	#10,R5		;;; [4.1.1092] NO -- FIND THE NEXT DLS ENTRY
  13074	042602	022705 	005054'			CMP	#TTYEND,R5	;;; [4.1.1092] HAVE WE FALLEN OFF THE END??
  13075	042606	101366 				BHI	10$		;;; [4.1.1092] NO -- CONTINUE SEARCHING
  13076	042610	012705 	003004'			MOV	#TTTBL,R5	;;; [4.1.1092] YES -- RESET TO BEGINNING
  13077	042614	000763 				BR	10$		;;; [4.1.1092] AND GO ON
  13078						;
  13079	042616				30$:
  13080	042616	010537 	005060'			MOV	R5,.S2ITP	;;; [4.1.1092] SAVE POINTER FOR THE NEXT TIME
  13081	042622					RETURN			;;; [4.1.1092] TO CALLER
	042622	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 236
TERMINAL DRIVER -- .TTERL (TERMINAL ERROR LOGGING)

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

	042750	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 237
TERMINAL DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)

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

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

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

  13271						;
  13272					;
  13273					; HERE TO START A DL-11 LINE
  13274					;
  13275	043216				.DLXON::
  13276	043216					CALL	.DLSTO		;;; [5.1015] START UP THE DL-11
	043216	004737 	035200'			JSR	PC,.DLSTO
  13277	043222				20$:
  13278	043222	042765 	000200 	000006 		BIC	#TT.XOF,STSW1(R5) ;;; [4.2181] MARK LINE AS X'D ON
  13279	043230				30$:
  13280	043230					RETURN			;;; [4.2181] TO CALLER
	043230	000207 				RTS	PC
  13281
  13282						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 240
TERMINAL DRIVER -- .TTRST (RESET A TERMINAL LINE)

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

  13338	043316	012602 				MOV	(SP)+,R2	;;; RESTORE R2
  13339	043320					RETURN			;;; [4.2205] TO CALLER
	043320	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 241
TERMINAL DRIVER -- CHECK INPUT XOFF DELAY

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

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

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

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

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

  13538	043576	000550 				BR	75$		;;; [5.1015] AND EXIT
  13539						;
  13540					;
  13541					; HERE TO REFUSE INPUT FROM THE LINE
  13542					;
  13543	043600				20$:
  13544	043600	032712 	001000 			BIT	#S2.SSZ,(R2)	;;; [5.1015] READY FOR SECOND PART??
  13545	043604	001545 				BEQ	75$		;;; [5.1015] NO -- WAIT
  13546	043606					CALL	.STDHL		;;; [5.1015] SET UP THE LINE NUMBER
	043606	004737 	040466'			JSR	PC,.STDHL
  13547	043612	100406 				BMI	25$		;;; [5.1015] BRANCH IF LINE IS A DL-11
  13548	043614	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [RCO 32681] OUR LINE ??
  13549	043620	001010 				BNE	30$		;;; [RCO 32681] YES, DON'T SET LINE SPEED TO ZERO
  13550	043622					CALL	.DHSPZ		;;; SET INPUT SPEED TO ZERO
	043622	004737 	040530'			JSR	PC,.DHSPZ
  13551	043626	000405 				BR	30$		;;; [5.1015] AND EXIT
  13552						;
  13553	043630				25$:
  13554	043630	112765 	177777 	000004 		MOVB	#-1,STSW0(R5)	;;; [5.1015] DISABLE DL-11 INPUT
  13555	043636	042714 	000100 			BIC	#DL.REN,(R4)	;;; [5.1015] SO
  13556	043642				30$:
  13557	043642	042712 	041400 			BIC	#S2.DIP!S2.CNT,(R2) ;;; [5.1015] NO LONGER IN PROGRESS
  13558	043646	052712 	100000 			BIS	#S2.DDN,(R2)	;;; [5.1015] BUT FINISHED
  13559	043652	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [4.1.1092] DO WE OWN THIS LINE??
  13560	043656	001520 				BEQ	75$		;;; [4.1.1092] NO -- GO ON
  13561	043660	005237 	005056'			INC	.S2IDC		;;; [4.1.1092] YES -- ACCOUNT FOR IT
  13562	043664	000515 				BR	75$		;;; [5.1015] EXIT
  13563						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 246
TERMINAL DRIVER -- .TTENB (ENABLE INPUT FOR LINE)

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

  13621	043770					CALL	.TFXON		;;; [5.1016] YES, FORCE THE XON
	043770	004737 	044222'			JSR	PC,.TFXON
  13622	043774				46$:
  13623	043774	005712 				TST	(R2)		;;; [6.1361] HAVE WE DISABLED THIS LINE?
  13624	043776	100005 				BPL	48$		;;; [6.1361] NO, DON'T DECREMENT COUNT
  13625	044000	032712 	004000 			BIT	#S2.LCL,(R2)	;;; [6.1361] YES, IS IT OUR REQUEST?
  13626	044004	001402 				BEQ	48$		;;; [6.1361] NO
  13627	044006	005337 	005056'			DEC	.S2IDC		;;; [6.1361] YES, DECREMENT DISABLED LINE COUNT
  13628	044012	042712 	115400 		48$:	BIC	#S2.ENB!S2.DDN!S2.LCL!S2.CNT,(R2) ;;; [5.1015] CLEAR THE REQUEST
  13629	044016	000440 				BR	75$		;;; [5.1015] AND EXIT
  13630						;
  13631					;
  13632					; HERE TO DEFER THE LINE START
  13633					;
  13634	044020				50$:
  13635	044020	052712 	010000 			BIS	#S2.ENB,(R2)	;;; [5.1015] SET DEFERRED REQUEST
  13636	044024	042712 	020000 			BIC	#S2.DIS,(R2)	;;; [5.1015] REMOVE "OTHER" REQUEST
  13637	044030	000431 				BR	70$		;;; [5.1015] STOP THE LINE AND EXIT
  13638						;
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 247
TERMINAL DRIVER -- .TTBTW (BREAK-THROUGH WRITE FUNCTION)

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

  13691	044124	012600 				MOV	(SP)+,R0
  13692	044126					RETURN			;;; [5.1015] AND EXIT
	044126	000207 				RTS	PC
  13693
  13694						.DSABL	LSB
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 248
TERMINAL DRIVER -- BLDPKT (BUILD A TERMINAL PACKET)

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

  13732						.SBTTL	TERMINAL DRIVER -- .TTSW2 (FIND OFFSET INTO "STSW2" TABLE)
  13733
  13734					;+
  13735					; .TTSW2 -- FIND OFFSET INTO "STSW2" TABLE
  13736					;
  13737					; INPUTS:
  13738					;
  13739					;	R5 -- POINTS TO DLS ENTRY FOR THIS LINE
  13740					;
  13741					; OUTPUTS:
  13742					;
  13743					;	R2 -- POINTS TO "STSW2" ENTRY FOR THIS LINE
  13744					;-
  13745
  13746	044202				.TTSW2::
  13747	044202	010502 				MOV	R5,R2		;;; [5.1015] COPY DLS POINTER TO R2
  13748	044204	162702 	003004'			SUB	#TTTBL,R2	;;; [5.1015] FIND OFFSET INTO "STSW2" TABLE
  13749	044210	006202 				ASR	R2
  13750	044212	006202 				ASR	R2		;;; [5.1015] SO
  13751	044214	062702 	005066'			ADD	#STSW2,R2	;;; [5.1015] VOILA!
  13752	044220					RETURN			;;; [5.1015] TO CALLER
	044220	000207 				RTS	PC
TTYDRR	- GENERAL TERMINAL HAND	MACRO V05.04  Monday 16-May-88 15:45  Page 250
TERMINAL DRIVER -- .TFXON (FORCE AN XON FOR A LINE)

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

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

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

  13873					; MACRO LIBRARY CALLS
  13874					;
  13875						.MCALL	.CRASH,DIR$,DMYG$
  13876						.MCALL	MTPI,MFPI,MTPS,MFPS,CALL,RETURN,.INH5,.ENB5
  13877						.MCALL	$DEF,F11DF$
  13878						.MCALL	.INH0,.ENB0,WSIG$S
  13879						.MCALL	.ENB,.INH,.ENB6,.INH6
  13880	044250					$DEF
  13881	044250					F11DF$
  13882
  13883					;	MSETRP == 1
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 254
SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)

  13885						.SBTTL	SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)
  13886
  13887	044250				BITTBL::
  13888	044250	000001 				.WORD	1
  13889	044252	000002 				.WORD	2
  13890	044254	000004 				.WORD	4
  13891	044256	000010 				.WORD	10
  13892	044260	000020 				.WORD	20
  13893	044262	000040 				.WORD	40
  13894	044264	000100 				.WORD	100
  13895	044266	000200 				.WORD	200
  13896	044270	000400 				.WORD	400
  13897	044272	001000 				.WORD	1000
  13898	044274	002000 				.WORD	2000
  13899	044276	004000 				.WORD	4000
  13900	044300	010000 				.WORD	10000
  13901	044302	020000 				.WORD	20000
  13902	044304	040000 				.WORD	40000
  13903	044306	100000 				.WORD	100000
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 255
SCOMM MODULE -- .CEFN   (CONVERT EFN)

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

  13960	044342	016303 	044250'			MOV	BITTBL(R3),R3
  13961	044346	020227 	000004 			CMP	R2,#4		; FLAG IN RANGE 33-64?
  13962	044352	002403 				BLT	10$
  13963	044354	062702 	001004'			ADD	#.COMEF-4,R2	; YES -- SET R2 TO ADDRESS OF WORD IN
  13964	044360	000403 				BR	20$		; SCOMM (COMMON EVENT FLAGS)
  13965						;
  13966	044362				10$:
  13967	044362	060502 				ADD	R5,R2		; NO -- SET R2 TO ADDRESS OF WORD IN
  13968	044364	062702 	000020 			ADD	#A.EF,R2	; ATL NODE (TASK'S EVENT FLAGS)
  13969	044370				20$:
  13970	044370	005703 				TST	R3		; SET CONDITION CODES
  13971	044372					RETURN
	044372	000207 				RTS	PC
  13972
  13973	044374				X8X97::
  13974	044374	104637 				TRAP	DE.97
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 256
SCOMM MODULE -- .CKDEL  (CLOCK DELETE)

  13976						.SBTTL	SCOMM MODULE -- .CKDEL  (CLOCK DELETE)
  13977
  13978					;+
  13979					; .CKDEL -- SUBROUTINE TO REMOVE AN ENTRY FORM THE CLOCK LIST
  13980					;
  13981					; ENTRY CONDITIONS:
  13982					;
  13983					;	R4 -- POINTER TO ENTRY TO BE REMOVED
  13984					;
  13985					; CALLING SEQUENCE:
  13986					;
  13987					;	CALL	.CKDEL
  13988					;
  13989					; EXIT CONDITIONS:
  13990					;
  13991					;	NO ERROR CONDITIONS
  13992					;
  13993					;	REGISTERS ALTERED: NONE
  13994					;-
  13995
  13996						.ENABL	LSB
  13997
  13998	044376				.CKDEL::
  13999	044376	010446 				MOV	R4,-(SP)	; SAVE REGISTERS
  14000	044400	010546 				MOV	R5,-(SP)
  14001	044402	010405 				MOV	R4,R5
  14002	044404	062705 	000014 			ADD	#C.SZ,R5	; LOOK AT THE NEXT ENTRY
  14003	044410				10$:
  14004	044410	012524 				MOV	(R5)+,(R4)+	; NO -- MOVE AN ENTRY UP
  14005	044412	001406 				BEQ	30$		; END OF TABLE
  14006	044414	012524 				MOV	(R5)+,(R4)+
  14007	044416	012524 				MOV	(R5)+,(R4)+
  14008	044420	012524 				MOV	(R5)+,(R4)+
  14009	044422	012524 				MOV	(R5)+,(R4)+
  14010	044424	012524 				MOV	(R5)+,(R4)+
  14011	044426	000770 				BR	10$		; TRY AGAIN
  14012						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 257
SCOMM MODULE -- .CKDEL  (CLOCK DELETE)

  14048
  14049	044430				30$:
  14050	044430	005024 				CLR	(R4)+		; INSURE LAST ENTRY 0
  14051	044432	012605 				MOV	(SP)+,R5	; RESTORE
  14052	044434	012604 				MOV	(SP)+,R4
  14053	044436					RETURN			; RETURN TO CALLER
	044436	000207 				RTS	PC
  14055
  14056						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 258
SCOMM MODULE -- ..ERLG	(ERROR LOGGING)

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

  14110	044536					RETURN			; [5.1008] TO CALLER
	044536	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 259
SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)

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

  14164	044652	012604 				MOV	(SP)+,R4
  14165	044654	012600 				MOV	(SP)+,R0
  14166	044656					RETURN
	044656	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 260
SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)

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

  14222	044740	062704 	000050 			ADD	#U.SZ,R4	;; LOOK AT NEXT ENTRY
  14223	044744	026464 	177756 	177706 		CMP	-U.RF(R4),-U.RF-U.SZ(R4) ; CHECK DEVICE NAME
  14224	044752	001765 				BEQ	30$
  14225	044754	005216 				INC	@SP		;; SET CARRY
  14226	044756	000466 				BR	65$		;; AND RETURN
  14227						;
  14228	044760				40$:
  14229	044760	010401 				MOV	R4,R1		;; SET UP NODE ADDRESS FOR RETURN
  14230	044762	016102 	000004 			MOV	R.TD(R1),R2	;; YES -- CHHANGE THE DISK ADDRESS
  14231	044766	013704 	001006'			MOV	.CRTSK,R4	;; SET THE EVENT FLAG
  14232	044772	016105 	000014 			MOV	R.FC(R1),R5	;; FIND THE FUNCTION CODE
  14233	044776	020527 	001400 			CMP	R5,#IO.ATT	;; ATTACH FUNCTION??
  14234	045002	001457 				BEQ	70$		;; YES -- HANDLE ATTACH HERE
  14235	045004	020527 	002000 			CMP	R5,#IO.DET	;; NO -- DETACH ??
  14236	045010	001470 				BEQ	80$		;; YES -- HANDLE HERE
  14237	045012	022705 	001010 			CMP	#IO.LOV,R5	;; NO -- IS THE FUNCTION CODE LOAD OVERLAY??
  14238	045016	001013 				BNE	50$		;; NO -- PROCEED
  14239	045020	066261 	000034 	000034 		ADD	S.DL+2(R2),R.PB+10(R1)
  14240	045026	005561 	000032 			ADC	R.PB+6(R1)
  14241	045032	066261 	000032 	000032 		ADD	S.DL(R2),R.PB+6(R1)
  14242	045040				45$:
  14243	045040	012761 	001000 	000014 		MOV	#IO.RLB,R.FC(R1) ; SET FUNCTION CODE TO READ LOGICAL BLOCK
  14244	045046				50$:
  14245	045046	022761 	000050 	000014 		CMP	#IO.LTK,R.FC(R1) ;; IS THIS A LOAD TASK FUNCTION?
  14246	045054	001013 				BNE	60$		;;  PROCEED
  14247	045056	016202 	000012 			MOV	S.BA(R2),R2	;; SET THE CORE ADDRESS
  14254	045062	010261 	000024 			MOV	R2,R.PB(R1)	;; SET CORE ADDRESS
  14255	045066	016102 	000006 			MOV	R.AT(R1),R2	;; FIND THE ATL NODE ADDRESS
  14256	045072	062702 	000030 			ADD	#A.FM+4,R2	;; SET I/O STATUS WORD TO POINT TO A.FM+4
  14257	045076	010261 	000016 			MOV	R2,R.SB(R1)	;;
  14258	045102	000756 				BR	45$		;; CHANGE FUNCTION TO READ
  14259						;
  14260	045104				60$:
  14261	045104	052764 	000010 	000020 		BIS	#EF.NIR,A.EF(R4) ;; FOR DQ NORMAL
  14262	045112	016103 	000026 			MOV	R.PB+2(R1),R3	;; FIND THE SIZE OF THE XFER
  14263	045116	016102 	000024 			MOV	R.PB(R1),R2	;; SET UP FOR VALIDATE
  14264	045122					CALL	..VXFR		;; VALIDATE XFER
	045122	004737 	050302'			JSR	PC,..VXFR
  14265	045126	012600 				MOV	(SP)+,R0	;; FIND THE PUD ADDRESS
  14266	045130	116002 	177760 			MOVB	U.UN-U.RF(R0),R2 ;; SET UNIT NUMBER ON STACK
  14267	045134				65$:
  14268	045134					.ENB0			;; ENABLE INTERRUPTS
	045134	004737 	045530'			JSR	PC,..ENB0
  14269	045140					RETURN			; NO -- RETURN
	045140	000207 				RTS	PC
  14270	045142				70$:
  14271	045142	012604 				MOV	(SP)+,R4	;; RESTORE PUD ADDRESS
  14272	045144	016164 	000006 	177772 		MOV	R.AT(R1),U.AF-U.RF(R4)	;; SET ATTACH FLAG
  14273	045152				75$:
  14274	045152					.ENB0			;; ENABLE TASK SWITCHING
	045152	004737 	045530'			JSR	PC,..ENB0
  14275	045156	012703 	000001 			MOV	#1,R3		; RETURN +1 STATUS
  14276	045162	005004 				CLR	R4
  14277	045164					CALL	..IODN
	045164	004737 	044540'			JSR	PC,..IODN
  14278	045170	000633 				BR	..DQRN		; DEQUEUE AGAIN
  14279						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 260-2
SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)

  14280	045172				80$:
  14281	045172	012604 				MOV	(SP)+,R4	;; RESTORE PUD ADDRESS
  14282	045174	005064 	177772 			CLR	U.AF-U.RF(R4)	;; CLEAR ATTACH
  14283	045200	000764 				BR	75$		;; AND RETURN I/O DONE STATUS
  14284						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 261
SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)

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

  14327						.SBTTL	SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)
  14328
  14329					;+
  14330					; ..DSEV -- COMMON ROUTINE TO DECLARE A SIGNIFICANT EVENT
  14331					;
  14332					; INPUTS:
  14333					;
  14334					;	SPECIFIC EVENT MUST BE DECLARED BY CALLER
  14335					;
  14336					; OUTPUTS:
  14337					;
  14338					;	NO REGISTERS ALTERED
  14339					;-
  14340
  14341	045254				..DSEV::
  14342	045254	152737 	000001 	001014'		BISB	#EV.SE,.SERFG+0	; DECLARE SIGNIFIGANT EVENT
  14343	045262					RETURN			; RETURN
	045262	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 263
SCOMM MODULE -- DIV216   (DIV R2 BY 16)

  14345						.SBTTL	SCOMM MODULE -- DIV216   (DIV R2 BY 16)
  14346
  14347					;+
  14348					; DIV216 -- SUBROUTINE TO SIMULATE A HARDWARE
  14349					;	    DIVIDE INSTRUCTION (DIV #16,R2)
  14350					;
  14351					; CALLING SEQUENCE:
  14352					;
  14353					;	R3 -- NUMBER TO BE DIVIDED BY 16
  14354					;
  14355					;	CALL	DIV216
  14356					;
  14357					; EXIT CONDITIONS:
  14358					;
  14359					;	R3 -- REMAINDER
  14360					;	R2 -- QUOTIENT
  14361					;-
  14362
  14363	045264				DIV216::
  14364	045264	010302 				MOV	R3,R2		; FIND THE REMAINDER
  14365	045266	042703 	177760 			BIC	#177760,R3	; MASK OFF THE REMAINDER
  14366	045272	006002 				ROR	R2		; DIVIDE R2 BY 2
  14367	045274	006002 				ROR	R2		; AGAIN
  14368	045276	006002 				ROR	R2		; AND AGAIN
  14369	045300	006002 				ROR	R2		; NOW HAVE DONE IT BY 16.
  14370	045302	042702 	170000 			BIC	#170000,R2	; MASK OFF JUNK PROPIGATED BY ROR
  14371	045306					RETURN			; RETURN TO CALLER
	045306	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 264
SCOMM MODULE -- ..NDEL	(NODE DELETE)

  14373						.SBTTL	SCOMM MODULE -- ..NDEL	(NODE DELETE)
  14374
  14375					;+
  14376					; ..NDEL -- ROUTINE TO DELETE A NODE FROM A LIST
  14377					;
  14378					;	THIS IS A BASIC SUBROUTINE TO DELETE NODES FROM A LIST.
  14379					;	IT DOES NOT DO ANY ACCOUNTING OR LOOKING THE NODE.  IT ASSUMES
  14380					;	THAT THERE IS A NODE TO BE PICKED AND INHIBITS INTERRUPTS TO
  14381					;	PREVENT CONFLICTS WITH NODES BEING ADDED TO A DEQUE.
  14382					;
  14383					;	CALLING SEQUENCE:
  14384					;
  14385					;		R4 -- POINTER TO NODE TO BE DELETED
  14386					;
  14387					;		CALL	..NDEL
  14388					;-
  14389
  14390	045310				..NDEL::
  14391	045310	010146 				MOV	R1,-(SP)	; SAVE R1
  14392	045312					.INH6			; INHIBIT ALL INTERRUPTS
	045312	013746 	177776 			MOV	@#PS,-(SP)
	045316	112737 	000300 	177776 		MOVB	#300,@#PS
  14393	045324	011401 				MOV	@R4,R1		;;; PICK THE NODE
  14394	045326	010174 	000002 			MOV	R1,@2(R4)	;;;
  14395	045332	016461 	000002 	000002 		MOV	2(R4),2(R1)	;;;
  14396	045340					.ENB6			;;; ENABLE INTERRUPTS
	045340	012637 	177776 			MOV	(SP)+,@#PS
  14397	045344	012601 				MOV	(SP)+,R1	; RESTORE R1
  14398	045346					RETURN			; RETURN TO CALLER
	045346	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 265
SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)

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

  14439						.SBTTL	SCOMM MODULE -- ..NADD	(NODE ADD)
  14440
  14441					;+
  14442					; ..NADD -- ROUTINE TO ADD A NODE TO A DEQUEUE
  14443					;
  14444					;	..NADD IS THE GENERAL PICK A NODE ROUTINE.  THE ADDITION
  14445					;	OF A NODE IS DONE WITH INTERRUPTS INHIBITED TO PREVENT
  14446					;	A CONFLICT WITH NODE DELETION.
  14447					;
  14448					; CALLING SEQUENCE:
  14449					;
  14450					;	R1 -- NODE ADDRESS
  14451					;	R4 -- ADDRESS OF LISTHEAD OR PREVIOUS NODE
  14452					;
  14453					;	CALL	..NADD
  14454					;-
  14455
  14456	045424				..NADD::
  14457	045424	010246 				MOV	R2,-(SP)	; SAVE R2
  14458	045426	010461 	000002 			MOV	R4,2(R1)	; SET UP BACKWARD POINTER IN NODE
  14459	045432					.INH6			;;; INHIBIT INTERRUPTS
	045432	013746 	177776 			MOV	@#PS,-(SP)
	045436	112737 	000300 	177776 		MOVB	#300,@#PS
  14460	045444	011411 				MOV	@R4,@R1		;;; SET UP FORWARD POINTER
  14461	045446	010114 				MOV	R1,@R4		;;; FORWARD POINTER FROM LIST HEAD
  14462	045450	011102 				MOV	@R1,R2		;;;
  14463	045452	010162 	000002 			MOV	R1,2(R2)	;;;
  14464	045456					.ENB6			;;; ENABLE INTERRUPTS
	045456	012637 	177776 			MOV	(SP)+,@#PS
  14465	045462	012602 				MOV	(SP)+,R2	; RESTORE R2
  14466	045464					RETURN			; RETURN TO CALLER
	045464	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 267
SCOMM MODULE -- ..PICK	(PICK A NODE)

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

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

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

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

  14665					; HERE IF AN EXACT FIT HAS BEEN FOUND
  14666					;
  14667	045744				20$:
  14668	045744	011012 				MOV	@R0,@R2		;;; REMOVE BLOCK FROM LIST
  14685	045746				30$:
  14686	045746					.ENB6			;;; ENABLE INTERRUPTS AND SET EXIT CONDITIONS
	045746	012637 	177776 			MOV	(SP)+,@#PS
  14687	045752	012602 				MOV	(SP)+,R2	; RESTORE REGISTERS
  14688	045754	012603 				MOV	(SP)+,R3	; RESTORE R3
  14689	045756					RETURN			; RETURN WITH R0 POINTING TO CALLER'S NODE
	045756	000207 				RTS	PC
  14690					;
  14691					; HERE TO SET UP ERROR EXIT
  14692					;
  14693	045760				40$:
  14694	045760	005216 				INC	@SP		;;; SET CARRY
  14695	045762	060163 	000002 			ADD	R1,2(R3)	;;; RESET COUNTER
  14696	045766	000767 				BR	30$		;;; AND RETURN
  14697						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 271
SCOMM MODULE -- ..DECB/..DECN/..DEC2 (DEALLOCATE CORE)

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

  14772	046072				60$:
  14773	046072	010246 				MOV	R2,-(SP)	;;; SAVE ADDRESS OF PREVIOUS BLOCK
  14774	046074	010022 				MOV	R0,(R2)+	;;; ASSUME NO AGLOMERATION
  14775	046076	061216 				ADD	@R2,@SP		;;; CALCULATE ADDRESS OF NEXT BLOCK
  14776	046100	020026 				CMP	R0,(SP)+	;;; EQUAL TO BLOCK BEING RELEASED?
  14777	046102	001003 				BNE	70$		;;; IF NE NO
  14778	046104	061201 				ADD	@R2,R1		;;; MERGE TWO BLOCKS
  14779	046106	011042 				MOV	@R0,-(R2)	;;; MOVE LINK WORD TO PREVIOUS BLOCK
  14780	046110	010200 				MOV	R2,R0		;;; SET NEW ADDRESS OF BLOCK
  14781	046112				70$:
  14782	046112	010160 	000002 			MOV	R1,2(R0)	;;; SET SIZE OF BLOCK RELEASED
  14783	046116					.ENB6			;;; ENABLE INTERRUPTS
	046116	012637 	177776 			MOV	(SP)+,@#PS
  14784	046122	012600 				MOV	(SP)+,R0	; RESTORE REGISTERS
  14785	046124	012601 				MOV	(SP)+,R1
  14786	046126	012602 				MOV	(SP)+,R2
  14787	046130	012603 				MOV	(SP)+,R3
  14788	046132					RETURN
	046132	000207 				RTS	PC
  14789						.DSABL	LSB
  14790
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 272
SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)

  14796						.SBTTL	SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)
  14797
  14798					;+
  14799					;	..ALOW -- SUBROUTINE TO ALLOCATE A BUFFER (..ALCB) OR WAIT
  14800					;		  IF ONE IS NOT AVAILABLE
  14801					;
  14802					;CALLING SEQUENCE:
  14803					;
  14804					;	SAME AS ..ALCB (Q.V.)
  14805					;
  14806					;-
  14807
  14808	046134				..ALOW::
  14809	046134					CALL	..ALCB		; TRY TO ALLOCATE A CORE BUFFER
	046134	004737 	045644'			JSR	PC,..ALCB
  14810	046140	103004 				BCC	10$		; RETURN IF SUCCESSFUL
  14811	046142					WSIG$S			; WAIT FOR SIG EVENT
	046142	012746 				MOV	(PC)+,-(SP)
	046144	   061 	   001 			.BYTE	49.,1
	046146	104375 				EMT	375
  14812	046150	000771 				BR	..ALOW		; AND TRY AGAIN
  14813						;
  14814	046152				10$:
  14815	046152					RETURN			; RETURN TO CALLER
	046152	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 273
SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)

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

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

  14938						;
  14939	046362				60$:
  14940	046362					RETURN			;;; EXIT
	046362	000207 				RTS	PC
  14941					;
  14942					; HERE TO START UP A DL-11 LINE
  14943					;
  14944	046364				70$:
  14945	046364	000137 	035200'			JMP	.DLSTO		;;; START DL-11 OUTPUT
  14946						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 274
SCOMM MODULE -- ..STPT	(STOP TTY)

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

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

  15026						.SBTTL	SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 QUEUE)
  15027
  15028					;+
  15029					; ..STCH -- SUBROUTINE TO STORE A CHARACTER IN THE TO 10
  15030					;	    QUEUE AND IF THAT QUEUE IS FULL SEND IT TO THE KL10 BY
  15031					;	    ENTERING IT IN THE TO 10 QUEUE.
  15032					;
  15033					; CALLING SEQUENCE:
  15034					;
  15035					;	SP -- POINTS TO CHARACTER
  15036					;	R5 -- POINTER TO DEVICE TABLE ENTRY
  15037					;
  15038					;	CALL	..STCH
  15039					;
  15040					;	REGISTERS ALTERED: NONE
  15041					;-
  15042
  15043						.ENABL	LSB
  15044
  15045	046554				..STCH::
  15046	046554	010446 				MOV	R4,-(SP)	; SAVE REGISTERS
  15047	046556	010346 				MOV	R3,-(SP)
  15048	046560	010146 				MOV	R1,-(SP)
  15049	046562	012703 	000004 			MOV	#D.CDLS,R3	; SET UP AS DATA/LINE SCANNER
  15050	046566					CALL	STLN		; GET LINE NUMBER
	046566	004737 	046640'			JSR	PC,STLN
  15051	046572	000304 				SWAB	R4		; AND PUT IN HIGH ORDER BYTE
  15052	046574	156604 	000010 			BISB	10(SP),R4	; SET CHARACTER
  15053	046600	012701 	000004 			MOV	#BC.LNC,R1	; SET LINE NUMBER/CHARACTER
  15054					;
  15055					;	LOCAL COMMON QUEUE STORAGE SUBROUTINE
  15056					;
  15057	046604				STCM:
  15058	046604					CALL	..STFC		; STORE FUNCTION
	046604	004737 	046704'			JSR	PC,..STFC
  15059	046610	012601 				MOV	(SP)+,R1	; RESTORE
  15060	046612	012603 				MOV	(SP)+,R3
  15061	046614	012604 				MOV	(SP)+,R4
  15062	046616				10$:
  15063	046616					RETURN
	046616	000207 				RTS	PC
  15064
  15065						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 276
SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)

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

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

  15165	047064	010037 	001266'			MOV	R0,.CRPB	; SET CURRENT BUFFER POINTER
  15166	047070	012600 				MOV	(SP)+,R0	; RESTORE R0
  15167	047072	000720 				BR	5$		; AND SET FUNCTION
  15168						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 278
SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)

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

	047172	004737 	044314'			JSR	PC,.CEFN3
  15226	047176	012605 				MOV	(SP)+,R5	; RESTORE R5
  15227	047200	010325 				MOV	R3,(R5)+	; SET MASK
  15228	047202	010225 				MOV	R2,(R5)+	; SET ADDRESS
  15229	047204	012603 				MOV	(SP)+,R3	; RESTORE REGISTERS
  15230	047206	012602 				MOV	(SP)+,R2
  15231	047210	010446 				MOV	R4,-(SP)	; SAVE R4
  15232	047212	010001 				MOV	R0,R1		; SET UP TO ENTER NODE
  15233	047214					.INH6			; INHIBIT DTE20 INTERRUPTS
	047214	013746 	177776 			MOV	@#PS,-(SP)
	047220	112737 	000300 	177776 		MOVB	#300,@#PS
  15234	047226	012704 	001334'			MOV	#TO10Q,R4	;;; START TO 10 QUEUE IF NECESSARY
  15235	047232	021404 				CMP	@R4,R4		;;; CHECK TO SEE IF ALREADY GOING
  15236	047234	001003 				BNE	30$		;;; YES -- JUST ENTER IN QUEUE
  15237	047236	010104 				MOV	R1,R4		;;; NO -- SET NODE ADDRESS
  15238	047240					CALL	.STTNQ		;;; [4.1.1121] START QUEUE
	047240	004737 	032170'			JSR	PC,.STTNQ
  15239	047244				30$:
  15240	047244	013704 	001336'			MOV	TO10Q+2,R4	;;; ENTER QUEUE
  15241	047250					CALL	..NADD		;;; ADD NODE
	047250	004737 	045424'			JSR	PC,..NADD
  15242	047254					.ENB6			;;; ENABLE INTERRUPTS
	047254	012637 	177776 			MOV	(SP)+,@#PS
  15243	047260	012604 				MOV	(SP)+,R4	;;; RESTORE REGISTERS
  15244	047262	012601 				MOV	(SP)+,R1
  15245	047264	012600 				MOV	(SP)+,R0
  15246	047266	012605 				MOV	(SP)+,R5
  15247	047270	000241 				CLC			; CLEAR C
  15248	047272				40$:				; [4.2208]
  15249	047272					RETURN			; RETURN TO CALLER
	047272	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 279
SCOMM MODULE -- ..STQ	(STORE IN TO 10 QUEUE)

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

  15302	047406	022020 				CMP	(R0)+,(R0)+	; MOVE OVER THE FORWARD/BACKWARD POINTERS
  15303	047410	010120 				MOV	R1,(R0)+	; SET UB NODE SIZE
  15304	047412	005020 				CLR	(R0)+		; SET UP CURRENT SIZE OF Q
  15305	047414	010037 	001266'			MOV	R0,.CRPB	; SET THE CURRENT BUFFER POINTER
  15306	047420	162701 	000012 			SUB	#10.,R1		; DON'T WANT TO INCLUDE HEADER
  15307	047424	010137 	001264'			MOV	R1,.CRSZ	; SET UP SIZE OF QUEUE (MAX)
  15308	047430	005037 	001256'			CLR	.CRQZ		; CLEAR CURRENT QUEUE SIZE
  15309	047434				40$:
  15310	047434	012604 				MOV	(SP)+,R4	; RESTORE REGISTSERS
  15311	047436	012601 				MOV	(SP)+,R1
  15312	047440	012600 				MOV	(SP)+,R0
  15313	047442					RETURN			; RETURN TO CALLER
	047442	000207 				RTS	PC
  15314
  15315						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 280
SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)

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

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

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

  15484					;
  15485					; ERROR EXIT
  15486					;
  15487	047740				60$:
  15488	047740	000261 				SEC			;;; [4.2217] SET ERROR RETURN
  15489					;
  15490					; NORMAL EXIT
  15491					;
  15492	047742				65$:
  15493	047742	113725 	001372'			MOVB	.DXRTY,(R5)+	;;; [5.1008] SET THE RETRY FLAGS
  15494	047746	113715 	001373'			MOVB	.EBRTY,(R5)	;;; [5.1008] SO
  15495	047752	012605 				MOV	(SP)+,R5	;;; [5.1008] RESTORE R5
  15496	047754	012602 				MOV	(SP)+,R2	;;; [4.2217] RESTORE REGISTERS
  15497	047756	012601 				MOV	(SP)+,R1	;;; [4.2217] SO
  15498	047760					RETURN			;;; [4.2217] TO CALLER
	047760	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 281
SCOMM MODULE -- ..WFED	(WAIT FOR EXAMINE/DEPOSIT)

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

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

  15603	050212				20$:
  15604	050212	012603 				MOV	(SP)+,R3	;;; RESTORE R3
  15605	050214					RETURN			;;; RETURN TO CALLER
	050214	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 283
SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)

  15607						.SBTTL	SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)
  15608
  15609					;+
  15610					; ..DTSP -- SUBROUTINE TO TURN OFF PRIMARY AND SECONDARY PROTOCOLS.
  15611					;	    THIS REQUIRES TURNING OFF THE DTE INTERRUPT.
  15612					;
  15613					; CALLING SEQUENCE:
  15614					;
  15615					;	CALL	..DTSP
  15616					;
  15617					; EXIT CONDITIONS:
  15618					;
  15619					;	SUCCESS IS ASSURED, CC-C IS CLEARED
  15620					;	NO REGISTERS ALTERED
  15621					;	THERE ARE NO ERRORS
  15622					;-
  15623
  15624						.ENABL	LSB
  15625
  15626	050216				..DTSP::
  15627	050216	012777 	000010 	131140 		MOV	#INTROF,@.PRSTA	;; TURN OFF DTE INTERRUPTS
  15628	050224	042737 	120000 	001012'		BIC	#EF.PR1!EF.PR2,.COMEF+2 ;; AND PROTOCOLS
  15629	050232	000421 				BR	30$		;; AND EXIT
  15630						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 284
SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)

  15632						.SBTTL	SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)
  15633
  15634					;+
  15635					; ..DTP2 -- SUBROUTINE TO TURN ON SECONDARY PROTOCOL.
  15636					;	    A CHECK IS MADE TO MAKE SURE PRIMARY PROTOCOL IS OFF.
  15637					;
  15638					; CALLING SEQUENCE:
  15639					;
  15640					;	CALL	..DTP2
  15641					;
  15642					; EXIT CONDITIONS:
  15643					;
  15644					;	SUCCESS IS ASSURED, CC-C IS CLEARED
  15645					;	NO REGISTERS ALTERED
  15646					;	THERE ARE NO ERRORS
  15647					;-
  15648
  15649	050234				..DTP2::
  15650	050234	005737 	001012'			TST	.COMEF+2	;; [4.1.1105] IF PRIMARY PROTOCOL IS ON,
  15651	050240	100002 				BPL	10$		;; [4.1.1105] THEN
  15652	050242					CALL	..DTSP		;; TURN IT OFF
	050242	004737 	050216'			JSR	PC,..DTSP
  15653	050246				10$:
  15654	050246	012777 	004010 	131110 		MOV	#INTROF!INT11S,@.PRSTA ;; DISABLE INTERRUPTS
  15655	050254	052737 	020000 	001012'		BIS	#EF.PR2,.COMEF+2 ;; LET THE BOOT PROTOCOL TASK GO
  15656	050262	000403 				BR	20$		;; AND RETURN
  15657						;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 285
SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)

  15659						.SBTTL	SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)
  15660
  15661					;+
  15662					; ..DTP1 -- SUBROUTINE TO TURN ON PRIMARY PROTOCOL.
  15663					;
  15664					; CALLING SEQUENCE:
  15665					;
  15666					;	CALL	..DTP1
  15667					;
  15668					; EXIT CONDITIONS:
  15669					;
  15670					;	SUCCESS IS ASSURED , CC-C IS CLEARED
  15671					;	NO REGISTERS ALTERED
  15672					;	THERE ARE NO ERRORS
  15673					;-
  15674
  15675	050264				..DTP1::
  15676	050264	052737 	100000 	001012'		BIS	#EF.PR1,.COMEF+2 ;; ENABLE THE PRIMARY PROTOCOL TASK
  15677	050272				20$:
  15678	050272					CALL	..DSEV		;; DECLARE A SIGNIFICANT EVENT
	050272	004737 	045254'			JSR	PC,..DSEV
  15679	050276				30$:
  15680	050276	000241 				CLC			;; MAKE SURE CC-C
  15681	050300					RETURN			;; AND RETURN
	050300	000207 				RTS	PC
  15682
  15683						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 286
SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)

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

  15839						.SBTTL	SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)
  15840
  15841					;+
  15842					; ..BLXO -- ROUTINE TO PASS INFORMATION TO A USER'S PARTITION
  15843					;
  15844					;	..BLXO VALIDATES THE TRANSFER OF THE REQUEST TO TRANSFER
  15845					;	TO OR FROM A HANDLER TASK'S AREA.
  15846					;
  15847					; ..BLXI -- ROUTINE TO PASS INFORMATION FROM A TASK'S PARTITION
  15848					;
  15849					;	..BLXI VALIDATES THE TRANSFER OF THE REQUEST TO TRANSFER
  15850					;	TO A HANDLER TASK'S AREA.
  15851					;
  15852					; CALLING SEQUENCE:
  15853					;
  15854					;	R1 -- REQUEST NODE ADDRESS
  15855					;	R2 -- STARTING ADDRESS (VIRTUAL)
  15856					;	R3 -- TRANSFER LENGTH (BYTES)
  15857					;	R4 -- HANDLER VIRTUAL ADDRESS
  15858					;
  15859					;	CALL	..BLXO
  15860					;
  15861					;	-  OR --
  15862					;
  15863					;	CALL ..BLXI
  15864					;
  15865					; NOTE -- RESTRICTED TO 4K-64 (10) WORD TRANSFER'S
  15866					;-
  15867
  15868	050310				..BLXI::
  15869	050310	010446 				MOV	R4,-(SP)
  15870	050312	010546 				MOV	R5,-(SP)
  15871	050314	012705 	000001 			MOV	#1,R5		; SET DIRECTION OF TRANSFER TO IN
  15872	050320	000403 				BR	BLXCOM		; AND ENTER COMMON CODE
  15873						;
  15874	050322				..BLXO::
  15875	050322	010446 				MOV	R4,-(SP)	; SAVE THE REGISTERS
  15876	050324	010546 				MOV	R5,-(SP)
  15877	050326	005005 				CLR	R5		; INDICATE TRANSFER OUT
  15878	050330				BLXCOM:
  15879	050330	010546 				MOV	R5,-(SP)	; SAVE THE DIRECTION OF TRANSFER
  15880	050332					CALL	..VXFR		; VALADATE TRANSFER
	050332	004737 	050302'			JSR	PC,..VXFR
  15893	050336	010346 				MOV	R3,-(SP)	; SAVE R3
  15898	050340	016604 	000006 			MOV	6(SP),R4	; SET UP THE FROM ADDRESS
  15899	050344	005766 	000002 			TST	2(SP)
  15901	050350	001403 				BEQ	BLXPLP		; DIRECTION OK FOR OUTPUT --DO TRANSFER
  15908	050352	010546 				MOV	R5,-(SP)
  15909	050354	010405 				MOV	R4,R5
  15910	050356	012604 				MOV	(SP)+,R4
  15912	050360				BLXPLP:
  15913	050360	112425 				MOVB	(R4)+,(R5)+	; MOVE A BYTE
  15914	050362	077302 				SOB	R3,BLXPLP	; YES -- FINISHED?
  15915	050364	012603 				MOV	(SP)+,R3	; RESTORE R3
  15920									; CLEAR C BIT TO INDICATE LEGAL TRANSFER
  15921	050366	005726 				TST	(SP)+		; REMOVE THE DIRECTION WORD FROM THE STACK
  15922	050370				BLXRTN:
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 287-1
SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)

  15923	050370	012605 				MOV	(SP)+,R5	; RESTORE REGISTERS
  15924	050372	012604 				MOV	(SP)+,R4
  15925	050374					RETURN			; RETURN TO CALLER
	050374	000207 				RTS	PC
  15926					;
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 288
SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL

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

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

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

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

  16122
  16123						.SBTTL	END
  16124					;
  16125					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
  16126					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
  16127					;			ALL RIGHTS RESERVED.
  16128					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
  16129					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
  16130					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
  16131					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
  16132					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
  16133					;
  16134					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
  16135					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
  16136					;       CORPORATION.
  16137					;
  16138					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
  16139					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
  16140					;
  16141		011454'				.END	INITLM
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  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   033044R  	DE.03 = 000375 G
ADRSAV  005604RG 	BC.XEN= 000034 G 	COMBSE  001236RG 	CTRLU   033050R  	DE.04 = 000374 G
AF.PP = 000200 G 	BC.XOF= 000020 G 	COMTRP  011562R  	CTRLZ   033054R  	DE.05 = 000373 G
ASXCMN  014210R  	BC.XON= 000021 G 	COPBUF  030120RG 	CTYPTR  002642RG 	DE.06 = 000372 G
ASXDT   014064R  	BELADR  037206RG 	CPUERR  021102R  	CTYSTS  002672RG 	DE.07 = 000371 G
ASXEXT  014400R  	BITTBL  044250RG 	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  044130R  	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  050330R  	CRSTS = 006230RG 	C.SZ  = 000014 G 	DF.DMG= 000004
A.SZ  = 000036 G 	BLXPLP  050360R  	CRTBL   006224RG 	C1    = 140010   	DF.DMN= 000007
A.TD  = 000016 G 	BLXRTN  050370R  	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  031652R  	DF.EMN= 000006
BC.DEB= 000036 G 	BTWCHR  026702RG 	CRTY  = 002000   	DBLEPP  031452R  	DF.KLR= 000012
BC.DES= 000010 G 	BYCNT   002734RG 	CR$BO5= 044176RG 	DBLEPX  031456R  	DF.KLW= 000013
BC.EDR= 000027 G 	BYTESA  005606RG 	CR$B03= 047372RG 	DBLHDR  031546R  	DF.KLX= 000014
BC.FNM= 000041 G 	CDBA  = 177164 G 	CR$CBR= 020344RG 	DBLPWR  031506R  	DF.OFF= 000002
BC.FOD= 000013 G 	CDCC  = 177162 G 	CR$DTB= 031114RG 	DBLRLD  031462R  	DF.ON = 000003
BC.HAD= 000002 G 	CDD   = 000020   	CR$DTD= 012020RG 	DBLXFR  031516R  	DF.PDP= 000016
BC.HDS= 000007 G 	CDDB  = 177166 G 	CR$DTF= 030600RG 	DBLXIT  031664R  	DF.PEX= 000015
BC.HSN= 000040 G 	CDRTPD  007722RG 	CR$ETE= 030512RG 	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  042306R
BC.LDV= 000031 G 	CESCHK  022166R  	CR$ILF= 026036RG 	DEAND3  026126R  	DHISTQ  036424R
BC.LNC= 000004 G 	CH    = 063400 G 	CR$ILQ= 031570RG 	DEANOD  027462R  	DHSAV   040344R
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= 031206RG 	DEX   = 000400   	DHTMP   002654RG
BC.RQD= 000001 G 	CH.NAT= 000020 G 	CR$PT2= 031224RG 	DEXCOM  013674R  	DH.FER= 020000 G
BC.RTD= 000011 G 	CH.NDC= 000010 G 	CR$PT3= 031534RG 	DEXDON= 000004   	DIAG1 = 174430
BC.SAK= 000017 G 	CH.OFF= 000200 G 	CR$PT4= 031640RG 	DEXST   001352RG 	DIAG2 = 174432
BC.SDS= 000006 G 	CH.UNL= 000040 G 	CR$RES= 012026RG 	DEXTM1  001360RG 	DIAG3 = 174436
BC.SKP= 000033 G 	CKDLEN  041664R  	CR$TBT= 012034RG 	DEXTM2  001356RG 	DIALUP  026130RG
BC.SLA= 000023 G 	CLRDEB  027600RG 	CR$TET= 030474RG 	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= 031446RG 	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  045264RG
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 291-2
Symbol table

DLCNT = 000005 G 	DTEADR  001276RG 	D.CKLE= 000201 G 	ERRTRR= 000012 G 	FNDDM   030174R
DLECNT= 000004 G 	DTECMD= 000451   	D.CKLN= 000210 G 	ERRTSP= 000011 G 	FNDSPD  030226R
DLETBL  003014RG 	DTEDSP  021044R  	D.CLOG= 000205 G 	ERR10C= 010000   	FORPRO= 000020
DLHUPX  041454R  	DTEFLG= 000444   	D.CLPT= 000005 G 	ERR10S= 020000   	FW    = 000300
DLTBL   003004RG 	DTEF11= 000450   	D.CRJP= 000203 G 	ERR11C= 000001   	F.DREF  000042
DLTMP   002656RG 	DTEHD   025304RG 	D.FA  = 000004 G 	ERR11S= 000002   	F.DRNM  000044
DLYCNT= 174400   	DTEMSK  001274RG 	D.FEPD= 000010 G 	EV.AS = 000002 G 	F.FEXT  000002
DL.CAR= 010000 G 	DTEMTD= 000455   	D.FM  = 000002 G 	EV.PF = 000200 G 	F.FNUM  000006
DL.CTS= 020000 G 	DTEMTI= 000456   	D.SZ  = 000006 G 	EV.SE = 000001 G 	F.FOWN  000014
DL.DEN= 000040 G 	DTENM = 000000   	D1011 = 000040   	EXCMN   021574R  	F.FPRO  000016
DL.DSC= 100000 G 	DTESNP  047762R  	EBSEL = 000100   	EXKAL   033066R  	F.FSEQ  000010
DL.DTR= 000002 G 	DTESP   025564RG 	EBUSPC= 000020   	E.BOV = 000006 G 	F.FSQN  000013
DL.FER= 020000 G 	DTETPD  007622RG 	EBUSPS= 000004   	E.CLK = 000002 G 	F.FVBN  000046
DL.RAC= 004000 G 	DTETSK  007142RG 	ECHOB   035644R  	E.DTE = 000001 G 	F.HDLB  000022
DL.RDE= 000001 G 	DTEXIT  030534R  	EDONES= 040000   	E.DV  = 000006 G 	F.LBN   000026
DL.RDN= 000200 G 	DTHD  = ****** GX	EDRMT   026042RG 	E.FCRI= 000073 G 	F.LGTH  000052
DL.REN= 000100 G 	DTRNA   005502RG 	EF.BOV= 000040 G 	E.FCTC= 000077 G 	F.LINK  000000
DL.RNG= 040000 G 	DTRTC   005500RG 	EF.CLK= 000002 G 	E.FFCP= 000072 G 	F.NACS  000036
DL.RTS= 000004 G 	DTSTK = ****** GX	EF.CRI= 002000 G 	E.FN  = 000004 G 	F.NLCK  000037
DL.SRD= 002000 G 	DTTPD   007762RG 	EF.CTC= 040000 G 	E.FP  = 000000 G 	F.NWAC  000040
DL.STD= 000010 G 	DTTSK   007402RG 	EF.DTE= 000001 G 	E.FPFR= 000074 G 	F.RVN   000012
DL.UNA= 001420 G 	DT0PEN  011032RG 	EF.FCP= 001000 G 	E.FPR1= 000100 G 	F.SCHA  000021
DL.XEN= 000100 G 	DT1PEN  011102RG 	EF.IOD= 000020 G 	E.FPR2= 000076 G 	F.SIZE  000032
DMTBE = 003004RG 	DUPE  = 000020   	EF.NIR= 000010 G 	E.FRKP= 000075 G 	F.STAT  000040
DMTBL   002742RG 	DURE  = 000004   	EF.PFR= 004000 G 	E.FSND= 000040 G 	F.STD   000004
DMTMP   002652RG 	DVCH  = 110220   	EF.PR1= 100000 G 	E.FW  = 000010 G 	F.UCHA  000020
DMTNXM  042266R  	DV.CFG= 004000 G 	EF.PR2= 020000 G 	E.IOD = 000005 G 	F11TPD  010022RG
DMYN  = 000004 G 	DV.EOF= 000040 G 	EF.RKH= 002000 G 	E.LS  = 000002 G 	GENTPD  010042RG
DNBLK   005636RG 	DV.F11= 000400 G 	EF.RKP= 010000 G 	E.NIR = 000004 G 	GETBUF  032420R
DNFCN   005640RG 	DV.HNG= 001000 G 	EF.RKR= 001000 G 	E.OPSZ= 000060 G 	HANGUP  026176RG
DNSTS   005646RG 	DV.IOP= 000020 G 	EF.RQM= 000200 G 	E.RKH = 000013 G 	HIBYTE= 177400
DON10C= 040000   	DV.LIN= 002000 G 	EF.RSS= 004000 G 	E.RKR = 000012 G 	HICTS   026766RG
DON10S= 100000   	DV.LOG= 000100 G 	EF.SND= 100000 G 	E.RQM = 000010 G 	HIDVST  027226RG
DON11C= 000100   	DV.NXD= 000001 G 	EF.TED= 000100 G 	E.RSS = 000014 G 	HISN    027120RG
DON11S= 000200   	DV.OFL= 000002 G 	EF.TMO= 000100 G 	E.TMO = 000007 G 	HORPS = 000016
DPCMN   021540R  	DV.OIR= 000004 G 	EF.TTY= 000004 G 	E.TTY = 000003 G 	HSPMSK= 000376
DPMSEP  021566R  	DV.SCN= 000010 G 	EF.WFM= 000400 G 	E.WFM = 000011 G 	HSPSPD  033210RG
DPSEC   021564R  	DV.URE= 000200 G 	EHSG  = 000006 G 	FC.CEF= 020000   	HSPTAB  033163RG
DPS4  = 040000   	DWNMS   013220R  	EHSM  = 000010 G 	FC.DIR= 040000   	HSPTLN= 000014
DQNXT   034032R  	DWNMSG  013206R  	EMGSTK  011562RG 	FC.FCO= 010000   	H.CSP = 000000 G
DRESET= 000100   	DWNMSZ= 000043   	EMTSTK  001116RG 	FC.WAC= 100000   	H.DSW = 000046 G
DRXCOM  013710R  	DXTSK   007502RG 	EMTTRP  013266RG 	FDVNM   030272R  	H.FCP = 000050 G
DRXRR   013722R  	DXWD1 = 000006   	EMYN  = 000002 G 	FDVNMF  030404R  	H.FOR = 000052 G
DR.DTE= 000011   	DXWD2 = 000004   	EM.DRO= 000020 G 	FDVNMM  030256R  	H.HSZ = 000002 G
DR.00 = 000000 G 	DXWD3 = 000002   	ENBXOF  026052RG 	FEHD  = ****** GX	H.IPC = 000076 G
DR.01 = 000001 G 	DXWRD1= 002000   	ENTELQ  031126R  	FELXFR  031164R  	H.IPS = 000074 G
DR.02 = 000002 G 	D$$H11= 000010   	EOLS  = 000400   	FERCHK  036730RG 	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   007442RG 	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
DTBUF   005504RG 	D.CDLS= 000004 G 	ERRDPE= 000010 G 	FLBYT = 000011   	H.LUT = 000130 G
DTCNT   005510RG 	D.CDL1= 000002 G 	ERREPE= 000002 G 	FLCT  = 000017   	H.OVL = 000054 G
DTCW2   005512RG 	D.CDMB= 000204 G 	ERRFME= 000006 G 	FLDVOT  027472RG 	H.TKVA= 000106 G
DTCW3   005514RG 	D.CDTE= 000202 G 	ERRPTO= 000005 G 	FNBYT = 000005   	IE.ABO= 177761
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 291-3
Symbol table

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

LPCSM = 000022 G 	N.PR  = 000010 G 	Q.DA  = 000000 G 	R.PB  = 000024 G 	STPLIN  026604RG
LPEVFG  006236RG 	OKPAL0  001412RG 	Q.DZ  = 000016 G 	R.PR  = 000010 G 	STRBF = 000002
LPEXPA= 175400 G 	OUTPT   035406R  	Q.D1  = 000006 G 	R.QSGC= 000015   	STRDAT  027226RG
LPEXPZ= 000020 G 	OUTPT3  035326R  	Q.IOAE= 000012   	R.QSPC= 000014   	STSTT   001326RG
LPHD  = ****** GX	PARLOA  020670R  	Q.IOEF= 000006   	R.QSPN= 000006   	STSWD   005610RG
LPHUNG  006242RG 	PARLOT  020742R  	Q.IOFN= 000002   	R.QSPR= 000012   	STSW0 = 000004 G
LPITH = 000006 G 	PARSAV  001022RG 	Q.IOLU= 000004   	R.QSTN= 000002   	STSW1 = 000006 G
LPMCB = 000020 G 	PB    = 000200 G 	Q.IOPL= 000014   	R.SB  = 000016 G 	STSW2   005066RG
LPRMA = 000040 G 	PERCLR= 001000   	Q.IOPR= 000007   	R.TD  = 000004 G 	STTYDN  034536R
LPRMC = 000044 G 	PHYS  = 100000   	Q.IOSB= 000010   	R.UI  = 000022 G 	STTYO   035132R
LPRMZ = 000042 G 	PIDENT= 000000   	Q.SI  = 000004 G 	SCD   = 000040   	STXAS = 000000 G
LPRTY = 000024 G 	PRB0  = 177566 G 	Q.SP  = 000006 G 	SETDEB  027570RG 	STXCS = 000000 G
LPSIZE= 000010 G 	PRB1  = 175616 G 	Q.ST  = 000004 G 	SETLIN  026356RG 	STXDX = 000000 G
LPSTBH  006246RG 	PRI7  = 000340 G 	Q.SZ  = 000020 G 	SETSPD  026376RG 	SWR   = 177570
LPSTBK  006250RG 	PRMBLK  023634R  	Q.TS  = 000002 G 	SEXCM   022506R  	SWSLLT= 100000
LPSTK = ****** GX	PRMEMN  001240RG 	RAMIS0= 010000   	SEXP0   022514R  	SY0PUD  011272RG
LPSTLN= 000030 G 	PROPNT= 000021   	RCVKLP  027530RG 	SEXP1   022574R  	S.BA  = 000012 G
LPSTS = 000000 G 	PROTBL  001244RG 	RESERV  012024R  	SEXP2   022476R  	S.DI  = 000011 G
LPTBL   006300RG 	PRS0  = 177564 G 	RETTOD  027434RG 	SEX97   022576R  	S.DL  = 000032 G
LPTBL2  006320RG 	PRS1  = 175614 G 	RFMAD0= 100000   	SF.EX = 000004 G 	S.DP  = 000010 G
LPTBL3  006340RG 	PRTOFF= 004000   	RFMAD1= 040000   	SF.FX = 000002 G 	S.FW  = 000006 G
LPTHD = 000004 G 	PRVCM   022114R  	RFMAD2= 020000   	SF.IR = 040000 G 	S.LZ  = 000014 G
LPTPD   007702RG 	PRVTSK= 007502RG 	RFMAD3= 010000   	SF.PT = 000001 G 	S.PC  = 000020 G
LPTSK   007302RG 	PR0   = 000000   	RF.XR = 000002 G 	SF.ST = 100000 G 	S.RB  = 000026 G
LPUNIT  006234RG 	PR1   = 000040   	RM    = 000010   	SF.TA = 000001 G 	S.RF  = 000024 G
LPUTBL  006360RG 	PR2   = 000100   	RMBYT = 000004   	SKX     023664R  	S.SP  = 000022 G
LP0PUD  011152RG 	PR3   = 000140   	RPBUF   005532RG 	SNDALL  027606RG 	S.SS  = 000030 G
LSPCHR= 000000   	PR4   = 000200   	RPCNT   005536RG 	SNDBEL  037134RG 	S.STBK= 000012
LSPSPD  033177RG 	PR5   = 000240   	RPCW2   005542RG 	SNDMSG  013264RG 	S.SZ  = 000036 G
LSPTAB  033152RG 	PR6   = 000300   	RPHD  = ****** GX	SNDSTS  032344R  	S.TD  = 000004 G
LSPTLN= 000011   	PR7   = 000340 G 	RPPEN   010332RG 	SPDPAR  033224RG 	S.TN  = 000000 G
LSP.IG= 000200   	PS    = 177776 G 	RPRNA   005530RG 	SPDTBL  025244RG 	S.TZ  = 000016 G
LSP.SP= 000017   	PSWW1 = 000005   	RPRTC   005526RG 	SPDTBZ= 000020   	S0.ABR= 100000 G
L$$P20= 000002   	PSWW10= 000014   	RPSTK = ****** GX	SPSAV   001020RG 	S0.CON= 040000 G
L.DT0 = 000003 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   033134R  	STATS = 000000   	S0.SPD= 037700 G
MEBUF = 000012   	PSWW3 = 000007   	RQKLR   033116R  	STATUS= 000022   	S2.CHR= 000377 G
MECNT = 000010   	PSWW4 = 000010   	RQMCR   033100R  	STBXFR  032476R  	S2.CNT= 001400 G
MF2NUM= 000004 G 	PSWW5 = 000011   	RQSPB   024522R  	STCM    046604R  	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= 000000   	STDDTP  006536RG 	S2.ENB= 010000 G
M.PARQ= 000002 G 	PWRXSP  001032RG 	RSX$$F= 000101   	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= 000016   	STDINS  006676RG 	S2.SSZ= 001000 G
NTKXEN  012772R  	QPRDTC  025604RG 	RTDVST  027226RG 	STDLPT  006736RG 	TBIT  = 000020 G
NTKXEP  012776R  	QPRDTE  025610RG 	RTNTOD  027202RG 	STDQPR  007076RG 	TEDXIT  031342R
NTKXSP  012752RG 	QPRDTF  027466R  	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  027226RG 	TF.OU = 000002 G
NULTSK  007542RG 	QPROMS  020140R  	R.AT  = 000006 G 	STELIG  032110R  	THRED = 000000 G
NUPE  = 000002   	QPRTPD  007742RG 	R.DP  = 000011 G 	STELIX  032132R  	TMOCNT  002670RG
N.BP  = 000002 G 	QPRTSK  007502RG 	R.FC  = 000014 G 	STIND2  030710R  	TNAD1 = 000010
N.FP  = 000000 G 	QSIZE = 000023   	R.FN  = 000013 G 	STLN    046640R  	TNAD2 = 000012
N.OVPT= 000054 G 	Q.AK  = 000012 G 	R.LU  = 000012 G 	STNXT   034722R  	TN.EMT= 000012 G
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 291-5
Symbol table

TN.LRF= 000040 G 	TTINPA  037230R  	T.RAP4= 000000 G 	U.C1  = 000004 G 	W.VBN   000006
TN.TRP= 000014 G 	TTINPB  037430R  	T.RB  = 000016 G 	U.C2  = 000006 G 	W.WISZ  000007
TOBM  = 000004   	TTINX   034402R  	T.RF  = 000014 G 	U.C3  = 000010 G 	XOFF    026730RG
TOIP  = 000002   	TTOUTR  035226R  	T.SZ  = 000020 G 	U.C4  = 000012 G 	XON     026744RG
TOIT  = 000001   	TTOUTX  035220R  	T10AD = 000020   	U.DACP= 000036 G 	X.X94   016100R
TOITDN  031330R  	TTPEN   010262RG 	T11AD = 000022   	U.DN  = 000000 G 	X.X95   016102R
TOXQIP  001401RG 	TTPKT   002740RG 	T11BC = 000016   	U.FB  = 000003 G 	X8X97   044374RG
TO10  = 000200   	TTSAV   040402R  	U     = 000040   	U.FO  = 000043 G 	X9X96   016156R
TO10AD= 174420   	TTSTCH  037254R  	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   033060R  	UC.ETB= 000100 G 	U.LBN = 000046 G 	$CD11 = 000001
TO10DB= 000400   	TTYDNE  035514R  	UC.F11= 040000 G 	U.PC  = 000030 G 	$DBDTE= 000001
TO10DN= 100000   	TTYDNX  035560R  	UC.INB= 000400 G 	U.PR  = 000042 G 	$DHINP  036370RG
TO10DT= 174424   	TTYEND= 005054RG 	UC.ISP= 002000 G 	U.RB  = 000024 G 	$DHOUT  034412RG
TO10ER= 020000   	TTYEXP= 000002 G 	UC.MNT= 100000 G 	U.RF  = 000022 G 	$DH11 = 000001
TO10PK  005614RG 	TTYHD   032544RG 	UC.PSE= 010000 G 	U.RP  = 000016 G 	$DIV  = ****** GX
TO10Q   001334RG 	TTYSP   033024RG 	UC.REC= 000001 G 	U.SZ  = 000050 G 	$DMINT  040756RG
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 	$DTA  = 000001
TO11BC= 174416   	TT.CRW= 000004 G 	UF.OFL= 000040 G 	VC.BMW= 000002   	$DTE  = 000001
TO11BM= 020000   	TT.CTY= 000002 G 	UF.RD = 000040 G 	VC.IFW= 000001   	$DTEOF  021106RG
TO11BS  001320RG 	TT.FEC= 014000 G 	UF.RH = 000200 G 	V.FCB   000006   	$DTEON  021114RG
TO11DB= 004000   	TT.FEI= 004000 G 	UF.TL = 000100 G 	V.FFNU  000055   	$DTINT= ****** GX
TO11DN= 000200   	TT.IGN= 010000 G 	UNASG1= 000032   	V.FIEX  000025   	$EXHSG  021614RG
TO11DT= 174426   	TT.LSP= 020000 G 	UNASG2= 000033   	V.FMAX  000016   	$EXHSM  021622RG
TO11DV  001306RG 	TT.NSA= 000400 G 	UNASG3= 000034   	V.FPRO  000030   	$EXMYG  021570RG
TO11ER= 000002   	TT.OUT= 000001 G 	UNASG4= 000035   	V.FRBK  000034   	$EXMYN  021600RG
TO11FN  001304RG 	TT.RIP= 002000 G 	UNASG5= 000036   	V.IBLB  000012   	$FE   = 000001
TO11FW  001312RG 	TT.RMT= 000100 G 	UNASG6= 000037   	V.IBSZ  000013   	$F11  = 000001
TO11GW  001314RG 	TT.RSI= 020000 G 	UNRGFN  026034RG 	V.IFWI  000002   	$KLDFC  022010RG
TO11HD  001302RG 	TT.SIP= 001000 G 	UPAR0 = 177640   	V.LABL  000040   	$KLDFR  021630RG
TO11NP  001300RG 	TT.SND= 140000 G 	UPAR1 = 177642   	V.LGTH  000056   	$KLDFW  021770RG
TO11Q   001342RG 	TT.SNI= 040000 G 	UPAR2 = 177644   	V.LRUC  000035   	$KLDFX  021746RG
TO11QC= 001333RG 	TT.XEN= 000020 G 	UPAR3 = 177646   	V.SBCL  000021   	$LPINT= ****** GX
TO11SP  001310RG 	TT.XOF= 000200 G 	UPAR4 = 177650   	V.SBLB  000024   	$LP20 = 000001
TRPASV  001120RG 	T.BA  = 000004 G 	UPAR5 = 177652   	V.SBSZ  000022   	$MUL  = ****** GX
TRPXIT  011726R  	T.FW  = 000010 G 	UPAR6 = 177654   	V.STAT  000054   	$PRVDP  022066RG
TRP4    011754R  	T.HBCT= 000002 G 	UPAR7 = 177656   	V.STD   000004   	$PRVEX  022102RG
TS.EXT= 000026 G 	T.HCAD= 000004 G 	UPDR0 = 177600   	V.TRCT  000000   	$RP04 = 000001
TS.LRF= 000006 G 	T.HCBC= 000006 G 	UPDR1 = 177602   	V.WISZ  000020   	$RWDRG  022136RG
TS.LRQ= 000002 G 	T.HFCN= 000007 G 	UPDR2 = 177604   	WEP   = 000010   	$TOP10= 000001
TS.RUN= 000010 G 	T.HHDS= 000010 G 	UPDR3 = 177606   	WFXSET  014212R  	$TTINP  037210RG
TS.SUS= 000012 G 	T.HP  = 000012 G 	UPDR4 = 177610   	WI.BPS= 100000   	$TTOUT  035064RG
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   037716R  	T.RAPM= 000002 G 	U.AF  = 000014 G 	W.FCB   000002   	$$$UNI= 000002
TTINI   033244RG 	T.RAPR= 000010 G 	U.AR  = 000034 G 	W.RTRV  000012   	.ABCNT  002606RG
TTINO   034406R  	T.RAPT= 000014 G 	U.CH  = 000032 G 	W.STD   000004   	.ABFLG  002610RG
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 291-6
Symbol table

.ACKAL  001164RG 	.DLXON  043216RG 	.EXEND  001002RG 	.LDCK1= 046000   	.RHPB   005550RG
.ATLLH  007136RG 	.DMHUP  041266RG 	.FEACK= ****** GX	.LDCK2= 047000   	.RHPD   011366RG
.BGBST= 076000 G 	.DMTMO  042326RG 	.FEACT  005716RG 	.LDDIS= 045000   	.RHSN   005552RG
.BGBUF  001422RG 	.DMUHU  041316RG 	.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   044310RG 	.DQPSZ= 000010 G 	.IBFOK  005064RG 	.MNITS= 000002   	.RP5PE  010642RG
.CEFN3  044314RG 	.DRBEL  031346RG 	.INHDM  002604RG 	.MNTNX= 000003   	.RP6PE  010712RG
.CKASS  001050RG 	.DRLTC= 015000   	.INICL= 070000   	.MNT10= 000001   	.RP7PE  010762RG
.CKDEL  044376RG 	.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  030432RG 	.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  027614RG
.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  040466RG
.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  031670RG
.DATE   001140RG 	.D.REF  022540RG 	.KLNPW  001226RG 	.POLND  002336RG 	.STELI  031756RG
.DATE3  001140RG 	.D.REQ  024310RG 	.KLNSW  001234RG 	.POLST  001436RG 	.STPCL= 000000
.DAY    001144RG 	.D.ROE  024106RG 	.KLNTD  001220RG 	.PRADR  001362RG 	.STPDM  041346RG
.DBINT= ****** GX	.D.ROS  024106RG 	.KLNTT  001216RG 	.PRDCT  001370RG 	.STRCL= 001000
.DHSPA  040552RG 	.D.SAR  023654RG 	.KLRLD  001172RG 	.PRDTE  001366RG 	.STTNF  032176RG
.DHSPC  040656R  	.D.SEF  022500RG 	.KPAC   001416RG 	.PRPSE  001400RG 	.STTNQ  032170RG
.DHSPD  040704RG 	.D.SEN  023640RG 	.KPALV  032134RG 	.PRSTA  001364RG 	.STTYD  041202RG
.DHSPF  040644RG 	.D.STV  024254RG 	.KW11S  036226RG 	.PUDBA  010262RG 	.STTYH  041216RG
.DHSPR  040572RG 	.D.WFL  022656RG 	.LCEND= 011374RG 	.PUDEA  011342RG 	.SYUIC  001156RG
.DHSPZ  040530RG 	.D.WFO  022602RG 	.LCRDL= 052000   	.PWRDN  020164RG 	.S2IDC  005056RG
.DHSTO  035024RG 	.D.WFS  022600RG 	.LCRDR= 051000   	.RCRM1= 147000   	.S2ITP  005060RG
.DHTMO  042020RG 	.D.WSE  022764RG 	.LCRM1= 057000   	.RCRM2= 146000   	.TENDN  030554RG
.DHXOF  043030RG 	.EBPEC  001376RG 	.LCRM2= 056000   	.RCRM3= 145000   	.TFXOF  044232RG
.DHXON  043152RG 	.EBPEQ  001374RG 	.LCRM3= 055000   	.RCRM4= 144000   	.TFXON  044222RG
.DLHUP  041366RG 	.EBRTY  001373RG 	.LCRM4= 054000   	.RCSPF= 141000   	.TICK   025012RG
.DLINT  037534RG 	.EIOJA= 067000   	.LCRM5= 053000   	.RDJ14= 134000   	.TICKS  001134RG
.DLSTO  035200RG 	.ELEDN  031042RG 	.LDAR = 077000   	.RDJ71= 135000   	.TKPS   001154RG
.DLTMO  041510RG 	.ERRCD  011354RG 	.LDBRL= 043000   	.RDMAB= 133000   	.TKTN   001124RG
.DLXOF  043036RG 	.ERRPC  011346RG 	.LDBRR= 042000   	.REQS   015276RG 	.TKTN.  013170R
SCOMM	- COMMON DATA AND SUBRO	MACRO V05.04  Monday 16-May-88 15:45  Page 291-7
Symbol table

.TOD.   013152R  	.TTP11  002640RG 	.YEAR   001142RG 	..DTP2  050234RG 	..STCH  046554RG
.TPDBA  007602RG 	.TTQDS  043402RG 	..AKCR= ****** GX	..DTSP  050216RG 	..STCR= ****** GX
.TPDEA  010062RG 	.TTQEN  043412RG 	..AKLP= ****** GX	..ENB0  045530RG 	..STFC  046704RG
.TTACK  035230RG 	.TTRNG  037702R  	..ALCB  045644RG 	..ERLG  044440RG 	..STIN  047074RG
.TTBTW  044032RG 	.TTRST  043232RG 	..ALC2  045660RG 	..FSTD  045564RG 	..STLP= ****** GX
.TTCHK  043322RG 	.TTSCW  037706R  	..ALOW  046134RG 	..INTX  015062RG 	..STPT  046370RG
.TTDIS  043510RG 	.TTSTP  043046RG 	..BLXI  050310RG 	..IODN  044540RG 	..STQ   047274RG
.TTELB  002666RG 	.TTSW2  044202RG 	..BLXO  050322RG 	..IPRI  045350RG 	..STTY  046154RG
.TTELC  002664RG 	.TTS2F  005054RG 	..DECB  046000RG 	..NADD  045424RG 	..SWED  050116RG
.TTELQ  002662RG 	.TTXOF  042752RG 	..DECN  045774RG 	..NDEL  045310RG 	..VTOL  050376RG
.TTENB  043666RG 	.TTXON  043074RG 	..DEC2  045770RG 	..PICK  045466RG 	..VVLL  050560RG
.TTERL  042624RG 	.VCLUN  016104RG 	..DQRN  044660RG 	..SACK  046620RG 	..VXFR  050302RG
.TTFDI  042556RG 	.VERNO  001036RG 	..DSEV  045254RG 	..SEFN  045202RG 	..WFED  047444RG
.TTICK  043346RG 	.WRMBX= 071000   	..DTP1  050264RG 	..SPLP= ****** GX	...GBL= 000000
.TTIXC  043452RG 	.X.02   023662R

. ABS.	000056    000	(RW,I,GBL,ABS,OVR)
      	050754    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 4
Work  file writes: 6
Size of work file: 15448 Words  ( 61 Pages)
Size of core pool: 19292 Words  ( 74 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:08:08.56
,[100,20]RSXTOPS10.LST/-SP/CRF=[100,30]RSXTOPS10.TMP
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

ABCHAR	  011364 RG	#41-1734   *214-11623 
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-9625   193-10662 
                        *193-10663 *210-11290 *217-11869 *218-11911 *224-12290 *231-12603  255-13968  258-14095 *258-14101 
                        *260-14206 *260-14261  261-14319 
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-14256 
A.HA  	= 000012  G	#53-2429    72-3314    74-3451    74-3466    78-3887    139-7852   288-15976 
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-10721 
BC.BTP	= 000024  G	#146-8296   162-8786  
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-9640  
BC.FOD	= 000013  G	#146-8287  
BC.HAD	= 000002  G	#146-8278   162-8756  
BC.HDS	= 000007  G	#146-8283   258-14090 
BC.HSN	= 000040  G	#146-8308   162-8778  
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-15053 
BC.NDM	= 000037  G	#146-8307  
BC.NSA	= 000032  G	#146-8302  
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF   04.00 

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-9331   276-15088 
BC.SDS	= 000006  G	#146-8282  
BC.SKP	= 000033  G	#146-8303   162-8768  
BC.SLA	= 000023  G	#146-8295   195-10717 
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-12469 
BC.THU	= 000016  G	#146-8290   227-12475 
BC.XEN	= 000034  G	#146-8304  
BC.XOF	= 000020  G	#146-8292  
BC.XON	= 000021  G	#146-8293  
BELADR	  037206 RG	 215-11733 #215-11741 
BITTBL	  044250 RG	 206-11123  215-11738 #254-13887  255-13960  261-14321 
BIT0  	= 000001	#7-288      41-1699   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                         190-10511 #253-13880 
BIT1  	= 000002	#7-288      41-1700    41-1732   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  
                        #190-10386  190-10510 #253-13880 
BIT10 	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10482 
                         190-10504 #253-13880 
BIT11 	= 004000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10481 
                         190-10503 #253-13880 
BIT12 	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10480 
                         190-10502 #253-13880 
BIT13 	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10479 
                         190-10501  190-10516  190-10524 #253-13880 
BIT14 	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240   157-8623  #176-9383  #190-10386 
                         190-10478  190-10500 #253-13880 
BIT15 	= 100000	#7-288     #48-2204   #80-4024    81-4053   #82-4348   #86-4617   #145-8240   162-8778  #176-9383  
                        #190-10386  190-10477  190-10499 #253-13880  258-14090 
BIT2  	= 000004	#7-288      41-1701   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                         190-10509 #253-13880 
BIT3  	= 000010	#7-288      41-1702   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                         190-10508 #253-13880 
BIT4  	= 000020	#7-288      41-1703   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                         190-10512 #253-13880 
BIT5  	= 000040	#7-288      41-1704   #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                         190-10507 #253-13880 
BIT6  	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10506 
                         190-10520 #253-13880 
BIT7  	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10505 
                        #253-13880 
BIT8  	= 000400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10484 
                         190-10512 #253-13880 
BIT9  	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  190-10483 
                         190-10484  190-10512 #253-13880 
BLDPKT	  044130 R	 247-13670  247-13670 #248-13713 
BLKTT 	  005654 RG	#33-1121   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

BLXCOM	  050330 R	 287-15872 #287-15878 
BLXPLP	  050360 R	 287-15901 #287-15912  287-15914 
BLXRTN	  050370 R	#287-15922 
BPARER	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
                         280-15428 
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-10862  200-10899  210-11273 *210-11275 
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-9383  #190-10386 #253-13880 
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-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                         66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883   
                         66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   
                         66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   #66-2883    66-2883    66-2883   
                        #66-2883    66-2883    66-2883   #66-2883   
CHNPNT	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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	  041664 R	 232-12658  232-12658  232-12670  232-12670 #232-12713 
CLRDEB	  027600 RG	 148-8416  #169-8957  
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-10863  219-12040 
CNUPE 	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF   04.00 

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	  030120 RG	 66-2847    66-2847    170-9033   170-9033  #171-9131   273-14873  273-14873 
CPUERR	  021102 R	 87-4668   #87-4694   
CPUNUM	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    90-4815   #145-8240  #176-9383  #190-10386 
                        #253-13880 
CPYRGT	  011374 RG	#41-1742   
CRADR 	  002736 RG	#18-930    *198-10864  199-10883  200-10898  200-10900  210-11277 *210-11279 *210-11288 *212-11443 
                        *212-11455 
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-10412  200-10901  212-11379  212-11388  212-11399 
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-10411  200-10897  201-10918  201-10924  210-11284 
CR$BO5	= 044176 RG	#248-13729 
CR$B03	= 047372 RG	#279-15297 
CR$CBR	= 020344 RG	#84-4449   
CR$DTB	= 031114 RG	#179-9608  
CR$DTD	= 012020 RG	#43-1876   
CR$DTF	= 030600 RG	#178-9495  
CR$ETE	= 030512 RG	#177-9443  
CR$FTA	= 011722 RG	#43-1845   
CR$IAS	= 015272 RG	#75-3653   
CR$ILF	= 026036 RG	#149-8428  
CR$ILQ	= 031570 RG	#180-9794  
CR$LRF	= 014256 RG	#71-3304   
CR$MPE	= 012064 RG	#43-1893   
CR$PT1	= 031206 RG	#179-9637  
CR$PT2	= 031224 RG	#179-9642  
CR$PT3	= 031534 RG	#180-9774  
CR$PT4	= 031640 RG	#180-9805  
CR$RES	= 012026 RG	#43-1879   
CR$TBT	= 012034 RG	#43-1882   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

CR$TET	= 030474 RG	#177-9437  
CR$T04	= 011776 RG	#43-1869   
CR$UIE	= 031446 RG	#180-9737  
CSDONE	  015042 R	 74-3435   #74-3525   
CS.EXP	= 177670	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
CTLO  	= 000040	#190-10414  198-10869  201-10916  212-11404  219-11960  219-11961 
CTRLC 	  033044 R	#191-10549  219-12067 
CTRLU 	  033050 R	#191-10551  219-12038 
CTRLZ 	  033054 R	#191-10553  219-12058 
CTYPTR	  002642 RG	#17-886     162-8757   198-10846  198-10865  209-11212  209-11219  210-11242  210-11260  217-11859 
                         219-11954 
CTYSTS	  002672 RG	#18-922     198-10866  210-11261 *212-11422  212-11427  212-11442  219-11955 
CURBF 	= 000006	#190-10398 *200-10898  219-12002 *219-12003 *219-12006  219-12018 *219-12020  219-12021 *219-12041 
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-10537 
C.HCRT	= 000015  G	#190-10532  210-11283  212-11355  219-11989 
C.HEOF	= 000032  G	#190-10535  219-11987 
C.HESC	= 000033  G	#190-10536  190-10537  219-11985 
C.HFFD	= 000014  G	#190-10531 
C.HLFD	= 000012  G	#190-10529  211-11325  212-11358 
C.HPAR	= 000200  G	#190-10539  250-13786 
C.HSPC	= 000040  G	#190-10538 
C.HTAB	= 000011  G	#190-10528  212-11360 
C.HVTB	= 000013  G	#190-10530 
C.HXOF	= 000023  G	#190-10534  217-11842  250-13786 
C.HXON	= 000021  G	#190-10533  217-11838  250-13781 
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-14002 
C1    	= 140010	#40-1591    40-1641    40-1645    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-15408  280-15411 *280-15454  280-15457 
DAG2  	= 000032	#3-128     *84-4455   *101-5338  *280-15445 
DAG3  	= 000036	#3-126     *178-9554  *184-10037 
DBLDON	  031652 R	 180-9755   180-9790  #180-9811  
DBLEPP	  031452 R	 180-9725  #180-9742  
DBLEPX	  031456 R	 180-9720  #180-9744  
DBLHDR	  031546 R	 180-9771  #180-9788  
DBLPWR	  031506 R	 180-9736  #180-9760  
DBLRLD	  031462 R	 180-9734  #180-9750  
DBLXFR	  031516 R	 180-9732  #180-9769  
DBLXIT	  031664 R	 180-9762   180-9781   180-9809  #180-9814  
DCOMST	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    97-5154    97-5160    97-5186    97-5194   
                        #145-8240  #176-9383  #190-10386 #253-13880 
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  
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

DEAND3	  026126 R	 150-8439  #152-8473  
DEANOD	  027462 R	 161-8738   162-8788   163-8802   164-8833   165-8876   166-8892  #166-8901   167-8923   168-8935  
                         168-8943   169-8955   169-8959   175-9323  
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-9383  
                         178-9547   183-9986   184-10040  185-10077 #190-10386 #253-13880  282-15579 
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-9383  #190-10386 #253-13880 
DEXCOM	  013674 R	#67-3100   
DEXDON	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
                         280-15401 
DEXST 	  001352 RG	#12-728    *97-5158   *97-5162   *280-15396 *280-15403 
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-9383  #190-10386 #253-13880 
DEXWD2	= 174404	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DEXWD3	= 174402	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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-13974 
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-9383  #190-10386 #253-13880 
DF.DMG	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.DMN	= 000007	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.DOR	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.EHG	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386  191-10559 
                        #253-13880 
DF.EHM	= 000011	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.EMG	= 000005	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

DF.EMN	= 000006	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.KLR	= 000012	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.KLW	= 000013	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.KLX	= 000014	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.OFF	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.ON 	= 000003	#7-288     #48-2204   #80-4024    81-4276   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                        #253-13880 
DF.PDP	= 000016	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DF.PEX	= 000015	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DHBUF 	= 000020	#190-10404 *212-11422  212-11427 
DHCNT 	= 000200  G	#28-1020    39-1538   
DHERLG	  042306 R	 232-12747  232-12747  233-12850  233-12850 #233-12942  234-13022  234-13022 
DHISTQ	  036424 R	 213-11506  213-11512  213-11514  213-11518  213-11520 #214-11588  216-11772 
DHSAV 	  040344 R	 202-10943  213-11481  214-11579 #220-12112 
DHSTSV	  002660 RG	#17-901    *214-11582  214-11604 
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-9038   172-9171   210-11238  210-11302  212-11420 
                         220-12123  221-12177  233-12812 
DHTMP 	  002654 RG	#17-897    *202-10942 *214-11578  220-12119 
DH.FER	= 020000  G	#190-10524  214-11675 
DIAG1 	= 174430	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DIAG2 	= 174432	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DIAG3 	= 174436	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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-9383  #190-10386 #253-13880 
DIRDPT	  013446 R	 67-2985   #67-2987    67-3025   
DIRMAX	= 000102	 67-2982   #67-3025   
DIROK 	  013442 R	 67-2983   #67-2985   
DIV216	  045264 RG	 114-6042   114-6042   255-13957  255-13957  261-14309  261-14309 #263-14363 
DLCNT 	= 000005  G	#20-982     39-1534    153-8492   154-8527   157-8607  
DLECNT	= 000004  G	#20-983     232-12665 
DLETBL	  003014 RG	 17-890    #20-977     20-983     232-12664 
DLHUPX	  041454 R	 228-12516 #231-12612 
DLTBL 	  003004 RG	 17-887    #20-975     20-982     39-1534    170-9021   232-12655 
DLTMP 	  002656 RG	#17-899    *207-11133 *216-11766  220-12136 
DLYCNT	= 174400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DL.CAR	= 010000  G	#190-10502  218-11916  232-12674 
DL.CTS	= 020000  G	#190-10501 
DL.DEN	= 000040  G	#190-10507  218-11901  231-12610  232-12743  232-12759 
DL.DSC	= 100000  G	#190-10499 
DL.DTR	= 000002  G	#190-10510  218-11901  218-11928  232-12678 
DL.FER	= 020000  G	#190-10516  216-11774 
DL.RAC	= 004000  G	#190-10503 
DL.RDE	= 000001  G	#190-10511 
DL.RDN	= 000200  G	#190-10505 
DL.REN	= 000100  G	#190-10506  218-11921  231-12610  232-12726  232-12754  245-13555  246-13612 
DL.RNG	= 040000  G	#190-10500  218-11899 
DL.RTS	= 000004  G	#190-10509  218-11901  218-11918  232-12676  232-12678 
DL.SRD	= 002000  G	#190-10504 
DL.STD	= 000010  G	#190-10508 
DL.UNA	= 001420  G	#190-10512 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

DL.XEN	= 000100  G	#190-10520  208-11179  212-11414  212-11434  232-12732  232-12756 
DMTBE 	= 003004 RG	#19-953     234-12983 
DMTBL 	  002742 RG	#19-943     172-9170   226-12376  226-12384  234-12976 
DMTMP 	  002652 RG	#17-895    *226-12370  226-12372 
DMTNXM	  042266 R	 233-12815 #233-12927  233-12930 
DMYN  	= 000004  G	#11-652    *90-4860   *90-4861    94-5043    178-9546   184-10038  185-10076 
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-9383   178-9490  #190-10386 
                        #253-13880 
DON10S	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DON11C	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   179-9595  #190-10386 
                        #253-13880 
DON11S	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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-9383  #190-10386 #253-13880 
DQNXT 	  034032 R	#198-10836  199-10881  199-10888 
DRESET	= 000100	#7-288     #48-2204   #80-4024   #82-4348    84-4455   #86-4617    101-5338  #145-8240  #176-9383  
                        #190-10386 #253-13880  280-15445 
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-9383  #190-10386 
                         191-10559 #253-13880 
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-9383  #190-10386 #253-13880 
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-9383  #190-10386 #253-13880  280-15411 
DS05  	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DS06  	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
                         280-15457 
DTBUF 	  005504 RG	#30-1046   
DTCNT 	  005510 RG	#30-1048   
DTCW2 	  005512 RG	#30-1050   
DTCW3 	  005514 RG	#30-1052   
DTEADR	  001276 RG	#12-684     178-9509  *178-9560  
DTECMD	= 000451	#7-288     #48-2204   #80-4024    81-4101    81-4178   #82-4348   #86-4617   #145-8240  #176-9383  
                        #190-10386 #253-13880 
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-9383  
                        #190-10386 #253-13880 
DTEF11	= 000450	#7-288     #48-2204   #80-4024    81-4153   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                        #253-13880 
DTEHD 	  025304 RG	 36-1332    37-1399    38-1473   #147-8346  
DTEMSK	  001274 RG	#12-682     178-9509  *178-9559  
DTEMTD	= 000455	#7-288     #48-2204   #80-4024    81-4203   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                        #253-13880 
DTEMTI	= 000456	#7-288     #48-2204   #80-4024    81-4142    81-4159   #82-4348   #86-4617   #145-8240  #176-9383  
                        #190-10386 #253-13880 
DTENM 	= 000000	#11-648    
DTESNP	  047762 R	 280-15419  280-15419  280-15435  280-15435  280-15472  280-15472 #281-15512 
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-9625  
DTEXIT	  030534 R	 177-9447  #177-9451   180-9745  
DTHD  	= ******  GX	 36-1341    37-1431    38-1498   
DTRNA 	  005502 RG	#30-1044   
DTRTC 	  005500 RG	#30-1042   
DTSTK 	= ******  GX	 37-1431   
DTTPD 	  007762 RG	 36-1341   #38-1497   
DTTSK 	  007402 RG	 37-1423   #37-1430    37-1432    40-1641    40-1645   
DT0PEN	  011032 RG	 36-1355   #40-1640    40-1641    40-1680   
DT1PEN	  011102 RG	#40-1644    40-1645   
DUPE  	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DURE  	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
DVCH  	= 110220	#40-1587    40-1597    40-1603    40-1608    40-1613    40-1618    40-1623    40-1628    40-1633   
                         40-1641    40-1645    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-12945 
DV.LOG	= 000100  G	#60-2670    214-11722  233-12945  281-15538 
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-11722  280-15474  281-15538 
DWNMS 	  013220 R	 66-2875   #66-2877    66-2887   
DWNMSG	  013206 R	 66-2846   #66-2874   
DWNMSZ	= 000043	 66-2875    66-2875   #66-2887   
DXTSK 	  007502 RG	 37-1439   #37-1450   
DXWD1 	= 000006	#3-135     *81-4151   *81-4213    97-5169   *97-5198   *178-9536   180-9724  *184-10029 *185-10072 
                         282-15590 *282-15599 
DXWD2 	= 000004	#3-136      81-4146   *81-4150    81-4214   *81-4215   *81-4219   *81-4223    97-5168   *97-5197   
                        *178-9537   180-9723  *184-10030 *185-10073  282-15589 *282-15598 
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-9542   180-9722   180-9802   182-9922   182-9935  *184-10034 *185-10074  282-15588 *282-15597 
DXWRD1	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
D$$H11	= 000010	#1-44       8-427     
D.AT  	= 000000  G	#55-2500   
D.CCDR	= 000006  G	#39-1548   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF   04.00 

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-9303   197-10820  209-11225  227-12483  275-15049 
D.CDL1	= 000002  G	#39-1532   
D.CDMB	= 000204  G	#39-1570   
D.CDTE	= 000202  G	#39-1568    197-10822 
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-10715 
D.CRJP	= 000203  G	#39-1569    162-8780   197-10825 
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-9383  #190-10386 #253-13880 
EBSEL 	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
EBUSPC	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
EBUSPS	= 000004	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
ECHOB 	  035644 R	 210-11280  210-11285  211-11326  211-11335 #212-11351  219-12082 
EDONES	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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-11864 
EF.DTE	= 000001  G	#49-2278   
EF.FCP	= 001000  G	#49-2322    81-4098   
EF.IOD	= 000020  G	#49-2286    191-10557  198-10832  210-11290 
EF.NIR	= 000010  G	#49-2284    76-3767    124-6853   191-10557  260-14206  260-14261 
EF.PFR	= 004000  G	 43-1874   #49-2318    81-4241    83-4388    85-4539    180-9761  
EF.PR1	= 100000  G	#49-2310    283-15628  285-15676 
EF.PR2	= 020000  G	#49-2314    217-11876  283-15628  284-15655 
EF.RKH	= 002000  G	#49-2298    191-10557  193-10675  231-12603 
EF.RKP	= 010000  G	#49-2316    168-8938   168-8942  
EF.RKR	= 001000  G	#49-2296    191-10557  193-10671  218-11911 
EF.RQM	= 000200  G	#49-2292    191-10557  193-10666  217-11869 
EF.RSS	= 004000  G	#49-2300    191-10557  193-10679  224-12290 
EF.SND	= 100000  G	#49-2305   
EF.TED	= 000100  G	#146-8265   146-8315   179-9625  
EF.TMO	= 000100  G	 15-835    #49-2290    191-10557  194-10693  196-10767 
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-9717   180-9798   182-9918  
EIS   	= ******	 287-15902  287-15907 
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   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF   04.00 

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	  031126 R	#179-9616   179-9660  
EOLS  	= 000400	#190-10413  200-10897  201-10918  211-11316  219-12007  219-12069  219-12078 
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-9383  #190-10386 #253-13880 
EQSZ  	  001340 RG	#12-721    *179-9664  *180-9802   180-9803   181-9861  *181-9877  
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-9383  #190-10386 #253-13880 
ERR10S	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
ERR11C	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
ERR11S	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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-14342 
EXCMN 	  021574 R	#92-4974    93-5010    95-5079    96-5113   
EXKAL 	  033066 R	#191-10558  196-10773 
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-8850   167-8920   174-9245  
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-8847  
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-8848   165-8851   166-8890   168-8933   174-9246  
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-15294 
E.RKH 	= 000013  G	#49-2299   
E.RKR 	= 000012  G	#49-2297   
E.RQM 	= 000010  G	#49-2293   
E.RSS 	= 000014  G	#49-2301   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

E.TMO 	= 000007  G	#49-2291   
E.TTY 	= 000003  G	#49-2283   
E.WFM 	= 000011  G	#49-2295   
FDVNM 	  030272 R	 164-8832   164-8832   165-8868   165-8868  #175-9279  
FDVNMF	  030404 R	 173-9210  #175-9320  
FDVNMM	  030256 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-8914   167-8914  #174-9244  
FEHD  	= ******  GX	 36-1336    37-1439    38-1477   
FELXFR	  031164 R	 179-9612  #179-9632  
FERCHK	  036730 RG	 214-11606  214-11608  214-11622 #214-11674 
FESTK 	= ******  GX	 37-1439   
FETBL 	  005572 RG	#33-1097    39-1556   
FETPD 	  007642 RG	 36-1336   #38-1476   
FETSK 	  007442 RG	 37-1431   #37-1438    37-1440    40-1670   *81-4053   
FE0PUD	  011222 RG	#40-1669    40-1670   
FLBT  	= 000001	#190-10417 
FLBYT 	= 000011	#190-10400  211-11342 *212-11369 *212-11392 
FLCT  	= 000017	#190-10416  201-10918  210-11262 
FLDVOT	  027472 RG	 148-8396  #167-8913  
FNBYT 	= 000005	#190-10397 *219-12048 *219-12056 *219-12065 *219-12076 
FNDDM 	  030174 R	 153-8494   153-8494   154-8529   154-8529   157-8618   157-8618  #172-9168  
FNDSPD	  030226 R	 157-8585   157-8585   157-8590   157-8590  #173-9201  
FORPRO	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617    90-4821    90-4862    90-4868   #145-8240  
                        #176-9383   178-9545   180-9716   180-9797   182-9917   184-10039  185-10075 #190-10386 #253-13880 
FW    	= 000300	#40-1589    40-1597    40-1603    40-1608    40-1613    40-1618    40-1623    40-1628    40-1633   
                         40-1641    40-1645   
F11TPD	  010022 RG	 36-1355   #38-1512    43-1843    71-3302   
GENTPD	  010042 RG	#38-1516   
GETBUF	  032420 R	 181-9863   181-9863   182-9924   182-9924  #186-10112 
HANGUP	  026176 RG	 148-8399  #154-8505  
HDR64 	= ******	 72-3315    74-3452    74-3467    78-3888    141-7996   260-14248 
HIBYTE	= 177400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
HICTS 	  026766 RG	 148-8386  #162-8749  
HIDVST	  027226 RG	 148-8392  #164-8816  
HISN  	  027120 RG	 148-8417  #162-8776  
HORPS 	= 000016	#190-10403  212-11365 *212-11381 *212-11400 
HSPMSK	= 000376	#192-10570  214-11638 
HSPSPD	  033210 RG	#192-10622 
HSPTAB	  033163 RG	#192-10588  192-10601  214-11639 
HSPTLN	= 000014	#192-10601  214-11640 
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   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF   04.00 

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-15977 
H.OVL 	= 000054  G	#51-2362   
H.TKVA	= 000106  G	#51-2366    72-3321    139-7855  
IE.ABO	= 177761	 212-11452 
IFLOP 	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   179-9667   181-9879  
                         182-9946  #190-10386 #253-13880 
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 	  047356 RG	 42-1771   #279-15293 
INITLM	  011454 RG	#42-1752    291-16141 
INPPT 	  035576 R	 210-11269 #211-11315 
INPT0 	  035604 R	#211-11318 
INPT1 	  036142 R	 211-11317 #212-11441 
INSHD 	= ******  GX	 36-1369    38-1469   
INSTAL	= ******  GX	 36-1369   
INSTK 	= ******  GX	 36-1369   
INSTPD	  007602 RG	 36-1369   #38-1468   
INTLPS	  030446 R	#177-9430   178-9523   178-9525   178-9562   179-9678   180-9815  
INTROF	= 000010	#7-288     #48-2204   #80-4024    81-4061   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                        #253-13880  283-15627  284-15654 
INTRON	= 000040	#7-288     #48-2204   #80-4024    81-4287   #82-4348   #86-4617    90-4856   #145-8240  #176-9383  
                        #190-10386 #253-13880 
INTSON	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
INT10S	= 000400	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
INT11C	= 002000	#7-288     #48-2204   #80-4024    81-4105    81-4180    81-4191   #82-4348   #86-4617   #145-8240  
                        #176-9383   180-9714  #190-10386 #253-13880 
INT11S	= 004000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
                         284-15654 
IOPSIZ	= 007777	#45-2024    45-2034   
IOTTRP	  012070 R	 43-1861   #44-1909   
IO.ATT	= 001400	 260-14233 
IO.DET	= 002000	 260-14235 
IO.LOV	= 001010	 260-14237 
IO.LTK	= 000050	 76-3738    260-14245 
IO.RLB	= 001000	 124-6823   198-10870  260-14243  288-15984 
IO.RVB	= 010400	 124-6821   124-6829   288-15985 
IO.STC	= 002500	 124-6811  
IO.WLB	= 000400	 81-4294    124-6820   198-10867  288-15987 
IO.WVB	= 011000	 124-6818   124-6831  
IS.SUC	= 000001	 198-10872  210-11288  212-11446 
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-9023   198-10842  210-11246  210-11296  212-11410  217-11815 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                         218-11903  218-11922  231-12598  237-13173  239-13251  273-14874  274-14975 
KLPWRF	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   180-9735  #190-10386 
                        #253-13880 
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.SSC	= 000200  G	#56-2518   
KL.VBD	= 000020  G	#56-2514   
KL.VBN	= 000010  G	#56-2513   
KPAL0 	  001404 RG	#13-773     90-4889    191-10559  196-10775  196-10804 
KPAL1 	  001414 RG	#13-777    *183-9980   183-9983  
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-15413 
KS.CPE	= 001000  G	#56-2540   
KS.CST	= 000020  G	#56-2535    196-10796 
KS.DEX	= 000010  G	#56-2534    280-15417 
KS.DPE	= 002000  G	#56-2541   
KS.EPE	= 000004  G	#56-2533    280-15434  280-15473 
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-9751  
KS.TSP	= 000001  G	#56-2531    280-15459 
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-15716  286-15722 
                         287-15881  287-15894  287-15897  287-15916  287-15927 
K.LBPW	= 000005  G	#61-2702   
K.LCKL	= 177777  G	#61-2686   
K.LCON	= 000004  G	#61-2696   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

K.LDCM	= 000001  G	#61-2693   
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 	  027226 RG	 148-8409  #164-8817  
LDLPV 	  027226 RG	 148-8410  #164-8818  
LFBT  	= 004000	#190-10410  200-10904  211-11324 
LFCT  	= 074000	#190-10409  201-10918  210-11264  219-12080 
LINCHR	  027272 RG	 148-8389  #165-8844  
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-9383   180-9733  
                        #190-10386 #253-13880 
LODNOD	  032520 R	 179-9655   179-9655   182-9932   182-9932  #188-10181 
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-394      8-394     
                         8-401      8-401      8-401      8-401      8-405      8-410      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   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

LPSTS 	= 000000  G	#35-1230   #35-1230   
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-10571  214-11632 
LSPSPD	  033177 RG	#192-10608  214-11656 
LSPTAB	  033152 RG	#192-10573  192-10583  214-11639  214-11642 
LSPTLN	= 000011	#192-10583  214-11628 
LSP.IG	= 000200	#192-10605  192-10610  192-10611  192-10612  192-10624 
LSP.SP	= 000017	#192-10606  214-11660 
L$$P20	= 000002	#1-38       35-1215    35-1231    35-1236    35-1247    35-1259   
L.DT0 	= 000003  G	#40-1638   
L.RP4 	= 000002  G	#40-1585   
L.TTY 	= 000001  G	#40-1581   
MACY11	= ******	 48-2196    82-4346   
MBUFR 	= 000014	#190-10402 *219-12029 *219-12085  219-12089 
MEBUF 	= 000012	#190-10401  211-11332 *211-11333 *219-12091 
MECNT 	= 000010	#190-10399  210-11266 *211-11334 *219-12092 
MF2NUM	= 000004  G	#9-588      9-591     
MF2RTY	= 000001	#9-587      9-593      9-593      9-593      9-593     
MODE  	= 100000	#190-10408  200-10897  201-10919 
MPE11 	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   177-9434  #190-10386 
                        #253-13880 
MSETRP	= ******	 270-14632  270-14669  271-14739  271-14791  273-14891  273-14907 
M.PARQ	= 000002  G	#41-1732    193-10668  198-10838 
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-9383  #190-10386 #253-13880 
NULTSK	  007542 RG	 37-1395    37-1454   #37-1457   
NUPE  	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
N.BP  	= 000002  G	#49-2328    265-14433 
N.FP  	= 000000  G	#49-2327   
N.OVPT	= 000054  G	#49-2265   
N.PR  	= 000010  G	#49-2329    265-14430  265-14430 
OKPAL0	  001412 RG	#13-775    *90-4889    196-10775 *196-10804 
OUTPT 	  035406 R	 201-10929  201-10929  210-11236 #210-11259  212-11372  219-12093 
OUTPT3	  035326 R	 202-10974  202-10974  207-11141 #210-11234 
PARLOA	  020670 R	#85-4528    85-4531   
PARLOT	  020742 R	 85-4524   #85-4548   
PARSAV	  001022 RG	#9-481      43-1887    44-1932   
PB    	= 000200  G	#66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
                        #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883   
                         66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   #66-2883    66-2883   
PERCLR	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PHYS  	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PIDENT	= 000000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

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-8781   165-8854   171-9133  #176-9383  #190-10386 #253-13880 
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-9383  #190-10386 
                        #253-13880 
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-9383  #190-10386 
                        #253-13880 
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-1431   #37-1432    37-1439   #37-1440    37-1454   #37-1455    37-1458   
PR0   	= 000000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PR1   	= 000040	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PR2   	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PR3   	= 000140	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PR4   	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PR5   	= 000240	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PR6   	= 000300	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PR7   	= 000340  G	#7-288     #48-2204   #49-2223   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 
                        #253-13880 
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-8781  *162-8781  *162-8783   165-8854  *165-8854  *165-8856   171-9133  
                        *171-9133  *171-9135  #176-9383  #190-10386  193-10660 *193-10660 *193-10664  194-10695 *194-10695 
                        *194-10707  196-10811 *196-10811 *196-10814  198-10837 *198-10837 *198-10854  201-10928 *201-10928 
                        *201-10931  202-10942  207-11133  214-11578  216-11766  226-12370 #253-13880  260-14216 *260-14216 
                         264-14392 *264-14392 *264-14396  265-14425 *265-14425  266-14459 *266-14459 *266-14464  267-14499 
                        *267-14499 *267-14505 *268-14553  270-14640 *270-14640 *270-14686  271-14738 *271-14738 *271-14783 
                         277-15128 *277-15128 *277-15143  278-15233 *278-15233 *278-15242  289-16051 *289-16051 
PSWW1 	= 000005	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   183-9987  #190-10386 
                         191-10559 #253-13880 
PSWW10	= 000014	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW11	= 000015	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW12	= 000016	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW13	= 000017	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW2 	= 000006	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW3 	= 000007	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW4 	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW5 	= 000011	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW6 	= 000012	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PSWW7 	= 000013	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PULSE 	= 000020	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
PWRXSP	  001032 RG	#9-494     *83-4420    84-4444   
PWR.UP	  020314 RG	 83-4421   #84-4443    84-4445   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 20

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

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	  027466 R	 164-8835  #166-8903   170-8969  
QPRDTL	  025666 R	#147-8368   166-8904  
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-1453    37-1455   
QSIZE 	= 000023	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   178-9545   180-9797  
                         182-9917   184-10039 #190-10386 #253-13880 
Q.AK  	= 000012  G	#59-2647    155-8558   155-8558  
Q.DA  	= 000000  G	#59-2642    167-8918   175-9290  
Q.DZ  	= 000016  G	#59-2649    170-9017   175-9294  
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-8916   167-8916  
Q.ST  	= 000004  G	#59-2644    164-8834   164-8834   165-8870   165-8870  
Q.SZ  	= 000020  G	#39-1526    39-1560   #59-2650   
Q.TS  	= 000002  G	#59-2643    175-9289  
RAMIS0	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RCVKLP	  027530 RG	 148-8412  #168-8932  
RESERV	  012024 R	 43-1859   #43-1878   
RETTOD	  027434 RG	 148-8395  #166-8889  
RFMAD0	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RFMAD1	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RFMAD2	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RFMAD3	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RF.XR 	= 000002  G	#63-2756   
RM    	= 000010	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RMBYT 	= 000004	#190-10396 *200-10899 *219-12004 *219-12022 *219-12040 
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 	  033134 R	#191-10564  193-10677 
RQKLR 	  033116 R	#191-10562  193-10673 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 21

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

RQMCR 	  033100 R	#191-10560  193-10669 
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	= 000000	#3-101      9-499      86-4559   
RSX$$F	= 000101	#3-109     #3-112      3-120      6-192      9-499      46-2053    86-4559    144-8128   189-10192 
                         252-13800 
RSX$$K	= 000126	#3-105      9-499     
RSX$$V	= 000016	#3-100      9-499      86-4559   
RTDVST	  027226 RG	 148-8390  #164-8820  
RTNTOD	  027202 RG	 148-8394  #163-8796  
RUBP  	= 000020	#190-10415  201-10918  219-12009  219-12011  219-12023  219-12025  219-12039 
R$$11D	= 000001	#1-47      
R.AS  	= 000020  G	#63-2743    259-14154 
R.AT  	= 000006  G	#63-2736    259-14150  259-14157  260-14255  260-14272  288-15972 
R.DP  	= 000011  G	#63-2738   
R.FC  	= 000014  G	#63-2741    124-6810  *124-6820  *124-6823   124-6836   198-10867  198-10870  260-14232 *260-14243 
                         260-14245  288-15985 *288-16006 
R.FN  	= 000013  G	#63-2740    259-14148 
R.LU  	= 000012  G	#63-2739    288-15973 
R.PB  	= 000024  G	#63-2745    199-10882  201-10920  201-10922 *212-11456 *260-14239 *260-14240 *260-14241 *260-14254 
                         260-14262  260-14263  288-15994  288-15995  288-15996 *288-16004 *288-16005 
R.PR  	= 000010  G	#63-2737   
R.QSGC	= 000015	#66-2854   #66-2858   #146-8318  #191-10561 #191-10563 #191-10565 
R.QSPC	= 000014	#66-2854   #66-2858   #146-8318  #191-10561 #191-10563 #191-10565 
R.QSPN	= 000006	#66-2854   #66-2858   #146-8318  #191-10561 #191-10563 #191-10565 
R.QSPR	= 000012	#66-2854   #66-2858   #146-8318  #191-10561 #191-10563 #191-10565 
R.QSTN	= 000002	#66-2854   #66-2858   #146-8318  #191-10561 #191-10563 #191-10565 
R.SB  	= 000016  G	#63-2742    259-14142 *260-14257 
R.TD  	= 000004  G	#63-2735    260-14230 
R.UI  	= 000022  G	#63-2744   
SCD   	= 000040	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
SETDEB	  027570 RG	 148-8415  #169-8953  
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-1341    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-1341    36-1355    36-1364    36-1369    36-1374    36-1379    36-1383   
                         36-1386   #52-2411   
SF.TA 	= 000001  G	 36-1332    36-1336    36-1341    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	  027606 RG	 148-8397  #170-8967  
SNDBEL	  037134 RG	 214-11686 #215-11728  217-11831 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 22

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

SNDMSG	  013264 RG	*66-2820    66-2844   *66-2850   #66-2889   *169-8954  *169-8958  
SNDSTS	  032344 R	 178-9555   178-9555   179-9676   179-9676   180-9813   180-9813   182-9951   182-9951   184-10044 
                         184-10044 #185-10069 
SPDPAR	  033224 RG	#192-10639  214-11662 
SPDTBL	  025244 RG	#146-8324   146-8342   173-9202  
SPDTBZ	= 000020	#146-8342   173-9203  
SPSAV 	  001020 RG	#9-478     *44-1921   
STAT  	= 174434	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
STATD 	= 000034	#3-127     *90-4856    280-15401  280-15428 
STATI 	  001344 RG	#12-726     180-9721   182-9940  
STATS 	= 000000	#190-10394 
STATUS	= 000022	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   180-9716   185-10075 
                        #190-10386 #253-13880 
STBXFR	  032476 R	 179-9668   179-9668   182-9949   182-9949  #187-10157 
STCM  	  046604 R	#275-15057  276-15089 
STDCDR	  006776 RG	 36-1280   #36-1378    37-1423   
STDDTE	  006436 RG	 36-1282   #36-1331    37-1399   
STDDTP	  006536 RG	 36-1284   #36-1340    37-1431   
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	  027226 RG	 148-8391  #164-8819  
STELIG	  032110 R	 181-9883  #182-9948  
STELIX	  032132 R	 181-9866   182-9927  #182-9953  
STIND2	  030710 R	 178-9504  #178-9530  
STLN  	  046640 R	 275-15050  275-15050  276-15087  276-15087 #276-15094 
STNXT 	  034722 R	 203-11012  203-11024  204-11036  204-11045 #205-11071 
STPLIN	  026604 RG	 148-8407  #158-8638  
STRBF 	= 000002	#190-10395 *200-10900  219-12018  219-12041 
STRDAT	  027226 RG	 148-8388  #164-8821  
STSTT 	  001326 RG	#12-712     12-715     12-716    *178-9511  *178-9553  *179-9675  *180-9812  *182-9950   185-10071 
STSWD 	  005610 RG	#33-1108   
STSW0 	= 000004  G	#190-10423  214-11666  216-11776  222-12211  223-12249 *224-12284 *225-12326 *225-12327  226-12415 
                        *227-12468 *227-12474 *231-12611 *232-12716  232-12724  232-12752  233-12880 *240-13314 *245-13554 
                         246-13605 *246-13611 
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-9030   170-9043   170-9045   170-9050  *170-9055  *170-9106  
                        #190-10428  198-10843  198-10847  202-10948 *202-10960  202-10961  203-11001 *203-11003  203-11004 
                        *203-11005 *203-11022 *203-11023  205-11073  205-11075  205-11082 *205-11087  205-11093  207-11135 
                        *207-11137  207-11138  207-11150  207-11155 *208-11181  209-11206  210-11240  210-11248 *212-11415 
                         214-11607  214-11612 *214-11614  214-11621  214-11624 *214-11626 *214-11634 *214-11655 *214-11658 
                         214-11677 *214-11680 *214-11687  214-11695  214-11699 *214-11701 *214-11702 *214-11707  214-11711 
                        *214-11713  214-11716  215-11729  217-11820  217-11823  217-11834  218-11897 *218-11920 *218-11947 
                         223-12241 *223-12243  223-12247  223-12251  226-12385 *226-12414  226-12417 *226-12423 *226-12430 
                         228-12510  229-12538  231-12595 *231-12615  232-12688  232-12690 *232-12692  233-12868  233-12873 
                        *233-12883  233-12894  234-13000  234-13002 *234-13009  234-13011  237-13162  237-13164  237-13166 
                        *237-13186  239-13239  239-13241  239-13244 *239-13278 *240-13312 *240-13325  242-13394  245-13517 
                         246-13617  247-13668  273-14868  273-14906  273-14919  273-14926  274-14970  274-15001  274-15006 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 23

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                         274-15008 
STSW2 	  005066 RG	#29-1037    249-13751 
STTYDN	  034536 R	 202-10964  202-10964 #203-11000  210-11304 
STTYO 	  035132 R	 207-11139 #207-11142  210-11298  210-11298  210-11307 
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-9383  #190-10386 #253-13880 
SWSLLT	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
SY0PUD	  011272 RG	#40-1673   
S.BA  	= 000012  G	#52-2389    76-3711    260-14247 
S.DI  	= 000011  G	#52-2388    76-3759   
S.DL  	= 000032  G	#52-2397    76-3744    76-3745    260-14239  260-14241 
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-10432  190-10436  224-12284 
S0.CON	= 040000  G	#190-10433  190-10436  214-11666  226-12415  227-12468  227-12474 
S0.ISP	= 001700  G	#190-10434  190-10437  222-12212 
S0.MSK	= 140000  G	#190-10436  225-12318  225-12326  233-12881  240-13314  246-13606 
S0.OSP	= 036000  G	#190-10435  190-10437 
S0.SPD	= 037700  G	#190-10437 
S2.CHR	= 000377  G	#190-10486 
S2.CNT	= 001400  G	#190-10484  245-13557  246-13628 
S2.DDN	= 100000  G	#190-10477  233-12878  240-13317  240-13320  242-13398  243-13438  245-13511  245-13558  246-13592 
                         246-13628 
S2.DIP	= 040000  G	#190-10478  213-11492  217-11848  233-12878  240-13317  242-13398  243-13438  245-13511  245-13536 
                         245-13557  246-13592  246-13595 
S2.DIS	= 020000  G	#190-10479  240-13317  244-13471  245-13522  245-13534  246-13636 
S2.ENB	= 010000  G	#190-10480  240-13317  244-13468  245-13523  246-13628  246-13635 
S2.LCL	= 004000  G	#190-10481  235-13070  242-13400  243-13429  243-13434  243-13443  245-13530  245-13548  245-13559 
                         246-13619  246-13625  246-13628 
S2.RES	= 002000  G	#190-10482 
S2.SSZ	= 001000  G	#190-10483  241-13362  245-13544 
TBIT  	= 000020  G	#49-2270   
TEDXIT	  031342 R	 179-9669  #179-9677  
TENAD1	= 174410	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TENAD2	= 174412	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TF.OU 	= 000002  G	 38-1469    38-1473    38-1477    38-1481    38-1485    38-1490    38-1494    38-1498    38-1508   
                        #50-2351    73-3358    73-3388    76-3720    76-3748    76-3757   
THRED 	= 000000  G	#190-10421 
TMOCNT	  002670 RG	#17-915    *194-10696 *194-10698 *194-10702 *194-10704 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 24

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

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-9547  *180-9715  *180-9799  *182-9919  *184-10040 *185-10077 
                         281-15550 *282-15584 *282-15600 
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-9548  *180-9718  *180-9800  *182-9920  *184-10041 *185-10078 
                        *282-15585 *282-15601 
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-9383   178-9511   178-9553  
                         182-9940  #190-10386 #253-13880 
TOIP  	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   178-9511   178-9553  
                         180-9770  #190-10386 #253-13880 
TOIT  	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   179-9675   180-9812  
                         182-9950  #190-10386 #253-13880 
TOITDN	  031330 R	 179-9627   179-9651  #179-9674  
TOXQIP	  001401 RG	#12-765    *81-4274   *178-9520   184-10022 *184-10046 
TO10  	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO10AD	= 174420	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO10AS	  001324 RG	#12-708     178-9492  *178-9501  *178-9543  *184-10036 
TO10BC	= 174414	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO10BM	= 000001	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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-9383   178-9561   184-10045 #190-10386 #253-13880 
TO10DN	= 100000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   177-9434  #190-10386 
                        #253-13880 
TO10DT	= 174424	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO10ER	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   177-9434  #190-10386 
                        #253-13880 
TO10PK	  005614 RG	#33-1110   
TO10Q 	  001334 RG	#12-718     81-4248    81-4249    147-8374   147-8375   178-9502   178-9521   178-9522   278-15234 
                         278-15240  279-15280  279-15291 
TO10QC	= 001332 RG	#12-715    *81-4262    180-9789  *180-9791   180-9792   181-9869  
TO10SZ	  001322 RG	#12-706     178-9491  *178-9541  *184-10033 
TO11  	= 000100	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO11AD	= 174422	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO11AS	  001316 RG	#12-702     179-9603  *187-10159 
TO11BC	= 174416	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO11BM	= 020000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   179-9599   179-9667  
                         181-9882   182-9944  #190-10386 #253-13880 
TO11BS	  001320 RG	#12-704     179-9596   179-9599  *187-10158 
TO11DB	= 004000	#7-288     #48-2204   #80-4024    81-4085    81-4130   #82-4348   #86-4617   #145-8240  #176-9383  
                         177-9446  #190-10386 #253-13880 
TO11DN	= 000200	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   177-9440  #190-10386 
                        #253-13880 
TO11DT	= 174426	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
TO11DV	  001306 RG	#12-693    *179-9634   179-9635   188-10185 
TO11ER	= 000002	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383   177-9440  #190-10386 
                        #253-13880 
TO11FN	  001304 RG	#12-691    *179-9611   179-9640   179-9645  *179-9657   180-9772  *182-9947   188-10183 
TO11FW	  001312 RG	#12-697     188-10186 
TO11GW	  001314 RG	#12-700    
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 25

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

TO11HD	  001302 RG	#12-689    *179-9633   179-9658   181-9881   188-10184 
TO11NP	  001300 RG	#12-687     179-9617   179-9648   179-9654   182-9931  *186-10133 
TO11Q 	  001342 RG	#12-724     147-8360  *147-8362   179-9618   184-10019  186-10114 
TO11QC	= 001333 RG	#12-716    *184-10043 
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-1431    37-1439    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-11489 
TTCTY 	  037716 R	 217-11875 #219-11953 
TTINI 	  033244 RG	 191-10542  191-10542 #193-10658  201-10933 
TTINO 	  034406 R	 198-10835 #201-10932 
TTINPA	  037230 R	#216-11771  218-11934 
TTINPB	  037430 R	 214-11649  214-11704  214-11708  214-11712  215-11730  215-11739  216-11775  216-11777  217-11818 
                         217-11824  217-11828  217-11851 #217-11855  217-11871 
TTINX 	  034402 R	 198-10844  198-10848  198-10852 #201-10930 
TTOUTR	  035226 R	 205-11074  205-11094  207-11151  207-11156 #208-11182 
TTOUTX	  035220 R	 206-11124 #208-11180  212-11436 
TTPEN 	  010262 RG	#40-1582    40-1583    65-2807    81-4048    147-8347   191-10542  201-10914 
TTPKT 	  002740 RG	#18-932     198-10834 *198-10861  199-10880 *199-10887  212-11454 
TTSAV 	  040402 R	 207-11134  216-11767 #220-12129  226-12371 
TTSTCH	  037254 R	 214-11669  214-11681  214-11688  214-11718  214-11725 #217-11814 
TTTBL 	  003004 RG	#20-974     28-1021    29-1032    39-1530    39-1542    162-8758   213-11488  220-12141  227-12479 
                         232-12741  232-12757  235-13076  249-13748 
TTTMSG	  012402 R	 44-1915   #44-1997   
TTWLO 	  033060 R	#191-10556  193-10659 
TTYDNE	  035514 R	#210-11289  212-11458 
TTYDNX	  035560 R	 210-11293 #210-11301 
TTYEND	= 005054 RG	#28-1022    170-9058   233-12913  235-13074 
TTYEXP	= 000002  G	 170-9028   170-9052   175-9305  #190-10422  202-10955  210-11297  212-11411  212-11419  220-12143 
                         221-12174  231-12597  232-12656  232-12667 *232-12707  233-12839 *233-12928  234-12992  273-14890 
                         273-14934 
TTYHD 	  032544 RG	 36-1383    37-1403    38-1481   #191-10541 
TTYSP 	  033024 RG	 37-1403    191-10542 #191-10542 
TTYTPD	  007662 RG	 36-1383   #38-1480   
TTYTSK	  007202 RG	 15-831     15-836     37-1399   #37-1402    37-1404    40-1583   *210-11290 *217-11869 *218-11911 
                        *224-12290 *231-12603 
TT.ABL	= 000040  G	 154-8532   157-8625  #190-10468  214-11607  214-11677  214-11695  223-12241  223-12247  226-12417 
                         233-12868 
TT.ABW	= 000010  G	 154-8537   157-8625   170-9043  #190-10470  214-11621  214-11655  214-11702  226-12423  231-12615 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 26

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                         234-13000  240-13312  273-14906 
TT.BRK	= 004000  G	 157-8626  #190-10457  214-11680  214-11699  214-11701  214-11707 
TT.CRW	= 000004  G	#190-10471  217-11823  218-11920  218-11947  226-12414  226-12430  231-12615  232-12688  234-13000 
TT.CTY	= 000002  G	 20-976     154-8508   158-8642   170-9045  #190-10472  202-10961  207-11138  209-11206  217-11820 
                         237-13166  239-13244  242-13394  273-14868  273-14926  274-14970  274-15001 
TT.FEC	= 014000  G	#190-10450  214-11687  214-11717  240-13325 
TT.FEI	= 004000  G	#190-10451  214-11713 
TT.IGN	= 010000  G	 154-8534   157-8626  #190-10456  214-11612  214-11614  214-11634  214-11655  214-11658 
TT.LSP	= 020000  G	 154-8534   157-8626  #190-10455  214-11624  214-11626  214-11634  214-11701  223-12243  223-12251 
                         233-12894 
TT.NSA	= 000400  G	 152-8462   170-9030   170-9043  #190-10461  205-11082  231-12615  240-13312 
TT.OUT	= 000001  G	 170-9050  #190-10473  198-10843  198-10847  202-10948  202-10960  205-11073  207-11135  207-11137 
                         207-11150  208-11181  210-11240  210-11248  212-11415  215-11729  239-13241  240-13312  245-13517 
                         246-13617  247-13668  273-14919  274-15006 
TT.RIP	= 002000  G	#190-10459  218-11920  218-11947  226-12414  226-12423  226-12430  231-12615  232-12690  232-12692 
                         234-13002  234-13009 
TT.RMT	= 000100  G	 20-978     20-979     20-980     20-981     154-8535   157-8620  #190-10467  218-11897  226-12385 
                         228-12510  229-12538  231-12595  234-13011 
TT.RSI	= 020000  G	#190-10449  214-11711  233-12873  233-12883  240-13312 
TT.SIP	= 001000  G	 170-9055  #190-10460  203-11001  203-11003  205-11087  237-13164  239-13241  240-13312  274-15008 
TT.SND	= 140000  G	#190-10443  240-13312 
TT.SNI	= 040000  G	 170-9106  #190-10444  203-11005 
TT.XEN	= 000020  G	 151-8451   152-8467  #190-10469  217-11834  240-13325 
TT.XOF	= 000200  G	 152-8469  #190-10465  237-13186  239-13278  240-13325  273-14919 
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-10132 #190-10491 *236-13113  271-14728 
T.HCAD	= 000004  G	*171-9142  *171-9143  #190-10492  204-11040 *204-11041  206-11117  208-11177 *208-11178 *239-13262 
                         239-13263 
T.HCBC	= 000006  G	#190-10493  204-11039 *204-11044  206-11118 *207-11145  239-13260 *239-13264 *274-14992 
T.HFCN	= 000007  G	#190-10494 *273-14900 
T.HHDS	= 000010  G	 165-8853   165-8861   171-9143  #190-10495 
T.HP  	= 000012  G	#50-2342   
T.HRED	= 000000  G	#190-10490 
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-9493  *178-9544  *184-10035 
T11AD 	= 000022	#3-130      179-9604   179-9606  *187-10160 
T11BC 	= 000016	#3-132     *187-10161 
U     	= 000040	#8-422     #8-427      8-430     
UC.CCL	= 000002  G	 40-1583    40-1665   #57-2595   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 27

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

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-9383  #190-10386 #253-13880 
UNASG2	= 000033	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
UNASG3	= 000034	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
UNASG4	= 000035	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
UNASG5	= 000036	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
UNASG6	= 000037	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
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-10914 *260-14272 *260-14282 
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   
U.C4  	= 000012  G	#57-2558   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 28

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

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-14215  260-14223  260-14223  260-14266 *260-14272 *260-14282 
U.RP  	= 000016  G	#57-2560    78-3904   
U.SZ  	= 000050  G	 36-1355   #57-2583    76-3761    103-5465   260-14211  260-14222  260-14223 
U.TF  	= 000042  G	#57-2578   
U.UI  	= 000030  G	#57-2569   
U.UN  	= 000002  G	#57-2553    103-5461   260-14266 
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-9383  #190-10386 #253-13880 
WFXSET	  014212 R	 70-3285    70-3287    70-3289   #70-3292   
WI.WRV	= 001000	 288-15988 
WTLODT	  025220 R	#146-8314   147-8354  
W.VBN 	  000006	 289-16061 
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 	  044374 RG	 255-13954 #255-13973 
X9X96 	  016156 R	 78-3898   #78-3914   
ZSTOP 	= 040000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
$BTMSK	  002650 RG	#17-893     212-11429 
$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	  036370 RG	 8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     #214-11577 
$DHOUT	  034412 RG	 8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     #202-10941 
$DH11 	= 000001	#1-43      
$DIV  	= ******  GX	 107-5666   107-5666   107-5670   107-5670  
$DMINT	  040756 RG	 8-426      8-426      8-426      8-426      8-426      8-426      8-426      8-426     #226-12369 
$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  	= 000001	#1-55       8-386      29-1039    36-1283    36-1325    36-1338    36-1354    37-1429    38-1495   
                         40-1639   
$DTE  	= 000001	#1-46       85-4541   
$DTEDR	= ******	 15-843     67-3013    88-4708    256-14013 
$DTEOF	  021106 RG	 87-4679   #89-4748   
$DTEON	  021114 RG	 87-4680   #90-4789   
$DTINT	= ******  GX	 8-387     
$EXHSG	  021614 RG	 87-4685   #95-5077   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 29

SYMBOL CROSS REFERENCE                                  CREF   04.00 

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-15935 
$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 	= ******	 8-407      30-1056    36-1289    36-1319    36-1343    36-1351    37-1445    38-1500    40-1649   
$TOP10	= 000001	#1-35       1-53       3-110      40-1678    56-2517    66-2880   
$TOP20	= ******	 1-61       3-117      40-1674   
$TTINP	  037210 RG	 8-366      8-416      8-434      8-437      8-440     #216-11765 
$TTOUT	  035064 RG	 8-367      8-417      8-435      8-438      8-441     #207-11132 
$T1091	= ******	 1-49       1-54       3-111      40-1679   
$UNIT 	  002646 RG	#17-891     212-11424 
$$    	= 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  
                         157-8611  #157-8618   157-8618  #157-8621   157-8621  #157-8629   157-8629  #158-8640   158-8640  
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 30

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                        #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-8782   162-8782  #162-8787   162-8787  #164-8832  
                         164-8832  #164-8834   164-8834  #165-8855   165-8855  #165-8868   165-8868  #165-8870   165-8870  
                        #165-8879   165-8879  #166-8902   166-8902  #167-8914   167-8914  #167-8916   167-8916  #167-8921  
                         167-8921  #170-8968   170-8968  #170-9033   170-9033  #170-9035   170-9035  #170-9054   170-9054  
                        #170-9104   170-9104  #171-9134   171-9134  #175-9332   175-9332  #178-9510   178-9510  #178-9516  
                         178-9516  #178-9519   178-9519  #178-9524   178-9524  #178-9549   178-9549  #178-9555   178-9555  
                        #179-9626   179-9626  #179-9649   179-9649  #179-9655   179-9655  #179-9668   179-9668  #179-9676  
                         179-9676  #180-9719   180-9719  #180-9743   180-9743  #180-9753   180-9753  #180-9780   180-9780  
                        #180-9801   180-9801  #180-9808   180-9808  #180-9813   180-9813  #181-9863   181-9863  #181-9871  
                         181-9871  #182-9921   182-9921  #182-9924   182-9924  #182-9932   182-9932  #182-9949   182-9949  
                        #182-9951   182-9951  #184-10042  184-10042 #184-10044  184-10044 #185-10079  185-10079 #186-10130 
                         186-10130 #194-10699  194-10699 #194-10700  194-10700 #194-10705  194-10705 #195-10718  195-10718 
                        #195-10720  195-10720 #195-10724  195-10724 #196-10790  196-10790 #196-10813  196-10813 #197-10821 
                         197-10821 #197-10824  197-10824 #197-10827  197-10827 #198-10851  198-10851 #199-10885  199-10885 
                        #201-10929  201-10929 #202-10943  202-10943 #202-10964  202-10964 #202-10974  202-10974 #202-10976 
                         202-10976 #204-11048  204-11048 #205-11072  205-11072 #207-11134  207-11134 #207-11148  207-11148 
                        #207-11149  207-11149 #209-11220  209-11220 #209-11226  209-11226 #210-11291  210-11291 #210-11298 
                         210-11298 #213-11481  213-11481 #213-11491  213-11491 #213-11494  213-11494 #213-11507  213-11507 
                        #213-11508  213-11508 #213-11517  213-11517 #213-11519  213-11519 #214-11579  214-11579 #214-11591 
                         214-11591 #214-11647  214-11647 #214-11663  214-11663 #214-11664  214-11664 #214-11665  214-11665 
                        #214-11684  214-11684 #214-11703  214-11703 #214-11721  214-11721 #214-11724  214-11724 #216-11767 
                         216-11767 #217-11840  217-11840 #217-11844  217-11844 #217-11846  217-11846 #217-11847  217-11847 
                        #217-11850  217-11850 #217-11854  217-11854 #217-11865  217-11865 #217-11870  217-11870 #218-11905 
                         218-11905 #218-11912  218-11912 #218-11924  218-11924 #218-11930  218-11930 #218-11942  218-11942 
                        #220-12144  220-12144 #223-12259  223-12259 #225-12319  225-12319 #225-12320  225-12320 #226-12371 
                         226-12371 #226-12406  226-12406 #226-12419  226-12419 #227-12473  227-12473 #227-12484  227-12484 
                        #228-12512  228-12512 #229-12540  229-12540 #231-12618  231-12618 #232-12658  232-12658 #232-12670 
                         232-12670 #232-12696  232-12696 #232-12717  232-12717 #232-12747  232-12747 #233-12850  233-12850 
                        #233-12864  233-12864 #233-12877  233-12877 #233-12896  233-12896 #233-12946  233-12946 #234-13004 
                         234-13004 #234-13005  234-13005 #234-13013  234-13013 #234-13022  234-13022 #235-13069  235-13069 
                        #236-13111  236-13111 #237-13174  237-13174 #237-13180  237-13180 #238-13209  238-13209 #239-13252 
                         239-13252 #239-13266  239-13266 #239-13269  239-13269 #239-13276  239-13276 #240-13315  240-13315 
                        #240-13321  240-13321 #240-13324  240-13324 #241-13364  241-13364 #244-13467  244-13467 #244-13477 
                         244-13477 #245-13532  245-13532 #245-13546  245-13546 #245-13550  245-13550 #246-13603  246-13603 
                        #246-13621  246-13621 #247-13667  247-13667 #247-13670  247-13670 #247-13675  247-13675 #247-13677 
                         247-13677 #247-13681  247-13681 #247-13687  247-13687 #248-13716  248-13716 #250-13788  250-13788 
                        #255-13957  255-13957 #258-14091  258-14091 #258-14106  258-14106 #259-14144  259-14144 #259-14151 
                         259-14151 #259-14153  259-14153 #259-14158  259-14158 #259-14163  259-14163 #260-14219  260-14219 
                        #260-14264  260-14264 #260-14268  260-14268 #260-14274  260-14274 #260-14277  260-14277 #261-14309 
                         261-14309 #265-14434  265-14434 #265-14435  265-14435 #267-14503  267-14503 #272-14809  272-14809 
                        #273-14873  273-14873 #273-14875  273-14875 #273-14879  273-14879 #273-14935  273-14935 #274-14976 
                         274-14976 #274-14979  274-14979 #274-14995  274-14995 #274-15020  274-15020 #275-15050  275-15050 
                        #275-15058  275-15058 #276-15087  276-15087 #277-15141  277-15141 #277-15151  277-15151 #278-15207 
                         278-15207 #278-15225  278-15225 #278-15238  278-15238 #278-15241  278-15241 #279-15283  279-15283 
                        #279-15292  279-15292 #279-15295  279-15295 #280-15419  280-15419 #280-15435  280-15435 #280-15472 
                         280-15472 #280-15482  280-15482 #281-15522  281-15522 #282-15586  282-15586 #282-15602  282-15602 
                        #284-15652  284-15652 #285-15678  285-15678 #287-15880  287-15880 #288-15997  288-15997 #289-16078 
                         289-16078 #289-16112  289-16112 
$$$   	= 010046 R	#38-1469    38-1469   #38-1473    38-1473   #38-1477    38-1477   #38-1481    38-1481   #38-1485   
                         38-1485   #38-1490    38-1490   #38-1494    38-1494   #38-1498    38-1498   #38-1508    38-1508   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 31

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                        #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-10557  191-10561  191-10561  191-10561  191-10561  191-10561  191-10561  191-10563  191-10563 
                         191-10563  191-10563  191-10563  191-10563  191-10565  191-10565  191-10565  191-10565  191-10565 
                         191-10565 
$$$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-10561  191-10561  191-10561 #191-10561 
                         191-10561  191-10561 #191-10561  191-10561  191-10561 #191-10561  191-10561  191-10561 #191-10561 
                         191-10561  191-10561 #191-10561 #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 
$$$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-10561  191-10561  191-10561  191-10561 #191-10561  191-10561 #191-10563  191-10563  191-10563 
                         191-10563 #191-10563  191-10563 #191-10565  191-10565  191-10565  191-10565 #191-10565  191-10565 
$$$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-10683 *224-12283 
.ABFLG	  002610 RG	#17-868    *85-4518   *163-8799   193-10681 *193-10683 
.ACKAL	  001164 RG	#9-563      66-2818   *81-4289    195-10712 *195-10714 
.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-9383  #190-10386 #253-13880 
.BRKCH	  002636 RG	#17-881     217-11867 
.BTPRM	  001160 RG	#9-559      162-8785  
.BTSCH	  001162 RG	#9-561     *81-4119    81-4135   *81-4156   *217-11878 
.BTSTK	  016542 RG	 37-1454    81-4048   #81-4048   
.CECLK	= 004000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.CEFN 	  044310 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-13947 
.CEFN3	  044314 RG	#255-13950  278-15225  278-15225 
.CKASS	  001050 RG	#9-501      75-3637   *75-3639   *143-8108  
.CKDEL	  044376 RG	 120-6410   120-6410   143-8113   143-8113  #256-13998 
.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-9383  #190-10386 #253-13880 
.CLRUN	= 010000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 32

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.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-8938  
                        *168-8942  *180-9761   196-10769  213-11511  214-11589  214-11605  217-11825 *217-11864  217-11876 
                         224-12286  226-12387  231-12613  236-13102  255-13963  258-14084  261-14314  278-15197  281-15514 
                        *283-15628  284-15650 *284-15655 *285-15676 
.CONBT	= 012000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.CPDV 	  001262 RG	#12-671    *81-4263    277-15131 *277-15163 *279-15301 
.CPFN 	  001260 RG	#12-669     277-15129 *277-15161 
.CPUSN	  011342 RG	#41-1691   
.CRHD 	  001270 RG	#12-677     81-4264    279-15276 *279-15300 
.CRPB 	  001266 RG	#12-675    *81-4266    277-15134 *277-15136  277-15155 *277-15165 *279-15305 
.CRPFL	  005736 RG	#34-1147   *85-4516   
.CRQZ 	  001256 RG	#12-667    *81-4271   *277-15138 *277-15156  279-15277 *279-15308 
.CRSB 	  001272 RG	#12-679     277-15137 *277-15158 
.CRSND	  002634 RG	#17-879    *170-9041  *170-9061   273-14901 
.CRSZ 	  001264 RG	#12-673    *81-4270   *277-15139  277-15148 *277-15157  279-15287 *279-15307 
.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-10661  258-14093  260-14205  260-14231  278-15223 
.CSHRG	= 164000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.CTYPT	  002642 RG	#17-885    
.CYLTM	= 000074  G	 9-555      15-833     15-834    #54-2487   
.DATE 	  001140 RG	#9-538      81-4215    166-8893  
.DATE3	  001140 RG	#9-539      163-8797   224-12288 
.DAY  	  001144 RG	#9-544      81-4219    107-5677  
.DBINT	= ******  GX	 8-403     
.DHSPA	  040552 RG	#223-12240  227-12473  227-12473  233-12896  233-12896  234-13005  234-13005 
.DHSPC	  040656 R	 223-12262 #224-12285 
.DHSPD	  040704 RG	 157-8629   157-8629   214-11663  214-11663  223-12259  223-12259 #225-12315 
.DHSPF	  040644 RG	 214-11664  214-11664 #224-12282 
.DHSPR	  040572 RG	 154-8539   154-8539   214-11647  214-11647  214-11703  214-11703 #223-12246 
.DHSPZ	  040530 RG	 214-11721  214-11721 #222-12209  245-13550  245-13550 
.DHSTO	  035024 RG	 205-11088 #206-11116  239-13269  239-13269  247-13677  247-13677  273-14937 
.DHTMO	  042020 RG	 85-4512    85-4512    194-10699  194-10699 #233-12811 
.DHXOF	  043030 RG	 237-13167  237-13171  237-13174  237-13174 #237-13179 
.DHXON	  043152 RG	 239-13245  239-13249  239-13252  239-13252 #239-13257 
.DLHUP	  041366 RG	 154-8517   154-8517   154-8546   154-8546  #231-12594  232-12696  232-12696 
.DLINT	  037534 RG	 216-11770 #218-11896 
.DLSTO	  035200 RG	#208-11176  239-13276  239-13276  247-13681  247-13681  273-14945 
.DLTMO	  041510 RG	 85-4513    85-4513    194-10700  194-10700 #232-12654 
.DLXOF	  043036 RG	 237-13165 #237-13185 
.DLXON	  043216 RG	 239-13267 #239-13275 
.DMHUP	  041266 RG	 154-8531   154-8531   157-8621   157-8621  #228-12509  234-13004  234-13004 
.DMTMO	  042326 RG	 85-4514    85-4514    194-10705  194-10705 #234-12975 
.DMUHU	  041316 RG	 153-8496   153-8496  #229-12537 
.DOW  	  001147 RG	#9-550     
.DQCDR	  010202 RG	#39-1549   
.DQDH0	  010122 RG	#39-1537    170-9017  
.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-8834   164-8834   165-8870   165-8870  
                         167-8916   167-8916   167-8918   175-9289   175-9290   175-9294   276-15103  276-15105 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 33

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.DQPEA	  010262 RG	#39-1559    39-1560   
.DQPSZ	= 000010  G	#39-1560    179-9635  
.DRBEL	  031346 RG	 177-9449  #180-9713  
.DRLTC	= 015000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.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-9383  #190-10386 #253-13880 
.DSIOJ	= 065000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.DST  	  001146 RG	#9-548      81-4220   
.DTBLK	  001402 RG	#12-768    *81-4239   *181-9865  *182-9926  *182-9952   196-10809  213-11513  213-11517  213-11517 
.DTINT	  030432 RG	 8-453      8-453      8-453      8-453     #177-9423  
.DXRTY	  001372 RG	#12-747     280-15385 *280-15418  280-15439  280-15493 
.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-15518 *281-15520 
.EBPEQ	  001374 RG	#12-757     197-10823  281-15525 
.EBRTY	  001373 RG	#12-749    *280-15437  280-15466  280-15494  281-15516 
.EIOJA	= 067000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.ELEDN	  031042 RG	 177-9441  #179-9594  
.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  
.FEST 	= ******  GX	 39-1556   
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 34

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.FESTB	  001000 RG	#9-458      9-459     
.FREPL	  001426 RG	#14-797    *42-1756   *42-1761    186-10128  213-11505  217-11829  242-13396  243-13436  270-14635 
                         271-14733 
.FSRPT	= 000050  G	#49-2264   
.GFNR 	= 102000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.HRDWR	  011344 RG	#41-1696   
.IBFLO	  005062 RG	#29-1033    242-13396 
.IBFOK	  005064 RG	#29-1035    213-11505  243-13436 
.INHDM	  002604 RG	#17-864    *150-8438   226-12389 
.INICL	= 070000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.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-9383  #190-10386 #253-13880 
.KACFL	  001420 RG	#13-781     196-10782 
.KALSC	= 000005  G	#54-2489    90-4887    196-10802 
.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-9751  *196-10796 *280-15413 *280-15417 *280-15434 *280-15459 
                        *280-15473 
.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-8937  
.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-9025   198-10840  209-11210  209-11214 
                         210-11235  210-11292  212-11407  217-11817  218-11909  231-12600 *231-12602  237-13170  239-13248 
                         273-14870  274-14972 
.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-10777 *196-10780 *196-10802 
.KPALV	  032134 RG	 181-9871   181-9871  #183-9979   196-10813  196-10813  213-11519  213-11519 
.KW11S	  036226 RG	 8-373     #213-11480 
.LCEND	= 011374 RG	 9-459     #41-1741   
.LCRDL	= 052000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LCRDR	= 051000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LCRM1	= 057000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LCRM2	= 056000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LCRM3	= 055000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LCRM4	= 054000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LCRM5	= 053000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 35

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.LDAR 	= 077000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDBRL	= 043000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDBRR	= 042000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDCK1	= 046000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDCK2	= 047000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDDIS	= 045000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDRJD	= 064000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDRJV	= 063000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDRM1	= 060000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDRM2	= 061000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDRM3	= 062000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LDSEL	= 044000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.LPPFL	  006244 RG	#35-1199   *85-4515   
.MEMRS	= 076000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.MISC 	  011362 RG	#41-1729   *193-10668  198-10838 
.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-9752   196-10771 *196-10791  280-15409 
                         280-15426 *280-15481 
.NOHLT	= 001123 RG	#9-521      280-15455 
.OBFLO	= 001200  G	#186-10109  186-10128 
.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-9383  #190-10386 #253-13880 
.PCAB2	= 151000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.PCAB3	= 152000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.PCAB4	= 153000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.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-12660  232-12714  233-12813  233-12862  233-12943 
                         234-12977  234-12994  240-13307 
.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-9432   184-10028  213-11516 
.PRDCT	  001370 RG	#12-742    *81-4099   *81-4176   *177-9448  
.PRDTE	  001366 RG	#12-740     44-1957    81-4059    84-4452    90-4850    177-9431   184-10027  196-10812  213-11515 
.PRPSE	  001400 RG	#12-763     66-2842   *81-4051   *81-4071   *81-4112   *85-4519    217-11827 
.PRSTA	  001364 RG	#12-738     43-1867    44-1962    81-4060    84-4481    85-4542    177-9433   178-9561   184-10045 
                         283-15627  284-15654 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 36

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.PUDBA	  010262 RG	 36-1355   #40-1579    76-3760    103-5454   260-14207 
.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-9383  #190-10386 #253-13880 
.RCRM2	= 146000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.RCRM3	= 145000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.RCRM4	= 144000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.RCSPF	= 141000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.RDJ14	= 134000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.RDJ71	= 135000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.RDMAB	= 133000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.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-8777  
.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-10826 
.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-8801   193-10685 
.SECLK	= 003000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.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-11482 *262-14342 
.SETMR	= 007000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.SETRN	= 011000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.SEWFL	  001016 RG	#9-476     *116-6182   143-8120  *143-8121  
.SNDAL	  027614 RG	 66-2849    66-2849    170-8968   170-8968  #170-9004  
.SNDBF	  002614 RG	#17-875    *170-9019  *170-9103   203-11027 *203-11028  205-11085 
.SNDCN	  002624 RG	#17-877    *170-9017  *170-9099  *203-11011 
.SNDLP	  002612 RG	#17-873     85-4502    170-9011  *170-9016   170-9095   203-11017  205-11080 
.SSCLK	= 002000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.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-14158  259-14158 
.STDHL	  040466 RG	#221-12173  225-12320  225-12320  238-13209  238-13209  239-13266  239-13266  245-13546  245-13546 
                         246-13603  246-13603  247-13675  247-13675  273-14935  273-14935 
.STDTA	  006364 RG	#36-1271    73-3370    269-14582 
.STDTB	  006372 RG	 36-1272   #36-1278   
.STDTC	  006366 RG	#36-1273   
.STDTZ	  006370 RG	#36-1275    73-3371   *73-3372   *137-7736   269-14584 
.STELD	  031670 RG	 180-9808   180-9808  #181-9860   181-9865  
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 37

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.STELI	  031756 RG	 180-9780   180-9780  #182-9916   182-9926  
.STPCL	= 000000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.STPDM	  041346 RG	 228-12512  228-12512  229-12540  229-12540 #230-12564  234-13013  234-13013 
.STRCL	= 001000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
.STTNF	  032176 RG	 147-8377   147-8377  #184-10021 
.STTNQ	  032170 RG	 178-9524   178-9524  #184-10018  278-15238  278-15238  279-15283  279-15283 
.STTYD	  041202 RG	 214-11665  214-11665  218-11924  218-11924  226-12419  226-12419 #227-12467 
.STTYH	  041216 RG	 218-11942  218-11942  226-12406  226-12406 #227-12472  231-12618  231-12618 
.SYUIC	  001156 RG	#9-557      124-6791   139-7859  
.S2IDC	  005056 RG	#29-1029    213-11500 *243-13441 *245-13561 *246-13627 
.S2ITP	  005060 RG	#29-1031    235-13065 *235-13080 
.TENDN	  030554 RG	 177-9435  #178-9489  
.TFXOF	  044232 RG	 245-13532  245-13532 #250-13784 
.TFXON	  044222 RG	 246-13621  246-13621 #250-13779 
.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-9754  *196-10797 
                        *280-15483 
.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	  035230 RG	 205-11092  207-11136  207-11144  207-11154 #209-11205 
.TTBTW	  044032 RG	 159-8677   159-8677   244-13477  244-13477 #247-13663  250-13788  250-13788 
.TTCHK	  043322 RG	 213-11494  213-11494  217-11850  217-11850 #241-13360 
.TTDIS	  043510 RG	 241-13364  241-13364  242-13401  243-13431  244-13472 #245-13507 
.TTELB	  002666 RG	#17-910    *214-11723 *232-12746 *234-13021  236-13130 *236-13132 
.TTELC	  002664 RG	#17-908     236-13104 
.TTELQ	  002662 RG	#17-903     197-10819  236-13114 
.TTENB	  043666 RG	 213-11508  213-11508  240-13321  240-13321  243-13437  244-13469 #246-13588 
.TTERL	  042624 RG	 214-11724  214-11724  233-12946  233-12946 #236-13101 
.TTFDI	  042556 RG	 213-11507  213-11507 #235-13064 
.TTICK	  043346 RG	 217-11854  217-11854 #242-13393 
.TTIXC	  043452 RG	 202-10976  202-10976  205-11072  205-11072  207-11149  207-11149 #244-13466 
.TTP11	  002640 RG	#17-883     170-9047  *198-10853 *199-10886  202-10971  207-11140  209-11208  217-11874  237-13168 
                         239-13246  273-14928  274-15003 
.TTQDS	  043402 RG	 158-8656  #243-13428 
.TTQEN	  043412 RG	 158-8659  #243-13433 
.TTRNG	  037702 R	 218-11905  218-11905 #218-11941 
.TTRST	  043232 RG	 231-12622  232-12717  232-12717  233-12864  233-12864 #240-13305 
.TTSCW	  037706 R	 218-11930  218-11930 #218-11946 
.TTSTP	  043046 RG	 237-13180  237-13180 #238-13208  247-13687  247-13687  274-15010 
.TTSW2	  044202 RG	 158-8655   158-8655   213-11491  213-11491  214-11684  214-11684  217-11847  217-11847  225-12319 
                         225-12319  233-12877  233-12877  235-13069  235-13069  240-13315  240-13315  244-13467  244-13467 
                         247-13667  247-13667 #249-13746 
.TTS2F	  005054 RG	#29-1027    213-11483 *241-13365 *245-13537 *246-13596 
.TTXOF	  042752 RG	 160-8705   160-8705   217-11844  217-11844 #237-13161 
.TTXON	  043074 RG	 161-8735   161-8735   217-11840  217-11840 #239-13238 
.VCLUN	  016104 RG	#78-3879    103-5434   103-5434   105-5575   105-5575   124-6683   124-6683  
.VERNO	  001036 RG	#9-498     
.WRMBX	= 071000	#7-288     #48-2204   #80-4024   #82-4348   #86-4617   #145-8240  #176-9383  #190-10386 #253-13880 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 38

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.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	  045644 RG	 76-3724    76-3724    124-6751   124-6751   186-10130  186-10130  236-13111  236-13111  248-13716 
                         248-13716 #270-14629  272-14809  272-14809  279-15295  279-15295  281-15522  281-15522 
..ALC2	  045660 RG	#270-14636 
..ALOW	  046134 RG	 165-8855   165-8855   171-9134   171-9134  #272-14808  272-14812  278-15207  278-15207 
..BLXI	  050310 RG	#287-15868 
..BLXO	  050322 RG	 259-14144  259-14144 #287-15874 
..DECB	  046000 RG	 81-4258    81-4258    178-9519   178-9519   259-14163  259-14163 #271-14729 
..DECN	  045774 RG	 85-4509    85-4509    165-8879   165-8879   166-8902   166-8902   170-9104   170-9104   179-9649  
                         179-9649   204-11048  204-11048  207-11148  207-11148  258-14106  258-14106 #271-14727  273-14898 
                         273-14910  274-15020  274-15020 
..DEC2	  045770 RG	#271-14723 
..DQRN	  044660 RG	 198-10851  198-10851 #260-14204  260-14278 
..DSEV	  045254 RG	 76-3768    76-3768    79-3935    79-3935    111-5889   111-5889   124-6854   124-6854   128-7187  
                         143-8100   143-8100   178-9510   178-9510   179-9626   179-9626   210-11291  210-11291  217-11865 
                         217-11865  217-11870  217-11870  218-11912  218-11912  224-12291  231-12604  259-14153  259-14153 
                        #262-14341  285-15678  285-15678 
..DTP1	  050264 RG	 90-4890    90-4890   #285-15675 
..DTP2	  050234 RG	 89-4761    89-4761    180-9743   180-9743  #284-15649 
..DTSP	  050216 RG	 81-4093    81-4093    84-4469    84-4469    180-9753   180-9753   196-10790  196-10790  280-15482 
                         280-15482 #283-15626  284-15652  284-15652 
..ENB0	  045530 RG	 79-3950    79-3950    81-4170    81-4170    81-4288    81-4288    260-14268  260-14268  260-14274 
                         260-14274  265-14435  265-14435 #268-14541  289-16078  289-16078  289-16112  289-16112 
..ERLG	  044440 RG	 197-10821  197-10821  197-10824  197-10824  197-10827  197-10827 #258-14083  258-14107 
..FSTD	  045564 RG	 126-6955   126-6955   127-7038   127-7038   131-7348   131-7348   137-7665   137-7665  #269-14580 
..INTX	  015062 RG	 43-1850   #75-3577    84-4472    143-8122   177-9458   220-12151  268-14550 
..IODN	  044540 RG	 199-10885  199-10885 #259-14134  260-14277  260-14277 
..IPRI	  045350 RG	 76-3765    76-3765    76-3783    76-3783    124-6852   124-6852  #265-14422 
..NADD	  045424 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-14434  265-14434 #266-14456  278-15241 
                         278-15241  279-15292  279-15292 
..NDEL	  045310 RG	 73-3364    73-3364    81-4251    81-4251    131-7365   131-7365   178-9516   178-9516  #264-14390 
                         267-14503  267-14503 
..PICK	  045466 RG	 73-3392    73-3392    76-3692    76-3692    128-7165   128-7165   131-7339   131-7339   137-7707  
                         137-7707   260-14219  260-14219 #267-14497 
..SACK	  046620 RG	 167-8921   167-8921   209-11226  209-11226 #276-15083 
..SEFN	  045202 RG	 259-14151  259-14151 #261-14303 
..SPLP	= ******  GX	 39-1546   
..STCH	  046554 RG	 217-11846  217-11846 #275-15045 
..STCR	= ******  GX	 39-1550   
..STFC	  046704 RG	 162-8762   162-8762   162-8787   162-8787   175-9332   175-9332   195-10718  195-10718  195-10720 
                         195-10720  195-10724  195-10724  227-12484  227-12484  275-15058  275-15058 #277-15126 
..STIN	  047074 RG	 162-8772   162-8772   162-8782   162-8782   258-14091  258-14091 #278-15196 
..STLP	= ******  GX	 39-1546   
..STPT	  046370 RG	 39-1530    39-1534    39-1538    39-1542    240-13324  240-13324 #274-14965 
..STQ 	  047274 RG	 214-11591  214-11591  277-15141  277-15141  277-15151  277-15151 #279-15272 
..STTY	  046154 RG	 39-1530    39-1534    39-1538    39-1542    170-9035   170-9035   170-9054   170-9054  #273-14861 
..SWED	  050116 RG	 90-4795    90-4795    90-4806    90-4806    90-4816    90-4816    90-4823    90-4823    90-4863   
                         90-4863    90-4870    90-4870    91-4932    91-4932    99-5275    99-5275   #282-15577 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 39

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

..VTOL	  050376 RG	 124-6833   124-6833  #288-15962 
..VVLL	  050560 RG	 288-15997  288-15997 #289-16047 
..VXFR	  050302 RG	 260-14264  260-14264 #286-15717  287-15880  287-15880 
..WFED	  047444 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-9549   178-9549   180-9719  
                         180-9719   180-9801   180-9801   182-9921   182-9921   183-9988   184-10042  184-10042  185-10079 
                         185-10079 #280-15381  282-15586  282-15586  282-15602  282-15602 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 40

MACRO CROSS REFERENCE                                   CREF   04.00 

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-8782   162-8787   164-8832   164-8834  
                 165-8855   165-8868   165-8870   165-8879   166-8902   167-8914   167-8916   167-8921   170-8968   170-9033  
                 170-9035   170-9054   170-9104   171-9134   175-9332  #176-9381   178-9510   178-9516   178-9519   178-9524  
                 178-9549   178-9555   179-9626   179-9649   179-9655   179-9668   179-9676   180-9719   180-9743   180-9753  
                 180-9780   180-9801   180-9808   180-9813   181-9863   181-9871   182-9921   182-9924   182-9932   182-9949  
                 182-9951   184-10042  184-10044  185-10079  186-10130 #190-10384  194-10699  194-10700  194-10705  195-10718 
                 195-10720  195-10724  196-10790  196-10813  197-10821  197-10824  197-10827  198-10851  199-10885  201-10929 
                 202-10943  202-10964  202-10974  202-10976  204-11048  205-11072  207-11134  207-11148  207-11149  209-11220 
                 209-11226  210-11291  210-11298  213-11481  213-11491  213-11494  213-11507  213-11508  213-11517  213-11519 
                 214-11579  214-11591  214-11647  214-11663  214-11664  214-11665  214-11684  214-11703  214-11721  214-11724 
                 216-11767  217-11840  217-11844  217-11846  217-11847  217-11850  217-11854  217-11865  217-11870  218-11905 
                 218-11912  218-11924  218-11930  218-11942  220-12144  223-12259  225-12319  225-12320  226-12371  226-12406 
                 226-12419  227-12473  227-12484  228-12512  229-12540  231-12618  232-12658  232-12670  232-12696  232-12717 
                 232-12747  233-12850  233-12864  233-12877  233-12896  233-12946  234-13004  234-13005  234-13013  234-13022 
                 235-13069  236-13111  237-13174  237-13180  238-13209  239-13252  239-13266  239-13269  239-13276  240-13315 
                 240-13321  240-13324  241-13364  244-13467  244-13477  245-13532  245-13546  245-13550  246-13603  246-13621 
                 247-13667  247-13670  247-13675  247-13677  247-13681  247-13687  248-13716  250-13788 #253-13876  255-13957 
                 258-14091  258-14106  259-14144  259-14151  259-14153  259-14158  259-14163  260-14219  260-14264  260-14268 
                 260-14274  260-14277  261-14309  265-14434  265-14435  267-14503  272-14809  273-14873  273-14875  273-14879 
                 273-14935  274-14976  274-14979  274-14995  274-15020  275-15050  275-15058  276-15087  277-15141  277-15151 
                 278-15207  278-15225  278-15238  278-15241  279-15283  279-15292  279-15295  280-15419  280-15435  280-15472 
                 280-15482  281-15522  282-15586  282-15602  284-15652  285-15678  287-15880  288-15997  289-16078  289-16112 
CLEF$ 		#190-10384 
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-8801  #190-10385  193-10659 
                 193-10669  193-10673  193-10677  193-10685 #193-10687  193-10687  196-10773 #253-13875 #258-14097  258-14097 
                #272-14811  272-14811 
DMYG$ 		#253-13875 
DTON$S		#48-2201   #80-4022    81-4276   
EHSG$ 		#190-10385  191-10559 
EPASCI		#66-2862    66-2883   
ERR$  		#66-2827   #66-2838   #81-4052   #81-4066   #81-4128   #81-4199   #81-4275   #81-4276   #147-8354  #163-8801  
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 41

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

                #193-10659 #193-10669 #193-10673 #193-10677 #193-10685 #193-10687 #196-10773 #258-14097 #272-14811 
F11DF$		#7-285      7-289     #253-13877  253-13881 
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-9342   176-9342   189-10192  189-10192  252-13800  252-13800 
MFPI  		#48-2201    77-3820    77-3821   #86-4615   #102-5380   103-5431   103-5446  #104-5522   105-5574  #108-5742  
                #117-6223   118-6285   118-6286   118-6287  #123-6542   124-6682   124-6692   124-6694   124-6726  #125-6911  
                 128-7147   128-7173   131-7333   131-7334  #132-7444  #134-7535  #140-7917   141-7968   141-7969  #253-13876 
                 269-14585  269-14586 
MFPS  		#7-283      43-1833   #48-2201    67-2923    67-2957    67-3091    77-3840   #86-4615    87-4655    87-4663   
                 87-4664    87-4667    97-5196    97-5197    97-5198    98-5238    99-5268    99-5273    100-5313  #102-5380  
                 103-5448   103-5450  #104-5522   105-5582  #106-5627   107-5691  #108-5742   115-6121   115-6124   115-6127  
                 115-6129   115-6137   115-6139  #117-6223  #123-6542   124-6679   124-6713   124-6797  #125-6911   131-7371  
                #132-7444   133-7495  #134-7535   135-7583  #136-7629   137-7701   137-7702   137-7703   137-7704   137-7705  
                #138-7791   139-7870  #140-7917   141-7992  #253-13876  255-13949  282-15597  282-15598  282-15599 
MOV$  		#81-4052    81-4052   #81-4275    81-4275   
MRKT$ 		#48-2202   #145-8238  
MRKT$S		#48-2202   
MTPI  		#48-2201   #86-4615   #104-5522   105-5584  #106-5627   107-5693  #108-5742  #117-6223  #123-6542   124-6698  
                 124-6700  #125-6911  #132-7444  #134-7535  #140-7917   141-8005  #253-13876 
MTPS  		#48-2201   #86-4615    97-5167    97-5168    97-5169    97-5174    97-5175    97-5176    97-5177    100-5317  
                #108-5742   113-5987   113-5988   113-5989   113-5990  #117-6223  #123-6542  #125-6911   131-7378   131-7379  
                 131-7383  #132-7444  #134-7535  #138-7791   139-7874  #140-7917   141-8008  #253-13876  282-15588  282-15589 
                 282-15590 
OFF$  		#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   #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  
                #191-10561  191-10561  191-10561  191-10561  191-10561  191-10561  191-10561 #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 
PSW   		#7-318      8-345      8-347      8-349      8-351      8-353      8-355      8-357      8-359      8-364     
                 8-364      8-364      8-364      8-366      8-367      8-371      8-371      8-373      8-377      8-377     
                 8-379      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-387      8-394      8-394      8-396     
                 8-401      8-401      8-401      8-401      8-403      8-405      8-410      8-413      8-414      8-416     
                 8-417      8-419      8-420      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      8-434      8-435      8-437      8-438      8-440     
                 8-441      8-444      8-445      8-453      8-453      8-453      8-453     
QDPB$ 		#81-4294    81-4294   
QIOSY$		#48-2202    48-2203   
QIOW$ 		#48-2200   #80-4022    81-4294   
RETURN		 44-1987    45-2043   #48-2201    76-3681    76-3696    76-3785    77-3844    78-3910    79-3953   #80-4022   
                 81-4233    84-4484    85-4544   #86-4615    101-5340  #102-5379  #104-5522  #106-5627  #108-5742  #117-6223  
                #119-6361  #121-6459  #123-6542  #125-6911  #132-7444  #134-7535  #136-7629  #142-8059  #145-8238   170-9065  
                 171-9144   172-9181   173-9214   175-9316  #176-9381   182-9954   185-10083  186-10136  187-10162  188-10187 
                #190-10384  202-10958  208-11183  209-11222  209-11229  210-11252  211-11319  214-11593  217-11857  217-11880 
                 218-11937  218-11948  219-11970  221-12188  222-12215  225-12332  226-12434  227-12486  229-12544  230-12571 
                 231-12607  232-12701  232-12761  233-12915  233-12948  234-13034  235-13081  236-13138  237-13188  238-13215 
RSXTOPS10  CREATED BY  MACRO  ON 16-MAY-88 AT 15:48	PAGE 42

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

                 239-13280  240-13339  241-13367  243-13445  244-13480  247-13692  248-13727  249-13752  250-13790 #253-13876 
                 255-13971  257-14053  258-14110  259-14166  260-14269  262-14343  263-14371  264-14398  265-14437  266-14466 
                 267-14506  269-14605  270-14689  271-14788  272-14815  273-14885  273-14940  274-14983  274-15024  275-15063 
                 276-15112  277-15145  278-15249  279-15313  280-15498  281-15552  282-15605  285-15681  286-15720  287-15925 
                 288-16019  289-16118 
RQST$ 		#48-2199    66-2854    66-2858   #145-8237   146-8318  #190-10385  191-10561  191-10563  191-10565 
RSXVR$		#7-291      9-499      9-499     
R50$  		#66-2854    66-2854    66-2854   #66-2858    66-2858    66-2858   #146-8318   146-8318   146-8318  #191-10561 
                 191-10561  191-10561 #191-10563  191-10563  191-10563 #191-10565  191-10565  191-10565 
WSIG$S		#48-2202   #80-4023    81-4066    81-4128   #145-8237  #190-10384  193-10687 #253-13878  258-14097  272-14811 
WTLO$ 		#48-2202   #145-8238   146-8315  #190-10384  191-10557 
WTLO$C		#48-2202   
WTSE$ 		#48-2200   #145-8238  
WTSE$S		#48-2200   #80-4022    81-4052   #145-8237  
$DEF  		#7-285      7-288     #48-2200    48-2204   #80-4023    80-4024   #82-4347    82-4348   #86-4615    86-4617   
                #145-8237   145-8240  #176-9381   176-9383  #190-10385  190-10386 #253-13877  253-13880 
.ATLEN		#7-284      37-1399    37-1403    37-1408    37-1416    37-1423    37-1431    37-1439    37-1454    37-1458   
.CRASH		#7-283      43-1845    43-1869    43-1876    43-1879    43-1882    43-1893   #48-2199    71-3304    75-3653   
                #80-4022   #82-4347    84-4449   #86-4615   #142-8059  #145-8238   149-8428  #176-9381   177-9437   177-9443  
                 178-9495   179-9608   179-9637   179-9642   180-9737   180-9774   180-9794   180-9805  #190-10385  248-13729 
                #253-13875  279-15297 
.DQPEN		#7-286      39-1530    39-1534    39-1538    39-1542    39-1546    39-1550    39-1553    39-1556   #48-2201   
                #145-8238  
.ENB  		#48-2199   #86-4615   #253-13879 
.ENBT 		#145-8247   162-8771   162-8781   165-8854   171-9133  
.ENB0 		#48-2199    79-3950   #80-4023    81-4170    81-4288   #253-13878  260-14268  260-14274  265-14435  289-16078 
                 289-16112 
.ENB5 		#48-2199   #145-8237  #190-10384  194-10707 #253-13876 
.ENB6 		#48-2199    66-2810    66-2826    66-2837   #80-4023    81-4065    81-4094    81-4127    81-4198   #145-8238  
                 147-8352   147-8369  #190-10384  193-10664  196-10814  198-10854  201-10931 #253-13879  264-14396  266-14464 
                 267-14505  270-14686  271-14783  277-15143  278-15242 
.INH  		#48-2199   #86-4615   #253-13879 
.INHT 		#145-8254   162-8773   162-8783   165-8856   171-9135  
.INH0 		#48-2199    79-3938   #253-13878  260-14216  265-14425  289-16051 
.INH5 		#48-2199   #145-8237  #190-10384  194-10695 #253-13876 
.INH6 		#48-2199    66-2815   #80-4023    81-4068    81-4129    81-4200   #145-8238   147-8356   147-8373  #190-10384 
                 193-10660  196-10811  198-10837  201-10928 #253-13879  264-14392  266-14459  267-14499  270-14640  271-14738 
                 277-15128  278-15233 
.PUDEN		#7-284     #7-286      40-1583    40-1597    40-1603    40-1608    40-1613    40-1618    40-1623    40-1628   
                 40-1633    40-1641    40-1645    40-1665    40-1670    40-1680   
.STDEN		#7-284      36-1332    36-1336    36-1341    36-1355    36-1364    36-1369    36-1374    36-1379    36-1383   
                 36-1386   
.STKM 		#48-2200    65-2807   #80-4022    81-4048   #142-8059  #145-8238   147-8347  #190-10384  191-10542 
.TPDEN		#7-286      38-1469    38-1473    38-1477    38-1481    38-1485    38-1490    38-1494    38-1498    38-1508   
                 38-1513    38-1517