Google
 

Trailing-Edge - PDP-10 Archives - BB-H311B-RM - rsx20f-swskit/listings/rsxt91.lis
There are no other files named rsxt91.lis in the archive.
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47
TABLE OF CONTENTS

     6-  309	LOW CORE -- TRAP VECTORS
     7-  419	LOW CORE -- COMMON GLOBAL DATA
     8-  534	LOW CORE -- KLINIK DATA BASE
     9-  568	LOW CORE -- COMMIUNICATIONS REGION DATA BASE
    10-  606	LOW CORE -- QUEUED PROTOCOL DATA BASE
    11-  701	LOW CORE -- KEEP-ALIVE DATA BASE
    12-  715	LOW CORE -- CORE MANAGER DATA BASE
    13-  751	LOW CORE -- CLOCK REQUEST LIST
    15-  792	LOW CORE -- TERMINAL SERVICE DATA BASE
    16-  842	LOW CORE -- PDP-11 CTY SERVICE DATA BASE
    17-  857	LOW CORE -- TERMINAL DRIVER DATA BASE
    18-  875	LOW CORE -- DATA LINE SCANNER DATA BASE
    19-  905	LOW CORE -- DH-11 DATA BASE
    28-  963	LOW CORE -- FLOPPY DRIVER DATA BASE
    29-  979	LOW CORE -- DISC DRIVER DATA BASE
    30-  994	LOW CORE -- FE DRIVER DATA BASE
    31- 1033	LOW CORE -- CD-11 DRIVER DATA BASE
    32- 1078	LOW CORE -- LP-20 DRIVER DATA BASE
    33- 1165	LOW CORE -- STD (SYSTEM TASK DIRECTORY)
    34- 1287	LOW CORE -- ATL (ACTIVE TASK LIST)
    35- 1350	LOW CORE -- TPD (TASK PARTITION DIRECTORY)
    36- 1411	LOW CORE -- DEVICE QUEUE POINTERS
    37- 1457	LOW CORE -- LOGICAL UNIT TABLES
    38- 1571	LOW CORE -- KL10 HARDWARE ENVIRONMENT DATA
    39- 1593	LOW CORE -- INITLM (INITIALIZATION)
    40- 1622	LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS
    41- 1737	LOW CORE -- CRASH ROUTINE
    42- 1809	LOW CORE -- I/O PAGE SNAPSHOT
    43- 1858	LOW CORE -- PATCH SPACE
    44- 1877	EXEC MODULE ONE -- TITLE PAGE
    45- 1938	EXEC MODULE ONE -- SYSTEM NOTES
    46- 1993	EXEC MODULE ONE -- GLOSSARY
    46- 2018	MACRO CALLS (MCALL)
    47- 2030	EXEC MODULE ONE -- SYMBOLIC DEFINITIONS
    63- 2603	EXEC MODULE ONE -- NUL TASK
    65- 2683	EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS
    66- 2949	EXEC MODULE THREE -- TITLE PAGE
    67- 2985	EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST
    74- 3376	EXEC MODULE NINE -- TITLE PAGE
    75- 3413	EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM
    80- 3888	SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE
    82- 4177	POWERFAIL -- POWER DOWN
    83- 4228	POWERFAIL -- POWER UP ENTRY
    84- 4277	POWERFAIL -- POWER FAIL RESTART
    86- 4396	DTE20 EMT DISPATCH DECODER
    87- 4469	$DORBL -- RING THE KL-10 DOORBELL
    88- 4524	$DTEOF -- TURN THE DTE20 OFF
    89- 4564	$DTEON -- TURN THE DTE20 ON
    90- 4697	$DPMYG -- DEPOSIT INTO MY GENERAL SECTION
    91- 4740	$EXMYG -- EXAMINE MY GENERAL SECTION
    92- 4772	$EXMYN -- EXAMINE MY SECTION FOR PROCESSOR N
    93- 4804	$DPMYN -- DEPOSIT INTO MY SECTION FOR COMM WITH PROCESSOR N
    94- 4836	$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION
    95- 4870	$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME
    96- 4902	$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION
    97- 4988	$PRVEX -- PRIVILEDGED EXAMINE
    98- 5025	$PRVDP -- PRIVILEDGED DEPOSIT
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47
TABLE OF CONTENTS

    99- 5057	$RWDRG -- READ/WRITE DIAGNOSTIC REGISTER
   100- 5092	FNDCPU -- INTERNAL SUBROUTINE FIND THE DTE NUMBER
   101- 5130	FNDDTE -- INTERNAL SUBROUTINE TO FIND THE DTE20
   102- 5158	CESCHK -- CHECK FOR CLOCK ERROR STOP
   104- 5215	DIRECTIVE -- ASSIGN LUN
   106- 5357	DIRECTIVE -- GET LUN INFORMATION
   108- 5462	DIRECTIVE -- GET TIME PARAMETERS
   110- 5576	DIRECTIVE -- CLEAR EVENT FLAG
   111- 5626	DIRECTIVE -- SET EVENT FLAG
   112- 5676	DIRECTIVE -- DECLARE SIGNIFICANT EVENT
   113- 5737	DIRECTIVE -- READ EVENT FLAG
   114- 5785	DIRECTIVE -- READ ALL EVENT FLAGS
   115- 5828	DIRECTIVE -- WAITFOR SINGLE EVENT FLAG
   116- 5891	DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS
   117- 5983	DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT
   119- 6056	DIRECTIVE -- MARK TIME
   121- 6192	DIRECTIVE -- CANCEL MARK-TIME REQUESTS
   123- 6290	DIRECTIVE -- SUSPEND EXECUTION
   124- 6330	DIRECTIVE -- RESUME TASK EXECUTION
   126- 6437	DIRECTIVE -- TASK EXIT
   128- 6518	DIRECTIVE -- QUEUE I/O
   130- 6895	DIRECTIVE -- SEND DATA
   131- 6951	DIRECTIVE -- SEND AND REQUEST OR RESUME
   133- 7172	DIRECTIVE -- RECEIVE DATA
   134- 7209	DIRECTIVE -- RECEIVE DATA OR EXIT
   135- 7250	DIRECTIVE -- RECEIVE DATA OR SUSPEND
   137- 7428	DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK
   139- 7518	DIRECTIVE -- SPECIFY POWER FAIL AST
   141- 7611	DIRECTIVE -- TASK SCHEDULING -- REQUEST
   143- 7772	DIRECTIVE -- GET TASK PARAMETERS
   145- 7897	DIRECTIVE -- GET PARTITION PARAMETERS
   147- 8039	CLOCK TICK RECOGNITION
   151- 8236	QUEUED PROTOCOL -- PROTOCOL PACKET SERVICE DISPATCH
   152- 8313	QUEUED PROTOCOL -- ENABLE/DISABLE SENDALL AND XOFF PROCESSING
   153- 8345	QUEUED PROTOCOL -- HANGUP
   154- 8403	QUEUED PROTOCOL -- SET LINE ALLOCATION
   155- 8486	QUEUED PROTOCOL -- STOP LINE INPUT
   156- 8538	QUEUED PROTOCOL -- FIND LINE SPEED
   157- 8574	QUEUED PROTOCOL -- XOFF
   158- 8602	QUEUED PROTOCOL -- XON
   159- 8640	QUEUED PROTOCOL -- HERE IS INITIAL STATUS
   160- 8681	QUEUED PROTOCOL -- RETURN TIME OF DAY
   161- 8707	QUEUED PROTOCOL -- STRING DATA
   162- 8741	QUEUED PROTOCOL -- FIND DEVICE NAME
   164- 8857	QUEUED PROTOCOL -- LINE NUMBER - CHARACTER
   165- 8903	QUEUED PROTOCOL -- RETURN TIME OF DAY
   166- 8929	QUEUED PROTOCOL -- FLUSH DEVICE OUTPUT QUEUE
   167- 8947	QUEUED PROTOCOL -- RECIEVE KLINIK PARAMETERS
   168- 8969	QUEUED PROTOCOL -- SENDALL
   169- 9131	QUEUED PROTOCOL -- COPY BUFFER
   170- 9172	DTE20 DRIVER -- DTE20 INTERRUPT SERVICE
   171- 9220	DTE20 DRIVER -- TO TEN DONE SERVICE
   172- 9291	DTE20 DRIVER -- TO ELEVEN DONE SERVICE
   173- 9445	DTE20 DRIVER -- DOORBELL SERVICE
   174- 9571	DTE20 DRIVER -- START TO TEN QUEUE
   176- 9702	TTY DRIVER -- DEFINITIONS
   179- 9911	TTY DRIVER -- TTINI (TTY QUEUE SERVICE)
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47
TABLE OF CONTENTS

   180- 9947	TTY DRIVER -- TIMEOUT SERVICE
   181- 9968	TTY DRIVER -- TERMINAL ERROR LOGGING
   182- 9997	TTY DRIVER -- ACK ALL SERVICE
   183-10024	TTY DRIVER -- KL KEEP-ALIVE SERVICE
   184-10112	TTY DRIVER -- CTY SERVICE
   185-10157	TTY DRIVER -- CTY I/O DONE SERVICE
   186-10171	TTY DRIVER -- CTY INPUT SERVICE
   187-10188	TTY DRIVER -- CTY OUTPUT SERVICE
   188-10217	TTY DRIVER -- $DHOUT (DH11 OUTPUT INTERRUPT)
   189-10257	TTY DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)
   190-10315	TTY DRIVER -- STNXT (START NEXT OUTPUT OPERATION)
   191-10359	TTY DRIVER -- .DHSTO (START DH-11 OUTPUT)
   192-10388	TTY DRIVER -- $TTOUT (DL11 OUTPUT INTERRUPT)
   193-10415	TTY DRIVER -- .DLSTO (START DL-11 OUTPUT)
   194-10442	TTY DRIVER -- TTACK (ACKNOWLEDGE A TTY LINE)
   195-10462	TTY DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)
   196-10542	TTY DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)
   197-10579	TTY DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)
   198-10710	TTY DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)
   199-10733	TTY DRIVER -- $DHINP (DH11 INPUT INTERRUPT)
   200-10875	TTY DRIVER -- $TTINP (DL11 INPUT INTERRUPT)
   201-10907	TTY DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)
   202-11000	TTY DRIVER -- .DLINT (DL11-E DATASET INTERRUPT SERVICE)
   203-11057	TTY DRIVER -- TTCTY (CTY SERVICE)
   204-11206	TTY DRIVER -- DHSAV (DH11 REGISTER SAVE/RESTORE CO-ROUTINE)
   205-11259	TTY DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)
   206-11321	TTY DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)
   207-11400	TTY DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROLLER)
   208-11426	TTY DRIVER -- .DHSPD (DH-11 AUTO-BAUD SUPPORT)
   209-11486	TTY DRIVER -- $DMINT (DM11 MODEM CONTROL INTERRUPT)
   210-11589	TTY DRIVER -- .STTYD (DIALUP/HANGUP SERVICE)
   211-11628	TTY DRIVER -- .DMHUP (DM11 HANGUP)
   212-11659	TTY DRIVER -- .DLHUP (DL11E HANGUP)
   213-11709	TTY DRIVER -- .DLTMO (DL11-E MODEM CONTROL TIMEOUT)
   214-11796	TTY DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)
   215-11973	TTY DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)
   216-12025	TTY DRIVER -- .TTERL (TERMINAL ERROR LOGGING)
   217-12078	TTY DRIVER -- .TTRST (RESET A TERMINAL LINE)
   220-12196	SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)
   221-12216	SCOMM MODULE -- .CEFN   (CONVERT EFN)
   222-12276	SCOMM MODULE -- .CKDEL  (CLOCK DELETE)
   224-12350	SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)
   225-12402	SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)
   226-12513	SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)
   227-12551	SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)
   228-12569	SCOMM MODULE -- DIV216   (DIV R2 BY 16)
   229-12592	SCOMM MODULE -- ..NDEL	(NODE DELETE)
   230-12618	SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)
   231-12653	SCOMM MODULE -- ..NADD	(NODE ADD)
   232-12682	SCOMM MODULE -- ..PICK	(PICK A NODE)
   233-12725	SCOMM MODULE -- ..ENB0	(ENABLE TASK SWITCHING)
   234-12768	SCOMM MODULE -- ..FSTD	(FIND STD ENTRY)
   235-12820	SCOMM MODULE -- ..ALCB/..DECB/..ALC2/..DEC2	(ALLOCATE/DEALLOCATE CORE)
   237-12959	SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)
   238-12978	SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)
   239-13116	SCOMM MODULE -- ..STPT	(STOP TTY)
   240-13212	SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 Q)
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47
TABLE OF CONTENTS

   241-13250	SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)
   242-13290	SCOMM MODULE -- ..STFC	(STORE FUNCTION)
   243-13344	SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)
   244-13427	SCOMM MODULE -- ..STQ	(STORE IN TO 10 Q)
   245-13492	SCOMM MODULE -- WFED	(WAIT FOR EXAMINE/DEPOSIT)
   246-13651	SCOMM MODULE -- SWFED	(START AND WAIT FOR EX/DEP)
   247-13698	SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)
   248-13726	SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)
   249-13755	SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)
   250-13781	SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)
   251-13927	SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)
   252-14018	SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL)
   253-14100	SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL)
  1209-15149	END
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1110  15-OCT-79 13:47  PAGE 1


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


     58		000001 				$RX11	=1	; INCLUDE FLOPPY DRIVER FOR TOPS-10/1091
     59					.ENDC			; $T1091
     60					.ENDC			; $TOP10
     61
     62					.IF DF	$TOP20
     63						$RX11	=1	; INCLUDE FLOPPY DRIVER
     64					.ENDC			; $TOP20
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1110  15-OCT-79 13:47  PAGE 2


     66						.TITLE	RSX20F	-- RESIDENT EXECUTIVE (SYSTEM DEFINITION)
     67						.IDENT	/013410/
     68						.ENABL	AMA
     69						.LIST	MEB
     70						.NLIST	CND
     71					;
     72					;                             COPYRIGHT (C) 1975, 1978 BY
     73					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     74					;
     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 13-41
     91					;
     92					; MODIFIED BY:
     93					;
     94					; FUNCTION: THIS MODULE PROVIDES THE PARAMETERS FOR ASSEMBLY OF THE RSX20F EXEC.
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1110  15-OCT-79 13:47  PAGE 3


     96					;
     97					; SET VERSION OF RSX20F EXEC HERE
     98					;
     99		000013 			RSX$$V	=	13		; VERSION 13
    100		000041 			RSX$$E	=	41		; EDIT 41
    101					;
    102					; RELEASE VERSION
    103					;
    104		000126 			RSX$$K	=	'V		; KEY FOR RELEASE-TYPE
    105									; "V" -- RELEASE
    106									; "X" -- EXPERIMENTAL
    107									; "Y" -- FIELD/LOAD TEST
    108		000000 			RSX$$F	=	0		; DEFINE FORM AS NULL
    113		000105 			RSX$$F	=	'E		; TOPS-10 / 1091
    122					;
    123					; DTE-20 REGISTER OFFSETS
    124					;
    125		000036 			DAG3	=36
    126		000034 			STATD	=34
    127		000032 			DAG2	=32
    128		000030 			DAG1	=30
    129		000022 			T11AD	=22
    130		000020 			T10AD	=20
    131		000016 			T11BC	=16
    132		000010 			TNAD1	=10
    133		000012 			TNAD2	=12
    134		000006 			DXWD1	=6
    135		000004 			DXWD2	=4
    136		000002 			DXWD3	=2
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1110  15-OCT-79 13:47  PAGE 4


    138					;+
    139					; MACRO TO SET IDENT FOR EXEC MODULES.
    140					; FORMAT OF CALL IS:
    141					;	IDENT$	VERSION,EDIT
    142					; OR
    143					;	IDENT$	VERSION,EDIT,RSX$$F
    144					; IF MODULE CODING CHANGES WITH DIFFERENT FORMS
    145					;-
    146
    147						.MACRO	IDENT$ VER,EDT,FRM,NUM
    148						.IF	B,NUM
    149						.IF	B,FRM
    150						IDENT$	\VER,\EDT,0,0
    151						.IFF
    152						.IF	EQ,<FRM-'A>
    153						IDENT$	\VER,\EDT,A,0
    154						.IFF
    155						.IF	EQ,<FRM-'B>
    156						IDENT$	\VER,\EDT,B,0
    157						.IFF
    158						IDENT$	\VER,\EDT,E,0
    159						.ENDC
    160						.ENDC
    161						.ENDC
    162						.MEXIT
    163						.IFF
    164						.IF	GE,VER-10
    165						.IF	GE,EDT-10
    166						.LIST
    167						.IDENT	/'FRM'VER'EDT'0/
    168						.NLIST
    169						.IFF
    170						.LIST
    171						.IDENT	/'FRM'VER'0'EDT'0/
    172						.NLIST
    173						.ENDC
    174						.IFF
    175						.IF	GE,EDT-10
    176						.LIST
    177						.IDENT	/'FRM'0'VER'EDT'0/
    178						.NLIST
    179						.IFF
    180						.LIST
    181						.IDENT	/'FRM'0'VER'0'EDT'0/
    182						.NLIST
    183						.ENDC
    184						.ENDC
    185						.ENDC
    186						.ENDM	IDENT$
    187						.TITLE	LC -- LOW CORE FOR RSX20F
    188	000000					IDENT$	RSX$$V,RSX$$E,RSX$$F
						.IDENT	/E13410/
    189					;
    190					;
    191					;                             COPYRIGHT (C) 1975, 1978 BY
    192					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
    193					;
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 4-1


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


    242
    243					;	EQUATED SYMBOLS:
    244					;
    245		000040 				PATSIZ==40			; SIZE OF PATCH SPACE
    246		001400 				POLMIN==1400			; FREE-POOL THRESHOLD
    247					;
    248					; MACRO LIBRARY CALLS
    249					;
    250						.MCALL	.CRASH,MFPS,CALL
    251						.MCALL	.PUDEN,.STDEN,.ATLEN
    252						.MCALL	$DEF,F11DF$
    253						.MCALL	.TPDEN,.PUDEN,.DQPEN
    254
    255	000000					$DEF
    256	000000					F11DF$
    257
    258						.MACRO	RSXVR$ KEY,FRM,VER,EDT,NUM
    259						.IF	B,NUM
    260						.IF	NB,FRM
    261						RSXVR$	\KEY,\FRM,\VER,\EDT,0
    262						.IFF
    263						RSXVR$	\KEY,200,\VER,\EDT,0
    264						.ENDC
    265						.MEXIT
    266						.IFF
    267						.IF	GE,VER-10
    268						.IF	GE,EDT-10
    269						.ASCIZ	<KEY><FRM>\'VER'-'EDT'\<200>
    270						.IFF
    271						.ASCIZ	<KEY><FRM>\'VER'-0'EDT'\<200>
    272						.ENDC
    273						.IFF
    274						.IF	GE,EDT-10
    275						.ASCIZ	<KEY><FRM>\0'VER'-'EDT'\<200>
    276						.IFF
    277						.ASCIZ	<KEY><FRM>\0'VER'-0'EDT'\<200>
    278						.ENDC
    279						.ENDC
    280						.ENDC
    281						.ENDM	RSXVR$
    282					;
    283					;	MACRO FOR GENERATING LOW CORE
    284					;
    285						.MACRO	PSW	PRI,TRPADR,UNIT
    286						.IF	B,<TRPADR>
    287						 .WORD	.-LOWCOD+1
    288						.IFF
    289						 .WORD	TRPADR
    290						.ENDC		; IFB <TRPADR>
    291						.IF	B,<UNIT>
    292						 .WORD	0+<40*PRI>+4000
    293						.IFF
    294						 .WORD	UNIT+<40*PRI>+4000
    295						.ENDC		; IFB <UNIT>
    296						.ENDM		; PSW
    297					;
    298						.MACRO	DHPSW	U
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 5-1


    299						 .WORD	$DMINT		; DM-11/BB #'U INTERRUPT
    300						 .WORD	U+<40*6>+4000
    301						 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
    302						 .WORD	<40*6>+4000
    303						 .WORD	$DHINP		; DH-11 #'U INPUT INTERRUPT
    304						 .WORD	U+<40*6>+4000
    305						 .WORD	$DHOUT		; DH-11 #'U OUTPUT INTERRUPT
    306						 .WORD	U+<40*6>+4000
    307						.ENDM
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 6
LOW CORE -- TRAP VECTORS

    309						.SBTTL	LOW CORE -- TRAP VECTORS
    310
    311		000000'			LOWCOD==.
    312	000000					PSW	6		; ILLEGAL INTERRUPT
	000000	000001 				 .WORD	.-LOWCOD+1
	000002	004300 				 .WORD	0+<40*6>+4000
    313					;
    314	000004					PSW	7,COMTRP,0	; TRAP TO 4 (TIMEOUT)
	000004	011000'				 .WORD	COMTRP
	000006	004340 				 .WORD	0+<40*7>+4000
    315					;
    316	000010					PSW	7,COMTRP,2	; RESERVED INSTRUCTION
	000010	011000'				 .WORD	COMTRP
	000012	004342 				 .WORD	2+<40*7>+4000
    317					;
    318	000014					PSW	6,COMTRP,4	; T BIT OR BPT TRAP
	000014	011000'				 .WORD	COMTRP
	000016	004304 				 .WORD	4+<40*6>+4000
    319					;
    320	000020					PSW	6,COMTRP,6	; IOT TRAP
	000020	011000'				 .WORD	COMTRP
	000022	004306 				 .WORD	6+<40*6>+4000
    321					;
    322	000024					PSW	7,.PWRDN	; POWER FAIL (POWER DOWN)
	000024	017176'				 .WORD	.PWRDN
	000026	004340 				 .WORD	0+<40*7>+4000
    323					;
    324	000030					PSW	7,EMTTRP,STXDX	; EMT TRAP
	000030	012450'				 .WORD	EMTTRP
	000032	004340 				 .WORD	STXDX+<40*7>+4000
    325					;
    326	000034					PSW	6,.DRSRN	; TRAP TRAP
	000034	012764'				 .WORD	.DRSRN
	000036	004300 				 .WORD	0+<40*6>+4000
    327					;
    328		000004 				.REPT	4
    329						PSW	6		; ILLEGAL INTERRUPTS
    330						.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
    331					;
    332	000060					PSW	6,$TTINP,0	; TTY LINE 0 INPUT (CTY)
	000060	036010'				 .WORD	$TTINP
	000062	004300 				 .WORD	0+<40*6>+4000
    333	000064					PSW	6,$TTOUT,0	; TTY LINE 0 OUTPUT (CTY)
	000064	034340'				 .WORD	$TTOUT
	000066	004300 				 .WORD	0+<40*6>+4000
    334					;
    335		000002 				.REPT	2.
    336						PSW	6		; ILLEGAL TRAPS
    337						.ENDR
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 6-1
LOW CORE -- TRAP VECTORS

	000070	000071 				 .WORD	.-LOWCOD+1
	000072	004300 				 .WORD	0+<40*6>+4000
	000074	000075 				 .WORD	.-LOWCOD+1
	000076	004300 				 .WORD	0+<40*6>+4000
    338					;
    339	000100					PSW	6,.KW11S	; CLOCK INTERRUPT
	000100	035472'				 .WORD	.KW11S
	000102	004300 				 .WORD	0+<40*6>+4000
    340					;
    341		000002 				.REPT	2
    342						PSW	6		; ILLEGAL INTERRUPT
    343						.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
    344					;
    345	000114					PSW	7,.PARER	; PARITY ERROR
	000114	011254'				 .WORD	.PARER
	000116	004340 				 .WORD	0+<40*7>+4000
    346					;
    347		000017 				.REPT	15.
    348						PSW	6		; EMERGENCY INTERRUPT
    349						.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
    350					;
    354	000214					PSW	6		; DECTAPE INTERRUPT
	000214	000215 				 .WORD	.-LOWCOD+1
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 6-2
LOW CORE -- TRAP VECTORS

	000216	004300 				 .WORD	0+<40*6>+4000
    356					;
    357		000002 				.REPT	2.
    358						PSW	6		; ILLEGAL INTERRUPT
    359						.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
    360					;
    361	000230					PSW	4,$CDINT	; CARD READER INTERRUPT
	000230	000000G				 .WORD	$CDINT
	000232	004200 				 .WORD	0+<40*4>+4000
    362					;
    363		000004 				.REPT	4.
    364						PSW	6		; ILLEGAL INTERRUPT
    365						.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
    366					;
    367	000254					PSW	4,.DBINT	; RH-11 (RP04/RP06) INTERRUPT
	000254	000000G				 .WORD	.DBINT
	000256	004200 				 .WORD	0+<40*4>+4000
    368					;
    369	000260					PSW	6		; ILLEGAL INTERRUPT
	000260	000261 				 .WORD	.-LOWCOD+1
	000262	004300 				 .WORD	0+<40*6>+4000
    370					;
    372	000264					PSW	6,$DXINT	; RX-11 INTERRUPT
	000264	000000G				 .WORD	$DXINT
	000266	004300 				 .WORD	0+<40*6>+4000
    376					;
    377	000270					PSW	6		; ILLEGAL INTERRUPT
	000270	000271 				 .WORD	.-LOWCOD+1
	000272	004300 				 .WORD	0+<40*6>+4000
    378	000274					PSW	6		; ILLEGAL INTERRUPT
	000274	000275 				 .WORD	.-LOWCOD+1
	000276	004300 				 .WORD	0+<40*6>+4000
    379					;
    380	000300					PSW	6,$TTINP,1	; DL-11E # 0 INPUT (KLINIK) INTERRUPT
	000300	036010'				 .WORD	$TTINP
	000302	004301 				 .WORD	1+<40*6>+4000
    381	000304					PSW	6,$TTOUT,1	; DL-11E # 0 OUTPUT (KLINIK) INTERRUPT
	000304	034340'				 .WORD	$TTOUT
	000306	004301 				 .WORD	1+<40*6>+4000
    382					;
    383	000310					PSW	6		; ILLEGAL INTERRUPT
	000310	000311 				 .WORD	.-LOWCOD+1
	000312	004300 				 .WORD	0+<40*6>+4000
    384	000314					PSW	6		; ILLEGAL INTERRUPT
	000314	000315 				 .WORD	.-LOWCOD+1
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 6-3
LOW CORE -- TRAP VECTORS

	000316	004300 				 .WORD	0+<40*6>+4000
    385					;
    386		000000 				U=0
    387						.IRP	U,<0,1,2,3,4,5,6,7>
    388						DHPSW	U
    389					;
    390						.ENDR
	000320	037760'				 .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	035504'				 .WORD	$DHINP		; DH-11 #0 INPUT INTERRUPT
	000332	004300 				 .WORD	0+<40*6>+4000
	000334	033734'				 .WORD	$DHOUT		; DH-11 #0 OUTPUT INTERRUPT
	000336	004300 				 .WORD	0+<40*6>+4000
	000340	037760'				 .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	035504'				 .WORD	$DHINP		; DH-11 #1 INPUT INTERRUPT
	000352	004301 				 .WORD	1+<40*6>+4000
	000354	033734'				 .WORD	$DHOUT		; DH-11 #1 OUTPUT INTERRUPT
	000356	004301 				 .WORD	1+<40*6>+4000
	000360	037760'				 .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	035504'				 .WORD	$DHINP		; DH-11 #2 INPUT INTERRUPT
	000372	004302 				 .WORD	2+<40*6>+4000
	000374	033734'				 .WORD	$DHOUT		; DH-11 #2 OUTPUT INTERRUPT
	000376	004302 				 .WORD	2+<40*6>+4000
	000400	037760'				 .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	035504'				 .WORD	$DHINP		; DH-11 #3 INPUT INTERRUPT
	000412	004303 				 .WORD	3+<40*6>+4000
	000414	033734'				 .WORD	$DHOUT		; DH-11 #3 OUTPUT INTERRUPT
	000416	004303 				 .WORD	3+<40*6>+4000
	000420	037760'				 .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	035504'				 .WORD	$DHINP		; DH-11 #4 INPUT INTERRUPT
	000432	004304 				 .WORD	4+<40*6>+4000
	000434	033734'				 .WORD	$DHOUT		; DH-11 #4 OUTPUT INTERRUPT
	000436	004304 				 .WORD	4+<40*6>+4000
	000440	037760'				 .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	035504'				 .WORD	$DHINP		; DH-11 #5 INPUT INTERRUPT
	000452	004305 				 .WORD	5+<40*6>+4000
	000454	033734'				 .WORD	$DHOUT		; DH-11 #5 OUTPUT INTERRUPT
	000456	004305 				 .WORD	5+<40*6>+4000
	000460	037760'				 .WORD	$DMINT		; DM-11/BB #6 INTERRUPT
	000462	004306 				 .WORD	6+<40*6>+4000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 6-4
LOW CORE -- TRAP VECTORS

	000464	000465 				 .WORD	.-LOWCOD+1	; ILLEGAL INTERRUPT
	000466	004300 				 .WORD	<40*6>+4000
	000470	035504'				 .WORD	$DHINP		; DH-11 #6 INPUT INTERRUPT
	000472	004306 				 .WORD	6+<40*6>+4000
	000474	033734'				 .WORD	$DHOUT		; DH-11 #6 OUTPUT INTERRUPT
	000476	004306 				 .WORD	6+<40*6>+4000
	000500	037760'				 .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	035504'				 .WORD	$DHINP		; DH-11 #7 INPUT INTERRUPT
	000512	004307 				 .WORD	7+<40*6>+4000
	000514	033734'				 .WORD	$DHOUT		; DH-11 #7 OUTPUT INTERRUPT
	000516	004307 				 .WORD	7+<40*6>+4000
    391		000040 				U=<20-D$$H11>*4
    392					;
    393		000040 				.REPT	U
    394						PSW	6		; ILLEGAL INTERRUPT
    395						.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
	000624	000625 				 .WORD	.-LOWCOD+1
	000626	004300 				 .WORD	0+<40*6>+4000
	000630	000631 				 .WORD	.-LOWCOD+1
	000632	004300 				 .WORD	0+<40*6>+4000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 6-5
LOW CORE -- TRAP VECTORS

	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
    396					;
    397	000720					PSW	6,$TTINP,4	; DL-11E # 3 INPUT (DN20 #2)
	000720	036010'				 .WORD	$TTINP
	000722	004304 				 .WORD	4+<40*6>+4000
    398	000724					PSW	6,$TTOUT,4	; DL-11E # 3 OUTPUT (DN20 #2)
	000724	034340'				 .WORD	$TTOUT
	000726	004304 				 .WORD	4+<40*6>+4000
    399					;
    400	000730					PSW	6,$TTINP,3	; DL-11E # 2 INPUT (DN20 #1)
	000730	036010'				 .WORD	$TTINP
	000732	004303 				 .WORD	3+<40*6>+4000
    401	000734					PSW	6,$TTOUT,3	; DL-11E # 2 OUTPUT (DN20 #1)
	000734	034340'				 .WORD	$TTOUT
	000736	004303 				 .WORD	3+<40*6>+4000
    402					;
    403	000740					PSW	6,$TTINP,2	; DL-11E # 1 INPUT (DN20 #0)
	000740	036010'				 .WORD	$TTINP
	000742	004302 				 .WORD	2+<40*6>+4000
    404	000744					PSW	6,$TTOUT,2	; DL-11E # 1 OUTPUT (DN20 #0)
	000744	034340'				 .WORD	$TTOUT
	000746	004302 				 .WORD	2+<40*6>+4000
    405					;
    407	000750					PSW	4,$LPINT,1	; LP-20 #1 INTERRUPT
	000750	000000G				 .WORD	$LPINT
	000752	004201 				 .WORD	1+<40*4>+4000
    408	000754					PSW	4,$LPINT,0	; LP-20 #0 INTERRUPT
	000754	000000G				 .WORD	$LPINT
	000756	004200 				 .WORD	0+<40*4>+4000
    413					;
    414		000004 				.REPT	4
    415						PSW	7,.DTINT	; DTE-20 # 0 INTERRUPT VECTORS
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 6-6
LOW CORE -- TRAP VECTORS

    416						.ENDR
	000760	027670'				 .WORD	.DTINT
	000762	004340 				 .WORD	0+<40*7>+4000
	000764	027670'				 .WORD	.DTINT
	000766	004340 				 .WORD	0+<40*7>+4000
	000770	027670'				 .WORD	.DTINT
	000772	004340 				 .WORD	0+<40*7>+4000
	000774	027670'				 .WORD	.DTINT
	000776	004340 				 .WORD	0+<40*7>+4000
    417					;
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 7
LOW CORE -- COMMON GLOBAL DATA

    419						.SBTTL	LOW CORE -- COMMON GLOBAL DATA
    420
    421	001000				.FESTB::
    422	001000	003735 				.WORD	<.LCEND-.FESTB>/2 ; [TCO 4.2333] WORD SIZE OF THIS STATUS BLOCK
    423	001002				.EXEND::
    424	001002	000000 	000000 			.LIMIT			; DEFINE LIMITS OF THE FRONT-END
    425									; FIRST WORD LOW LIMIT
    426									; SECOND WORD IS HIGH LIMIT
    427					;
    428					;	CURRENT TASK POINTER (POINTS TO ACTIVE TASK LIST NODE OF CURRENT TASK
    429					;
    430
    431	001006				.CRTSK::
    432	001006	000000 				.WORD	0
    433
    434	001010				.COMEF::
    435	001010	000000 	000000 			.WORD	0,0		; COMMON EVENT FLAGS
    436
    437	001014				.SERFG::
    438	001014	000000 				.WORD	0		; SIG EVENT FLAG
    439	001016				.SEWFL::
    440	001016	000000 				.WORD	0		; SIG EVENT WAIT FLAG
    441	001020				SPSAV::
    442	001020	000000 				.WORD	0		; SAVE AREA FOR STACK
    443					;
    444	001022				PARSAV::
    445	001022					.BLKW	2		; SAVE AREA FOR PARITY ERROR REGISTERS
    446									; (USED BY LC)
    447					;
    448					;	.PFAIL INDICATES POWER FAIL IN PROGRESS
    449					;	IT IS USED ONLY TO INDICATE TO PRI7 TASKS THAT
    450					;	POWER FAIL UNDERWAY AND A RETURN TO THE PROGRAM
    451					;	SHOULD NOT OCCUR
    452					;
    453	001026				.PFAIL::
    454	001026	000000 				.WORD	0
    455	001030				.PFIOW::
    456	001030	000000 				.WORD	0		; POWER FAIL RECOVERY FLAG
    457	001032				PWRXSP::
    458	001032	000000 				.WORD	0		; BUFFER FOR STACK POINTER
    459	001034				CROBAR::
    460	001034	000000 				.WORD	0		; POWER-UP CROBAR TIMER
    461	001036				.VERNO::
    462	001036					RSXVR$	RSX$$K,RSX$$F,RSX$$V,RSX$$E ; RSX20F VERSION NUMBER.
	001036	   126 	   105 	   061 		.ASCIZ	<126><105>\13-41\<200>
	001041	   063 	   055 	   064
	001044	   061 	   200 	   000
    463						.EVEN
    464	001050				.CKASS::
    465	001050	000000 				.WORD	0		; AST ADDRESS FOR CURRENT TASK (CLOCK)
    466	001052				.PFASS::
    467	001052	000000 				.WORD	0		; AST ADDRESS FOR CURRENT TASK (POWER FAIL)
    468
    469	001054					.BLKW	20
    470					;
    471	001114				.MSIZE::
    472	001114	001600 				.WORD	1600		; MEMORY SIZE
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 7-1
LOW CORE -- COMMON GLOBAL DATA

    473	001116				EMTSTK::
    474	001116	000000 				.WORD	0		; EMT SAVED DURING EMT STACK
    475	001120				TRPASV::
    476	001120	000000 				.WORD	0		; SAVED PS OF EMT/TRAP
    477
    478					;
    479					;	THE NEXT TWO BYTES MUST BE KEPT TOGETHER IN THEIR CURRENT ORDER !!!!
    480					;
    481
    482	001122				.NOERR::
    483	001122	000401 				.WORD	401		; DO NOT RECOGNIZE KL ERROR IF NON-ZERO
    484		001123'			.NOHLT	==	.NOERR+1	; DO NOT PANIC IF KL HALTS IF NON-ZERO
    485
    486	001124				.TKTN::
    487	001124	000000 				.WORD	0		; NON ZERO IF TKTN REQUIRED
    488	001126				.KLITK::
    489	001126	000000 				.WORD	0		; KL ATTENTION REQUEST
    490
    491	001130				.KLIWD::
    492	001130	000000 				.WORD	0		; KL WORD TO DETERMINE BOOT PARAMETERS
    493
    494	001132				.TICKS::
    495	001132	000000 				.WORD	0		; CLOCK TICK COUNTER
    496	001134				.CLKSW::
    497	001134	000000 				.WORD	0		; CLOCK OVERFLOW SWITCH
    498	001136				.DATE::
    499	001136				.DATE3::
    500	001136	000000 				.WORD	0		; FRONT-END DATE VALID FLAG
    501									; FRONT-END DATE IS VALD IF .NE. 0
    502	001140				.YEAR::
    503	001140	003673 				.WORD	1979.		; DECIMAL YEAR
    504	001142				.DAY::
    505	001142	   000 				.BYTE	0.		; DAY OF MONTH
    506	001143				.MON::
    507	001143	   000 				.BYTE	0.		; MONTH OF YEAR
    508	001144				.DST::
    509	001144	   000 				.BYTE	0		; DAYLIGHT SAVING TIME FLAG
    510	001145				.DOW::
    511	001145	   000 				.BYTE	0		; DAY OF WEEK INDEX
    512	001146				.SSM::
    513	001146	000000 	000400 			.WORD	0,400		; ELAPSED TIME IN SECONDS SNCE MIDNGHT
    514	001152				.TKPS::
    515	001152	000074 				.WORD	.CYLTM		; CLOCK RATE IN JIFFIES
    516
    517	001154				.SYUIC::
    518	001154	002405 				.WORD	5.*400+5.	; SYSTEM UIC [5,5]
    519	001156				.BTPRM::
    520	001156	000000 				.WORD	0		; BOOT PARAMETER
    521	001160				.BTSCH::
    522	001160	000000 				.WORD	0		; CHARACTER SAVED -- FOR SECONDARY PROTOCOL
    523	001162				.ACKAL::
    524	001162	000001 				.WORD	1		; ACK ALL SWITCH
    525	001164				.KLERW::
    526	001164	000000 				.WORD	0		; KL WORD FOR ERROR REPORTING BY SETSPD
    527	001166				.FEMOD::
    528	001166	000001 				.WORD	1		; FRONT END CONSOLE MODE FLAG
    529	001170				.KLRLD::
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 7-2
LOW CORE -- COMMON GLOBAL DATA

    530	001170	000000 				.WORD	0		; KL RELOAD FLAG
    531	001172				.KLFLG::
    532	001172	000000 				.WORD	0		; FLAG FOR PARSER TO INDICATE STATE OF KL10
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 8
LOW CORE -- KLINIK DATA BASE

    534						.SBTTL	LOW CORE -- KLINIK DATA BASE
    535					;
    536					;	NOTE --
    537					;	THE NEXT 32 BYTES MUST REMAIN CONTIGUOUS AND IN THE SAME ORDER
    538					;
    539
    540	001174				.KLNPB::
    541	001174	000026 				.WORD	KLNPLN		; KLINIK PARAMETER BLOCK LENGTH
    542									; BUFFER FOR PARAMETER SAVE STARTS HERE
    543	001176				.KLNLB::			;
    544	001176				.KLNBC::
    545	001176	000024 				.WORD	KLNPLN-2	; BYTE COUNT FOR TRANSFER
    546	001200				.KLNFT::
    547	001200	000000 				.WORD	0		; KLINIK ENABLE START TIME --
    548									;	SECONDS SINCE MIDNIGHT
    549	001202				.KLNFD::
    550	001202	   000 	   000 	   000 		.BYTE	0,0,0,0		; KLINIK ENABLE START DATE
	001205	   000
    551	001206				.KLNTT::
    552	001206	000000 				.WORD	0		; KLINIK ENABLE END TIME --
    553									;	 SECONDS SINCE MIDNIGHT
    554	001210				.KLNTD::
    555	001210	   000 	   000 	   000 		.BYTE	0,0,0,0		; KLINIK ENABLE END DATE
	001213	   000
    556	001214				.KLNMD::
    557	001214	   000 	   000 			.BYTE	0,0		; KLINIK MODE FLAGS
    558					.EVEN				;
    559		000016 			KLNLGL==.-.KLNFT		; KLINIK EVENT LOG BUFFER LENGTH IN BYTES
    560		001216'			.KLNPE==.
    561	001216				.KLNPW::
    562	001216	000000 	000000 	000000 		.WORD	0,0,0		; ASCII PASSWORD FOR KLINIK
    563					.EVEN
    564		000026 			KLNPLN==.-.KLNBC		; SAVE BUFFER LENGTH IN BYTES
    565	001224				.KLNSW::
    566	001224	   000 	   000 			.BYTE	0,0		; KLINIK LINE STATUS BYTES
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 9
LOW CORE -- COMMIUNICATIONS REGION DATA BASE

    568						.SBTTL	LOW CORE -- COMMIUNICATIONS REGION DATA BASE
    569
    570					;
    571					;	POINTERS TO COMMUNICATIONS AREA
    572					;
    573	001226				COMBSE::
    574	001226	000000 				.WORD	0	; BASE OF COMMUNICATION AREA
    575	001230				PRMEMN::
    576	001230	000000 				.WORD	0	; MY PROCESSOR NUMBER
    577	001232				DEPOF::
    578	001232	000000 				.WORD	0	; DEPOSIT OFFSET FROM EXAMINE
    579					;
    580					;
    581					;	PROCESSOR IDENTIFICATION TABLE
    582					;
    583					;	PROTBL FORMAT:
    584					;
    585					;	5 WORDS/ENTRY
    586					;	16 ENTRYS IN THE TABLE ONE FOR EACH PROCESSOR IN COMMUNICATION
    587					;	COMMUNICATION NUMBERS ARE LIMITED TO THE RANGE 0-15.
    588					;
    589					;	(PROCESSOR 0) PROTBL:	ADDRESS OF DTE20 TO ACCESS THIS PROCESSOR
    590		000000 			DTENM=0
    591					;	(PROCESOR 0)		ADDRESS TO COMMUNICATE TO PROCESSOR 0
    592		000002 			EMYN==2
    593					;	(PROCESSOR 0)		ADDRESS TO COMMUNICATE TO PROCESSOR 0 (WRITE)
    594		000004 			DMYN==4
    595					;	(PROCESSOR 0)		ADDRESS FROM GENERAL
    596		000006 			EHSG==6
    597					;	(PROCESSOR 0)		ADDRESS FROM SPECIFIC
    598		000010 			EHSM==10
    599					;
    600					;	(PROCESSOR 1)	ADDRESS OF DTE20 TO USE TO ACCESS THIS PROCESSOR
    601					;	...........
    602					;
    603	001234				PROTBL::
    604	001234					.BLKW	5.
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 10
LOW CORE -- QUEUED PROTOCOL DATA BASE

    606						.SBTTL	LOW CORE -- QUEUED PROTOCOL DATA BASE
    607
    608	001246				.CRQZ::
    609	001246	000000 				.WORD	0		; CURRENT QUEUE SIZE
    610	001250				.CPFN::
    611	001250	000000 				.WORD	0		; CURRENT FUNCTION IN TO 10 QUEUE
    612	001252				.CPDV::
    613	001252	000000 				.WORD	0		; CURRENT DEVICE IN TO 10 QUEUE
    614	001254				.CRSZ::
    615	001254	000000 				.WORD	0		; CURRENT SIZE OF TO10 QUEUE
    616	001256				.CRPB::
    617	001256	000000 				.WORD	0		; CURRENT BUFFER POINTER IN TO10 QUEUE
    618	001260				.CRHD::
    619	001260	000000 				.WORD	0		; HEAD OF CURRENT TO10 QUEUE
    620	001262				.CRSB::
    621	001262	000000 				.WORD	0		; POINTER TO CURRENT FUNCTION SIZE
    622
    623	001264				DTEMSK::
    624	001264	000000 				.WORD	0		; DTE DEVICE EVENT FLAG MASK
    625	001266				DTEADR::
    626	001266	000000 				.WORD	0		; DTE DEVICE INDIRECT FLAG ADDRESS
    627
    628	001270				TO11NP::
    629	001270	000000 				.WORD	0		; NODE POINTER FOR NODE
    630	001272				TO11HD::
    631	001272	000000 				.WORD	0		; COUNT OF BYTES IN THIS QUEUE
    632	001274				TO11FN::
    633	001274	000000 				.WORD	0		; TO ELEVEN FUNCTION CODE
    634	001276				TO11DV::
    635	001276	000000 				.WORD	0		; TO ELEVEN DEVICE NUMBER
    636	001300				TO11SP::
    637	001300	000000 				.WORD	0		; SPACE
    638	001302				TO11FW::
    639	001302	000000 				.WORD	0		; FIRST WORD OF FUNCTION
    641	001304				TO11GW::
    642	001304	177777 				.WORD	-1		; GUARD WORD FOR DTE20
    643	001306				TO11QP::
    644	001306	000000 				.WORD	0
    645	001310				TO11AS::
    646	001310	000000 				.WORD	0		; ADDRESS SAVE
    647	001312				TO11BS::
    648	001312	000000 				.WORD	0		; BYTE COUNT SAVE
    649	001314				TO10SZ::
    650	001314	000000 				.WORD	0		; BYTE COUNT OF XFER
    651	001316				TO10AS::
    652	001316	000000 				.WORD	0
    654
    655	001320				STSTT::
    656	001320	000001 	000000 	000000 		.WORD	1,0,0		; TO 10 STATUS
    657
    658		001324'			TO10QC==STSTT+4			; TO 10 QUEUE COUNT
    659		001325'			TO11QC==STSTT+5			; TO 11 QUEUE COUNT
    660
    661	001326	001326'			TO10Q:: .WORD	.		; LISTHEAD FOR TO 10 QUEUE
    662	001330	001326'				.WORD	.-2
    663
    664	001332				EQSZ::
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 10-1
LOW CORE -- QUEUED PROTOCOL DATA BASE

    665	001332	000000 				.WORD	0		; ELEVEN QUEUE SIZE
    666
    667	001334				TO11Q::
    668	001334	000000 				.WORD	0		; TO 11 QUEUE
    669	001336				STATI::
    670	001336					.BLKW	3		; STATUS/SCRATCH WORD FOR EXAMINES/DEPOSITS
    671	001344				DEXST::
    672	001344	000000 				.WORD	0		; DEXDONE TIMEOUT
    673	001346				DEXTM3::
    674	001346	000000 				.WORD	0		; EXAMINE WORD 3 (TEMP STORAGE) TO BE
    675	001350				DEXTM2::
    676	001350	000000 				.WORD	0		; EXAMINE WORD 2 -USED ONLY BECAUSE EXAMINE
    677	001352				DEXTM1::
    678	001352	000000 				.WORD	0		; EXAMINE WORD 1 - OR DEPOSIT MAY FAIL AND MUST BE REDONE
    679	001354				.PRADR::
    680	001354	000000 				.WORD	0		; ADDRESS OF PRIV OFFSET TABLE ENTRY
    681	001356				.PRSTA::
    682	001356	174434 				.WORD	174434		; PRIVILEDGED DTE20 STATUS WORD
    683	001360				.PRDTE::
    684	001360	174400 				.WORD	174400		; FIRST DTE ADDRESS OF PRIVILEDGED DTE20
    685	001362				.PRDCT::
    686	001362	000000 				.WORD	0		; DORBELL COUNTER FOR KLINIT.
    687	001364				.EPFFL::
    688	001364	   000 				.BYTE	0		; [TCO 4.2217] EBUS PARITY ERROR SNAPSHOT INTERLOCK
    689	001365				.EPEFL::
    690	001365	   001 				.BYTE	1		; [TCO 4.2217] EBUS PARITY ERROR PROCESSING FLAG
    691									;		+1 -- NO EBUS PARITY ERROR
    692									;		 0 -- RETRY SUCCEEDED
    693									;		-1 -- RETRY FAILED
    694	001366				.EBPEQ::
    695	001366	000000 				.WORD	0		; [TCO 4.2217] CONTAINS POINTER TO DTE-20 EBUS PARITY
    696									;	       SNAPSHOT IF ALLOACATION WAS SUCCESSFUL
    697	001370				.PRPSE::
    698	001370	   000 				.BYTE	0		; PROTOCOL PAUSE FLAG
    699						.EVEN
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 11
LOW CORE -- KEEP-ALIVE DATA BASE

    701						.SBTTL	LOW CORE -- KEEP-ALIVE DATA BASE
    702
    703	001372				KPAL0::
    704	001372	000000 	000000 	000000 		.WORD	0,0,0		; 10 KEEP ALIVE
    705	001400				OKPAL0::
    706	001400	000000 				.WORD	0		; SAVED KEEP ALIVE
    707	001402				KPAL1::
    708	001402	000000 	000000 	000000 		.WORD	0,0,0		; 11 KEEP ALIVE
    709	001410				.KPAC::
    710	001410	000005 				.WORD	5		; COUNTER FOR KEEP-ALIVE.
    711	001412				.KACFL::
    712	001412	000001 				.WORD	1		; [TCO 4.2107] FLAG TO ALLOW XCT 71
    713									; [TCO 4.2107] OR DUMP/RELOAD ON KEEP-ALIVE CEASE
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 12
LOW CORE -- CORE MANAGER DATA BASE

    715						.SBTTL	LOW CORE -- CORE MANAGER DATA BASE
    716
    717		076000 				.BGBST==76000		; START OF BIG BUFFER
    718		002000 				.BGLEN==2000		; LENGTH OF BIG BIFFER
    719
    720					;
    721					;	POOL FREE CORE AREA
    722					;
    723	001414				.BGBUF::
    724	001414	076000 				.WORD	.BGBST		; BIG BUFFER SPACE (1000 EACH)
    725	001416	002000 				.WORD	.BGLEN
    726
    727	001420				.FREPL::
    728	001420	000000 				.WORD	0		; FREE POOL BASE ADDRESS
    729	001422	000000 				.WORD	0		; FREE POOL SIZE IN BYTES
    730
    731	001424				.POLLH::
    732	001424	001430'				.WORD	.POLST		; HEAD OF POOL
    733	001426	002330'				.WORD	.POLND		; END OF POOL
    734
    735	001430				.POLST::
    736	001430	001470'				.WORD	.+40
    737	001432	001424'				.WORD	.POLLH
    738	001434					.BLKW	14.
    739
    740		000015 				.REPT	15
    741						.WORD	.+40
    742						.WORD	.-40
    743						.BLKW	14.
    744						.ENDR
	001470	001530'				.WORD	.+40
	001472	001432'				.WORD	.-40
	001530	001570'				.WORD	.+40
	001532	001472'				.WORD	.-40
	001570	001630'				.WORD	.+40
	001572	001532'				.WORD	.-40
	001630	001670'				.WORD	.+40
	001632	001572'				.WORD	.-40
	001670	001730'				.WORD	.+40
	001672	001632'				.WORD	.-40
	001730	001770'				.WORD	.+40
	001732	001672'				.WORD	.-40
	001770	002030'				.WORD	.+40
	001772	001732'				.WORD	.-40
	002030	002070'				.WORD	.+40
	002032	001772'				.WORD	.-40
	002070	002130'				.WORD	.+40
	002072	002032'				.WORD	.-40
	002130	002170'				.WORD	.+40
	002132	002072'				.WORD	.-40
	002170	002230'				.WORD	.+40
	002172	002132'				.WORD	.-40
	002230	002270'				.WORD	.+40
	002232	002172'				.WORD	.-40
	002270	002330'				.WORD	.+40
	002272	002232'				.WORD	.-40
    745
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 12-1
LOW CORE -- CORE MANAGER DATA BASE

    746	002330				.POLND::
    747	002330	001424'				.WORD	.POLLH
    748	002332	002272'				.WORD	.-40
    749	002334					.BLKW	14.
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 13
LOW CORE -- CLOCK REQUEST LIST

    751						.SBTTL	LOW CORE -- CLOCK REQUEST LIST
    752
    753					;
    754					;	CLOCK LIST (LIST OF ENTRIES IN THE CLOCK QUEUE TO RECEIVE
    755					;	EVENT FLAGS SET ON COMPLETION OF CLOCK TIMER
    756					;
    757		000007 			.CLKSZ==7.	; CLOCK QUEUE SIZE
    758		000014 			C.SZ=14		; CLOCK ENTRY SIZE LOCAL DEFINITION (NOTE: IS A GLOBAL VAR.)
    759
    760	002370				.CLKBA::
    761	002370	006526'				.WORD	TTYTSK
    762	002372	000000 				.WORD	0
    763	002374	000074 				.WORD	.CYLTM
    764	002376	000074 				.WORD	.CYLTM
    765	002400	000100 				.WORD	EF.TMO
    766	002402	006546'				.WORD	TTYTSK+A.EF
    767		000074 				.REPT	.CLKSZ-2*C.SZ
    768						.WORD	0
    769						.ENDR
	002404	000000 				.WORD	0
	002406	000000 				.WORD	0
	002410	000000 				.WORD	0
	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
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 13-1
LOW CORE -- CLOCK REQUEST LIST

	002520	000000 				.WORD	0
	002522	000000 				.WORD	0
	002524	000000 				.WORD	0
	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
    770	002574				.CLKEA::
    771	002574	000000 				.WORD	0		; END OF CLOCK LIST
    772
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 15
LOW CORE -- TERMINAL SERVICE DATA BASE

    792						.SBTTL	LOW CORE -- TERMINAL SERVICE DATA BASE
    793
    794	002576				.INHDM::
    795	002576	000001 				.WORD	1		; INBIBIT/ENABLE REMOTE LINES (0)=ENABLE
    796	002600				.ABCNT::
    797	002600	000000 				.WORD	0		; COUNT OF AUTO BAUDED LINES
    798	002602				.ABFLG::
    799	002602	000000 				.WORD	0		; FLAG FOR "SETSPD"
    800					;
    801					;	SENDALL MESSAGE POINTERS
    802					;
    803	002604				.SNDLP::
    804	002604	000000 				.WORD	0		; POINTER TO SENDALL BUFFER IN USE
    805	002606				.SNDBF::
    806	002606	000000 	000000 	000000 		.WORD	0,0,0,0		; SENDALL BUFFER RING
	002614	000000
    807	002616				.SNDCN::
    808	002616	000000 	000000 	000000 		.WORD	0,0,0,0		; SENDALL TTY COUNT (THIS AND ABOVE MUST BE TOGETHER)
	002624	000000
    809	002626				.CRSND::
    810	002626	000000 				.WORD	0		; CURRENT SENDALL NODE POINTER -- USED BY ..STTY
    811	002630				.BRKCH::
    812	002630	000034 				.WORD	'\-100		; BREAK CHARACTER (^\)
    813	002632				.TTP11::
    814	002632	000000 				.WORD	0		; TTY PDP11 INPUT IN PROGRESS
    815	002634				.CTYPT::
    816	002634				CTYPTR::
    817	002634	002776'				.WORD	DLTBL		; CONSOLE TTY TABLE POINTER
    818	002636				.KLNPT::
    819	002636				KLNPTR::
    820	002636	003006'				.WORD	DLETBL		; KLINIK LINE POINTER
    821	002640				$UNIT::
    822	002640	000000 				.WORD	0		; DH-11 UNIT NUMBER IF CTY
    823	002642				$BTMSK::
    824	002642	000000 				.WORD	0		; MASK TO START CONSOLE TTY (DH-11)
    825	002644				DMTMP::
    826	002644	000000 				.WORD	0		; TEMPORARY STORAGE FOR DM-11/BB CONTROLLER NUMBER
    827	002646				DHTMP::
    828	002646	000000 				.WORD	0		; TEMPORARY STORAGE FOR DH-11 CONTROLLER NUMBER
    829	002650				DLTMP::
    830	002650	000000 				.WORD	0		; TEMPORARY STORAGE FOR DL-11 CONTROLLER NUMBER
    831	002652				DHSTSV::
    832	002652	000000 				.WORD	0		; DH-11 TABLE POINTER SAVE
    833	002654				.TTELQ::
    834	002654	000000 				.WORD	0		; [TCO 4.2245] TERMINAL ERROR LOGGING QUEUE POINTER
    835	002656				.TTELB::
    836	002656	000000 				.WORD	0		; [TCO 4.2245] TEMPORARY BUFFER FOR ERROR LOGGING
    837	002660				TMOCNT::
    838	002660	   012 				.BYTE	^D10		; [TCO 4.2309] TERMINAL TIMEOUT COUNTER
    839	002661	   026 				.BYTE	^D22		; [TCO 4.2309] MODEM TIMEOUT COUNTER
    840						.EVEN
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 16
LOW CORE -- PDP-11 CTY SERVICE DATA BASE

    842						.SBTTL	LOW CORE -- PDP-11 CTY SERVICE DATA BASE
    843
    844	002662				CTYSTS::
    845		000020 				.REPT	16.		; CONSOLE TTY STATUS BLOCK
    846						.WORD	0
    847						.ENDR
	002662	000000 				.WORD	0
	002664	000000 				.WORD	0
	002666	000000 				.WORD	0
	002670	000000 				.WORD	0
	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
    848	002722				CNT::
    849	002722	000000 				.WORD	0
    850	002724				BYCNT::
    851	002724	000000 				.WORD	0
    852	002726				CRADR::
    853	002726	000000 				.WORD	0
    854	002730				TTPKT::
    855	002730	000000 				.WORD	0		; I/O PACKET ADDRESS
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 17
LOW CORE -- TERMINAL DRIVER DATA BASE

    857						.SBTTL	LOW CORE -- TERMINAL DRIVER DATA BASE
    858
    859					;
    860					;	TTY TABLES
    861					;
    862					; CONTROLLER IMPURE DATA TABLES (INDEXED BY CONTROLLER (UNIT) NUMBER)
    863					;
    864	002732				DMTBL::
    865	002732	170500 	003046'			.WORD	170500,DHTBL		; DM11BB TABLE
    866	002736	170510 	003246'			.WORD	170510,16.*8.+DHTBL
    867	002742	170520 	003446'			.WORD	170520,16.*8.*2.+DHTBL
    868	002746	170530 	003646'			.WORD	170530,16.*8.*3.+DHTBL
    869	002752	170540 	004046'			.WORD	170540,16.*8.*4.+DHTBL
    870	002756	170550 	004246'			.WORD	170550,16.*8.*5.+DHTBL
    871	002762	170560 	004446'			.WORD	170560,16.*8.*6.+DHTBL
    872	002766	170570 	004646'			.WORD	170570,16.*8.*7.+DHTBL
    873	002772	170570 	005046'			.WORD	170570,16.*8.*8.+DHTBL
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 18
LOW CORE -- DATA LINE SCANNER DATA BASE

    875						.SBTTL	LOW CORE -- DATA LINE SCANNER DATA BASE
    876
    877					;	THE DATA LINE SCANNER TABLE IS ORGANIZED AS FOLLOWS:
    878					;	THE DL-11'S ARE FIRST IN THE TABLE AND THE DL-11C (CTY) IS UNIT 0,
    879					;	THE DL-11E(S) FOLLOW AND BEGIN AT UNIT 1. THE DH-11'S FOLLOW THE
    880					;	DL-11E'S
    881					;
    882					;	ALL TERMINALS HAVE A FOUR WORD ENTRY IN THE FOLLOWING FORMAT:
    883					;
    884					;	+----------------------------------+
    885					;	!    OUTPUT THREAD LIST POINTER    !
    886					;	+----------------------------------+
    887					;	!	EXTERNAL PAGE POINTER	   !
    888					;	+----------------------------------+
    889					;	!	 TERMINAL SPEED WORD	   !
    890					;	+----------------------------------+
    891					;	!	 TERMINAL STATUS WORD	   !
    892					;	+----------------------------------+
    893
    894	002776				TTTBL::					; START OF DATA LINE SCANNER TABLE
    895	002776				DLTBL::
    896	002776	000000 	177560 	000000 		.WORD	0,177560,0,TT.CTY	; TERMINAL STATUS FOR DL-11C
	003004	000002
    897	003006				DLETBL::				; DL-11E TABLE
    898	003006	000000 	175610 	000000 		.WORD	0,175610,0,TT.RMT	; DL-11E # 0 (KLINIK)
	003014	000100
    899	003016	000000 	175630 	000000 		.WORD	0,175630,0,TT.RMT	; DL-11E # 1
	003024	000100
    900	003026	000000 	175640 	000000 		.WORD	0,175640,0,TT.RMT	; DL-11E # 2
	003034	000100
    901	003036	000000 	175650 	000000 		.WORD	0,175650,0,TT.RMT	; DL-11E # 3
	003044	000100
    902		000005 			DLCNT	==.-DLTBL/8.			; NUMBER OF DL-11'S
    903		000004 			DLECNT	==.-DLETBL/8.			; NUMBER OF DL-11E'S
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 19
LOW CORE -- DH-11 DATA BASE

    905						.SBTTL	LOW CORE -- DH-11 DATA BASE
    906
    907	003046				DHTBL::
    908		000020 				.REPT	16.
    909						.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
    910						.ENDR
	003046	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003054	000000
	003056	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003064	000000
	003066	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003074	000000
	003076	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003104	000000
	003106	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003114	000000
	003116	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003124	000000
	003126	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003134	000000
	003136	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003144	000000
	003146	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003154	000000
	003156	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003164	000000
	003166	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003174	000000
	003176	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003204	000000
	003206	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003214	000000
	003216	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003224	000000
	003226	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003234	000000
	003236	000000 	160020 	006007 		.WORD	0,160020,6007,0		; DH-11 MUX CONRTOLLER 0
	003244	000000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 20
LOW CORE -- DH-11 DATA BASE

    912		000020 				.REPT	16.
    913						.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
    914						.ENDR
	003246	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003254	000000
	003256	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003264	000000
	003266	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003274	000000
	003276	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003304	000000
	003306	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003314	000000
	003316	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003324	000000
	003326	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003334	000000
	003336	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003344	000000
	003346	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003354	000000
	003356	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003364	000000
	003366	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003374	000000
	003376	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003404	000000
	003406	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003414	000000
	003416	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003424	000000
	003426	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003434	000000
	003436	000000 	160040 	006007 		.WORD	0,160040,6007,0		; DH-11 MUX CONTROLLER 1
	003444	000000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 21
LOW CORE -- DH-11 DATA BASE

    916		000020 				.REPT	16.
    917						.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
    918						.ENDR
	003446	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003454	000000
	003456	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003464	000000
	003466	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003474	000000
	003476	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003504	000000
	003506	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003514	000000
	003516	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003524	000000
	003526	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003534	000000
	003536	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003544	000000
	003546	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003554	000000
	003556	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003564	000000
	003566	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003574	000000
	003576	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003604	000000
	003606	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003614	000000
	003616	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003624	000000
	003626	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003634	000000
	003636	000000 	160060 	006007 		.WORD	0,160060,6007,0		; DH-11 MUX CONTROLLER 2
	003644	000000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 22
LOW CORE -- DH-11 DATA BASE

    920		000020 				.REPT	16.
    921						.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
    922						.ENDR
	003646	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003654	000000
	003656	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003664	000000
	003666	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003674	000000
	003676	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003704	000000
	003706	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003714	000000
	003716	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003724	000000
	003726	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003734	000000
	003736	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003744	000000
	003746	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003754	000000
	003756	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003764	000000
	003766	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	003774	000000
	003776	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	004004	000000
	004006	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	004014	000000
	004016	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	004024	000000
	004026	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	004034	000000
	004036	000000 	160100 	006007 		.WORD	0,160100,6007,0		; DH-11 MUX CONTROLLER 3
	004044	000000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 23
LOW CORE -- DH-11 DATA BASE

    924		000020 				.REPT	16.
    925						.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
    926						.ENDR
	004046	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004054	000000
	004056	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004064	000000
	004066	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004074	000000
	004076	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004104	000000
	004106	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004114	000000
	004116	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004124	000000
	004126	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004134	000000
	004136	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004144	000000
	004146	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004154	000000
	004156	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004164	000000
	004166	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004174	000000
	004176	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004204	000000
	004206	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004214	000000
	004216	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004224	000000
	004226	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004234	000000
	004236	000000 	160120 	006007 		.WORD	0,160120,6007,0		; DH-11 MUX CONTROLLER 4
	004244	000000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 24
LOW CORE -- DH-11 DATA BASE

    928		000020 				.REPT	16.
    929						.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
    930						.ENDR
	004246	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004254	000000
	004256	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004264	000000
	004266	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004274	000000
	004276	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004304	000000
	004306	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004314	000000
	004316	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004324	000000
	004326	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004334	000000
	004336	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004344	000000
	004346	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004354	000000
	004356	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004364	000000
	004366	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004374	000000
	004376	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004404	000000
	004406	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004414	000000
	004416	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004424	000000
	004426	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004434	000000
	004436	000000 	160140 	006007 		.WORD	0,160140,6007,0		; DH-11 MUX CONTROLLER 5
	004444	000000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 25
LOW CORE -- DH-11 DATA BASE

    932		000020 				.REPT	16.
    933						.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
    934						.ENDR
	004446	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004454	000000
	004456	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004464	000000
	004466	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004474	000000
	004476	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004504	000000
	004506	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004514	000000
	004516	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004524	000000
	004526	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004534	000000
	004536	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004544	000000
	004546	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004554	000000
	004556	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004564	000000
	004566	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004574	000000
	004576	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004604	000000
	004606	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004614	000000
	004616	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004624	000000
	004626	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004634	000000
	004636	000000 	160160 	006007 		.WORD	0,160160,6007,0		; DH-11 MUX CONTROLLER 6
	004644	000000
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 26
LOW CORE -- DH-11 DATA BASE

    936		000020 				.REPT	16.
    937						.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
    938						.ENDR
	004646	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004654	000000
	004656	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004664	000000
	004666	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004674	000000
	004676	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004704	000000
	004706	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004714	000000
	004716	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004724	000000
	004726	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004734	000000
	004736	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004744	000000
	004746	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004754	000000
	004756	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004764	000000
	004766	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	004774	000000
	004776	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	005004	000000
	005006	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	005014	000000
	005016	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	005024	000000
	005026	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	005034	000000
	005036	000000 	160200 	006007 		.WORD	0,160200,6007,0		; DH-11 MUX CONTROLLER 7
	005044	000000
    939
    940		000200 			DHCNT	==.-DHTBL/8.			; COUNT OF DH-11'S
    941		000205 			TTCNT	==.-TTTBL/8.			; NUMBER OF ENTRIES OF DATA LINE SCANNER TABLE
    942		005046'			TTYEND==.
    943	005046	000000 	000000 			.WORD	0,0			; GUARD WORDS FOR DH-11 DRIVER INITIL
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 28
LOW CORE -- FLOPPY DRIVER DATA BASE

    963						.SBTTL	LOW CORE -- FLOPPY DRIVER DATA BASE
    964
    965	005052				DXRTC::
    966	005052	000000 				.WORD	0		; ERROR RETRY COUNT FOR CURRENT UNIT
    967	005054				DXCNT::
    968	005054	000000 				.WORD	0		; BYTE COUNT
    969	005056				DXBUF::
    970	005056	000000 				.WORD	0		; CURRENT ADDRESS POINTER
    971	005060				DXVCB::
    972	005060					.BLKW	6
    973	005074				DXUNIT::
    974	005074	000000 				.WORD	0		; CURRENT UNIT
    975	005076				DXPKT::
    976	005076	000000 				.WORD	0		; I/O PACKET ADDRESS
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 29
LOW CORE -- DISC DRIVER DATA BASE

    979						.SBTTL	LOW CORE -- DISC DRIVER DATA BASE
    980
    981	005100				RPRTC::
    982	005100	000000 				.WORD	0		; RETRY COUNT FOR CURRENT OPERATION
    983	005102				RPRNA::
    984	005102	000000 				.WORD	0		; ADDRESS OF RNA
    985	005104				RPBUF::
    986	005104	000000 	000000 			.WORD	0,0		; BUFFER ADDRESS
    987	005110				RPCNT::
    988	005110	000000 				.WORD	0		; SIZE
    989	005112				RPUNIT::
    990	005112	000000 				.WORD	0		; CURRENT UNIT
    991	005114				RPCW2::
    992	005114	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 30
LOW CORE -- FE DRIVER DATA BASE

    994						.SBTTL	LOW CORE -- FE DRIVER DATA BASE
    995
    996	005116				FETBL::
    997	005116	000000 				.WORD	0		; ENTRY FOR FE0:
    998	005120	000000 				.WORD	0		; ENTRY FOR FE1:
    999	005122	000000 				.WORD	0		; ENTRY FOR FE2:
   1000	005124	000000 				.WORD	0		; ENTRY FOR FE3:
   1001	005126				NODADR::
   1002	005126	000000 				.WORD	0
   1003	005130				ADRSAV::
   1004	005130	000000 				.WORD	0		; ADDRESS SAVED
   1005	005132				BYTESA::
   1006	005132	000000 				.WORD	0		; COUNT
   1007	005134				STSWD::
   1008	005134	000000 	000000 			.WORD	0,0		; STATUS WORDS
   1009	005140				TO10PK::
   1010	005140	000000 				.WORD	0		; -11 REQUEST TO -10
   1011	005142					.BLKB	20
   1012	005162				DNBLK::
   1013	005162	000000 				.WORD	0		; RESPONSE TO -10 REQUEST
   1014	005164				DNFCN::
   1015	005164	000000 				.WORD	0
   1016	005166	000000 	000000 			.WORD	0,0
   1017	005172				DNSTS::
   1018	005172	000000 	000000 			.WORD	0,0
   1019	005176	000000 				.WORD	0
   1020	005200				BLKTT::
   1021	005200					.BLKW	20
   1022	005240				.RPUNT::
   1023	005240	000000 				.WORD	0		; RP UNIT NUMBER FOR RPADR ETC.
   1024	005242				.FEACT::
   1025	005242	000000 				.WORD	0		; FE DEVICE AVAILABLE FOR DB ACCESS WHEN .NE. 0
   1026	005244				.RPADR::
   1027	005244	000000 	000000 			.WORD	0,0		; !!!!RPADR AND RPSIZ MUST BE IN THIS ORDER
   1028	005250				.RPSIZ::
   1029	005250	000000 	000000 			.WORD	0,0		; !!!
   1030
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 31
LOW CORE -- CD-11 DRIVER DATA BASE

   1033						.SBTTL	LOW CORE -- CD-11 DRIVER DATA BASE
   1034
   1035		177160 				CDST==177160		; CONTROL AND STATUS REGISTER ADDRESS
   1036		177162 				CDCC==177162		; COLUMN COUNT REGISTER ADDRESS
   1037		177164 				CDBA==177164		; BUS ADDRESS REGISTER ADDRESS
   1038		177166 				CDDB==177166		; DATA BUFFER REGISTER ADDRESS
   1039
   1040	005254				CREVFG::
   1041	005254	005256'				.WORD	CRCEVF		; ADDRESS OF CR TASK'S EVENT FLAGS
   1042	005256				CRCEVF::
   1043	005256					.BLKW	1		; CURRENT EVENT FLAGS
   1044	005260				CRHUNG::
   1045	005260	000000 				.WORD	0		; # TIMES CR WAS CAUGHT SNOOZING
   1046	005262				.CRPFL::
   1047	005262	000000 				.WORD	0		; POWER FAIL FLAG FOR CARD READER
   1048					;
   1049	005264				CRSTBH::
   1050	005264					.BLKW	1		; HEADER WORD (UNIT/BYTE COUNT) OF STATUS BLOCK
   1051	005266				CRSTBK::
   1052	005266					.BLKW	2+1+<<CDDB+2-CDST>/2> ; STATUS RETURN BLOCK TO -10
   1053		000016 			CRSTLN==.-CRSTBK
   1054					;
   1055	005304				CRBUFH::
   1056	005304					.BLKW	1		; HEADER WORD (UNIT/BYTE COUNT) OF DATA BUFFER
   1057	005306				CRBUFF::
   1058	005306					.BLKW	80.		; DATA BUFFER FROM CD-11
   1059		000240 			CRBFLN==.-CRBUFF
   1060	005546	000000 				.WORD	0		; FOR OVERRUN
   1061					;
   1062					; CR DEVICE STATUS TABLE
   1063					;
   1064	005550				CRTBL::
   1065		005550'			CRTHD==.			; THREADED LIST POINTER (FOR ..STCR)
   1066	005550	000000 				.WORD	0
   1067		005552'			CREXP==.			; EXTERNAL PAGE ADDR OF CD-11
   1068	005552	177160 				.WORD	CDST
   1069		005554'			CRSTS==.			; STATUS BITS
   1070	005554	000000 				.WORD	0
   1071	005556	000000 				.WORD	0		; (NOT USED)
   1072					;
   1073		000010 			CRSIZE==.-CRTBL
   1074
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 32
LOW CORE -- LP-20 DRIVER DATA BASE

   1078						.SBTTL	LOW CORE -- LP-20 DRIVER DATA BASE
   1079
   1080		175400 				LPEXPA==175400		; EXTERNAL PAGE ADDRESS OF LPCSRA
   1081		000020 				LPEXPZ==20		; SIZE OF  EXTERNAL PAGE ADDRESSES IN BYTES
   1082
   1083					;
   1084					; MISCELLANEOUS VARIABLES
   1085					;
   1086	005560				LPUNIT::
   1087	005560					.BLKW	1		; LP UNIT # FROM PS ON INTERRUPT
   1088					;
   1089	005562				LPEVFG::
   1090	005562	005564'				.WORD	LPCEVF		; ADDRESS OF WHERE TO SET EVENT FLAGS FOR LP TASK
   1091					;
   1092	005564				LPCEVF::
   1093	005564					.BLKW	1		; CURRENT EVENT FLAGS
   1094					;
   1095	005566				LPHUNG::
   1096	005566	000000 				.WORD	0		; COUNT OF # TIMES LP WAS HUNG
   1097					;
   1098	005570				.LPPFL::
   1099	005570	000000 				.WORD	0		; POWER FAIL FLAG
   1100					;
   1101	005572				LPSTBH::
   1102	005572					.BLKW	1		; HEADER WORD (UNIT/BYTE COUNT)
   1103	005574				LPSTBK::
   1104	005574					.BLKB	4+2+2+LPEXPZ	; STATUS RETURN BLOCK TO -10
   1105						.EVEN
   1106		000030 			LPSTLN==.-LPSTBK
   1107					;
   1108					;
   1109					; LP DEVICE STATUS TABLE
   1110					;  ONE ENTRY FOR EVERY LP, SIZE= LPSIZE
   1111					;
   1112	005624				LPTBL::
   1113		000000 			$$$UNI=0			; START WITH UNIT 0
   1114		000002 				.REPT	L$$P20		; MAKE ONE FOR EACH LP
   1115					;
   1116					LPSTS==	0			; MISC STATUS BITS: *** MUST BE ZERO ***
   1117						.WORD	$$$UNI
   1118					LPCSA==	2			; EXTERNAL PAGE ADDRESS FOR THIS LP
   1119						.WORD	LPEXPA+<20*$$$UNI>
   1120					LPTHD==	4			; POINTER TO THREADED OUTPUT QUEUE
   1121									; ZERO IF NO QUEUE
   1122						.WORD	0
   1123					LPITH==	6			; INTERRUPT-LEVEL THREAD POINTER
   1124									; POINTS TO CURRENT BUFFER BEING
   1125									; OUTPUT AT INTERRUPT LEVEL
   1126						.WORD	0
   1127					;
   1128					$$$UNI=$$$UNI+1
   1129						.ENDR
	005624	000000 				.WORD	$$$UNI
	005626	175400 				.WORD	LPEXPA+<20*$$$UNI>
	005630	000000 				.WORD	0
	005632	000000 				.WORD	0
	005634	000001 				.WORD	$$$UNI
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 32-1
LOW CORE -- LP-20 DRIVER DATA BASE

	005636	175420 				.WORD	LPEXPA+<20*$$$UNI>
	005640	000000 				.WORD	0
	005642	000000 				.WORD	0
   1130		000010 			LPSIZE==<.-LPTBL>/L$$P20	; SIZE OF EACH ENTRY
   1131					;
   1132					; SECOND (PARALLEL) LP TABLE-- INDEXES ARE FROM LPTBL
   1133					;
   1134	005644				LPTBL2::
   1135		000010 				.REPT	LPSIZE*L$$P20/2	; MAKE SPACE
   1136						.WORD	0
   1137						.ENDR
	005644	000000 				.WORD	0
	005646	000000 				.WORD	0
	005650	000000 				.WORD	0
	005652	000000 				.WORD	0
	005654	000000 				.WORD	0
	005656	000000 				.WORD	0
	005660	000000 				.WORD	0
	005662	000000 				.WORD	0
   1138					;
   1139		000020 			LPMCB==	0+LPTBL2-LPTBL		; MULTI-CHARACTER BUFFER (TWO BYTES)
   1140		000022 			LPCSM==	2+LPTBL2-LPTBL		; ACCUMULATED CHECKSUM (LOW BYTE IS TRASH)
   1141		000024 			LPRTY==	4+LPTBL2-LPTBL		; RETRY COUNTER
   1142					;
   1143					; THIRD (PARALLEL) LP TABLE-- INDEXES ARE ALSO FROM LPTBL
   1144					;
   1145	005664				LPTBL3::
   1146		000010 				.REPT	LPSIZE*L$$P20/2	; MAKE SPACE
   1147						.WORD	0
   1148						.ENDR
	005664	000000 				.WORD	0
	005666	000000 				.WORD	0
	005670	000000 				.WORD	0
	005672	000000 				.WORD	0
	005674	000000 				.WORD	0
	005676	000000 				.WORD	0
	005700	000000 				.WORD	0
	005702	000000 				.WORD	0
   1149					;
   1150		000040 			LPRMA==	0+LPTBL3-LPTBL		; RAM/VFU DATA ADDRESS
   1151		000042 			LPRMZ==	2+LPTBL3-LPTBL		; RAM/VFU DATA BUFFER SIZE
   1152		000044 			LPRMC==	4+LPTBL3-LPTBL		; CURRENT POINTER INTO RAM/VFU DATA
   1153					;
   1154					; POINTERS TO LPTBL BY UNIT NUMBER
   1155					;
   1156	005704				LPUTBL::
   1157		000000 			$$$UNI=0
   1158		000002 				.REPT	L$$P20		; ONE PER LP
   1159						.WORD	LPTBL+<$$$UNI*LPSIZE>
   1160					$$$UNI=$$$UNI+1
   1161						.ENDR
	005704	005624'				.WORD	LPTBL+<$$$UNI*LPSIZE>
	005706	005634'				.WORD	LPTBL+<$$$UNI*LPSIZE>
   1162
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 33
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

   1165						.SBTTL	LOW CORE -- STD (SYSTEM TASK DIRECTORY)
   1166
   1167					;
   1168					;	SYSTEM TASK DIRECTORY
   1169					;
   1170	005710				.STDTA::
   1171	005710	005716'				.WORD	.STDTB		; STD ALPHA TABLE ADDRESS
   1172	005712				.STDTC::
   1173	005712	000044 				.WORD	36.		; STD ALPHA TABLE MAX SIZE *2
   1174	005714				.STDTZ::
   1175	005714	000024 				.WORD	24		; STD "SIZE" (2N-2)
   1176					;
   1177	005716				.STDTB::
   1179	005716	006322'				.WORD	STDCDR		; CARD READER ENTRY
   1181	005720	005762'				.WORD	STDDTE		; DTE CLOCK ENTRY
   1186	005722	006022'				.WORD	STDFED		; FE DRIVER
   1189	005724	006062'				.WORD	STDDX		; FLOPPY DRIVER
   1192	005726	006122'				.WORD	STDF11		; F11ACP
   1195	005730	006262'				.WORD	STDLPT		; LP20
   1197	005732	006422'				.WORD	STDQPR		; QUEUE'D PROTOCOL
   1199	005734	006162'				.WORD	STDRPT		; RP04 ENTRY
   1201	005736	006362'				.WORD	STDTTY		; TTY ENTRY
   1203	005740	006222'				.WORD	STDINS		; INSTALL
   1205	005742	000000 	000000 	000000 		.WORD	0,0,0,0,0,0,0
	005750	000000 	000000 	000000
	005756	000000
   1225	005760	000000 				.WORD	0
   1227					;
   1228					;
   1229					;
   1230	005762				STDDTE::
   1231	005762					.STDEN	DTE20,DTETPD,SF.TA!SF.FX!SF.ST,200,0,DTEHD,0,0,0,0,0,0
	005762	016045 	146260 			.RAD50	"DTE20"
	005766	007146'				.WORD	DTETPD
	005770	100003 				.WORD	SF.TA!SF.FX!SF.ST
	005772	   200 	   000 			.BYTE	200,0
	005774	024410'				.WORD	DTEHD
	005776	000000 				.WORD	0
	006000	000000 				.WORD	0
	006002	000000 				.WORD	0
	006004	000000 				.WORD	0
	006006	006006'				.WORD	.
	006010	006006'				.WORD	.-2
	006012	000000 				.WORD	0
	006014	000000 				.WORD	0
	006016	000000 				.WORD	0
	006020	000000 				.WORD	0
   1233					;
   1234	006022				STDFED::
   1235	006022					.STDEN	FE....,FETPD,SF.TA!SF.FX!SF.ST,176,0,FEHD,0,0,0,0,0,0
	006022	023144 	131574 			.RAD50	"FE...."
	006026	007166'				.WORD	FETPD
	006030	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006032	   176 	   000 			.BYTE	176,0
	006034	000000G				.WORD	FEHD
	006036	000000 				.WORD	0
	006040	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 33-1
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

	006042	000000 				.WORD	0
	006044	000000 				.WORD	0
	006046	006046'				.WORD	.
	006050	006046'				.WORD	.-2
	006052	000000 				.WORD	0
	006054	000000 				.WORD	0
	006056	000000 				.WORD	0
	006060	000000 				.WORD	0
   1243					;
   1244	006062				STDDX::
   1245	006062					.STDEN	DX....,DXTPD,SF.TA!SF.FX!SF.ST,176,0,DXHD,0,0,0,0,0,0
	006062	016334 	131574 			.RAD50	"DX...."
	006066	007306'				.WORD	DXTPD
	006070	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006072	   176 	   000 			.BYTE	176,0
	006074	000000G				.WORD	DXHD
	006076	000000 				.WORD	0
	006100	000000 				.WORD	0
	006102	000000 				.WORD	0
	006104	000000 				.WORD	0
	006106	006106'				.WORD	.
	006110	006106'				.WORD	.-2
	006112	000000 				.WORD	0
	006114	000000 				.WORD	0
	006116	000000 				.WORD	0
	006120	000000 				.WORD	0
   1248					;
   1249	006122				STDF11::
   1251	006122					.STDEN	F11ACP,F11TPD,SF.ST,220,<<DX0PEN-.PUDBA>/U.SZ>,145400,7700,0,145400,145400,0,5
	006122	025167 	003310 			.RAD50	"F11ACP"
	006126	007346'				.WORD	F11TPD
	006130	100000 				.WORD	SF.ST
	006132	   220 	   011 			.BYTE	220,<DX0PEN-.PUDBA>/U.SZ
	006134	145400 				.WORD	145400
	006136	007700 				.WORD	7700
	006140	000000 				.WORD	0
	006142	145400 				.WORD	145400
	006144	145400 				.WORD	145400
	006146	006146'				.WORD	.
	006150	006146'				.WORD	.-2
	006152	000000 				.WORD	0
	006154	000000 				.WORD	0
	006156	000005 				.WORD	5
	006160	000000 				.WORD	0
   1261					;
   1262	006162				STDRPT::
   1263	006162					.STDEN	RP....,RPTPD,SF.TA!SF.FX!SF.ST,176,0,RPHD,0,0,0,0,0,0
	006162	071434 	131574 			.RAD50	"RP...."
	006166	007326'				.WORD	RPTPD
	006170	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006172	   176 	   000 			.BYTE	176,0
	006174	000000G				.WORD	RPHD
	006176	000000 				.WORD	0
	006200	000000 				.WORD	0
	006202	000000 				.WORD	0
	006204	000000 				.WORD	0
	006206	006206'				.WORD	.
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 33-2
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

	006210	006206'				.WORD	.-2
	006212	000000 				.WORD	0
	006214	000000 				.WORD	0
	006216	000000 				.WORD	0
	006220	000000 				.WORD	0
   1266					;
   1267	006222				STDINS::
   1268	006222					.STDEN	.INST.,INSTPD,SF.FX!SF.ST,200,0,INSHD,0,0,INSTAL,INSTK-16,0,0
	006222	130166 	074774 			.RAD50	".INST."
	006226	007126'				.WORD	INSTPD
	006230	100002 				.WORD	SF.FX!SF.ST
	006232	   200 	   000 			.BYTE	200,0
	006234	000000G				.WORD	INSHD
	006236	000000 				.WORD	0
	006240	000000 				.WORD	0
	006242	000000G				.WORD	INSTAL
	006244	177762G				.WORD	INSTK-16
	006246	006246'				.WORD	.
	006250	006246'				.WORD	.-2
	006252	000000 				.WORD	0
	006254	000000 				.WORD	0
	006256	000000 				.WORD	0
	006260	000000 				.WORD	0
   1271					;
   1272	006262				STDLPT::
   1273	006262					.STDEN	LPDRV,LPTPD,SF.TA!SF.FX!SF.ST,176,0,LPHD,0,0,0,0,0,0
	006262	046604 	071760 			.RAD50	"LPDRV"
	006266	007226'				.WORD	LPTPD
	006270	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006272	   176 	   000 			.BYTE	176,0
	006274	000000G				.WORD	LPHD
	006276	000000 				.WORD	0
	006300	000000 				.WORD	0
	006302	000000 				.WORD	0
	006304	000000 				.WORD	0
	006306	006306'				.WORD	.
	006310	006306'				.WORD	.-2
	006312	000000 				.WORD	0
	006314	000000 				.WORD	0
	006316	000000 				.WORD	0
	006320	000000 				.WORD	0
   1276					;
   1277	006322				STDCDR::
   1278	006322					.STDEN	CDDRV,CDRTPD,SF.TA!SF.FX!SF.ST,210,0,CRHD,0,0,57252,55130-16,0,0
	006322	011544 	071760 			.RAD50	"CDDRV"
	006326	007246'				.WORD	CDRTPD
	006330	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006332	   210 	   000 			.BYTE	210,0
	006334	000000G				.WORD	CRHD
	006336	000000 				.WORD	0
	006340	000000 				.WORD	0
	006342	057252 				.WORD	57252
	006344	055112 				.WORD	55130-16
	006346	006346'				.WORD	.
	006350	006346'				.WORD	.-2
	006352	000000 				.WORD	0
	006354	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 33-3
LOW CORE -- STD (SYSTEM TASK DIRECTORY)

	006356	000000 				.WORD	0
	006360	000000 				.WORD	0
   1280					;
   1281	006362				STDTTY::
   1282	006362					.STDEN	TTYDRV,TTYTPD,SF.TA!SF.FX!SF.ST,177,0,TTYHD,0,0,0,0,0,0
	006362	100071 	015746 			.RAD50	"TTYDRV"
	006366	007206'				.WORD	TTYTPD
	006370	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006372	   177 	   000 			.BYTE	177,0
	006374	032072'				.WORD	TTYHD
	006376	000000 				.WORD	0
	006400	000000 				.WORD	0
	006402	000000 				.WORD	0
	006404	000000 				.WORD	0
	006406	006406'				.WORD	.
	006410	006406'				.WORD	.-2
	006412	000000 				.WORD	0
	006414	000000 				.WORD	0
	006416	000000 				.WORD	0
	006420	000000 				.WORD	0
   1283					;
   1284	006422				STDQPR::
   1285	006422					.STDEN	QDPROT,QPRTPD,SF.TA!SF.FX!SF.ST,176,0,BTPHD,0,0,0,0,0,0
	006422	065360 	071354 			.RAD50	"QDPROT"
	006426	007266'				.WORD	QPRTPD
	006430	100003 				.WORD	SF.TA!SF.FX!SF.ST
	006432	   176 	   000 			.BYTE	176,0
	006434	015444'				.WORD	BTPHD
	006436	000000 				.WORD	0
	006440	000000 				.WORD	0
	006442	000000 				.WORD	0
	006444	000000 				.WORD	0
	006446	006446'				.WORD	.
	006450	006446'				.WORD	.-2
	006452	000000 				.WORD	0
	006454	000000 				.WORD	0
	006456	000000 				.WORD	0
	006460	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 34
LOW CORE -- ATL (ACTIVE TASK LIST)

   1287						.SBTTL	LOW CORE -- ATL (ACTIVE TASK LIST)
   1288
   1289					;
   1290					;	ACTIVE TASK LISTHEAD
   1291					;
   1292	006462				.ATLLH::
   1293	006462	006466'				.WORD	DTETSK		; FORWARD POINTER IN ACTIVE TASK LIST
   1294	006464	007066'				.WORD	NULTSK		; NULL TASK
   1295					;
   1296					;
   1297	006466				DTETSK::
   1298	006466					.ATLEN	TTYTSK,.ATLLH,DTESP,0,200,DTEHD,TS.RUN,0,STDDTE,0,0,0,0,0,0,0
	006466	006526'				.WORD	TTYTSK
	006470	006462'				.WORD	.ATLLH
	006472	024670'				.WORD	DTESP
	006474	000000 				.WORD	0
	006476	000200 				.WORD	200
	006500	024410'				.WORD	DTEHD
	006502	   010 	   000 			.BYTE	TS.RUN,0
	006504	005762'				.WORD	STDDTE
	006506	000000 	000000 			.WORD	0,0
	006512	000000 	000000 	000000 		.WORD	0,0,0,0
	006520	000000
	006522	000000 				.WORD	0
	006524	000000 				.WORD	0
   1299					;
   1300	006526				TTYTSK::
   1301	006526					.ATLEN	RPTSK,DTETSK,TTYSP,0,177,TTYHD,TS.RUN,0,STDTTY,0,0,0,0,0,0,0
	006526	006566'				.WORD	RPTSK
	006530	006466'				.WORD	DTETSK
	006532	032352'				.WORD	TTYSP
	006534	000000 				.WORD	0
	006536	000177 				.WORD	177
	006540	032072'				.WORD	TTYHD
	006542	   010 	   000 			.BYTE	TS.RUN,0
	006544	006362'				.WORD	STDTTY
	006546	000000 	000000 			.WORD	0,0
	006552	000000 	000000 	000000 		.WORD	0,0,0,0
	006560	000000
	006562	000000 				.WORD	0
	006564	000000 				.WORD	0
   1302					;
   1304	006566				RPTSK::
   1305	006566					.ATLEN	LPTSK,TTYTSK,RPSTK,0,176,RPHD,TS.RUN,0,STDRPT,0,0,0,0,0,0,0
	006566	006626'				.WORD	LPTSK
	006570	006526'				.WORD	TTYTSK
	006572	000000G				.WORD	RPSTK
	006574	000000 				.WORD	0
	006576	000176 				.WORD	176
	006600	000000G				.WORD	RPHD
	006602	   010 	   000 			.BYTE	TS.RUN,0
	006604	006162'				.WORD	STDRPT
	006606	000000 	000000 			.WORD	0,0
	006612	000000 	000000 	000000 		.WORD	0,0,0,0
	006620	000000
	006622	000000 				.WORD	0
	006624	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 34-1
LOW CORE -- ATL (ACTIVE TASK LIST)

   1309					;
   1311	006626				LPTSK::
   1312	006626					.ATLEN	CDTSK,RPTSK,LPSTK,0,176,LPHD,TS.RUN,0,STDLPT,0,0,0,0,0,0,0
	006626	006666'				.WORD	CDTSK
	006630	006566'				.WORD	RPTSK
	006632	000000G				.WORD	LPSTK
	006634	000000 				.WORD	0
	006636	000176 				.WORD	176
	006640	000000G				.WORD	LPHD
	006642	   010 	   000 			.BYTE	TS.RUN,0
	006644	006262'				.WORD	STDLPT
	006646	000000 	000000 			.WORD	0,0
	006652	000000 	000000 	000000 		.WORD	0,0,0,0
	006660	000000
	006662	000000 				.WORD	0
	006664	000000 				.WORD	0
   1317	006666				CDTSK::
   1318	006666					.ATLEN	DTTSK,LPTSK,CRSTK,CDRTPD,176,CRHD,TS.RUN,0,STDCDR,0,0,0,0,0,0,0
	006666	006726'				.WORD	DTTSK
	006670	006626'				.WORD	LPTSK
	006672	000000G				.WORD	CRSTK
	006674	007246'				.WORD	CDRTPD
	006676	000176 				.WORD	176
	006700	000000G				.WORD	CRHD
	006702	   010 	   000 			.BYTE	TS.RUN,0
	006704	006322'				.WORD	STDCDR
	006706	000000 	000000 			.WORD	0,0
	006712	000000 	000000 	000000 		.WORD	0,0,0,0
	006720	000000
	006722	000000 				.WORD	0
	006724	000000 				.WORD	0
   1322					;
   1327	006726				DTTSK::
   1329					;
   1331	006726				FETSK::
   1332	006726					.ATLEN	DXTSK,DTTSK,FESTK,0,176,FEHD,TS.RUN,0,STDFED,0,0,0,0,0,0,0
	006726	006766'				.WORD	DXTSK
	006730	006726'				.WORD	DTTSK
	006732	000000G				.WORD	FESTK
	006734	000000 				.WORD	0
	006736	000176 				.WORD	176
	006740	000000G				.WORD	FEHD
	006742	   010 	   000 			.BYTE	TS.RUN,0
	006744	006022'				.WORD	STDFED
	006746	000000 	000000 			.WORD	0,0
	006752	000000 	000000 	000000 		.WORD	0,0,0,0
	006760	000000
	006762	000000 				.WORD	0
	006764	000000 				.WORD	0
   1336					;
   1338	006766				DXTSK::
   1339	006766					.ATLEN	QPRTSK,FETSK,DXSTK,0,176,DXHD,TS.RUN,0,STDDX,0,0,0,0,0,0,0
	006766	007026'				.WORD	QPRTSK
	006770	006726'				.WORD	FETSK
	006772	000000G				.WORD	DXSTK
	006774	000000 				.WORD	0
	006776	000176 				.WORD	176
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 34-2
LOW CORE -- ATL (ACTIVE TASK LIST)

	007000	000000G				.WORD	DXHD
	007002	   010 	   000 			.BYTE	TS.RUN,0
	007004	006062'				.WORD	STDDX
	007006	000000 	000000 			.WORD	0,0
	007012	000000 	000000 	000000 		.WORD	0,0,0,0
	007020	000000
	007022	000000 				.WORD	0
	007024	000000 				.WORD	0
   1343					;
   1344	007026				QPRTSK::
   1345	007026					.ATLEN	NULTSK,DXTSK,.BTSTK,0,1,BTPHD,TS.RUN,0,STDQPR,0,0,0,0,0,0,0
	007026	007066'				.WORD	NULTSK
	007030	006766'				.WORD	DXTSK
	007032	015724'				.WORD	.BTSTK
	007034	000000 				.WORD	0
	007036	000001 				.WORD	1
	007040	015444'				.WORD	BTPHD
	007042	   010 	   000 			.BYTE	TS.RUN,0
	007044	006422'				.WORD	STDQPR
	007046	000000 	000000 			.WORD	0,0
	007052	000000 	000000 	000000 		.WORD	0,0,0,0
	007060	000000
	007062	000000 				.WORD	0
	007064	000000 				.WORD	0
   1346					;
   1347	007066				NULTSK::
   1348	007066					.ATLEN	.ATLLH,QPRTSK,NTKXSP,0,0,NULHD,TS.RUN,0,0,0,0,0,0,0,0,0
	007066	006462'				.WORD	.ATLLH
	007070	007026'				.WORD	QPRTSK
	007072	012134'				.WORD	NTKXSP
	007074	000000 				.WORD	0
	007076	000000 				.WORD	0
	007100	011654'				.WORD	NULHD
	007102	   010 	   000 			.BYTE	TS.RUN,0
	007104	000000 				.WORD	0
	007106	000000 	000000 			.WORD	0,0
	007112	000000 	000000 	000000 		.WORD	0,0,0,0
	007120	000000
	007122	000000 				.WORD	0
	007124	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 35
LOW CORE -- TPD (TASK PARTITION DIRECTORY)

   1350						.SBTTL	LOW CORE -- TPD (TASK PARTITION DIRECTORY)
   1351
   1352					;
   1353					;	TASK PARTITION DIRECTORY
   1354					;
   1355	007126				.TPDBA::
   1357					;
   1358	007126				INSTPD::
   1359	007126					.TPDEN	INSTPD,INSHD,0,0,TF.OU
	007126	000000 	000000 			.WORD	0,0
	007126	035203 	077604 			.RAD50	"INSTPD"
	007132	000000G				.WORD	INSHD
	007134	000000 				.WORD	0
	007136	000000 				.WORD	0
	007140	000002 				.WORD	TF.OU
	007142	007142'				.WORD	.
	007144	007142'				.WORD	.-2
   1361					;
   1362	007146				DTETPD::
   1363	007146					.TPDEN	DTETPD,DTEHD,0,0,TF.OU
	007146	000000 	000000 			.WORD	0,0
	007146	016045 	077604 			.RAD50	"DTETPD"
	007152	024410'				.WORD	DTEHD
	007154	000000 				.WORD	0
	007156	000000 				.WORD	0
	007160	000002 				.WORD	TF.OU
	007162	007162'				.WORD	.
	007164	007162'				.WORD	.-2
   1365					;
   1366	007166				FETPD::
   1367	007166					.TPDEN	FETPD,FEHD,0,0,TF.OU
	007166	000000 	000000 			.WORD	0,0
	007166	023134 	062240 			.RAD50	"FETPD"
	007172	000000G				.WORD	FEHD
	007174	000000 				.WORD	0
	007176	000000 				.WORD	0
	007200	000002 				.WORD	TF.OU
	007202	007202'				.WORD	.
	007204	007202'				.WORD	.-2
   1369					;
   1370	007206				TTYTPD::
   1371	007206					.TPDEN	TTYTPD,TTYHD,0,0,TF.OU
	007206	000000 	000000 			.WORD	0,0
	007206	100071 	077604 			.RAD50	"TTYTPD"
	007212	032072'				.WORD	TTYHD
	007214	000000 				.WORD	0
	007216	000000 				.WORD	0
	007220	000002 				.WORD	TF.OU
	007222	007222'				.WORD	.
	007224	007222'				.WORD	.-2
   1373					;
   1374	007226				LPTPD::
   1375	007226					.TPDEN	LPTPD,LPHD,0,0,TF.OU
	007226	000000 	000000 			.WORD	0,0
	007226	046624 	062240 			.RAD50	"LPTPD"
	007232	000000G				.WORD	LPHD
	007234	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 35-1
LOW CORE -- TPD (TASK PARTITION DIRECTORY)

	007236	000000 				.WORD	0
	007240	000002 				.WORD	TF.OU
	007242	007242'				.WORD	.
	007244	007242'				.WORD	.-2
   1378					;
   1379	007246				CDRTPD::
   1380	007246					.TPDEN	CDRTPD,CRHD,0,0,TF.OU
	007246	000000 	000000 			.WORD	0,0
	007246	011562 	077604 			.RAD50	"CDRTPD"
	007252	000000G				.WORD	CRHD
	007254	000000 				.WORD	0
	007256	000000 				.WORD	0
	007260	000002 				.WORD	TF.OU
	007262	007262'				.WORD	.
	007264	007262'				.WORD	.-2
   1382					;
   1383	007266				QPRTPD::
   1384	007266					.TPDEN	QPRTPD,BTPHD,0,0,TF.OU
	007266	000000 	000000 			.WORD	0,0
	007266	066322 	077604 			.RAD50	"QPRTPD"
	007272	015444'				.WORD	BTPHD
	007274	000000 				.WORD	0
	007276	000000 				.WORD	0
	007300	000002 				.WORD	TF.OU
	007302	007302'				.WORD	.
	007304	007302'				.WORD	.-2
   1391					;
   1392	007306				DXTPD::
   1393	007306					.TPDEN	DXTPD,DXHD,0,0,TF.OU
	007306	000000 	000000 			.WORD	0,0
	007306	016324 	062240 			.RAD50	"DXTPD"
	007312	000000G				.WORD	DXHD
	007314	000000 				.WORD	0
	007316	000000 				.WORD	0
	007320	000002 				.WORD	TF.OU
	007322	007322'				.WORD	.
	007324	007322'				.WORD	.-2
   1396					;
   1397	007326				RPTPD::
   1398	007326					.TPDEN	RPTPD,RPHD,0,0,TF.OU
	007326	000000 	000000 			.WORD	0,0
	007326	071424 	062240 			.RAD50	"RPTPD"
	007332	000000G				.WORD	RPHD
	007334	000000 				.WORD	0
	007336	000000 				.WORD	0
	007340	000002 				.WORD	TF.OU
	007342	007342'				.WORD	.
	007344	007342'				.WORD	.-2
   1401					;
   1402	007346				F11TPD::
   1403	007346					.TPDEN	F11TPD,145400,12400,0,0
	007346	000000 	000000 			.WORD	0,0
	007346	025167 	077604 			.RAD50	"F11TPD"
	007352	145400 				.WORD	145400
	007354	012400 				.WORD	12400
	007356	000000 				.WORD	0
	007360	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 35-2
LOW CORE -- TPD (TASK PARTITION DIRECTORY)

	007362	007362'				.WORD	.
	007364	007362'				.WORD	.-2
   1405					;
   1406	007366				GENTPD::
   1407	007366					.TPDEN	GEN,100000,45400,0,0
	007366	000000 	000000 			.WORD	0,0
	007366	026226 				.RAD50	"GEN"
	007372	100000 				.WORD	100000
	007374	045400 				.WORD	45400
	007376	000000 				.WORD	0
	007400	000000 				.WORD	0
	007402	007402'				.WORD	.
	007404	007402'				.WORD	.-2
   1408					;
   1409	007406				.TPDEA::		;END OF TPD
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 36
LOW CORE -- DEVICE QUEUE POINTERS

   1411						.SBTTL	LOW CORE -- DEVICE QUEUE POINTERS
   1412
   1413					;
   1414					;	DEVICE QUEUE POINTERS
   1415					;
   1416		000020 			Q.SZ=20		; QUEUE ENTRY SIZE (NOTE:IS A GLOBAL VAR.)
   1417
   1418		000001 				D.CCTY==1	; DEVICE CODE FOR CTY
   1419	007406				.DQPBA::
   1420	007406					.DQPEN	TTTBL,8.,..STTY,..STPT,IGNO,IGNO,0,TTCNT
	007406	002776'				.WORD	TTTBL
	007410	000010 				.WORD	8.
	007412	043342'				.WORD	..STTY
	007414	043632'				.WORD	..STPT
	007416	011512'				.WORD	IGNO
	007420	011512'				.WORD	IGNO
	007422	000000 				.WORD	0
	007424	000205 				.WORD	TTCNT
   1421
   1422		000002 				D.CDL1==2	; DEVICE CODE FOR DL-11
   1423	007426					.DQPEN	DLTBL,8.,..STTY,..STPT,IGNO,IGNO,0,DLCNT
	007426	002776'				.WORD	DLTBL
	007430	000010 				.WORD	8.
	007432	043342'				.WORD	..STTY
	007434	043632'				.WORD	..STPT
	007436	011512'				.WORD	IGNO
	007440	011512'				.WORD	IGNO
	007442	000000 				.WORD	0
	007444	000005 				.WORD	DLCNT
   1424
   1425		000003 				D.CDH1==3	; DEVICE CODE FOR DH-11 (1)
   1426	007446				.DQDH0::
   1427	007446					.DQPEN	DHTBL,8.,..STTY,..STPT,IGNO,IGNO,0,DHCNT
	007446	003046'				.WORD	DHTBL
	007450	000010 				.WORD	8.
	007452	043342'				.WORD	..STTY
	007454	043632'				.WORD	..STPT
	007456	011512'				.WORD	IGNO
	007460	011512'				.WORD	IGNO
	007462	000000 				.WORD	0
	007464	000200 				.WORD	DHCNT
   1428
   1429		000004 				D.CDLS==4	; DEVICE CODE FOR DATA LINE SCANNER (1)
   1430	007466				.DQDLS::
   1431	007466					.DQPEN	TTTBL,8.,..STTY,..STPT,IGNO,IGNO,0,TTCNT
	007466	002776'				.WORD	TTTBL
	007470	000010 				.WORD	8.
	007472	043342'				.WORD	..STTY
	007474	043632'				.WORD	..STPT
	007476	011512'				.WORD	IGNO
	007500	011512'				.WORD	IGNO
	007502	000000 				.WORD	0
	007504	000205 				.WORD	TTCNT
   1432
   1433		000005 				D.CLPT==5	; DEVICE CODE FOR LPT
   1434	007506					.DQPEN	LPTBL,8.,..STLP,..SPLP,IGNO,..AKLP,0,2
	007506	005624'				.WORD	LPTBL
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 36-1
LOW CORE -- DEVICE QUEUE POINTERS

	007510	000010 				.WORD	8.
	007512	000000G				.WORD	..STLP
	007514	000000G				.WORD	..SPLP
	007516	011512'				.WORD	IGNO
	007520	000000G				.WORD	..AKLP
	007522	000000 				.WORD	0
	007524	000002 				.WORD	2
   1435
   1436		000006 				D.CCDR==6	; DEVICE CODE FOR CDR
   1437	007526					.DQPEN	CRTBL,8.,..STCR,IGNO,IGNO,..AKCR,0,1
	007526	005550'				.WORD	CRTBL
	007530	000010 				.WORD	8.
	007532	000000G				.WORD	..STCR
	007534	011512'				.WORD	IGNO
	007536	011512'				.WORD	IGNO
	007540	000000G				.WORD	..AKCR
	007542	000000 				.WORD	0
	007544	000001 				.WORD	1
   1438
   1439		000007 				D.CCLK==7	; DEVICE CODE FOR CLOCK
   1440	007546					.DQPEN	0,0,0,0,0,0,0,1
	007546	000000 				.WORD	0
	007550	000000 				.WORD	0
	007552	000000 				.WORD	0
	007554	000000 				.WORD	0
	007556	000000 				.WORD	0
	007560	000000 				.WORD	0
	007562	000000 				.WORD	0
	007564	000001 				.WORD	1
   1441
   1442		000010 				D.FEPD==10	; PSEUDO DEVICE FOR FE
   1443	007566					.DQPEN	FETBL,2.,.FEST,IGNO,IGNO,.FEACK,0,4
	007566	005116'				.WORD	FETBL
	007570	000002 				.WORD	2.
	007572	000000G				.WORD	.FEST
	007574	011512'				.WORD	IGNO
	007576	011512'				.WORD	IGNO
	007600	000000G				.WORD	.FEACK
	007602	000000 				.WORD	0
	007604	000004 				.WORD	4
   1444
   1445
   1446	007606				.DQPEA::			; END OF DEVICE QUEUE POINTER TABLE
   1447		000010 			.DQPSZ==.DQPEA-.DQPBA/Q.SZ	; SIZE OF DEVICE QUEUE POINTER TABLE
   1448
   1449					;
   1450					;	NOTE -- THESE PSUEDO-DEVICES ARE OUTPUT-ONLY AND
   1451					;		ARE ASSOCIATED WITH ERROR LOGGING
   1452					;
   1453		000200 				D.CCPU==200		; PSEUDO DEVICE PDP10 CPU
   1454		000201 				D.CKLE==201		; KL ERROR PSEUDO DEVICE
   1455		000210 				D.CKLN==210		; KLINIK PSEUDO-DEVICE
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 37
LOW CORE -- LOGICAL UNIT TABLES

   1457						.SBTTL	LOW CORE -- LOGICAL UNIT TABLES
   1458
   1459					;
   1460					;	LOGICAL UNIT TABLE
   1461					;
   1462	007606				.PUDBA::			; START OF LOGICAL UNIT TABLE
   1463					;
   1464		000001 				L.TTY==1	; LOGICAL UNIT 1
   1465	007606				TTPEN::
   1466	007606					.PUDEN	TT,0,0,UC.REC!UC.CCL!UC.TTY,0,0,80.,TTPEN,TTYTSK,0,0,0
	007606	   124 	   124 			.ASCII	"TT"
	007610	   000 				.BYTE	0
	007611	   000 				.BYTE	0
	007612	000007 				.WORD	UC.REC!UC.CCL!UC.TTY
	007614	000000 				.WORD	0
	007616	000000 				.WORD	0
	007620	000120 				.WORD	80.
	007622	000000 				.WORD	0
	007624	007606'				.WORD	TTPEN
	007626	006526'				.WORD	TTYTSK
	007630	007630'				.WORD	.
	007632	007630'				.WORD	.-2
	007634	000000 				.WORD	0
	007636	   005 	   005 			.BYTE	5,5
	007640	000000 				.WORD	0
	007642	177777 				.WORD	-1
	007644	135600 				.RAD50	/0/
	007646	000000 				.WORD	0
	007650	000000 				.WORD	0
	007652	000000 				.WORD	0
	007654	000000 				.WORD	0
   1467					;
   1468		000002 				L.RP4==2
   1469						;DVCH=CH.OFF+CH.NAT*400+CH.OFF+CH.NAT
   1470		110220 				DVCH=110220
   1471						;FW=UF.TL!UF.RH
   1472		000300 				FW=300
   1473						;C1=UC.MNT!UC.F11!UC.DIR
   1474		140010 				C1=140010
   1475						;C1DB=UC.MNT!UC.F11!UC.DIR!UC.ETB
   1476		140110 				C1DB=140110
   1477					;
   1479	007656				RPPEN::
   1480	007656					.PUDEN	DB,0,FW,C1DB,0,0,512.,RPPEN,RPTSK,DVCH,F11,0
	007656	   104 	   102 			.ASCII	"DB"
	007660	   000 				.BYTE	0
	007661	   300 				.BYTE	FW
	007662	140110 				.WORD	C1DB
	007664	000000 				.WORD	0
	007666	000000 				.WORD	0
	007670	001000 				.WORD	512.
	007672	000000 				.WORD	0
	007674	007656'				.WORD	RPPEN
	007676	006566'				.WORD	RPTSK
	007700	007700'				.WORD	.
	007702	007700'				.WORD	.-2
	007704	000000 				.WORD	0
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 37-1
LOW CORE -- LOGICAL UNIT TABLES

	007706	   005 	   005 			.BYTE	5,5
	007710	110220 				.WORD	DVCH
	007712	177777 				.WORD	-1
	007714	025167 				.RAD50	/F11/
	007716	000000 				.WORD	0
	007720	000000 				.WORD	0
	007722	000000 				.WORD	0
	007724	000000 				.WORD	0
   1481					; THIS IS DONE TO KEEP .PUDEN MACROS SHORTER THAN 80 CHARS
   1482		007722'			.=.-4
   1483	007722	000002 				.WORD	2
   1484	007724	050700 				.WORD	50700		; RP SIZE IS 140000. BLOCKS
   1485	007726				.RP1PE::
   1486	007726					.PUDEN DB,1,FW,C1DB,0,0,512.,.RP1PE,RPTSK,DVCH,F11,0
	007726	   104 	   102 			.ASCII	"DB"
	007730	   001 				.BYTE	1
	007731	   300 				.BYTE	FW
	007732	140110 				.WORD	C1DB
	007734	000000 				.WORD	0
	007736	000000 				.WORD	0
	007740	001000 				.WORD	512.
	007742	000000 				.WORD	0
	007744	007726'				.WORD	.RP1PE
	007746	006566'				.WORD	RPTSK
	007750	007750'				.WORD	.
	007752	007750'				.WORD	.-2
	007754	000000 				.WORD	0
	007756	   005 	   005 			.BYTE	5,5
	007760	110220 				.WORD	DVCH
	007762	177777 				.WORD	-1
	007764	025167 				.RAD50	/F11/
	007766	000000 				.WORD	0
	007770	000000 				.WORD	0
	007772	000000 				.WORD	0
	007774	000000 				.WORD	0
   1487		007772'				.=.-4
   1488	007772	000002 				.WORD	2
   1489	007774	050700 				.WORD	50700
   1490	007776				.RP2PE::
   1491	007776					.PUDEN DB,2,FW,C1DB,0,0,512.,.RP2PE,RPTSK,DVCH,F11,0
	007776	   104 	   102 			.ASCII	"DB"
	010000	   002 				.BYTE	2
	010001	   300 				.BYTE	FW
	010002	140110 				.WORD	C1DB
	010004	000000 				.WORD	0
	010006	000000 				.WORD	0
	010010	001000 				.WORD	512.
	010012	000000 				.WORD	0
	010014	007776'				.WORD	.RP2PE
	010016	006566'				.WORD	RPTSK
	010020	010020'				.WORD	.
	010022	010020'				.WORD	.-2
	010024	000000 				.WORD	0
	010026	   005 	   005 			.BYTE	5,5
	010030	110220 				.WORD	DVCH
	010032	177777 				.WORD	-1
	010034	025167 				.RAD50	/F11/
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 37-2
LOW CORE -- LOGICAL UNIT TABLES

	010036	000000 				.WORD	0
	010040	000000 				.WORD	0
	010042	000000 				.WORD	0
	010044	000000 				.WORD	0
   1492		010042'				.=.-4
   1493	010042	000002 				.WORD	2
   1494	010044	050700 				.WORD	50700
   1495	010046				.RP3PE::
   1496	010046					.PUDEN DB,3,FW,C1DB,0,0,512.,.RP3PE,RPTSK,DVCH,F11,0
	010046	   104 	   102 			.ASCII	"DB"
	010050	   003 				.BYTE	3
	010051	   300 				.BYTE	FW
	010052	140110 				.WORD	C1DB
	010054	000000 				.WORD	0
	010056	000000 				.WORD	0
	010060	001000 				.WORD	512.
	010062	000000 				.WORD	0
	010064	010046'				.WORD	.RP3PE
	010066	006566'				.WORD	RPTSK
	010070	010070'				.WORD	.
	010072	010070'				.WORD	.-2
	010074	000000 				.WORD	0
	010076	   005 	   005 			.BYTE	5,5
	010100	110220 				.WORD	DVCH
	010102	177777 				.WORD	-1
	010104	025167 				.RAD50	/F11/
	010106	000000 				.WORD	0
	010110	000000 				.WORD	0
	010112	000000 				.WORD	0
	010114	000000 				.WORD	0
   1497		010112'				.=.-4
   1498	010112	000002 				.WORD	2
   1499	010114	050700 				.WORD	50700
   1500	010116				.RP4PE::
   1501	010116					.PUDEN DB,4,FW,C1DB,0,0,512.,.RP4PE,RPTSK,DVCH,F11,0
	010116	   104 	   102 			.ASCII	"DB"
	010120	   004 				.BYTE	4
	010121	   300 				.BYTE	FW
	010122	140110 				.WORD	C1DB
	010124	000000 				.WORD	0
	010126	000000 				.WORD	0
	010130	001000 				.WORD	512.
	010132	000000 				.WORD	0
	010134	010116'				.WORD	.RP4PE
	010136	006566'				.WORD	RPTSK
	010140	010140'				.WORD	.
	010142	010140'				.WORD	.-2
	010144	000000 				.WORD	0
	010146	   005 	   005 			.BYTE	5,5
	010150	110220 				.WORD	DVCH
	010152	177777 				.WORD	-1
	010154	025167 				.RAD50	/F11/
	010156	000000 				.WORD	0
	010160	000000 				.WORD	0
	010162	000000 				.WORD	0
	010164	000000 				.WORD	0
   1502		010162'				.=.-4
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 37-3
LOW CORE -- LOGICAL UNIT TABLES

   1503	010162	000002 				.WORD	2
   1504	010164	050700 				.WORD	50700
   1505	010166				.RP5PE::
   1506	010166					.PUDEN DB,5,FW,C1DB,0,0,512.,.RP5PE,RPTSK,DVCH,F11,0
	010166	   104 	   102 			.ASCII	"DB"
	010170	   005 				.BYTE	5
	010171	   300 				.BYTE	FW
	010172	140110 				.WORD	C1DB
	010174	000000 				.WORD	0
	010176	000000 				.WORD	0
	010200	001000 				.WORD	512.
	010202	000000 				.WORD	0
	010204	010166'				.WORD	.RP5PE
	010206	006566'				.WORD	RPTSK
	010210	010210'				.WORD	.
	010212	010210'				.WORD	.-2
	010214	000000 				.WORD	0
	010216	   005 	   005 			.BYTE	5,5
	010220	110220 				.WORD	DVCH
	010222	177777 				.WORD	-1
	010224	025167 				.RAD50	/F11/
	010226	000000 				.WORD	0
	010230	000000 				.WORD	0
	010232	000000 				.WORD	0
	010234	000000 				.WORD	0
   1507		010232'				.=.-4
   1508	010232	000002 				.WORD	2
   1509	010234	050700 				.WORD	50700
   1510	010236				.RP6PE::
   1511	010236					.PUDEN DB,6,FW,C1DB,0,0,512.,.RP6PE,RPTSK,DVCH,F11,0
	010236	   104 	   102 			.ASCII	"DB"
	010240	   006 				.BYTE	6
	010241	   300 				.BYTE	FW
	010242	140110 				.WORD	C1DB
	010244	000000 				.WORD	0
	010246	000000 				.WORD	0
	010250	001000 				.WORD	512.
	010252	000000 				.WORD	0
	010254	010236'				.WORD	.RP6PE
	010256	006566'				.WORD	RPTSK
	010260	010260'				.WORD	.
	010262	010260'				.WORD	.-2
	010264	000000 				.WORD	0
	010266	   005 	   005 			.BYTE	5,5
	010270	110220 				.WORD	DVCH
	010272	177777 				.WORD	-1
	010274	025167 				.RAD50	/F11/
	010276	000000 				.WORD	0
	010300	000000 				.WORD	0
	010302	000000 				.WORD	0
	010304	000000 				.WORD	0
   1512		010302'				.=.-4
   1513	010302	000002 				.WORD	2
   1514	010304	050700 				.WORD	50700
   1515	010306				.RP7PE::
   1516	010306					.PUDEN DB,7,FW,C1DB,0,0,512.,.RP7PE,RPTSK,DVCH,F11,0
	010306	   104 	   102 			.ASCII	"DB"
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 37-4
LOW CORE -- LOGICAL UNIT TABLES

	010310	   007 				.BYTE	7
	010311	   300 				.BYTE	FW
	010312	140110 				.WORD	C1DB
	010314	000000 				.WORD	0
	010316	000000 				.WORD	0
	010320	001000 				.WORD	512.
	010322	000000 				.WORD	0
	010324	010306'				.WORD	.RP7PE
	010326	006566'				.WORD	RPTSK
	010330	010330'				.WORD	.
	010332	010330'				.WORD	.-2
	010334	000000 				.WORD	0
	010336	   005 	   005 			.BYTE	5,5
	010340	110220 				.WORD	DVCH
	010342	177777 				.WORD	-1
	010344	025167 				.RAD50	/F11/
	010346	000000 				.WORD	0
	010350	000000 				.WORD	0
	010352	000000 				.WORD	0
	010354	000000 				.WORD	0
   1517		010352'				.=.-4
   1518	010352	000002 				.WORD	2
   1519	010354	050700 				.WORD	50700
   1521		000003 				L.DT0==3
   1533					;
   1534		000005 				L.DX0==5
   1535	010356				DX0PEN::
   1536	010356					.PUDEN	DX,0,FW,C1,0,0,512.,DX0PEN,DXTSK,DVCH,F11,0
	010356	   104 	   130 			.ASCII	"DX"
	010360	   000 				.BYTE	0
	010361	   300 				.BYTE	FW
	010362	140010 				.WORD	C1
	010364	000000 				.WORD	0
	010366	000000 				.WORD	0
	010370	001000 				.WORD	512.
	010372	000000 				.WORD	0
	010374	010356'				.WORD	DX0PEN
	010376	006766'				.WORD	DXTSK
	010400	010400'				.WORD	.
	010402	010400'				.WORD	.-2
	010404	000000 				.WORD	0
	010406	   005 	   005 			.BYTE	5,5
	010410	110220 				.WORD	DVCH
	010412	177777 				.WORD	-1
	010414	025167 				.RAD50	/F11/
	010416	000000 				.WORD	0
	010420	000000 				.WORD	0
	010422	000000 				.WORD	0
	010424	000000 				.WORD	0
   1537		010424'			.=.-2
   1538	010424	000756 				.WORD	494.
   1539		000006 				L.DX1==6
   1540	010426				DX1PEN::
   1541	010426					.PUDEN	DX,1,FW,C1,0,0,512.,DX1PEN,DXTSK,DVCH,F11,0
	010426	   104 	   130 			.ASCII	"DX"
	010430	   001 				.BYTE	1
	010431	   300 				.BYTE	FW
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 37-5
LOW CORE -- LOGICAL UNIT TABLES

	010432	140010 				.WORD	C1
	010434	000000 				.WORD	0
	010436	000000 				.WORD	0
	010440	001000 				.WORD	512.
	010442	000000 				.WORD	0
	010444	010426'				.WORD	DX1PEN
	010446	006766'				.WORD	DXTSK
	010450	010450'				.WORD	.
	010452	010450'				.WORD	.-2
	010454	000000 				.WORD	0
	010456	   005 	   005 			.BYTE	5,5
	010460	110220 				.WORD	DVCH
	010462	177777 				.WORD	-1
	010464	025167 				.RAD50	/F11/
	010466	000000 				.WORD	0
	010470	000000 				.WORD	0
	010472	000000 				.WORD	0
	010474	000000 				.WORD	0
   1542		010474'			.=.-2
   1543	010474	000756 				.WORD	494.
   1546					;
   1547	010476				LP0PUD::
   1548	010476					.PUDEN	LP,0,0,UC.REC!UC.CCL,0,0,132.,LP0PUD,LPTSK,0,0,0
	010476	   114 	   120 			.ASCII	"LP"
	010500	   000 				.BYTE	0
	010501	   000 				.BYTE	0
	010502	000003 				.WORD	UC.REC!UC.CCL
	010504	000000 				.WORD	0
	010506	000000 				.WORD	0
	010510	000204 				.WORD	132.
	010512	000000 				.WORD	0
	010514	010476'				.WORD	LP0PUD
	010516	006626'				.WORD	LPTSK
	010520	010520'				.WORD	.
	010522	010520'				.WORD	.-2
	010524	000000 				.WORD	0
	010526	   005 	   005 			.BYTE	5,5
	010530	000000 				.WORD	0
	010532	177777 				.WORD	-1
	010534	135600 				.RAD50	/0/
	010536	000000 				.WORD	0
	010540	000000 				.WORD	0
	010542	000000 				.WORD	0
	010544	000000 				.WORD	0
   1551					;
   1552	010546				FE0PUD::
   1553	010546					.PUDEN	FE,0,UF.RH,C1,0,0,512.,FE0PUD,FETSK,DVCH,T20,0
	010546	   106 	   105 			.ASCII	"FE"
	010550	   000 				.BYTE	0
	010551	   200 				.BYTE	UF.RH
	010552	140010 				.WORD	C1
	010554	000000 				.WORD	0
	010556	000000 				.WORD	0
	010560	001000 				.WORD	512.
	010562	000000 				.WORD	0
	010564	010546'				.WORD	FE0PUD
	010566	006726'				.WORD	FETSK
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 37-6
LOW CORE -- LOGICAL UNIT TABLES

	010570	010570'				.WORD	.
	010572	010570'				.WORD	.-2
	010574	000000 				.WORD	0
	010576	   005 	   005 			.BYTE	5,5
	010600	110220 				.WORD	DVCH
	010602	177777 				.WORD	-1
	010604	101036 				.RAD50	/T20/
	010606	000000 				.WORD	0
	010610	000000 				.WORD	0
	010612	000000 				.WORD	0
	010614	000000 				.WORD	0
   1555					;
   1556	010616				SY0PUD::
   1560
   1565	010616					.PUDEN	SY,0,0,0,0,0,0,DX0PEN,0,0,0,0
	010616	   123 	   131 			.ASCII	"SY"
	010620	   000 				.BYTE	0
	010621	   000 				.BYTE	0
	010622	000000 				.WORD	0
	010624	000000 				.WORD	0
	010626	000000 				.WORD	0
	010630	000000 				.WORD	0
	010632	000000 				.WORD	0
	010634	010356'				.WORD	DX0PEN
	010636	000000 				.WORD	0
	010640	010640'				.WORD	.
	010642	010640'				.WORD	.-2
	010644	000000 				.WORD	0
	010646	   005 	   005 			.BYTE	5,5
	010650	000000 				.WORD	0
	010652	177777 				.WORD	-1
	010654	135600 				.RAD50	/0/
	010656	000000 				.WORD	0
	010660	000000 				.WORD	0
	010662	000000 				.WORD	0
	010664	000000 				.WORD	0
   1568	010666				.PUDEA::
   1569							; END OF LOGICAL UNIT ABLE
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 38
LOW CORE -- KL10 HARDWARE ENVIRONMENT DATA

   1571						.SBTTL	LOW CORE -- KL10 HARDWARE ENVIRONMENT DATA
   1572
   1573
   1574	010666				.CPUSN::
   1575	010666	000000 				.WORD	0		; [TCO 4.2333] KL10 CPU SERIAL NUMBER
   1576									; [TCO 4.2333] .EQ. 0 ==> MUST BE READ
   1577									; [TCO 4.2333] .LT. 0 ==> CAN'T BE READ
   1578									; [TCO 4.2333] .GT. 0 ==> ALREADY READ
   1579	010670				.HRDWR::
   1580	010670	000000 				.WORD	0		; [TCO 4.2333] HARDWARE OPTION BIT MASK
   1581
   1582		000001 				H.KUDF==BIT0		; [TCO 4.2333] UNDEFINED
   1583		000002 				H.KMOS==BIT1		; [TCO 4.2333] MOS MASTER OSCILLATOR
   1584		000004 				H.KEXT==BIT2		; [TCO 4.2333] EXTENDED ADDRESING
   1585		000010 				H.KCHN==BIT3		; [TCO 4.2333] INTERNAL CHANNELS
   1586		000020 				H.KCAC==BIT4		; [TCO 4.2333] CACHE
   1587		000040 				H.KPWR==BIT5		; [TCO 4.2333] LINE FREQUENCY
   1588									; [TCO 4.2333] .EQ. 0 ==> 60 HZ.
   1589									; [TCO 4.2333] .NE. 0 ==> 50 HZ.
   1590
   1591		010672'				.LCEND==.		; [TCO 4.2333] DEFINE THE END OF THE STATUS BLOCK
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 39
LOW CORE -- INITLM (INITIALIZATION)

   1593						.SBTTL	LOW CORE -- INITLM (INITIALIZATION)
   1594
   1595					;
   1596					;	INITIALIZATION CODE ALSO DOUBLES AS
   1597					;	EMERGENCY STACK AREA FOR CRASH
   1598					;
   1599	010672				INITLM::
   1600	010672	013700 	001004'			MOV	.EXEND+2,R0	; GET ABSOLUTE EXEC LIMIT
   1601	010676	062700 	000003 			ADD	#3,R0		; ROUND UP TO NEXT 4 BYTES
   1602	010702	042700 	000003 			BIC	#3,R0		; SO
   1603	010706	010037 	001420'			MOV	R0,.FREPL	; SET BASE OF FREE POOL
   1604	010712	012701 	075774 			MOV	#.BGBST-4,R1	; END OF FREE POOL MINUS 10 BYTES
   1605	010716	160001 				SUB	R0,R1		; COMPUTE SIZE OF FREE POOL
   1606	010720	005020 				CLR	(R0)+		; INDICATE NO LINKS
   1607	010722	010110 				MOV	R1,@R0		; SET FREE POOL SIZE
   1608	010724	010137 	001422'			MOV	R1,.FREPL+2	; HERE TOO
   1609	010730	013700 	001414'			MOV	.BGBUF,R0
   1610	010734	005020 				CLR	(R0)+
   1611	010736	012710 	002000 			MOV	#.BGLEN,@R0
   1612	010742	105237 	001123'			INCB	.NOERR+1	; SET FORCED STOP
   1613	010746	010706 				MOV	PC,SP		; SET UP THE STACK
   1614	010750	012737 	000200 	001014'		MOV	#EV.PF,.SERFG+0	; SET POWER FAIL
   1615	010756	012737 	004000 	177776 		MOV	#4000,@#PS	; ENABLE INTERRUPTS
   1616	010764	012746 	013222'			MOV	#ASXE1,-(SP)
   1617	010770	162706 	000006 			SUB	#6,SP		; SET UP INITIAL TO TEN Q
   1618	010774	000137 	044716'			JMP	INIAN		; GO DO IT
   1619						;
   1620	011000				EMGSTK::			; EMERGENCY STACK AREA
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 40
LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS

   1622						.SBTTL	LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS
   1623					;
   1624					;	TRAPS HANDLED HERE ARE:
   1625					;
   1626					;	TRAP TO 4 (DEVICE OR MEMORY TIMEOUT AND 11 CATCH ALL)
   1627					;	TRAP TO 10 (ILLEGAL INSTRUCTION)
   1628					;	T-BIT AND BPT TRAPS
   1629					;	IOT INSTRUCTION
   1630					;	TRAP INSTRUCTION
   1631					;
   1632					;	ILLEGAL INTERRUPTS TRAP HERE.  THEY ARE DETERMINED
   1633					;	BY PLACING AN ODD ADDRESS IN UNUSED TRAP VECTORS
   1634					;	WHEN THE PROCESSOR TRAPS TO AN ILLEGAL TRAP VECTOR IT WIL
   1635					;	PUT THE ILLEGAL (ODD) ADDRESS IN THE PC AND TRAP TO 4
   1636					;	THIS WILL THEN ALLOW THE FIELD SERVICE PEOPLE TO
   1637					;	DETERMINE WHAT LOCATION THE PROCESSOR HAS PICKED
   1638					;	TO DO AN ILLEGAL TRAP
   1639					;
   1640					;
   1641					;	GENERALLY THESE TRAPS LIKE THE OTHERS THAT TRAP TO UN ATTACHED
   1642					;	TRAP VECTORS ARE FATAL.  THESE HAVE BEEN SEPARATED OUT
   1643					;	BECAUSE THEY ARE PROBABLY PROGRAM ERRORS AND NOT
   1644					;	HARDWARE ERRORS.  IT IS POSSIBLE THAT IF THESE ARE
   1645					;	SEPARATED FROM HARDWARE TRAPS THAT IT WILL BE POSSIBLE
   1646					;	TO PROVIDE SOME PROGRAM DEBUGGING BY IDENTIFICATION OF
   1647					;	THESE SPECIFIC TYPES.
   1648					;
   1649					;	HARDWARE/SOFTWARE ERROR TRAPS HANDLED HERE ARE:
   1650					;
   1651					;	TRAP TO UNASSIGNED TRAP VECTOR
   1652					;	PARITY ERROR
   1653					;
   1654					;
   1655						.ENABL	LSB
   1656	011000				COMTRP:
   1657	011000	013737 	177776 	001120'		MOV	PS,TRPASV	; SAVE THE COMTRP PS
   1658	011006	042737 	177760 	001120'		BIC	#177760,TRPASV	; MASK OFF PRIORITY BITS
   1659	011014	022706 	001000 			CMP	#1000,SP	; LEGAL STACK?
   1660	011020	103403 				BLO	10$		; YES -- NOT RED VIOLATION
   1661	011022	012706 	011000'			MOV	#EMGSTK,SP	; NO -- BETTER RESCUE STACK
   1662	011026	000450 				BR	30$		; THEN CRASH SYSTEM
   1663						;
   1664	011030				10$:
   1665	011030	010546 				MOV	R5,-(SP)
   1666	011032	032766 	000340 	000004 		BIT	#340,4(SP)	; EXEC?
   1667	011040	001043 				BNE	30$		; YES -- CRASH
   1668									; FIND THE TRAP VECTOR
   1669	011042	013705 	001006'			MOV	.CRTSK,R5	; FIND THE CURRENT TASK
   1670	011046	016505 	000016 			MOV	A.TD(R5),R5	; FIND STD POINTER
   1671	011052	016505 	000030 			MOV	S.SS(R5),R5	; FIND THE SST VECTOR
   1672	011056	001410 				BEQ	CMNABO		; NONE -- CRASH
   1673	011060	063705 	001120'			ADD	TRPASV,R5	; FIND WHICH VECTOR
   1674	011064					MFPS	@R5,R5		; FIND THE ADDRESS
	011064	011505 				MOV	@R5,R5
   1675	011066	001404 				BEQ	CMNABO		; NONE FOUND -QUIT
   1676	011070	012637 	001116'			MOV	(SP)+,EMTSTK	; SAVE R5 FOR COMMON TRAP
   1677	011074	000137 	012740'			JMP	.SSTCO
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 40-1
LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS

   1678						;
   1679	011100				CMNABO::
   1680	011100	013705 	001006'			MOV	.CRTSK,R5	; FIND THE CURRENT TASK
   1681	011104	013765 	001120'	000024 		MOV	TRPASV,A.FM+0(R5) ;SET THE REASON FOR ABORT
   1682	011112	112765 	000004 	000014 		MOVB	#TS.TKN,A.TS(R5) ;SET TASK STATUS TO ABORT
   1683	011120	005237 	001124'			INC	.TKTN		; SET TKTN FLAG
   1684	011124	026527 	000006 	007346'		CMP	A.PD(R5),#F11TPD ;FILES 11 TPD?
   1685	011132	001003 				BNE	20$		; NO -- TKTN WILL WORK
   1686	011134					.CRASH	FTA		; YES -- CAN'T GET TKTN IN
	011134	000004 				IOT
	011136	   106 	   124 	   101 		.ASCIZ	/FTA/
	011141	   000
   1687						;
   1688	011142				TRPXIT:
   1689	011142				20$:
   1690	011142	012605 				MOV	(SP)+,R5	; RESTORE R5
   1691	011144	000137 	014244'			JMP	..INTX		; RETURN
   1692						;
   1693	011150				30$:
   1694	011150	013705 	001120'			MOV	TRPASV,R5	; DO COMMON CRASH PROCEDURE
   1695	011154	000175 	011160'			JMP	@CRSTB(R5)	; CRASH
   1696						.DSABL	LSB
   1697					;
   1698	011160				CRSTB:
   1699	011160	011170'				.WORD	TRP4
   1700	011162	011240'				.WORD	RESERV
   1701	011164	011246'				.WORD	BPTTRP
   1702	011166	011304'				.WORD	IOTTRP
   1703					;
   1704	011170				TRP4:
   1705	011170	012705 	000004 			MOV	#4,R5		; POINT TO TRAP VECTOR
   1706	011174	011546 				MOV	(R5),-(SP)	; SAVE IT
   1707	011176	012715 	011216'			MOV	#10$,(R5)	; SET UP TEMPORARY VECTOR
   1708	011202	005777 	170150 			TST	@.PRSTA		; WAS IT THE DTE20??
   1709	011206	012615 				MOV	(SP)+,(R5)	; NO -- OTHER BUS TIMEOUT
   1710	011210					.CRASH	T04
	011210	000004 				IOT
	011212	   124 	   060 	   064 		.ASCIZ	/T04/
	011215	   000
   1711						;
   1712	011216				10$:				; HERE ON DTE-20 BUS TIMEOUT
   1713	011216	022626 				CMP	(SP)+,(SP)+	; GET RID OF SECOND TRAP PS, PC
   1714	011220	012615 				MOV	(SP)+,(R5)	; RESTORE TRAP VECTOR
   1715	011222	032737 	004000 	001012'		BIT	#EF.PFR,.COMEF+2 ; POWERFAIL IN PROGRESS??
   1716	011230	001344 				BNE	TRPXIT		; YES -- IGNORE TRAP
   1717	011232					.CRASH	DTD		; NO -- DTE20 IS DEAD
	011232	000004 				IOT
	011234	   104 	   124 	   104 		.ASCIZ	/DTD/
	011237	   000
   1718						;
   1719	011240				RESERV:
   1720	011240					.CRASH	RES
	011240	000004 				IOT
	011242	   122 	   105 	   123 		.ASCIZ	/RES/
	011245	   000
   1721						;
   1722	011246				BPTTRP:
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 40-2
LOW CORE -- TRAP SERVICE FOR COMMON PROGRAM TRAPS

   1723	011246					.CRASH	TBT
	011246	000004 				IOT
	011250	   124 	   102 	   124 		.ASCIZ	/TBT/
	011253	   000
   1724						;
   1725	011254				.PARER:
   1726	011254	012700 	172100 			MOV	#.PARRG,R0	; SET UP POINTER TO REGISTERS
   1727	011260	012737 	011276'	000004 		MOV	#20$,@#4	; SET UP TO POINT TO CRASH MESSAGE ON NXM
   1728	011266	012701 	001022'			MOV	#PARSAV,R1	; SET UP SAVE AREA POINTER
   1729	011272				10$:
   1730	011272	012021 				MOV	(R0)+,(R1)+
   1731	011274	000776 				BR	10$
   1732						;
   1733	011276				20$:
   1734	011276					.CRASH	MPE		; MEMORY PARITY ERROR
	011276	000004 				IOT
	011300	   115 	   120 	   105 		.ASCIZ	/MPE/
	011303	   000
   1735						;
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 41
LOW CORE -- CRASH ROUTINE

   1737						.SBTTL	LOW CORE -- CRASH ROUTINE
   1738					;
   1739					;	CRASH -- SUBROUTINE THAT WILL NOT RETURN TO SAVE THE
   1740					;	INFORMATION NECESSARY WHEN THE MACHINE ENTERS AN UNRECOVERABLE
   1741					;	STATE THAT REQUIRES RE-LOAD.  CRASH ATTEMPTS TO SAVE ALL THE
   1742					;	VOLATILE REGISTERS THAT MIGHT BE NECESSARY TO DEBUG
   1743					;	THE SOFTWARE OR HARDWARE WHEN THE PDP-11 SYSTEM CRASHES.
   1744					;
   1745	011304				IOTTRP:
   1746									; RESTORE R5 FOR TRACE
   1747	011304	016605 	000002 			MOV	2(SP),R5
   1748	011310	010637 	001020'			MOV	SP,SPSAV	; SAVE SP
   1749	011314	012706 	011000'			MOV	#EMGSTK,SP	; SET UP THE EMERGENCY STACK POINTER
   1750	011320					CALL	.IOSNP		; [TCO 4.2314] SNAPSHOT THE I/O PAGE
	011320	004737 	011530'			JSR	PC,.IOSNP
   1751	011324	010546 				MOV	R5,-(SP)
   1752	011326	012705 	011514'			MOV	#CMSG,R5	; SET UP THE CRASH MESSAGE POINTER
   1753	011332					CALL	20$		; PRINT THE MESSAGE
	011332	004737 	011446'			JSR	PC,20$
   1754	011336	011605 				MOV	(SP),R5		; CRASH CODE POINTER TO R5
   1755	011340	010446 				MOV	R4,-(SP)	; SAVE R4
   1756	011342	005004 				CLR	R4		; CLEAR R4
   1757	011344	012524 				MOV	(R5)+,(R4)+	; SAVE THE CRASH CODE
   1758	011346	011524 				MOV	(R5),(R4)+	;
   1759	011350	013705 	001022'			MOV	PARSAV,R5	; GET PARITY ERROR DATA
   1760	011354	006205 				ASR	R5		; POSITION IT
   1761	011356	006205 				ASR	R5		;
   1762	011360	006205 				ASR	R5		;
   1763	011362	006205 				ASR	R5		;
   1764	011364	006205 				ASR	R5		;
   1765	011366	150544 				BISB	R5,-(R4)	; SAVE IT IN HIGH BYTE
   1766	011370	012604 				MOV	(SP)+,R4	; RESTORE REGISTERS
   1767	011372	012605 				MOV	(SP)+,R5	; CRASH CODE POINTER TO R5
   1768	011374					CALL	20$		; PRINT THE CRASH CODE
	011374	004737 	011446'			JSR	PC,20$
   1769	011400				10$:
   1770	011400	012737 	000006 	000004 		MOV	#6,@#4		; FORCE AN EARLY HALT IF NXM
   1771	011406	005037 	000006 			CLR	@#6
   1772	011412	013705 	001360'			MOV	.PRDTE,R5	; FIND DTE20
   1773	011416	062705 	000006 			ADD	#6,R5		; POINT TO DEXWD1
   1774	011422	012725 	000004 			MOV	#LOAD11,(R5)+
   1775	011426	012725 	010000 			MOV	#DEP,(R5)+
   1776	011432	012725 	000022 			MOV	#22,(R5)+	; REQUEST RELOAD
   1777	011436	012777 	000400 	167712 		MOV	#TO10DB,@.PRSTA	; RING BELL
   1778	011444	000755 				BR	10$
   1779						;
   1780	011446				20$:				;
   1781	011446	105737 	001224'			TSTB	.KLNSW+0	; IS KLINIK ACTIVE??
   1782	011452	003402 				BLE	30$		; NOT THAT WE CARE...
   1783	011454	111537 	175616 			MOVB	(R5),@#PRB1	; YES -- PRINT A CHARACTER ON KLINIK LINE
   1784	011460				30$:				;
   1785	011460	112537 	177566 			MOVB	(R5)+,@#PRB0	; PRINT THE SAME CHARACTER ON THE CTY
   1786	011464				40$:				;
   1787	011464	105737 	177564 			TSTB	@#PRS0		; IS THE CTY DONE???
   1788	011470	100375 				BPL	40$		; NO -- WAIT SOME MORE
   1789	011472	105737 	001224'			TSTB	.KLNSW+0	; YES -- IS KLINIK ACTIVE??
   1790	011476	003403 				BLE	50$		; NO -- NOT THAT WE CARE...
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 41-1
LOW CORE -- CRASH ROUTINE

   1791	011500	105737 	175614 			TSTB	@#PRS1		; YES -- IS THE KLINIK LINE FINISHED??
   1792	011504	100367 				BPL	40$		; NO -- WAIT SOME MORE
   1793	011506				50$:				;
   1794	011506	105715 				TSTB	(R5)		; MESSAGE DONE??
   1795	011510	001356 				BNE	20$		; NO -- CONTINUE THE MESSAGE
   1796	011512				IGNO::
   1797	011512					RETURN			; YES -- RETURN TO CALLER
	011512	000207 				RTS	PC
   1798					;
   1799					;
   1800					;
   1801					;	AFTER THE SYSTEM HALTS THE PDP-10 WILL EVENTUALLY REALIZE
   1802					;	THAT THE PDP11 HAS CRASHED AND ATTEMPT TO
   1803					;	RELOAD IT.
   1804					;
   1805	011514				CMSG:
   1806	011514	   015 	   012 	   061 		.ASCIZ	<15><12>"11-HALT"<15><12>
	011517	   061 	   055 	   110
	011522	   101 	   114 	   124
	011525	   015 	   012 	   000
   1807						.EVEN
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 42
LOW CORE -- I/O PAGE SNAPSHOT

   1809						.SBTTL	LOW CORE -- I/O PAGE SNAPSHOT
   1810
   1811					;+
   1812					; .IOSNP -- SNAPHOT THE I/O PAGE INTO THE GEN PARTITION
   1813					;
   1814					; THIS SUBROUTINE IS INVOKED WHENEVER RSX-20F REQUESTS A RELOAD.
   1815					; THE CONTENT OF ALL REGISTERS IN THE I/O PAGE (160000 - 177776) ARE
   1816					; LOADED INTO THE GEN PARTITION (100000 - 107776).  NON-EXISTENT REGISTERS
   1817					; CONTAIN "123456" IN THE DUMP.
   1818					;
   1819					; INPUTS:
   1820					;
   1821					;	NONE.
   1822					;
   1823					; OUTPUTS:
   1824					;
   1825					;	THE I/O PAGE IS LOADED INTO 100000 THRU 107776.
   1826					;
   1827					; NOTE:
   1828					;
   1829					;	THIS ROUTINE MUST BE CALLED AT BR6, OR HIGHER.
   1830					;-
   1831
   1832		007777 				IOPSIZ = <177776-160000>/2
   1833
   1834	011530				.IOSNP:
   1835	011530	010046 				MOV	R0,-(SP)	;;; [TCO 4.2314] SAVE REGISTERS
   1836	011532	010146 				MOV	R1,-(SP)
   1837	011534	010246 				MOV	R2,-(SP)
   1838	011536	013746 	000004 			MOV	@#4,-(SP)	;;; [TCO 4.2314] SAVE TRAP-AT-4 VECTOR
   1839	011542	012737 	011604'	000004 		MOV	#30$,@#4	;;; [TCO 4.2314] SET ALTERNATE VECTOR
   1840	011550	012700 	160000 			MOV	#160000,R0	;;; [TCO 4.2314] BASE OF I/O PAGE
   1841	011554	012701 	100000 			MOV	#100000,R1	;;; [TCO 4.2314] BASE OF GEN PARTITION
   1842	011560	012702 	007777 			MOV	#IOPSIZ,R2	;;; [TCO 4.2314] I/O PAGE SIZE
   1843	011564				10$:
   1844	011564	012021 				MOV	(R0)+,(R1)+	;;; [TCO 4.2314] SAVE THE I/O PAGE
   1845	011566				20$:
   1846	011566	077202 				SOB	R2,10$		;;; [TCO 4.2314] LOOP TILL DONE
   1847	011570	012637 	000004 			MOV	(SP)+,@#4	;;; [TCO 4.2314] RESTORE VECTOR
   1848	011574	012602 				MOV	(SP)+,R2	;;; [TCO 4.2314] AND REGISTERS
   1849	011576	012601 				MOV	(SP)+,R1
   1850	011600	012600 				MOV	(SP)+,R0
   1851	011602					RETURN			;;; [TCO 4.2314] TO CALLER
	011602	000207 				RTS	PC
   1852	011604				30$:
   1853	011604	012721 	123456 			MOV	#123456,(R1)+	;;; [TCO 4.2314] MARK NON-EXISTENT REGISTER
   1854	011610	032626 				BIT	(SP)+,(SP)+	;;; [TCO 4.2314] RESET STACK
   1855	011612	000765 				BR	20$		;;; [TCO 4.2314] AND CONTINUE
   1856						;
LC -- LOW CORE FOR RSX20F	MACRO M1110  15-OCT-79 13:47  PAGE 43
LOW CORE -- PATCH SPACE

   1858						.SBTTL	LOW CORE -- PATCH SPACE
   1859
   1860					;+
   1861					;	THE FOLLOWING AREA CAN BE USED IN TWO WAYS:
   1862					;
   1863					; 1)	IF THE EXEC IS MODIFIED, THE ADDRESS OF "SCOMM" MIGHT CHANGE,
   1864					;	WHICH WOULD REQUIRE REBUILDING ALL THE PRIVLEDGED TASKS. THIS
   1865					;	AREA CAN BE USED TO ADJUST THE "SCOMM" ADDRESSES TO CORRESPOND TO
   1866					;	THEIR PREVIOUS ADDRESSES  SO THAT REBUILDING DOES NOT HAVE TO OCCUR.
   1867					;
   1868					; 2)	THIS AREA IS ALSO AVAILABLE FOR PATCH SPACE
   1869					;-
   1870
   1871	011614				.PAT..::				; PATCH SPACE
   1872										; THIS AREA MUST NEVER EXCEED 40 BYTES
   1873	011614					.BLKB	PATSIZ			;
   1874					.EVEN
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 44
LOW CORE -- PATCH SPACE

   1876						.TITLE	SCH	- TASK SCHEDULER & GLOBAL DEFS
   1877						.SBTTL	EXEC MODULE ONE -- TITLE PAGE
   1878	011654					IDENT$	10,10,RSX$$F
						.IDENT	/E10100/
   1879					;
   1880					;
   1881					;
   1882					;
   1883					;
   1884					;
   1885					;                             COPYRIGHT (C) 1975, 1978 BY
   1886					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   1887					;
   1888					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   1889					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   1890					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   1891					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   1892					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   1893					;
   1894					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   1895					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   1896					;       CORPORATION.
   1897					;
   1898					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   1899					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   1900					;
   1901					;
   1902					;
   1903					;
   1904					;
   1905					;		MODULE: EXEC MODULE ONE
   1906					;
   1907					;		VERSION: 10-10
   1908					;
   1909					;		AUTHOR:  R. MCLEAN
   1910					;
   1911					;		DATE: 19 MAR 75
   1912					;
   1913					;
   1914					;	THIS MODULE CONTAINS:
   1915					;
   1916					;	1 -- SYSTEM NOTES,
   1917					;	2 -- GLOSSARY,
   1918					;	3 -- SYMBOLIC DEFINITIONS,
   1919					;	4 -- NUL TASK.
   1920					;
   1921					; MODIFICATIONS:
   1922					;
   1923					;	NO.	DATE		PROGRAMMER	PURPOSE
   1924					;	---	----		----------	-------
   1925					;	001	18-OCT-76	A. PECKHAM	ADDITIONAL .KLIWD FLAGS
   1926					;	002	20-OCT-76	A. PECKHAM	FIX FOR F11 PARTITION
   1927					;						LOAD REQUEST FAILURE.
   1928					;	003	03-FEB-77	R. BELANGER	CHANGED KLR EVENT FLAG
   1929					;						ADDED KLD EVENT FLAG
   1930					;	004	04-MAR-77	R. BELANGER	ADDED CODE IN NULL TASK
   1931					;						TO INVOKE TIME OF DAY TASK
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 44-1
EXEC MODULE ONE -- TITLE PAGE

   1932					;	005	07-MAR-77	A. PECKHAM	REMOVE BUG FROM DOWN MESSAGE CODE.
   1933					;	006	01-JUL-77	R. BELANGER	ADD KLINIK EVENT LOGGING CODES.
   1934					;	007	18-AUG-77	R. BELANGER	ADD POWER RESTART IN PROGRESS FLAG
   1935					;	008	05-OCT-77	R. BELANGER	ADD COMM REGION INVALID FLAG
   1936					;	009	27-MAY-78	R. BELANGER	DEFINE PROTOCOL TIMEOUT FLAG FOR "TKTN"
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 45
EXEC MODULE ONE -- SYSTEM NOTES

   1938						.SBTTL	EXEC MODULE ONE -- SYSTEM NOTES
   1939					;+
   1940					; PROCESSOR PRIORITIES
   1941					;
   1942					; PERIPHERIAL DEVICE INTERRUPT SERVICE ROUTINES RUN AT PROCESSOR PRIORITY
   1943					; LEVELS FOUR THRU SEVEN (4-7).  ALSO, PARTS OF THE SOFTWARE THAT CANNOT BE
   1944					; INTERRUPTED ARE ALSO RUN AT PRIORITY SEVEN (PRI=7).  THESE UNINTERRUPTABLE
   1945					; PERIODS ARE AS SHORT AS POSSIBLE.
   1946					;
   1947					; PRIORITY LEVELS ZERO THRU THREE (0-3) ARE USED BY THE SYSTEM AS OPERATION
   1948					; INDICATORS.  I.E., THERE ARE NO "SOFTWARE INTERRUPTS", AND THEREFORE, THERE
   1949					; IS NO PRECEDENCE IMPLIED (OR ENVOKED) BY LEVELS ZERO THRU THREE.
   1950					;
   1951					; LEVEL ZERO (PRI=0) IS USED EXCLUSIVELY FOR TASK EXECUTION.
   1952					;
   1953					; LEVELS ONE, TWO, AND THREE ARE USED FOR "SYSTEM LEVEL" EXECUTION.
   1954					;
   1955					; LEVEL TWO (PRI=2) IS USED FOR THE RECOGNITION OF "SYSTEM EVENTS".
   1956					; THESE EVENTS ARE INDICATED IN THE "SYSTEM EVENT RECOGNITION" FLAG
   1957					; '.SERFG' AND ARE RECOGNIZED (SERVICED) ONLY WHEN RETURNING TO
   1958					; TASK EXECUTION (VIZ., FROM AN INTERRUPT, OR FROM A DIRECTIVE).
   1959					; SYSTEM EVENTS ARE (1) SIGNIFICANT EVENT DECLARATIONS, (2) CLOCK
   1960					; TICKS, AND (3) POWER FAILURE RECOVERIES.
   1961					;
   1962					; LEVEL THREE (PRI=3) IS USED FOR EXECUTION OF ROUTINES WHICH CANNOT BE
   1963					; INTERRUPTED BY SIGNIFICANT-EVENT OR CLOCK-TICK RECOGNITION, BUT CAN BE
   1964					; INTERRUPTED BY PERIPHERIAL DEVICE INTERRUPTS
   1965					;  IN THESE CASES, THE LEVEL
   1966					; MAY BE SET TO THREE BY ANY MEANS, BUT MUST BE LOWERED TO ZERO BY
   1967					; TRANSFERRING CONTROL TO '..INTX' TO ALLOW RECOGNITION OF "SYSTEM
   1968					; EVENTS THAT MIGHT HAVE OCCURED WHILE RUNNING AT PRI=3.
   1969					; THE SYSTEM TRACE (DEBUGGING) ROUTINE  RUNS AT PRI=7.
   1970					;
   1971					;
   1972					;
   1973					; FORMAT OF PROCESSOR STATUS (PS) WORD
   1974					;
   1975					;	C CPP RXX XLL LTN ZVC
   1976					;
   1977					;	CC	CURRENT MODE (00:KERNEL, 11:USER)
   1978					;	PP	PREVIOUS MODE (00:KERNEL, 11:USER)
   1979					;	R	REGISTER CLEAR (BIT ALWAYS CLEAR)
   1980					;	XXX	UNUSED BITS
   1981					;	LLL	PROCESSOR PRIORITY LEVEL
   1982					;	T	TRACE BIT
   1983					;	N	CONDITION CODE -- NEGATIVE
   1984					;	Z	CONDITION CODE -- ZERO
   1985					;	V	CONDITION CODE -- OVERFLOW
   1986					;	C	CONDITION CODE -- CARRY
   1987					;
   1988					; KEY TEXT IN THIS LISTING IS DELIMITED BY LINES CONATINING A ";+" AND A ";-"
   1989					; AS THE FIRST TWO CHARACTERS OF A SOURCE LINE.  A ";+" LINE  DEFINES THE
   1990					; BEGINNING OF A BLOCK OF KEY TEXT, AND A ";-" LINE DEFINES THE END.
   1991					;-
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 46
EXEC MODULE ONE -- GLOSSARY

   1993						.SBTTL	EXEC MODULE ONE -- GLOSSARY
   1994					;+
   1995					;
   1996					;
   1997					; ATL -- ACTIVE TASK LIST
   1998					;
   1999					; CKL -- CLOCK LIST
   2000					;
   2001					; DTL -- DTE20 LIST
   2002					;
   2003					; MRL -- MEMORY REQUEST LIST
   2004					;
   2005					; PUD -- PHYSICAL UNIT DEVICE TABLE
   2006					;
   2007					; DEQUE -- DOUBLE ENDED QUEUE.  FORWARD AND BACKWARD CIRCULAR LINKAGES.
   2008					;
   2009					; EXTERNAL PAGE -- 4K PAGE OF REAL MEMORY SPACE (760000-777776) CONTAINING
   2010					; CPU & PERIPHERIAL DEVICE CONTROL & STATUS REGISTERS (THE DEVICE PAGE).
   2011					;
   2012					; ISR -- INTERRUPT SERVICE ROUTINE
   2013					;
   2014					;
   2015					; STD -- SYSTEM TASK DIRECTORY
   2016					;-
   2017
   2018						.SBTTL	MACRO CALLS (MCALL)
   2019
   2023						.MCALL	.ENB0,.INH0,.ENB6,.INH6,.INH,.ENB,.INH5,.ENB5,.CRASH,RQST$
   2024						.MCALL	DIR$,CLEF$S,QIOW$,WTSE$,WTSE$S,.STKM,$DEF
   2025						.MCALL	CALL,RETURN,DTON$S,MFPS,MTPS,MTPI,MFPI,.DQPEN,DECL$S,CMKT$S
   2026						.MCALL	MRKT$,WTLO$,WSIG$S,WTLO$C,CLEF$C,QIOSY$,MRKT$S
   2027	011654					QIOSY$
   2028	011654					$DEF
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 47
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2030						.SBTTL	EXEC MODULE ONE -- SYMBOLIC DEFINITIONS
   2031					;
   2032					; EXTERNAL PAGE DEFINITIONS
   2033					;
   2034		177776 			PS==177776	;PROCESSOR STATUS WORD
   2035		177546 			LKS==177546	;KW11L CLOCK
   2036		177560 			KBS0==177560	;CTY TTY
   2037		177562 			KBB0==177562	;CTY BUFFER (INPUT)
   2038		177564 			PRS0==177564	;CTY OUTPUT STATUS
   2039		177566 			PRB0==177566	;CTY OUTPUT BUFFER
   2040		175610 			KBS1==175610
   2041		175612 			KBB1==175612
   2042		175614 			PRS1==175614
   2043		175616 			PRB1==175616
   2044		173000 			.BM873==173000	;START OF BOOTSTRAP
   2045		172100 			.PARRG==172100	;PARITY ERROR REGISTER 0
   2046					;
   2047		000340 			PR7==340	;PRIORITY 7
   2048		000340 			PRI7==340
   2049		000100 			.INTEN==000100	;INTERRUPT ENABLE BIT
   2050					;
   2051		172360 			KPAR0=172360	;KERNEL PAGE ADDRESS REG 0
   2052		172362 			KPAR1=172362	;REG 1
   2053		172364 			KPAR2=172364	;REG 2
   2054		172366 			KPAR3=172366	;REG 3
   2055		172370 			KPAR4=172370	;REG 4
   2056		172372 			KPAR5=172372	;REG 5
   2057		172374 			KPAR6=172374	;REG 6
   2058		172376 			KPAR7=172376	;REG 7
   2059					;
   2060		172300 			KPDR0=172300	;KERNEL PAGE DESCRIPTOR REGISTER 0
   2061		172302 			KPDR1=172302	;REG 1
   2062		172304 			KPDR2=172304	;REG 2
   2063		172306 			KPDR3=172306	;REG 6
   2064		172310 			KPDR4=172310	;REG 4
   2065		172312 			KPDR5=172312	;REG 5
   2066		172314 			KPDR6=172314	;REG 6
   2067		172316 			KPDR7=172316	;REG 7
   2068					;
   2069		177640 			UPAR0=177640	;USER PAGE ADDRESS REG 0
   2070		177642 			UPAR1=177642	;REG 1
   2071		177644 			UPAR2=177644	;REG 2
   2072		177646 			UPAR3=177646	;REG 3
   2073		177650 			UPAR4=177650	;REG 4
   2074		177652 			UPAR5=177652	;RRG 5
   2075		177654 			UPAR6=177654	;REG 6
   2076		177656 			UPAR7=177656	;REG 7
   2077					;
   2078		177600 			UPDR0=177600	;USER PAGE DESCRIPTOR REG 0
   2079		177602 			UPDR1=177602	;REG 1
   2080		177604 			UPDR2=177604	;REG 2
   2081		177606 			UPDR3=177606	;REG 3
   2082		177610 			UPDR4=177610	;REG 4
   2083		177612 			UPDR5=177612	;REG 5
   2084		177614 			UPDR6=177614	;REG 6
   2085		177616 			UPDR7=177616	;REG 7
   2086					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 47-1
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2087		000046 			$DSW==46	;DIRECTIVE STATUS WORD
   2088		000050 			.FSRPT==50	;FCS POINTER
   2089		000054 			N.OVPT==54	;FCP OVERLAY POINTER
   2090					;
   2091					;
   2092					; SYSTEM TRACE (T-BIT) DEBUGGING AID CONDITIONAL DEFINITIONS
   2093					;
   2094		000020 			TBIT==20	;TRACE BIT IN PS
   2095					;
   2096		000000 			STXAS==0	;SIGNIFICANT EVENT RECOGNITION (ATL SCAN) TRACE SWITCH
   2097		000000 			STXCS==0	;CLOCK TICK RECOGNITION TRACE SWITCH
   2098		000000 			STXDX==0	;DIRECTIVE EXECUTION TRACE SWITCH
   2099					;
   2100					; PRIVLEDGED TASK EVENT FLAG BIT MASKS
   2101					;
   2102		000001 			EF.DTE==1	;EVENT FLAG FOR DTE20 DOORBELL (UNUSED)
   2103		000001 			E.DTE==1.
   2104		000002 			EF.CLK==2	;EVENT FLAG FOR CLOCK (UNUSED)
   2105		000002 			E.CLK==2.
   2106		000004 			EF.TTY==4	;EVENT FLAG FOR TTY INPUT COMPLETE (UNUSED)
   2107		000003 			E.TTY==3.
   2108		000010 			EF.NIR==10	;EVENT FLAG TO SIGNAL QIO REQUEST ENTERED (DRIVERS)
   2109		000004 			E.NIR==4.
   2110		000020 			EF.IOD==20	;EVENT FLAG TO SIGNAL QIO REQUEST DONE (DRIVERS)
   2111		000005 			E.IOD==5.
   2112		000040 			EF.BOV==40	;EVENT FLAG TO SIGNAL NOT ENOUGH NODE SPACE (UNUSED)
   2113		000006 			E.BOV==6.
   2114		000100 			EF.TMO==100	;EVENT FLAG TO SIGNAL TIMOUT REQUEST FOR TTY (TTYDRR & SCOMM)
   2115		000007 			E.TMO==7.
   2116		000200 			EF.RQM==200	;REQUEST MCR (TTYDRR)
   2117		000010 			E.RQM==8.
   2118		000400 			EF.WFM==400	;WAIT FOR MARK TIME (UNUSED)
   2119		000011 			E.WFM==9.
   2120		001000 			EF.RKR==1000	; +++003 REQUEST KLINIK RING SERVICE (TTYDRR)
   2121		000012 			E.RKR==10.	; +++003
   2122		002000 			EF.RKH==2000	; +++003 REQUEST KLINIK HANG-UP SERVICE (TTYDRR)
   2123		000013 			E.RKH==11.	; +++003
   2124		004000 			EF.RSS==4000	; +++009 REQUEST SETSPD FOR AUTOBAUD (TTYDRR)
   2125		000014 			E.RSS==12.	; +++009
   2126					;
   2127					; RESERVED LOCAL EVENT FLAG BIT MASKS (25. - 32.)
   2128					;
   2129		100000 			EF.SND==100000	;SEND ALL FINISHED
   2130		000040 			E.FSND==32.
   2131					;
   2132					; RESERVED GLOBAL EVENT FLAG BIT MASKS (57. - 64.)
   2133					;
   2134		100000 			EF.CTC==100000	;^C FLAG
   2135		000100 			E.FCTC==64.
   2136		040000 			EF.PR1==040000	;PRIMARY PROTOCOL RUNNING FLAG
   2137		000077 			E.FPR1==63.
   2138		020000 			EF.PR2==020000	;SECONDARY PROTOCOL RUNNING FLAG
   2139		000076 			E.FPR2==62.
   2140		010000 			EF.RKP==010000	; +++003 KLINIK PARAMETERS RECIEVED (QPRDTE, SAVE)
   2141		000075 			E.FRKP==61.
   2142		004000 			EF.PFR==004000	; +++007 POWER FAIL RESTART IN PROGRESS (SCOMM, KLINIT)
   2143		000074 			E.FPFR==60.
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 47-2
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2144		002000 			EF.CRI==002000	; +++008 COMM REGION IS INVALID (BOOT, TKTN)
   2145		000073 			E.FCRI==59.
   2146					;
   2147					; COMMON NODE DEFINITONS
   2148					;
   2149		000000 			N.FP==0		;FORWARD POINTER
   2150		000002 			N.BP==2		;BACKWARD POINTER
   2151		000010 			N.PR==10	;PRIORITY BYTE
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 48
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2153					; TPD -- TASK PARTITION DIRECTORY
   2154					;
   2155					; THE "TPD" IS A FIXED LIST OF ENTRIES DESCRIBING EACH PARTITION IN A
   2156					; SYSTEM.
   2157					;  CONSISTING OF ENTRIES OF THE FOLLOWING FORMAT:
   2158					;
   2159		000000 			T.PN==00 ; WD. 00 (B 00) -- PARTITION NAME (FIRST HALF)
   2160						 ; WD. 01 (B 02) -- PARTITION NAME (SECOND HALF)
   2161		000004 			T.BA==04 ; WD. 02 (B 04) -- BASE ADDRESS OF PARTITION (IN BYTES)
   2162		000006 			T.PZ==06 ; WD. 03 (B 06) -- SIZE OF PARTITION (IN BYTES)
   2163		000010 			T.FW==10 ; WD. 04 (B 10) -- PARTITION FLAGS WORD
   2164		000012 			T.HP==12 ; WD. 05 (B 12) -- 1/64 TH OF BASE ADR OF FIRST HOLE, OR ZERO IF NO HOLES.
   2165		000014 			T.RF==14 ; WD. 06 (B 14) -- MRL LISTHEAD (FORWARD LINKAGE)
   2166		000016 			T.RB==16 ; WD. 07 (B 16) -- MRL LISTHEAD (BACKWARD LINKAGE)
   2167					;
   2168		000020 			T.SZ==20		;SIZE (IN BYTES) OF TPD ENTRIES
   2169					;
   2170					;
   2171					;	FLAGS WORD BIT DEFINITIONS:
   2172					;
   2173		000002 			TF.OU==000002	;[01] SET IF OCCUPIED USER CONTROLLED PARTITION.
   2174					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 49
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2176					;
   2177					;	TASK HEADER DEFINITIONS
   2178					;
   2179		000000 			H.CSP==0		;CURRENT STACK POINTER (UNUSED)
   2180		000002 			H.HSZ==2		;LENGTH OF HEADER
   2181		000046 			H.DSW==46		;DIRECTIVE STATUS WORD SAVE AREA
   2182		000050 			H.FCP==50		;FCP SAVE AREA
   2183		000052 			H.FOR==52		;FORTRAN SAVE AREA
   2184		000054 			H.OVL==54		;OVERLAY SAVE AREA
   2185		000074 			H.IPS==74		;INITIAL PS
   2186		000076 			H.IPC==76		;INITIAL PC
   2187		000100 			H.ISP==100		;INITIAL SP
   2188		000106 			H.TKVA==106		;TASK SST VECTOR ADDRESS
   2189		000130 			H.LUT==130		;LOGICAL UNIT TABLE SIZE
   2190					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 50
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2192					;
   2193					; STD -- SYSTEM TASK DIRECTORY
   2194					;
   2195					; THE SYSTEM TASK DIRECTORY IS A MEMORY RESIDENT DIRECTORY OF ALL TASKS
   2196					; THAT HAVE BEEN INSTALLED INTO A SYSTEM THAT ARE NOT PREMANENTLY RESIDENT.
   2197					;  THIS DIRECTORY CONSISTS OF TWO
   2198					; PARTS: (1) A FIXED SIZE AREA OF ONE WORD FOR EACH TASK THAT COULD
   2199					; BE INSTALLED AT ANY TIME, AND (2) AN STD ENTRY FOR EACH TASK THAT IS
   2200					; INSTALLED.  THE FIXED SIZED AREA IS CALLED THE "ALPHA TABLE AREA", AND
   2201					; PROVIDES SPACE FOR AN ALPHABETICALLY ORDERED CONTIGUOUS LIST POINTERS
   2202					; TO STD ENTRIES (TO FACILLATE BINARY SEARCH FOR STD ENTRY BY TASK NAME).
   2203					; EACH STD ENTRY IS OF THE FOLLOWING FORMAT:
   2204					;
   2205		000000 			S.TN==00 ; WD. 00 (B 00) -- TASK NAME (6 CHAR IN RADIX-50, 2 WORDS)
   2206						 ; WD. 01 (B 02) -- (SECOND HALF OF TASK NAME)
   2207		000004 			S.TD==04 ; WD. 02 (B 04) -- DEFAULT TASK PARTITION (TPD ADDRESS)
   2208		000006 			S.FW==06 ; WD. 03 (B 06) -- FLAGS WORD
   2209		000010 			S.DP==10 ; WD. 04 (B 10) -- DEFAULT PRIORITY (BYTE)
   2210		000011 			S.DI==11 ;        (B 11) -- SYSTEM DISK INDICATOR (BYTE)
   2211		000012 			S.BA==12 ; WD. 05 (B 12) -- 1/64 TH OF BASE ADDRESS OF LOAD IMAGE
   2212		000014 			S.LZ==14 ; WD. 06 (B 14) -- SIZE OF LOAD IMAGE
   2213		000016 			S.TZ==16 ; WD. 07 (B 16) -- MAX TASK SIZE
   2214		000020 			S.PC==20 ; WD. 10 (B 20) -- INITIAL PC OF TASK
   2215		000022 			S.SP==22 ; WD. 11 (B 22) -- INITIAL SP OF TASK
   2216		000024 			S.RF==24 ; WD. 12 (B 24) -- SEND AND REQUEST QUEUE FORWARD PTR
   2217		000026 			S.RB==26 ; WD. 13 (B 26) -- SEND AND REQUEST QUEUE BACKWARD PTR
   2218		000030 			S.SS==30 ; WD. 14 (B 30) -- SST VECTOR TABLE ADDRESS
   2219		000032 			S.DL==32 ; WD. 15 (B 32) -- LOAD IMAGE FIRST BLOCK NUMBER (32-BITS)
   2220						 ; WD. 16 (B 34)    (SECOND HALF OF DISK ADDRESS)
   2221					;
   2222		000036 			S.SZ==36		;SIZE OF STD ENTRY
   2223					;
   2224					;
   2225					;
   2226					;	FLAGS WORD BIT DEFINITIONS:
   2227					;
   2228		000001 			SF.TA==000001	;[00] SET WHEN TASK IS ACTIVE
   2229		000001 			SF.PT==000001	;[00] SET WHEN TASK IS PRIVILEDGED (ACTIVE FOR NOW)
   2230		000002 			SF.FX==000002	;[01] SET WHEN TASK IS FIXED IN MEMORY
   2231		000004 			SF.EX==000004	;[02] SET WHEN TASK IS TO BE REMOVED ON EXIT
   2232		040000 			SF.IR==040000	;[14] SET WHEN INSTALL IS REQUESTED
   2233		100000 			SF.ST==100000	;[15] SET WHEN TASK IS SYSTEM TASK
   2234					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 51
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2236					;
   2237					; ATL -- ACTIVE TASK LIST
   2238					;
   2239					; THE "ATL" IS A PRIORITY ORDERED DEQUE OF "ATL" NODES FOR ACTIVE TASKS
   2240					; THAT HAVE MEMORY ALLOCATED FOR THEIR EXECUTION.  THE TASKS REPRESENTED
   2241					; BY ENTRIES IN THE ATL ARE EITHER MEMORY RESIDENT, OR A REQUEST FOR THEIR
   2242					; LOADING HAS BEEN QUEUED.  THE LISTHEAD FOR THIS DEQUE IS IN THE SYSTEM
   2243					; COMMUNICATIONS AREA (SCOM), AND THE NODES ARE OF THE FOLLOWING FORMAT:
   2244					;
   2245						 ; WD. 00 (B 00) -- FORWARD LINKAGE
   2246						 ; WD. 01 (B 02) -- BACKWARD LINKAGE
   2247		000004 			A.SP==04 ; WD. 02 (B 04) -- STACK POINTER (R6) OF RUNNING TASK
   2248						 ;			WHEN TASK IS NOT CURRENT TASK
   2249		000006 			A.PD==06 ; WD. 03 (B 06) -- TASK'S RUN PARTITION (TPD ADDRESS)
   2250		000010 			A.RP==10 ; WD. 04 (B 10) -- TASK'S RUN PRIORITY (BYTE)
   2251		000012 			A.HA==12 ; WD. 05 (B 12) -- 1/64TH REAL ADR OF LOAD IMAGE
   2252		000014 			A.TS==14 ; WD. 06 (B 14) -- TASK STATUS (BYTE)
   2253		000015 			A.FB==15 ; WD. 06 (B 15) -- TASK FLAGS BYTE
   2254		000016 			A.TD==16 ; WD. 07 (B 16) -- SYSTEM TASK DIRECTORY (STD) ENTRY ADDRESS
   2255		000020 			A.EF==20 ; WD. 10 (B 20) -- TASK'S EVENT FLAGS (1-32)
   2256						 ; WD. 11 (B 22) -- (SECOND HALF OF TASK'S EVENT FLAGS)
   2257		000024 			A.FM==24 ; WD. 12 (B 24) -- TASK'S EVENT FLAGS MASKS (64-BITS)
   2258						 ; WD. 13 (B 26) -- (SECOND WORD OF FLAGS MASK)
   2259						 ; WD. 14 (B 30) -- (THIRD WORD OF FLAGS MASK)
   2260						 ; WD. 15 (B 32) -- (FOURTH WORD OF FLAGS MASK)
   2261		000034 			A.PF==34 ; WD. 16 (B 34) -- POWER FAIL AST TRAP ADDRESS
   2262					;
   2263		000036 			A.SZ==36		;SIZE OF ATL
   2264					;
   2265					; TASK STATUS VALUES ARE DESCRIBED AT 'ASXDT'
   2266					;
   2267					; BEFORE EXECUTION , THE FIRST THREE
   2268					; FLAGS MASK WORDS ARE USED AS FOLLOWS:
   2269					;
   2270					;	A.FM+0 -- ADDRESS OF TASK LOAD I/O REQUEST DEQUE LISTHEAD,
   2271					;	A.FM+2 -- ADDRESS OF TASK LOAD I/O REQUEST NODE,
   2272					;
   2273					; MRL -- MEMORY REQUIRED LIST
   2274					;
   2275					; THE "MRL" IS A PRIORITY ORDERED DEQUE OF "ATL" NODES FOR ACTIVE TASKS
   2276					; THAT REQUIRE MEMORY IN A PARTITION.  EACH PARTITION HAS ITS OWN MRL.
   2277					; WHENEVER A NON-FIXED TASK RUNNING IN A PARTITION EXITS, AN
   2278					; ATTEMPT IS MADE TO ASSIGN MEMORY TO THE FIRST (HIGHEST PRIORITY)
   2279					; TASK IN THE LIST.  IF MEMORY IS FOUND, THE TASK'S NODE IS
   2280					; MOVED FROM THE "MRL" TO THE "ATL" DEQUE.  THE MRL LISTHEAD IS IN
   2281					; THE TPD ENTRY FOR THE CORRESPONDING PARTITION.
   2282					;
   2283					;
   2284					;	FLAGS BYTE BIT DEFINITIONS
   2285					;
   2286		000200 			AF.PP==200	;[07] SET WHEN TASK IS PRIMARY PROTOCOL TASK
   2287					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 52
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2289					;
   2290					; CKL -- CLOCK TABLE
   2291					;
   2292					; THE CLOCK LIST IS A TABLE CONSISTING OF ONE ENTRY FOR EACH OPERATION
   2293					; SCHEDULED TO BE PERFORMED AT SOME FUTURE TIME.  A "SCHEDULE DELTA-
   2294					; TIME" EACH ENTRY (IF ANY) OF THE CLOCK QUEUE IS DECREMENTED
   2295					; AT EACH CLOCK TICK UNTIL THE ENTRY "COMES DUE", AT WHICH TIME THE
   2296					; INDICATED OPERATION IS PERFORMED.  CLOCK TABLE ENTRIES ARE OF
   2297					; FOLLOWING FORMAT.
   2298					;
   2299		000000 			C.AT==00 ; WD. 00 -- ATL NODE ADDRESS OF REQUESTOR
   2300		000002 			C.AS==02 ; WD. 02 -- AST TRAP ADDRESS OF REQUESTOR
   2301		000004 			C.SD==04 ; WD. 02 -- SCHEDULE DELTA IN TICKS (16-BITS)
   2302		000006 			C.RS==06 ; WD. 03 -- RESCHEDULE DELTA IN TICKS (16-BITS)
   2303		000010 			C.FM==10 ; WD. 04 -- FLAG MASK (BIS SRC)
   2304		000012 			C.FA==12 ; WD. 05 -- FLAGS WORD ADR (BIS DST ADR)
   2305					;
   2306		000014 			C.SZ==14 ; SIZE OF CLOCK TABLE ENTRY
   2307					;
   2308					;
   2309		000074 			.CYLTM==60.	;CYCLE TIME OF CLOCK
   2310					;
   2311		000005 			.KALSC==5	;TIMEOUT INTERVAL FOR KL10
   2312					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 53
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2314					;
   2315					; DTE -- DTE TABLE
   2316					;
   2317					; THE DTE LIST IS A TABLE CONSISTING OF ONE ENTRY FOR EACH OPERATION
   2318					; SCHEDULED TO BE PERFORMED AT SOME FUTURE TIME WHEN THE DTE20
   2319					; INTERRUPTS.  THE DTE20 TABLE ENTRIES ARE OF THE FOLLOWING
   2320					; FORMAT.
   2321					;
   2322		000000 			D.AT==00 ; WD. 00 -- ATL NODE ADDRESS OF REQUESTOR
   2323		000002 			D.FM==02 ; WD. 01 -- FLAG MASK (BIS SRC)
   2324		000004 			D.FA==04 ; WD. 02 -- FLAGS WORD ADR (BIS DIST ADR)
   2325					;
   2326		000006 			D.SZ==06 ; SIZE OF DTE20 TABLE ENTRY
   2327					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 54
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2329					;
   2330					;	KLI PARAMETER WORD DEFINITIONS (.KLIWD)
   2331					;
   2332		000001 			KL.LRM==1		;LOAD RAMS
   2333		000002 			KL.CFM==2		;CONFIGURE MEMORY
   2334		000004 			KL.LVB==4		;LOAD VBOOT
   2335		000010 			KL.VBN==10		;VBOOT START AT START+1
   2336		000020 			KL.VBD==20		;DUMP MONITOR
   2337		000040 			KL.SPF==40		;START AT LOC 70 (AFTER POWER FAIL)
   2338		000100 			KL.LCA==100		; +001 LOAD CACHE
   2340		000200 			KL.SSC==200		; +001 START AT LOCATION 407 (AFTER SYSTEM CRASH)
   2342		000400 			KL.CFL==400		; +001  IF = 0, CONFIGURE FROM FILE
   2343		001000 			KL.KAC==1000		; [TCO 4.2107] KEEP-ALIVE-CEASED ERROR
   2344		002000 			KL.DEF==2000		; OPERAOR ACTUATED REBOOT
   2345					;
   2346					; ALL BITS 0 IMPLIES ASK QUESTIONS TO CONTROL LOADING
   2347					;
   2348					;
   2349					;	PARAMETER DEFINITIONS FOR KL ERROR WORD
   2350					;
   2351		000001 			KS.TSP==1		;TEN STOPPED (HALTED)
   2352		000002 			KS.CES==2		;CLOCK ERROR STOP
   2353		000004 			KS.EPE==4		;E BOX PARITY ERROR
   2354		000010 			KS.DEX==10		;DEPOSIT EXAMINE ERROR
   2355		000020 			KS.CST==20		;KEEP ALIVE STOPPED
   2356		000040 			KS.TRR==40		;TEN REQUEST'S RE-BOOT
   2357		000100 			KS.PFT==100		;POWER FAIL RESTART
   2358		000200 			KS.PTO==200		; +++012 PROTOCOL TIMEOUT
   2359					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 55
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2361					;
   2362					; PUD -- PHYSICAL UNIT DEVICE TABLE
   2363					;
   2364					; THE "PUD" IS A FIXED LIST OF ENTRIES DESCRIBING EACH PHYSICAL DEVICE-
   2365					; UNIT IN A SYSTEM.
   2366					;  CONSISTS OF ENTRIES OF THE FOLLOWING FORMAT:
   2367					;
   2368		000000 			U.DN==00 ; WD. 00 (B 00) -- DEVICE NAME (2 ASCII CHARS)
   2369		000002 			U.UN==02 ; WD. 01 (B 02) -- UNIT NUMBER (BYTE)
   2370		000003 			U.FB==03 ;        (B 03) -- FLAGS (BYTE)
   2371		000004 			U.C1==04 ; WD. 02 (B 04) -- CHARACTERISTICS WORD ONE (DEVICE INDEPENDENT INDICATORS)
   2372		000006 			U.C2==06 ; WD. 03 (B 06) -- CHARACTERISTICS WORD TWO (DEVICE DEPENDENT INDICATORS
   2373		000010 			U.C3==10 ; WD. 04 (B 10) -- CHARACTERISTICS WORD THREE (DEVICE DEPENDENT INDICATORS)
   2374		000012 			U.C4==12 ; WD. 05 (B 12) -- CHARACTERISTICS WORD FOUR (SIZE OF BLOCK, BUFFER, LINE)
   2375		000014 			U.AF==14 ; WD. 06 (B 14) -- ATTACH FLAG (ATL NODE ADDRESS OF ATTAC HING TASK
   2376		000016 			U.RP==16 ; WD. 07 (B 16) -- REDIRECT POINTER
   2377		000020 			U.HA==20 ; WD. 10 (B 20) -- HANDLER TASK ATL NODE ADDRESS
   2378		000022 			U.RF==22 ; WD. 11 (B 22) -- UNIT REQUEST DEQUE LISTHEAD (FWD PNTR)
   2379		000024 			U.RB==24 ; WD. 12 (B 24) -- UNIT REQUEST DEQUE LISTHEAD (BKG PNTR)
   2380					;
   2381					; PHYSICAL UITS ARE CONSIDERED "VOLUMES" BY THE FILES SYSTEM, AND THE
   2382					; REMAINDER OF THE PUD ENTRY IS A "VOLUME CONTROL BLOCK".
   2383					;
   2384		000026 			U.VA==26 ; WD. 13 (B 26) -- ADDRESS OF VOLUME CONTROL BLOCK EXTENSION
   2385		000030 			U.UI==30 ; WD. 14 (B 30) -- USER IDENTIFICATION CODE (UIC)
   2386		000030 			U.PC==30 ;        (B 30) -- UIC PROGRAMMER CODE
   2387		000031 			U.GC==31 ;        (B 31) -- UIC GROUP CODE
   2388		000032 			U.VP==32 ; WD. 15 (B 32) -- VOLUME PROTECTION WORD
   2389		000032 			U.CH==32 ;        (B 32) -- CHARACTERISTICS FLAGS
   2390						 ;        (B 33) -- RESERVED BYTE
   2391		000034 			U.AR==34 ; WD. 16 (B 34) -- ACCESS RIGHTS FLAGS WORD
   2392		000036 			U.DACP==36;WD. 20 (B 36) -- DEFAULT ACP NAME, RAD50 (FIRST WORD)
   2393		000040 			U.ACP==40 ; WD. 20 (B 40) -- STD ENTRY ADDRESS OF CURRENT ACP
   2394		000042 			U.TF==42 ; WD. 21 (B 42) -- TERMINAL FLAGS WORD
   2395		000042 			U.PR==42 ;        (B 42) -- TERMINAL PRIVILEDGE WORD
   2396		000043 			U.FO==43 ;        (B 43) -- TERMINAL FORMS BYTE
   2397		000044 			U.LBH==44 ; WD. 22 (B 44) -- HIGH ORDER - TOTAL # OF BLOCKS FOR DEVICE
   2398		000046 			U.LBN==46 ; WD. 24 (B46) -- LOW ORDER TOTAL # OF BLOCKS FOR DEVICE
   2399		000050 			U.SZ==50		;SIZE (IN BYTES OF PUD ENTRIES
   2400					;
   2401					;	FLAGS BYTE DEFINITIONS
   2402					;
   2403		000040 			UF.RD==040		; **************TEMP*********
   2404		000200 			UF.RH==200	; [7] SET WHEN HANDLER TASK IS DECLARED RESIDENT
   2405		000100 			UF.TL==100	; [6] SET WHEN HANDLER TASK RECOGNIZES LOAD AND RECORD
   2406		000040 			UF.OFL==040	; [5] SET WHEN DEVICE IS OFFLINE
   2407					;
   2408					;	BIT DEFINITIONS FOR CHARACTERISTICS WORD ONE
   2409					;
   2410		000001 			UC.REC==000001	;[00] SET IF RECORD ORIENTED DEVICE (VIZ., TT,LP, CR)
   2411		000002 			UC.CCL==000002	;[01] SET IF CARRIAGE CONTROL DEVICE (VIZ., TT LP)
   2412		000004 			UC.TTY==000004	;[02] SET IF TTY DEVICE (VIZ., KSR, LA30)
   2413		000010 			UC.DIR==000010	;[03] SET IF DEVICE IS A DIRECTORY DEVICE
   2414		000020 			UC.SDI==000020	;[04] SET  IF DEVICE IS A SINGLE DIRECTORY DEVICE
   2415		000040 			UC.SQD==000040	;[05] SET IF DEVICE IS A SEQUENTIAL DEVICE
   2416		000100 			UC.ETB==000100  ;[06] SET IF DEVICE IS EIGHTEEN BIT MODE
   2417		000400 			UC.INB==000400	;+003 [08] SET IF THE DEVICE IS INTERMEDIATE BUFFERED
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 55-1
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2418		001000 			UC.SWL==001000	;[09] SET IF THE DEVICE IS SOFTWARE WRITE LOCKED
   2419		002000 			UC.ISP==002000	;[10] SET IF DEVICE IS INPUT SPOOLED
   2420		004000 			UC.0SP==004000	;[11] SET IF DEVICE IS OUTPUT SPOOLED
   2421		010000 			UC.PSE==010000	;[12] SET IF DEVICE IS PSEUDO DEVICE
   2422		020000 			UC.COM==020000	;[13] SET IF DEVICE IS COMMUNICATIONS CHANNEL
   2423		040000 			UC.F11==040000	;[14] SET IF DEVICE IS FILES-11
   2424		100000 			UC.MNT==100000	;[15] SET IF DEVICE IS MOUNTABLE
   2425					;
   2426					;	BIT DEFINITIONS FOR CHARACTERISTICS WORD TWO
   2427					;
   2428		000200 			CH.OFF==200	;VOLUME IS OFF-LINE
   2429		000100 			CH.FOR==100	;VOLUME IS FOREIGN
   2430		000040 			CH.UNL==40	;DISMOUNT PENDING
   2431		000020 			CH.NAT==20	;ATTACH/DETACH NOT PERMITTED
   2432		000010 			CH.NDC==10	;DEVICE CONTROL FUNCTIONS NOT PERMITTED
   2433		000001 			CH.LAB==1	;VOLUME IS LABELED TAPE
   2434					;
   2435					;	BIT DEFINITIONS FOR TERMINAL PRIVILEDGE BYTE
   2436					;
   2437		000001 			UT.PR==1	;SET IF TY ID PRIVILEDGED
   2438		000002 			UT.SL==2	;SET IF TTY IS SLAVED
   2439		000004 			UT.LG==4	;SET IF TERMINAL IS LOGGED ON
   2440					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 56
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2442					;
   2443					; TASK TERMINATION NOTICE ERROR CODES FOR A.FM+0
   2444					;
   2445		000012 			TN.EMT==12		;NON-RSX EMT
   2446		000014 			TN.TRP==14		;TRAP INSTRUCTION
   2447		000040 			TN.LRF==40		;LOAD FAILURE
   2448					;
   2449					; SEND AND REQUEST QUEUE ENTRY
   2450					;
   2451		000004 			Q.SI==04 ; WD. 02 (B 04) -- SYSTEM TASK LIST ADDRESS
   2452		000006 			Q.D1==06 ; WD. 03 (B 06) -- FIRST DATA WORD
   2453					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 57
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2455					;
   2456					;	DEVICE QUEUE POINTER TABLE (TO 11 QUEUE ENTRIES)
   2457					;
   2458		000000 			Q.DA==0	; WD. 00 (B 00) -- ADDRESS OF DEVICE TABLE LIST
   2459		000002 			Q.TS==02 ; WD. 01 (B 02) -- SIZE OF AN ENTRY IN THE DEVICE TABLE LIST
   2460		000004 			Q.ST==04 ; WD. 02 (B 04) -- ADDRESS OF DEVICE START SUBROUTINE
   2461		000006 			Q.SP==06 ; WD. 03 (B 06) -- ADDRESS OF DEVICE STOP SUBROUTINE
   2462						; WD. 04 (B 10) -- SPARE
   2463		000012 			Q.AK==12 ; WD. 05 (B 12) -- ACKNOWLEDGE ROUTINE
   2464						 ; WD. 06 (B 14) -- SPARE
   2465		000016 			Q.DZ==16 ; WD. 07 (B 16) -- DEVICE COUNT
   2466		000020 			Q.SZ==20	; SIZE OF TABLE ENTRY
   2467					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 58
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2469					;
   2470					;	DEVICE ERROR LOGGING INFORMATION AND STATUS BLOCK DEFINITONS
   2471					;
   2472					;	WORD 0 -- STANDARD STATUS BITS (DV.XXX)
   2473					;
   2474					;	1	DEVICE-DEPENDENT BITS
   2475					;	2	...........
   2476					;	N
   2477					;
   2478					;	DEVICE ERROR LOGGING BITS (FIRST WORD BITS ONLY)
   2479					;
   2480		000001 			DV.NXD==1	;NON-EX DEVICE
   2481		000002 			DV.OFL==2	;OFF-LINE
   2482		000004 			DV.OIR==4	;HARDWARE ERROR. OPERATOR INTERVENTION REQ'D
   2483		000010 			DV.SCN==10	;SOFTWARE CONDITION. ACKNOWLEDGE REQUIRED
   2484		000020 			DV.IOP==20	;I/O IN PROGRESS
   2485		000040 			DV.EOF==40	;END-OF-FILE ENCOUNTERED
   2486		000100 			DV.LOG==100	;ERROR LOGGING REQUIRED
   2487		000200 			DV.URE==200	;UN-RECOVERABLE ERROR
   2488		000400 			DV.F11==400	;ERROR ON FROM -11 REQUEST
   2489		001000 			DV.HNG==1000	;DEVICE HUNG
   2490		002000 			DV.LIN==2000	;DEVICE LOST INTERRUPT ENABLE
   2491					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 59
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2493					;
   2494					; KLINIK EVENT LOGGING CODES
   2495					;
   2496
   2497		000000 			K.LUND==0		; UNDEFINED CODE
   2498
   2499		000001 			K.LSCK==1		; SET/CLEAR KLINIK COMMAND
   2500		000001 				K.LSKL==1	; SET KLINIK
   2501		177777 				K.LCKL==-1	; CLEAR KLINIK
   2502
   2503		000002 			K.LRNG==2		; KLINIK RING
   2504		000001 				K.LRAC==1	; ACCEPTED (WINDOW OPEN)
   2505		177777 				K.LRRJ==-1	; REJECTED (WINDOW CLOSED)
   2506
   2507		000003 			K.LDSC==3		; KLINIK LINE DISCONNECT
   2508		000001 				K.LDCM==1	; DIRECTED DISCONNECT (COMMAND)
   2509		177777 				K.LDRP==-1	; CARRIER DROP
   2510
   2511		000004 			K.LCON==4		; KLINIK LINE CONNECT
   2512		000001 				K.LROP==1	; REMOTE -- OPERATOR MODE
   2513		000002 				K.LRPR==2	; REMOTE -- PROGRAMMER MODE
   2514		000003 				K.LRMN==3	; REMOTE -- MAINTENANCE MODE
   2515		177777 				K.LUSR==-1	; USER MODE
   2516
   2517		000005 			K.LBPW==5		; BAD PASSWORD
   2518
   2519		000006 			K.LLTO==6		; LOGON TIMEOUT
   2520
   2521		000007 			K.LRBA==7		; KLINIK ACTIVE ON REBOOT
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 60
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2523					;
   2524					;	OFFSETS FOR SST TRAPS TABLE IN USER'S AREA
   2525					;
   2526		000000 			T.RAP4==0		;TRAP AT 4
   2527		000002 			T.RAPM==2		;MEMORY PROTECT VIOLATOION
   2528		000004 			T.RAPB==4		;T BIT OR BPT TRAP
   2529		000006 			T.RAPI==6		;IOT TRAP
   2530		000010 			T.RAPR==10		;RESERVED INSTRUCTION TRAP
   2531		000012 			T.RAPE==12		;EMT TRAP (NON RSX)
   2532		000014 			T.RAPT==14		;TRAP TRAP
   2533		000016 			T.RAPF==16		;FLOATING POINT TRAP
   2534					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 61
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2536					;
   2537					; IRQ -- I/O REQUEST QUEUE
   2538					;
   2539					; THE "IRQ" IS A PRIORITY ORDERED DEQUE OF I/O REQUEST NODES WITH ITS
   2540					; LISTHEAD IN THE PUD ENTRY OF THE PHYSICAL UNIT FOR WHICH THE I/O
   2541					; REQUEST WAS QUEUED.  EACH PHYSICAL UNIT HAS ITS OWN I/O REQUEST QUEUE.
   2542					; I/O REQUEST NODES ARE CREATED AND QUEUED PRIMARILY BY THE "QUEUE I/O"
   2543					; DIRECTIVE.  HOWEVER, THE EXEC ALSO CREATES I/O REQUESTS TO:
   2544					; (1) LOAD A TASK IMAGE,
   2545					; I/O REQUEST NODES ARE
   2546					; THE FOLLOWING FORMAT.
   2547					;
   2548						 ; WD. 00 (B 00) -- FORWARD LINKAGE
   2549						 ; WD. 01 (B 02) -- BACKWARD LINKAGE
   2550		000004 			R.TD==04 ; WD. 02 (B 04) -- STD NODE OF REQUESTOR
   2551		000006 			R.AT==06 ; WD. 03 (B 06) -- ATL NODE OF REQUESTOR ***
   2552		000010 			R.PR==10 ; WD. 04 (B 10) -- PRIORITY (BYTE)
   2553		000011 			R.DP==11 ;        (B 11) -- DPB SIZE (BYTE) ***
   2554		000012 			R.LU==12 ; WD. 05 (B 12) -- LOGICAL UNIT NUMBER (BYTE)
   2555		000013 			R.FN==13 ;        (B 13) -- EVENT FLAG NUMBER (BYTE)
   2556		000014 			R.FC==14 ; WD. 06 (B 14) -- I/O FUNCTION CODE
   2557		000016 			R.SB==16 ; WD. 07 (B 16) -- ADDRESS OF STATUS BLOCK
   2558		000020 			R.AS==20 ; WD. 10 (B 20) -- AST ADDRESS
   2559		000022 			R.UI==22 ; WD. 11 (B 22) -- UIC (UNUSED)
   2560		000024 			R.PB==24 ; WD. 12 (B 24) -- PARAMETER #1
   2561						 ; WD. 13 (B 26) -- PARAMETER #2
   2562						 ; WD. 14 (B 30) -- PARAMETER #3
   2563						 ; WD. 15 (B 32) -- PARAMETER #4
   2564						 ; WD. 16 (B 34) -- PARAMETER #5
   2565						 ; WD. 17 (B 36) -- PARAMETER #6
   2566					;
   2567					; THE LOW ORDER THREE-BITS OF THE I/O FUNCTION CODE ARE USED BY THE SYSTEM
   2568					; AS FOLLOWS:
   2569					;
   2570							;[0] -- RESERVED FOR FUTURE USE
   2571		000002 			RF.XR==000002	;RESERVED
   2572							;[2] -- RESERVED FOR FUTURE USE
   2573					;
   2574					; *** WHENEVER AN I/O REQUEST IS QUEUED BY THE "QUEUE I/O" DIRECTIVE, THE
   2575					; DPB SIZE AND THE REQUESTOR'S ATL NODE ADDRESS ARE RECORDED IN THE I/O
   2576					; REQUEST NODE.  WHENEVER AN I/O REQUEST IS QUEUED AS A RESULT OF ANOTHER
   2577					; DIRECTIVE (VIZ., "REQUEST" CAUSING A TASK IMAGE TO BE LOADED), THE DPB
   2578					; SIZE AND THE REQUESTOR'S ATL NODE ADDRESS ARE SET TO ZERO.  THUS, BOTH
   2579					; BOTH THE DPB SIZE AND THE ATL NODE ADDRESS ARE ALSO "EXEC REQUEST"
   2580					; INDICATORS.
   2581					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 62
EXEC MODULE ONE -- SYMBOLIC DEFINITIONS

   2583					;+
   2584					;  SIGNIFICANT EVENT FLAG DEFINITIONS
   2585					;
   2586					;
   2587					; THE HIGH-ORDER BYTE '.SERFG+1' IS INCREMENTED WHENEVER A CLOCK
   2588					; TICK OCCURS (WHENEVER THE CLOCK INTERRUPT SERVICE ROUTINE RUNS).
   2589					; HENCE, '.SERFG+1' IS A BYTE CONTAINING A COUNT OF UNRECOGNIZED
   2590					; CLOCK TICKS.
   2591					;
   2592					; THE BITS OF THE LOW-ORDER BYTE '.SERFG+0' ARE USED TO FLAG THE
   2593					; FOLLOWING EVENTS:
   2594					;
   2595		000001 			EV.SE==001 ; [0] SET WHENEVER A SIGNIFICANT EVENT IS TO BE
   2596						   ; RECOGNIZED,
   2597					;
   2598		000002 			EV.AS==002 ; [1] SET WHEN POWER FAIL IS REQUIRED
   2599		000200 			EV.PF==200 ; [7] SET WHEN POWER DOWN HAS OCCURRED AND MUST BE RECOGNIZED
   2600						   ;     ** MUST BE SIGN BIT **
   2601					;-
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 63
EXEC MODULE ONE -- NUL TASK

   2603						.SBTTL	EXEC MODULE ONE -- NUL TASK
   2604					;
   2605					; THE NUL TASK EXISTS TO ELIMINATE EXCEPTION TESTING WHEN SCANNING THE
   2606					; ACTIVE TASK LIST, AND WHEN PROCESSING DIRECTIVES THAT CAUSE AN
   2607					; ATL SCAN TO CONTINUE FROM THE NEXT TASK OF LOWER PRIORITY THAN THE
   2608					; DIRECTIVE ISSUING TASK.
   2609					;
   2610					; THE NUL TASK IS THE LOWEST PRIORITY TASK IN A SYSTEM.
   2611					;
   2612					; THE NUL TASK HAS AN ATL NODE WITH STATUS OF "RUNNING", BUT HAS NO STD
   2613					; ENTRY.
   2614					;
   2615					; THE NUL TASK DOES NOT RESIDE IN A PARTITION.
   2616					;
   2617					; THE NUL TASK EXECUTION CONSISTS OF "WAIT" INSTRUCTIONS (TO INCREASE
   2618					; UNIBUS THROUGHPUT).  HOWEVER, THE NUL TASK DOES HAVE CONTEXT, AND CAN
   2619					; EXECUTE PDP-11 INSTRUCTIONS
   2620					;
   2621					;
   2622	011654				NULHD::	.STKM	170017,0,0,0,0,0,0,NTKXEP,174000,NTKXSP
	011722	000000 	000000 	000000 		.WORD	0,0,0,0
	011730	000000
	011750	174000 	012160'	012134'		.WORD	174000,NTKXEP,NTKXSP
	012004	000005 				.WORD	5
	012006	007606'				.WORD	TTPEN
	012010	000000 				.WORD	0
	012012	000000 				.WORD	0
	012014	000000 				.WORD	0
	012016	000000 				.WORD	0
	012020	000000 				.WORD	0
	012022	000000 				.WORD	0
	012024	000000 				.WORD	0
	012026	000000 				.WORD	0
	012030	000000 				.WORD	0
	012032	000000 				.WORD	0
	012134	170017 				.WORD	170017
	012136	000000 				.WORD	0
	012140	000000 				.WORD	0
	012142	000000 				.WORD	0
	012144	000000 				.WORD	0
	012146	000000 				.WORD	0
	012150	012160'				.WORD	NTKXEP
	012152	174000 				.WORD	174000
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 64
EXEC MODULE ONE -- NUL TASK

   2624	012154				NTKXEN:	.ENB6			;ENABLE INTERRUPTS
	012154	012637 	177776 			MOV	(SP)+,@#PS
   2625	012160	000001 			NTKXEP:	WAIT
   2626	012162	000001 				WAIT
   2627	012164	005200 				INC	R0
   2628	012166	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;IF PRIMARY PROTOCOL IS DEAD
   2629	012174	001440 				BEQ	40$		;THEN SEND DOWN MESSAGE
   2630	012176	005737 	001162'			TST	.ACKAL		;IF ACKAL HAS NOT BEEN SENT
   2631	012202	001002 				BNE	20$		;THEN KL MAY STILL BE SHAKY
   2632	012204	105037 	012447'			CLRB	SNDMSG		;OTHERWISE RESET MSG FLAG
   2633	012210				20$:	.INH6			;INHIBIT INTERRUPTS
	012210	013746 	177776 			MOV	@#PS,-(SP)
	012214	112737 	000300 	177776 		MOVB	#300,@#PS
   2634	012222	005737 	001124'			TST	.TKTN		;;;CHECK FOR TASK TERMINATION REQUIRED
   2635	012226	001410 				BEQ	30$		;;; +++004 NO -- LOOK AT TIME OF DAY FLAG
   2636	012230	005037 	001124'			CLR	.TKTN		;;;CLEAR REQUEST FOR TASK TERMINTATION
   2638	012234					.ENB6			;;;ENABLE INTERRUPTS
	012234	012637 	177776 			MOV	(SP)+,@#PS
   2639	012240					DIR$	#.TKTN.		;REQUEST TASK TERMINATION
	012240	012746 	012354'			MOV	#.TKTN.,-(SP)
	012244	104375 				EMT	375
   2640	012246	000744 				BR	NTKXEP
   2641						;
   2645	012250				30$:				;;; +++004
   2646	012250					.ENB6			;;; +++004 ENABLE INTERRUPTS
	012250	012637 	177776 			MOV	(SP)+,@#PS
   2647	012254	005737 	001134'			TST	.CLKSW		; +++004 NEED TIME CHANGE?
   2648	012260	100337 				BPL	NTKXEP		; +++004 NO -- JUST GO ON
   2649	012262	005037 	001134'			CLR	.CLKSW		; +++004 YES -- RESET CLOCK SWITCH
   2650	012266					DIR$	#.TOD.		; +++004 REQUEST TIME OF DAY TASK
	012266	012746 	012336'			MOV	#.TOD.,-(SP)
	012272	104375 				EMT	375
   2651	012274	000731 				BR	NTKXEP		; +++004 AND CONTINUE IDLE LOOP
   2652						;
   2653
   2654	012276	105737 	001370'		40$:	TSTB	.PRPSE		; +++009 ARE WE JUST PAUSING??
   2655	012302	001342 				BNE	20$		; +++009 YES -- BACK TO MAIN LOOP
   2656	012304	105737 	012447'			TSTB	SNDMSG		;HAVE WE INFORMED THE TTYS ?
   2657	012310	001337 				BNE	20$		;YES -- DON'T RE-SEND
   2658	012312	012704 	012372'			MOV	#DWNMSG,R4	;SEND DOWN MESSAGE
   2659	012316					CALL	COPBUF		;COPY BUFFER TO FREE SPACE
	012316	004737 	027616'			JSR	PC,COPBUF
   2660	012322	010004 				MOV	R0,R4		;SET UP TO SEND IT
   2661	012324					CALL	.SNDAL		;SEND MESSAGE
	012324	004737 	027230'			JSR	PC,.SNDAL
   2662	012330	105237 	012447'			INCB	SNDMSG		;SYSTEM DOWN MESSAGE HAS BEEN SENT.
   2663	012334	000725 				BR	20$
   2664						;
   2665	012336				.TOD.:
   2666	012336					RQST$	MIDNIT		; +++004
	012336	   013 	   007 			.BYTE	11.,7
	012340	051254 	054374 			.RAD50	/MIDNIT/
	012344	000000 	000000 			.WORD	0,0
	012350	000000 				.WORD
	012352	   000 	   000 			.BYTE	,
   2667
   2669	012354				.TKTN.:	RQST$	TKTN
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 64-1
EXEC MODULE ONE -- NUL TASK

	012354	   013 	   007 			.BYTE	11.,7
	012356	077314 	053600 			.RAD50	/TKTN/
	012362	000000 	000000 			.WORD	0,0
	012366	000000 				.WORD
	012370	   000 	   000 			.BYTE	,
   2671
   2672	012372	000000 	000060 	012404'	DWNMSG:	.WORD	0,60,DWNMS,DWNMSZ,DWNMSZ*400
	012400	000043 	021400
   2673
   2677	012404	   015 	   012 	   007 	DWNMS:	.ASCII	<15><12><7><7><7>/%DECSYSTEM-10 NOT RUNNING/<15><12><7><7><7>
	012407	   007 	   007 	   045
	012412	   104 	   105 	   103
	012415	   123 	   131 	   123
	012420	   124 	   105 	   115
	012423	   055 	   061 	   060
	012426	   040 	   116 	   117
	012431	   124 	   040 	   122
	012434	   125 	   116 	   116
	012437	   111 	   116 	   107
	012442	   015 	   012 	   007
	012445	   007 	   007
   2679		000043 			DWNMSZ=.-DWNMS
   2680	012447	   001 			SNDMSG:	.BYTE	1		;  +++005 A SYSTEM DOWN MSG HAS BEEN SENT
   2681						.EVEN
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 65
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   2683						.SBTTL	EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS
   2684					;
   2685					;
   2686					;	EMT INSTRUCTIONS ARE ONLY EXECUTED BY NON-INTERRUPT SERVICE ROUTINES
   2687					;
   2688					;	DIRECTIVE DISPATCH -- CONTROL IS TRANSFERRED TO A DIRECTIVE SERVICE
   2689					;	ROUTINE PER DIRECTIVE IDENTIFICATION CODE (DIC)
   2690					;
   2691					;	REGISTER DEFINITIONS ON EXIT:
   2692					;	R0 -- PC OF EMT INSTRUCTION
   2693					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   2694					;	R2 -- DPB SIZE
   2695					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   2696					;	R5 -- CURRENT TASK POINTER
   2697					;
   2698		000020 			EM.DRO==20	;OFFSET TO DPB OR DPB POINTER ON STACK
   2699					;
   2700					;
   2701					;
   2702	012450	010546 			EMTTRP::MOV	R5,-(SP)	;SAVE R5 INCASE OF TRAP(SST)
   2703	012452	016605 	000002 			MOV	2(SP),R5	;=PC+2 OF EMT INSTRUCTION
   2704	012456	024527 				CMP	-(R5),(PC)+	;WAS IT A
   2705	012460	104375 				EMT	375		; DIRECTIVE ?
   2706	012462	001421 				BEQ	10$		;YES -- LEGAL DIRECTIVE REQUEST
   2707	012464	011637 	001116'			MOV	@SP,EMTSTK	;SAVE R5
   2708	012470	111516 				MOVB	@R5,@SP		;NO -- MUST SET IT UP FOR SST
   2709	012472	013705 	001006'			MOV	.CRTSK,R5	;FIND THE CURRENT TASK POINTER
   2710	012476	016505 	000016 			MOV	A.TD(R5),R5	;FIND STD ADDRESS
   2711	012502	016505 	000030 			MOV	S.SS(R5),R5	;FIND THE SST TABLE
   2712	012506	001403 				BEQ	5$		;NONE -- FORGET IT
   2713	012510					MFPS	T.RAPE(R5),R5	;IS THERE AN ENTRY IN THE TABLE?
	012510	016505 	000012 			MOV	T.RAPE(R5),R5
   2714	012514	001106 				BNE	.SSTET		;DO SST SERVICE
   2715
   2716	012516	012737 	000012 	001120'	5$:	MOV	#TN.EMT,TRPASV	;SAVE THE TERMINATION TYPE
   2717	012524	000513 				BR	CMNABT		;AND GO TO COMMON ABORT
   2718
   2719	012526				10$:				;REMOVE THE SAVED R0 -- NOT NEEDED NOW
   2720									;SAVE REGISTERS
   2721	012526	010446 				MOV	R4,-(SP)
   2722	012530	010346 				MOV	R3,-(SP)
   2723	012532	010246 				MOV	R2,-(SP)
   2724	012534	010146 				MOV	R1,-(SP)
   2725	012536	010046 				MOV	R0,-(SP)
   2726	012540	010637 	001116'			MOV	SP,EMTSTK	;SAVE EMT STACK POINTER
   2728	012544	016601 	000020 			MOV	EM.DRO(SP),R1	;FIND THE DIRECTIVE OR DIRECTIVE POINTER
   2734					;
   2735					;	IF R1 IS EVEN, IT IS ASSUMED TO BE A DPB POINTER
   2736					;	IF R1 IS ODD, IT IS ASSUMED TO BE THE FIRST WORD OF A DPB THAT
   2737					;	HAS BEEN PUSHED ONTO THE STACK.
   2738					;
   2739					;
   2740					;	TEST FOR ODD OR EVEN
   2741					;
   2742	012550	032701 	000001 			BIT	#1,R1
   2743	012554	001003 				BNE	20$
   2744					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 65-1
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   2745					;	EVEN -- R1 CONTAINS A DPB POINTER (ADDRESS).
   2746					;
   2747	012556					MFPS	@R1,R2		;FIND THE FIRST DPB WORD
	012556	011102 				MOV	@R1,R2
   2748	012560	010203 				MOV	R2,R3		;FIND THE DIRECTIVE IDENTIFICATION CODE
   2749	012562	000405 				BR	30$		;EXECUTE DIRECTIVE
   2750					;
   2751					;	ODD WORD ON STACK -- DPB IS ON THE ISSUING
   2752					;	TASK'S STACK, AND R1 CONTAINS THE FIRST DPB WORD.
   2753					;
   2754					;	SET R1 TO THE DPB ADDRESS, R2 TO THE DPB SIZE (IN WORDS),
   2755					;	R3 TO THE DIRECTIVE IDENTIFICATION CODE.
   2756					;
   2757	012564	010102 			20$:	MOV	R1,R2		;SET DPB SIZE IN R2
   2758	012566	010103 				MOV	R1,R3		;SET DIRECTIVE CODE
   2759	012570	010601 				MOV	SP,R1		;FIND THE ADDRESS OF THE DPB
   2760	012572	062701 	000020 			ADD	#EM.DRO,R1	;POINT PAST SAVED STACK
   2761	012576	042703 	177400 		30$:	BIC	#177400,R3
   2762	012602	105002 				CLRB	R2
   2763	012604	000302 				SWAB	R2		;SET SIZE IN LOW ORDER
   2764					;
   2765					;	R3 CONTAINS  THE DIRECTIVE IDENTIFICATION CODE.
   2766					; THE DIC IS AN ODD QUANTITY AND SHOULD BE IN THE RANGE
   2767					;	001-127.(MAX RANGE)
   2768					;
   2769	012606	005721 				TST	(R1)+		;ADVANCE R1 TO POINT TO THE WORD FOLLOWING
   2770									;THE FIRST WORD DPB WORD.
   2771	012610	013705 	001006'			MOV	.CRTSK,R5	;SET UP CURRENT TASK POINTER
   2772	012614	022703 	000102 			CMP	#DIRMAX,R3	;CHECK TO SEE IF LEGAL DIRECTIVE
   2773	012620	103001 				BHIS	DIROK		;OK -- LEGAL RANGE
   2774	012622	104635 			DS.99:	TRAP	DE.99		;ILLEGAL DIRECTIVE
   2775	012624	000173 	012627'		DIROK:	JMP	@DIRDPT-1(R3)	;DISPATCH TO APPROPRIATE DIRECTIVE SERVICE CODE.
   2776					;
   2777	012630	022352'			DIRDPT:	.WORD	.D.QIO	;001. -- QIO
   2778	012632	022352'				.WORD	.D.QIO	;003. -- QIO AND WAIT
   2779	012634	021374'				.WORD	.D.GLI	;005. -- GET LUN INFORMATION
   2780	012636	021270'				.WORD	.D.ASS	;007. -- ASSIGN LUN
   2781	012640	017742'				.WORD	.D.DTE	;009. -- DTE20 FUNCTIONS
   2782	012642	023472'				.WORD	.D.REQ	;011. -- REQUEST
   2783	012644	023022'				.WORD	.D.SEN	;013. -- SEND
   2784	012646	023036'				.WORD	.D.SAR	;015. -- SEND AND REQUEST
   2785	012650	023270'				.WORD	.D.REC	;017. -- RECEIVE
   2786	012652	023270'				.WORD	.D.ROE	;019. -- RECEIVE OR EXIT
   2787	012654	023270'				.WORD	.D.ROS	;021. -- RECEIVE OR SUSPEND
   2788	012656	022054'				.WORD	.D.MKT	;023. -- MARK TIME
   2789	012660	023450'				.WORD	.D.PUT	;025. -- POWER UP AST
   2790	012662	022156'				.WORD	.D.CMT	;027. -- CANCEL MARK TIME REQUESTS
   2791	012664	012622'				.WORD	DS.99	; 029. -- ILLEGAL DIRECTIVE
   2792	012666	021540'				.WORD	.D.CEF	;031. -- CLEAR EVENT FLAG
   2793	012670	021556'				.WORD	.D.SEF	;033. -- SET EVENT FLAG
   2794	012672	021574'				.WORD	.D.DSE	;035. -- DECLARE SIGNIFICANT EVENT
   2795	012674	021616'				.WORD	.D.REF	;037. -- READ EVENT FLAG
   2796	012676	021632'				.WORD	.D.RAF	;039. -- READ ALL EVENT FLAGS
   2797	012700	021656'				.WORD	.D.WFS	;041. -- WAIT FOR SINGLE EVENT FLAG
   2798	012702	021734'				.WORD	.D.WFL	;043. -- WAIT FOR LOGICAL "OR" OF EVENT FLAGS
   2799	012704	022224'				.WORD	.D.SUS	;045. -- SUSPEND EXECUTION
   2800	012706	022236'				.WORD	.D.RES	;047. -- RESUME TASK EXECUTION
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 65-2
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   2801	012710	022042'				.WORD	.D.WSE	;049. -- WAIT FOR NEXT SIGNIFICANT EVENT
   2802	012712	022330'				.WORD	.D.EXT	;051. -- TASK EXIT
   2807	012714	012622'				.WORD	DS.99	; 053. -- ILLEGAL DIRECTIVE
   2808	012716	012622'				.WORD	DS.99	; 055. -- ILLEGAL DIRECTIVE
   2810	012720	023436'				.WORD	.D.STV	;057. -- SPECIFY SST VECTOR
   2811	012722	021424'				.WORD	.D.GTP	;059. -- GET TIME PARAMETERS
   2812	012724	012622'				.WORD	DS.99	;061. -- ILLEGAL
   2813	012726	023720'				.WORD	.D.GPP	;063. -- GET TASK PARAMETERS
   2814	012730	024042'				.WORD	.D.GMP	;065. -- GET PARTITION PARAMETERS
   2815		000102 			DIRMAX=.-DIRDPT	;LEGAL NUMBER OF DIRECTIVES
   2816					;
   2817					; .SSTET -- SST FOR TRAP AND EMT'S
   2818					;
   2819	012732				.SSTET::
   2820	012732	105066 	000001 			CLRB	1(SP)		;CLEAR HIGH BYTE
   2821	012736	006316 				ASL	@SP		;MULTIPLY BY 2
   2822	012740				.SSTCO::
   2824	012740	012746 	004000 			MOV	#004000,-(SP)	;SET PS
   2828	012744	010546 				MOV	R5,-(SP)	;SET TRAP ADDRESS
   2829	012746	013705 	001116'			MOV	EMTSTK,R5	;RESTORE R5
   2830	012752	000002 				RTI			;RETURN TO USER
   2831					;
   2832	012754	013705 	001116'		CMNABT:	MOV	EMTSTK,R5	;RESTORE R5
   2833	012760	000137 	011100'			JMP	CMNABO		;AND GO TO COMMON ABORT
   2834					;
   2835					; CONTROL IS RETUNRED TO ".DR.NS" TO EXIT DIRECTIVE SERVICE WITHOUT ALTERING
   2836					; AN ISSUING TASK'S DIRECTIVE STATUS OR CONDITION CODES.
   2837					;
   2838					; DIRECTIVE RETURN STATUSES
   2839					;
   2840		000000 			DR.00==0		;DIRECTIVE RETURN 00
   2841		000001 			DR.01==1		;DIRECTIVE RETURN 01
   2842		000002 			DR.02==2		;DIRECTIVE RETURN 02
   2843		000003 			DR.03==3		;DIRECTIVE RETURN 03
   2844					;
   2845					; DIRECTIVE ERROR RETURNS
   2846					;
   2847		000377 			DE.01==-1&377		;ERR 01
   2848		000376 			DE.02==-2&377		;ERR 02
   2849		000375 			DE.03==-3&377		;ERR 03
   2850		000374 			DE.04==-4&377		;ERR 04
   2851		000373 			DE.05==-5&377		;ERR 05
   2852		000372 			DE.06==-6&377		;ERR 06
   2853		000371 			DE.07==-7&377		;ERR 07
   2854		000370 			DE.08==-8.&377		;ERR 08
   2855		000367 			DE.09==-9.&377		;ERR 09
   2856		000366 			DE.10==-10.&377		;ERR 10
   2857		000365 			DE.11==-11.&377		;ERR 11
   2858		000260 			DE.80==-80.&377		;ERR 80
   2859		000257 			DE.81==-81.&377		;ERR 81
   2860		000246 			DE.90==-90.&377		;ERR 90
   2861		000245 			DE.91==-91.&377		;ERR 91
   2862		000244 			DE.92==-92.&377		;ERR 92
   2863		000243 			DE.93==-93.&377		;ERR 93
   2864		000242 			DE.94==-94.&377		;ERR 94
   2865		000241 			DE.95==-95.&377		;ERR 95
   2866		000240 			DE.96==-96.&377		;ERR 96
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 65-3
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   2867		000237 			DE.97==-97.&377		;ERR 97
   2868		000236 			DE.98==-98.&377		;ERR 98
   2869		000235 			DE.99==-99.&377		;ERR 99
   2870					;
   2871	012764	132766 	000340 	000002 	.DRSRN::BITB	#340,2(SP)	;FROM EXEC?
   2872	012772	001025 				BNE	20$		;YES -- CONTIUE
   2873	012774	011646 				MOV	@SP,-(SP)	;PUT IT ON STACK TWICE
   2874	012776	162716 	000002 			SUB	#2,@SP
   2875	013002	117616 	000000 			MOVB	@(SP),@SP
   2876	013006	010537 	001116'			MOV	R5,EMTSTK
   2877	013012	013705 	001006'			MOV	.CRTSK,R5	;FIND THE CURRENT TASK
   2878	013016	016505 	000016 			MOV	A.TD(R5),R5	;FIND STD ADDRESS
   2879	013022	016505 	000030 			MOV	S.SS(R5),R5	;IS THERE AN SST VECTOR?
   2880	013026	001403 				BEQ	10$		;NO -- CRASH
   2881	013030					MFPS	T.RAPT(R5),R5	;FIND THE ADDRESS
	013030	016505 	000014 			MOV	T.RAPT(R5),R5
   2882	013034	001336 				BNE	.SSTET		;NONE -- CRASH
   2883	013036	012737 	000014 	001120'	10$:	MOV	#TN.TRP,TRPASV	;SET TRAP TYPE
   2884	013044	000743 				BR	CMNABT		;AND GO TO COMMON ABORT
   2885					;
   2886					;
   2887	013046	162716 	000002 		20$:	SUB	#2,@SP		;FIND THE TRAP VALUE
   2888	013052	113600 				MOVB	@(SP)+,R0
   2889	013054	100006 				BPL	DRXCOM		;BRANCH IF THE DIRECTIVE SUCCEEDED
   2890	013056	013706 	001116'		DEXCOM:	MOV	EMTSTK,SP	;RESTORE STACK FOR REGISTER SAVE
   2891	013062	052766 	000001 	000016 		BIS	#1,EM.DRO-2(SP)	;SET CC-C -2(ISSUING TASK'S PS)
   2892	013070	000405 				BR	DRXRR		;---
   2893					;
   2894	013072				.DR.NS::			;RETURN NO STATUS
   2895	013072	013706 	001116'		DRXCOM:	MOV	EMTSTK,SP	;RESTORE STACK FOR REGISTER SAVE
   2896	013076	042766 	000001 	000016 		BIC	#1,EM.DRO-2(SP)	;CLEAR CC-C -2(ISSUING TASK'S PS)
   2897	013104				DRXRR:				;-----
   2898	013104	010037 	000046 			MOV	R0,$DSW		;SAVE THE DSW
   2899	013110	012600 				MOV	(SP)+,R0	;POP (RESORE) R0
   2900	013112	012601 				MOV	(SP)+,R1	;POP (RESTORE) R1
   2901	013114	012602 				MOV	(SP)+,R2	;POP (RESTORE) R2
   2902	013116	012603 				MOV	(SP)+,R3	;POP (RESTORE) R3
   2904	013120	016604 	000010 			MOV	10(SP),R4	;FIND DPB OR DPB ADDRESS
   2909	013124	106004 				RORB	R4		;ADDRESS OR DPB?
   2910	013126	103402 				BCS	10$		;DPB -- FOUND SIZE REQ'D
   2911	013130	012704 	000400 			MOV	#400,R4		;SET UP TO POP ONLY 1 WORD
   2912	013134	105004 			10$:	CLRB	R4
   2913	013136	000304 				SWAB	R4		;PUT SIZE IN LOW ORDER
   2914	013140	006304 				ASL	R4		;MAKE +2 FOR COUNT
   2916	013142	062704 	000020 			ADD	#EM.DRO,R4	;POINT TO USER STACK LOCATION
   2917	013146	063704 	001116'			ADD	EMTSTK,R4
   2923	013152	016644 	000006 			MOV	6(SP),-(R4)	;RESET STACK
   2924	013156	016644 	000004 			MOV	4(SP),-(R4)
   2925	013162	016644 	000002 			MOV	2(SP),-(R4)
   2926	013166	011644 				MOV	@SP,-(R4)
   2927	013170	010406 				MOV	R4,SP		;SET STACK POINTER
   2928					;
   2929					; A DIRECTIVE HAS BEEN PROCESSED -- IF A TASK IS CURRENT (THE ISSUING
   2930					; TASK) ITS PS, PC, R5, & R4 ARE ON THE KERNEL STACK, AND '.CRTSK' POINTS
   2931					; TO THE ATL NODE OF THAT TASK.  IF A TASK IS NOT CURRENT (ISSUING
   2932					; TASK EXIT'ED), '.CRTSK' IS SET TO ZERO.
   2933					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 65-4
EXEC MODULE TWO -- SERVICE FOR "EMT" & "TRAP" INSTRUCTIONS

   2934					; R0 CONTAINS THE ADDRESS OF THE NEXT ATL NODE TO BE EXAMINED.
   2935					;
   2936	013172	032766 	000340 	000006 		BIT	#PRI7,+6(SP)	;IS PROCESSOR PRIORITY OF DIRECTIVE ISSUING TASK ZERO?
   2937	013200	001403 				BEQ	20$		;YES -- SCAN ATL FROM ENTRY POINTED TO BY R5.
   2938	013202	012604 				MOV	(SP)+,R4	;NO -- TASK SWITCHING HAS BEEN INHIBITED BY ISSUING TASK,
   2939	013204	012605 				MOV	(SP)+,R5	;RESTORE R4, R5, PC, & PS, AND RETURN TO ISSUING TASK.
   2940	013206	000002 				RTI			;(PRIORITY IS ZEROED IF TASK EXIT'ED.)
   2941					;
   2942					; TRANSFER CONTROL TO THE SCAN ATL ROUTINE AT PRIORITY TWO,
   2943					; PREVIOUS MODE: USER, CURRENT MODE: KERNEL, AND CC'S ZERO.
   2944					;
   2945	013210	012746 	034100 		20$:	MOV	#034100+STXAS,-(SP)
   2946	013214	012746 	013236'			MOV	#ASXE2,-(SP)
   2947	013220	000002 				RTI
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 66
EXEC MODULE THREE -- TITLE PAGE

   2949						.SBTTL	EXEC MODULE THREE -- TITLE PAGE
   2950					;
   2951					;
   2952					;
   2953					;
   2954					;
   2955					;
   2956					;	COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD, MASSACHUSETTS   01754.
   2957					;
   2958					;
   2959					;	THE MATERIAL INCLUDED IN THIS FUNCTIONAL  SPECIFICATION,  INCLUDING  BUT
   2960					;	NOT   LIMITED   TO,  INSTRUCTION  TIMES  AND  OPERATING  SPEEDS  IS  FOR
   2961					;	INFORMATION PURPOSES ONLY.  ALL  SUCH  MATERIAL  IS  SUBJECT  TO  CHANGE
   2962					;	WITHOUT NOTICE.  CONSEQUENTLY DEC MAKES NO CLAIM AND SHALL NOT BE LIABLE
   2963					;	FOR ITS ACCURACY.
   2964					;
   2965					;	DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE
   2966					;	ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2967					;
   2968					;
   2969					;
   2970					;
   2971					;
   2972					;		MODULE: EXEC MODULE THREE (ATL SCAN)
   2973					;
   2974					;		VERSION: V001A
   2975					;
   2976					;		AUTHOR:  R. MCLEAN
   2977					;
   2978					;		DATE: 19 MAR 75
   2979					;
   2980					;
   2981					;	THIS MODULE CONTAINS:
   2982					;
   2983					;	1 -- ATL (ACTIVE TASK LIST) SCAN CODE.
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 67
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   2985						.SBTTL	EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST
   2986					;+
   2987					; THE ACTIVE TASK LIST (ATL) IS A PRIORITY ORDERED LIST OF TASKS THAT
   2988					; HAVE BEEN ASSIGNED MEMORY SPACE FOR EXECUTION, AND HAVE NOT EXIT'ED.
   2989					;
   2990					; THE SYSTEM IS DRIVEN BY SCANNING THE ATL FROM THE TOP (HIGH PRIORITY)
   2991					; WHETHER A TASK IS CAPABLE OF EXECUTION IS INDICATED BY THE 'A.TS'TH
   2992					; BYTE OF EACH ATL NODE (ENTRY).
   2993					;
   2994					; THE ATL IS SCANNED DOWNWARD FROM A TASK WHENEVER THAT TASK VOLUNTARILY
   2995					; STOPS EXECUTION (VIZ., WAITFOR, EXIT) AND A SIGNIFICANT
   2996					; EVENT HAS NOT BEEN DECLARED.
   2997					;
   2998					; SIGNIFICANT EVENTS ARE DECLARED BY TASKS (PRI=0) VIA SYSTEM DIRECTIVES,
   2999					; AND BY INTERRUPT SERVICE ROUTINES (PRI 4,5,6,7) VIA SYSTEM SUBROUTINES.
   3000					; A DECLARATION OF A SIGNIFICANT EVENT IS INDICATED BY THE SOFTWARE FLAG
   3001					; (BYTE) '.SERFG+0'.
   3002					;
   3003					; CONTROL IS TRANSFERRED TO THE ATL SCAN ROUTINE UNDER TWO CONDITIONS:
   3004					; (1) WHEN CONTROL IS RETURNED TO A TASK (PRI 0) VIA THE "COMMON RETURN TO
   3005					; INTERRUPTED PROGRAM" AND A SIGNIFICANT EVENT HAS BEEN DECLARED (NON-ZERO
   3006					; '.SERFG+0'), AND (2) WHEN CONTROL IS RETURNED FROM A DIRECTIVE SERVICE
   3007					; ROUTINE.
   3008					;
   3009					; THERE ARE TWO ENTRY POINTS TO THE ATL SCAN ROUTINE:
   3010					; ASXE1 -- TO SCAN THE ATL DOWNWARD FROM THE TOP.  I.E., TO EFFECT A
   3011					; DECLARATION OF A SIGNIFICANT EVENT.
   3012					;
   3013					; CONTROL IS TRANSFERRED TO 'ASXE1' FROM THE 'COMMON RETURN TO INTERRUPTED
   3014					; PROGRAM', OR FROM ATL SCAN TASK STATUS SERVICE, WHENEVER A SIGNIFICANT
   3015					; EVENT DECLARATION IS TO BE EFFECTED.
   3016					;
   3017					; ASXE2 -- TO SERVICE THE STATUS OF THE TASK WHOSE ATL NODE ADDRESS
   3018					; IS IN R5, AND THEN TO EITHER: (1) RETURN CONTROL TO THAT TASK,
   3019					; (2) SCAN THE ATL FROM THAT TASK THRU LOWER PRIORITY TASKS, OR
   3020					; (3) TO SCAN THE ATL FROM THE TOP.
   3021					;
   3022					; CONTROL IS TRANSFERRED TO 'ASXE2' FROM THE COMMON EXIT FOR DIRECTIVE
   3023					; (EMT 375) SERVICE CODE.
   3024					;
   3025					; IF A SIGNIFICANT EVENT HAS BEEN DECLARED (EITHER COINCIDENTLY OR AS
   3026					; A RESULT OF DIRECTIVE EXECUTION) CONTROL IS TRANSFERRED TO 'ASXE1'.
   3027					; HOWEVER, THE DECISION TO TRANSFER TO 'ASXE1' IS NOT MADE UNTIL THE
   3028					; "TASK STATUS SERVICE" FOR THE DIRECTIVE ISSUING TASK HAS BEEN PERFORMED.
   3029					;
   3030					; WHENEVER CONTROL IS TRANSFERRED TO THE ATL SCAN ROUTINE AND A TASK IS
   3031					; CURRENT, THE PS, PC, R5, & R4 OF THE CURRENT TASK  HAVE BEEN PUSHED
   3032					; ONTO THE  STACK.
   3033					;-
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 68
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3035	013222	142737 	000001 	001014'	ASXE1::	BICB	#EV.SE,.SERFG+0	;CLEAR SIGNIFICANT EVENT FLAG, AND SET
   3036	013230	012705 	006462'			MOV	#.ATLLH,R5	;R5 TO THE ADDRESS OF THE FIRST ATL NODE.
   3037									;DISPATCH PER TASK STATUS
   3038					;
   3039					; SCAN LOOP -- AFTER PROCESSING AN ATL ENTRY, CONTROL IS TRANSFERRED EITHER:
   3040					; (1) TO 'ASXSCN' TO PROCESS THE NEXT ATL NODE, OR (2) TO 'ASXTE' TO
   3041					; TERMINATE THE ATL SCAN (A RUNABLE TASK HAS BEEN FOUND).
   3042					;
   3043					; CONTROL IS TRANSFERRED HERE FROM A ATL SCAN SERVICE ROUTINE, WITH THE
   3044					;  STACK AND R5 UNCHANGED FROM THE DISPATCH TO THAT SERVICE ROUTINE.
   3045					;
   3046	013234	011505 			ASXSCN:	MOV	@R5,R5		;ADVANCE R5 TO THE NEXT ATL NODE,
   3047	013236	116504 	000014 		ASXE2:	MOVB	A.TS(R5),R4	;DISPATCH PER ACTIVE TASK STATUS, WITH
   3048	013242	000174 	013244'			JMP	@ASXDT-02(R4)	;R0 = ATL NODE ADR & R4 = STATUS.
   3049					;
   3050	013246				ASXDT:		;STATUS DEFINITIONS & DISPATCH ADDRESS TABLE.
   3051							;
   3052							;THE DISPATCH ROUTINE AT 'ASXE2' EXPECTS THE DISPATCH TABLE
   3053							;TO BEGIN WITH STATUS "02" AND INCREASE SEQUENTIALLY BY TWOS.
   3054							;
   3055					;
   3056		000002 			TS.LRQ==02	;TASK LOAD REQEUST QUEUED
   3057	013246	013444'				ASXLRQ
   3058		000004 			TS.TKN==04	;TASK WAITING FOR TERMINATION NOTICE
   3059	013250	013234'				ASXSCN
   3060		000006 			TS.LRF==06	;TASK LOAD REQUEST FAILED
   3061	013252	013406'				ASXLRF
   3062		000010 			TS.RUN==10	;** TASK IS RUNNING
   3063	013254	014054'				ASXTE
   3064		000012 			TS.SUS==12	;** TASK IS SUSPENDED
   3065	013256	013234'				ASXSCN
   3066		000014 			TS.WF0==14	;** TASK WAITING FOR AN EVENT FLAG 1-14
   3067							;** ('TS.WF0'-'TS.WS4' ARE EXPECTED IN SEQUENCE
   3068							;** BY THE WAITFOR DIRECTIVES.)
   3069	013260	013274'				ASXWR0
   3070		000016 			TS.WF1==16	;** TASK WAITING FOR AN EVENT FLAG 17-32
   3071	013262	013304'				ASXWR1
   3072		000020 			TS.WF2==20	;** TASK WAITING FOR AN EVENT FLAG 33-48
   3073	013264	013314'				ASXWR2
   3074		000022 			TS.WF3==22	;** TASK WAITING FOR AN EVENT FLAG 49-64
   3075	013266	013324'				ASXWR3
   3076		000024 			TS.WF4==24	;** TASK WAITING FOR AN EVENT FLAG 1-64
   3077	013270	013334'				ASXWR4
   3078		000026 			TS.EXT==26	;TASK EXITED
   3079	013272	013562'				ASXEXT
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 69
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3081					;
   3082					; SERVICE FOR "WAITFOR" TASK STATUSES
   3083					;
   3084					; A TASK (THE TASK WHOSE ATL NODE IS POINTED TO BY R5) HAS ISSUED A
   3085					; WAITFOR DIRECTIVE.  IF ANY INDICATED EVENT FLAG IS SET, CHANGE TASK'S
   3086					; TO "RUNNING", AND TERMINATE ATL SCAN TO RUN THE TASK.
   3087					;
   3088					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE ZERO (FLAGS 1-16)
   3089					;
   3090	013274	036565 	000024 	000020 	ASXWR0:	BIT	A.FM+0(R5),A.EF+0(R5)
   3091	013302	000433 				BR	ASXCMN
   3092					;
   3093					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE ONE (FLAGS 17-32)
   3094					;
   3095	013304	036565 	000024 	000022 	ASXWR1:	BIT	A.FM+0(R5),A.EF+2(R5)
   3096	013312	000427 				BR	ASXCMN
   3097					;
   3098					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE TWO (FLAGS 33-48)
   3099					;
   3100	013314	036537 	000024 	001010'	ASXWR2:	BIT	A.FM+0(R5),.COMEF+0
   3101	013322	000423 				BR	ASXCMN
   3102					;
   3103					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE THREE (FLAGS 49-64)
   3104					;
   3105	013324	036537 	000024 	001012'	ASXWR3:	BIT	A.FM+0(R5),.COMEF+2
   3106	013332	000417 				BR	ASXCMN
   3107					;
   3108					; TASK IS WAITING FOR INDICATED FLAG(S) IN RANGE FOUR (FLAGS 1-64)
   3109					;
   3110	013334	036565 	000024 	000020 	ASXWR4:	BIT	A.FM+0(R5),A.EF+0(R5)
   3111	013342	001014 				BNE	WFXSET
   3112	013344	036565 	000026 	000022 		BIT	A.FM+2(R5),A.EF+2(R5)
   3113	013352	001010 				BNE	WFXSET
   3114	013354	036537 	000030 	001010'		BIT	A.FM+4(R5),.COMEF+0
   3115	013362	001004 				BNE	WFXSET
   3116	013364	036537 	000032 	001012'		BIT	A.FM+6(R5),.COMEF+2
   3117	013372	001720 			ASXCMN:	BEQ	ASXSCN
   3118	013374				WFXSET:
   3119	013374	112765 	000010 	000014 		MOVB	#TS.RUN,A.TS(R5)
   3120	013402	000137 	014054'			JMP	ASXTE
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 70
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3122					;
   3123					; SERVICE FOR TASK STATUS: LOAD REQUEST FAILED
   3124					;
   3125	013406	012765 	000040 	000024 	ASXLRF:	MOV	#TN.LRF,A.FM+0(R5) ;SET LOAD REQUEST FAILURE
   3126	013414	112765 	000004 	000014 		MOVB	#TS.TKN,A.TS(R5) ;SET TERMINATION NOTICE REQUESTED
   3127	013422	005237 	001124'			INC	.TKTN		;REQUEST TASK TERMINATION
   3128	013426	026527 	000006 	007346'		CMP	A.PD(R5),#F11TPD ;F11  TPD PARTITION?
   3129	013434	001300 				BNE	ASXE2		;NO -- CONTINUE
   3130	013436					.CRASH	LRF		;LOAD REQUEST FAILURE
	013436	000004 				IOT
	013440	   114 	   122 	   106 		.ASCIZ	/LRF/
	013443	   000
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 71
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3132					;
   3133					; SERVICE FOR TASK REQUEST QUEUE'D SERVICE
   3134					;
   3135	013444	006265 	000020 		ASXLRQ:	ASR	A.EF+0(R5)	;CHECK FOR REQUEST TO LOAD DONE
   3136	013450	103271 				BCC	ASXSCN		;NO -- CONTINUE TO WAIT
   3137	013452	105765 	000030 			TSTB	A.FM+4(R5)	;DID THE I/O SUCCEED?
   3138	013456	100753 				BMI	ASXLRF		;NO -- COMPLAIN
   3139	013460	112765 	000010 	000014 		MOVB	#TS.RUN,A.TS(R5) ;SET THE TASK STATUS TO RUNNING
   3140	013466	016504 	000012 			MOV	A.HA(R5),R4	;FIND THE HEADER ADDRESS
   3147	013472	016446 	000106 			MOV	H.TKVA(R4),-(SP) ;SAVE THE SST ADDRESS
   3148	013476	016446 	000076 			MOV	H.IPC(R4),-(SP)	;SAVE INITIAL PC
   3149	013502	016446 	000074 			MOV	H.IPS(R4),-(SP)	;SAVE INITIAL PS
   3150	013506	016446 	000130 			MOV	H.LUT(R4),-(SP)	;FIND OVERLAY LUN
   3151	013512	006316 				ASL	@SP		;MAKE OFFSET
   3152	013514	006316 				ASL	@SP
   3153	013516	062716 	000126 			ADD	#H.LUT-2,@SP	;POINT TO START OF LUT
   3154	013522	060416 				ADD	R4,@SP		;POINT TO CORRECT LUT
   3155	013524	016536 	000022 			MOV	A.EF+2(R5),@(SP)+ ;SET LUT
   3156	013530	016404 	000100 			MOV	H.ISP(R4),R4	;FIND INITIAL STACK
   3157	013534	012644 				MOV	(SP)+,-(R4)	;STORE THE PS
   3158	013536	012644 				MOV	(SP)+,-(R4)	;STORE THE PC
   3159	013540	162704 	000014 			SUB	#14,R4		;INCLUDE REGISTER SAVE
   3160	013544	010465 	000004 			MOV	R4,A.SP(R5)	;SET STACK VALUE
   3161	013550	016504 	000016 			MOV	A.TD(R5),R4	;FIND THE STD ADDRESS
   3162	013554	012664 	000030 			MOV	(SP)+,S.SS(R4)	;SET SST ADDRESS
   3163	013560	000535 				BR	ASXTE		;GO TO START THE TASK
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 72
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3165					;
   3166					; SERVICE FOR TASK STATUS: EXIT
   3167					;
   3168	013562	010446 			ASXEXT:	MOV	R4,-(SP)
   3169	013564	010346 				MOV	R3,-(SP)
   3170	013566	010246 				MOV	R2,-(SP)
   3171	013570	010146 				MOV	R1,-(SP)
   3172	013572	010046 				MOV	R0,-(SP)
   3173	013574	016502 	000016 			MOV	A.TD(R5),R2	;FIND THE STD ADDRESS
   3174	013600	016500 	000006 			MOV	A.PD(R5),R0	;FIND THE TPD ADDRESS
   3175	013604	042762 	000001 	000006 		BIC	#SF.TA,S.FW(R2)	;CLEAR ACTIVE FLAG IN STD
   3176	013612				10$:
   3177	013612	032762 	000002 	000006 		BIT	#SF.FX,S.FW(R2)	;CHECK TO SEE IF TASK FIXED
   3178	013620	001003 				BNE	20$		;YES -- DON'T FREE CORE
   3179					;
   3180					;
   3181					; FREE MEMORY (AND POSSIBLY START TASK WAITING FOR MEMORY) AND RETURN
   3182					; ATL NODE TO POOL.
   3183					;
   3184	013622	042760 	000002 	000010 		BIC	#TF.OU,T.FW(R0) ;RELEASE PARTITION
   3185					;
   3186					;
   3187	013630	010504 			20$:	MOV	R5,R4		;POINT R5 TO THE NEXT LOWEST PRIORITY TASK'S
   3188	013632	010501 				MOV	R5,R1		;ATL NODE, DELETE NODE FROM ATL, AND RETURN
   3189	013634	011505 				MOV	@R5,R5		;IT TO THE POOL.
   3190	013636					CALL	..NDEL
	013636	004737 	042500'			JSR	PC,..NDEL
   3191	013642	012704 	001424'			MOV	#.POLLH,R4	;RETURN THE NODE TO THE POOL
   3192	013646					CALL	..NADD
	013646	004737 	042614'			JSR	PC,..NADD
   3193	013652	032762 	000004 	000006 		BIT	#SF.EX,S.FW(R2)	;HAS THE TASK BEEN REQUESTED TO EXIT?
   3194	013660	001426 				BEQ	50$		;NO -- JUST CONTINUE
   3195	013662	010046 				MOV	R0,-(SP)	;SAVE R0 (TPD ADDRESS)
   3196	013664	013700 	005710'			MOV	.STDTA,R0	;FIND THE HEAD OF THE STD LIST
   3197	013670	013703 	005714'			MOV	.STDTZ,R3	;FIND THE SIZE OF THE LIST
   3198	013674	162737 	000002 	005714'		SUB	#2,.STDTZ	;RESET THE SIZE FOR NOW IT IS SMALLER
   3199	013702	006203 				ASR	R3		;DIVIDE BY 2
   3200	013704	005203 				INC	R3		;MAKE 1 LARGER BECAUSE IT IS 2*N-2
   3201	013706	020210 			30$:	CMP	R2,@R0		;THE CORRECT ENTRY?
   3202	013710	001403 				BEQ	40$		;YES -- FOUND IT
   3203	013712	005720 				TST	(R0)+		;NO -- CONTINUE SEARCH
   3204	013714	005303 				DEC	R3		;CONTINUE SCAN
   3205	013716	000773 				BR	30$
   3206					;
   3207	013720	016020 	000002 		40$:	MOV	2(R0),(R0)+	;MOVE ENTRIES BACK
   3208	013724	077303 				SOB	R3,40$		;UNTIL DONE
   3209	013726	010201 				MOV	R2,R1		;RETURN NODE TO POOL
   3210									;NOTE -- R4 STILL POINTS TO .POLLH
   3211									;FROM ABOVE RETURN OF ATL!!!!!
   3212	013730					CALL	..NADD		;RETURN NODE
	013730	004737 	042614'			JSR	PC,..NADD
   3213	013734	012600 				MOV	(SP)+,R0	;RESTORE R0
   3214	013736	032760 	000002 	000010 	50$:	BIT	#TF.OU,T.FW(R0)	;CHECK FOR PARTITION OCCUPIED
   3215	013744	001025 				BNE	60$		;YES -- DON'T TRY TO START TASK
   3216	013746	010004 				MOV	R0,R4		;SET UP TO PICL A NODE FROM MRL
   3217	013750	062704 	000014 			ADD	#T.RF,R4	;POINT TO MRL
   3218	013754					CALL	..PICK		;PICK NODE
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 72-1
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

	013754	004737 	042656'			JSR	PC,..PICK
   3219	013760	103417 				BCS	60$		;NONE FOUND -- DON'T ATTEMPT TO START
   3220	013762	010401 				MOV	R4,R1		;SAVE THE NODE ADDRESS FOUND
   3221	013764	022424 				CMP	(R4)+,(R4)+	;POINT TO THE ENTRIES IN THE NDOE
   3222	013766	012402 				MOV	(R4)+,R2	;SET UP TO CALL .REQS
   3223	013770	012403 				MOV	(R4)+,R3
   3224	013772	012446 				MOV	(R4)+,-(SP)	;PUSH PRI
   3225	013774	012704 	001424'			MOV	#.POLLH,R4	;RETURN THE NODE TO THE POOL
   3226	014000					CALL	..NADD		;RETURN NODE
	014000	004737 	042614'			JSR	PC,..NADD
   3227	014004	012604 				MOV	(SP)+,R4	;GET THE PRIORITY
   3228	014006	042762 	000001 	000006 		BIC	#SF.TA,S.FW(R2) ;CLEAR TASK ACTIVE FLAGS
   3229	014014					CALL	.REQS		;REQUEST THE TASK
	014014	004737 	014460'			JSR	PC,.REQS
   3230					;
   3231	014020	012600 			60$:	MOV	(SP)+,R0	;POP (RESTORE) R0,R2,R1
   3232	014022	012601 				MOV	(SP)+,R1
   3233	014024	012602 				MOV	(SP)+,R2
   3234	014026	012603 				MOV	(SP)+,R3
   3235	014030	012604 				MOV	(SP)+,R4
   3236					;
   3237					; IF EXITING TASK IS NOT "CURRENT", ITS CONTEXT IS STORED IN ITS STACK.
   3238					; IF EXITING TASK IS "CURRENT", ITS PS, PC, R5, & R4 ARE STORED ON THE
   3239					;  STACK AND THE REMAINDER OF ITS CONTEXT IS LOADED.
   3240					;
   3241					; R1 CONTAINS THE ADDRESS OF THE ATL NODE (WHICH HAS BEEN RETURNED TO THE
   3242					; POOL) OF THE EXITING TASK.
   3243					;
   3244	014032	020537 	001006'			CMP	R5,.CRTSK	;IF EXITING TASK IS "CURRENT", REMOVE (POP)
   3245	014036	001004 				BNE	70$		;ITS R4, R5, PC, & PS FROM THE  STACK
   3246	014040	062706 	000010 			ADD	#8.,SP		;(POP)
   3247	014044	005037 	001006'			CLR	.CRTSK
   3248	014050				70$:
   3249	014050	000137 	013236'			JMP	ASXE2		;DISPATCH PER STATUS OF TASK POINTED TO BY R5.
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 73
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3251					;
   3252					; TERMINATION OF ATL SCAN -- A TASK THAT CAN BE RUN HAS BEEN FOUND
   3253					;
   3254					; CONTROL IS TRANSFERRED HERE WITH THE PS, PC, R5, & R4 OF THE CURRENT
   3255					; TASK PUSHED ONTO THE  STACK.
   3256					;
   3257					; CONTROL IS TRANSFERRED HERE EITHER BY DIRECT DISPATCH, OR FROM AN ATL
   3258					; SCAN SERVICE ROUTINE.  IN EITHER CASE, THE  STACK AND R5 ARE
   3259					; UNCHANGED FROM THE LAST ATL SCAN DISPATCH.
   3260	014054	020537 	001006'		ASXTE:	CMP	R5,.CRTSK	;IS CONTROL RETURNING TO CURRENT TASK?
   3261	014060	001461 				BEQ	CSDONE		;YES -- RESTORE R5, R4, PS, & PC FROM STACK
   3262	014062	132737 	000001 	001014'		BITB	#EV.SE,.SERFG+0	;NO -- HAS A SIGNIFICANT EVENT OCCURRED?
   3263	014070	001402 				BEQ	10$
   3264	014072	000137 	013222'			JMP	ASXE1		;YES -- RESTART ATL SCAN
   3265
   3266	014076	112737 	000340 	177776 	10$:	MOVB	#340,@#PS	;INHIBIT INTERRUPTS WHILE CONTEXT SWITCHING
   3267	014104	013704 	001006'			MOV	.CRTSK,R4	;NO -- IS THERE A CURRENT TASK?
   3268	014110	001420 				BEQ	40$		;NO -- (CURRENT TASK EXITED) NO CONTEXT TO SAVE
   3269									;YES -- SAVE CONTEXT OF OLD CURRENT TASK, AND
   3270									;LOAD CONTEXT OF NEW CURRENT TASK.
   3271
   3273	014112	010346 				MOV	R3,-(SP)	;PUSH R3
   3274	014114	010246 				MOV	R2,-(SP)	;PUSH R2
   3275	014116	010146 				MOV	R1,-(SP)	;PUSH R1
   3276	014120	010046 				MOV	R0,-(SP)	;PUSH R0
   3277	014122	016400 	000012 			MOV	A.HA(R4),R0	;FIND THE HEADER ADDRESS
   3284	014126	062700 	000046 			ADD	#H.DSW,R0	;POINT TO DSW
   3285	014132	012701 	000046 			MOV	#$DSW,R1	;POINT TO DSW
   3286	014136	012120 				MOV	(R1)+,(R0)+	;SAVE THE CONTEXT OF LOW CORE
   3287	014140	012120 				MOV	(R1)+,(R0)+
   3288	014142	012120 				MOV	(R1)+,(R0)+
   3289	014144	011110 				MOV	@R1,@R0
   3290	014146	010664 	000004 			MOV	SP,A.SP(R4)	;SAVE OLD PS
   3291	014152	016506 	000004 		40$:	MOV	A.SP(R5),SP	;SET UP NEW STACK
   3292	014156	016500 	000012 			MOV	A.HA(R5),R0	;RESTORE CONTEXT
   3299	014162	062700 	000054 			ADD	#H.DSW+6,R0	;POINT TO DSW SAVE
   3300	014166	012701 	000054 			MOV	#$DSW+6,R1
   3301	014172	011011 				MOV	@R0,@R1
   3302	014174	014041 				MOV	-(R0),-(R1)
   3303	014176	014041 				MOV	-(R0),-(R1)
   3304	014200	014041 				MOV	-(R0),-(R1)
   3305	014202	012600 				MOV	(SP)+,R0	;RESTORE REGISTERS FROM THE IS TASK
   3306	014204	012601 				MOV	(SP)+,R1
   3307	014206	012602 				MOV	(SP)+,R2
   3308	014210	012603 				MOV	(SP)+,R3
   3310
   3347
   3348	014212	010537 	001006'			MOV	R5,.CRTSK	;SET NEW '.CRTSK' (ATL NODE ADR OF CURRENT TASK).
   3349	014216	142737 	000300 	177776 		BICB	#300,@#PS	;LOWER TO PRI 1 AFTER CONTEXT SWITCH
   3350
   3351	014224				CSDONE:		;CONTEXT SWITCH (IF REQUIRED) IS DONE.
   3353	014224	052766 	004000 	000006 		BIS	#4000,6(SP)	;SET REG SET 1
   3354	014232	042766 	170000 	000006 		BIC	#170000,6(SP)	;CLEAR OFF MODE BITS
   3356					;
   3357					; A TASK'S PS, PC, R5, & R4 ARE ON THE  STACK, AND THE TASK'S ATL
   3358					; NODE ADDRESS IS IN R5.  I.E., CONDITIONS ARE CORRECT FOR AN ATL SCAN
   3359					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 73-1
EXEC MODULE THREE -- SCAN OF ACTIVE TASK LIST

   3360					;
   3361					; IF THE TASK'S STATUS IS "RUNNING", CONTROL IS RETURNED TO THE TASK
   3362					; (UNLESS A SIGNIFICANT EVENT HAS BEEN DECLARED, IN WHICH CASE, CONTROL
   3363					; WILL BE RETURNED LATER).
   3364					;
   3365					;
   3366	014240	012604 				MOV	(SP)+,R4	;POP (RESTORE) R4
   3367	014242	012605 				MOV	(SP)+,R5	;POP (RESTORE) R5
   3368					;
   3369					; TRANSFER CONTROL TO TASK VIA COMMON "RETURN TO INTERRUPTED PROGRAM"
   3370					; ROUTINE (CLOCK AND/OR EVENT RECOGNITION MAY CAUSE ACTUAL TRANSFER TO
   3371					; OCCUR LATER IN REAL TIME).
   3372					;
   3373					;	BR	..INTX
   3374						;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 74
EXEC MODULE NINE -- TITLE PAGE

   3376						.SBTTL	EXEC MODULE NINE -- TITLE PAGE
   3377					;
   3378					;
   3379					;
   3380					;
   3381					;
   3382					;
   3383					;	COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD, MASSACHUSETTS   01754.
   3384					;
   3385					;
   3386					;	THE MATERIAL INCLUDED IN THIS FUNCTIONAL  SPECIFICATION,  INCLUDING  BUT
   3387					;	NOT   LIMITED   TO,  INSTRUCTION  TIMES  AND  OPERATING  SPEEDS  IS  FOR
   3388					;	INFORMATION PURPOSES ONLY.  ALL  SUCH  MATERIAL  IS  SUBJECT  TO  CHANGE
   3389					;	WITHOUT NOTICE.  CONSEQUENTLY DEC MAKES NO CLAIM AND SHALL NOT BE LIABLE
   3390					;	FOR ITS ACCURACY.
   3391					;
   3392					;	DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE
   3393					;	ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   3394					;
   3395					;
   3396					;
   3397					;
   3398					;
   3399					;		MODULE: EXEC MODULE NINE (INTERRUPT RETURN)
   3400					;
   3401					;		VERSION: V001A
   3402					;
   3403					;		AUTHOR: R. MCLEAN
   3404					;
   3405					;		DATE: 19 MAR 75
   3406					;
   3407					;
   3408					;	THIS MODULE CONTAINS:
   3409					;
   3410					;	1 -- COMMON CODE FOR EXITING AN INTERRUPT SERVICE ROUTINE.
   3411					;
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 75
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3413						.SBTTL	EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM
   3414					;
   3415					; MOST INTERRUPT SERVICE ROUTINES ARE CONTAINED WITHIN I/O HANDLER TASKS
   3416					; CONTROL IS TRANSFERRED TO A TASK CONTAINED INTERRUPT SERVICE ROUTINE,
   3417					; WHEN THE INTERRUPT SERVICE ROUTINE WAS "CONNECTED" TO THE INTERRUPT.
   3418					;
   3419					; CONTROL IS TRANSFERRED TO A TASK CONTAINED INTERRUPT SERVICE ROUTINE
   3420					; WITH THE INTERRUPTED PROGRAM'S PS & PC,
   3421					;
   3422					; ALL TASK CONTAINED INTERRUPT SERVICE ROUTINES EXIT VIA "JMP ..INTX" WITH
   3423					; PS & PC OF THE INTERRUPTED PROGRAM
   3424					;
   3425					; THE '..INTX' ROUTINE  EFFECTS A RETURN OF CONTROL
   3426					; TO THE INTERRUPTED PROGRAM.
   3427					;
   3428					; WITH THE PS & PC OF THE INTERRUPTED PROGRAM ON THE  STACK.
   3429					;
   3430					; THE 'EXINTX' ROUTINE EFFECTS A RETURN TO THE INTERRUPTED PROGRAM.
   3431					;
   3432					; WHENEVER CONTROL IS RETURNED TO OTHER THAN A TASK (NON-ZERO PRI),
   3433					; CONTROL IS TRANSFERRED DIRECTLY TO THE INTERRUPTED PROGRAM.  HOWEVER,
   3434					; WHEN CONTROL IS BEING RETURNED TO A TASK (PRI=0), THE "SYSTEM
   3435					; EVENT RECOGNITION FLAG" IN THE SYSTEM COMMUNICANTIONS AREA (SCOM) IS
   3436					; EXAMINED, AND IF FOUND NON-ZERO, THE INDICATED EVENTS ARE RECOGNIZED
   3437					; BEFORE CONTROL IS RETURNED TO THE INTERRUPTED TASK.
   3438					;
   3439
   3440	014244				..INTX::			;NORMAL ISR EXIT
   3441	014244	052737 	000340 	177776 		BIS	#000340,@#PS	;;;INHIBIT INTERRUPTS (RAISE PRIORITY TO 7)
   3442	014252	032766 	000340 	000002 		BIT	#000340,+2(SP)	;;;IS CONTROL RETURNING TO A TASK (PRI=0)?
   3443	014260	001010 				BNE	CRTNXA		;;;YES -- EXAMINE SYSTEM EVENT RECOGNITION FLAG
   3444
   3445	014262	005737 	001026'			TST	.PFAIL		;;;POWER FAIL SERVICE?
   3446	014266	001402 				BEQ	CRTNX1		;;;NO -- JUST RETURN
   3447	014270	000137 	017176'			JMP	.PWRDN		;;;YES -- POWER DOWN
   3448
   3449	014274	005737 	001014'		CRTNX1:	TST	.SERFG		;;;** ANY UNRECOGNIZED "SYSTEM EVENTS"?
   3450	014300	001001 				BNE	CRTNX3		;;;** YES -- TRANSFER CONTROL TO APPROPRIATE
   3451									;;;** EVENT RECOGNITON ROUTINE.
   3452	014302				CRTNXA:
   3453					;	CMP	.DBRTT,SP	;;;** ## NO -- IS CONTROL RETURNING FROM SYSTEM
   3454					;	BNE	10$		;;;** ## TRACE DEBUGGING ROUTINE?
   3455					;	CLR	.DBRTT		;;;** ## YES -- RETURN VIA "RTT" INSTEAD OF "RTI"
   3456					;	RTT			;;;** ##
   3457	014302				10$:				;;;** ##
   3458	014302	000002 			CRTNX2:	RTI			;;;** NO -- RETURN CONTROL TO TASK
   3459
   3460									;** A RACE CONDITION EXISTS WHENEVER A
   3461									;POWER FAILURE OCCURS WHILE EXECUTING
   3462									;BETWEEN 'CRTNX1' AND 'CRTNX2'.  TO
   3463									;AVOID THIS CONDITION, THE POWER FAIL
   3464									;TRAP SERVICE ROUTINE SETS THE PC TO
   3465									;'CRTNX1' WHENEVER IT INTERRUPTS EXECUTION
   3466									;IN THE RANGE 'CRTNX1' THRU 'CRTNX2'.
   3467					;
   3468					; A SYSTEM EVENT IS TO BE RECOGNIZED (NON-ZERO '.SERFG'), CONTROL IS
   3469					; TRANSFERRED TO SERVICE ROUTINE PER '.SERFG'
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 75-1
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3470					;   PRI=2, CONDITION CODES CLEARED, AND THE
   3471					; INTERRUPTED TASK'S PS, PC, R5 & R4 PUSHED ONTO THE  STACK.
   3472					;
   3473	014304	010546 			CRTNX3:	MOV	R5,-(SP)	;;;PUSH R5
   3474	014306	010446 				MOV	R4,-(SP)	;;;PUSH R4
   3475
   3476	014310	012746 	034100 			MOV	#034100,-(SP)
   3477	014314	105737 	001015'			TSTB	.SERFG+1	;;;UN-RECOGNIZED CLOCK TICK(S)?
   3478	014320	001403 				BEQ	10$		;;;
   3479						 			;;;YES -- RECOGNIZE CLOCK TICKS (NORMALLY
   3480	014322	012746 	024174'			MOV	#.TICK,-(SP)	;;;ONLY ONE)
   3481	014326	000002 				RTI			;;;
   3482	014330	132737 	000201 	001014'	10$:	BITB	#EV.SE!EV.PF,.SERFG+0	;;;NO -- SIGNIFICANT EVENT RECOGNITION?
   3483	014336	100437 				BMI	60$			;;;OR POWER FAIL
   3484	014340	001403 				BEQ	30$		;;;
   3485						 			;;;YES -- SCAN ATL FROM THE TOP
   3486	014342	012746 	013222'		20$:	MOV	#ASXE1,-(SP)	;;;
   3487	014346	000002 				RTI			;;;
   3488
   3489	014350	132737 	000002 	001014'	30$:	BITB	#EV.AS,.SERFG+0	;;;AST?
   3490	014356	001435 				BEQ	70$		;;;YIPES -- GOOFED AND SYSTEM BROKEN
   3491	014360	010316 				MOV	R3,@SP		;;;SAVE CONTEXT
   3492	014362	010246 				MOV	R2,-(SP)
   3493	014364	010146 				MOV	R1,-(SP)
   3494	014366	010046 				MOV	R0,-(SP)
   3498	014370	012746 	004000 			MOV	#004000,-(SP)
   3500	014374	013746 	001050'			MOV	.CKASS,-(SP)	;;;SET AST ADDRESS
   3501	014400	001411 				BEQ	50$		;;;NOT THIS TYPE
   3502	014402	005037 	001050'			CLR	.CKASS		;;;CLEAR THIS FOR NEXT TIME
   3503	014406	005737 	001052'			TST	.PFASS		;;;POWER FAIL ALSO?
   3504	014412	001334 				BNE	CRTNX3		;;;YES -- BETTER DO IT TOO
   3505	014414	142737 	000002 	001014'	40$:	BICB	#EV.AS,.SERFG+0	;;;CLEAR THIS FLAG
   3506	014422	000002 				RTI			;;;RETURN TO USER
   3507
   3508	014424	013716 	001052'		50$:	MOV	.PFASS,@SP	;;;SET UP POWER FAIL AST
   3509	014430	005037 	001052'			CLR	.PFASS		;;;CLEAR POWER FAIL AST ADDRESS
   3510	014434	000767 				BR	40$		;;;AND RETURN TO USER
   3511
   3512	014436	142737 	000200 	001014'	60$:	BICB	#EV.PF,.SERFG+0	;;;CLEAR POWER FAIL FLAG
   3513	014444					CALL	.PFRST		;;;POWER FAIL RESTART
	014444	004737 	017530'			JSR	PC,.PFRST
   3514	014450	000734 				BR	20$		;;;RETURN
   3515
   3516	014452				70$:	.CRASH	IAS		;;;CRASH SYSTEM UNKNOWN SIG EVENT
	014452	000004 				IOT
	014454	   111 	   101 	   123 		.ASCIZ	/IAS/
	014457	   000
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 76
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3518					;
   3519					;  .REQS -- SUBROUTINE TO ATTEMPT TO MAKE A TASK ACTIVE
   3520					;
   3521					; ENTRY CONDITIONS:
   3522					;
   3523					;	R2 -- STD ENTRY ADDRESS (TASK ID ) OF REQUESTED TASK
   3524					;	R3 -- TPD ENTRY ADDRESS, OR ZERO (DEFAULT PARTITION) , FOR REQUESTED TASK
   3525					;	R4 -- RUN PRIORITY, OR ZERO (DEFAULT PRIORITY), FOR REQUESTED TASK
   3526					;
   3527					;  CALLING SEQUENCE:
   3528					;
   3529					;	CALL	.REQS
   3530					;
   3531					;   EXIT CONDITIONS:
   3532					;
   3533					;	R2=00 -- TASK MADE ACTIVE
   3534					;	R2=02 -- TASK NOT MADE ACTIVE, TASK ALREADY ACTIVE
   3535					;	R2=06 -- TASK NOT MADE ACTIVE, INSUFFICIENT POOL NODE(S)
   3536					;
   3537					;	REGISTERS ALTERED:
   3538					;	R0,R1,R2,R3,R4
   3539					;
   3540					;
   3541	014460	032762 	000001 	000006 	.REQS::	BIT	#SF.TA,S.FW(R2)	;IS TASK ACTIVE?
   3542	014466	001403 				BEQ	10$		;NO -- IT IS LEGAL TO ACTIVATE IT
   3543	014470	012702 	000002 			MOV	#2,R2		;YES -- RETURN +2
   3544	014474					RETURN
	014474	000207 				RTS	PC
   3545
   3546	014476	005703 			10$:	TST	R3		;CHECK THE PARTITION
   3547	014500	001002 				BNE	20$		;PARTITION SPECIFIED
   3548	014502	016203 	000004 			MOV	S.TD(R2),R3	;PARTITION NOT SPECIFIED -- USE DEFAULT
   3549	014506	005704 			20$:	TST	R4		;PRIORITY?
   3550	014510	001002 				BNE	30$		;YES -- DON'T USE DEFAULT
   3551	014512	156204 	000010 			BISB	S.DP(R2),R4	;FIND THE DEFAULT PRIORITY
   3552	014516	010446 			30$:	MOV	R4,-(SP)	;SAVE PRI
   3553	014520	010346 				MOV	R3,-(SP)	;SAVE TPD
   3554	014522	012704 	001424'			MOV	#.POLLH,R4	;PICK AN ATL NODE
   3555	014526					CALL	..PICK
	014526	004737 	042656'			JSR	PC,..PICK
   3556	014532	103004 				BCC	50$		;GOT NODE
   3557	014534	022626 			40$:	CMP	(SP)+,(SP)+	;REMOVE SAVED TPD AND PRI
   3558	014536	012702 	000006 			MOV	#6,R2		;COMPLAIN NO NODES AVAILABLE
   3559	014542					RETURN			;RETURN TO CALLER
	014542	000207 				RTS	PC
   3560
   3561	014544	032762 	000002 	000006 	50$:	BIT	#SF.FX,S.FW(R2)	;FIXED IN CORE?
   3562	014552	001436 				BEQ	70$		;NO -- MUST READ THE TASK IN
   3563	014554	010401 				MOV	R4,R1		;SAVE NODE ADDRESS
   3564	014556	016204 	000022 			MOV	S.SP(R2),R4	;SET UP STACK
   3565	014562	062704 	000014 			ADD	#14,R4		;SET POINTER TO PC
   3566	014566	016224 	000020 			MOV	S.PC(R2),(R4)+	;SET PC
   3567	014572	012724 	174000 			MOV	#174000,(R4)+	;SET UP PS
   3568	014576	012703 	000010 			MOV	#TS.RUN,R3	;SET UP TO START TASK
   3569	014602	010104 			60$:	MOV	R1,R4		;SAVE THE ATL NODE ADDRESS
   3570	014604	022424 				CMP	(R4)+,(R4)+	;MOVE OVER LISTHEAD
   3571	014606	016224 	000022 			MOV	S.SP(R2),(R4)+	;SET INITIAL STACK POINTER
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 76-1
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3572	014612	012624 				MOV	(SP)+,(R4)+	;SET UP TPD AND PRI
   3573	014614	012624 				MOV	(SP)+,(R4)+
   3574	014616	016224 	000012 			MOV	S.BA(R2),(R4)+	;SET BASE ADDRESS
   3575	014622	010324 				MOV	R3,(R4)+	;SET RUN STATE
   3576	014624	010224 				MOV	R2,(R4)+	;SET STD NODE ADDRESS
   3577	014626	005024 				CLR	(R4)+
   3578	014630	005064 	000012 			CLR	A.PF-A.EF-2(R4)	;CLEAR POWER FAIL AST ADDRESS
   3579	014634	052762 	000001 	000006 		BIS	#SF.TA,S.FW(R2)	;SET TASK ACTIVE
   3580	014642	012702 	006462'			MOV	#.ATLLH,R2	;INSERT NODE INTO ATL
   3581	014646	000535 				BR	120$
   3582
   3583	014650	032763 	000002 	000010 	70$:	BIT	#TF.OU,T.FW(R3)	;PARTITION BUSY?
   3584	014656	001116 				BNE	110$		;YES -- BETER PUT IN MRL
   3585	014660	010446 				MOV	R4,-(SP)	;SAVE NODE ADDRESS OF ATL NODE
   3586	014662	012701 	000040 			MOV	#32.,R1		;PICK AN I/O NODE
   3587	014666					CALL	..ALCB
	014666	004737 	043034'			JSR	PC,..ALCB
   3588	014672	010004 				MOV	R0,R4		;SET CORRECT NODE ADDRESS
   3589	014674	103006 				BCC	80$		;GOT ONE
   3590	014676	012601 				MOV	(SP)+,R1	;NONE AVAILABLE -- RETURN ATL NODE
   3591	014700	012704 	001424'			MOV	#.POLLH,R4
   3592	014704					CALL	..NADD		;ADD NODE BACK TO ATL
	014704	004737 	042614'			JSR	PC,..NADD
   3593	014710	000711 				BR	40$		;RETURN +6
   3594
   3595	014712	010446 			80$:	MOV	R4,-(SP)	;SAVE NODE ADDRESS
   3596	014714	022424 				CMP	(R4)+,(R4)+	;MOVE OVER LISTHEAD
   3597	014716	010224 				MOV	R2,(R4)+	;SET UP STD ADDRESS
   3598	014720	016624 	000002 			MOV	2(SP),(R4)+	;SET UP ATL NODE ADDRESS
   3599	014724	012724 	175014 			MOV	#250.*400+12.,(R4)+ ;SET UP PRI/DPB SIZE
   3600	014730	012724 	000400 			MOV	#400,(R4)+	;SET EFN
   3601	014734	012724 	000050 			MOV	#IO.LTK,(R4)+	;CLAIM THIS IS A READ
   3602	014740	005024 				CLR	(R4)+		;NO I/O STATUS
   3603	014742	005024 				CLR	(R4)+		;NO AST ADDRESS
   3604	014744	022424 				CMP	(R4)+,(R4)+	;ADDRESS IS NOT SPECIFIED HERE
   3605	014746	016224 	000014 			MOV	S.LZ(R2),(R4)+	;SET UP INITIAL SIZE
   3606	014752	005024 				CLR	(R4)+		;SKIP THIS PARAMETER
   3607	014754	016224 	000032 			MOV	S.DL(R2),(R4)+	;SET UP DISK ADDRESS
   3608	014760	016224 	000034 			MOV	S.DL+2(R2),(R4)+ ;LOW ORDER DISK ADDRESS
   3609	014764	012601 				MOV	(SP)+,R1	;RESTORE R1
   3610	014766	016603 	000002 			MOV	2(SP),R3	;RESTORE THE TPD ADDRESS
   3611	014772	032763 	000002 	000010 		BIT	#TF.OU,T.FW(R3)	;PARTITON OCCUPIED?
   3612	015000	001407 				BEQ	90$		;NO -- MUST BE OK TO LOAD
   3613	015002	012603 				MOV	(SP)+,R3	;YES -- BETTER ADD IT TO MRL
   3614	015004	012601 				MOV	(SP)+,R1	;RESTORE ATL ADDRESS
   3615	015006	010361 	000030 			MOV	R3,A.FM+4(R1)	;SET THE NODE ADDRESS IN FLAGS MASK WORD TO PRESERVE IT
   3616	015012	012703 	100002 			MOV	#TS.LRQ+100000,R3 ;SET LOAD REQUEST QUEUE'D AND PARTITION BUSY
   3617	015016	000671 				BR	60$		;SET UP ATL
   3618
   3619	015020	010246 			90$:	MOV	R2,-(SP)	;SAVE STD ADDRESS
   3620	015022	052763 	000002 	000010 		BIS	#TF.OU,T.FW(R3)	;DECLARE THE PARTITION OCCUPIED
   3621	015030	005003 				CLR	R3		;FIND PUD ENTRY
   3622	015032	156203 	000011 			BISB	S.DI(R2),R3	;SET DISK INDICATOR
   3623	015036	012702 	007606'			MOV	#.PUDBA,R2	;SET UP FOR ..IPRI
   3624	015042	062702 	000050 		100$:	ADD	#U.SZ,R2	;POINT TO AN ENTRY
   3625	015046	077303 				SOB	R3,100$		;LOOP UNTIL CORRECT ENTRY FOUND
   3626	015050	010203 				MOV	R2,R3		;SAVE THE LOGICAL UNIT NUMBER
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 76-2
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3627	015052	062702 	000022 			ADD	#U.RF,R2	;POINT TO LISTHEAD
   3628	015056					CALL	..IPRI		;ENTER IN LIST
	015056	004737 	042540'			JSR	PC,..IPRI
   3629	015062	014202 				MOV	-(R2),R2	;FIND ATL NODE ADDRESS OF HANDLER TASK
   3630	015064	052762 	000010 	000020 		BIS	#EF.NIR,A.EF(R2) ;START HANDLER
   3631	015072					CALL	..DSEV		;DECLARE SIG EVENT
	015072	004737 	042444'			JSR	PC,..DSEV
   3632	015076	012602 				MOV	(SP)+,R2	;RESTORE STD ADDRESS
   3633	015100	012601 				MOV	(SP)+,R1	;RESTORE R1 (ATL NODE ADDRESS)
   3634	015102	010361 	000022 			MOV	R3,A.EF+2(R1)	;SAVE THE OVERLAY PUD ADDRESS
   3635	015106	012703 	000002 			MOV	#TS.LRQ,R3	;SET UP TO INDICATE LOAD REQUEST QUEUE'D
   3636	015112	000633 				BR	60$		;AND START TASK
   3637
   3638	015114	010401 			110$:	MOV	R4,R1		;SAVE THE NODE ADDRESS
   3639	015116	052762 	000001 	000006 		BIS	#SF.TA,S.FW(R2)	;SET TASK ACTIVE
   3640	015124	022424 				CMP	(R4)+,(R4)+
   3641	015126	010224 				MOV	R2,(R4)+	;SAVE THE ATTRIBUTES OF THIS CALL
   3642	015130	012624 				MOV	(SP)+,(R4)+
   3643	015132	012624 				MOV	(SP)+,(R4)+
   3644	015134	010302 				MOV	R3,R2		;FIND THE MRL
   3645	015136	062702 	000014 			ADD	#T.RF,R2	;POINT TO IT IN TPD
   3646	015142				120$:	CALL	..IPRI		;INSERT THIS NODE IN MRL BY PRI
	015142	004737 	042540'			JSR	PC,..IPRI
   3647	015146	005002 				CLR	R2		;DECLARE TASK ACTIVE
   3648	015150					RETURN			;RETURN TO CALLER
	015150	000207 				RTS	PC
   3649
   3650	015152	104401 			.RQESD::TRAP	DR.01		;RETURN +1
   3651	015154	104771 				TRAP	DE.07		;RETURN -7
   3652	015156	104401 				TRAP	DR.01		;RETURN+1 (CURRENTLY UNUSED)
   3653	015160	104777 				TRAP	DE.01		;RETURN -1
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 77
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3655					;
   3656					;  .FEPPU -- SUBROUTINE TO FETCH PARTITION AND PRIORITY
   3657					;
   3658					;  ENTRY CONDITIONS:
   3659					;
   3660					;	R1 -- DPB PLUS SIX -- POINTING TO FOLLOWING DATA IN PREVIOUS SPACE
   3661					;		[PARTITION NAME (FIRST HALF),
   3662					;		[PARTITION NAME (SECOND HALF),
   3663					;		[PRIORITY],
   3664					;		[UNUSED].
   3665					;
   3666					;	IT IS ASSUMED THAT THESE WORDS CAN BE FETCHED WITHOUT SEGMENT FAULT.
   3667					;
   3668					;	R2 -- STD ENTRY OF TASK TO FIT IN PARTITION
   3669					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   3670					;
   3671					;	CALLING SEQUENCE:
   3672					;
   3673					;	CALL	.FEPPU
   3674					;
   3675					;  EXIT CONDITIONS:
   3676					;
   3677					;	R1 -- ADVANCED BY 8 (4 WORDS)
   3678					;	R3 -- TPD ENTRY ADDRESS, OR ZERO (DEFAULT PARTITION)
   3679					;	R4 -- RUN PRIORITY, OR ZERO (DEFAULT PRIORITY)
   3680					;
   3681					;	REGISTERS ALTERED R1,R3,R4
   3682					;
   3683	015162				.FEPPU::MFPI	(R1)+		;PUSH 2-WORD PARTITION NAME ONTO STACK
	015162	012146 				MOV	(R1)+,-(SP)
   3684	015164					MFPI	(R1)+
	015164	012146 				MOV	(R1)+,-(SP)
   3685	015166	005003 				CLR	R3		;CLEAR R3 (TPD ADDRESS
   3686	015170	005766 	000002 			TST	2(SP)		;WAS A PARTITION NAME SPECIFIED?
   3687	015174	001423 				BEQ	20$		;NO -- RETURN WITH ZERO IN R3
   3688	015176	012703 	007126'			MOV	#.TPDBA,R3	;YES -- SET UP TO SCAN TPD FOR PARTITION
   3689	015202	020327 	007126'		10$:	CMP	R3,#.TPDBA	;END OF TPD?
   3690	015206	001425 				BEQ	X.X94		;YES -- RETURN STS=-94.
   3691	015210	162703 	000020 			SUB	#T.SZ,R3	;NO -- SET UP R3 TO EXAMINE ENTRY
   3692	015214	021366 	000002 			CMP	@R3,2(SP)	;PARTITION NAME MATCH?
   3693	015220	001370 				BNE	10$		;NO -- CHECK NEXT TPD
   3694	015222	026316 	000002 			CMP	2(R3),@SP	;MAYBE -- CHECK SECOND HALF OF NAME
   3695	015226	001365 				BNE	10$		;NO -- CHECK NEXT TPD
   3696	015230	016204 	000016 			MOV	S.TZ(R2),R4	;SET R4 TO THE NUMBER OF 32-WORD BLOCKS
   3697									;REQUIRED FOR THE TASK INDICATED BY R2.
   3698	015234	020463 	000006 			CMP	R4,T.PZ(R3)	;IS PARTITION LARG ENOUGH FOR TASK?
   3699	015240	101401 				BLOS	20$		;YES -- SET R4 PER PRIORITY SPECIFIED
   3700	015242	104775 				TRAP	DE.03		;NO -- RETURN STS=-03
   3701
   3702	015244	022626 			20$:	CMP	(SP)+,(SP)+	;REMOVE PARTITION NAME FROM STACK
   3703	015246					MFPS	(R1)+,R4	;SET R4 TO PRIORITY INDICATOR
	015246	012104 				MOV	(R1)+,R4
   3704	015250	020427 	000372 			CMP	R4,#250.	;IS PRIORITY GREATER THAN 250?
   3705	015254	101003 				BHI	X.X95		;YES -- RETURN STS=-95.
   3706	015256	005721 				TST	(R1)+		;MOVE OVER UNUSED WORD
   3707	015260					RETURN			;RETURN TO CALLER
	015260	000207 				RTS	PC
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 77-1
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3708
   3709	015262	104642 			X.X94:	TRAP	DE.94		;RETURN STS=94.
   3710	015264	104641 			X.X95:	TRAP	DE.95		;RETURN STS=95.
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 78
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3712					;
   3713					; .VCLUN -- VERIFY & CONVER LOGICAL UNIT NUMBER
   3714					;
   3715					; ENTRY CONDITIONS:
   3716					;
   3717					;	R5 -- ATL NODE ADR OF DIRECTIVE ISSUING TASK
   3718					;	TOP OF STACK -- LOGICAL UNIT NUMBER
   3719					;
   3720					; CALLING SEQUENCE:
   3721					;
   3722					;	CALL  .VCLUN
   3723					;
   3724					; EXIT CONDITIONS:
   3725					;
   3726					;	R4 -- POINTS TO FIRST LUT ENTRY
   3727					;	CC-C SET IF TASK NOT FOUND
   3728					;
   3729					;	IF LUN IS ASSIGNED TO A PHYSICAL UNIT, THE  LUN (ON TOP OF
   3730					;	STACK) IS REPLACED BY THE ADDRESS OF THE CORRESPONDING PUD
   3731					;	ENTRY.
   3732					;
   3733					;	IF AN INVALID LUN, RETURN STS-96.
   3734					;
   3735					;	IF THE LUN IS NOT ASSIGNED, IT IS REPLACED BY A ZERO.
   3736					;
   3737					;
   3738					; REGISTERS ALTERED:
   3739					;
   3740					;	NONE
   3741					;
   3742	015266	010046 			.VCLUN::MOV	R0,-(SP)	;PUSH  (SAVE) R0
   3743	015270	016600 	000004 			MOV	4(SP),R0	;LUN MINUS ONE TO R0
   3744	015274	005300 				DEC	R0
   3745
   3750	015276	016504 	000012 			MOV	A.HA(R5),R4	;POINT TO HEADER ADDRESS
   3757	015302	062704 	000130 			ADD	#H.LUT,R4
   3759
   3760	015306	020024 				CMP	R0,(R4)+	;IS LUN <1, OR >MAX FOR TASK?
   3761	015310	103013 				BHIS	X9X96		;YES -- RETURN STS=-96
   3762	015312	006300 				ASL	R0		;NO -- SET LUT CONTENTS (PER LUN) IN R0
   3763	015314	006300 				ASL	R0
   3764	015316	060400 				ADD	R4,R0
   3765	015320	011000 				MOV	@R0,R0		;(PUD ENT ADR OR ZERO IN R0)
   3766	015322	001402 				BEQ	10$		;IF ASSIGNED, EFFECT REDIRECTION (IF ANY)
   3767	015324	016000 	000016 			MOV	U.RP(R0),R0
   3768	015330				10$:
   3769	015330	010066 	000004 			MOV	R0,4(SP)	;REPLACE LUN (ON STACK) BY PUD
   3770									;ENTRY ADDRESS (OR ZERO).
   3771
   3772	015334	012600 				MOV	(SP)+,R0	;POP (RESTORE) R0
   3773	015336					RETURN			;EXIT SUBROUTINE
	015336	000207 				RTS	PC
   3774					;
   3775					; COMMON JMP'S TO DIRECTIVE EXITS
   3776					;
   3777	015340	104640 			X9X96:	TRAP	DE.96
SCH	- TASK SCHEDULER & GLOB	MACRO M1110  15-OCT-79 13:47  PAGE 79
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3779					;
   3780					;	.STAST -- SUBROUTINE TO SET AN AST IN A TASK
   3781					;
   3782					;  ENTRY CONDITONS:
   3783					;
   3784					;	R5 -- ACTIVE TASK LIST POINTER
   3785					;	R4 -- ENTRY ADDRESS
   3786					;
   3787					;	CALLING SEQUENCE:
   3788					;
   3789					;	CALL	.STAST
   3790					;
   3791					;	EXIT CONDITIONS:
   3792					;
   3793					;	CC-C CLEAR -- AST SET AND ALL OK
   3794					;	CC-C SET -- THE TASK IS CURRENT AND CAN'T SET AST
   3795					;
   3796	015342	010246 			.STAST::MOV	R2,-(SP)	;SAVE REGISTERS
   3797	015344	010346 				MOV	R3,-(SP)
   3798	015346					CALL	..DSEV		;DECLARE A SIG EVENT
	015346	004737 	042444'			JSR	PC,..DSEV
   3799	015352	012702 	000006 			MOV	#6,R2		;SET UP TO SAVE REGISTERS
   3800	015356	000241 				CLC			;ASSUME SUCCESS
   3801	015360					.INH0			;;INHIBIT INTERRUPTS
	015360	013746 	177776 			MOV	@#PS,-(SP)
	015364	112737 	000140 	177776 		MOVB	#140,@#PS
   3802	015372	020537 	001006'			CMP	R5,.CRTSK		;;CURRENT TASK?
   3803	015376	001415 				BEQ	30$		;;YES 0-- BETTER SET CARRY
   3804	015400	016503 	000004 			MOV	A.SP(R5),R3	;;SET UP A POINTER TO THE TASK'S STACK
   3805	015404	010443 				MOV	R4,-(R3)	;;SET UP NEW PC
   3809	015406	012743 	004000 			MOV	#004000,-(R3)
   3811	015412	016343 	000016 		10$:	MOV	16(R3),-(R3)	;SET UP NEW STACK SAVE
   3812	015416	077203 				SOB	R2,10$		;;CONTINUE TIL DONE
   3813	015420				20$:	.ENB0			;ENABLE INTERRUPTS
	015420	004737 	042720'			JSR	PC,..ENB0
   3814	015424	012603 				MOV	(SP)+,R3	;RESTORE
   3815	015426	012602 				MOV	(SP)+,R2
   3816	015430					RETURN			;RETURN TO CALLER
	015430	000207 				RTS	PC
   3817
   3818	015432	005216 			30$:	INC	@SP		;ENABLE INTERRUPTS
   3819	015434	152737 	000002 	001014'		BISB	#EV.AS,.SERFG+0	;SET AST REQUIRED
   3820	015442	000766 				BR	20$		;AND RETURN
   3821						.TITLE	BOOT -- BOOT PROTOCOL HANDLER
   3822	015444					IDENT$	10,10
						.IDENT	/010100/
   3823					;
   3824					;
   3825					;
   3826					;
   3827					;
   3828					;
   3829					;                             COPYRIGHT (C) 1975, 1978 BY
   3830					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3831					;
   3832					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3833					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 79-1
EXEC MODULE NINE -- COMMON RETURN TO INTERRUPTED PROGRAM

   3834					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3835					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3836					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3837					;
   3838					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3839					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3840					;       CORPORATION.
   3841					;
   3842					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3843					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3844					;
   3845					;
   3846					;
   3847					;		MODULE: "BOOT PROTOCOL HANDLER"
   3848					;
   3849					;		VERSION: 10-10
   3850					;
   3851					;		AUTHOR: R. MCLEAN
   3852					;
   3853					;		DATE: 12 OCT 76
   3854					;
   3855					;	THIS MODULE CONTAINS:
   3856					;
   3857					;	1 -- CODE TO SERVICE BOOT PROTOCOL ETC.
   3858					;
   3859					; MODIFIED:
   3860					;	NO.	DATE		PROGRAMMER	PURPOSE
   3861					;	---	----		----------	-------
   3862					;	001	12-OCT-76	R. BELANGER	CHANGED PHYSICAL EXAMINES &
   3863					;						DEPOSITS TO EPT RELATIVE
   3864					;	002	21-OCT-76	A. PECKHAM	ADDITION OF CODE TO COUNT
   3865					;						DOORBELLS.
   3866					;
   3867					;	003	04-NOV-76	R. BELANGER	ADDED CODE TO DELETE
   3868					;						ENTRIES FROM TO10Q ON
   3869					;						PRIMARY PROTOCOL RESTART.
   3870					;	004	29-NOV-76	A. PECKHAM	CHANGES TOO NUMEROUS TO MENTION.
   3871					;	005	07-MAR-77	A. PECKHAM	ADDED CHANGE TO AVOID RESETTING TO -10 Q.
   3872					;	006	21-MAR-77	A. PECKHAM	FIXED BUG IN ACKNOWLEGE
   3873					;	007	28-AUG-77	R. BELANGER	RESET POWERFAIL FLAG ON
   3874					;						PRIMARY PROTOCOL START
   3875					;	008	07-OCT-77	R. BELANGER	IGNORE COMM REGION IF SO DIRECTED BY "TKTN"
   3876					;
   3877					;	009	27-MAY-78	R. BELANGER	ADD PROTOCOL TIMEOUT
   3878					;   TCO 4.2207	08-MAR-79	R. BELANGER	FIX BUG WHICH CAN CAUSE
   3879					;						PROTOCOL PAUSE LOOPS
   3880					;	MACRO CALLS
   3881					;
   3883						.MCALL	CALL,RETURN,.STKM,CLEF$S,WTSE$S,QIOW$,DTON$S,.CRASH
   3884						.MCALL	WSIG$S,.ENB0,.INH6,.ENB6,$DEF
   3885	015444					$DEF
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 80
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   3888						.SBTTL	SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE
   3889					;
   3890					;	BTPRO -- ROUTINE TO HANDLE THE PROTOCOL TRANSITION INTO
   3891					;	SECONDARY PROTOCOL.
   3892					;	IT IS ASSUMED THAT THIS PROTOCOL WILL BE USED
   3893					;	DURING INITALIZATION AND IN CASE OF MONITOR CRASHED ETC
   3894					;	WHEN THE NORMAL MEANS OF COMMUNICATIONS THRU THE COMM REGION ARE DESTROYED
   3895					;
   3896					;	"EF.CRI" INDICATES THAT THE FRONT-END BELEIVES THE COMM-REGION TO BE
   3897					;	INVALID.  THIS BIT IS SET ON POWERFAIL AND BY "KLI" ON A KL RELOAD.
   3898					;	IF THE COMM REGION INVALID FLAG IS NOT SET, THE TRANSITION INTO SECONDARY
   3899					;	PROTOCOL IS TIMED-OUT FOR 30 SECONDS.  IF NO TRANSITION IS MADE WITHIN
   3900					;	THAT PERIOD, THE KL IS RELOADED.
   3901					;
   3902					;	NOTE -- IF THE COMM-REGION IS FOUND TO BE VALID DURING A NORMAL PROTOCOL
   3903					;		TRANSITION, PRIMARY PROTOCOL IS IS IMMEDIATELY RE-ENTERED.
   3904					;
   3905					;	IF SUCCESS IN COMMUNICATION WITH THE KL IT WILL ENTER SECONDARY
   3906					;	PROTOCOL (OR RE-ENTER PRIMARY PROTOCOL)
   3907					;
   3908
   3909	015444				BTPHD::
   3910	015444					.STKM	0,1,2,3,4,5,0,BTPRO,174000,.BTSTK
	015512	000000 	000000 	000000 		.WORD	0,0,0,0
	015520	000000
	015540	174000 	015744'	015724'		.WORD	174000,BTPRO,.BTSTK
	015574	000005 				.WORD	5
	015576	007606'				.WORD	TTPEN
	015600	000000 				.WORD	0
	015602	000000 				.WORD	0
	015604	000000 				.WORD	0
	015606	000000 				.WORD	0
	015610	000000 				.WORD	0
	015612	000000 				.WORD	0
	015614	000000 				.WORD	0
	015616	000000 				.WORD	0
	015620	000000 				.WORD	0
	015622	000000 				.WORD	0
	015724	000000 				.WORD	0
	015726	000001 				.WORD	1
	015730	000002 				.WORD	2
	015732	000003 				.WORD	3
	015734	000004 				.WORD	4
	015736	000005 				.WORD	5
	015740	015744'				.WORD	BTPRO
	015742	174000 				.WORD	174000
   3911
   3912	015744				BTPRO:
   3913	015744	105037 	001370'			CLRB	.PRPSE		; RESET THE PAUSE FLAG
   3914	015750					WTSE$S	#E.FPR2		;WAIT FOR ACTIVATION.
	015750	012746 	000076 			MOV	#E.FPR2,-(SP)
	015754	012746 				MOV	(PC)+,-(SP)
	015756	   051 	   002 			.BYTE	41.,2
	015760	104375 				EMT	375
   3915	015762	052737 	100000 	006746'		BIS	#BIT15,FETSK+A.EF ;SET SECONDARY PROTOCOL FLAG FOR FETSK
   3916	015770	013700 	001152'			MOV	.TKPS,R0	; +++009 TICKS PER SECOND TO R0
   3917	015774	012701 	000036 			MOV	#^D30,R1	; +++009 30. SECONDS
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 80-1
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   3918	016000					CALL	$MUL		; +++009 CALCULATE PAUSE PERIOD
	016000	004737 	000000G			JSR	PC,$MUL
   3919	016004	010104 				MOV	R1,R4		; +++009 SAVE IT IN R4
   3920	016006	013700 	001360'			MOV	.PRDTE,R0	;FIND ADDRESS OF PRIVILEDGED DTE
   3921	016012	013705 	001356'			MOV	.PRSTA,R5
   3922	016016	012715 	000010 			MOV	#INTROF,@R5	;CLEAR THE STATUS
   3923	016022	000405 				BR	20$		;GO LOOK FOR CHANGE TO BOOT PROTOCOL
   3924						;
   3925	016024				10$:
   3926	016024					.ENB6			;;;ENABLE INTERRUPTS
	016024	012637 	177776 			MOV	(SP)+,@#PS
   3927	016030					WSIG$S			;WAIT FOR SIG EVENT
	016030	012746 				MOV	(PC)+,-(SP)
	016032	   061 	   001 			.BYTE	49.,1
	016034	104375 				EMT	375
   3928	016036				20$:
   3929	016036					.INH6			;INHIBIT INTERRUPTS
	016036	013746 	177776 			MOV	@#PS,-(SP)
	016042	112737 	000300 	177776 		MOVB	#300,@#PS
   3930	016050	032737 	002000 	001012'		BIT	#EF.CRI,.COMEF+2 ;;; +++008 IS THE COMM REGION VALID??
   3931	016056	001020 				BNE	30$		;;; +++008 NO -- GO ON
   3932	016060	112737 	177777 	001370'		MOVB	#-1,.PRPSE	;;; +++009 MARK THAT  WE ARE PAUSING
   3933	016066	005060 	000010 			CLR	TNAD1(R0)	;;; MAYBE -- LOOK FOR PROTOCOL CHANGE
   3934	016072	005060 	000012 			CLR	TNAD2(R0)	;;;BY TESTING RELATIVE ADDR WORD
   3935	016076					CALL	WFED		;;;WAIT FOR EXAMINE
	016076	004737 	045016'			JSR	PC,WFED
   3936	016102	103453 				BCS	47$		;;;KL HAS BEEN LOST..
   3937	016104	005760 	000002 			TST	DXWD3(R0)	;;;IF NON-ZERO
   3938	016110	001403 				BEQ	30$		;;;THEN EXAMINE VALID, SO
   3939	016112	010702 				MOV	PC,R2		;;; +++006 SAY NO ACKNOWLEGE NEEDED
   3940	016114	000137 	017046'			JMP	120$		;;; +++005 RETURN TO PRIMARY PROTOCOL.
   3941						;
   3942	016120				30$:
   3943	016120	032715 	000010 			BIT	#RM,@R5		;;;PRIVILEDGED DTE?
   3944	016124	001337 				BNE	10$		;;;NO -- CONTINUE WAITING FOR PRIMARY
   3945	016126	032760 	004000 	000030 		BIT	#DS04,DAG1(R0)	;;;CHECK FOR CLOCK ERROR STOP
   3946	016134	001171 				BNE	86$		;;;YES -- STOP PROTOCOL
   3947	016136	032715 	004000 			BIT	#TO11DB,@R5	;;;WAIT OR A DOORBELL INTERRUPT
   3948	016142	001021 				BNE	40$		;;; +++009 GOT ONE -- PROCESS IT
   3949	016144	032737 	002000 	001012'		BIT	#EF.CRI,.COMEF+2 ;;; +++009 IS THIS A PAUSE??
   3950	016152	001324 				BNE	10$		;;; +++009 YES -- WAIT FOR SECONDARY PROTOCOL
   3951	016154	077455 				SOB	R4,10$		;;; +++009 NO -- DID WE TIME OUT??
   3952	016156	105237 	001124'			INCB	.TKTN		;;; +++009 YES -- SAY GOODNIGHT....
   3953	016162	105237 	001122'			INCB	.NOERR		;;; +++009 DON'T CARE ABOUT ERRORS NOW
   3954	016166	052737 	000200 	001126'		BIS	#KS.PTO,.KLITK	;;; +++009 FLAG PROTOCOL TIMEOUT
   3955	016174					CALL	..DTSP		;;; [TCO 4.2207] STOP ALL PROTOCOLS
	016174	004737 	045450'			JSR	PC,..DTSP
   3956	016200					.ENB6			;;; +++009 ALLOW INTERRUPTS
	016200	012637 	177776 			MOV	(SP)+,@#PS
   3957	016204	000657 				BR	BTPRO		; +++009 AND GO BACK TO SLEEP
   3958						;
   3959	016206				40$:
   3960	016206	005237 	001362'			INC	.PRDCT		;;; +002 ONE MORE DOORBELL....
   3961	016212	012760 	004000 	000010 		MOV	#PRTOFF!EPTR,TNAD1(R0) ;;; +001 PROTECT OFF
   3962	016220	012760 	000451 	000012 		MOV	#DTECMD,TNAD2(R0) ;;;READ THE COMMAND PASSED
   3963	016226					CALL	WFED		;;;WAIT FOR EXAMINE DEPOSIT
	016226	004737 	045016'			JSR	PC,WFED
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 80-2
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   3964	016232				47$:
   3965	016232	103534 				BCS	87$
   3966	016234	012715 	002000 			MOV	#INT11C,@R5	;;;ALLOW MORE DOORBEL INTERRUPTS
   3967	016240	122760 	000011 	000003 		CMPB	#11,DXWD3+1(R0)	;;;LOOK AT THE COMMAND WORD
   3968	016246	001266 				BNE	10$		;;;NOT WHAT WE WANT...
   3969					;
   3970					;	CHANGE PROTOCOL TO SECONDARY (FUNCTION 11)
   3971					;
   3972	016250				50$:
   3973	016250	105037 	001370'			CLRB	.PRPSE		;;; +++009 RESET PAUSE FLAG
   3974	016254	012760 	177777 	000002 		MOV	#-1,DXWD3(R0)	;;;ACKNOWLEDGE THE COMMAND
   3975	016262	052760 	014000 	000010 		BIS	#DEP!EPTR!PRTOFF,TNAD1(R0) ;;; +001 SET DEPOSIT IN TEN MEMORY FLAG
   3976	016270	012760 	000444 	000012 		MOV	#DTEFLG,TNAD2(R0) ;;;START TRANSFER TO DTE FLAG WORD
   3977	016276					CALL	WFED		;;;WAIT FOR EXAMINE DEPOSIT
	016276	004737 	045016'			JSR	PC,WFED
   3978	016302	103510 				BCS	87$		;;;TEN STOPPED
   3979	016304	012715 	000400 			MOV	#TO10DB,@R5	;;;SET 10'S DOORBELL
   3980	016310	005037 	001160'			CLR	.BTSCH		;;;CLEAR ANY SAVED CHARACTERS
   3981					;
   3982					;	AT THIS POINT WE ARE OFFICIALLY IN SECONDARY PROTOCOL
   3983					;
   3984					;	THIS IS THE MAIN COMMAND LOOP WHICH PROCESSES THE SECONDARY
   3985					;	PROTOCOL COMMANDS AND PASSES CTY CHARACTERS TO THE -10.
   3986					;
   3987	016314				60$:
   3988	016314					.ENB6			;;;ENABLE INTERRUPTS
	016314	012637 	177776 			MOV	(SP)+,@#PS
   3989	016320					WSIG$S			;WAIT FOR SIG EVENT
	016320	012746 				MOV	(PC)+,-(SP)
	016322	   061 	   001 			.BYTE	49.,1
	016324	104375 				EMT	375
   3990	016326					.INH6			;INHIBIT INTERRUPTS
	016326	013746 	177776 			MOV	@#PS,-(SP)
	016332	112737 	000300 	177776 		MOVB	#300,@#PS
   3991	016340	032715 	004000 			BIT	#TO11DB,@R5	;;;WAIT FOR ANOTHER DOORBELL
   3992	016344	001073 				BNE	90$		;;;FOUND IT -- CHECK THE COMMAND
   3993	016346	032760 	004000 	000030 		BIT	#DS04,DAG1(R0)	;;;CHECK FOR CLOCK ERROR STOP
   3994	016354	001061 				BNE	86$		;;;YES -- STOP PROTOCOL
   3995	016356				70$:
   3996	016356	113701 	001160'			MOVB	.BTSCH,R1	;;;CHECK FOR CTY CHARACTER
   3997	016362	001754 				BEQ	60$
   3998					;
   3999					;	TRANSFER CTY CHARACTER TO -10
   4000					;
   4001	016364				80$:
   4002	016364	012760 	004000 	000010 		MOV	#PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET PROTECT OFF
   4003	016372	012760 	000456 	000012 		MOV	#DTEMTI,TNAD2(R0) ;;;PICK UP THE INPUT BUSY FLAG
   4004	016400				81$:
   4005	016400					CALL	WFED		;;;WAIT FOR EXAMINE DEPOSIT
	016400	004737 	045016'			JSR	PC,WFED
   4006	016404	103447 				BCS	87$		;;;TEN STOPPED
   4007	016406	005760 	000004 			TST	DXWD2(R0)
   4008	016412	001340 				BNE	60$		;;;TEN CAN'T ACCEPT ANOTHER CHARACTER YET
   4009	016414	042701 	177600 			BIC	#^C177,R1	;;;MASK OFF JUNK
   4010	016420	010160 	000002 			MOV	R1,DXWD3(R0)	;;;PUT THE WORD IN THE DTE
   4011	016424	005060 	000004 			CLR	DXWD2(R0)
   4012	016430	005060 	000006 			CLR	DXWD1(R0)
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 80-3
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4013	016434	012760 	014000 	000010 		MOV	#DEP!PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET DEP!PRTOFF!EPTR DEPOSIT FLAG
   4014	016442	012760 	000450 	000012 		MOV	#DTEF11,TNAD2(R0) ;;;STORE THE CHARACTER IN THE 10
   4015	016450					CALL	WFED		;;;WAIT FOR EXAMINE/DEPOSIT
	016450	004737 	045016'			JSR	PC,WFED
   4016	016454	103423 				BCS	87$		;;;TEN STOPPED
   4017	016456	105037 	001160'			CLRB	.BTSCH		;;;CHARACTER HAS NOW BEEN SENT
   4018	016462	012760 	177777 	000002 		MOV	#-1,DXWD3(R0)	;;;SET CHARACTER IN BUFFER FLAG
   4019	016470	012760 	014000 	000010 		MOV	#DEP!PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET DEP!PRTOFF!EPTR DEPOSIT FLAG
   4020	016476	012760 	000456 	000012 		MOV	#DTEMTI,TNAD2(R0) ;;;TRANSFER TO 10 MEMORY
   4021	016504					CALL	WFED		;;;WAIT FOR TRANSFER
	016504	004737 	045016'			JSR	PC,WFED
   4022	016510	103405 				BCS	87$		;;;TEN STOPPED
   4023	016512	012715 	000400 			MOV	#TO10DB,@R5	;;;SET THE 10'S DOORBELL
   4024	016516	000676 				BR	60$		;;;CONTINUE POLLING
   4025					;
   4026					;	AN ERROR ON EXAMINE / DEPOSIT TURNS OFF BOOT PROTOCOL
   4027					;
   4028	016520				86$:
   4029	016520					CALL	WFED		;;;RECOGNIZE ERROR, THEN
	016520	004737 	045016'			JSR	PC,WFED
   4030	016524				87$:
   4031	016524					.ENB0			;;; +++006 ENABLE INTERRUPTS
	016524	004737 	042720'			JSR	PC,..ENB0
   4032	016530	000137 	015744'			JMP	BTPRO		;AND GO TO WAIT FOR REACTIVATION.
   4033					;
   4034					;	RECIEVE A COMMAND FROM THE -10
   4035					;
   4036	016534				90$:
   4037	016534	005237 	001362'			INC	.PRDCT		;;; +002 ONE MORE DOORBELL...
   4038	016540	012760 	004000 	000010 		MOV	#PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET PROTECT OFF
   4039	016546	012760 	000451 	000012 		MOV	#DTECMD,TNAD2(R0) ;;;READ THE COMMAND WORD
   4040	016554					CALL	WFED		;;;WAIT FOR EXAMINE DEPOSIT
	016554	004737 	045016'			JSR	PC,WFED
   4041	016560	012715 	002000 			MOV	#INT11C,@R5	;;;WARNING !!!!!DON'T MOVE THIS INSTRUCTION!!!!!!!
   4042									;;;DOORBELL MUST NOT BE CLEARED BEFORE THE
   4043									;;;10 FINISHES THE SET DOORBELL!!!!!!
   4044									;;;IT IS GUARANTEED TO BE SAFE AFTER WFED
   4045	016564	103757 				BCS	87$		;;;TEN STOPPED
   4046	016566	122760 	000012 	000003 		CMPB	#12,DXWD3+1(R0)	;;;MONITOR MODE CONTROL OFF?
   4047	016574	001443 				BEQ	100$		;;;YES -- RE-ENTER RSX20F
   4048	016576	122760 	000011 	000003 		CMPB	#11,DXWD3+1(R0)	;;;MONITOR MODE CONTROL ON?
   4049	016604	001003 				BNE	95$		;;;NO -- MUST BE CTY CHARACTER
   4050	016606	012715 	002000 			MOV	#INT11C,@R5	;;;ALLOW MORE DOORBELLS AND
   4051	016612	000616 				BR	50$		;;;ACKNOWLEDGE THE COMMAND.
   4052					;
   4053					;	OUTPUT A CHARACTER TO THE CTY (FUNCTION 10)
   4054					;
   4055	016614				95$:
   4056	016614	116037 	000002 	017174'		MOVB	DXWD3(R0),QPROAD ;;;OUTPUT A CHARACTER
   4057	016622					.ENB6			;;;ENABLE INTERRUPTS
	016622	012637 	177776 			MOV	(SP)+,@#PS
   4058	016626					DIR$	#QPROMS		;OUTPUT CHARACTER
	016626	012746 	017152'			MOV	#QPROMS,-(SP)
	016632	104375 				EMT	375
   4059	016634					.INH6			;INHIBIT INTERRUPTS
	016634	013746 	177776 			MOV	@#PS,-(SP)
	016640	112737 	000300 	177776 		MOVB	#300,@#PS
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 80-4
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4060	016646	012760 	177777 	000002 		MOV	#-1,DXWD3(R0)	;;;ACKNOWLEDGE CHARACTER OUTPUT
   4061	016654	012760 	014000 	000010 		MOV	#DEP!PRTOFF!EPTR,TNAD1(R0) ;;; +001 SET DEPOSIT
   4062	016662	012760 	000455 	000012 		MOV	#DTEMTD,TNAD2(R0) ;;;START TRANSFER TO INDICATE CHARACTER OUTPUT
   4063	016670					CALL	WFED		;;;WAIT FOR EXAMINE DEPOSIT
	016670	004737 	045016'			JSR	PC,WFED
   4064	016674	103713 				BCS	87$		;;;WHOOPS !
   4065	016676	012715 	000400 			MOV	#TO10DB,@R5	;;;CLEAR THE 11 DOORBELL AND SET THE 10'S DOORBELL
   4066	016702	000625 				BR	70$		;;;CONTINUE POLLING
   4067					;
   4068					;	CHANGE PROTOCOL TO PRIMARY (FUNCTION 12)
   4069					;
   4070	016704				100$:
   4071	016704	005002 				CLR	R2		;;; +++006 NEED ACKNOWLEGE
   4072	016706	042737 	006000 	001012'		BIC	#EF.PFR!EF.CRI,.COMEF+2 ;;; +++007 GUARD AGAINST SPURIOUS POWERFAIL
   4073									;;; +++008 DECLARE COMM REGION VALID
   4074	016714	032760 	000001 	000002 		BIT	#1,DXWD3(R0)	;;;CHECK FOR RE-INIT
   4075	016722	001451 				BEQ	120$		;;; +++006 NO
   4076	016724				110$:
   4077	016724	010046 				MOV	R0,-(SP)
   4078	016726				113$:
   4079	016726	013704 	001326'			MOV	TO10Q,R4	;;; +003 Q LISTHEAD TO R4
   4080	016732	022704 	001326'			CMP	#TO10Q,R4	;;; +003 DONE?
   4081	016736	001416 				BEQ	112$		;;; +003 YES -- LEAVE
   4082	016740					CALL	..NDEL		;;; +003 NO -- REMOVE THIS ENTRY FROM Q
	016740	004737 	042500'			JSR	PC,..NDEL
   4083	016744	005764 	000012 			TST	12(R4)		;;; +003 TEST INDIRECT INDICATOR
   4084	016750	003003 				BGT	111$		;;; +003 NOT INDIRECT -- GO ON
   4085	016752	056474 	000024 	000026 		BIS	24(R4),@26(R4)	;;; +003 INDIRECT -- DECLARE XFER COMPLETE
   4086	016760				111$:
   4087	016760	010400 				MOV	R4,R0		;;; +003 SET UP TO
   4088	016762	016001 	000004 			MOV	4(R0),R1	;;; +003 RETURN CORE BLOCK
   4089	016766					CALL	..DECB		;;; +003 RETURN IT
	016766	004737 	043166'			JSR	PC,..DECB
   4090	016772	000755 				BR	113$		;;; +003 DO NEXT ENTRY IN Q
   4091						;
   4092	016774				112$:
   4093	016774	005037 	001324'			CLR	TO10QC		;;; +003 DONE -- CLEAR CURRENT COUNTS
   4094	017000	005037 	001252'			CLR	.CPDV		;;; CLEAR CURRENT TO-10 DEVICE
   4095	017004	013700 	001260'			MOV	.CRHD,R0	;;; GET CURRENT NODE
   4096	017010	062700 	000010 			ADD	#10,R0		;;; POINT TO DATA AREA
   4097	017014	010037 	001256'			MOV	R0,.CRPB	;;; AND SET BUFFER POINTER.
   4098	017020	005060 	177776 			CLR	-2(R0)		;;; CLEAR ENTRY COUNT
   4099	017024	016000 	177774 			MOV	-4(R0),R0	;;; GET LENGTH OF NODE
   4100	017030	162700 	000012 			SUB	#10.,R0		;;; ADJUST,
   4101	017034	010037 	001254'			MOV	R0,.CRSZ	;;; AND SET BUFFER SIZE.
   4102	017040	005037 	001246'			CLR	.CRQZ		;;; NOTHING ENTERED YET.
   4103	017044	012600 				MOV	(SP)+,R0
   4104	017046				120$:				;;; +++005
   4105	017046					CLEF$S	#E.FPR2		;;;TURN SECONDARY PROTOCOL OFF
	017046	012746 	000076 			MOV	#E.FPR2,-(SP)
	017052	012746 				MOV	(PC)+,-(SP)
	017054	   037 	   002 			.BYTE	31.,2
	017056	104375 				EMT	375
   4106	017060					DTON$S			;;;ENABLE DTE20
	017060	012746 	000003 			MOV	#DF.ON,-(SP)
	017064	012746 	001011 			MOV	#400*2.+DR.DTE,-(SP)
	017070	104375 				EMT	375
BOOT -- BOOT PROTOCOL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 80-5
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4107	017072	103614 				BCS	87$		;;; +++006 LOST COMM REGION
   4108	017074	005702 				TST	R2		; +++006 ACKNOWLEGE??
   4109	017076	001013 				BNE	130$		; +++006 NO -- GO ON
   4110	017100	012760 	177777 	000002 		MOV	#-1,DXWD3(R0)	;;; +++006 ACK THE COMMAND
   4111	017106	012760 	014000 	000010 		MOV	#DEP!EPTR!PRTOFF,TNAD1(R0) ;;; +++001 SET DEPOSIT
   4112	017114	012760 	000444 	000012 		MOV	#DTEFLG,TNAD2(R0)  ;;;  +++006 START IT
   4113	017122					CALL	WFED		;  +++006 WAIT FOR IT
	017122	004737 	045016'			JSR	PC,WFED
   4114	017126				130$:				;;;  +++006
   4115	017126	012715 	000440 			MOV	#INTRON!TO10DB,@R5 ;;;ENABLE INTERRUPTS
   4116	017132					.ENB0			;;;ENABLE INTERRUPTS
	017132	004737 	042720'			JSR	PC,..ENB0
   4117	017136	005237 	001162'			INC	.ACKAL		;SEND ACK ALL
   4118	017142	005037 	005242'			CLR	.FEACT		;FE IS NOW AVAILABLE
   4119	017146	000137 	015744'			JMP	BTPRO		;WAIT FOR PROTOCOL REACTIVICATION.
   4120						;
   4121	017152				QPROMS:
   4122	017152					QIOW$	IO.WLB,1,2,0,0,0,<QPROAD,1,0>
	017152	   003 	   011 			.BYTE	3,$$$ARG
	017154	000400 				.WORD	IO.WLB
	017156	000001 				.WORD	1
	017160	   002 	   000 			.BYTE	2,0
	017162	000000 				.WORD	0
	017164	000000 				.WORD	0
	017166	017174'				.WORD	QPROAD
	017170	000001 				.WORD	1
	017172	000000 				.WORD	0
   4123	017174				QPROAD:
   4124	017174	000000 				.WORD	0
PF -- POWER FAIL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 81
SECONDARY PROTOCOL -- BOOT PROTOCOL SERVICE

   4126						.TITLE	PF -- POWER FAIL HANDLER
   4127	017176					IDENT$	13,36
						.IDENT	/013360/
   4128					;
   4129					;                             COPYRIGHT (C) 1975, 1978 BY
   4130					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4131					;
   4132					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4133					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4134					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4135					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4136					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4137					;
   4138					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4139					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4140					;       CORPORATION.
   4141					;
   4142					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4143					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4144					;
   4145					;		MODULE: "POWER FAIL"
   4146					;
   4147					;		VERSION: 13-36
   4148					;
   4149					;		AUTHOR: R. MCLEAN
   4150					;
   4151					;		DATE: 19 JUL 75
   4152					;
   4153					;
   4154					;	THIS MODULE CONTAINS:
   4155					;
   4156					;	1 -- CODE TO SUPPORT POWER FAIL
   4157					;
   4158					; MODIFICATIONS:
   4159					;
   4160					;	NO.	DATE		PROGRAMMER	REASON
   4161					;	---	----		----------	------
   4162					;	001	10-AUG-77	R. BELANGER	WAIT FOR KL CROBAR TO
   4163					;						SETTLE ON POWER RESTART
   4164					;	002	18-AUG-77	R. BELANGER	FLAG POWER RESTART
   4165					;  TCO 4.2205	08-MAR-79	R. BELANGER	RESET SENADALL DATABASE
   4166					;						ON POWER UP
   4167					;  TCO 4.2249	09-MAY-79	R. BELANGER	ALLOW POWER FAIL RECOVERY
   4168					;						TO COMPLETE BEFORE NOTIFYING KL10
   4169					;						MODIFY PARITY REGISTER INITIALIZATION
   4170					;						NOT NOT ALTER CPU PRIORITY ON TRAP
   4171
   4173						.MCALL	CALL,$DEF,.CRASH
   4174	017176					$DEF
PF -- POWER FAIL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 82
POWERFAIL -- POWER DOWN

   4177						.SBTTL	POWERFAIL -- POWER DOWN
   4178					;
   4179					;	POWER FAILURE AND RECOVERY SERVICE
   4180					;
   4181					;	WHEN A POWER FAILURE TRAP OCCURS, THE VOLATILE REGISTERS
   4182					;	ARE SAVED AND THE TRAP VEECTOR FOR POWER UP IS SET.
   4183					;
   4184					;	IF POWER FAIL INTERRUPTS A PRI 7 (I/O INITALIZE OR DTE
   4185					;	EXAMINE/DEPOSIT) THEN .PFAIL IS SET AND RTI
   4186					;	IS EXECUTED.  ROUTINES WHICH BREAK DOWN FROM PRI7
   4187					;	MUST CHECK TO SEE IF .PFAIL IS SET AND JUMP TO
   4188					;	.PFRTN -- THIS WILL ALLOW THEM TO FINISH AND
   4189					;	STILL PROTECT POWERFAIL FROM FAILING
   4190					;
   4191					;
   4192					;	NOTE: POWERFAIL TRAP CANNOT BE INHIBITED.
   4193					;	POWER FAIL TRAP SERVICE CAN NOT USE ROUTINES THAT INHIBIT
   4194					;	INTERRUPTS TO AVOID RACE CONDITIONS
   4195					;
   4196					;	NOTE: ALL MEMORY IS ASSUMED TO BE NON-VOLATILE (IT CANNOT BE
   4197					;	SAVED IN THE TIME PERMITTED FOR POWER FAIL SAVE)
   4198					;
   4199					;	POWER DOWN ENTRY -- CONTROL IS TRANSFERRED HERE (VIA POWER
   4200					;	FAIL TRAP VECTOR) AT PRIORITY SEVEN.
   4201					;
   4202	017176				.PWRDN::
   4203	017176	052737 	006000 	001012'		BIS	#EF.PFR!EF.CRI,.COMEF+2 ; +++002 ALWAYS FLAG POWER FAIL (ALWAYS!)
   4204	017204	016646 	000002 			MOV	2(SP),-(SP)	;FIND THE PS
   4205	017210	042716 	177437 			BIC	#177437,@SP	;MASK OFF ALL BUT PRI
   4206	017214	022726 	000340 			CMP	#340,(SP)+	;IS IT PRI 7?
   4207	017220	001005 				BNE	10$		;NO -- THEN ACCEPT POWER FAIL
   4208	017222	005237 	001026'			INC	.PFAIL		;SET POWER FAIL ERROR
   4209	017226	105237 	001014'			INCB	.SERFG+0	; +++001 LEST WE FORGET...
   4210	017232	000006 				RTT			;RETURN TO CALLER
   4211
   4212	017234	013746 	000006 		10$:	MOV	@#6,-(SP)	;SAVE LOW CORE
   4213	017240	013746 	000004 			MOV	@#4,-(SP)
   4214	017244	012737 	017320'	000004 		MOV	#20$,@#4	;SET UP TO HALT IF FAKE POWER FAIL
   4215	017252	012737 	000340 	000006 		MOV	#340,@#6	;SET PRIORITY 7 IN ODD ADDRESS TRAP ADDRESS
   4216	017260	005737 	173000 			TST	.BM873		;IF NOT POWER FAIL THIS WILL TRAP TO 4
   4217	017264	010046 				MOV	R0,-(SP)	;SAVE REGISTERS
   4218	017266	010146 				MOV	R1,-(SP)
   4219	017270	010246 				MOV	R2,-(SP)
   4220	017272	010346 				MOV	R3,-(SP)
   4221	017274	010446 				MOV	R4,-(SP)
   4222	017276	010546 				MOV	R5,-(SP)
   4223	017300	010637 	001032'			MOV	SP,PWRXSP	;SAVE STACK REGISTER
   4224	017304	012737 	017322'	000024 		MOV	#PWR.UP,@#24	;SET UP POWER UP TRAP VECTOR ADDRESS
   4225	017312	012737 	000006 	001034'		MOV	#6,CROBAR	; +++001 SET UP CROBAR COUNTER
   4226	017320	000000 			20$:	HALT
PF -- POWER FAIL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 83
POWERFAIL -- POWER UP ENTRY

   4228						.SBTTL	POWERFAIL -- POWER UP ENTRY
   4229
   4230					;
   4231					;
   4232					;	POWER UP ENTRY
   4233					;
   4234	017322				PWR.UP::
   4235	017322	013706 	001032'			MOV	PWRXSP,SP	;RESTORE STACK POINTER
   4236	017326	012737 	017322'	000004 		MOV	#PWR.UP,@#4	; +++001 MAKE BUS TIMEOUT TRAP TO "PWR.UP"
   4237	017334	012737 	004340 	000006 		MOV	#4340,@#6
   4238	017342	005337 	001034'			DEC	CROBAR		; +++001 COUNT THIS ATTEMPT
   4239	017346	003003 				BGT	10$		; +++001 ALL OK IF STILL .GT. 0
   4240	017350					.CRASH	CBR		; +++001 CRASH IF MORE THAN ONE MINUTE
	017350	000004 				IOT
	017352	   103 	   102 	   122 		.ASCIZ	/CBR/
	017355	   000
   4241						;
   4242	017356				10$:
   4243	017356	013701 	001360'			MOV	.PRDTE,R1	; +++001 ADDRESS OF DTE20 TO R1
   4244	017362					CALL	20$		; +++001 WAIT FOR KL CROBAR
	017362	004737 	017502'			JSR	PC,20$
   4245	017366					CALL	20$		; +++001 AND BE DAMN SURE OF IT
	017366	004737 	017502'			JSR	PC,20$
   4246	017372	012761 	000100 	000032 		MOV	#DRESET,DAG2(R1) ; +++001 RESET THE DTE20
   4247	017400	005037 	001026'			CLR	.PFAIL		;CLEAR POWER FAIL FLAG
   4248	017404	012737 	177777 	001030'		MOV	#-1,.PFIOW	;SET POWER FAIL BITS TO INTERRUPT ROUTINES
   4249	017412	012605 				MOV	(SP)+,R5	;RESTORE REGISTERS
   4250	017414	012604 				MOV	(SP)+,R4
   4251	017416	012603 				MOV	(SP)+,R3
   4252	017420	012602 				MOV	(SP)+,R2
   4253	017422	012601 				MOV	(SP)+,R1
   4254	017424	012600 				MOV	(SP)+,R0
   4255	017426	012637 	000004 			MOV	(SP)+,@#4	;RESTORE LOW CORE
   4256	017432	012637 	000006 			MOV	(SP)+,@#6
   4257	017436	012737 	017176'	000024 		MOV	#.PWRDN,@#24	;SET UP POWER DOWN TRAP AGAIN
   4258	017444	052737 	000100 	001126'		BIS	#KS.PFT,.KLITK	;FORCE POWER RESTART
   4259	017452	012737 	000401 	001122'		MOV	#401,.NOERR	;SET NO ERROR OR HALT
   4260	017460					CALL	..DTSP		;TURN OFF PROTOCOL TASKS
	017460	004737 	045450'			JSR	PC,..DTSP
   4261	017464	105237 	001124'			INCB	.TKTN		;TASK TERMINATION REQUEST
   4262	017470	152737 	000200 	001014'		BISB	#EV.PF,.SERFG+0	;INDICATE POWER FAIL & SIG EVENT
   4263	017476	000137 	014244'			JMP	..INTX		;RETURN TO INTERRUPTED ROUTINE
   4264						;
   4265	017502				20$:				; +++001
   4266	017502	012700 	000454 			MOV	#^D<5*60>,R0	; +++001 WAIT FOR CROWBAR TO SETTLE (5 SECONDS)
   4267	017506				30$:				; +++001
   4268	017506	105737 	177546 			TSTB	@#LKS		; +++001 CHECK WITH CLOCK
   4269	017512	100375 				BPL	30$		; +++001 WAIT FOR TICK
   4270	017514	105037 	177546 			CLRB	@#LKS		; +++001 CLEAR CLOCK FLAG
   4271	017520	077006 				SOB	R0,30$		; +++001 WAIT THE FULL COUNT
   4272	017522	005777 	161630 			TST	@.PRSTA		; +++001 LOOK AT DTE20 STATUS REGISTER
   4273									; +++001 IF NOT THERE (CROBAR TRUE) TRAP
   4274									; +++001 TO "PWR.UP", ELSE GO ON
   4275	017526					RETURN			; +++001 MADE IT -- RETURN
	017526	000207 				RTS	PC
PF -- POWER FAIL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 84
POWERFAIL -- POWER FAIL RESTART

   4277						.SBTTL	POWERFAIL -- POWER FAIL RESTART
   4278
   4279					;	.PFAIL INDICATES POWER FAIL IN PROGRESS
   4280					;	.PFIOW IS BIT ENCODED TO INDICATE POWER FAIL
   4281					;	OCCURED AND POWER UP RECOVERY IS NECESSARY
   4282
   4283	017530				.PFRST::
   4284	017530	013746 	000004 			MOV	@#4,-(SP)	; SAVE ABSOLUTE 4 (NEXM STOP)
   4285	017534	010046 				MOV	R0,-(SP)	; SAVE REGISTERS
   4286	017536	010146 				MOV	R1,-(SP)
   4287	017540	010246 				MOV	R2,-(SP)
   4288	017542	010346 				MOV	R3,-(SP)
   4289	017544	010446 				MOV	R4,-(SP)
   4290	017546	010546 				MOV	R5,-(SP)
   4291	017550	012737 	177777 	001030'		MOV	#-1,.PFIOW	; INDICATE POWER/FAIL TTY ENABLE
   4292	017556	012702 	002604'			MOV	#.SNDLP,R2	; [TCO 4.2205] INIT SENDALL POINTER
   4293	017562	012703 	000004 			MOV	#4,R3		; [TCO 4.2205] INIT SENDALL COUNTER
   4294	017566	005022 				CLR	(R2)+		; [TCO 4.2205] CLEAR SENDALL INDEX
   4295	017570				10$:
   4296	017570	005062 	000010 			CLR	10(R2)		; [TCO 4.2205] CLEAR SENDALL COUNT
   4297	017574	012200 				MOV	(R2)+,R0	; [TCO 4.2205] GET BUFFER POINTER
   4298	017576	001402 				BEQ	20$		; [TCO 4.2205] GO ON IF NULL
   4299	017600					CALL	..DECN		; [TCO 4.2205] DEALLOCATE THE BUFFER
	017600	004737 	043162'			JSR	PC,..DECN
   4300	017604				20$:
   4301	017604	077307 				SOB	R3,10$		; [TCO 4.2205] LOOP THROUGH ALL 4 NODES
   4302	017606					CALL	.DHTMO		; [TCO 4.2205] DO TIMEOUT
	017606	004737 	040712'			JSR	PC,.DHTMO
   4303	017612					CALL	.DLTMO
	017612	004737 	040442'			JSR	PC,.DLTMO
   4304	017616	005237 	005570'			INC	.LPPFL
   4305	017622	005237 	005262'			INC	.CRPFL
   4306	017626	005037 	002600'			CLR	.ABCNT
   4307	017632	005037 	002602'			CLR	.ABFLG
   4308	017636	105037 	001370'			CLRB	.PRPSE
   4309	017642	005037 	001030'			CLR	.PFIOW		; CLEAR POWER FAIL FLAG
   4310	017646	012704 	000020 			MOV	#16.,R4		; SET UP TO RESTORE PARITY ERROR REGISTERS
   4311	017652	012705 	172100 			MOV	#.PARRG,R5	; SET UP THE ADDRESS OF THE REGISTERS
   4312	017656	012737 	017736'	000004 		MOV	#PARLOT,@#4	; [TCO 4.2249] SET UP 4 TO TRAP TO "PARLOT"
   4313
   4314						.ENABL	LSB
   4315
   4316	017664				PARLOA:
   4317	017664	012725 	000001 			MOV	#1,(R5)+	; [TCO 4.2249] ENABLE PARITY CHECKING
   4318	017670				10$:
   4319	017670	077403 				SOB	R4,PARLOA	; [TCO 4.2249] LOOP THROUGH ALL REGISTERS
   4320	017672	012605 				MOV	(SP)+,R5	; [TCO 4.2249] DONE -- RESTORE REGISTERS
   4321	017674	012604 				MOV	(SP)+,R4
   4322	017676	012603 				MOV	(SP)+,R3
   4323	017700	012602 				MOV	(SP)+,R2
   4324	017702	012601 				MOV	(SP)+,R1
   4325	017704	012600 				MOV	(SP)+,R0
   4326	017706	012637 	000004 			MOV	(SP)+,@#4	; [TCO 4.2249] RESTORE LOW CORE
   4327	017712	042737 	004000 	001012'		BIC	#EF.PFR,.COMEF+2 ; [TCO 4.2249] CLEAR POWERFAIL IN PROGRESS FLAG
   4328	017720	012737 	000100 	177546 		MOV	#.INTEN,@#LKS	; [TCO 4.2249] ENABLE CLOCK
   4330	017726	012777 	000400 	161422 		MOV	#TO10DB,@.PRSTA	; [TCO 4.2249] RING THE DOORBELL TO TELL 10 WE ARE HERE AND READY
   4332	017734					RETURN			; [TCO 4.2249] RETURN TO CALLER
PF -- POWER FAIL HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 84-1
POWERFAIL -- POWER FAIL RESTART

	017734	000207 				RTS	PC
   4333					;
   4334					; HERE ON A TRAP FROM A NON-EXISTENT PARITY REGISTER
   4335					;
   4336	017736				PARLOT:
   4337	017736	032626 				BIT	(SP)+,(SP)+	; [TCO 4.2249] FLUSH THE TRAP PS/PC
   4338	017740	000753 				BR	10$		; [TCO 4.2249] AND CONTINUE THROUGH ALL REGISTERS
   4339						;
   4340
   4341						.DSABL	LSB
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 85
POWERFAIL -- POWER FAIL RESTART

   4343						.TITLE	DMDTE	- DTE DIRECTIVES MODULE
   4344	017742					IDENT$	12,4
						.IDENT	/012040/
   4345					;
   4346					;                             COPYRIGHT (C) 1975, 1978 BY
   4347					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4348					;
   4349					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4350					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4351					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4352					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4353					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4354					;
   4355					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4356					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4357					;       CORPORATION.
   4358					;
   4359					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4360					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4361					;
   4362					;		MODULE: "DTE20" DIRECTIVE
   4363					;
   4364					;		VERSION: 07-03
   4365					;
   4366					;		AUTHOR: R. MCLEAN
   4367					;
   4368					;		DATE: 19 MAR 75
   4369					;
   4370					;
   4371					;	THIS MODULE CONTAINS:
   4372					;
   4373					;	1 --  CODE TO SERVICE THE DTE20 EMT SERVICE
   4374					;
   4375					; MODIFICATIONS:
   4376					;
   4377					;	NO.	DATE		PROGRAMMER	PURPOSE
   4378					;	---	----		----------	-------
   4379					;	001	14-MAR-77	R. BELANGER	CONDITIONALLY REMOVE UNUSED
   4380					;						DTE-20 EMT SERVICES
   4381					;	002	01-APR-77	A. PECKHAM	FIX BUG IN "$DTEON"
   4382					;	003	18-AUG-77	R. BELANGER	FIX "$DTEON" TO RETURN CORRECT STATUS
   4383					;						AND NOT START PRIMARY PROTOCOL IF
   4384					;						"SWFED" FAILS.
   4385					;	004	21-FEB-78	R. BELANGER	FIX "$DTEON" TO SET UP
   4386					;						"PROTBL" PROPERLY.
   4387					;   TCO 4.2107	06-DEC-78	R. BELANGER	INITIALIZE KEEP-ALIVE DATA-BASE
   4388					;						IN "$DTEON".
   4389					;
   4390					;	MACRO CALLS
   4391
   4392						.MCALL	CALL,RETURN,MFPI,MTPI,MFPS,MTPS,.CRASH,.INH,.ENB,$DEF
   4393
   4394	017742					$DEF
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 86
DTE20 EMT DISPATCH DECODER

   4396						.SBTTL	DTE20 EMT DISPATCH DECODER
   4397					;
   4398					;	CALLED BY EMT DISPATCH
   4399					;	THIS ROUTINE DECODES THE SPECIFIC DTE FUNCTION CODE
   4400					;	AND DISPATCHES TO THE CORRECT FUNCTION
   4401					;
   4402					;	ENTRY CONDITIONS:
   4403					;
   4404					;	R1 -- ADDRESS OF DPB
   4405					;	R2 -- SIZE OF DPB
   4406					;	R3 -- DIRECTIVE IDENTIFICATION CODE
   4407					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   4408					;
   4409					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4410					;
   4411					;	R0,R1,R2,R3,R4,R5
   4412					;
   4413					;	REGISTERS FOR USER AND DOES NOT REQUIRE EMT SERVICE
   4414					;	ROUTINES TO SAVE EMT'S REGISTERS.
   4415					;
   4416					;	EXIT TO DTE EMT SERVICE ROUTINE CONDITIONS:
   4417					;
   4418					;	3(SP) -- FUNCTION CODE PLUS HIGH ORDER BYTE OF SECOND WORD  OF DPB
   4419					;	R0 -- POINTER TO EXAMINE/DEPOSIT ADDRESSES
   4420					;	R1 -- WORD 5 OF DPB
   4421					;	R2 -- WORD 3 OF DPB
   4422					;	R3 -- WORD 4 OF DPB
   4423					;	R4 -- ADDRESS OF DPB
   4424					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   4425					;
   4426					;
   4427					;
   4428	017742	005046 			.D.DTE::CLR	-(SP)
   4429	017744	005046 				CLR	-(SP)
   4430	017746	010146 				MOV	R1,-(SP)	;SAVE POINTER TO DPB FOR R4
   4431	017750					MFPS	(R1)+,R0	;PUT THE FUNCTION CODE IN R0
	017750	012100 				MOV	(R1)+,R0
   4432	017752	150066 	000002 			BISB	R0,2(SP)
   4433	017756	105000 				CLRB	R0
   4434	017760	010066 	000004 			MOV	R0,4(SP)
   4435	017764	010204 				MOV	R2,R4		;SAVE SIZE OF DPB
   4436	017766	005046 				CLR	-(SP)		;SET DEFAULT PROCESSOR NUMBER
   4437	017770	162704 	000002 			SUB	#2,R4		;CHECK COUNT OF PARAMETERS
   4438	017774	001406 				BEQ	10$		;IF ZERO REGISTERS DON'T NEED BE SET UP (NO PARAMS)
   4439	017776					MFPS	(R1)+,R2	;MOVE THE CPU ADDRESS
	017776	012102 				MOV	(R1)+,R2
   4440	020000					MFPS	(R1)+,R3	;MOVE IN OFFSET ADDRESS TO COMM AREA
	020000	012103 				MOV	(R1)+,R3
   4441	020002	162704 	000002 			SUB	#2,R4		;CHECK TO SEE IF CPU PARAMETER
   4442	020006	001401 				BEQ	10$		;NO -- DON'T ATTEMPT TO SET REGISTER
   4443	020010					MFPS	(R1)+,@SP	;YES -- SET CPU NUMBER
	020010	012116 				MOV	(R1)+,@SP
   4444	020012	012601 			10$:	MOV	(SP)+,R1	;SET CPU NUMBER
   4445	020014	012604 				MOV	(SP)+,R4
   4446	020016					CALL	FNDCPU		;FIND DTE20 BLOCK
	020016	004737 	021160'			JSR	PC,FNDCPU
   4447	020022	006316 				ASL	@SP		;MULTIPLY FUNCTION CODE BY 2 TO FORM OFFSET
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 86-1
DTE20 EMT DISPATCH DECODER

   4448	020024	062716 	020034'			ADD	#DTEDSP-2,@SP	;POINT INTO DISPATCH TABLE
   4449	020030	017616 	000000 			MOV	@(SP),@SP
   4450	020034	000136 				JMP	@(SP)+		;GO TO ROUTINE AND REMOVE ELEMENTFROM STACK
   4451					;
   4452					;
   4453	020036	020074'			DTEDSP:	.WORD	$DORBL		;RING DORBELL (FUNCTION CODE 1)
   4454	020040	020076'				.WORD	$DTEOF		;TURN OFF DTE20 (FUNCTION CODE 2)
   4455	020042	020110'				.WORD	$DTEON		;TURN ON DTE20 (FUNCTION CODE 3)
   4456	020044	020512'				.WORD	$DPMYG		;DEPOSIT MY GENERAL SECTION (FUNCTION CODE 4)
   4457	020046	020550'				.WORD	$EXMYG		;EXAMINE MY GENERAL SECTION (FUNCTION CODE 5)
   4458	020050	020560'				.WORD	$EXMYN		;EXAMINE MY SECTION FOR CPU N (FUNCTION CODE 6)
   4459	020052	020566'				.WORD	$DPMYN		;DEPOSIT MY SECTION FOR CPU N (FUNCTION CODE 7)
   4460	020054	020574'				.WORD	$EXHSG		;EXAMINE HIS GENERAL COMM (FUNCTION CODE 10)
   4461	020056	020602'				.WORD	$EXHSM		;EXAMINE HIS SECTION FOR ME (FUNCTION CODE 11)
   4462	020060	020610'				.WORD	$KLDFR		;START KL10 DIAGNOSTIC FUNCTION READ
   4463	020062	020746'				.WORD	$KLDFW		;START KL10 DIAGNOSTIC FUNCTION WRITE
   4464	020064	020722'				.WORD	$KLDFX		;START KL10 DIAGNOSTIC FUNCTION (FUNCTION CODE 12)
   4465	020066	021046'				.WORD	$PRVEX		;PRIVILEDGED EXAMINE (FUNCTION 13)
   4466	020070	021104'				.WORD	$PRVDP		;PRIVILEDGED DEPOSIT (FUNCTION 14)
   4467	020072	021126'				.WORD	$RWDRG		;READ/WRITE DIAGNOSTIC REGISTER (FUNCTION 15)
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 87
$DORBL -- RING THE KL-10 DOORBELL

   4469						.SBTTL	$DORBL -- RING THE KL-10 DOORBELL
   4470					;
   4471					;+
   4472					;
   4473					;	$DORBL -- RING THE DOORBELL
   4474					;	OF THE KL-10 SPECIFIED
   4475					;
   4476					;
   4477					;	ENTRY CONDITIONS:
   4478					;
   4479					;	R1 -- CPU NUMBER OF THE DTE TO RING THE DOORBELL
   4480					;	CALL	$DORBL
   4481					;
   4482					;	EXIT CONDITIONS:
   4483					;
   4484					;	CC-C CLEAR TO INDICATE SUCCESS
   4485					;
   4486					;	R0 -- STATUS -- +1 DOORBELL RUNG
   4487					;			+2 DOORBELL ALREADY RUNG (HAS NOT RESPONDED FROM LAST RING)
   4488					;
   4489					;
   4490					;	ERROR CONDITIONS:
   4491					;
   4492					;	CC-C SET
   4493					;
   4494					;	R0  -- -1 ILLEGAL CPU NUMBER
   4495					;	R0  -- -2 E BOX STOPPED
   4496					;	R0  -- -3 SECONDARY PROTOCOL IN USE
   4497					;
   4498					;
   4499					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4500					;
   4501					;-
   4502	020074				$DORBL::
   4519
   4520	020074	104635 				TRAP	DE.99		; +++001 THIS ISN'T HERE
   4521					;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 88
$DTEOF -- TURN THE DTE20 OFF

   4524						.SBTTL	$DTEOF -- TURN THE DTE20 OFF
   4525					;
   4526					;+
   4527					;
   4528					;	$DTEOF -- TURN OFF THE DTE20
   4529					;
   4530					;	CALLING SEQUENCE:
   4531					;	ENTRY CONDITIONS:
   4532					;
   4533					;
   4534					;	CALL	$DTEOF
   4535					;
   4536					;	EXIT CONDITIONS:
   4537					;
   4538					;	R0 --1 TO INDICATE SUCCESS
   4539					;	CC-C CLEAR TO INDICATE SUCCESS
   4540					;
   4541					;
   4542					;	ERROR CONDITIONS: NONE
   4543					;
   4544					;
   4545					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4546					;
   4547					;-
   4548					;
   4549	020076				$DTEOF::
   4550		000000 			.REPT 0
   4551						MOV	#16.,R0		;TURN OFF ALL DTE'S
   4552						MOV	#PROTBL,R2	;FIND THE TABLE
   4553					10$:	TST	@R2		;IS THERE A DTE HERE?
   4554						BEQ	20$		;NO -- FORGET IT
   4555						MOV	@R1,R3		;FIND THE ADDRESS OF THE DTE
   4556						MOV	#INTROF,STATD(R3) ;SET THE STATSUS TO INTERRUPT OFF
   4557					20$:	ADD	#5*2,R1		;LOOK AT THE NEXT ENTRY IN THE TABLE
   4558						SOB	R0,10$		;END OF TABLE?
   4559					.ENDR; END .REPT 0
   4560	020076					CALL	..DTSP		;+ TURN OFF PROTOCOLS AND
	020076	004737 	045450'			JSR	PC,..DTSP
   4561	020102					CALL	..DTP2		;+ START UP SECONDARY PROTOCOL.
	020102	004737 	045466'			JSR	PC,..DTP2
   4562	020106	104401 				TRAP	DR.01		;RETURN STATUS OK
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 89
$DTEON -- TURN THE DTE20 ON

   4564						.SBTTL	$DTEON -- TURN THE DTE20 ON
   4565					;
   4566					;+
   4567					;
   4568					;	$DTEON -- TURN ON THE DTE20
   4569					;	THIS ROUTINE WILL SET UP THE TABLES NECESSARY TO
   4570					;	INITALIZE THE COMMUNICATON BETWEEN THE PDP10 AND PDP11'S
   4571					;
   4572					;
   4573					;	ENTRY CONDITIONS:
   4574					;
   4575					;
   4576					;	CALL	$DTEON
   4577					;
   4578					;	EXIT CONDITIONS:
   4579					;
   4580					;	R0 --1 TO INDICATE SUCCESS
   4581					;	CC-C CLEAR TO INDICATE SUCCESS
   4582					;
   4583					;
   4584					;	ERROR CONDITIONS:
   4585					;
   4586					;	R0 -2 -- E BOX STOPPED
   4587					;	CC-C SET
   4588					;
   4589					;
   4590					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4591					;
   4592					;-
   4593					;
   4594	020110				$DTEON::
   4595	020110	010546 				MOV	R5,-(SP)
   4596	020112	013700 	001360'			MOV	.PRDTE,R0	;FIND THE COMMON DTE20
   4597	020116	005001 				CLR	R1		;;;SET UP TO FIND PROCESSOR NUMBER
   4598	020120	005002 				CLR	R2		;;;START TRANSFER OF ABS WORD 0 OF EPT (MY PROCESSOR NUMBER
   4599	020122	012703 	001346'			MOV	#DEXTM3,R3	;;;SET UP ADDRESS TO STORE WORDS
   4600	020126					CALL	SWFED		;;;WAIT FOR EXAMINE/DEPOSIT
	020126	004737 	045350'			JSR	PC,SWFED
   4601	020132	103417 				BCS	1$		;;;E BOX STOP
   4602	020134	011304 				MOV	@R3,R4		;;;YES --FIND OFFSET TO MY R/W AREA
   4603	020136	113702 	001351'			MOVB	@#DEXTM2+1,R2	;;;FIND THE PROCESSOR NUMBER
   4604									;;; PROCESSOR NUMBER TO LOW ORDER BITS
   4605	020142	042702 	177760 			BIC	#177760,R2	;;;MASK OFF JUNK(0.-15. LEGAL)
   4606	020146	010237 	001230'			MOV	R2,PRMEMN	;;;SAVE PROCESSOR NUMBER
   4607	020152	005202 				INC	R2		;;;FIND COMMUNICATIONS VIRTUAL 2
   4608	020154	010237 	001226'			MOV	R2,COMBSE	;;;SAVE BASE OF COMMUNICATIONS AREA
   4609	020160	060402 				ADD	R4,R2		;;;ADD OFFSET TO BASE OF COMM AREA
   4610	020162	010237 	001232'			MOV	R2,DEPOF	;;;SET CORRECT OFFSETT
   4611	020166					CALL	SWFED		;;;WAIT FOR TRANSFER
	020166	004737 	045350'			JSR	PC,SWFED
   4612	020172				1$:
   4613	020172	103544 				BCS	80$		;;; +++003
   4614	020174				2$:
   4615	020174	013705 	001350'			MOV	@#DEXTM2,R5	;;;PICK UP THE NUMBER OF 8 TM BLOCKS
   4616	020200	042705 	177770 			BIC	#177770,R5	;;;FIND THE NUMBER OF 8 WORD BLOCKS IN MY AREA
   4617	020204	162705 	000002 			SUB	#2,R5		;;;ACCOUNT FOR MY GENERAL SECTION
   4618	020210	010246 				MOV	R2,-(SP)
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 89-1
$DTEON -- TURN THE DTE20 ON

   4619	020212	010546 				MOV	R5,-(SP)	;;;SAVE COUNT OF BLOCKS
   4620	020214				16$:
   4621									;;; +++002
   4622	020214	062766 	000020 	000002 		ADD	#FORPRO,2(SP)	;;;LOOK AT A COMMUNICATIONS AREA TO ANOTHER PROCESSOR
   4623	020222	016602 	000002 			MOV	2(SP),R2
   4624	020226					CALL	SWFED		;;;WAIT FOR TRANSFER
	020226	004737 	045350'			JSR	PC,SWFED
   4625	020232	103524 				BCS	80$		;;; +++003 E BOX STOPPED
   4626	020234	011304 				MOV	@R3,R4		;;;FIND PROCESSOR NUMBER
   4627	020236	012705 	001234'			MOV	#PROTBL,R5	;SET INITIAL POINTER
   4628	020242	042704 	177770 			BIC	#177770,R4	;;;MASK OFF JUNK
   4629
   4636
   4637	020246				19$:
   4638	020246	013704 	001350'			MOV	@#DEXTM2,R4	;;;FIND NUMBER OF 8 WORD BLOCS
   4639	020252	042704 	177770 			BIC	#177770,R4	;;;MASK OFF POSSIBLE GARBAGE
   4640	020256	160416 				SUB	R4,@SP		;;;UPDATE COUNT OF BLOCKS
   4641	020260	005015 				CLR	@R5		;;;SET UP TO CLEAR TABLE IF NO DTE
   4642	020262	013704 	001352'			MOV	@#DEXTM1,R4	;;;PICK UP DTE NUMBER
   4643	020266	032704 	000004 			BIT	#4,R4		;;;DTE HERE?
   4644	020272	001423 				BEQ	20$		;;;NO -- DON'T ENTER IN TABLE
   4645	020274	000304 				SWAB	R4		;;;MAKE MOD 40 (8)
   4646	020276	006004 				ROR	R4
   4647	020300	006004 				ROR	R4
   4648	020302	006004 				ROR	R4
   4649	020304	042704 	177637 			BIC	#177637,R4	;;;MASKOFF JUNK
   4650	020310	062704 	174400 			ADD	#174400,R4	;;;POINT TO FIRST BLOCK OF DTE'S
   4651	020314	020437 	001360'			CMP	R4,.PRDTE	;;;PRIMARY DTE?
   4652	020320	001002 				BNE	10$		;;;NO -- DON'T SET TABLE POINTER
   4653	020322	010537 	001354'			MOV	R5,.PRADR	;;;SAVE TABLE OFFSET
   4654	020326				10$:
   4655	020326	010415 				MOV	R4,@R5		;;;SET DTE ADDRESS IN TABLE
   4656	020330	012714 	037777 			MOV	#37777,@R4	 ;;;SET UP DELAY COUNTER
   4657	020334	012764 	000040 	000034 		MOV	#INTRON,STATD(R4) ;;;YES -- ENABLE INTERRUPT ON IT
   4658	020342				20$:
   4659	020342	010265 	000002 			MOV	R2,EMYN(R5) 	;;;SET THE ADDRESS OF EXAMINE MY AREA FOR N
   4660									;;;MAKE ADDRESS OF THE ADDRESS OF DEPOSIT MY AREA FOR N
   4661	020346	010265 	000004 			MOV	R2,DMYN(R5) 	;;;STORE IT
   4662	020352	163765 	001232'	000004 		SUB	DEPOF,DMYN(R5) 	;;;RESTORE ADDRESS FOR EXAMINE OF THIS BLOCK
   4663	020360	062702 	000001 			ADD	#PROPNT-FORPRO,R2 ;;;READ POINTER TO HIS COMM AREA
   4664	020364					CALL	SWFED		;;;WAIT FOR EXAMINE/DEPOSIT
	020364	004737 	045350'			JSR	PC,SWFED
   4665	020370	103445 				BCS	80$		;;; +++003 E BOX STOPPED
   4666	020372	011302 				MOV	@R3,R2		;;;FIND THE EXAMINE ADDRESS
   4667	020374	063702 	001226'			ADD	COMBSE,R2	;;;ADD OFFSET TO COMMON AREA
   4668	020400	010265 	000006 			MOV	R2,EHSG(R5) 	;;;SET EHSG ADDRESS IN TABLE
   4669	020404	062702 	000020 			ADD	#FORPRO,R2	;;;POINT TO HIS FIRST TABLE FOR OTHER PROCESSORS
   4670	020410				50$:
   4671	020410					CALL	SWFED		;;;WAIT FOR EXAMINE/DEPOSIT
	020410	004737 	045350'			JSR	PC,SWFED
   4672	020414	103433 				BCS	80$		;;; +++003
   4673	020416	123713 	001230'			CMPB	PRMEMN,@R3 	;;;SAME PROCESSOR NUMBER?
   4674	020422	001411 				BEQ	60$		;;;YES -- FOUND MY ENTRY
   4675	020424	013704 	001350'			MOV	@#DEXTM2,R4	;;;NO -- FIND NEXT ENTRY IN LIST
   4676	020430	042704 	177770 			BIC	#177770,R4	;;;IT IS IN 8 WORD INCREMENTS
   4677	020434	006304 				ASL	R4		;;;SO IT MUST BE SHIFTED LEFT 3 BITS
   4678	020436	006304 				ASL	R4		;;;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 89-2
$DTEON -- TURN THE DTE20 ON

   4679	020440	006304 				ASL	R4		;;;
   4680	020442	060402 				ADD	R4,R2		;;;READ NEXT BLOCK
   4681	020444	000761 				BR	50$		;;;AND TRY AGAIN
   4682						;
   4683	020446				60$:
   4684	020446	010265 	000010 			MOV	R2,EHSM(R5)	;;;STORE EHSM ADDRESS
   4685	020452	011605 				MOV	@SP,R5		;;;DONE ALL BLOCKS??
   4686	020454	101257 				BHI	16$		;;; +++002 NO -- TRY NEXT BLOCK
   4687	020456				70$:
   4688	020456	112737 	000005 	001410'		MOVB	#.KALSC,.KPAC+0	;;; [TCO 4.2107] INIT KEEP-ALIVE TIMER
   4689	020464	112737 	000001 	001411'		MOVB	#1,.KPAC+1	;;; [TCO 4.2107] AND RETRY COUNTER
   4690	020472	013737 	001372'	001400'		MOV	KPAL0,OKPAL0	;;; [TCO 4.2107] INIT LAST KEEP ALIVE COUNT
   4691	020500					CALL	..DTP1		;;;START THE PRIMARY PROTOCOL TASK
	020500	004737 	045520'			JSR	PC,..DTP1
   4692	020504				80$:				;;; +++003
   4693	020504	012605 				MOV	(SP)+,R5	;;; +++003 RESTORE R5
   4694	020506	000137 	013072'			JMP	.DR.NS		;RETURN STATUS IN R0
   4695						;
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 90
$DPMYG -- DEPOSIT INTO MY GENERAL SECTION

   4697						.SBTTL	$DPMYG -- DEPOSIT INTO MY GENERAL SECTION
   4698					;+
   4699					;
   4700					;	$DPMYG -- DEPOSIT INTO MY GENERAL SECTION
   4701					;	WITH PROCESSOR N
   4702					;
   4703					;	ENTRY CONDITIONS:
   4704					;
   4705					;	R2 -- ADDRESS OF PDP-10 LOCATION TO TRANSFER  RELATIVE TO MY GEN REGION
   4706					;	R3 -- ADDRESS OF PDP-11 CORE ADDRESS TO WRITE FROM
   4707					;	$DPMYG
   4708					;
   4709					;	EXIT CONDITIONS:
   4710					;
   4711					;	R0 -- +1 TRANSFER COMPLETED
   4712					;	CC-C CLEAR -- TRANSFER COMPLETED
   4713					;
   4714					;	ERROR CONDITIONS:
   4715					;
   4716					;	CC-C SET
   4717					;
   4718					;	R0 -2  -- E BOX STOPPED
   4719					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   4720					;
   4721					;
   4722					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4723					;-
   4724					;
   4725					;
   4726	020512	005001 			$DPMYG::CLR	R1
   4727	020514	052701 	010000 		DPCMN:	BIS	#DEP,R1		;;;SET DEPOSIT BIT IN ADDRESS WORD
   4728	020520	032737 	040000 	001012'	CMEDP:	BIT	#EF.PR1,.COMEF+2 ;;;PRIMARY PROTOCOL RUNNING?
   4729	020526	001407 				BEQ	DPMSEP		;;;NO -- ERROR
   4730	020530	005004 				CLR	R4		;;;NON PRIV EXAMINE
   4731	020532	011000 				MOV	@R0,R0		;;;FIND DTE20 ADDRESS
   4732	020534					CALL	SWFED		;;;WAIT FOR EXAMINE/DEPOSIT
	020534	004737 	045350'			JSR	PC,SWFED
   4733	020540	103401 				BCS	DPSEC		;;;ERROR -2
   4734	020542	104401 				TRAP	DR.01
   4735					;
   4736	020544	104776 			DPSEC:	TRAP	DE.02		;E BOX STOPPED
   4737					;
   4738	020546	104775 			DPMSEP:	TRAP	DE.03		;SECONDARY PROTOCOLIN USE
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 91
$EXMYG -- EXAMINE MY GENERAL SECTION

   4740						.SBTTL	$EXMYG -- EXAMINE MY GENERAL SECTION
   4741					;+
   4742					;
   4743					;	$EXMYG -- EXAMINE MY (PDP-11) GENERAL SECTION
   4744					;
   4745					;	ENTRY CONDITIONS:
   4746					;
   4747					;	R2 -- ADDRESS OF A PDP10 ADDRESS TO EXAMINE RELATIVE TO THE BASE OF MY GENERAL SECTION
   4748					;	R3 -- ADDRESS OF THE THREE WORDD BLOCK TO TRANSFER TO
   4749					;	$EXMYG
   4750					;
   4751					;	EXIT CONDITIONS:
   4752					;
   4753					;	R0 -- +1 SUCCESS
   4754					;	CC-C CLEAR -- SUCCESS
   4755					;
   4756					;	ERROR CONDITIONS:
   4757					;
   4758					;	CC-C SET
   4759					;
   4760					;	R0 -2 -- E BOX STOPPED
   4761					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   4762					;
   4763					;
   4764					;
   4765					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4766					;-
   4767					;
   4768	020550	063702 	001232'		$EXMYG::ADD	DEPOF,R2	;ADD DEPOSIT OFFSET TO EXAMINE ADDRESS
   4769	020554	005001 			EXCMN:	CLR	R1		;;;CLEAR HIGH ORDER 10 ADDRESS (FORCES EXAMINE)
   4770	020556	000760 				BR	CMEDP
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 92
$EXMYN -- EXAMINE MY SECTION FOR PROCESSOR N

   4772						.SBTTL	$EXMYN -- EXAMINE MY SECTION FOR PROCESSOR N
   4773					;+
   4774					;
   4775					;	$EXMYN -- EXAMINE MY SECTION FOR COMMUNICATING WITH PROCESSOR N
   4776					;
   4777					;	ENTRY CONDITIONS:
   4778					;
   4779					;	R1 -- CPU NUMBER
   4780					;	R2 -- ADDRESS WORD WITHIN REGION TO EXAMINE
   4781					;	R3 -- PDP-11 CORE ADDRESS
   4782					;	$EXMYN
   4783					;
   4784					;	EXIT CONDITIONS:
   4785					;
   4786					;	R0 -- +1 - SUCCESS
   4787					;	CC-C CLEAR -- SUCCESS
   4788					;
   4789					;	ERROR CONDITIONS:
   4790					;
   4791					;	CC-C SET
   4792					;	R0 -1 -- ILLEGAL CPU NUMBER
   4793					;	R0 -2 -- E BOX STOPPED
   4794					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   4795					;
   4796					;
   4797					;
   4798					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4799					;-
   4800					;
   4801	020560	066002 	000002 		$EXMYN::ADD	EMYN(R0),R2	;SET CALCULATED ADDRESS TO COMM AREA
   4802	020564	000773 				BR	EXCMN		;GO TO COMMON AREA
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 93
$DPMYN -- DEPOSIT INTO MY SECTION FOR COMM WITH PROCESSOR N

   4804						.SBTTL	$DPMYN -- DEPOSIT INTO MY SECTION FOR COMM WITH PROCESSOR N
   4805					;+
   4806					;
   4807					;	$DPMYN --  DEPOSET INTO MY SECTION FOR COMMUNICATING WITH PROCESSOR N
   4808					;
   4809					;	ENTRY CONDITIONS:
   4810					;
   4811					;	R1 -- CPU NUMBER
   4812					;	R2 -- ADDRESS WORD WITHIN REGION TO DEPOSIT
   4813					;	R3 -- ADDRESS IN PDP-11 TO TRANSFER FROM
   4814					;	$DPMYN
   4815					;
   4816					;	EXIT CONDITIONS:
   4817					;
   4818					;	R0 -- +1 -SUCCESS
   4819					;	CC-C CLEAR - SUCCESS
   4820					;
   4821					;	ERROR CONDITIONS:
   4822					;
   4823					;	CC-C SET
   4824					;	R0 -1 -- ILLEGAL CPU NUMBER
   4825					;	R0 -2 -- E BOX STOPPED
   4826					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   4827					;
   4828					;
   4829					;
   4830					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4831					;-
   4832					;
   4833	020566	066002 	000004 		$DPMYN::ADD	DMYN(R0),R2	;FIND CORRECT ADDRESS IN COMMON AREA
   4834	020572	000750 				BR	DPCMN		;DEPOSIT IN COMMON AREA
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 94
$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION

   4836						.SBTTL	$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION
   4837					;+
   4838					;
   4839					;	$EXHSG -- EXAMINE HIS GENERAL COMMUNICATION SECTION
   4840					;
   4841					;	ENTRY CONDITIONS:
   4842					;
   4843					;	R1 -- CPU NUMBER
   4844					;	R2 -- WORD NUMBER IN HIS GENERAL SECTION
   4845					;	R3 -- ADDRESS TO STORE EXAMINE
   4846					;	$EXHSG
   4847					;
   4848					;	EXIT CONDITIONS:
   4849					;
   4850					;	R0 -- +1 - SUCCESS
   4851					;	CC-C CLEAR - SUCCESS
   4852					;
   4853					;	ERROR CONDITIONS:
   4854					;
   4855					;	R0 -1 -- ILLEGAL CPU NUMBER
   4856					;	R0 -2 -- EBOX STOPPED
   4857					;	R0 -3  -- SECONDARY PROTOCOL IN USE
   4858					;
   4859					;
   4860					;	CC-C SET
   4861					;
   4862					;
   4863					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4864					;-
   4865					;
   4866					;
   4867	020574	066002 	000006 		$EXHSG::ADD	EHSG(R0),R2	;FIND OFFSET TO COMMUNICATIONS AREA
   4868	020600	000765 				BR	EXCMN		;GO TO COMMON EXAMINE
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 95
$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME

   4870						.SBTTL	$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME
   4871					;+
   4872					;
   4873					;	$EXHSM -- EXAMINE HIS SECTION FOR COMMUNICATING WITH ME
   4874					;
   4875					;	ENTRY CONDITIONS:
   4876					;
   4877					;	R1 -- CPU NUMBER
   4878					;	R2 -- ADDRESS OF WORD WITHIN REGION TO EXAMINE
   4879					;	R3 -- ADDRESS TO STORE PDP-10 WORD
   4880					;	$EXHSM
   4881					;
   4882					;	EXIT CONDITIONS:
   4883					;
   4884					;	R0 -- +1 - SUCCESS
   4885					;	CC-C CLEAR - SUCCESS
   4886					;
   4887					;	ERROR CONDITIONS:
   4888					;
   4889					;	CC-C SET
   4890					;	R0 -1 -- ILLEGAL CPU NUMBER
   4891					;	R0 -2 -- E BOX STOPPED
   4892					;	R0 -3 -- SECONDARY PROTOCOL IN USE
   4893					;
   4894					;
   4895					;
   4896					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4897					;-
   4898					;
   4899	020602	066002 	000010 		$EXHSM::ADD	EHSM(R0),R2	;FIND OFFSET INTO COMM AREA
   4900	020606	000762 				BR	EXCMN		;GO TO EXAMINE
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 96
$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION

   4902						.SBTTL	$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION
   4903					;
   4904					;+
   4905					;
   4906					;	$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION
   4907					;	THIS FUNCTION WILL LOAD AND READ THE EBUS.
   4908					;	IT DOES A DATA SEND OPERATION IF IT IS A WRITE FUNCTION
   4909					;	AND IT ALWAYS RETURNS THE STATUS OF THE DIAGNOSTIC REGISTERS
   4910					;	AND EBUS (DEXWD1-3) AFTER EACH FUNCTION.
   4911					;
   4912					;	ENTRY CONDITIONS:
   4913					;
   4914					;	R0 -- FUNCTION TO BE EXECUTED (BITS 15-9)
   4915					;	R0 -- IF BIT 8 IS SET IT IS A LOAD FUNCTION
   4916					;	R1 -- DTE20 NUMBER (CURRENT UNUSED)
   4917					;	R3 -- ADDRESS OF FOUR WORD BLOCK TO STORE DIAG1-3
   4918					;	R2 -- PDP11 6 WORD BLOCK THE FIRST 3 WORDS ARE
   4919					;	USED TO STORE THE CONTENTS IN THE E BUS THE SECOND 3 WORDS
   4920					;	ARE USED TO STORE THE RESULTS OF THE DIAGNOSTIC FUNCTION E BUS
   4921					;	CALL	$KLDFX
   4922					;
   4923					;	EXIT CONDITIONS
   4924					;
   4925					;	CC-C CLEAR
   4926					;	R0 -- +1 -- SUCCESS
   4927					;
   4928					;	ERROR CONDITIONS:
   4929					;
   4930					;	-2 -- FUNCTION FAILED
   4931					;
   4932					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   4933					;
   4934					;-
   4935					;
   4936	020610				$KLDFR:	CALL	FNDDTE		;FIND DTE20
	020610	004737 	021212'			JSR	PC,FNDDTE
   4937	020614	012600 				MOV	(SP)+,R0	;RESTORE FUNCTION
   4938	020616					CALL	CESCHK		;RESET DTE-20 IF CLOCK ERROR STOP
	020616	004737 	021244'			JSR	PC,CESCHK
   4939	020622	042700 	000777 			BIC	#777,R0		;MASK OFF FUNCTION CODE
   4940	020626	052700 	000211 			BIS	#DIKL10!DCOMST!DFUNC,R0 ;SET DIAGNOSTIC FUNCTION START BITS
   4941	020632	062702 	000006 			ADD	#6,R2		;DON'T DO THE E BUS WRITE
   4942	020636	010061 	000030 		KLCST:	MOV	R0,DAG1(R1)	;START FUNCTION
   4943	020642	012737 	003000 	001344'		MOV	#3000,DEXST	;TIME OUT FUNCTION
   4944	020650	032761 	000001 	000030 	10$:	BIT	#DCOMST,DAG1(R1) ;WAIT FOR THE FUNCTION TO COMPLETE
   4945	020656	001404 				BEQ	22$
   4946	020660	005337 	001344'			DEC	DEXST		;COUNT DOWN
   4947	020664	100371 				BPL	10$
   4948	020666	104776 				TRAP	DE.02		;TRAP ERROR
   4949					;
   4950	020670				22$:	MTPS	DXWD3(R1),(R2)+	;STORE THE FOUND WORD IN PDP11
	020670	016122 	000002 			MOV	DXWD3(R1),(R2)+
   4951	020674					MTPS	DXWD2(R1),(R2)+
	020674	016122 	000004 			MOV	DXWD2(R1),(R2)+
   4952	020700					MTPS	DXWD1(R1),(R2)+
	020700	016122 	000006 			MOV	DXWD1(R1),(R2)+
   4953	020704	005703 				TST	R3		;ANYWHERE TO STORE?
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 96-1
$KLDFX -- EXECUTE A DIAGNOSTIC FUNCTION

   4954	020706	001404 				BEQ	20$		;NO -- FORGET IT
   4955	020710					MTPS	(R4)+,(R3)+	;STORE DIAGNOSITC REGISTERS
	020710	012423 				MOV	(R4)+,(R3)+
   4956	020712					MTPS	(R4)+,(R3)+
	020712	012423 				MOV	(R4)+,(R3)+
   4957	020714					MTPS	(R4)+,(R3)+
	020714	012423 				MOV	(R4)+,(R3)+
   4958	020716					MTPS	(R4)+,(R3)+
	020716	012423 				MOV	(R4)+,(R3)+
   4959	020720	104401 			20$:	TRAP	DR.01		;SET OK RETURN TO CALLER
   4960					;
   4961	020722				$KLDFX::CALL	FNDDTE		;FIND DTE20
	020722	004737 	021212'			JSR	PC,FNDDTE
   4962	020726	012600 				MOV	(SP)+,R0	;FIND FUNCTION BITS
   4963	020730					CALL	CESCHK		;RESET DTE-20 IF CLOCK ERROR STOP
	020730	004737 	021244'			JSR	PC,CESCHK
   4964	020734	042700 	000777 			BIC	#777,R0		;CLEAR OFF LOW ORDER FUNCTION CODE
   4965	020740	052700 	000201 			BIS	#DCOMST!DFUNC,R0 ;SET DIAG FUNCTION EXECUTE
   4966	020744	000411 				BR	$KLDFC		;ENTER COMMON CODE
   4967					;
   4968	020746				$KLDFW::CALL	FNDDTE		;FIND DTE20 ADDRESS
	020746	004737 	021212'			JSR	PC,FNDDTE
   4969	020752	012600 				MOV	(SP)+,R0	;FIND FUNCTION BITS
   4970	020754					CALL	CESCHK		;RESET DTE-20 IF CLOCK ERROR STOP
	020754	004737 	021244'			JSR	PC,CESCHK
   4971	020760	042700 	000777 			BIC	#777,R0		;MASK OFF LOW ORDER FUNCTION CODE
   4972	020764	052700 	000215 			BIS	#DCOMST!DSEND!DIKL10!DFUNC,R0
   4973	020770				$KLDFC::MFPS	(R2)+,DXWD3(R1)	;STORE THE OUTPUT FOR THE EBUS
	020770	012261 	000002 			MOV	(R2)+,DXWD3(R1)
   4974	020774					MFPS	(R2)+,DXWD2(R1)
	020774	012261 	000004 			MOV	(R2)+,DXWD2(R1)
   4975	021000					MFPS	(R2)+,DXWD1(R1)
	021000	012261 	000006 			MOV	(R2)+,DXWD1(R1)
   4976	021004	032700 	000004 			BIT	#DSEND,R0	;DIAG WRITE?
   4977	021010	001712 				BEQ	KLCST		;GO TO COMMON OUTPUT EQOUTINE
   4978					;
   4979	021012	012761 	000014 	000030 	10$:	MOV	#DIKL10!DSEND,DAG1(R1)	;WRITE
   4980	021020	012761 	010000 	000010 		MOV	#DEP,TNAD1(R1)	;SIMULATE DEPOSIT
   4981	021026	005061 	000012 			CLR	TNAD2(R1)
   4982	021032	010046 			20$:	MOV	R0,-(SP)	;SAVE R0
   4983	021034	010100 				MOV	R1,R0
   4984	021036					CALL	WFED		;WAIT FOR DEX DONE
	021036	004737 	045016'			JSR	PC,WFED
   4985	021042	012600 				MOV	(SP)+,R0
   4986	021044	000674 				BR	KLCST
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 97
$PRVEX -- PRIVILEDGED EXAMINE

   4988						.SBTTL	$PRVEX -- PRIVILEDGED EXAMINE
   4989					;
   4990					;+
   4991					;
   4992					;	$PRVEX -- PRIVILEDGED EXAMINE OF THE KL10 MEMORY
   4993					;
   4994					;
   4995					;	ENTRY CONDITIONS:
   4996					;
   4997					;	R0 -- FUNCTION CODE PLUS HIGN ORDER BYTE OF SECOND WORD OF DPB
   4998					;	R1 -- WORD 5 OF DPB
   4999					;	R2 -- WORD 3 OF DPB
   5000					;	R3 -- WORD 4 OF DPB
   5001					;	R4 -- ADDRESS OF DPB
   5002					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   5003					;
   5004					;	JMP	$PRVEX
   5005					;
   5006					;	ERROR CONDITIONS:
   5007					;
   5008					;
   5009					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5010					;-
   5011					;
   5012	021046				$PRVEX::
   5013	021046					CALL	FNDDTE		;FIND DTE20 ADDRESS
	021046	004737 	021212'			JSR	PC,FNDDTE
   5014	021052					MFPS	2(R2),R1	;SET UP THE INTERNAL ADDRESS 2(PDP11 ADDRESS
	021052	016201 	000002 			MOV	2(R2),R1
   5015	021056					MFPS	@R2,R2		;LOWER ORDER HALF
	021056	011202 				MOV	@R2,R2
   5016	021060	052601 				BIS	(SP)+,R1	;SET HIGH ORDER OF PRIVILEDGE
   5017	021062	052701 	004000 			BIS	#PRTOFF,R1	;SET PRIVILEDGED EXAMINE
   5018	021066	042701 	010000 			BIC	#DEP,R1		;INSURE THAT IT IS AN EXAMINE
   5019	021072				PRVCM:	CALL	SWFED		;START-WAITFOR EXAMINE/DEPOSIT
	021072	004737 	045350'			JSR	PC,SWFED
   5020	021076	103401 				BCS	20$		;E BOX STOPPED ERROR
   5021	021100	104401 				TRAP	DR.01		;MUST BE OK -- RETURN TO USER
   5022					;
   5023	021102	104776 			20$:	TRAP	DE.02		;RETURN EBOX STOPPED ERROR
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 98
$PRVDP -- PRIVILEDGED DEPOSIT

   5025						.SBTTL	$PRVDP -- PRIVILEDGED DEPOSIT
   5026					;
   5027					;+
   5028					;
   5029					;	$PRVDP -- PRIVILEDGED DEPOSIT OF THE KL10 MEMORY
   5030					;
   5031					;
   5032					;	ENTRY CONDITIONS:
   5033					;
   5034					;	R0 -- FUNCTION CODE PLUS HIGN ORDER BYTE OF SECOND WORD OF DPB
   5035					;	R1 -- WORD 5 OF DPB
   5036					;	R2 -- WORD 3 OF DPB
   5037					;	R3 -- WORD 4 OF DPB
   5038					;	R4 -- ADDRESS OF DPB
   5039					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   5040					;
   5041					;	JMP	$PRVDP
   5042					;
   5043					;	ERROR CONDITIONS:
   5044					;
   5045					;
   5046					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5047					;-
   5048					;
   5049	021104				$PRVDP::
   5050	021104					CALL	FNDDTE		;FIND DTE20 ADDRESS
	021104	004737 	021212'			JSR	PC,FNDDTE
   5051	021110					MFPS	2(R2),R1	;SET UP THE INTERNAL ADDRESS 2(PDP11 ADDRESS
	021110	016201 	000002 			MOV	2(R2),R1
   5052	021114					MFPS	@R2,R2		;LOWER ORDER HALF
	021114	011202 				MOV	@R2,R2
   5053	021116	052601 				BIS	(SP)+,R1	;SET HIGH ORDER OF PRIVILEDGE
   5054	021120	052701 	014000 			BIS	#PRTOFF!DEP,R1	;SET PRIVILEDGED DEPOSIT
   5055	021124	000762 				BR	PRVCM
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 99
$RWDRG -- READ/WRITE DIAGNOSTIC REGISTER

   5057						.SBTTL	$RWDRG -- READ/WRITE DIAGNOSTIC REGISTER
   5058					;
   5059					;+
   5060					;
   5061					;	$RWDRG -- PRIVILEDGED READ/WRITE OF DIAGNOSTIC DTE20 REGISTERS
   5062					;
   5063					;
   5064					;	ENTRY CONDITIONS:
   5065					;
   5066					;	R0 -- FUNCTION CODE PLUS HIGN ORDER BYTE OF SECOND WORD OF DPB
   5067					;	R1 -- WORD 5 OF DPB
   5068					;	R2 -- WORD 3 OF DPB
   5069					;	R3 -- WORD 4 OF DPB
   5070					;	R4 -- ADDRESS OF DPB
   5071					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   5072					;
   5073					;	JMP	$RWDRG
   5074					;
   5075					;	ERROR CONDITIONS:
   5076					;
   5077					;
   5078					;	REGISTERS SAVED AND RESTORED BY EMT SERVICE
   5079					;-
   5080					;
   5081	021126				$RWDRG::CALL	FNDDTE		;FIND DTE20
	021126	004737 	021212'			JSR	PC,FNDDTE
   5082	021132	000316 				SWAB	@SP		;FIND THE REGISTER NUMBER
   5083	021134	062601 				ADD	(SP)+,R1	;MAKE EXTERNAL PAGE OFFSET
   5084	021136	005702 				TST	R2		;IS IT WRITE?
   5085	021140	001402 				BEQ	10$		;NO -- DON'T SET IT
   5086	021142					MFPS	@R2,DAG1(R1)	;YES -- SET REGISTER
	021142	011261 	000030 			MOV	@R2,DAG1(R1)
   5087	021146	005703 			10$:	TST	R3		;RETURN ADDRESS SPECIFIED?
   5088	021150	001402 				BEQ	20$		;NO -- THEN RETURN ALL OK
   5089	021152					MTPS	DAG1(R1),@R3	;SET IN USER SPACE
	021152	016113 	000030 			MOV	DAG1(R1),@R3
   5090	021156	104401 			20$:	TRAP	DR.01		;MUST BE OK -- RETURN TO USER
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 100
FNDCPU -- INTERNAL SUBROUTINE FIND THE DTE NUMBER

   5092						.SBTTL	FNDCPU -- INTERNAL SUBROUTINE FIND THE DTE NUMBER
   5093					;
   5094					;	FNDCPU -- FIND THE CPU NUMBER AND POINT TO IT'S AREA
   5095					;
   5096					;	ENTRY CONDITIONS:
   5097					;
   5098					;	R1 -- CPU NUMBER
   5099					;	CALL	FNDCPU
   5100					;
   5101					;	EXIT CONDITIONS:
   5102					;
   5103					;	R0 -- POINTS TO BLOCK (HOPEFULLY ALWAYS POSITIVE NUMBER BUT
   5104					;		CC-C CLEAR INDICATES SUCCESS
   5105					;
   5106					;	CC-C CLEAR
   5107					;
   5108					;	ERROR CONDITIONS:
   5109					;
   5110					;	R0 -- -2 -- ILLEGAL CPU NUMBER (CPU # .GT. 16.)
   5111					;	R0 -- -3 -- SECONDARY PROTOCOL IN USE
   5112					;	CC-C SET
   5113					;
   5114					;
   5115	021160	012700 	001234'		FNDCPU:	MOV	#PROTBL,R0	;POINT TO BEGINNING OF TABLE
   5116									;UPDATE OF THE KEEPALIVE COUNT IS NOT NECESSARY
   5117	021164	010146 				MOV	R1,-(SP)	;SAVE R1
   5118	021166	001406 				BEQ	30$		;COMPLETE NO MORE CHECKS NECESSARY
   5119	021170	032701 	177760 			BIT	#177760,R1	;CHECK TO SEE IF THE NUMBER PASSED IS 0-16
   5120	021174	001005 				BNE	40$		;NO -- MUST BE OUTSIDE LEGAL RANGE ERROR
   5121	021176	062700 	000012 		10$:	ADD	#5.*2,R0	;POINT TO NEXT CPU BLOCK
   5122	021202	077103 				SOB	R1,10$		;LOOK AT NEXT BLOCK
   5123					;
   5124	021204	012601 			30$:	MOV	(SP)+,R1	;RESTORE REGISTER
   5125	021206					RETURN			;RETURN WITH STATUS IN R0
	021206	000207 				RTS	PC
   5126					;
   5127	021210	104776 			40$:	TRAP	DE.02		;RETURN FAILURE -- ILLEGAL CPU NUMBER
   5128									;SET CC-C TO INDICATE FAILURE AND R0 -1
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 101
FNDDTE -- INTERNAL SUBROUTINE TO FIND THE DTE20

   5130						.SBTTL	FNDDTE -- INTERNAL SUBROUTINE TO FIND THE DTE20
   5131					;
   5132					;	FNDDTE -- FIND THE DTE20 ADDRESS
   5133					;
   5134					;	ENTRY CONDITIONS:
   5135					;
   5136					;	R1 -- DTE20 NUMBER
   5137					;
   5138					;	CALL	FNDDTE
   5139					;
   5140					;	EXIT CONDITIONS:
   5141					;
   5142					;	R0 -- ADDRESS OF DTE20
   5143					;	R1 -- ADDRESS OF DTE20
   5144					;
   5145					;
   5146	021212	005301 			FNDDTE:	DEC	R1
   5147	021214	100410 				BMI	20$		;IF MINUS IT IS PRIV ONE
   5148	021216	006301 				ASL	R1		;FIND ADDRESS
   5149	021220	006301 				ASL	R1
   5150	021222	006301 				ASL	R1
   5151	021224	006301 				ASL	R1
   5152	021226	062701 	174400 			ADD	#174400,R1
   5153	021232	010100 			10$:	MOV	R1,R0		;TO BOTH
   5154	021234					RETURN			;RETURN TO CALLER
	021234	000207 				RTS	PC
   5155	021236	013701 	001360'		20$:	MOV	.PRDTE,R1	;SET UP TO POINT TO PRIV DTE
   5156	021242	000773 				BR	10$
DMDTE	- DTE DIRECTIVES MODULE	MACRO M1110  15-OCT-79 13:47  PAGE 102
CESCHK -- CHECK FOR CLOCK ERROR STOP

   5158						.SBTTL	CESCHK -- CHECK FOR CLOCK ERROR STOP
   5159					;
   5160					;	CESCHK -- CHECK FOR CLOCK ERROR STOP
   5161					;
   5162					;	ENTRY CONDITIONS:
   5163					;
   5164					;	R1 -- ADDRESS OF CURRENT DTE-20
   5165					;
   5166					;	NO REGISTERS MODIFIED
   5167					;
   5168	021244				CESCHK:
   5169	021244	005061 	000030 			CLR	DAG1(R1)	;CLEAR ALL FLAGS
   5170	021250	032761 	004000 	000030 		BIT	#DS04,DAG1(R1)	;CLOCK ERROR STOP UP?
   5171	021256	001403 				BEQ	10$		;NO-- JUST RETURN
   5172	021260	012761 	000100 	000032 		MOV	#DRESET,DAG2(R1) ;YES-- RESET DTE-20
   5173	021266				10$:
   5174	021266					RETURN			;FROM CESCHK
	021266	000207 				RTS	PC
DMASS	- "ASSIGN LUN" DIRECTIV	MACRO M1110  15-OCT-79 13:47  PAGE 103
CESCHK -- CHECK FOR CLOCK ERROR STOP

   5176						.TITLE	DMASS	- "ASSIGN LUN" DIRECTIVE MODULE
   5177	021270					IDENT$	1,0
						.IDENT	/001000/
   5178					;
   5179					;                             COPYRIGHT (C) 1975, 1978 BY
   5180					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5181					;
   5182					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5183					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5184					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5185					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5186					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5187					;
   5188					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5189					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5190					;       CORPORATION.
   5191					;
   5192					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5193					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5194					;
   5195					;		MODULE: "ASSIGN LUN" DIRECTIVE
   5196					;
   5197					;		VERSION: 01-00
   5198					;
   5199					;		AUTHOR: R. MCLEAN
   5200					;
   5201					;		DATE: 19 JUL 75
   5202					;
   5203					;
   5204					;	THIS MODULE CONTAINS:
   5205					;
   5206					;	1 -- CODE TO SERVICE THE "ASSIGN LUN" DIRECTIVE.
   5207					;
   5208					;	MACRO DEFINITIONS
   5209					;
   5211						.MCALL	CALL,RETURN
   5212						.MCALL	MFPI,MFPS
DMASS	- "ASSIGN LUN" DIRECTIV	MACRO M1110  15-OCT-79 13:47  PAGE 104
DIRECTIVE -- ASSIGN LUN

   5215						.SBTTL	DIRECTIVE -- ASSIGN LUN
   5216					;+
   5217					; THE "ASSIGN LUN" DIRECTIVE
   5218					;
   5219					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ASSIGN A LOGICAL UNIT NUMBER (LUN)
   5220					; TO A PHYSICAL DEVICE-UNIT.
   5221					;
   5222					; A FOUR-WORD DPB OF THE FOLLOWING FORMAT IS USED TO ASSIGN A LUN
   5223					; TO A PHYSICAL DEVICE:
   5224					;
   5225					;	WD. 00 -- DIC (07.) & DPB SIZE (4.),
   5226					;	WD. 01 -- LOGICAL UNIT NUMBER,
   5227					;	WD. 02 -- PHYSICAL DEVICE NAME,
   5228					;	WD. 03 -- PHYSICAL DEVICE UNIT NUMBER.
   5229					;
   5230					; A TWO-WORD DPB OF THE FOLLOWING FORMAT IS USED TO DEASSIGN (ASSIGN
   5231					; TO "NONE") A LUN:
   5232					;
   5233					;	WD. 00 -- DIC (07.) & DPB SIZE (2.),
   5234					;	WD. 01 -- LOGICAL UNIT NUMBER.
   5235					;
   5236					; THE FOLLOWING STATUS IS RETURNED:
   5237					;
   5238					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5239					; OF ONE (+1).
   5240					;
   5241					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5242					;
   5243					;	-90 -- LUN USAGE INTERLOCKED (VIZ., FILE OPEN),
   5244					;	-92 -- INVALID DEVICE AND/OR UNIT,
   5245					;	-96 -- INVALID LOGICAL UNIT NUMBER,
   5246					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   5247					;	-99 -- DIC OR DPB SIZE IS INVALID.
   5248					;-
   5249					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5250					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   5251					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5252					;	R0 -- PC OF EMT INSTRUCTION
   5253					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   5254					;	R2 -- DPB SIZE
   5255					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5256					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   5257					;
   5258					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   5259					;
   5260					;
   5261					; LUN ASSIGNMENT -- CHECK FOR VALIDITY OF LUN & DEVICE-UNIT AND ASSIGN
   5262					; IF NOT INTERLOCKED.
   5263					;
   5264	021270				.D.ASS::MFPI	@R1		;VALIDATE LUN, AND SETUP  TO ACCESS TASK
	021270	011146 				MOV	@R1,-(SP)
   5265									;HEADER, BY PUSHING LUN AND CALLING
   5266									;SUBROUTINE TO CONVERT & VERIFY.
   5267	021272					CALL	.VCLUN		;IF INVALID LUN, RETURN STS=-96.
	021272	004737 	015266'			JSR	PC,.VCLUN
   5268	021276	010416 				MOV	R4,@SP		;PUD ENTRY ADR ON STACK REPLACED BY LUT ADDRESS
   5269					;
DMASS	- "ASSIGN LUN" DIRECTIV	MACRO M1110  15-OCT-79 13:47  PAGE 104-1
DIRECTIVE -- ASSIGN LUN

   5270	021300	005003 				CLR	R3		;SET UP INCASE OF DEASSIGNMENT
   5271	021302	020227 	000002 			CMP	R2,#2		;IS THIS LUN DEASSIGNMENT?
   5272	021306	001422 				BEQ	60$		;YES -- DEASSIGN LUN
   5278					;
   5279	021310				45$:	MFPI	(R1)+		;PUSH LUN, AND LEAVE R1 POINTING TO DEV NAME
	021310	012146 				MOV	(R1)+,-(SP)
   5280					;
   5281	021312					MFPS	(R1)+,R4	;SET R4 TO DEVICE NAME.
	021312	012104 				MOV	(R1)+,R4
   5282									;R0 CONTAINS DEVICE UNIT NUMBER
   5283	021314					MFPS	@R1,R0
	021314	011100 				MOV	@R1,R0
   5284					;
   5285					; SCAN PUD FOR DEVICE-UNIT IN R4-R0.
   5286					;
   5287	021316	012703 	007606'			MOV	#.PUDBA,R3	;USE R3 TO SCAN PUD
   5288	021322				20$:
   5289	021322	020327 	010666'			CMP	R3,#.PUDEA	;END OF PUD?
   5290	021326	001001 				BNE	30$
   5291	021330	104644 				TRAP	DE.92		;YES -- DEVICE-UNIT NOT FOUND
   5292	021332	021304 			30$:	CMP	@R3,R4		;NO -- DEVICE NAME MATCH?
   5293	021334	001003 				BNE	40$		;NO -- CHECK NEXT ENTRY
   5294	021336	126300 	000002 			CMPB	U.UN(R3),R0	;YES -- UNIT NUMBER MATCH?
   5295	021342	001403 				BEQ	50$		;YES -- DEVICE-UNIT FOUND
   5296									;NO -- CHECK NEXT ENTRY
   5297	021344				40$:
   5298	021344	062703 	000050 			ADD	#U.SZ,R3	;ADVANCE R3 TO NEXT PUD ENTRY (IF ANY), AND
   5299	021350	000764 				BR	20$		;CHECK FOR DEVICE-UNIT MATCH.
   5300					;
   5301					; INDICATED DEVICE-UNIT FOUND IN PUD -- PUD ENTRY ADDRESS IS IN R3
   5302					;
   5303	021352	012600 			50$:	MOV	(SP)+,R0	;SET R0 TO LUN
   5304					;
   5305					; R3 CONTAINS A VALUE (PUD ENTRY ADDRESS OR ZERO) TO BE SET IN THE
   5306					; THE FIRST WORD OF THE LUT PER LUN IN R0.
   5307					;
   5308	021354				60$:
   5309	021354	006300 				ASL	R0		;SET R0 TO FOUR TIMES THE LUN
   5310	021356	006300 				ASL	R0
   5311	021360	062600 				ADD	(SP)+,R0	;POINT TO LUT AS SAVED
   5312					;
   5313	021362	005740 				TST	-(R0)		;IS LUN LOCKED IN USE?
   5314	021364	001401 				BEQ	70$
   5315	021366	104646 				TRAP	DE.90		;YES -- RETURN STS=-90.
   5316	021370	010340 			70$:	MOV	R3,-(R0)	;NO -- MAKE ASSIGNMENT, AND
   5317	021372	104401 				TRAP	DR.01		;RETURN STS=+1
DMGLI	- "GET LUN INFO" DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 105
DIRECTIVE -- ASSIGN LUN

   5319						.TITLE	DMGLI	- "GET LUN INFO" DIRECTIVE MODULE
   5320	021374					IDENT$	1,0
						.IDENT	/001000/
   5321					;
   5322					;                             COPYRIGHT (C) 1975, 1978 BY
   5323					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5324					;
   5325					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5326					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5327					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5328					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5329					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5330					;
   5331					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5332					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5333					;       CORPORATION.
   5334					;
   5335					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5336					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5337					;
   5338					;		MODULE: "GET LUN INFO" DIRECTIVE
   5339					;
   5340					;		VERSION: 01-00
   5341					;
   5342					;		AUTHOR: R. MCLEAN
   5343					;
   5344					;		DATE: 19 JUL 75
   5345					;
   5346					;
   5347					;	THIS MODULE CONTAINS:
   5348					;
   5349					;	1 -- CODE TO SERVICE THE "GET LUN INFO" DIRECTIVE.
   5350					;
   5351					;	MACROS
   5352					;
   5354						.MCALL	CALL,RETURN,MTPI,MFPI,MFPS
DMGLI	- "GET LUN INFO" DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 106
DIRECTIVE -- GET LUN INFORMATION

   5357						.SBTTL	DIRECTIVE -- GET LUN INFORMATION
   5358					;+
   5359					; THE "GET LUN INFORMATION" DIRECTIVE
   5360					;
   5361					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL A SIX WORD BUFFER
   5362					; WITH INFORMATION ABOUT A PHYSICAL UNIT TO WHICH IT IS ASSIGNED.
   5363					; IF REQUESTS TO THE PHYSICAL UNIT HAVE BEEN RE-DIRECTED TO ANOTHER
   5364					; UNIT, THE INFORMATION RETURNED WILL DESCRIBE THE EFFECTIVE ASSIGNMENT.
   5365					;
   5366					; A THREE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5367					;
   5368					;	WD. 00 -- DIC (05.) & DPB SIZE (3.),
   5369					;	WD. 01 -- LUN,
   5370					;	WD. 02 -- ADDRESS OF SIX-WORD BUFFER.
   5371					;
   5372					;
   5373					; THE SIX WORD BUFFER IS FILLED WITH THE FIRST SIX WORDS OF THE
   5374					; CORRESPONDING PUD ENTRY AS FOLLOWS:
   5375					;
   5376					;	WD. 00 -- NAME OF ASSIGNED DEVICE,
   5377					;	WD. 01 -- UNIT NUMBER OF ASSIGNED DEVICE & FLAGS BYTE,
   5378					;	WD. 02 -- DEVICE CHARACTERISTICS WD. #1,
   5379					;	WD. 03 -- DEVICE CHARACTERISTICS WD. #2,
   5380					;	WD. 04 -- DEVICE CHARACTERISTICS WD. #3,
   5381					;	WD. 05 -- DEVICE CHARACTERISTICS WD. #4.
   5382					;
   5383					; THE FOLLOWING STATUS IS RETURNED:
   5384					;
   5385					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5386					; OF ONE (+1).
   5387					;
   5388					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5389					;
   5390					;	-05 -- UNASSIGNED LUN,
   5391					;
   5392					;	-95 -- INVALID BUFFER SIZE ( 1> OR >U.SZ)
   5393					;	-96 -- INVALID LOGICAL UNIT NUMBER,
   5394					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   5395					;	-99 -- DIC OR DPB SIZE IS INVALID.
   5396					;-
   5397									;R0 CONTAINS BUFFER ADDRESS (LAST DPB WORD)
   5398					;
   5399	021374	006302 			.D.GLI::ASL	R2		;MULTIPLY THE DPB SIZE BY 2
   5405					;
   5406					;
   5407	021376				10$:	MFPI	(R1)+		;PUSH LUN, AND CONVERT TO PUD ENTRY ADR
	021376	012146 				MOV	(R1)+,-(SP)
   5408	021400					CALL	.VCLUN		;IF INVALID LUN, RETURN STS=-96.
	021400	004737 	015266'			JSR	PC,.VCLUN
   5409	021404	012604 				MOV	(SP)+,R4	;SET R4 TO PUD ENTRY ADR IF LUN ASSIGNED
   5410	021406	001001 				BNE	20$		;IF UN-ASSIGNED LUN, RETURN STS=-05.
   5411	021410	104773 				TRAP	DE.05
   5412					;
   5413					; FILL BUFFER -- IF SEGMENT FAULT, RETURN STS=-98.
   5414					;
   5415	021412				20$:	MFPS	(R1),R0
	021412	011100 				MOV	(R1),R0
DMGLI	- "GET LUN INFO" DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 106-1
DIRECTIVE -- GET LUN INFORMATION

   5416	021414	012446 			30$:	MOV	(R4)+,-(SP)
   5417	021416					MTPI	(R0)+
	021416	012620 				MOV	(SP)+,(R0)+
   5418	021420	077203 				SOB	R2,30$
   5419					;
   5420	021422	104401 				TRAP	DR.01		;RETURN STS=+1
   5421					;
DMGTP	- "GET TIME PARAMETERS"	MACRO M1110  15-OCT-79 13:47  PAGE 107
DIRECTIVE -- GET LUN INFORMATION

   5423						.TITLE	DMGTP	- "GET TIME PARAMETERS" DIRECTIVE MODULE
   5424	021424					IDENT$	1,0
						.IDENT	/001000/
   5425					;
   5426					;                             COPYRIGHT (C) 1975, 1978 BY
   5427					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5428					;
   5429					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5430					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5431					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5432					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5433					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5434					;
   5435					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5436					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5437					;       CORPORATION.
   5438					;
   5439					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5440					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5441					;
   5442					;		MODULE: "GET TIME PARAMETERS" DIRECTIVE
   5443					;
   5444					;		VERSION: 01-00
   5445					;
   5446					;		AUTHOR: R. MCLEAN
   5447					;
   5448					;		DATE: 19 JUL 75
   5449					;
   5450					;
   5451					;	THIS MODULE CONTAINS:
   5452					;
   5453					;	1 -- CODE TO SERVICE THE "GET TIME PARAMETERS" DIRECTIVE.
   5454					;
   5455					;	MACROS
   5456					;
   5458					;
   5459						.MCALL	CALL,RETURN,MTPI,MFPS
DMGTP	- "GET TIME PARAMETERS"	MACRO M1110  15-OCT-79 13:47  PAGE 108
DIRECTIVE -- GET TIME PARAMETERS

   5462						.SBTTL	DIRECTIVE -- GET TIME PARAMETERS
   5463					;+
   5464					; THE "GET TIME PARAMETERS" DIRECTIVE
   5465					;
   5466					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL AN INDICATED EIGHT WORD BUFFER
   5467					; WITH CURRENT TIME PARAMETERS.
   5468					;
   5469					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5470					;
   5471					;	WD. 00 -- DIC (59.) & DPB SIZE (2.),
   5472					;	WD. 01 -- ADDRESS OF 8-WORD BUFFER.
   5473					;
   5474					; THE 8-WORD BUFFER IS FILLED AS FOLLOWS:
   5475					;
   5476					;	WD. 0 -- YEAR (SINCE 1900),
   5477					;	WD. 1 -- MONTH OF YEAR,
   5478					;	WD. 2 -- DAY OF MONTH,
   5479					;	WD. 3 -- HOUR OF DAY,
   5480					;	WD. 4 -- MINUTE OF HOUR,
   5481					;	WD. 5 -- SECOND OF MINUTE,
   5482					;	WD, 6 -- TICK OF SECOND,
   5483					;	WD. 7 -- TICKS PER SECOND.
   5484					;
   5485					; THE FOLLOWING STATUS IS RETURNED:
   5486					;
   5487					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5488					; OF ONE (+1).
   5489					;
   5490					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5491					;
   5492					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   5493					;	-99 -- DIC OR DPB SIZE IS INVALID.
   5494					;
   5495	021424	013746 	001152'		.D.GTP::MOV	.TKPS,-(SP)	;PUSH TICKS-PER-SECOND
   5496	021430	010104 				MOV	R1,R4		;SAVE DPB POINTER
   5497	021432	013700 	001146'			MOV	.SSM,R0		;FIND HOURS
   5498	021436	012701 	003410 			MOV	#60.*30.,R1
   5499	021442					CALL	$DIV		;DIVIDE
	021442	004737 	000000G			JSR	PC,$DIV
   5500	021446	010003 				MOV	R0,R3		;SAVE ANSWER
   5501	021450	010100 				MOV	R1,R0		;SET UP REMAINDER FOR NEXT DIVIDE
   5502	021452	012701 	000036 			MOV	#30.,R1
   5503	021456					CALL	$DIV		;FIND MIN
	021456	004737 	000000G			JSR	PC,$DIV
   5504	021462	005046 				CLR	-(SP)		;TICKS NOT RETURNED
   5505	021464	006301 				ASL	R1
   5506	021466	010146 				MOV	R1,-(SP)	;SAVE SECONDS
   5507	021470	010046 				MOV	R0,-(SP)
   5508	021472	010346 				MOV	R3,-(SP)	;HOURS
   5509	021474	005046 				CLR	-(SP)
   5510	021476	113716 	001142'			MOVB	.DAY,@SP
   5511	021502	005216 				INC	@SP
   5512	021504	005046 				CLR	-(SP)
   5513	021506	113716 	001143'			MOVB	.MON,@SP
   5514	021512	005216 				INC	@SP
   5515	021514	013746 	001140'			MOV	.YEAR,-(SP)
   5516	021520	162716 	003554 			SUB	#1900.,@SP
DMGTP	- "GET TIME PARAMETERS"	MACRO M1110  15-OCT-79 13:47  PAGE 108-1
DIRECTIVE -- GET TIME PARAMETERS

   5517					;
   5518					;
   5519					; MOVE TIME PARAMETERS FROM KERNEL STACK TO 8-WORD BUFFER IN USER SPACE
   5520					;
   5521					;
   5522	021524	012703 	000010 			MOV	#8.,R3
   5523					;
   5524	021530					MFPS	(R4),R4		;FIND BUFFER ADDRESS
	021530	011404 				MOV	(R4),R4
   5525	021532				10$:
   5526	021532					MTPI	(R4)+		;MOVE WORD
	021532	012624 				MOV	(SP)+,(R4)+
   5527	021534	077302 				SOB	R3,10$		;LOOP 8 TIMES
   5528					;
   5529	021536	104401 				TRAP	DR.01		;RETURN STS=+1
   5530					;
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 109
DIRECTIVE -- GET TIME PARAMETERS

   5532						.TITLE	DMSED	- SIGNIFICANT EVENT DIRECTIVES MODULE
   5533	021540					IDENT$	1,0
						.IDENT	/001000/
   5534					;
   5535					;                             COPYRIGHT (C) 1975, 1978 BY
   5536					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   5537					;
   5538					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   5539					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   5540					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   5541					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   5542					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   5543					;
   5544					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   5545					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   5546					;       CORPORATION.
   5547					;
   5548					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   5549					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   5550					;
   5551					;		MODULE: SIGNIFICANT EVENT DIRECTIVES
   5552					;
   5553					;		VERSION: 01-00
   5554					;
   5555					;		AUTHOR:  R. MCLEAN
   5556					;
   5557					;		DATE: 19 MAR 75
   5558					;
   5559					;
   5560					;	THIS MODULE CONTAINS:
   5561					;
   5562					;	1 -- CODE TO SERVICE THE "WAITFOR SINGLE EVENT FLAG" DIRECTIVE,
   5563					;	2 -- CODE TO SERVICE THE "WAITFOR LOGICAL 'OR' OF FLAGS" DIRECTIVE,
   5564					;	3 -- CODE TO SERVICE THE "WAIT FOR NEXT SIGNIFICANT EVENT" DIRECTIVE.
   5565					;	4 -- CODE TO SERVICE THE "CLEAR EVENT FLAG" DIRECTIVE,
   5566					;	5 -- CODE TO SERVICE THE "SET EVENT FLAG" DIRECTIVE,
   5567					;	6 -- CODE TO SERVICE THE "DECLARE SIG EVENT" DIRECTIVE,
   5568					;	7 -- CODE TO SERVICE THE "READ EVENT FLAGS" DIRECTIVE
   5569					;
   5570					;	MACROS
   5572					;
   5573						.MCALL	CALL,RETURN,MTPS,MFPS,MFPI,MTPI
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 110
DIRECTIVE -- CLEAR EVENT FLAG

   5576						.SBTTL	DIRECTIVE -- CLEAR EVENT FLAG
   5577					;+
   5578					;	THE "CLEAR EVENT FLAG" DIRECTIVE
   5579					;
   5580					;	THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CLEAR AND INDICATE
   5581					;	EVENT FLAG AND REPORT THE FLAG'S POLARITY BEFORE CLEARING.
   5582					;
   5583					;	A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED;
   5584					;
   5585					;	WD. 00 -- DIC (31.) & DPB SIZE (2.)
   5586					;	WD. 01 -- EVENT FLAG NUMBER (EFN)
   5587					;
   5588					;	THE FOLLOWING STATUS IS RETURNED:
   5589					;
   5590					;
   5591					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5592					;
   5593					;	R0 -- +0 -- FLAG WAS ALREADY RESET,
   5594					;	R0 -- +2 -- FLAG WAS SET.
   5595					;
   5596					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5597					;
   5598					;	R0 -- -97 -- EFN>64 OR EFN<1,
   5599					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5600					;-
   5601					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5602					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5603					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5604					;	R0 -- PC OF EMT INSTRUCTION
   5605					;	R1 -- WORD FOLLOWING THE DIC & SIZE
   5606					;	R2 -- SIZE OF DPB (IN WORDS),
   5607					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE )
   5608					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5609					;
   5610					;
   5611					;
   5612	021540				.D.CEF::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	021540	004737 	041600'			JSR	PC,.CEFN
   5613									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5614									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5615									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5616									;SPECIFIED), RETURN WITH R2=R3=00.
   5617									;CONDITION CODES ARE SET PER "TST R3".
   5618					;
   5619									;EVENT FLAG SPECIFIED?
   5620	021544	001443 				BEQ	SEX97		;NO -- RETURN STS=-97
   5621	021546	030312 				BIT	R3,@R2		;YES -- IS FLAG CLEARED?
   5622	021550	001410 				BEQ	SEXP0		;YES -- RETURN STS=+0
   5623	021552	040312 				BIC	R3,@R2		;NO -- CLEAR FLAG & RETURN STS=+2
   5624	021554	104402 			SEXP2:	TRAP	DR.02		;COMMON RETURN -- STS=+2
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 111
DIRECTIVE -- SET EVENT FLAG

   5626					.SBTTL	DIRECTIVE -- SET EVENT FLAG
   5627					;+
   5628					; THE "SET EVENT FLAG" DIRECTIVE
   5629					;
   5630					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SET AND INDICATED EVENT FLAG
   5631					; AND REPORT THE FLAG'S POLARITY BEFORE SETTING.
   5632					;
   5633					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5634					;
   5635					;	WD. 00 -- DIC (33.) & DPB SIZE (2.),
   5636					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   5637					;
   5638					; THE FOLLOWING STATUS IS RETURNED:
   5639					;
   5640					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5641					;
   5642					;	R0 -- +0 -- FLAG WAS CLEARED,
   5643					;	R0 --+2 -- FLAG WAS SET.
   5644					;
   5645					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5646					;
   5647					;	R0 -- -97 -- EFN>64 OR EFN<1,
   5648					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5649					;-
   5650					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5651					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5652					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5653					;	R0 -- PC OF EMT INSTRUCTION
   5654					;	R1 -- WORD FOLLOWING DIC % SIZE
   5655					;	R2 -- DPB SIZE
   5656					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5657					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5658					;
   5659					;
   5660									;R1 IS POINTING TO EFN IN DPB
   5661					;
   5662	021556				.D.SEF::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	021556	004737 	041600'			JSR	PC,.CEFN
   5663									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5664									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5665									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5666									;SPECIFIED), RETURN WITH R2=R3=00.
   5667									;CONDITION CODES ARE SET PER "TST R3".
   5668					;
   5669									;EVENT FLAG SPECIFIED?
   5670	021562	001434 				BEQ	SEX97		;NO -- RETURN STS=-97
   5671	021564	030312 			SEXCM:	BIT	R3,@R2		;YES -- IS FLAG ALREADY SET?
   5672	021566	001372 				BNE	SEXP2		;YES -- RETURN STS=+2
   5673	021570	050312 				BIS	R3,@R2		;NO -- SET FLAG & RETURN STS=+0
   5674	021572	104400 			SEXP0:	TRAP	DR.00		;COMMON RETURN -- STS=+0
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 112
DIRECTIVE -- DECLARE SIGNIFICANT EVENT

   5676					.SBTTL	DIRECTIVE -- DECLARE SIGNIFICANT EVENT
   5677					;+
   5678					; THE "DECLARE SIGNIFICANT EVENT" DIRECTIVE
   5679					;
   5680					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DECLARE A SIGNIFICANT EVENT
   5681					; AND OPTIONALLY SET AN EVENT FLAG & AND REPORT ITS POLARITY BEFORE
   5682					; IT WAS SET.
   5683					;
   5684					; A TWO WORD DBP OF THE FOLLOWING FORMAT IS USED TO (1) READ AN EVENT
   5685					; FLAG, (2) SET THE EVENT FLAG, (3) DECLARE A SIGNIFICANT EVENT, AND
   5686					; (4) REPORT THE PRE-EVENT FLAG POLARITY:
   5687					;
   5688					;	WD. 00 -- DIC (35.) & DPB SIZE (2.),
   5689					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   5690					;
   5691					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED TO (1) DECLARE A
   5692					; SIGNIFICANT EVENT:
   5693					;
   5694					;	WD. 00 -- DIC (07.) & DPB SIZE (2.).
   5695					;	WD. 01 -- NO EVENT FLAG SPECIFIED
   5696					;
   5697					; THE FOLLOWING STATUS IS RETURNED:
   5698					;
   5699					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5700					;
   5701					;	R0 -- +1 -- NO EVENT FLAG SPECIFIED,
   5702					;	R0 -- +0 -- SPECIFIED FLAG WAS CLEARED,
   5703					;	R0 --+2 -- SPECIFIED FLAG WAS SET.
   5704					;
   5705					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5706					;
   5707					;	R0 -- -97 -- EFN<1 OR EFN>64.,
   5708					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5709					;-
   5710					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5711					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5712					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   5713					;	R0 -- PC OF EMT INSTRUCTION
   5714					;	R1 -- WORD FOLLOWING DIC & SIZE
   5715					;	R2 -- DPB SIZE
   5716					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5717					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5718					;
   5719					;
   5720					;
   5721	021574				.D.DSE::CALL	..DSEV		;SET SIGNIFICANT EVENT FLAG
	021574	004737 	042444'			JSR	PC,..DSEV
   5722	021600	005302 				DEC	R2
   5723	021602	001401 				BEQ	5$
   5724	021604	104400 				TRAP	DR.00
   5725	021606				5$:	CALL	.CEFN		;YES -- R1 IS POINTING TO EFN IN DPB.
	021606	004737 	041600'			JSR	PC,.CEFN
   5726									;CONVERT EFN TO: (1) FLAG WORD ADDRESS
   5727									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5728									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5729									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5730									;SPECIFIED), RETURN WITH R2=R3=00.
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 112-1
DIRECTIVE -- DECLARE SIGNIFICANT EVENT

   5731									;CONDITION CODES ARE SET PER "TST R3".
   5732					;
   5733									;EVENT FLAG SPECIFIED?
   5734	021612	001417 				BEQ	SEXP1		;NO -- RETURN STS=1.
   5735	021614	000763 				BR	SEXCM		;GO TO COMMON TEST
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 113
DIRECTIVE -- READ EVENT FLAG

   5737					.SBTTL	DIRECTIVE -- READ EVENT FLAG
   5738					;+
   5739					; THE "READ EVENT FLAG" DIRECTIVE
   5740					;
   5741					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO READ AND INDICATED EVENT FLAG.
   5742					;
   5743					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5744					;
   5745					;	WD. 00 -- DIC (37.) & DPB SIZE (2.),
   5746					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   5747					;
   5748					; THE FOLLOWING STATUS IS RETURNED:
   5749					;
   5750					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS OF:
   5751					;
   5752					;	R0 -- +0 -- FLAG WAS CLEARED,
   5753					;	R0 -- +2 -- FLAG WAS SET.
   5754					;
   5755					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5756					;
   5757					;	R0 -- -97 -- EFN>64 OR EFN<1,
   5758					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5759					;-
   5760					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5761					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5762					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5763					;	R0 -- PC OF EMT INSTRUCTION
   5764					;	R1 -- WORD FOLLOWING DIC & SIZE
   5765					;	R2 -- DPB SIZE
   5766					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5767					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5768					;
   5769					;
   5770									;R1 IS POINTING TO EFN IN DPB.
   5771					;
   5772	021616				.D.REF::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	021616	004737 	041600'			JSR	PC,.CEFN
   5773									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   5774									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   5775									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   5776									;SPECIFIED), RETURN WITH R2=R3=00.
   5777									;CONDITION CODES ARE SET PER "TST R3".
   5778					;
   5779									;EVENT FLAG SPECIFIED?
   5780	021622	001414 				BEQ	SEX97		;NO -- RETURN STS=-97
   5781	021624	030312 				BIT	R3,@R2		;YES -- IS FLAG SET?
   5782	021626	001352 				BNE	SEXP2		;YES -- RETURN STS=+2
   5783	021630	104400 				TRAP	DR.00		;NO -- RETURN STS=+0
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 114
DIRECTIVE -- READ ALL EVENT FLAGS

   5785					.SBTTL	DIRECTIVE -- READ ALL EVENT FLAGS
   5786					;+
   5787					; THE "READ ALL FLAGS" DIRECTIVE
   5788					;
   5789					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO READ ALL SIXTY-FOUR
   5790					; EVENT FLAGS FOR THE ISSUING TASK AND RECORD THEIR POLARITIES
   5791					; IN A SIXTY-FOUR BIT (4-WORD) BUFFER.
   5792					;
   5793					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5794					;
   5795					;	WD. 00 -- DIC (39.) & DPB SIZE (2.),
   5796					;	WD. 01 -- ADDRESS  OF 64-BIT BUFFER.
   5797					;
   5798					; THE FOLLOWING STATUS IS RETURNED:
   5799					;
   5800					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5801					; OF ONE (+1).
   5802					;
   5803					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5804					;
   5805					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5806					;-
   5807					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5808					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5809					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5810					;	R0 -- PC OF EMT INSTRUCTION
   5811					;	R1 -- WORD FOLLOWING DIC & SIZE
   5812					;	R2 -- DPB SIZE
   5813					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5814					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5815					;
   5816					;
   5817					; FILL FOUR WORD BUFFER
   5818					;
   5819	021632				.D.RAF::MTPS   A.EF+0(R5),(R1)+	;FLAGS 1-16 TO BUF+0
	021632	016521 	000020 			MOV	A.EF+0(R5),(R1)+
   5820	021636					MTPS   A.EF+2(R5),(R1)+	;FLAGS 17-32 TO BUF+2
	021636	016521 	000022 			MOV	A.EF+2(R5),(R1)+
   5821	021642					MTPS	.COMEF+0,(R1)+	;FLAGS 33-48 TO BUF+4
	021642	013721 	001010'			MOV	.COMEF+0,(R1)+
   5822	021646					MTPS	.COMEF+2,(R1)+	;FLAGS 49-64 TO BUF+6
	021646	013721 	001012'			MOV	.COMEF+2,(R1)+
   5823					;
   5824	021652	104401 			SEXP1:	TRAP	DR.01		;RETURN STS=+1
   5825					;
   5826	021654	104637 			SEX97:	TRAP	DE.97
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 115
DIRECTIVE -- WAITFOR SINGLE EVENT FLAG

   5828					.SBTTL	DIRECTIVE -- WAITFOR SINGLE EVENT FLAG
   5829					;+
   5830					; THE "WAIT FOR SINGLE EVENT FLAG" DIRECTIVE
   5831					;
   5832					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE
   5833					; ISSUING TASK UNTIL AN INDICATED EVENT FLAG IS SET.  IF THE FLAG IS SET
   5834					; AT ISSUANCE, TASK EXECUTION IS EFFECTIVELY NOT SUSPENDED.  (ACTUALLY, THE
   5835					; TASK IS ALWAYS SUSPENDED, BUT R0 IS LEFT POINTING TO THE ISSUING TASK'S
   5836					; ATL NODE; AND THEREFORE, A CHECK IS ALWAYS MADE BY THE ATL SCAN ROUTINE.)
   5837					;
   5838					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5839					;
   5840					;	WD. 00 -- DIC (41.) & DPB SIZE (2.),
   5841					;	WD. 01 -- EVENT FLAG NUMBER (EFN).
   5842					;
   5843					; THE FOLLOWING STATUS IS RETURNED:
   5844					;
   5845					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5846					; OF ONE (+1).
   5847					;
   5848					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   5849					;
   5850					;	R0 -- -97 -- INVALID EVENT FLAG NUMBER (<1 OR >64.),
   5851					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5852					;-
   5853					;
   5854					;
   5855					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5856					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5857					;  STACK, AND R0-R5 SET AS FOLLOWS:
   5858					;	R0 -- PC OF EMT INSTRUCTION
   5859					;	R1 -- WORD FOLLOWING DIC & SIZE
   5860					;	R2 -- DPB SIZE
   5861					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5862					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5863					;
   5864					;
   5865	021656	011103 			.D.WFS::MOV	@R1,R3		;SET R3 TO EFN
   5866									;IS AN EVENT FLAG SPECIFIED (NON-ZERO EFN)?
   5867	021660				.D.WFO::			;SPECIAL ENTRY POINT FOR QIO AND WAIT
   5868	021660	001775 				BEQ	SEX97		;NO -- RETURN STS=-97.
   5869	021662	020327 	000100 			CMP	R3,#64.		;YES -- IS EFN IN RANGE: 0-64.?
   5870	021666	101372 				BHI	SEX97		;NO -- RETURN STS=-97.
   5871					;
   5872	021670	005303 				DEC	R3		;YES -- CONVERT EFN TO FLAG SET NUMBER (R2),
   5873	021672	005002 				CLR	R2		;AND FLAG MASK (R1)
   5874	021674					CALL	DIV216		;DIVIDE R2 BY 16.
	021674	004737 	042454'			JSR	PC,DIV216
   5875	021700	012701 	000001 			MOV	#1,R1
   5876	021704	005303 			10$:	DEC	R3		;DO AN ASH	R3,R1
   5877	021706	100402 				BMI	20$
   5878	021710	006301 				ASL	R1
   5879	021712	000774 				BR	10$
   5880	021714				20$:
   5881					;
   5882					;
   5883	021714	006302 				ASL	R2		;CONVERT SET NUMBER (0,1,2,3) TO TASK
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 115-1
DIRECTIVE -- WAITFOR SINGLE EVENT FLAG

   5884	021716	062702 	000014 			ADD	#TS.WF0,R2	;STATUS FOR ATL NODE.
   5885					;
   5886	021722	010165 	000024 			MOV	R1,A.FM+0(R5)	;SET MASK AND STATUS IN ATL NODE
   5887	021726	110265 	000014 			MOVB	R2,A.TS(R5)
   5888					;
   5889	021732	104401 				TRAP	DR.01		;RETURN STS=+1
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 116
DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS

   5891					.SBTTL	DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS
   5892					;+
   5893					; THE "WAITFOR LOGICAL 'OR' OF FLAGS" DIRECTIVE
   5894					;
   5895					;
   5896					; IF THE INDICATED CONDITION IS MET AT ISSUANCE, TASK EXECUTION IS
   5897					; EFFECTIVELY NOT SUSPENDED.  (ACTUALLY, THE TASK IS ALWAYS SUSPENDED,
   5898					;
   5899					;
   5900					; A THREE WORD DPB OF THE FOLLOWING FORMAT IS USED TO WAIT FOR EVENT FLAGS OF A GIVEN SET
   5901					;
   5902					;	WD. 00 -- DIC (43.) & DPB SIZE (3.)
   5903					;	WD. 01 -- SET NUMBER
   5904					;	WD. 02 -- FLAGS MASK FOR THIS SET
   5905					;
   5906					;
   5907					; A FIVE-WORD DPB OF THE FOLLOWING FORMAT IS USED TO WAITFOR EVENT FLAGS
   5908					; OF SET FOUR:
   5909					;
   5910					;	WD. 00 -- DIC (15.) & DPB SIZE (5.),
   5911					;	WD. 01 -- MASK WORD FOR FLAGS 1-16,
   5912					;	WD. 02 -- MASK WORD FOR FLAGS 17-32,
   5913					;	WD. 03 -- MASK WORD FOR FLAGS 33-48,
   5914					;	WD. 04 -- MASK WORD FOR FLAGS 49-64.
   5915					;
   5916					; MASK WORD BITS FROM RIGHT-TO-LEFT REPRESENT INCREASING EVENT FLAG
   5917					; NUMBERS, AND A SET MASK WORD BIT INDICATES "WAITFOR THE CORRESPONDING
   5918					; EVENT FLAG".
   5919					;
   5920					; THE FOLLOWING STATUS IS RETURNED.
   5921					;
   5922					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5923					; OF ONE (+1).
   5924					;
   5925					; CC-C SET TO INDICATE REJECTION, AND DIRECTIVE STATUS OF:
   5926					;
   5927					;	R0 -- -97 -- NO EVENT FLAG SPECIFIED IN MASK WORD(S),
   5928					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   5929					;-
   5930					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   5931					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   5932					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   5933					;	R0 -- PC OF EMT INSTRUCTION
   5934					;	R1 -- WORD FOLLOWING DIC & SIZE
   5935					;	R2 -- DPB SIZE
   5936					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   5937					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   5938					;
   5939					;
   5940					;
   5941					; EVEN FLAG SET IS FOUR.  I.E., WAIT FOR ANY OF SIXTY-FOUR EVENT FLAGS.
   5942					;
   5943					; SET 64-BIT FLAGS MASK IN ATL NODE AND ACCUMULATE 'OR' OF MASK WORDS
   5944					; IN R2.  THE 64-BIT MASK IS SET BY MOVING FOUR WORDS FROM THE DPB TO
   5945					; THE ATL NODE.
   5946					;
   5947					; IF NO FLAG INDICATED (ALL 64 BITS ARE ZERO), RETURN STS=-97.
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 116-1
DIRECTIVE -- WAITFOR LOGICAL 'OR' OF FLAGS

   5948					;
   5949	021734	022702 	000005 		.D.WFL::CMP	#5,R2		;THREE OR 5 WORD DPB?
   5950	021740	001020 				BNE	10$		;THREE WORD DPB (WAIT FOR ONE SET)
   5951	021742	010502 				MOV	R5,R2		;SETUP R2 TO FILL ATL NODE
   5952	021744	062702 	000024 			ADD	#A.FM,R2
   5953	021750					MFPS	(R1)+,@R2	;MASK FOR FLAGS 1-16
	021750	012112 				MOV	(R1)+,@R2
   5954	021752	012203 				MOV	(R2)+,R3
   5955									;MASK FOR FLAGS 17-32
   5956	021754					MFPS	(R1)+,@R2
	021754	012112 				MOV	(R1)+,@R2
   5957	021756	052203 				BIS	(R2)+,R3
   5958									;MASK FOR FLAGS 33-48
   5959	021760					MFPS	(R1)+,@R2
	021760	012112 				MOV	(R1)+,@R2
   5960	021762	052203 				BIS	(R2)+,R3
   5961	021764					MFPS	@R1,@R2		;MASK FOR FLAGS 49-64 (LAST DPB WORD)
	021764	011112 				MOV	@R1,@R2
   5962	021766	051203 				BIS	@R2,R3
   5963	021770	001731 				BEQ	SEX97		;RETURN STS=-97 IF NO FLAG INDICATED
   5964					;
   5965	021772	112765 	000024 	000014 		MOVB	#TS.WF4,A.TS(R5) ;SET WAITFOR-SET-FOUR TASK STATUS
   5966					;
   5967	022000	104401 				TRAP	DR.01		;RETURN DIRECTIVE STS=+1
   5968					;
   5969	022002				10$:	MFPS	(R1)+,R2	;FIND THE SET NUMBER
	022002	012102 				MOV	(R1)+,R2
   5970	022004	001415 				BEQ	30$		;ILLEGAL SET NUMBER
   5971	022006					MFPS	(R1)+,R3	;FIND THE FLAGS TO WAIT FOR
	022006	012103 				MOV	(R1)+,R3
   5972	022010	020227 	000004 			CMP	R2,#4		;LEGAL SET NUMBER?
   5973	022014	101011 				BHI	30$		;NO -- ILLEGAL SET TO WAIT FOR
   5974	022016	005302 				DEC	R2		;DECREMENT SO SET1 IS 0
   5975	022020	006302 				ASL	R2		;MULTIPLY BY 2
   5976	022022	062702 	000014 			ADD	#TS.WF0,R2	;POINT TO THE CORRECT ATL STATUS
   5977	022026	110265 	000014 			MOVB	R2,A.TS(R5)	;SET THE CORRECT STATUS IN THE ATL NODE
   5978	022032	010365 	000024 			MOV	R3,A.FM(R5)	;SET UP THE FLAGS MASK WORD FOR THESE EVENT FLAGS
   5979	022036	104401 				TRAP	DR.01		;RETURN STS +1
   5980					;
   5981	022040	104636 			30$:	TRAP	DE.98		;ILLEGAL SET NUMBER
DMSED	- SIGNIFICANT EVENT DIR	MACRO M1110  15-OCT-79 13:47  PAGE 117
DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT

   5983					.SBTTL	DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT
   5984					;+
   5985					; THE "WAIT FOR NEXT SIGNIFICANT EVENT" DIRECTIVE
   5986					;
   5987					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE
   5988					; ISSUING TASK UNTIL THE NEXT SIGNIFICANT EVENT HAS BEEN DECLARED.
   5989					;
   5990					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   5991					;
   5992					;	WD. 00 -- DIC (49.) & DPB SIZE (1.).
   5993					;
   5994					; THE FOLLOWING STATUS IS RETURNED:
   5995					;
   5996					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   5997					; OF ONE (+1).
   5998					;
   5999					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6000					;
   6001					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   6002					;-
   6003					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6004					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6005					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   6006					;	R0 -- PC OF EMT INSTRUCTION
   6007					;	R1 -- WORD FOLLOWING DIC & SIZE
   6008					;	R2 -- DPB SIZE
   6009					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6010					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6011					;
   6012					;
   6013	022042	011505 			.D.WSE::MOV	@R5,R5		;ADVANCE R5 (ATL NODE POINTER)
   6014	022044	012737 	000001 	001016'		MOV	#EV.SE,.SEWFL
   6015	022052	104401 				TRAP	DR.01		;RETURN STS=+1.
   6016					;
DMMKT	- "MARK TIME" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 118
DIRECTIVE -- WAITFOR NEXT SIGNIFICANT EVENT

   6018						.TITLE	DMMKT	- "MARK TIME" DIRECTIVE MODULE
   6019	022054					IDENT$	1,0
						.IDENT	/001000/
   6020					;
   6021					;                             COPYRIGHT (C) 1975, 1978 BY
   6022					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6023					;
   6024					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6025					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6026					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6027					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6028					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6029					;
   6030					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6031					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6032					;       CORPORATION.
   6033					;
   6034					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6035					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6036					;
   6037					;		MODULE: "MARK TIME" DIRECTIVE
   6038					;
   6039					;		VERSION: 01-00
   6040					;
   6041					;		AUTHOR:  R. MCLEAN
   6042					;
   6043					;		DATE: 19 APR 75
   6044					;
   6045					;
   6046					;	THIS MODULE CONTAINS:
   6047					;
   6048					;	1 -- CODE TO SERVICE THE "MARK TIME" DIRECTIVE.
   6049					;
   6050					;	MACROS
   6052					;
   6053						.MCALL	CALL,RETURN,MFPI,MTPI,MTPS,MFPS
DMMKT	- "MARK TIME" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 119
DIRECTIVE -- MARK TIME

   6056						.SBTTL	DIRECTIVE -- MARK TIME
   6057					;+
   6058					; THE "MARK TIME" DIRECTIVE
   6059					;
   6060					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DECLARE A SIGNIFICANT EVENT
   6061					; IN AN INDICATED TIME INTERVAL FROM ISSUANCE.
   6062					;
   6063					; IF AN EVENT FLAG IS SPECIFIED, IT IS CLEARED AT ISSUANCE AND SET
   6064					; AT THE TIME OF THE SIGNIFICANT EVENT.
   6065					;
   6066					;
   6067					; IF  AN EVENT FLAG NUMBER
   6068					; IS SPECIFIED, THE SIGNIFICANT EVENT WILL STILL OCCUR AFTER
   6069					; THE INDICATED TIME INTERVAL.
   6070					;
   6071					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6072					;
   6073					;	WD. 00 -- DIC (23.) & DPB SIZE (5.),
   6074					;	WD. 01 -- EVENT FLAG NUMBER (EFN),
   6075					;	WD. 02 -- TIME INTERVAL MAGNITUDE, ( IN TICS)
   6076					;	WD. 03 -- RESCHEDULE INTERVAL (IN TICS)
   6077					;	WD. 04 -- AST TRAP ADDRESS
   6078					;
   6079					; THE FOLLOWING STATUS IS RETURNED:
   6080					;
   6081					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6082					; OF ONE (+1).
   6083					;
   6084					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6085					;
   6086					;	-01 -- UNAVAILABLE ENTRY (FOR CLOCK LIST),
   6087					;
   6088					;	-97 -- INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   6089					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6090					;-
   6091					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6092					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6093					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6094					;
   6095					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6096					;
   6097					;
   6098									;R1 IS POINTING TO EFN IN DPB
   6099					;
   6100					;
   6101	022054				.D.MKT::CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	022054	004737 	041600'			JSR	PC,.CEFN
   6102									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   6103									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   6104									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   6105									;SPECIFIED), RETURN WITH R2=R3=00.
   6106									;CONDITION CODES ARE SET PER "TST R3".
   6107					;
   6108	022060	001001 				BNE	10$		;ALL OK WITH EFN
   6109	022062	104637 				TRAP	DE.97		;RETURN STS=-97
   6110	022064	062701 	000004 		10$:	ADD	#4,R1		;R1 IS POINTING TO THE EFN, ADVANCE TO THE
   6111									;FIRST WORD (MAGNITUDE) OF TIME INTERVAL.
DMMKT	- "MARK TIME" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 119-1
DIRECTIVE -- MARK TIME

   6112					;
   6113	022070	010246 				MOV	R2,-(SP)	;PUSH EFN WORD ADDRESS
   6114	022072	010346 				MOV	R3,-(SP)	;PUSH EFN MASK
   6115					;
   6116	022074					MFPI	(R1)		;PUSH THE RESCHED INTERVAL
	022074	011146 				MOV	(R1),-(SP)
   6117	022076					MFPI	-(R1)		;PUSH TIME INTERVAL MAGNITUED MAGNITUDE
	022076	014146 				MOV	-(R1),-(SP)
   6118	022100					MFPI	4(R1)		;PUSH AST TRAP ADDRES
	022100	016146 	000004 			MOV	4(R1),-(SP)
   6119					;
   6120					;
   6121					; STACK & REGISTER SUMMARY:
   6122					;
   6123					;	SP+10 -- FLAG WORD ADDRESS (OR ZERO)
   6124					;	SP+06 -- FLAG MASK (OR ZERO)
   6125					;	SP+04 -- TIME RESCHEDULE INTERVAL
   6126					;	SP+02 -- TIME INTERVAL
   6127					;	SP+00 -- AST TRAP ADDRESS
   6128					;
   6129					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   6130					;	R1 -- ADDRESS OF NODE FOR CLOCK QUEUE
   6131					;
   6132	022104	046676 	000006 	000010 		BIC	+6(SP),@+10(SP)	;CLEAR INDICATED EVENT FLAG
   6133					;
   6134	022112	012700 	002370'			MOV	#.CLKBA,R0	;POINT TO BEGINNING OF CLOCK LIST
   6135	022116	022700 	002574'		20$:	CMP	#.CLKEA,R0	;END OF LIST?
   6136	022122	001001 				BNE	30$		;NO -- MUST BE OK
   6137	022124	104777 				TRAP	DE.01		;YES -- RAN OUT OF CLOCK ENTRIES
   6138	022126	005710 			30$:	TST	@R0		;LOOK FOR A FREE ENTRY
   6139	022130	001403 				BEQ	40$		;FOUND ONE
   6140	022132	062700 	000014 			ADD	#C.SZ,R0	;NOT HERE -- TRYNEXT ENTRY
   6141	022136	000767 				BR	20$
   6142					;
   6143					;
   6144	022140	010520 			40$:	MOV	R5,(R0)+	;ATL NODE OF ISSUING TASK
   6145	022142	012620 				MOV	(SP)+,(R0)+	;AST ADDRESS
   6146	022144	012620 				MOV	(SP)+,(R0)+	;(POP) SCHEDULE INTERVAL
   6147	022146	012620 				MOV	(SP)+,(R0)+	;(POP) RESCHEDULE INTERVAL
   6148	022150	012620 				MOV	(SP)+,(R0)+	;(POP) EVENT FLAG MASK
   6149	022152	012620 				MOV	(SP)+,(R0)+	;(POP) EVENT FLAG WORD ADDRESS
   6150					;
   6151	022154	104401 				TRAP	DR.01		;RETURN STS=+1
   6152					;
DMCMT	- "CANCEL MARK TIME" DI	MACRO M1110  15-OCT-79 13:47  PAGE 120
DIRECTIVE -- MARK TIME

   6154						.TITLE	DMCMT	- "CANCEL MARK TIME" DIRECTIVE MODULE
   6155	022156					IDENT$	1,0
						.IDENT	/001000/
   6156					;
   6157					;                             COPYRIGHT (C) 1975, 1978 BY
   6158					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6159					;
   6160					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6161					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6162					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6163					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6164					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6165					;
   6166					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6167					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6168					;       CORPORATION.
   6169					;
   6170					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6171					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6172					;
   6173					;		MODULE: "CANCEL MARK TIME" DIRECTIVE
   6174					;
   6175					;		VERSION: 01-00
   6176					;
   6177					;		AUTHOR:  R. MCLEAN
   6178					;
   6179					;		DATE: 19 MAR 75
   6180					;
   6181					;
   6182					;	THIS MODULE CONTAINS:
   6183					;
   6184					;	1 -- CODE TO SERVICE THE "CANCEL MARK TIME" DIRECTIVE.
   6185					;
   6186					;	MACROS
   6187					;
   6189						.MCALL	CALL,RETURN
DMCMT	- "CANCEL MARK TIME" DI	MACRO M1110  15-OCT-79 13:47  PAGE 121
DIRECTIVE -- CANCEL MARK-TIME REQUESTS

   6192						.SBTTL	DIRECTIVE -- CANCEL MARK-TIME REQUESTS
   6193					;+
   6194					; THE "CANCEL MARK-TIME REQUESTS" DIRECTIVE
   6195					;
   6196					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CANCEL MARK-TIME REQUESTS
   6197					; THAT HAVE BEEN MADE BY THE ISSUING TASK.
   6198					;
   6199					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED TO CANCEL ALL MARK-TIME
   6200					; REQUESTS THAT HAVE BEEN MADE BY THE ISSUING TASK:
   6201					;
   6202					;	WD. 00 -- DIC (21.) & DPB SIZE (1.).
   6203					;
   6204					;
   6205					; THE FOLLOWING STATUS IS RETURNED:
   6206					;
   6207					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6208					; OF ONE (R0 - +1).
   6209					;
   6210					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6211					;
   6212					;	R0 -- -97 -- INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   6213					;	R0 -- -99 -- DIC OR DPB SIZE IS INVALID.
   6214					;-
   6215					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6216					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   6217					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6218					;	R0 -- PC OF EMT INSTRUCTION
   6219					;	R1 -- WORD FOLLOWING DIC & SIZE
   6220					;	R2 -- DPB SIZE
   6221					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6222					;
   6223					;
   6224					; ALL MARK-TIME REQUESTS BY THE ISSUING TASK ARE TO BE DELETED
   6225					; FROM THE CLOCK QUEUE.
   6226					;
   6227					;
   6228	022156	010546 			.D.CMT::MOV	R5,-(SP)	;SAVE CURRENT TASK POINTER
   6229	022160	012704 	002370'			MOV	#.CLKBA,R4	;USE R4 TO SCAN DEQUE
   6230					;
   6231	022164	020427 	002574'		50$:	CMP	R4,#.CLKEA	;END OF SCAN (END OF DEQUE)?
   6232	022170	001002 				BNE	60$
   6233	022172	012605 				MOV	(SP)+,R5	;RESTORE CURRENT TASK POINTER
   6234	022174	104401 				TRAP	DR.01		;YES -- RETURN STS=+1.
   6235									;NO -- CHECK NODE POINTED TO BY R4
   6236	022176	026405 	000000 		60$:	CMP	C.AT(R4),R5	;YES -- WAS REQUEST MADE BY ISSUING TASK?
   6237	022202	001005 				BNE	45$		;NO -- NEXT NODE
   6238									;DELETE NODE (PER R4) FROM CLOCK QUEUE, AND
   6239	022204					CALL	.CKDEL		;QUEUE NODE (R4 IS NOT ALTERED).
	022204	004737 	041666'			JSR	PC,.CKDEL
   6240					;
   6241					;
   6242	022210	000765 				BR	50$		;TEST FOR END OF DEQUE
   6243					;
   6244	022212	012605 			90$:	MOV	(SP)+,R5	;RESTORE CURRENT TASK POINTER
   6245	022214	104637 				TRAP	DE.97		;TO RETURN STS=-97.
   6246					;
   6247	022216	062704 	000014 		45$:	ADD	#C.SZ,R4	;UPDATE THE Q SIZE TO LOOK AT NEXT ENTRY
DMCMT	- "CANCEL MARK TIME" DI	MACRO M1110  15-OCT-79 13:47  PAGE 121-1
DIRECTIVE -- CANCEL MARK-TIME REQUESTS

   6248	022222	000760 				BR	50$
   6249					;
DMSUS	- "SUSPEND" & "RESUME" 	MACRO M1110  15-OCT-79 13:47  PAGE 122
DIRECTIVE -- CANCEL MARK-TIME REQUESTS

   6251						.TITLE	DMSUS	- "SUSPEND" & "RESUME" DIRECTIVES MODULE
   6252	022224					IDENT$	1,0
						.IDENT	/001000/
   6253					;
   6254					;                             COPYRIGHT (C) 1975, 1978 BY
   6255					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6256					;
   6257					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6258					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6259					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6260					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6261					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6262					;
   6263					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6264					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6265					;       CORPORATION.
   6266					;
   6267					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6268					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6269					;
   6270					;		MODULE: "SUSPEND" & "RESUME" DIRECTIVES
   6271					;
   6272					;		VERSION: 01-00
   6273					;
   6274					;		AUTHOR: R. MCLEAN
   6275					;
   6276					;		DATE: 19 MAR 75
   6277					;
   6278					;
   6279					;	THIS MODULE CONTAINS:
   6280					;
   6281					;	1 -- CODE TO SERVICE THE "SUSPEND" DIRECTIVE,
   6282					;	2 -- CODE TO SERVICE THE "RESUME" DIRECTIVE.
   6283					;
   6284					;	MACROS
   6285					;
   6287						.MCALL	CALL,RETURN
DMSUS	- "SUSPEND" & "RESUME" 	MACRO M1110  15-OCT-79 13:47  PAGE 123
DIRECTIVE -- SUSPEND EXECUTION

   6290						.SBTTL	DIRECTIVE -- SUSPEND EXECUTION
   6291					;+
   6292					; THE "SUSPEND" DIRECTIVE
   6293					;
   6294					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE
   6295					; ISSUING TASK.
   6296					;
   6297					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6298					;
   6299					;	WD. 00 -- DIC (23.) & DPB SIZE (1.).
   6300					;
   6301					; THE FOLLOWING STATUS IS RETURNED:
   6302					;
   6303					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6304					; OF TWO (+2).  TWO IS RETURNED SO THAT "RECEIVE" CAN BE IDENTIFIED IN THE CASE
   6305					; OF A "RECEIVE OR SUSPEND" DIRECTIVE.
   6306					;
   6307					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6308					;
   6309					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6310					;-
   6311					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6312					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   6313					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6314					;	R0 -- PC OF EMT INSTRUCTION
   6315					;	R1 -- WORD FOLLOWING DIC & SIZE
   6316					;	R2 -- DPB SIZE
   6317					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6318					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6319					;
   6320					; R5 IS SET TO THE ATL NODE ADDRESS OF THE TASK OF NEXT LOWEST PRIORITY
   6321					; THAN THE ISSUING TASK.
   6322					;
   6323					; COMMON CODE FOR "SUSPEND" & "RECEIVE OR SUSPEND" -- R5 CONTAINS THE
   6324					; ISSUING TASK'S ATL NODE ADDRESS.
   6325					;
   6326	022224	112765 	000012 	000014 	.D.SUS::MOVB	#TS.SUS,A.TS(R5) ;CHANGE TASK STATUS TO "SUSPENDED"
   6327	022232	011505 				MOV	@R5,R5		;POINT R5 TO NEXT LOWEST PRIORITY TASK
   6328	022234	104402 				TRAP	DR.02		;AND RETURN STS=+2.
DMSUS	- "SUSPEND" & "RESUME" 	MACRO M1110  15-OCT-79 13:47  PAGE 124
DIRECTIVE -- RESUME TASK EXECUTION

   6330					.SBTTL	DIRECTIVE -- RESUME TASK EXECUTION
   6331					;+
   6332					; THE "RESUME" DIRECTIVE
   6333					;
   6334					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RESUME THE EXECUTION OF A TASK
   6335					; THAT HAS ISSUED A "SUSPEND" DIRECTIVE.
   6336					;
   6337					; A THREE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6338					;
   6339					;	WD. 00 -- DIC (25.) & DPB SIZE (3.),
   6340					;	WD. 01 -- TASK NAME (FIRST HALF),
   6341					;	WD. 02 -- TASK NAME (SECOND HALF).
   6342					;
   6343					; THE FOLLOWING STATUS IS RETURNED:
   6344					;
   6345					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6346					; OF ONE (+1).
   6347					;
   6348					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6349					;
   6350					;	-02 -- TASK NOT INSTALLED,
   6351					;	-07 -- TASK NOT ACTIVE,
   6352					;	-08 -- TASK NOT SUSPENDED,
   6353					;
   6354					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6355					;-
   6356					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6357					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   6358					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   6359					;	R0 -- PC OF EMT INSTRUCTION
   6360					;	R1 -- WORD FOLLOWING DIC & SIZE
   6361					;	R2 -- DPB SIZE
   6362					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6363					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6364					;
   6365					;	R5 -- LAST WORD OF DPB.
   6366					;
   6367					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6368					;
   6369	022236				.D.RES::CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	022236	004737 	042754'			JSR	PC,..FSTD
   6370									;ZERO IF TASK NAME NOT FOUND (AND SET
   6371									;CONDITION CODES PER "TST R2").
   6372									;
   6373									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   6374					;
   6375	022242	001001 				BNE	10$		;IF TASK NOT INSTALLED, RETURN STS=-02.
   6376	022244	104776 				TRAP	DE.02
   6377	022246	032762 	000001 	000006 	10$:	BIT	#SF.TA,S.FW(R2)	;IS TASK ACTIVE?
   6378	022254	001424 				BEQ	70$		;NO -- RETURN STS=-07.
   6379	022256	012703 	006462'			MOV	#.ATLLH,R3	;YES -- SETUP FOR ATL SCAN
   6380	022262				20$:
   6381	022262	011303 				MOV	@R3,R3		;SETUP R3 TO EXAMINE NEXT ENTRY
   6382	022264	020327 	006462'			CMP	R3,#.ATLLH	;END OF DEQUE?
   6383	022270	001416 				BEQ	70$		;YES -- RETURN STS=-07.
   6384	022272	026302 	000016 			CMP	A.TD(R3),R2	;NO -- STD ADDRESS MATCH?
   6385	022276	001371 				BNE	20$		;NO -- CHECK NEXT ATL NODE
DMSUS	- "SUSPEND" & "RESUME" 	MACRO M1110  15-OCT-79 13:47  PAGE 124-1
DIRECTIVE -- RESUME TASK EXECUTION

   6386	022300				30$:
   6387	022300	126327 	000014 	000012 		CMPB  A.TS(R3),#TS.SUS	;NO -- IS TASK SUSPENDED?
   6388	022306	001006 				BNE	60$
   6389					;
   6390	022310	112763 	000010 	000014 		MOVB	#TS.RUN,A.TS(R3) ;SET STATUS TO RUNNING
   6391									;YES -- CHANGE STATUS TO RUNNING, DECLARE A
   6392	022316					CALL  ..DSEV		;SIGNIFICANT EVENT, AND RETURN STS=+1.
	022316	004737 	042444'			JSR	PC,..DSEV
   6393	022322	104401 				TRAP	DR.01		;AND RETURN STS=+1.
   6394	022324	104770 			60$:	TRAP	DE.08		;NO -- RETURN STS=-08.
   6395					;
   6396	022326	104771 			70$:	TRAP	DE.07		;COMMON RETURN STS=-07.
   6397					;
DMEXT	- "EXIT" DIRECTIVE MODU	MACRO M1110  15-OCT-79 13:47  PAGE 125
DIRECTIVE -- RESUME TASK EXECUTION

   6399						.TITLE	DMEXT	- "EXIT" DIRECTIVE MODULE
   6400	022330					IDENT$	1,0
						.IDENT	/001000/
   6401					;
   6402					;                             COPYRIGHT (C) 1975, 1978 BY
   6403					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6404					;
   6405					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6406					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6407					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6408					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6409					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6410					;
   6411					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6412					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6413					;       CORPORATION.
   6414					;
   6415					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6416					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6417					;
   6418					;		MODULE: "EXIT" DIRECTIVE
   6419					;
   6420					;		VERSION: 01-00
   6421					;
   6422					;		AUTHOR: R. MCLEAN
   6423					;
   6424					;		DATE: 19 MAR 75
   6425					;
   6426					;
   6427					;	THIS MODULE CONTAINS:
   6428					;
   6429					;	1 -- CODE TO SERVICE THE "EXIT" DIRECTIVE
   6430					;
   6431					;	MACROS
   6432					;
   6434						.MCALL	CALL,RETURN
DMEXT	- "EXIT" DIRECTIVE MODU	MACRO M1110  15-OCT-79 13:47  PAGE 126
DIRECTIVE -- TASK EXIT

   6437						.SBTTL	DIRECTIVE -- TASK EXIT
   6438					;+
   6439					; THE "TASK EXIT" DIRECTIVE
   6440					;
   6441					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO TERMINATE THE EXECUTION OF THE
   6442					; ISSUING TASK.
   6443					;
   6444					; A ONE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6445					;
   6446					;	WD. 00 -- DIC (27.) & DPB SIZE (1.).
   6447					;
   6448					; THE FOLLOWING STATUS IS RETURNED:
   6449					;
   6450					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6451					; OF ONE (+1).
   6452					;
   6453					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6454					;
   6455					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6456					;-
   6457					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6458					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   6459					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6460					;	R1 -- ADDRESS OF WORD FOLLOWING DIC & SIZE
   6461					;	R2 -- DPB SIZE
   6462					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6463					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   6464					;
   6465					;
   6466					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6467					;
   6468					; R5 CONTAINS THE EXITING TASK'S ATL NODE ADDRESS.
   6469					;
   6470	022330	042766 	000340 	000020 	.D.EXT::BIC  #000340,EM.DRO(SP)	;SET ISSUING TASK'S PROCESSRO PRIROITY TO ZERO TO
   6471									;PREVENT RETURN TO TASK IF EXIT DIRECTIVE HAS
   6472									;BEEN ISSUED FROM NON TASK LEVEL
   6473					;
   6474	022336	112765 	000026 	000014 		MOVB  #TS.EXT,A.TS(R5)	;CHANGE STATUS TO "EXIT", INDICATE
   6475	022344	005065 	000024 			CLR	A.FM+0(R5)	;NO TERMINATION NOTIFICATION, AND
   6476	022350	104401 				TRAP	DR.01		;EXIT DIRECTIVE SERVICE (SET STS=+1)
   6477					;
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 127
DIRECTIVE -- TASK EXIT

   6479						.TITLE	DMQIO	- "QUEUE I/O" DIRECTIVE MODULE
   6480	022352					IDENT$	1,0
						.IDENT	/001000/
   6481					;
   6482					;                             COPYRIGHT (C) 1975, 1978 BY
   6483					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6484					;
   6485					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6486					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6487					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6488					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6489					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6490					;
   6491					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6492					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6493					;       CORPORATION.
   6494					;
   6495					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6496					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6497					;
   6498					;		MODULE: "QUEUE I/O" DIRECTIVE
   6499					;
   6500					;		VERSION: 01-00
   6501					;
   6502					;		AUTHOR: R. MCLEAN
   6503					;
   6504					;		DATE: 19 JUL 75
   6505					;
   6506					;
   6507					;	THIS MODULE CONTAINS:
   6508					;
   6509					;	1 -- CODE TO SERVICE THE "QUEUE I/O" DIRECTIVE.
   6510					;	2 -- CODE TO SERVICE THE "QUEUE I/O AND WAIT" DIRECTIVE.
   6511					;
   6512					;	MACROS
   6513					;
   6515						.MCALL	CALL,RETURN,MFPI,MTPI,MTPS,MFPS
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 128
DIRECTIVE -- QUEUE I/O

   6518						.SBTTL	DIRECTIVE -- QUEUE I/O
   6519					;+
   6520					; THE "QUEUE I/O" DIRECITVE
   6521					;
   6522					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO PLACE AN I/O REQUEST FOR AN
   6523					; INDICATED DEVICE IN A QUEUE OF PRIORITY ORDERED REQUESTS FOR THAT DEVICE-
   6524					; UNIT.  THE DEVICE-UNIT IS SPECIFIED AS A LOGICAL UNIT NUMBER (LUN), WHICH
   6525					; IS MAPPED INTO A PHYSICAL UNIT SPECIFICATION PER LUN ASSIGNMENT.
   6526					;
   6527					; EACH LUN IS REPRESENTED BY AN ENTRY IN THE ISSUING TASK'S LUT (LOGICAL
   6528					; UNIT TABLE) IN THE TASK'S HEADER.  EACH PHYSICAL UNIT IS REPRESENTED
   6529					; BY AN ENTRY IN THE PUD (PHYSICAL UNIT DIRECTORY).  WHEN A LUN IS
   6530					; ASSIGNED TO A PHYSICAL UNIT, THE ADDRESS OF THE CORRESPONDING PUD
   6531					; ENTRY IS SET IN THE CORRESPONDING LUT ENTRY.  WHEN A LUN IS NOT
   6532					; ASSIGNED TO A PHYSICAL UNIT ("DEASSIGNED" OR "ASSIGNED TO NONE"), THE
   6533					; CORRESPONDING LUT ENTRY IS SET TO ZERO.
   6534					;
   6535					; NORMALLY, A SIGNIFICANT EVENT IS DECLARED BY HANDLER TASKS (VIA SYSTEM
   6536					; SUBROUTINES) UPON I/O COMPLETION.
   6537					;
   6538					;	IF AN EVENT FLAG IS SPECIFIED, IT IS CLEARED WHEN THE REQUEST
   6539					;	IS QUEUED, AND SET AT THE SIGNIFICANT EVENT.
   6540					;
   6541					;	IF AN AST SERVICE ENTRY POINT IS SPECIFIED, THE AST WILL OCCUR
   6542					;	UPON I/O COMPLETION WITH THE TASK'S PS, PC, VIRTUAL ZERO (DIRECTIVE
   6543					;	STATUS), AND [ADDRESS OF I/O STATUS BLOCK] PUSHED ONTO THE TASK'S
   6544					;	(USER) STACK.
   6545					;
   6546					; A 6-12 WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6547					;
   6548					;	WD. 00 -- DIC (01.) & DPB SIZE (6-12),
   6549					;	WD. 01 -- I/O FUNCTION CODE,
   6550					;	WD. 02 -- LUN,
   6551					;	WD. 03 -- [EFN] & [PRIORITY],
   6552					;	WD. 04 -- [ADDRESS OF I/O STATUS BLOCK],
   6553					;	WD. 05 -- [I/O DONE AST SERVICE ENTRY POINT],
   6554					;	WD. 06 -- PARAMETER #1,
   6555					;	WD. 07 -- PARAMETER #2,
   6556					;	WD. 10 -- PARAMETER #3,
   6557					;	WD. 11 -- PARAMETER #4,
   6558					;	WD. 12 -- PARAMETER #5,
   6559					;	WD. 13 -- PARAMETER #6.
   6560					;
   6561					; THE FORMAT OF THE I/O REQUEST NODE CREATED IS DESCRIBED
   6562					; UNDER "SYMBOLIC DEFINITIONS".
   6563					;
   6564					; THE FOLLOWING STATUS IS RETURNED:
   6565					;
   6566					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6567					; OF ONE (+1).
   6568					;
   6569					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6570					;
   6571					;	-01 -- UNAVAILABLE POOL NODE FOR REQUEST QUEUE,
   6572					;	-05 -- UNASSIGNED LUN,
   6573					;
   6574					;	-95 -- INVALID PRIORITY (>250.),
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 128-1
DIRECTIVE -- QUEUE I/O

   6575					;	-96 -- INVALID LUN,
   6576					;	-97 -- INVALID EFN (>64.),
   6577					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   6578					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6579					; THE "QUEUE I/O AND WAIT" DIRECITVE
   6580					;
   6581					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO PLACE AN I/O REQUEST FOR AN
   6582					; INDICATED DEVICE IN A QUEUE OF PRIORITY ORDERED REQUESTS FOR THAT DEVICE-
   6583					; UNIT.  THE DEVICE-UNIT IS SPECIFIED AS A LOGICAL UNIT NUMBER (LUN), WHICH
   6584					; IS MAPPED INTO A PHYSICAL UNIT SPECIFICATION PER LUN ASSIGNMENT.
   6585					;
   6586					; EACH LUN IS REPRESENTED BY AN ENTRY IN THE ISSUING TASK'S LUT (LOGICAL
   6587					; UNIT TABLE) IN THE TASK'S HEADER.  EACH PHYSICAL UNIT IS REPRESENTED
   6588					; BY AN ENTRY IN THE PUD (PHYSICAL UNIT DIRECTORY).  WHEN A LUN IS
   6589					; ASSIGNED TO A PHYSICAL UNIT, THE ADDRESS OF THE CORRESPONDING PUD
   6590					; ENTRY IS SET IN THE CORRESPONDING LUT ENTRY.  WHEN A LUN IS NOT
   6591					; ASSIGNED TO A PHYSICAL UNIT ("DEASSIGNED" OR "ASSIGNED TO NONE"), THE
   6592					; CORRESPONDING LUT ENTRY IS SET TO ZERO.
   6593					;
   6594					; NORMALLY, A SIGNIFICANT EVENT IS DECLARED BY HANDLER TASKS (VIA SYSTEM
   6595					; SUBROUTINES) UPON I/O COMPLETION.
   6596					;
   6597					;	IF AN EVENT FLAG IS SPECIFIED, IT IS CLEARED WHEN THE REQUEST
   6598					;	IS QUEUED, AND SET AT THE SIGNIFICANT EVENT.
   6599					;	IF AN EVENT FLAG IS SPECIFIED, A WAIT DIRECTIVE IS ALSO
   6600					;	EXECUTED BEFORE TASK SWITCHING IS ENABLED.
   6601					;
   6602					;	IF NO EVENT FLAG IS SPECIFIED THE I/O WILL BE QUEUE'D
   6603					;	AND THE WAIT DIRECTIVE WILL BE REJECTED (STATUS -97.)
   6604					;
   6605					;
   6606					;	IF AN AST SERVICE ENTRY POINT IS SPECIFIED, THE AST WILL OCCUR
   6607					;	UPON I/O COMPLETION WITH THE TASK'S PS, PC, VIRTUAL ZERO (DIRECTIVE
   6608					;	STATUS), AND [ADDRESS OF I/O STATUS BLOCK] PUSHED ONTO THE TASK'S
   6609					;	(USER) STACK.
   6610					;
   6611					; A 6-12 WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6612					;
   6613					;	WD. 00 -- DIC (03.) & DPB SIZE (6-12),
   6614					;	WD. 01 -- I/O FUNCTION CODE,
   6615					;	WD. 02 -- LUN,
   6616					;	WD. 03 -- [EFN] & [PRIORITY],
   6617					;	WD. 04 -- [ADDRESS OF I/O STATUS BLOCK],
   6618					;	WD. 05 -- [I/O DONE AST SERVICE ENTRY POINT],
   6619					;	WD. 06 -- PARAMETER #1,
   6620					;	WD. 07 -- PARAMETER #2,
   6621					;	WD. 10 -- PARAMETER #3,
   6622					;	WD. 11 -- PARAMETER #4,
   6623					;	WD. 12 -- PARAMETER #5,
   6624					;	WD. 13 -- PARAMETER #6.
   6625					;
   6626					; THE FORMAT OF THE I/O REQUEST NODE CREATED IS DESCRIBED
   6627					; UNDER "SYMBOLIC DEFINITIONS".
   6628					;
   6629					; THE FOLLOWING STATUS IS RETURNED:
   6630					;
   6631					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 128-2
DIRECTIVE -- QUEUE I/O

   6632					; OF ONE (+1).
   6633					;
   6634					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6635					;
   6636					;	-01 -- UNAVAILABLE POOL NODE FOR REQUEST QUEUE,
   6637					;	-05 -- UNASSIGNED LUN,
   6638					;	-06 -- HANDLER TASK NOT DECLARED RESIDENT,
   6639					;
   6640					;	-95 -- INVALID PRIORITY (>250.),
   6641					;	-96 -- INVALID LUN,
   6642					;	-97 -- INVALID EFN (>64.), OR 0 EVENT FLAG (I/O QUEUE'D BUT WAIT NOT EXECUTED),
   6643					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   6644					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6645					;-
   6646					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6647					; DIRECTIVE ISSUING TASK'S PS, PC, & R5-R0 PUSHED ONTO THE
   6648					; KERNEL STACK, AND R5-R0 SET AS FOLLOWS:
   6649					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6650					;
   6651	022352	010346 			.D.QIO::MOV	R3,-(SP)	;SAVE THE DIC TO DETERMINE IF QIO& WAIT OR JUST QIO.
   6652					;
   6653	022354				20$:	MFPS	(R1)+,R3	;SET R3 TO FUNCTION CODE
	022354	012103 				MOV	(R1)+,R3
   6654									;(LEAVE R1 POINTING TO LUN WORD)
   6655					;
   6656	022356					MFPI	(R1)+		;PUSH LUN, AND CONVERT TO PUD ENTRY ADR
	022356	012146 				MOV	(R1)+,-(SP)
   6657	022360					CALL	.VCLUN		;(LEAVE R1 POINTING TO EFN/PRI WORD)
	022360	004737 	015266'			JSR	PC,.VCLUN
   6658									;IF INVALID LUN, RETURN STS=-96.
   6659	022364	011600 				MOV	@SP,R0		;SET R0 TO PUD ENTRY ADR IF LUN ASSIGNED
   6660	022366	001001 				BNE	40$		;IF UN-ASSIGNED LUN, RETURN STS=-05.
   6661	022370	104773 				TRAP	DE.05
   6662	022372	010246 			40$:	MOV	R2,-(SP)	;PUSH DPB SIZE
   6663					;
   6664									;TO ACCESS REQUESTOR'S HEADER BY '.VCLUN').
   6665					;
   6666	022374					MFPI	+4(R1)		;PUSH I/O DONE AST ENTRY PT (OR ZERO)
	022374	016146 	000004 			MOV	+4(R1),-(SP)
   6667					;
   6668	022400					MFPI	+02(R1)		;PUSH I/O STATUS BLOCK ADR (OR ZERO),
	022400	016146 	000002 			MOV	+02(R1),-(SP)
   6669	022404	011602 				MOV	@SP,R2		;AND CLEAR TWO-WORD STATUS BLOCK.
   6670	022406	001404 				BEQ	50$		;(IF SPECIFIED).  IF PART OF STATUS
   6671	022410	005046 				CLR	-(SP)		;OUT OF ADDRESS SPACE, RETURN
   6672	022412					MTPI	(R2)+
	022412	012622 				MOV	(SP)+,(R2)+
   6673	022414	005046 				CLR	-(SP)
   6674	022416					MTPI	@R2
	022416	012612 				MOV	(SP)+,@R2
   6675	022420				50$:
   6676	022420	010346 				MOV	R3,-(SP)	;PUSH I/O FUNCTION CODE WORD
   6677					;
   6678									;R1 IS POINTING TO [EFN] IN DPB.
   6679					;
   6680	022422					CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	022422	004737 	041600'			JSR	PC,.CEFN
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 128-3
DIRECTIVE -- QUEUE I/O

   6681									;IN R2, AND (2) FLAG MASK IN R3 (R2 IS
   6682									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   6683									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   6684									;SPECIFIED), RETURN WITH R2=R3=00.
   6685									;CONDITION CODES ARE SET PER "TST R3".
   6686					;
   6687	022426					MFPS	@R1,R4		;SET PRIORITY IN R4, EFN IN HIGH ORDER
	022426	011104 				MOV	@R1,R4
   6688									;BYTE OF R0, AND ZERO IN LOW ORDER BYTE
   6689	022430	010400 				MOV	R4,R0		;OF R0
   6690	022432	105004 				CLRB	R4
   6691	022434	000304 				SWAB	R4
   6692	022436	000300 				SWAB	R0
   6693	022440	105000 				CLRB	R0
   6694									;IS A PRIORITY SPECIFIED?
   6695	022442	001002 				BNE	70$		;YES -- CHECK ITS VALIDITY
   6696	022444	156504 	000010 			BISB	A.RP(R5),R4	;NO -- USE RUN PARIORITY OF ISSUING TASK
   6697									;("BISB" INTO A CLEARED R4 EFFECTS A
   6698									;"MOVB" WITHOUT SIGN EXTENSION.)
   6699					;
   6700	022450				70$:	MFPI	-(R1)		;PUSH LUN & FORM LUN/EFN WORD ON STACK.
	022450	014146 				MOV	-(R1),-(SP)
   6701	022452	050016 				BIS	R0,@SP		;(R1 IS LEFT POINTING TO LUN)
   6702					;
   6703	022454	010446 				MOV	R4,-(SP)	;PUSH PRI/BYTE RESERVED FOR DPB SIZE
   6704					;
   6705					; STACK & REGISTER SUMMARY:
   6706					;
   6707					;	SP+14 -- PUD ENTRY ADDRESS
   6708					;	SP+12 -- DPB SIZE
   6709					;	SP+10 -- AST ENTRY PT (OR ZERO)
   6710					;	SP+06 -- I/O STATUS BUF ADR (OR ZERO)
   6711					;	SP+04 -- I/O FUNCTION CODE
   6712					;	SP+02 -- LUN/EFN WORD
   6713					;	SP+00 -- PRI/RESERVED BYTE
   6714					;
   6715					;	R5 -- ATL NODE ADR OF ISSUING TASK
   6716					;	R2 & R3 SETUP TO CLEAR EVENT FLAG
   6717					;
   6718	022456	116666 	000012 	000001 		MOVB	+12(SP),+1(SP)	;SET DPB SIZE IN "PRI/DPB-SIZE" WORD
   6719					;
   6720	022464	010100 				MOV	R1,R0		;SETUP R0 TO FETCH I/O PARAMETERS (FROM DPB)
   6721	022466	062700 	000010 			ADD	#10,R0
   6722	022472	010046 				MOV	R0,-(SP)	;SAVE R0
   6723					;
   6724	022474	012701 	000040 			MOV	#32.,R1		;SET UP TO PICK A NODE
   6725	022500					CALL	..ALCB
	022500	004737 	043034'			JSR	PC,..ALCB
   6726	022504	010001 				MOV	R0,R1		;SET UP NODE ADDRESS
   6727	022506	103001 				BCC	79$		;OK -- CHECK FUNCTION CODE
   6728	022510	104777 				TRAP	DE.01		;NO -- RETURN POOL EMPTY ERROR
   6729					;
   6730					;
   6731					;
   6732					; REQUEST CAN BE MADE -- STACK & REGISTER SUMMARY:
   6733					;
   6734					;	SP+14 -- PUD ENTRY ADDRESS
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 128-4
DIRECTIVE -- QUEUE I/O

   6735					;	SP+12 -- DPB SIZE
   6736					;	SP+10 -- AST ENTRY PT (OR ZERO)
   6737					;	SP+06 -- I/O STATUS BUF ADR (OR ZERO)
   6738					;	SP+04 -- I/O FUNCTION CODE
   6739					;	SP+02 -- LUN/EFN WORD
   6740					;	SP+00 -- PRI/DPB SIZE
   6741					;
   6742					;	R5 -- ATL NODE ADR OF ISSUING TASK
   6743					;	R1 -- I/O REQUEST NODE ADDRESS
   6744					;	R2 & R3 SETUP TO CLEAR EVENT FLAG
   6745					;	R0 -- POINTING TO FIRST PARAMETER WORD IN DPB
   6746					;
   6747	022512	040312 			79$:	BIC	R3,@R2		;CLEAR EVENT FLAG, IFF SPECIFIED.
   6748									;NOTE -- IF NO EFN SPECIFIED, R3=R3=00.
   6749									;I.E., NO BITS IN LOCATION ZERO ARE CLEARED.
   6750	022514	012600 				MOV	(SP)+,R0	;RESTORE BUFFER ADDRESS
   6751					;
   6752					; FILL I/O REQUEST NODE
   6753					;
   6754	022516	010104 				MOV	R1,R4		;SETUP R4 TO FILL NODE
   6755	022520	022424 				CMP	(R4)+,(R4)+	;MOVE OVER LISTHEAD
   6756	022522	016524 	000016 			MOV	A.TD(R5),(R4)+	;SET STD ADDRESS
   6757					;
   6758	022526	010524 				MOV	R5,(R4)+	;SET ATL NODE ADR OF REQUESTOR
   6759	022530	012624 				MOV	(SP)+,(R4)+	;(POP) SET PRI/DPB-SIZE WORD
   6760	022532	011603 				MOV	@SP,R3		;SAVE LUN/EFN
   6761	022534	012624 				MOV	(SP)+,(R4)+	;(POP) SET LUN/EFN WORD
   6762	022536	012624 				MOV	(SP)+,(R4)+	;(POP) SET I/O FUNCTION CODE
   6763	022540	012624 				MOV	(SP)+,(R4)+	;(POP) SET I/O STATUS BLK ADR (OR ZERO)
   6764	022542	012624 				MOV	(SP)+,(R4)+	;(POP) SET AST ENTRY PT (OR ZERO)
   6765	022544	013724 	001154'			MOV	.SYUIC,(R4)+	;SET THE UIC
   6766					;
   6767	022550	012602 				MOV	(SP)+,R2	;(POP) SET DPB SIZE IN R2, CONVERT
   6768	022552	162702 	000006 			SUB	#6.,R2		;TO NUMBER OF I/O PARAMETERS, AND
   6769	022556	001402 				BEQ	90$		;MOVE PARAMETERS FROM DPB TO I/O
   6770	022560				80$:				;REQUEST NODE.
   6771	022560					MFPS	(R0)+,(R4)+
	022560	012024 				MOV	(R0)+,(R4)+
   6772	022562	077202 				SOB	R2,80$
   6773	022564				90$:
   6774					;
   6775					;
   6776	022564	012602 				MOV	(SP)+,R2	;(POP) SET R2 TO PUD ENTRY ADDRESS, AND
   6777	022566	016204 	000020 			MOV	U.HA(R2),R4	;SET R2 TO HANDLER TASK'S ATL NODE ADDRESS.
   6778					;
   6779					; IF FUNCTION CODE 'RF.XR' IS SET, THIS FUNCTION IS AN "EXPRESS" FUNCTION.
   6780					; EXPRESS REQUESTS ARE NORMALLY DE-QUEUED BEFORE NORMAL REQUESTS. VIZ.,
   6781					; "KILL READ REQUEST", OR "RUNDOWN I/O ON TASK".
   6782					;
   6783	022572	010137 	023010'			MOV	R1,QNDSV	;SAVE THE QIO NODE ADDRESS
   6784	022576	016100 	000014 			MOV	R.FC(R1),R0	;FIND THE FUNCTION CODE
   6785	022602	020027 	002500 			CMP	R0,#IO.STC	;CHECK TO SEE IF LEGAL
   6786	022606	101457 				BLOS	95$		;YES -- DON'T NEED FCP
   6787	022610	010246 				MOV	R2,-(SP)
   6788	022612	010346 				MOV	R3,-(SP)
   6789	022614	010203 				MOV	R2,R3		;FIND THE PUD ADDRESS
   6790	022616	016302 	000040 			MOV	U.ACP(R3),R2	;FIND THE STD ADDRESS OF THE ACP
DMQIO	- "QUEUE I/O" DIRECTIVE	MACRO M1110  15-OCT-79 13:47  PAGE 128-5
DIRECTIVE -- QUEUE I/O

   6791	022622	001015 				BNE	77$		;FOUND ACP -- DON'T DIDDLE CODES
   6792	022624	022700 	011000 			CMP	#IO.WVB,R0	;IS CODE WRITE VIRTUAL?
   6793	022630	001003 				BNE	74$		;NO -- LOOK FOR READ
   6794	022632	012761 	000400 	000014 		MOV	#IO.WLB,R.FC(R1) ;YES SET FUNCTON CODE
   6795	022640	022700 	010400 		74$:	CMP	#IO.RVB,R0	;IS FUNCTION CODE READ VIRTUAL?
   6796	022644	001036 				BNE	93$		;NO -- FORGET IT
   6797	022646	012761 	001000 	000014 		MOV	#IO.RLB,R.FC(R1) ;SET FUNCTION CODE
   6798	022654	000432 				BR	93$
   6799	022656				77$:
   6803	022656	020027 	010400 			CMP	R0,#IO.RVB	;CHECK FOR READ/WRITE VIRTUAL
   6804	022662	001403 				BEQ	71$		;YES -- ATTEMPT TO MAP IT
   6805	022664	020027 	011000 			CMP	R0,#IO.WVB	;MAYBE TRY WRITE
   6806	022670	001003 				BNE	73$		;NO -- CALL FCP
   6807	022672				71$:	CALL	..VTOL		;TRY AND MAP
	022672	004737 	045632'			JSR	PC,..VTOL
   6808	022676	103021 				BCC	93$		;MADE IT -- DON'T CALL FCP
   6809	022700	010337 	023012'		73$:	MOV	R3,QNDSV+2	;SET PUD ADDRESS
   6810	022704	016137 	000014 	023014'		MOV	R.FC(R1),QNDSV+4	;SET FUNCTION CODE
   6811	022712	012701 	023016'			MOV	#PRMBLK,R1	;POINTER TO BUFFER ADDRESS AND EFN
   6812	022716					CALL	.SEND		;SEND BLOCK
	022716	004737 	023170'			JSR	PC,.SEND
   6813	022722	005003 				CLR	R3
   6814	022724	005004 				CLR	R4		;SET DEFAULT PARTITION AND PRI FOR ACP
   6815	022726	010102 				MOV	R1,R2
   6816	022730					CALL	.REQS		;REQ ACP
	022730	004737 	014460'			JSR	PC,.REQS
   6817	022734	012603 				MOV	(SP)+,R3
   6818	022736	012602 				MOV	(SP)+,R2
   6819	022740	000413 				BR	100$
   6820					;
   6821	022742	012603 			93$:	MOV	(SP)+,R3	;RESTORE
   6822	022744	012602 				MOV	(SP)+,R2
   6823	022746				95$:				;(R2 CONTAINS PUD ENTRY ADDRESS)
   6824	022746	062702 	000022 			ADD	#U.RF,R2	;SET R2 TO I/O REQUEST DEQUE LISTHEAD ADR
   6825									;(R1 IS SET TO REQUEST NODE ADDRESS)
   6826	022752					CALL	..IPRI		;AND INSERT REQUEST NODE BY PRIORITY.
	022752	004737 	042540'			JSR	PC,..IPRI
   6827	022756	052764 	000010 	000020 		BIS	#EF.NIR,A.EF+0(R4) ;NO -- SET TRIGGER EVENT FLAG 'EF.NIR'.
   6828	022764					CALL	..DSEV		;DECLARE SIGNIFICANT EVENT TO EFFECT "TRIGGER"
	022764	004737 	042444'			JSR	PC,..DSEV
   6829					;
   6830	022770	022627 	000003 		100$:	CMP	(SP)+,#3	;CHECK THE DIC TO SEE IF QIO AND WAIT
   6831	022774	001401 				BEQ	120$		;YES -- ISSUE THE WAIT
   6832					;				;NO -- JUST RETURN
   6833	022776	104401 				TRAP	DR.01		;RETURN STS=+1
   6834					;
   6835	023000	105003 			120$:	CLRB	R3		;SET UP FOR THE WAIT DIRECTIVE
   6836	023002	000303 				SWAB	R3
   6837	023004	000137 	021660'			JMP	.D.WFO		;ISSUE WAIT DIRECTIVE
   6838					;
   6839	023010	000000 	000000 	000000 	QNDSV:	.WORD	0,0,0		;SAVE AREA FOR NODE
   6840					;
   6841	023016	023010'			PRMBLK:	.WORD	QNDSV		;POINTER TO SEND BUFFER
   6842	023020	000000 				.WORD	0		;EFN (0)
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 129
DIRECTIVE -- QUEUE I/O

   6844						.TITLE	DMSAR	- SEND & RECEIVE DIRECTIVES MODULE
   6845	023022					IDENT$	1,0
						.IDENT	/001000/
   6846					;
   6847					;
   6848					;
   6849					;
   6850					;
   6851					;
   6852					;                             COPYRIGHT (C) 1975, 1978 BY
   6853					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6854					;
   6855					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6856					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6857					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6858					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6859					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6860					;
   6861					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6862					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6863					;       CORPORATION.
   6864					;
   6865					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6866					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6867					;
   6868					;
   6869					;
   6870					;
   6871					;
   6872					;		MODULE: SEND & RECEIVE DIRECTIVES
   6873					;
   6874					;		VERSION: 01-00
   6875					;
   6876					;		AUTHOR: R. MCLEAN
   6877					;
   6878					;		DATE: 19 MAY 75
   6879					;
   6880					;
   6881					;	THIS MODULE CONTAINS:
   6882					;
   6883					;	1 -- CODE TO SERVICE THE "SEND DATA" DIRECTIVE,
   6884					;	2 -- CODE TO SERVICE THE "SEND AND REQUEST OR RESUME" DIRECTIVE,
   6885					;	3 -- CODE TO SERVICE THE "RECEIVE DATA" DIRECTIVE,
   6886					;	4 -- CODE TO SERVICE THE "RECEIVE OR EXIT" DIRECTIVE,
   6887					;	5 -- CODE TO SERVICE THE "RECEIVE OR SUSPEND" DIRECTIVE,
   6888					;
   6889					;	MACROS
   6890					;
   6892						.MCALL	CALL,RETURN,MTPI,MTPS,MFPI,MFPS
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 130
DIRECTIVE -- SEND DATA

   6895						.SBTTL	DIRECTIVE -- SEND DATA
   6896					;+
   6897					; THE "SEND DATA" DIRECTIVE
   6898					;
   6899					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO QUEUE (FIFO) A THIRTEEN WORD
   6900					; BLOCK OF DATA FOR A TASK TO RECEIVE.
   6901					;
   6902					; A FIVE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6903					;
   6904					;	WD. 00 -- DIC (13.) & DPB SIZE (5.),
   6905					;	WD. 01 -- RECEIVER TASK NAME (FIRST HALF),
   6906					;	WD. 02 -- RECEIVER TASK NAME (SECOND HALF),
   6907					;	WD. 03 -- ADDRESS OF THIRTEEN WORD DATA BLOCK,
   6908					;	WD. 04 -- [EVENT FLAG NUMBER (EFN)].
   6909					;
   6910					; WHEN AN EVENT FLAG IS SPECIFIED, A SIGNIFICANT EVENT IS DECLARED
   6911					; (IF THE DIRECTIVE IS PERFORMED) AND THE INDICATED EVENT FLAG IS SET.
   6912					;
   6913					; THE FOLLOWING STATUS IS RETURNED:
   6914					;
   6915					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   6916					; OF ONE (+1).
   6917					;
   6918					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6919					;
   6920					;	-02 -- RECEIVER TASK NOT INSTALLED (NO STD ENTRY FOUND),
   6921					;	-04 -- INSUFFICIENT POOL NODES FOR "SEND",
   6922					;
   6923					;	-97 -- INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   6924					;	-99 -- DIC OR DPB SIZE IS INVALID.
   6925					;-
   6926					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   6927					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   6928					;  STACK, AND R0-R5 SET AS FOLLOWS:
   6929					;	R0 -- PC OF EMT INSTRUCTION
   6930					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   6931					;	R2 -- DPB SIZE
   6932					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   6933					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   6934					;
   6935					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   6936					;
   6937	023022				.D.SEN::CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	023022	004737 	042754'			JSR	PC,..FSTD
   6938									;ZERO IF TASK NAME NOT FOUND (AND SET
   6939									;CONDITION CODES PER "TST R2").
   6940									;
   6941									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   6942					;
   6943	023026	001406 				BEQ	.X.02		;IF TASK NOT INSTALLED, RETURN STS=-02.
   6944					;
   6945					; R1 IS POINTING TO DPB WD. 03, AND R2 CONTAINS STD NODE ADR OF RECEIVER.
   6946					;
   6947	023030				10$:	CALL	.SEND		;SEND DATA & SET EVENT FLAG PER R1 & R2
	023030	004737 	023170'			JSR	PC,.SEND
   6948					;
   6949	023034	104401 				TRAP	DR.01		;RETURN STS=+1.
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 131
DIRECTIVE -- SEND AND REQUEST OR RESUME

   6951					.SBTTL	DIRECTIVE -- SEND AND REQUEST OR RESUME
   6952					;+
   6953					; THE "SEND AND REQUEST OR RESUME" DIRECTIVE
   6954					;
   6955					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO QUEUE (FIFO) A THIRTEEN WORD
   6956					; BLOCK OF DATA FOR A TASK TO RECEIVE, AND TO REQUEST OR RESUME THE
   6957					; EXECUTION OF THE RECEIVER TASK.
   6958					;
   6959					; THIS DIRECTIVE HAS THE EFFECT OF ISSUING A "SEND DATA" DIRECTIVE
   6960					; FOLLOWED BY A "REQUEST" OR "RESUME" DIRECTIVE, EXCEPT THAT (1) NO TASK
   6961					; SWITCHING CAN OCCUR BETWEEN THE SEND AND THE REQUEST OR RECEIVE, AND
   6962					; (2) IF THE SEND IS NOT PERFORMED, NEITHER THE REQEST NOR THE RESUME
   6963					; WILL BE ATTEMPTED.
   6964					;
   6965					; I.E., IF DATA IS SENT TO AN INACTIVE TASK, THAT TASK WILL BE REQUESTED;
   6966					; IF DATA IS SENT TO A SUSPENDED TASK, THAT TASK WILL BE RESUMED.
   6967					;
   6968					; A NINE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   6969					;
   6970					;	WD. 00 -- DIC (15.) & DPB SIZE (9.),
   6971					;	WD. 01 -- RECEIVER TASK NAME (FIRST HALF),
   6972					;	WD. 02 -- RECEIVER TASK NAME (SECOND HALF),
   6973					;	WD. 03 -- [PARTITION NAME (FIRST HALF)],
   6974					;	WD. 04 -- [PARTITION NAME (SECOND HALF)],
   6975					;	WD. 05 -- [PRIORITY],
   6976					;	WD. 06 -- 0,
   6977					;	WD. 07 -- ADDRESS OF THIRTEEN WORD DATA BLOCK,
   6978					;	WD. 10 -- [EVENT FLAG NUMBER (EFN)].
   6979					;
   6980					; WHEN AN EVENT FLAG IS SPECIFIED, A SIGNIFICANT EVENT IS DECLARED
   6981					; (IF THE DIRECTIVE IS PERFORMED) AND THE INDICATED EVENT FLAG IS SET.
   6982					;
   6983					; THE FOLLOWING STATUS IS RETURNED:
   6984					;
   6985					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE
   6986					; STATUS OF:
   6987					;
   6988					;	+1 -- DATA SENT AND TASK REQUESTED,
   6989					;	+2 -- DATA SEND AND TASK RESUMED,
   6990					;	+3 -- DATA SENT TO AN NON-SUSPENDED ACTIVE TASK.
   6991					;
   6992					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   6993					;
   6994					;	-01 -- [R] INSUFFICIENT POOL NODES AVAILABLE FOR "REQUEST",
   6995					;	-02 -- [B] RECEIVER TASK NOT INSTALLED (NO STD ENTRY FOUND),
   6996					;	-03 -- [R] PARTITION TOO SMALL FOR RECEIVER TASK,
   6997					;	-04 -- [B] INSUFFICIENT POOL NODES FOR "SEND",
   6998					;	-08 -- [R] RECEIVER TASK IS DISABLED,
   6999					;
   7000					;	-80 -- [B] DIRECTIVE ISSUED BY "BACKGROUND" TASK,
   7001					;	-94 -- [R] PARTITION NOT IN SYSTEM (NO TPD ENTRY FOUND),
   7002					;	-95 -- [R] INVALID PRIORITY SPECIFIED (<0 OR >250.),
   7003					;	-97 -- [B] INVALID EVENT FLAG NUMBER (EFN<0 OR EFN>64),
   7004					;	-99 -- [B] DIC OR DPB SIZE IS INVALID.
   7005					;
   7006					; [R] -- REQUEST OR RESUME REJECTED
   7007					; [B] -- BOTH SEND & REQUEST OR RESUME REJECTED
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 131-1
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7008					;-
   7009					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7010					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7011					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7012					;	R0 -- PC OF EMT INSTRUCTION
   7013					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   7014					;	R2 -- DPB SIZE
   7015					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7016					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   7017					;
   7018					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7019					;
   7020	023036				.D.SAR::CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	023036	004737 	042754'			JSR	PC,..FSTD
   7021									;ZERO IF TASK NAME NOT FOUND (AND SET
   7022									;CONDITION CODES PER "TST R2").
   7023									;
   7024									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   7025					;
   7026	023042	001001 				BNE	SKX		;IF TASK NOT INSTALLED, RETURN STS=-02.
   7027	023044	104776 			.X.02:	TRAP	DE.02
   7028					;
   7029	023046	010146 			SKX:	MOV	R1,-(SP)	;PUSH (SAVE) R1 & R2, AND ADVANCE R1 TO POINT
   7030	023050	010246 				MOV	R2,-(SP)	;TO DPB WD. 07.
   7031	023052	062701 	000010 			ADD	#8.,R1
   7032					;
   7033					; R1 IS POINTING TO DPB WD. 07, AND R2 CONTAINS STD ENTRY ADR OF RECEIVER.
   7034					;
   7035	023056					CALL	.SEND		;SEND DATA & SET EVENT FLAG PER R1 & R2
	023056	004737 	023170'			JSR	PC,.SEND
   7036									;(R1, R2, R3, R4, & R5 ARE ALTERED)
   7037					;
   7038	023062	012602 				MOV	(SP)+,R2	;POP (RESTORE) R2 & R1
   7039	023064	012601 				MOV	(SP)+,R1	;(R1 IS POINTING TO DPB WD. 03.)
   7040					;
   7041	023066					CALL	.FEPPU		;SET R3 TO TPD ADDRESS IF A PARTITION IS
	023066	004737 	015162'			JSR	PC,.FEPPU
   7042									;SPECIFIED, OR TO ZERO IF NOT SPECIFIED.
   7043									;
   7044									;SET R4 TO PRIORITY IF SPECIFIED, OR TO
   7045									;ZERO IF NOT SPECIFIED.
   7046									;
   7047									;
   7048									;ADVANCE R1 BY EIGHT (PAST PARTITION NAME,
   7049									;PRIORITY INDICATOR, AND UIC INDICATOR.).
   7050									;
   7051									;IF INVALID PRIORITY, RETURN STS=-95.
   7052									;IF PARTITION NOT IS SYSTEM, RETURN
   7053									;STS=-94.  IF NON-PRIVILEGED TASK HAS
   7054									;SPECIFIED OTHER THAN OWN UIC, RETURN
   7055									;STS=-91.  IF SPECIFIED PARTITION IS
   7056									;TOO SMALL FOR TASK, RETURN STS=-03.
   7057					;
   7058					;
   7059	023072	012701 	000001 			MOV	#1,R1		;SET R1 TO INDICATE "MAKE TASK ACTIVE WHETHER
   7060									;MEMORY IS AVAILABLE OR NOT"
   7061					;
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 131-2
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7062	023076	016500 	000016 			MOV	A.TD(R5),R0	;SET R5 TO STD ADDRESS OF REQUESTOR
   7063					;
   7064	023102	010246 				MOV	R2,-(SP)	;PUSH STD ENTRY ADDRESS (FOR ATL SCAN)
   7065					;
   7066	023104					CALL	.REQS		;MAKE A TASK ACTIVE PER R0, R1, R2, R3, R4 & R5.
	023104	004737 	014460'			JSR	PC,.REQS
   7067									;(R1, R2, R3, R4, & R5 ARE ALTERED)
   7068	023110	012604 				MOV	(SP)+,R4	;POP STD ENTRY ADDRESS INTO R4
   7069					;
   7070	023112	020227 	000002 			CMP	R2,#02		;SPECIAL CASE -- IS TASK ACTIVE?
   7071	023116	001402 				BEQ	10$		;YES -- RESUME IF SUSPENDED
   7072	023120	000162 	015152'			JMP	.RQESD(R2)	;NO -- RETURN DIRECTIVE STATUS PER SUBROUTINE
   7073									;STATUS IN R2.
   7074					;
   7075					; RECEIVER TASK IS ACTIVE:
   7076					;
   7077					;	IF SUSPENDED, RESUME & RETURN STS=+2
   7078					;	IF NOT SUSPENDED, RETURN STS=+3
   7079					;
   7080					; R4 CONTAINS THE STD ENTRY ADDRESS OF THE RECEIVER TASK.
   7081					;
   7082	023124	012703 	006462'		10$:	MOV	#.ATLLH,R3	;SETUP FOR ATL SCAN
   7083	023130				20$:
   7084	023130	011303 				MOV	@R3,R3		;SETUP R3 TO EXAMINE NEXT ENTRY
   7085	023132	020337 	006464'			CMP	R3,.ATLLH+2	;IS R3 POINTING TO ENTRY FOR NUL TASK?
   7086	023136	001413 				BEQ	70$		;YES -- ATL NODE IS NOT IN THE ATL (IT IS
   7087									;IN THE "MRL" FOR A PARTITION) RETURN STS=+3.
   7088	023140	026304 	000016 			CMP	A.TD(R3),R4	;NO -- STD ADDRESS MATCH?
   7089	023144	001371 				BNE	20$		;NO -- CHECK NEXT ATL NODE
   7090	023146	126327 	000014 	000012 	60$:	CMPB  A.TS(R3),#TS.SUS	;NO -- IS TASK SUSPENDED?
   7091	023154	001004 				BNE	70$
   7092	023156	112763 	000010 	000014 		MOVB  #TS.RUN,A.TS(R3)	;YES -- CHANGE STATUS TO RUNNING (A SIGNIFICANT
   7093									;EVENT HAS BEEN DECLARED AS A RESULT OF THE
   7094	023164	104402 				TRAP	DR.02		;SEND), AND RETURN STS=+2.
   7095					;
   7096	023166	104403 			70$:	TRAP	DR.03		;STS +3
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 132
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7098					; SEND -- SUBROUTINE TO PERFORM "SEND" FOR "SEND DATA" AND "SEND DATA &
   7099					; REQUEST RECEIVER" DIRECTIVES.
   7100					;
   7101					; ENTRY CONDITIONS:
   7102					;
   7103					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK
   7104					;	R1 -- POINTING (IN DPB) TO ADR OF 13 WORD BLOCK OF DATA,
   7105					;	WHICH IS FOLLOWED BY AN [EFN].  BOTH WORDS MUST BE FETCHABLE
   7106					;	WITHOUT SEGMENT FAULT.
   7107					;	R2 -- STD ENTRY ADDRESS OF RECEIVER TASK
   7108					;
   7109					; CALLING SEQUENCE:
   7110					;
   7111					;	JSR  PC,SEND
   7112					;
   7113					; EXIT CONDITIONS:
   7114					;
   7115					;	IF NO POOL NODE AVAILABLE, RETURN AT 'DE.01'
   7116					;	IF INVALID EFN, RETURN AT 'DE.97'
   7117					;	IF PART OF DATA OUT OF TASK'S ADDRESS SPACE, RETURN AT 'DE.98'
   7118					;
   7119					;	IF SUCCESSFUL, DATA IS QUEUED, EFN (IF SPECIFIED) IS SET,
   7120					;	AND A SIGNIFICANT EVENT IS DECLARED.
   7121					;
   7122					;	R1 -- STD OF RECEIVER TASK
   7123					;
   7124					;
   7125					; REGISTERS ALTERED:
   7126					;
   7127					;	R1, R2, R3, R4, & R0
   7128					;
   7129	023170				.SEND::	MFPI	(R1)+		;SET R5 TO ADDRESS OF DATA BLOCK, AND
	023170	012146 				MOV	(R1)+,-(SP)
   7130	023172	012600 				MOV	(SP)+,R0	;LEAVE R1 POINTING TO [EFN].
   7131					;
   7132	023174	010246 				MOV	R2,-(SP)	;SAVE RECEIVER STD ENTRY ADR IN -(SP)
   7133					;
   7134									;R1 IS POINTING TO [EFN] IN DPB.
   7135					;
   7136	023176					CALL	.CEFN		;CONVERT EFN TO: (1) FLAG WORD ADDRESS
	023176	004737 	041600'			JSR	PC,.CEFN
   7137									;IN R2, AND (2) FLAG MASK IN R3 (R1 IS
   7138									;POINTING TO EFN).  IF EFN<0, OR EFN>64.,
   7139									;RETURN STS=-97.  IF EFN=0 (NO EVENT FLAG
   7140									;SPECIFIED), RETURN WITH R2=R3=00.
   7141									;CONDITION CODES ARE SET PER "TST R3".
   7142					;
   7143	023202	010246 				MOV	R2,-(SP)	;PUSH "BIS" ADDRESS WORD
   7144	023204	010346 				MOV	R3,-(SP)	;PUSH "BIS" MASK WORD
   7145					;
   7146	023206	012704 	001424'			MOV	#.POLLH,R4	;LISTHEAD
   7147	023212					CALL	..PICK		;ISSUING TASK, AND SET R1 TO NODE ADR.
	023212	004737 	042656'			JSR	PC,..PICK
   7148	023216	103001 				BCC	10$		;IF NONE AVAILABLE, RETURN STS=-04.
   7149	023220	104774 				TRAP	DE.04
   7150					;
   7151	023222	010401 			10$:	MOV	R4,R1		;SETUP R3 TO FILL NODE
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 132-1
DIRECTIVE -- SEND AND REQUEST OR RESUME

   7152	023224	062704 	000006 			ADD	#Q.D1,R4
   7153	023230	012703 	000015 			MOV	#13.,R3
   7154	023234				20$:
   7155	023234					MFPI	(R0)+		;MOVE WORD FROM DATA BLOCK TO NODE
	023234	012046 				MOV	(R0)+,-(SP)
   7156	023236	012624 				MOV	(SP)+,(R4)+
   7157	023240	077303 				SOB	R3,20$
   7158	023242	052636 				BIS	(SP)+,@(SP)+	;SET EVENT FLAG IF SPECIFIED (IF NOT
   7159	023244	011604 				MOV	@SP,R4		;FIND RECEIVER'S STD ADDRESS
   7160	023246	010461 	000004 			MOV	R4,Q.SI(R1)	;SET SENDERS STD ADDRESS
   7161					;
   7162	023252	016404 	000026 			MOV	S.RB(R4),R4	;SET R4 TO ADDRESS OF LAST NODE (OR LISTHEAD)
   7163	023256					CALL	..NADD		;OF TASK'S RECEIVE DEQUE (LISTHEAD IN STD),
	023256	004737 	042614'			JSR	PC,..NADD
   7164									;AND ADD NODE AT END OF DEQUE.
   7165					;
   7166									;SPECIFIED, SET NO BITS IN WORD ZERO).
   7167					;
   7168	023262	012601 				MOV	(SP)+,R1	;SET RECEIVER STD ADDRESS
   7169	023264	000137 	042444'			JMP	..DSEV		;DECLARE A SIGNIFICANT EVENT AND EXIT
   7170						;
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 133
DIRECTIVE -- RECEIVE DATA

   7172					.SBTTL	DIRECTIVE -- RECEIVE DATA
   7173					;+
   7174					; THE "RECEIVE DATA" DIRECTIVE
   7175					;
   7176					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECEIVE A THIRTEEN WORD
   7177					; DATA BLOCK THAT HAS BEEN QUEUED (FIFO) FOR IT (VIA "SEND DATA" OR
   7178					; "SEND DATA & REQUEST RECEIVER" DIRECTIVES).
   7179					;
   7180					; WHEN A SENDER TASK IS SPECIFIED, ONLY DATA SENT BY THE INDICATED
   7181					; TASK IS RECEIVED.
   7182					;
   7183					; A TWO-WORD SENDER TASK NAME, AND THE THIRTEEN-WORD DATA BLOCK, ARE
   7184					; RETURNED IN AN INDICATED FIFTEEN WORD BUFFER, WITH THE TASK NAME IN
   7185					; THE FIRST TWO WORDS.
   7186					;
   7187					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7188					;
   7189					;	WD. 00 -- DIC (17.) & DPB SIZE (4.),
   7190					;	WD. 01 -- [SENDER TASK NAME (FIRST HALF)],
   7191					;	WD. 02 -- [SENDER TASK NAME (SECOND HALF)],
   7192					;	WD. 03 -- ADDRESS OF FIFTEEN WORD BUFFER.
   7193					;
   7194					; THE FOLLOWING STATUS IS RETURNED:
   7195					;
   7196					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7197					; OF ONE (+1).
   7198					;
   7199					;
   7200					; CC-C SET TO INDICATE REJECTIONAND A DIRECTIVE STATUS OF:
   7201					;
   7202					;	-02 -- SPECIFIED SENDER TASK NOT INSTALLED,
   7203					;	-08 -- NO DATA QUEUED (SENT),
   7204					;
   7205					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7206					;-
   7207					; THIS DIRECTIVE SERVICE HAS A COMMON ENTRY WITH "RECEIVE DATA OR SUSPEND".
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 134
DIRECTIVE -- RECEIVE DATA OR EXIT

   7209					.SBTTL	DIRECTIVE -- RECEIVE DATA OR EXIT
   7210					;+
   7211					; THE "RECEIVE DATA OR EXIT" DIRECTIVE
   7212					;
   7213					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECEIVE A THIRTEEN WORD
   7214					; DATA BLOCK IF AT LEAST ONE IS CAN BE RECEIVED, OR TO EXIT IF NO
   7215					; THIRTEEN WORD DATA BLOCKS ARE CAN BE RECEIVED.
   7216					;
   7217					; DATA BLOCKS ARE QUEUED (FIFO) FOR THE TASK VIA THE "SEND DATA" OR
   7218					; THE "SEND DATA & REQUEST RECEIVER" DIRECTIVES.
   7219					;
   7220					; WHEN A SENDER TASK IS SPECIFIED, ONLY DATA SENT BY THE INDICATED
   7221					; TASK IS RECEIVED.
   7222					;
   7223					; A TWO-WORD SENDER TASK NAME, AND THE THIRTEEN-WORD DATA BLOCK, ARE
   7224					; RETURNED IN AN INDICATED FIFTEEN WORD BUFFER, WITH THE TASK NAME IN
   7225					; THE FIRST TWO WORDS.
   7226					;
   7227					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7228					;
   7229					;	WD. 00 -- DIC (19.) & DPB SIZE (4.),
   7230					;	WD. 01 -- [SENDER TASK NAME (FIRST HALF)],
   7231					;	WD. 02 -- [SENDER TASK NAME (SECOND HALF)],
   7232					;	WD. 03 -- ADDRESS OF FIFTEEN WORD BUFFER.
   7233					;
   7234					; THE FOLLOWING STATUS IS RETURNED:
   7235					;
   7236					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7237					; OF ONE (+1).
   7238					;
   7239					;
   7240					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7241					;
   7242					;	-02 -- SPECIFIED SENDER TASK NOT INSTALLED,
   7243					;
   7244					;	-80 -- DIRECTIVE ISSUED BY "BACKGROUND" TASK,
   7245					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7246					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7247					;-
   7248					; THIS DIRECTIVE SERVICE HAS A COMMON ENTRY WITH "RECEIVE DATA OR SUSPEND".
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 135
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7250					.SBTTL	DIRECTIVE -- RECEIVE DATA OR SUSPEND
   7251					;+
   7252					; THE "RECEIVE DATA OR SUSPEND" DIRECTIVE
   7253					;
   7254					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECEIVE A THIRTEEN WORD
   7255					; DATA BLOCK IF AT LEAST ONE IS CAN BE RECEIVED, OR TO SUSPEND IF NO
   7256					; THIRTEEN WORD DATA BLOCKS ARE CAN BE RECEIVED.
   7257					;
   7258					; DATA BLOCKS ARE QUEUED (FIFO) FOR THE TASK VIA THE "SEND DATA" OR
   7259					; THE "SEND DATA & REQUEST RECEIVER" DIRECTIVES.
   7260					;
   7261					; WHEN A SENDER TASK IS SPECIFIED, ONLY DATA SENT BY THE INDICATED
   7262					; TASK IS RECEIVED.
   7263					;
   7264					; A TWO-WORD SENDER TASK NAME, AND THE THIRTEEN-WORD DATA BLOCK, ARE
   7265					; RETURNED IN AN INDICATED FIFTEEN WORD BUFFER, WITH THE TASK NAME IN
   7266					; THE FIRST TWO WORDS.
   7267					;
   7268					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7269					;
   7270					;	WD. 00 -- DIC (21.) & DPB SIZE (4.),
   7271					;	WD. 01 -- [SENDER TASK NAME (FIRST HALF)],
   7272					;	WD. 02 -- [SENDER TASK NAME (SECOND HALF)],
   7273					;	WD. 03 -- ADDRESS OF FIFTEEN WORD BUFFER.
   7274					;
   7275					; THE FOLLOWING STATUS IS RETURNED:
   7276					;
   7277					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE
   7278					; STATUS OF:
   7279					;
   7280					;	+1 -- IF DATA WAS RECEIVED,
   7281					;	+2 -- IF TASK WAS SUSPENDED.
   7282					;
   7283					; CC-C SET TO INDICATE REJECTION AND A DIRECTIVE STATUS OF:
   7284					;
   7285					;	-02 -- SPECIFIED SENDER TASK NOT INSTALLED,
   7286					;
   7287					;	-80 -- DIRECTIVE ISSUED BY "BACKGROUND" TASK,
   7288					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7289					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7290					;-
   7291					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7292					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7293					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7294					;	R0 -- PC OF EMT INSTRUCTION
   7295					;	R1 -- POINTER TO WORD FOLLOWING DIC & SIZE
   7296					;	R2 -- DPB SIZE
   7297					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7298					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK')
   7299					;
   7300					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7301					;
   7302									;R5 IS POINTING TO 15-WORD BUFFER IN TASK.
   7303					;
   7304									;R4 IS SET TO STD NODE ADDRESS OF RECEIVER TASK.
   7305					;
   7306					; COMMON ENTRY POINT FOR "RECEIVE", "RECEIVE OR EXIT", & "RECEIVE OR SUSPEND".
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 135-1
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7307					;
   7308
   7309	023270				.D.REC::
   7310	023270				.D.ROE::
   7311	023270				.D.ROS::
   7312	023270	016504 	000016 			MOV 	A.TD(R5),R4	;SET R4 TO RECEIVE DEQUE LISTHEAD (IN STD ENTRY).
   7313	023274	062704 	000024 			ADD	#S.RF,R4
   7314					;
   7315	023300					MFPI	(R1)+		;IS A SENDER TASK SPECIFIED?
	023300	012146 				MOV	(R1)+,-(SP)
   7316	023302					MFPI	(R1)+		;MAYBE -- CHECK SECOND HALF OF TASK NAME
	023302	012146 				MOV	(R1)+,-(SP)
   7317	023304	052626 				BIS	(SP)+,(SP)+
   7318	023306	001004 				BNE	10$		;NO -- RECEIVE FROM ANY SENDER
   7319									;YES -- RECEIVE ONLY FROM INDICATED SENDER
   7320									;NO -- RECEIVE FROM ANY SENDER
   7321	023310					CALL	..PICK		;PICK FIRST NODE FROM REC DEQUE, AND LEAVE NODE
	023310	004737 	042656'			JSR	PC,..PICK
   7322									;ADDRESS IN R4.
   7323									;NODE PICKED?
   7324	023314	103017 				BCC	40$		;YES -- FILL BUFFER
   7325	023316	000440 				BR	70$		;NO -- NO DATA BY ANY SENDER
   7326					;
   7327	023320	024141 			10$:	CMP	-(R1),-(R1)
   7328					; R1 IS POINTING TO SPECIFIED SENDER'S TASK NAME IN PREVIOUS SPACE.
   7329					;
   7330	023322					CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	023322	004737 	042754'			JSR	PC,..FSTD
   7331									;ZERO IF TASK NAME NOT FOUND (AND SET
   7332									;CONDITION CODES PER "TST R2").
   7333									;
   7334									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   7335					;
   7336	023326	001001 				BNE	20$		;IF TASK NOT INSTALLED, RETURN STS=-02.
   7337	023330	104776 				TRAP	DE.02		;RETURN STS=-02.
   7338					;
   7339	023332	010401 			20$:	MOV	R4,R1		;SAVE LISTHEAD ADDRESS IN R1, AND
   7340									;SCAN DEQUE FOR DATA SENT BY SENDER PER R2.
   7341	023334				30$:
   7342	023334	011404 				MOV	@R4,R4		;ADVANCE R4 TO NEXT NODE
   7343	023336	020401 				CMP	R4,R1		;END OF DEQUE?
   7344	023340	001427 				BEQ	70$		;YES -- NO DATA BY SPECIFIED SENDER
   7345	023342	026402 	000004 			CMP	Q.SI(R4),R2	;NO -- IS DATA SENT BY SPECIFIED SENDER?
   7346	023346	001372 				BNE	30$		;NO -- CHECK NEXT NODE
   7347	023350					CALL	..NDEL		;YES -- DELETE NODE FROM DEQUE
	023350	004737 	042500'			JSR	PC,..NDEL
   7348					;
   7349					; DATA RECEIVED -- R4 CONTAINS NODE ADDRESS & R1 CONTAINS DATA BUFFER
   7350					; ADDRESS.  FILL BUFFER (2-WORD TASK NAME & 13-WORD DATA BLOCK).
   7351					;
   7352	023354				40$:
   7353	023354					MFPS	@R1,R0	;FIND THE BUFFER ADDRESS
	023354	011100 				MOV	@R1,R0
   7354	023356	010401 				MOV	R4,R1		;SAVE NODE ADR IN R1 FOR '..RNTP'
   7355	023360	062704 	000004 			ADD	#Q.SI,R4	;ADVANCE R4 TO POINT TO SENDER ID WORD
   7356					;
   7357	023364	012403 				MOV	(R4)+,R3	;SET R3 TO SENDER STD NODE ADDRESS
DMSAR	- SEND & RECEIVE DIRECT	MACRO M1110  15-OCT-79 13:47  PAGE 135-2
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7358					;
   7359	023366				50$:
   7360	023366					MTPS  S.TN+0(R3),(R0)+	;SET SENDER TASK NAME IN FIRST TWO WORDS
	023366	016320 	000000 			MOV	S.TN+0(R3),(R0)+
   7361	023372					MTPS  S.TN+2(R3),(R0)+
	023372	016320 	000002 			MOV	S.TN+2(R3),(R0)+
   7362					;
   7363	023376	012703 	000015 			MOV	#13.,R3		;FILL REMAINING 13 WORDS FROM NODE.
   7364	023402				60$:
   7365	023402					MTPS	(R4)+,(R0)+
	023402	012420 				MOV	(R4)+,(R0)+
   7366	023404	077302 				SOB	R3,60$
   7367					;
   7368	023406	012704 	001424'			MOV	#.POLLH,R4	;RETURN NODE TO POOL
   7369	023412					CALL	..NADD		;RETURN NODE (PER R1) TO POOL
	023412	004737 	042614'			JSR	PC,..NADD
   7370					;
   7371	023416	104401 				TRAP	DR.01		;RETURN STS=+1.
   7372					;
   7373					; DATA NOT RECEIVED:
   7374					;	IF "RECEIVE", RETURN STS=-08.
   7375					;	IF "RECEIVE OR EXIT", EXIT.
   7376					;	IF "RECEIVE OR SUSPEND", SUSPEND.
   7377					;
   7378					; R3 CONTAINS THE DIC SIZE.
   7379					; R0 CONTAINS THE ISSUING TASK'S ATL NODE ADDRESS
   7380					;
   7381	023420	006303 			70$:	ASL	R3
   7382	023422	000173 	023362'			JMP	@80$-2-<17.*2.>(R3)
   7383	023426	023434'			80$:	.WORD	90$
   7384	023430	022330'				.WORD	.D.EXT
   7385	023432	022224'				.WORD	.D.SUS
   7386					;
   7387	023434	104770 			90$:	TRAP	DE.08
   7388					;
DMSDV	- SPECIFY SST TABLE DIR	MACRO M1110  15-OCT-79 13:47  PAGE 136
DIRECTIVE -- RECEIVE DATA OR SUSPEND

   7390						.TITLE	DMSDV	- SPECIFY SST TABLE DIRECTIVES MODULE
   7391	023436					IDENT$	1,0
						.IDENT	/001000/
   7392					;
   7393					;                             COPYRIGHT (C) 1975, 1978 BY
   7394					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7395					;
   7396					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7397					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7398					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7399					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7400					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7401					;
   7402					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7403					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7404					;       CORPORATION.
   7405					;
   7406					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7407					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7408					;
   7409					;		MODULE: SPECIFY SST TABLE DIRECTIVES
   7410					;
   7411					;		VERSION: 01-00
   7412					;
   7413					;		AUTHOR: R. MCLEAN
   7414					;
   7415					;		DATE: 19 JUN 75
   7416					;
   7417					;
   7418					;	THIS MODULE CONTAINS:
   7419					;
   7420					;	1 -- CODE TO SERVICE THE "SPECIFY SST VECTOR TABLE FOR TASK" DIRECTIVE.
   7421					;
   7422					;	MACRO LIBRARY CALLS
   7424					;
   7425						.MCALL	MTPS,MFPS,MFPI,MTPI,CALL,RETURN
DMSDV	- SPECIFY SST TABLE DIR	MACRO M1110  15-OCT-79 13:47  PAGE 137
DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK

   7428						.SBTTL	DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK
   7429					;+
   7430					; THE "SPECIFY SST VECTOR TABLE FOR TASK" DIRECTIVE
   7431					;
   7432					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECORD THE ADDRESS (VIRTUAL) OF
   7433					; A TABLE OF SYNCHRONOUS SYSTEM TRAP SERVICE ROUTINE ENTRY POINTS
   7434					; FOR USE BY THE ISSUING TASK.  WHENEVER AN SST SERVICE ROUTINE ENTRY IS
   7435					; SPECIFIED IN BOTH THE TASK'S TABLE & DDT'S TABLE, THE TRAP OCCURS
   7436					; FOR THE DEBUGGING AID, AND NOT FOR THE TASK.
   7437					;
   7438					;
   7439					;	WD. 00 -- "ODD ADDRESS" ERROR,
   7440					;	WD. 01 -- SEGMENT FAULT,
   7441					;	WD. 02 -- T-BIT TRAP OR EXECUTION OF A 'BPT' INSTRUCTION,
   7442					;	WD. 03 -- EXECUTION OF AN 'IOT' INSTRUCTION,
   7443					;	WD. 04 -- EXECUTION OF A "RESERVED" INSTRUCTION,
   7444					;	WD. 05 -- EXECUTION OF "NON-RSX EMT",
   7445					;	WD. 06 -- EXECUTION OF A 'TRAP' INSTRUCTION,
   7446					;	WD. 07 -- PDP-11/40 FLOATING POINT EXCEPTION.
   7447					;
   7448					; THE TABLE IS OF THE FOLLOWING FORMAT:
   7449					; A THREE WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7450					;
   7451					;	WD. 00 -- DIC (43.) & DPB SIZE (3.),
   7452					;	WD. 01 -- ADDRESS OF SST VECTOR TABLE,
   7453					;	WD. 02 -- NUMBER OF TABLE ENTRIES (8). (MUST BE AT LEAST 8!)
   7454					;
   7455					; THE FOLLOWING STATUS IS RETURNED:
   7456					;
   7457					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7458					; OF ONE (+1).
   7459					;
   7460					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7461					;
   7462					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7463					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7464					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7465					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7466					;	R1 -- ADDRESS OF WORD FOLLOWING DIC & SIZE
   7467					;	R2 -- DPB SIZE
   7468					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7469					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   7470					;
   7471					;
   7472					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7473									;R1 IS POINTING TO THE ADDRESS OF THE TABLE
   7474									;R5 CONTAINS THE TABLE SIZE
   7475					;
   7476	023436	016502 	000016 		.D.STV::MOV	A.TD(R5),R2	;FIND THE STD ADDRESS OF THIS TASK
   7477	023442					MFPS	@R1,S.SS(R2)	;SET UP SST VECTOR ADDRESS
	023442	011162 	000030 			MOV	@R1,S.SS(R2)
   7478	023446	104401 				TRAP	DR.01		;VALID DIRECTIVE RETURN
DMAST	- SPECIFY AST SERVICE D	MACRO M1110  15-OCT-79 13:47  PAGE 138
DIRECTIVE -- SPECIFY SST VECTOR TABLE FOR TASK

   7480						.TITLE	DMAST	- SPECIFY AST SERVICE DIRECTIVES
   7481	023450					IDENT$	1,0
						.IDENT	/001000/
   7482					;
   7483					;                             COPYRIGHT (C) 1975, 1978 BY
   7484					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7485					;
   7486					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7487					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7488					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7489					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7490					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7491					;
   7492					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7493					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7494					;       CORPORATION.
   7495					;
   7496					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7497					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7498					;
   7499					;		MODULE: SPECIFY AST SERVICE DIRECTIVES
   7500					;
   7501					;		VERSION: 01-00
   7502					;
   7503					;		AUTHOR: R. MCLEAN
   7504					;
   7505					;		DATE: 19 JUN 75
   7506					;
   7507					;
   7508					;	THIS MODULE CONTAINS:
   7509					;
   7510					;	1 -- CODE TO SERVICE THE "SPECIFY POWER RECOVERY AST" DIRECTIVE,
   7511					;
   7512					;	MACRO LIBRARY CALLS
   7513					;
   7515						.MCALL	CALL,RETURN,MTPS,MTPI,MFPI,MFPS
DMAST	- SPECIFY AST SERVICE D	MACRO M1110  15-OCT-79 13:47  PAGE 139
DIRECTIVE -- SPECIFY POWER FAIL AST

   7518						.SBTTL	DIRECTIVE -- SPECIFY POWER FAIL AST
   7519					;+
   7520					; THE "SPECIFY POWER FAIL AST" DIRECTIVE
   7521					;
   7522					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECORD EITHER (1) THAT POWER
   7523					; RECOVERY AST'S FOR THE ISSUING TASK ARE DESIRED, AND WHERE CONTROL
   7524					; IS TO BE TRANSFERRED WHEN A POWER FAIL AST OCCURS, OR (2) THAT
   7525					; POWER FAIL AST'S FOR THE ISSUING TASK ARE NO LONGER DESIRED.
   7526					;
   7527					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7528					;
   7529					;	WD. 00 -- DIC (45..) & DPB SIZE (2.),
   7530					;	WD. 01 -- [AST SERVICE ENTRY POINT].
   7531					;
   7532					; WHEN AN "AST SERVICE ENTRY POINT" IS SPECIFIED, FUTURE POWER FAIL
   7533					; AST'S WILL OCCUR FOR THE ISSUING TASK, AND CONTROL WILL BE TRANSFERRED
   7534					; TO THE INDICATED LOCATION WHENEVER A POWER FAIL AST OCCURS.
   7535					;
   7536					; WHEN AN "AST SERVICE ENTRY POINT" IS NOT SPECIFIED (ZERO SECOND DPB
   7537					; WORD), FUTURE POWER FAIL AST'S WILL NOT OCCUR (UNTIL AN AST ENTRY
   7538					; POINT IS SPECIFIED AGAIN).
   7539					;
   7540					; THE FOLLOWING STATUS IS RETURNED:
   7541					;
   7542					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7543					;
   7544					; OF ONE (+1).
   7545					;
   7546					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7547					;
   7548					;	-08 -- AST ENTRY ALREADY UN-SPECIFIED,
   7549					;
   7550					;	-98 -- PART OF DPB IS OUT OF ISSUING TASK'S ADDRESS SPACE,
   7551					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7552					;
   7553					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7554					; DIRECTIVE ISSUING TASK'S PS, PC, & R1-R5 PUSHED ONTO THE
   7555					;  STACK, AND R0-R5 SET AS FOLLOWS:
   7556					;	R1 -- ADDRESS OF WORD FOLLOWING DIC & SIZE
   7557					;	R2 -- DPB SIZE
   7558					;	R3 -- DIC (DIRECTIVE IDENTIFICATION CODE)
   7559					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
   7560					;
   7561					;
   7562					; R5 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7563					;
   7564	023450				.D.PUT::MFPS	@R1,R1		;FIND THE LAST WORD OF THE DPB
	023450	011101 				MOV	@R1,R1
   7565	023452	001403 				BEQ	20$		;YES -- THEN CHECK IT OUT
   7566	023454	010165 	000034 		10$:	MOV	R1,A.PF(R5)	;SPECIFY POWER FAIL AST
   7567	023460	104401 				TRAP	DR.01		;AND RETURN +1
   7568					;
   7569	023462	005765 	000034 		20$:	TST	A.PF(R5)	;CHECK FOR ALREADY CLEAR
   7570	023466	001372 				BNE	10$		;NO -- ALL OK
   7571	023470	104770 				TRAP	DE.08		;YES -- ERROR
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1110  15-OCT-79 13:47  PAGE 140
DIRECTIVE -- SPECIFY POWER FAIL AST

   7573						.TITLE	DMREQ	- "REQUEST AND EXECUTE" DIRECTIVES MODULE
   7574	023472					IDENT$	1,0
						.IDENT	/001000/
   7575					;
   7576					;                             COPYRIGHT (C) 1975, 1978 BY
   7577					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7578					;
   7579					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7580					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7581					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7582					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7583					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7584					;
   7585					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7586					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7587					;       CORPORATION.
   7588					;
   7589					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7590					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7591					;
   7592					;		MODULE: "REQUEST" DIRECTIVE
   7593					;
   7594					;		VERSION: 01-00
   7595					;
   7596					;		AUTHOR: R. MCLEAN
   7597					;
   7598					;		DATE: 1 JUL 75
   7599					;
   7600					;
   7601					;	THIS MODULE CONTAINS:
   7602					;
   7603					;	1 -- CODE TO SERVICE THE "REQUEST" DIRECTIVE.
   7604					;
   7605					;	MACROS
   7606					;
   7608						.MCALL	CALL,RETURN,MFPS
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1110  15-OCT-79 13:47  PAGE 141
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7611						.SBTTL	DIRECTIVE -- TASK SCHEDULING -- REQUEST
   7612					;+
   7613					; THE "REQUEST" DIRECTIVE
   7614					;
   7615					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO MAKE A TASK ACTIVE.  I.E., TO
   7616					; RUN CONTINGENT UPON PRIORITY AND MEMORY AVAILABILITY.
   7617					;
   7618					; A SEVEN WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7619					;
   7620					;	WD. 00 -- DIC (11.) & DPB SIZE (7.),
   7621					;	WD. 01 -- TASK NAME (FIRST HALF),
   7622					;	WD. 02 -- TASK NAME (SECOND HALF),
   7623					;	WD. 03 -- [PARTITION NAME (FIRST HALF)],
   7624					;	WD. 04 -- [PARTITION NAME (SECOND HALF)],
   7625					;	WD. 05 -- [PRIORITY],
   7626					;	WD. 06 -- [UIC].
   7627					;
   7628					; THE FOLLOWING STATUS IS RETURNED:
   7629					;
   7630					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7631					; OF ONE (+1).
   7632					;
   7633					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7634					;
   7635					;	-01 -- INSUFFICIENT POOL NODES AVAILABLE,
   7636					;	-03 -- PARTITION TOO SMALL FOR TASK,
   7637					;	-06 -- HANDLER TASK NOT RESIDENT TO LOAD TASK,
   7638					;	-07 -- TASK IS ACTIVE,
   7639					;
   7640					;	-94 -- PARTITION NOT IN SYSTEM (NO TPD ENTRY FOUND),
   7641					;	-95 -- INVALID PRIORITY SPECIFIED (<0 OR >250.),
   7642					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7643					;
   7644					;-
   7645	023472				.D.REQ::CALL	..FSTD		;SET R2 TO STD ENTRY ADDRESS, OR TO
	023472	004737 	042754'			JSR	PC,..FSTD
   7646									;ZERO IF TASK NAME NOT FOUND (AND SET
   7647									;CONDITION CODES PER "TST R2").
   7648									;
   7649									;ADVANCE R1 BY FOUR (PAST TASK NAME).
   7650					;
   7651					;
   7652	023476	001406 				BEQ	20$		;IF TASK IS NOT INSTALLED TRY TO GET IT INSTALLED
   7653	023500					CALL	.FEPPU		;SET R3 TO TPD ADDRESS IF A PARTITION IS
	023500	004737 	015162'			JSR	PC,.FEPPU
   7654									;SPECIFIED, OR TO ZERO IF NOT SPECIFIED.
   7655									;
   7656									;SET R4 TO PRIORITY IF SPECIFIED, OR TO
   7657									;ZERO IF NOT SPECIFIED.
   7658									;
   7659									;
   7660									;ADVANCE R1 BY EIGHT (PAST PARTITION NAME,
   7661									;PRIORITY INDICATOR, AND UIC INDICATOR.).
   7662									;
   7663									;IF INVALID PRIORITY, RETURN STS=-95.
   7664									;IF PARTITION NOT IS SYSTEM, RETURN
   7665									;STS=-94.  IF NON-PRIVILEGED TASK HAS
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1110  15-OCT-79 13:47  PAGE 141-1
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7666									;SPECIFIED OTHER THAN OWN UIC, RETURN
   7667									;STS=-91.  IF SPECIFIED PARTITION IS
   7668									;TOO SMALL FOR TASK, RETURN STS=-03.
   7669					;
   7670					;
   7671					;
   7672					;
   7673	023504				10$:	CALL	.REQS		;MAKE A TASK ACTIVE PER R1, R2, R3, R4 & R5.
	023504	004737 	014460'			JSR	PC,.REQS
   7674									;(R1, R2, R3, R4, & R5 ARE ALTERED)
   7675					;
   7676	023510	000162 	015152'			JMP	.RQESD(R2)	;RETURN DIRECTIVE STATUS PER SUBROUTINE
   7677									;STATUS IN R2.
   7678					;
   7679	023514	012704 	023704'		20$:	MOV	#RQSPB,R4	;SET UP TO INSERT PARAMETERS INTO SEND
   7680	023520	024141 				CMP	-(R1),-(R1)	;BACKUP TO POINT TO TASK NAME
   7681	023522					MFPS	(R1)+,(R4)+	;TASK NAME
	023522	012124 				MOV	(R1)+,(R4)+
   7682	023524					MFPS	(R1)+,(R4)+
	023524	012124 				MOV	(R1)+,(R4)+
   7683	023526					MFPS	(R1)+,(R4)+	;PARTITION NAME
	023526	012124 				MOV	(R1)+,(R4)+
   7684	023530					MFPS	(R1)+,(R4)+
	023530	012124 				MOV	(R1)+,(R4)+
   7685	023532					MFPS	(R1)+,(R4)+	;PRIORITY
	023532	012124 				MOV	(R1)+,(R4)+
   7686	023534	012704 	001424'			MOV	#.POLLH,R4	;PICK A NODE FROM THE POOL
   7687	023540					CALL	..PICK
	023540	004737 	042656'			JSR	PC,..PICK
   7688	023544	103001 				BCC	30$		;GOT ONE
   7689	023546	104777 				TRAP	DE.01		;NONE RETURN -1
   7690					;
   7691	023550	010401 			30$:	MOV	R4,R1		;SAVE THE NODE ADDRESS
   7692	023552	012704 	001424'			MOV	#.POLLH,R4	;FIND THE LISTHEAD OF THE POOL
   7693	023556	021404 				CMP	@R4,R4		;ANY NODES?
   7694	023560	001003 				BNE	35$		;YES -- PROCEED
   7695	023562					CALL	..NADD		;NO RETURN NODE
	023562	004737 	042614'			JSR	PC,..NADD
   7696	023566	104777 				TRAP	DE.01		;NOT ENOUGH NODES
   7697					;
   7698	023570	010137 	023716'		35$:	MOV	R1,RQSTD	;SET UP THE STD ADDRESS
   7699	023574	005743 				TST	-(R3)		;BACK UP TO POINT TO CORRECT ENTRY TO INSERT
   7700	023576	012704 	023704'			MOV	#RQSPB,R4	;SET UP PARAMETERS IN STD
   7701	023602	012421 				MOV	(R4)+,(R1)+
   7702	023604	012421 				MOV	(R4)+,(R1)+
   7703	023606	005021 				CLR	(R1)+
   7704	023610	012721 	040005 			MOV	#SF.EX!SF.TA!SF.IR,(R1)+ ;DECLARE TASK ACTIVE
   7705	023614	062701 	000014 			ADD	#S.RF-S.DP,R1	;POINT TO SEND LISTHEAD
   7706	023620	010111 				MOV	R1,@R1		;SET UP LISTHEAD
   7707	023622	010161 	000002 			MOV	R1,2(R1)
   7708	023626	013704 	023716'			MOV	RQSTD,R4	;RESTORE STD ADDRESS
   7709	023632	011301 			40$:	MOV	@R3,R1		;MAKE ENTRY IN STD
   7710	023634	001403 				BEQ	50$		;END OF LIST
   7711	023636	010423 				MOV	R4,(R3)+	;MOVE LIST DOWN
   7712	023640	010104 				MOV	R1,R4		;SET NEXT ENTRY
   7713	023642	000773 				BR	40$		;GO NEXT ENTRY
   7714					;
DMREQ	- "REQUEST AND EXECUTE"	MACRO M1110  15-OCT-79 13:47  PAGE 141-2
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7715	023644	010413 			50$:	MOV	R4,@R3		;STORE LAST ENTRY
   7716	023646	062737 	000002 	005714'		ADD	#2,.STDTZ	;UPDATE SIZE
   7720	023654	012702 	006222'			MOV	#STDINS,R2	;SET UP STD NODE OF RECEIVER
   7721	023660	012701 	023700'			MOV	#RQSPT,R1	;SET UP TO SEND TO INSTALL
   7722	023664					CALL	.SEND		;SEND DATA
	023664	004737 	023170'			JSR	PC,.SEND
   7723	023670	005004 				CLR	R4		;START AT DEFAULT PART & PRI
   7724	023672	005003 				CLR	R3
   7725	023674	010102 				MOV	R1,R2		;SET UP STD OF INSTALL
   7726	023676	000702 				BR	10$
   7727					;
   7728	023700	023704'			RQSPT::	.WORD	RQSPB		;POINTER TO SEND BLOCK
   7729	023702	000000 				.WORD	0		;EVENT FLAG (NONE)
   7730	023704				RQSPB:	.BLKW	5		;DATA TO BE XMITTED
   7731	023716	000000 			RQSTD:	.WORD	0		;STD ADDRESS
   7732					;
DMGPP	- "GET TASK PARAMETERS"	MACRO M1110  15-OCT-79 13:47  PAGE 142
DIRECTIVE -- TASK SCHEDULING -- REQUEST

   7734						.TITLE	DMGPP	- "GET TASK PARAMETERS" DIRECTIVE MODULE
   7735	023720					IDENT$	1,0
						.IDENT	/001000/
   7736					;
   7737					;                             COPYRIGHT (C) 1975, 1978 BY
   7738					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7739					;
   7740					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7741					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7742					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7743					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7744					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7745					;
   7746					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7747					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7748					;       CORPORATION.
   7749					;
   7750					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7751					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7752					;
   7753					;		MODULE: "GET TASK PARAMETERS" DIRECTIVE
   7754					;
   7755					;		VERSION: 01-00
   7756					;
   7757					;		AUTHOR: R. MCLEAN
   7758					;
   7759					;		DATE: 19 AUG 75
   7760					;
   7761					;
   7762					;	THIS MODULE CONTAINS:
   7763					;
   7764					;	1 -- CODE TO SERVICE THE "GET TASK PARAMETERS" DIRECTIVE.
   7765					;
   7766					; MACRO CALLS
   7767					;
   7769						.MCALL	MTPS,MFPS
DMGPP	- "GET TASK PARAMETERS"	MACRO M1110  15-OCT-79 13:47  PAGE 143
DIRECTIVE -- GET TASK PARAMETERS

   7772						.SBTTL	DIRECTIVE -- GET TASK PARAMETERS
   7773					;+
   7774					; THE "GET TASK PARAMETERS" DIRECTIVE
   7775					;
   7776					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL AN INDICATED SIXTEEN WORD
   7777					; BUFFER WITH PARAMETERS RELATING TO THE ISSUING TASK.
   7778					;
   7779					; A TWO WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7780					;
   7781					;	WD. 00 -- DIC (63.) & DPB SIZE (2.),
   7782					;	WD. 01 -- ADDRESS OF SIXTEEN WORD BUFFER.
   7783					;
   7784					; THE SIXTEEN WORD BUFFER IS FILLED AS FOLLOWS:
   7785					;
   7786					;	WD. 00 -- ISSUING TASK'S NAME (FIRST HALF),
   7787					;	WD. 01 -- ISSUING TASK'S NAME (SECOND HALF),
   7788					;	WD. 02 -- PARTITION NAME (FIRST HALF),
   7789					;	WD. 03 -- PARTITION NAME (SECOND HALF),
   7790					;	WD. 04 -- TASK NAME OF REQUESTOR OF ISSUING TASK (FIRST HALF),
   7791					;	WD. 05 -- TASK NAME OF REQUESTOR OF ISSUING TASK (SECOND HALF),
   7792					;	WD. 06 -- RUN PRIORITY,
   7793					;	WD. 07 -- USER IDENTIFICATION CODE (UIC FOR FILES SYSTEM),
   7794					;	WD. 10 -- NUMBER OF LOGICAL I/O UNITS (LUN'S),
   7795					;	WD. 11 -- MACHINE TYPE INDICATOR (VIZ., 45. FOR PDP-11/45),
   7796					;	WD. 12 -- STD FLAGS WORD,
   7797					;	WD. 13 -- [ADDRESS OF TASK SST VECTOR TABLE],
   7798					;	WD. 14 -- [SIZE OF TASK SST VECTOR TABLE (IN WORDS)],
   7799					;	WD. 15 -- TASK SIZE
   7800					;	WD. 16 -- ZERO (RESERVED),
   7801					;	WD. 17 -- ZERO (RESERVED).
   7802					;
   7803					; THE FOLLOWING STATUS IS RETURNED:
   7804					;
   7805					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7806					; OF ONE (+1).
   7807					;
   7808					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7809					;
   7810					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7811					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7812					;-
   7813		000050 			.PDP11=40.		;PDP11/40
   7814					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7815					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   7816					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   7817					;	R0 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK'),
   7818					;	R1 -- VIRTUAL ADDRESS OF DPB PLUS TWO,
   7819					;	R2 -- SIZE OF DPB (IN WORDS),
   7820					;	R3 -- TWICE THE DIRECTIVE IDENTIFICATION CODE (2*DIC),
   7821					;	R4 -- STD ENTRY ADDRESS OF ISSUING TASK, AND
   7822					;	R5 -- LAST WORD OF DPB.
   7823					;
   7824					; R0 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7825					;
   7826					;
   7827	023720	005046 			.D.GPP::CLR	-(SP)		;PUSH ZERO
   7828	023722	005046 				CLR	-(SP)		;PUSH ZERO
DMGPP	- "GET TASK PARAMETERS"	MACRO M1110  15-OCT-79 13:47  PAGE 143-1
DIRECTIVE -- GET TASK PARAMETERS

   7829	023724	016504 	000016 			MOV	A.TD(R5),R4	;FIND STD ADDRESS
   7830	023730	016502 	000006 			MOV	A.PD(R5),R2	;FIND THE TPD ADDRESS
   7831	023734	016500 	000012 			MOV	A.HA(R5),R0	;FIND THE HEADER ADDRESS
   7832	023740	016246 	000006 			MOV	T.PZ(R2),-(SP)	;SET PARTITION SIZE (TASK SIZE)
   7833	023744	012746 	000010 			MOV	#8.,-(SP)	;PUSH VECTOR TBL SIZE
   7834	023750	016046 	000106 			MOV  H.TKVA(R0),-(SP)	;PUSH VECTOR TBL ADDRESS
   7835	023754	016446 	000006 			MOV	S.FW(R4),-(SP)	;PUSH STD FLAGS WORD
   7836	023760	012746 	000050 			MOV	#.PDP11,-(SP)	;PUSH MACHINE TYPE INDICATOR
   7837	023764	016046 	000130 			MOV  H.LUT(R0),-(SP)	;PUSH NUMBER OF LUN'S
   7838	023770	013746 	001154'			MOV	.SYUIC,-(SP)	;PUSH UIC
   7839	023774	005046 				CLR	-(SP)		;PUSH RUN PRIORITY
   7840	023776	116516 	000010 			MOVB	A.RP(R5),@SP
   7841	024002	005046 				CLR	-(SP)
   7842	024004	005046 				CLR	-(SP)
   7843	024006	016246 	000002 			MOV	T.PN+2(R2),-(SP)
   7844	024012	016246 	000000 			MOV	T.PN+0(R2),-(SP)
   7845	024016	016446 	000002 			MOV	S.TN+2(R4),-(SP);PUSH TASK NAME
   7846	024022	016446 	000000 			MOV	S.TN+0(R4),-(SP)
   7847					;
   7848	024026	012702 	000020 			MOV	#16.,R2		;POP SIXTEEN WORDS FROM STACK INTO BUFFER
   7849	024032					MFPS	@R1,R1		;PICK UP HIS ADDRESS
	024032	011101 				MOV	@R1,R1
   7850									;IN ISSUING TASK'S ADDRESS SPACE.
   7851									;R5 CONTAINS VIRTUAL ADDRESS OF BUFFER.
   7852	024034				10$:
   7853	024034					MTPS	(SP)+,(R1)+
	024034	012621 				MOV	(SP)+,(R1)+
   7854	024036	077202 				SOB	R2,10$
   7855					;
   7856	024040	104401 				TRAP	DR.01		;RETURN STS=+1.
   7857					;
DMGMP	- "GET PARTITION PARAME	MACRO M1110  15-OCT-79 13:47  PAGE 144
DIRECTIVE -- GET TASK PARAMETERS

   7859						.TITLE	DMGMP	- "GET PARTITION PARAMETERS" DIRECTIVE MODULE
   7860	024042					IDENT$	1,0
						.IDENT	/001000/
   7861					;
   7862					;                             COPYRIGHT (C) 1975, 1978 BY
   7863					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7864					;
   7865					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   7866					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   7867					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   7868					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   7869					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   7870					;
   7871					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   7872					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   7873					;       CORPORATION.
   7874					;
   7875					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   7876					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   7877					;
   7878					;		MODULE: "GET PARTITION PARAMETERS" DIRECTIVE
   7879					;
   7880					;		VERSION: 01-00
   7881					;
   7882					;		AUTHOR: R. MCLEAN
   7883					;
   7884					;		DATE: 19 AUG 75
   7885					;
   7886					;
   7887					;	THIS MODULE CONTAINS:
   7888					;
   7889					;	1 -- CODE TO SERVICE THE "GET PARTITION PARAMETERS" DIRECTIVE.
   7890					;
   7891					; MACRO CALLS
   7892					;
   7894						.MCALL	MFPI,MTPI,MFPS,MTPS
DMGMP	- "GET PARTITION PARAME	MACRO M1110  15-OCT-79 13:47  PAGE 145
DIRECTIVE -- GET PARTITION PARAMETERS

   7897						.SBTTL	DIRECTIVE -- GET PARTITION PARAMETERS
   7898					;+
   7899					; THE "GET PARTITION PARAMETERS" DIRECTIVE
   7900					;
   7901					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL AN INDICATED THREE WORD
   7902					; BUFFER WITH PARTITION PARAMETERS.
   7903					;
   7904					; A FOUR WORD DPB OF THE FOLLOWING FORMAT IS USED:
   7905					;
   7906					;	WD. 00 -- DIC (65.) & DPB SIZE (4.),
   7907					;	WD. 01 -- [PARTITION NAME (FIRST HALF)],
   7908					;	WD. 02 -- [PARTITION NAME (SECOND HALF)],
   7909					;	WD. 03 -- ADDRESS OF THREE WORD BUFFER.
   7910					;
   7911					; IF A PARTITION IS NOT SPECIFIED, THE PARTITION OF THE ISSUING TASK
   7912					; IS ASSUMED.
   7913					;
   7914					; THE THREE WORD BUFFER IS FILLED AS FOLLOWS:
   7915					;
   7916					;	WD. 00 -- 1/64TH BASE ADDRESS OF PARTITION,
   7917					;	WD. 01 -- 1/64TH SIZE OF PARTITION,
   7918					;	WD. 02 -- PARTITION FLAGS WORD.
   7919					;
   7920					; THE FOLLOWING STATUS IS RETURNED:
   7921					;
   7922					; CC-C CLEARED TO INDICATE SUCCESSFUL COMPLETION, AND A DIRECTIVE STATUS
   7923					; OF ONE (+0).
   7924					;
   7925					; CC-C SET TO INDICATE REJECTION, AND A DIRECTIVE STATUS OF:
   7926					;
   7927					;	-02 -- INDICATED PARTITION NOT IS SYSTEM,
   7928					;
   7929					;	-98 -- PART OF DPB OR BUFFER IS OUT OF TASK'S ADDRESS SPACE,
   7930					;	-99 -- DIC OR DPB SIZE IS INVALID.
   7931					;-
   7932					; CONTROL IS TRANSFERRED HERE (BY DIRECTIVE DISPATCH ROUTINE) WITH THE
   7933					; DIRECTIVE ISSUING TASK'S PS, PC, & R0-R5 PUSHED ONTO THE
   7934					; KERNEL STACK, AND R0-R5 SET AS FOLLOWS:
   7935					;	R0 -- ATL NODE ADDRESS OF ISSUING TASK ('.CRTSK'),
   7936					;	R1 -- VIRTUAL ADDRESS OF DPB PLUS TWO,
   7937					;	R2 -- SIZE OF DPB (IN WORDS),
   7938					;	R3 -- TWICE THE DIRECTIVE IDENTIFICATION CODE (2*DIC),
   7939					;	R4 -- STD ENTRY ADDRESS OF ISSUING TASK, AND
   7940					;	R5 -- LAST WORD OF DPB.
   7941					;
   7942					; R0 IS LEFT UNALTERED (I.E. POINTING TO ISSUING TASK'S ATL NODE).
   7943					;
   7944					; R5 CONTAINS ADDRESS OF THREE WORD BUFFER.
   7945					;
   7946	024042				.D.GMP::MFPI	(R1)+		;PUSH 2-WORD PARTITION NAME (OR TWO ZEROS)
	024042	012146 				MOV	(R1)+,-(SP)
   7947	024044					MFPI	(R1)+		;ONTO KERNEL STACK (IN REVERSE ORDER)
	024044	012146 				MOV	(R1)+,-(SP)
   7948									;WAS A NAME SPECIFIED?
   7949	024046	001011 				BNE	10$		;YES -- SCAN "TPD" FOR MATCH
   7950	024050	005766 	000002 			TST	+2(SP)		;MAYBE -- CHECK FIRST HALF OF NAME
   7951	024054	001006 				BNE	10$		;YES -- SCAN "TPD" FOR MATCH
DMGMP	- "GET PARTITION PARAME	MACRO M1110  15-OCT-79 13:47  PAGE 145-1
DIRECTIVE -- GET PARTITION PARAMETERS

   7952	024056	016504 	000006 			MOV	A.PD(R5),R4	;NO -- REPLACE TWO-ZEROS WITH NAME OF PARTITION
   7953	024062	016446 	000000 			MOV  T.PN+0(R4),-(SP)	;IN WHICH ISSUING TASK IS EXECUTING.
   7954	024066	016446 	000002 			MOV  T.PN+2(R4),-(SP)
   7955	024072				10$:
   7956	024072	012703 	007406'			MOV	#.TPDEA,R3	;SETUP R3 TO SCAN "TPD"
   7957	024076				20$:
   7958	024076	020327 	007126'			CMP	R3,#.TPDBA	;END OF SCAN?
   7959	024102	001001 				BNE	30$
   7960	024104	104776 				TRAP	DE.02		;YES -- RETURN STS=-02.
   7961					;
   7962	024106	162703 	000020 		30$:	SUB	#T.SZ,R3	;NO -- REDUCE R3 TO POINT TO TPD ENTRY
   7963	024112	010304 				MOV	R3,R4		;SETUP R4 TO INDEX THRU TPD ENTRY
   7964	024114	022466 	000002 			CMP	(R4)+,+2(SP)	;DOES NAME MATCH?
   7965	024120	001366 				BNE	20$		;NO -- CONTINUE SCAN
   7966	024122	022416 				CMP	(R4)+,@SP	;MAYBE -- CHECK SECOND HALF
   7967	024124	001364 				BNE	20$		;NO -- CONTINUE SCAN
   7968					;
   7969	024126	012703 	000002 			MOV	#2.,R3		;YES -- MOVE 2-WORDS TO BUF IN PREVIOUS SPACE
   7970	024132					MFPS	@R1,R1		;FIND BUFFER
	024132	011101 				MOV	@R1,R1
   7971	024134	011400 				MOV	@R4,R0		;FIND PARTITION START
   7972	024136				40$:
   7973	024136	012446 				MOV	(R4)+,-(SP)
   7975	024140	006216 				ASR	@SP
   7976	024142	006216 				ASR	@SP
   7977	024144	006216 				ASR	@SP
   7978	024146	006216 				ASR	@SP
   7979	024150	006216 				ASR	@SP
   7980	024152	006216 				ASR	@SP
   7981	024154	042716 	176000 			BIC	#176000,@SP	;MASK OFF CARRY FROM SHIFT
   7983	024160					MTPI	(R1)+
	024160	012621 				MOV	(SP)+,(R1)+
   7984	024162	077313 				SOB	R3,40$
   7985	024164	005724 				TST	(R4)+		;RETURN FLAGS WORD
   7986	024166					MTPS	(R4)+,(R1)+	;SET IN USER'S AREA
	024166	012421 				MOV	(R4)+,(R1)+
   7987					;
   7991	024170	000137 	013072'			JMP	.DR.NS		;RETURN R0 STATUS
   7993					;
RUN	- CLOCK HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 146
DIRECTIVE -- GET PARTITION PARAMETERS

   7995						.TITLE	RUN	- CLOCK HANDLER
   7996					;
   7997					;                             COPYRIGHT (C) 1975, 1978 BY
   7998					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   7999					;
   8000					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   8001					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   8002					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   8003					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   8004					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   8005					;
   8006					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   8007					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   8008					;       CORPORATION.
   8009					;
   8010					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   8011					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   8012					;
   8013					;		MODULE: "CLOCK TICK RECOGNITION"
   8014					;
   8015					;		VERSION: 07-00
   8016					;
   8017					;		AUTHOR: R. MCLEAN
   8018					;
   8019					;		DATE: 19 JUL 75
   8020					;
   8021					;
   8022					;	THIS MODULE CONTAINS:
   8023					;
   8024					;	1 -- CODE TO SERVICE CLOCK TICK RECOGNITION
   8025					;
   8026					;
   8027					; MODIFICATIONS:
   8028					;
   8029					;	NO.	DATE		PROGRAMMER	PURPOSE
   8030					;	---	----		----------	-------
   8031					;	001	04-MAR-77	R. BELANGER	CHANGE MIDNIGHT RECOGNITION
   8032					;
   8033					;	MACROS
   8034					;
   8036						.MCALL	CALL,RETURN,DIR$,.CRASH,.STKM
RUN	- CLOCK HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 147
CLOCK TICK RECOGNITION

   8039						.SBTTL	CLOCK TICK RECOGNITION
   8040					;
   8041					; UPDATE TICKS
   8042					;
   8043	024174	012704 	001132'		.TICK::	MOV	#.TICKS,R4	;POINT TO BASE OF TIME PARAMETERS
   8044	024200	005214 				INC	@R4		;UPDATE TICKS
   8045	024202	023714 	001152'			CMP	.TKPS,@R4	;1 SEC YET?
   8046	024206	101020 				BHI	3$		;NO DONE
   8047					;
   8048					; TICKS OVERFLOWED, UPDATE SECONDS
   8049					;
   8050	024210	005024 				CLR	(R4)+		;CLEAR FRACTIONS
   8051	024212	000337 	001150'			SWAB	.SSM+2		;FIND IF TIME TO UPDATE SSM
   8052	024216	001414 				BEQ	3$		;NO -- CONTINUE
   8053	024220	005237 	001146'			INC	.SSM		;UPDATE SECONDS SINCE MIDNIGHT
   8054	024224	022737 	124277 	001146'		CMP	#30.*60.*24.-1,.SSM ;MIDNIGHT?
   8055	024232	101006 				BHI	3$		;NO, CAN INCREMENT
   8056	024234	006337 	001134'			ASL	.CLKSW		;GIVE THE 10 TIME TO CHANGE IT'S DATE -- WE DON'T
   8057									; +++001 RREMOVED 10. INSTRUCTIONS
   8058	024240	001003 				BNE	3$		; +++001 NO -- GO ON
   8059	024242	012737 	177777 	001134'		MOV	#-1,.CLKSW	; +++001 YES -- FLAG NULL TASK TO REQUEST
   8060									; +++001 TIME-OF-DAY TASK
   8061					;
   8062					;INCREMENT IN NO OVERFLOW CASES - SECONDS OR MINUTES
   8063					;
   8064	024250				3$:
   8065					;
   8066					; SET UP FOR LINE FREQ. SERVICE
   8067					;
   8068					;
   8069	024250	012704 	002370'		4$:	MOV	#.CLKBA,R4	;DELETE THE ENTRY OR RESCHEDULE IT
   8070	024254	012405 			10$:	MOV	(R4)+,R5	;NO -- AN ENTRY HERE?
   8071	024256	001435 				BEQ	40$		;NO -- GO
   8072	024260	005724 				TST	(R4)+		;OVER AST ADDRESS
   8073	024262	005324 				DEC	(R4)+		;YES --DECREMENT THE COUNT
   8074	024264	001403 				BEQ	30$		;END OF COUNT SET EVENT FLAG
   8075	024266	062704 	000006 		20$:	ADD	#6,R4		;NO -- LOOK AT NEXT ENTRY
   8076	024272	000770 				BR	10$
   8077					;
   8078	024274				30$:	CALL	..DSEV		 ;DECLARE A SIG EVENT
	024274	004737 	042444'			JSR	PC,..DSEV
   8079	024300	012464 	177774 			MOV	(R4)+,-4(R4)	;RESET RESCHEDULE INTERVAL
   8080	024304	052434 				BIS	(R4)+,@(R4)+	;DO THE SETTING OF THE EVENT FLAG
   8081	024306	010446 				MOV	R4,-(SP)	;SAVE R4
   8082	024310	016404 	177766 			MOV	-12(R4),R4	;FIND AST ADDRESS
   8083	024314	001405 				BEQ	35$		;NONE -- FORGET IT
   8084	024316					CALL	.STAST		;START AST
	024316	004737 	015342'			JSR	PC,.STAST
   8085	024322	103002 				BCC	35$		;GOT IT -- CONTINUE
   8086	024324	010437 	001050'			MOV	R4,.CKASS	;NOT QUITE -- TASK IS CURRENT GET AT ..INTX
   8087	024330	012604 			35$:	MOV	(SP)+,R4
   8088	024332	005764 	177772 			TST	-6(R4)		;RESCHEDULE?
   8089	024336	001346 				BNE	10$		;NO -- DO NEXT ENTRY
   8090	024340	162704 	000014 			SUB	#C.SZ,R4	;BACK UP POINTER
   8091	024344					CALL	.CKDEL		;DELETE ENTRY
	024344	004737 	041666'			JSR	PC,.CKDEL
   8092	024350	000741 				BR	10$		;AND TRY AGAIN
RUN	- CLOCK HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 147-1
CLOCK TICK RECOGNITION

   8093					;
   8094	024352	105337 	001015'		40$:	DECB	.SERFG+1	;COUNT DOWN CLOCK COUNTER
   8095	024356	001306 				BNE	.TICK		;AND GO DO ANOTHER IF WE MISSED ONE
   8096	024360	012604 				MOV	(SP)+,R4	;RESTORE REGISTERS
   8097	024362	012605 				MOV	(SP)+,R5
   8098	024364	053737 	001016'	001014'		BIS	.SEWFL,.SERFG	;SET SIG EVENT FLAG IF NECESSARYH
   8099	024372	005037 	001016'			CLR	.SEWFL		;AND CLEAR FLAG
   8100	024376	000137 	014244'			JMP	..INTX		;AND RETURN TO INTERRUPT EXIT
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 148
CLOCK TICK RECOGNITION

   8102						.TITLE	QPRDTE	- DTE-20 DRIVER AND PRIMARY PROTOCOL SERVICE
   8103	024402					IDENT$	13,36
						.IDENT	/013360/
   8104					;
   8105					;                             COPYRIGHT (C) 1975, 1978 BY
   8106					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   8107					;
   8108					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   8109					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   8110					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   8111					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   8112					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   8113					;
   8114					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   8115					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   8116					;       CORPORATION.
   8117					;
   8118					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   8119					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   8120					;
   8121					;
   8122					;		MODULE: "DTE 20 INTERRUPT SERVICE AND TASK
   8123					;
   8124					;		VERSION: V13-36
   8125					;
   8126					;		AUTHOR: R. MCLEAN
   8127					;
   8128					;		DATE: 19 JUL 75
   8129					;
   8130					;
   8131					;	THIS MODULE CONTAINS:
   8132					;
   8133					;	1 -- DTE-20 INTERRUPT SERVICE
   8134					;	2 -- DTE20 TASK SERVICE CODE AND PROTOCOL SERVICE
   8135					;
   8136					; MODIFICATIONS:
   8137					;
   8138					;	NO.	DATE		PROGRAMMER	PURPOSE
   8139					;	---	----		----------	-------
   8140					;	001	21-OCT-76	A. PECKHAM	INSERT CODING TO COUNT
   8141					;						DOORBELLS.
   8142					;	002	08-NOV-76	K. RETI		ADD SUPPRESS SEND-ALL
   8143					;				R. BELANGER	CODE.
   8144					;	003	03-FEB-77	R. BELANGER	ADDED GENERALIZED DL11E
   8145					;						SUPPORT
   8146					;	004	10-FEB-77	A. PECKHAM	KEEP TO-11 QUEUE COUNT
   8147					;						STRAIGHT
   8148					;	005	16-FEB-77	A. PECKHAM	SET SPEED OF REMOTE LINES
   8149					;	006	07-MAR-77	A. PECKHAM	REORGANIZE SENDALL
   8150					;	007	08-MAR-77	A. PECKHAM	FIX "XOFF" FOR CTY
   8151					;	008	14-MAR-77	R. BELANGER	CONDITIONALLY REMOVE
   8152					;						SUPPORT FOR UNUSED DTE-20
   8153					;						DIRECTIVES
   8154					;	009	31-MAY-77	R. BELANGER	ADD SUPPORT FOR KLINIK
   8155					;						PARAMETER PASSING
   8156					;	010	15-JUL-77	R. BELANGER	ADD AUTO-BAUD SUPPORT
   8157					;	011	25-JUL-77	R. BELANGER	FIX BUG IN INITIAL STATUS
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 148-1
CLOCK TICK RECOGNITION

   8158					;	012	25-AUG-77	R. BELANGER	ADD KL POWERFAIL SUPPORT
   8159					;	013	02-SEP-77	R. BELANGER	XON/XOFF BUG FIX
   8160					;   TCO 4.2067	30-OCT-78	R. BELANGER	FIX XON TO ACCOUNT FOR NULL
   8161					;						BYTE IN THREAD PACKET
   8162					;   TCO 4.2096	30-NOV-78	R. BELANGER	REMOVE EXTRANEOUS CODE
   8163					;						FROM "XON" PROCESSOR
   8164					;   TCO 4.2181	01-FEB-79	R. BELANGER	ADD ENABLE/DISABLE XON/XOFF
   8165					;						MESSAGE.
   8166					;						MOVE DEVICE DEPENDENT XON/XOFF
   8167					;						PROCESSING TO TERMINAL DRIVER.
   8168					;   TCO 4.2216	16-MAR-79	R. BELANGER	ALLOW DTE-20 TO RUN AT FULL SPEED
   8169					;   TCO 4.2246	16-MAY-79	R. BELANGER	ELIMINATE RACE CONDITION IN SENDALL
   8170					;   TCO 4.2284	25-MAY-79	R. BELANGER	ADD NEW MODEM CONTROL SUPPORT
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 149
CLOCK TICK RECOGNITION

   8172					;
   8173					;	MACRO DEFINITIONS
   8174					;
   8176						.MCALL	RQST$,WTSE$S,$DEF
   8177						.MCALL	.DQPEN,MRKT$,WTLO$,WTSE$,.CRASH,CALL,RETURN,.STKM,DIR$,.INH6,.ENB6
   8178	024402					$DEF
   8179						.MCALL	WSIG$S,.INH5,.ENB5
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 150
CLOCK TICK RECOGNITION

   8182					;
   8183					;	DATA AREAS
   8184					;
   8185		000140 				E.OPSZ==140	;OPTIMAL SIZE FOR A TO 10 QUEUE
   8186					;
   8187					; LOCAL DEFINITIONS FOR DTE20 TASK
   8188					;
   8189		000100 				EF.TED=100	;TO ELEVEN DONE EVENT FLAG
   8190					;
   8191					; TO ELEVEN QUEUE ENTRY
   8192					;
   8193		000000 				E.FP==0		;FORWARD POINTER
   8194		000002 				E.LS==2		;LIST SIZE
   8195		000004 				E.FN==4		;FUNCTION CODE
   8196		000006 				E.DV==6		;DEVICE CODE
   8197		000010 				E.FW==10	;FUNCTION FIRST WORD
   8198					;
   8199					;	FUNCTION CODE DEFINITIONS
   8200					;
   8201		000001 				BC.RQD==1	;REQUEST DEVICES
   8202		000002 				BC.HAD==2	;HERE ARE DEVICES
   8203		000003 				BC.STR==3	;STRING DATA
   8204		000004 				BC.LNC==4	;LINE/CHARACTER DATA
   8205		000005 				BC.RDS==5	;RETURN DEVICE STATUS
   8206		000006 				BC.SDS==6	;SET DEVICE STATUS
   8207		000007 				BC.HDS==7	;HERE IS DEVICE STATUS
   8208		000010 				BC.DES==10	;DEVICE ERROR STATUS
   8209		000011 				BC.RTD==11	;RETURN TIME OF DAY
   8210		000012 				BC.HTD==12	;HERE IS TIME OF DAY
   8211		000013 				BC.FOD==13	;FLUSH OUTPUT DEVICE QUEUE
   8212		000014 				BC.SNA==14	;SEND ALL
   8213		000015 				BC.TDU==15	;DEVICE DIAL UP
   8214		000016 				BC.THU==16	;DEVICE HANG UP
   8215		000017 				BC.SAK==17	;ACKNOWLEDGE DEVICE DONE
   8216		000020 				BC.XOF==20	;X-OFF (TTY ONLY)
   8217		000021 				BC.XON==21	;X-ON (TTY ONLY)
   8218		000022 				BC.STS==22	;SET TTY SPEED
   8219		000023 				BC.SLA==23	;SET LINE ALLOCATION
   8220		000024 				BC.BTP==24	;11 REBOOT WORD
   8221		000025 				BC.AKA==25	;ACK ALL
   8222		000026 				BC.SPT==26	;START/STOP LINE
   8223		000027 				BC.EDR==27	;ENABLE/DISABLE REMOTES
   8224		000030 				BC.LDR==30	;LOAD LP RAM
   8225		000031 				BC.LDV==31	;LOAD LP VFU
   8226		000032 				BC.NSA==32	; SUPPRESS SEND-ALL FUNCTION (SET OR CLEAR BIT)
   8227		000033 				BC.SKP==33	; SEND KLINIK PARAMETERS
   8228		000034 				BC.XEN==34	; [TCO 4.2181] ENABLE/DISABLE XON/XOFF
   8229		000035 				BC.FNM==35	; [TCO 4.2181] 1 GREATER THAN MAX FUNCTION
   8230					;
   8231					;	DPB'S
   8232					;
   8233	024402				WTLODT:
   8234	024402					WTLO$	1,EF.TED	;WAIT FOR TEN DONE
	024402	   053 	   003 			.BYTE	43.,3
	024404	000001 				.WORD	1
	024406	000100 				.WORD	EF.TED
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 151
QUEUED PROTOCOL -- PROTOCOL PACKET SERVICE DISPATCH

   8236						.SBTTL	QUEUED PROTOCOL -- PROTOCOL PACKET SERVICE DISPATCH
   8237
   8238	024410				DTEHD::
   8239	024410					.STKM	0,0,0,0,0,0,0,QPRDTE,174000,DTESP
	024456	000000 	000000 	000000 		.WORD	0,0,0,0
	024464	000000
	024504	174000 	024714'	024670'		.WORD	174000,QPRDTE,DTESP
	024540	000005 				.WORD	5
	024542	007606'				.WORD	TTPEN
	024544	000000 				.WORD	0
	024546	000000 				.WORD	0
	024550	000000 				.WORD	0
	024552	000000 				.WORD	0
	024554	000000 				.WORD	0
	024556	000000 				.WORD	0
	024560	000000 				.WORD	0
	024562	000000 				.WORD	0
	024564	000000 				.WORD	0
	024566	000000 				.WORD	0
	024670	000000 				.WORD	0
	024672	000000 				.WORD	0
	024674	000000 				.WORD	0
	024676	000000 				.WORD	0
	024700	000000 				.WORD	0
	024702	000000 				.WORD	0
	024704	024714'				.WORD	QPRDTE
	024706	174000 				.WORD	174000
   8240
   8241	024710				QPRDTC::
   8242	024710	005077 	154444 			CLR	@.PRDTE		; [TCO 4.2216] SET UP THE DELAY COUNTER
   8243	024714				QPRDTE::
   8244	024714					DIR$	#WTLODT		;WAIT FOR TEN DONE
	024714	012746 	024402'			MOV	#WTLODT,-(SP)
	024720	104375 				EMT	375
   8245	024722					.INH6			;INHIBIT INTERRUPTS
	024722	013746 	177776 			MOV	@#PS,-(SP)
	024726	112737 	000300 	177776 		MOVB	#300,@#PS
   8246	024734	013700 	001006'			MOV	.CRTSK,R0	;;;POINT TO CURRENT TASK
   8247	024740	005060 	000020 			CLR	A.EF(R0)	;;;AND CLEAR THE EVENT FLAGS.
   8248	024744					.ENB6			;;;RE-ENABLE THE INTERRUPTS
	024744	012637 	177776 			MOV	(SP)+,@#PS
   8249	024750				QPRDTL:
   8250	024750					.INH6			;;;INHIBIT DTE20 INTERRUPTS
	024750	013746 	177776 			MOV	@#PS,-(SP)
	024754	112737 	000300 	177776 		MOVB	#300,@#PS
   8251	024762	013704 	001334'			MOV	TO11Q,R4	;;;PICK IT FROM THE QUEUE
   8252	024766	001402 				BEQ	10$		;;;NO QUEUE
   8253	024770	011437 	001334'			MOV	@R4,TO11Q	;;;SET UP THE NEXT LISTHEAD OR ZERO
   8254	024774				10$:
   8255	024774					.ENB6			;;;ENABLE DTE20 INTERRUPTS
	024774	012637 	177776 			MOV	(SP)+,@#PS
   8256	025000	010400 				MOV	R4,R0		;SET IN R0 ALSO
   8257	025002	001742 				BEQ	QPRDTC		;RESET DELAY COUNTER
   8258	025004	116401 	000004 			MOVB	E.FN(R4),R1	;FIND THE FUNCTION CODE OF THE REQUEST
   8259	025010	006301 				ASL	R1		;MAKE IT 2* FUNCTION
   8261	025012	020127 	000070 			CMP	R1,#DFTSZ	;CHECK FOR LEGAL FUNCTION
   8262	025016	101036 				BHI	UNRGFN
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 151-1
QUEUED PROTOCOL -- PROTOCOL PACKET SERVICE DISPATCH

   8264	025020	000171 	025022'			JMP	@DFTBL-2(R1)	;GO TO THE CORRECT ROUTINE
   8265						;
   8266	025024				DFTBL::
   8267	025024	026274'				HICTS			; (01) HERE IS INITIAL STATUS
   8268	025026	025114'				UNRGFN			; (02) UNRECGONIZED FUNCTION
   8269	025030	026502'				STRDAT			; (03) STRING DATA FOR DEVICE
   8270	025032	026706'				LINCHR			; (04) LINE NUMBER CHARACTER DATA FOR DEVICE
   8271	025034	026502'				RTDVST			; (05) RETURN DEVICE STATUS
   8272	025036	026502'				STDVST			; (06) SET DEVICE STATUS FOR DEVICE
   8273	025040	026502'				HIDVST			; (07) HERE IS DEVICE STATUS
   8274	025042	025114'				UNRGFN			; (10) ERROR DEVICE STATUS
   8275	025044	026422'				RTNTOD			; (11) RETURN TIME OF DAY
   8276	025046	027032'				RETTOD			; (12) SEND TIME OF DAY
   8277	025050	027106'				FLDVOT			; (13) FLUSH DEVICE OUTPUT QUEUE
   8278	025052	027222'				SNDALL			; (14) SEND ALL TTY'S
   8279	025054	025114'				DIALUP			; (15) DIAL UP
   8280	025056	025210'				HANGUP			; (16) HANG UP
   8281	025060	025412'				ACKNOW			; (17) ACKNOWLEDGE END OF DATA IN BUFFER
   8282	025062	026226'				XOFF			; (20) XOFF (TTY)
   8283	025064	026234'				XON			; (21) XON (TTY)
   8284	025066	025442'				SETSPD			; (22) SET TTY SPEED
   8285	025070	025426'				SETLIN			; (23) SET LINE ALLOCATION
   8286	025072	025114'				UNRGFN			; (24) SET RELOAD PARAMETERS
   8287	025074	026270'				DEAND1			; (25) ACK ALL
   8288	025076	025736'				STPLIN			; (26) STOP LINE
   8289	025100	025122'				EDRMT			; (27) ENABLE/DISABLE REMOTE LINES
   8290	025102	026502'				LDLPR			; (30) LOAD LP RAM
   8291	025104	026502'				LDLPV			; (31) LOAD LP VFU
   8292	025106	025140'				NOSNDA			; +002 (32) SET OR CLEAR "SUPPRESS SEND-ALL" BIT
   8293	025110	027144'				RCVKLP			; +++009 (33) RECIEVE KLINIK PARAMETERS FROM KL
   8294	025112	025132'				ENBXOF			; (34) ENABLE/DISABLE XOFF PROCESSING
   8295
   8296		000070 			DFTSZ=.-DFTBL			;LEGAL FUNCTIONS COUNT *2
   8297
   8298					;
   8299					;	DIALUP -- FUNCTION 15
   8300					;
   8301	025114				DIALUP::			;UNRECOGNIZED FUNCTION -- PROTOCOL BROKEN
   8302	025114				UNRGFN::
   8303	025114					.CRASH	ILF		; +++003 ILF -- ILLEGAL FUNCTION
	025114	000004 				IOT
	025116	   111 	   114 	   106 		.ASCIZ	/ILF/
	025121	   000
   8304
   8305					;
   8306					;	ENABLE/DISABLE REMOTE TERMINALS -- FUNCTION 27
   8307					;
   8308	025122				EDRMT::
   8309	025122	016037 	000010 	002576'		MOV	E.FW(R0),.INHDM	;ENABLE/DISABLE DM-11/BB'S
   8310	025130	000534 				BR	DEAND3		;AND QUIT
   8311						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 152
QUEUED PROTOCOL -- ENABLE/DISABLE SENDALL AND XOFF PROCESSING

   8313						.SBTTL QUEUED PROTOCOL -- ENABLE/DISABLE SENDALL AND XOFF PROCESSING
   8314
   8315					;
   8316					;	ENBXOF FUNCTION (ENABLE/DISABLE XOFF PROCESSING) FUNCTION 34
   8317					;
   8318
   8319						.ENABL	LSB
   8320
   8321	025132				ENBXOF::
   8322	025132	012705 	000020 			MOV	#TT.XEN,R5	; [TCO 4.2181] SET UP STATUS BIT
   8323	025136	000402 				BR	10$		; [TCO 4.2181] DO COMMON CODE
   8324						;
   8325					;
   8326					;	NOSNDA FUNCTION (SET/CLEAR SUPPRESS SEND-ALL BIT) FUNCTION 32
   8327					;
   8328
   8329	025140				NOSNDA::			; [TCO 4.2181] SET OR CLEAR BIT TO SUPPRESS SEND-ALLS
   8330	025140	012705 	000400 			MOV	#TT.NSA,R5	; [TCO 4.2181] SET UP STATUS BIT
   8331	025144				10$:
   8332	025144	000360 	000010 			SWAB	E.FW(R0)	; [TCO 4.2181] SET UP DEVICE CODE FOR "FDVNMM"
   8333	025150					CALL	FDVNMM		; [TCO 4.2181] GET R2 TO POINT TO BLOCK FOR THIS LINE
	025150	004737 	026550'			JSR	PC,FDVNMM
   8334	025154					.INH6			; [TCO 4.2246] DISALLOW INTERRUPTS
	025154	013746 	177776 			MOV	@#PS,-(SP)
	025160	112737 	000300 	177776 		MOVB	#300,@#PS
   8335	025166	040562 	000006 			BIC	R5,STSW1(R2)	;;; [TCO 4.2181] ASSUME A CLEAR
   8336	025172	105760 	000010 			TSTB	E.FW(R0)	;;; [TCO 4.2181] TEST ARGUMENT BYTE
   8337	025176	001402 				BEQ	20$		;;; [TCO 4.2181] IF .NE. 0,
   8338	025200	050562 	000006 			BIS	R5,STSW1(R2)	;;; [TCO 4.2181] THEN SET BIT.
   8339	025204				20$:
   8340	025204	000137 	026264'			JMP	DEAND2		;;; [TCO 4.2246] FREE THE  NODE
   8341						;
   8342
   8343						.DSABL	LSB
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 153
QUEUED PROTOCOL -- HANGUP

   8345						.SBTTL	QUEUED PROTOCOL -- HANGUP
   8346
   8347					;
   8348					;	HANGUP -- FUNCTION 16
   8349					;
   8350	025210				HANGUP::
   8351	025210					CALL	FDVNMM		;FIND DEVICE
	025210	004737 	026550'			JSR	PC,FDVNMM
   8352	025214	010205 				MOV	R2,R5		;SET UP TABLE ADDRESS
   8353	025216	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ; +++003 IS THIS A CTY??
   8354	025224	001420 				BEQ	5$		; +++003 NO -- GO ON
   8355	025226	105737 	001224'			TSTB	.KLNSW+0	; +++003 YES -- IS KLINIK ACTIVE??
   8356	025232	003415 				BLE	5$		; +++003 NOT THAT WE CARE
   8357	025234	010546 				MOV	R5,-(SP)	; +++003 YES -- SAVE POINTER
   8358	025236	013705 	002636'			MOV	KLNPTR,R5	; +++003 POINT TO KLINIK LINE
   8359	025242					.INH6			; +++003 DISALLOW INTERRUPTS
	025242	013746 	177776 			MOV	@#PS,-(SP)
	025246	112737 	000300 	177776 		MOVB	#300,@#PS
   8360	025254					CALL	.DLHUP		;;; +++003 HANG UP THE KLINIK LINE
	025254	004737 	040312'			JSR	PC,.DLHUP
   8361	025260					.ENB6			;;; +++003 ALLOW INTERRUPTS
	025260	012637 	177776 			MOV	(SP)+,@#PS
   8362	025264	012605 				MOV	(SP)+,R5	; +++003 RESTORE POINTER
   8363	025266				5$:
   8364	025266	022705 	003046'			CMP	#DHTBL,R5	; +++003 IS THIS  A DH11
   8365	025272	101036 				BHI	30$		; +++003 NO -- DL11 SPECIAL CASE
   8366	025274	005004 				CLR	R4		;FIND THE UNIT NUMBER
   8367	025276	156004 	000011 			BISB	E.FW+1(R0),R4
   8368	025302	162704 	000005 			SUB	#DLCNT,R4	;REMOVE DL11S
   8369									; +++003 REMOVED ONE INSTRUCTION
   8370	025306	012701 	002732'			MOV	#DMTBL,R1	;FIND DM ENTRY
   8371	025312				10$:
   8372	025312	026105 	000002 			CMP	2(R1),R5	;CORRECT ENTRY?
   8373	025316	101002 				BHI	20$		;YES -- HANGUP
   8374	025320	022121 				CMP	(R1)+,(R1)+	;NO -- LOOK AT NEXT
   8375	025322	000773 				BR	10$
   8376						;
   8377	025324				20$:
   8378	025324	042704 	177760 			BIC	#177760,R4	;MAKE IT A UNIT NUMBER
   8379	025330	016101 	177774 			MOV	-4(R1),R1	;FIND THE DM11 BB EXTERNAL PAGE ADDRESS
   8380	025334					.INH6			; +++003 DISALLOW INTERRUPTS
	025334	013746 	177776 			MOV	@#PS,-(SP)
	025340	112737 	000300 	177776 		MOVB	#300,@#PS
   8381	025346					CALL	.DMHUP		;;; +++003 HANGUP
	025346	004737 	040250'			JSR	PC,.DMHUP
   8382	025352	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ;;; +++010 IS THIS AN AUTO-BAUD LINE??
   8383	025360	001412 				BEQ	40$		;;; +++010 NO -- GO ON
   8384	025362					CALL	.DHSPR		;;; +++010 YES RESET LINE SPEED TO DEFAULT
	025362	004737 	037622'			JSR	PC,.DHSPR
   8385	025366	000407 				BR	40$		;;; +++003 RETURN THE NODE
   8386						;
   8387	025370				30$:
   8388	025370					.INH6			; +++003 DISALLOW INTERRUPTS
	025370	013746 	177776 			MOV	@#PS,-(SP)
	025374	112737 	000300 	177776 		MOVB	#300,@#PS
   8389	025402					CALL	.DLHUP		;;; +++003 HANG IT UP
	025402	004737 	040312'			JSR	PC,.DLHUP
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 153-1
QUEUED PROTOCOL -- HANGUP

   8390	025406				40$:				;;; +++003
   8391	025406	000137 	026264'			JMP	DEAND2		;;; +++003 RETURN THE NODE
   8392						;
   8393					;
   8394					;	ACKNOWLEDGE DEVICE -- FUNCTION 17
   8395					;
   8396	025412				ACKNOW::
   8397	025412					CALL	FDVNMM		;FIND UNIT ETC
	025412	004737 	026550'			JSR	PC,FDVNMM
   8398	025416					CALL	@.DQPBA-20+Q.AK(R1) ;GO TO USER STATUS ROUTINE
	025416	004771 	007400'			JSR	PC,@.DQPBA-20+Q.AK(R1)
   8399	025422				DEAND3:
   8400	025422	000137 	026270'			JMP	DEAND1		;RETURN NODE
   8401						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 154
QUEUED PROTOCOL -- SET LINE ALLOCATION

   8403						.SBTTL	QUEUED PROTOCOL -- SET LINE ALLOCATION
   8404
   8405					;
   8406					;	SET LINE ALLOCATION -- FUNCTION 23
   8407					;
   8408	025426				SETLIN::
   8409	025426					CALL	FDVNMM		;FIND DEVICE
	025426	004737 	026550'			JSR	PC,FDVNMM
   8410	025432	116461 	000011 	007402'		MOVB	E.FW+1(R4),.DQPBA-20+14(R1) ;SET IT IN THE TABLE
   8411	025440	000770 				BR	DEAND3		;AND RETURN
   8412						;
   8413					;
   8414					;	SETSPD -- SET SPEED OF TTY -- FUNCTION 22
   8415					;
   8416	025442				SETSPD::
   8417	025442	032764 	040000 	000016 		BIT	#BIT14,E.FW+6(R4) ; +++010 IS THIS AN AUTO-BAUD LINE??
   8418	025450	001403 				BEQ	5$		; +++010 NO -- GO ON
   8419	025452	012703 	016703 			MOV	#16703,R3	; +++010 YES -- DEFAULT TO 300 BAUD
   8420	025456	000431 				BR	25$		; +++010 AND PROCEED
   8421						;
   8422	025460				5$:				; +++010
   8423	025460	016402 	000012 			MOV	E.FW+2(R4),R2	;FIND THE INPUT SPEED
   8424	025464					CALL	FNDSPD		;FIND THIS SPEED
	025464	004737 	026140'			JSR	PC,FNDSPD
   8425	025470	006203 				ASR	R3		;PUT IT IN THE CORRECT POSITION FOR DH
   8426	025472	006203 				ASR	R3
   8427	025474	010346 				MOV	R3,-(SP)	;SAVE THE WORD
   8428	025476	016402 	000014 			MOV	E.FW+4(R4),R2	;FIND THE OUTPUT SPEED
   8429	025502					CALL	FNDSPD		;FIND THIS SPEED
	025502	004737 	026140'			JSR	PC,FNDSPD
   8430	025506	006303 				ASL	R3		;PUT OUTPUT SPEED IN CORRECT POSITION
   8431	025510	006303 				ASL	R3
   8432	025512	001002 				BNE	10$		;YES -- DON'T ALTER IT
   8433	025514	012703 	006007 			MOV	#6007,R3	;NO -- WELL THEN SET IT TO AN OUTPUT SPEED OF 110
   8434									;THIS IS DONE TO PREVENT PROBLEMS WHEN ZERO OUTPUT BAUD
   8435									;IS DONE AND THERE IS OUTPUT FOR THIS LINE
   8436	025520				10$:
   8437	025520	052603 				BIS	(SP)+,R3	;SET THE INPUT AND OUTPUT TOGETHER
   8438	025522	016401 	000016 			MOV	E.FW+6(R4),R1
   8439	025526	006301 				ASL	R1		;1 IS 1 STOP BIT 2 IS TWO STOP BITS
   8440	025530	042701 	177770 			BIC	#177770,R1	;CLEAR OFF JUNK
   8441	025534	050103 				BIS	R1,R3		;SET IN STATUS WORD
   8442	025536				20$:
   8443	025536	052703 	000003 			BIS	#3,R3		;SET 8 BIT CHARACTER LENGTH
   8444	025542				25$:				; +++010
   8445	025542	005005 				CLR	R5		;FIND THE LINE NUMBER
   8446	025544	156005 	000010 			BISB	E.FW(R0),R5	;FIND THE UNIT NUMBER
   8447	025550	162705 	000005 			SUB	#DLCNT,R5	;SUBTRACT OUT DL11'S
   8448	025554	100722 				BMI	DEAND3		;DL 11 NOT LEGAL
   8449	025556	010304 				MOV	R3,R4
   8450	025560	000360 	000010 			SWAB	E.FW(R0)	;SWAP THE PLACE OF THE LINE NUMBER
   8451	025564					CALL	FDVNMM
	025564	004737 	026550'			JSR	PC,FDVNMM
   8452	025570	010403 				MOV	R4,R3
   8453	025572	010504 				MOV	R5,R4		;SAVE UNIT NUMBER
   8454	025574	010205 				MOV	R2,R5
   8455	025576	016501 	000002 			MOV	TTYEXP(R5),R1	;FIND EXTERNAL PAGE ADDRESS
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 154-1
QUEUED PROTOCOL -- SET LINE ALLOCATION

   8456	025602	005760 	000016 			TST	E.FW+6(R0)	;CHECK FOR REMOTE FLAG
   8457	025606	100043 				BPL	60$		;NO -- DON'T SET REMOTE FLAG
   8458	025610	052765 	000100 	000006 		BIS	#TT.RMT,STSW1(R5) ;SET REMOTE FLAG
   8459	025616	010146 				MOV	R1,-(SP)
   8460	025620	010546 				MOV	R5,-(SP)
   8461	025622	012701 	002732'			MOV	#DMTBL,R1	;FIND ADDRESS OF DM11
   8462	025626	162705 	003046'			SUB	#DHTBL,R5
   8463	025632				40$:
   8464	025632	162705 	000200 			SUB	#200,R5		;FIND DH NUMBER
   8465	025636	100402 				BMI	50$		;END -- QUIT
   8466	025640	022121 				CMP	(R1)+,(R1)+	;MOVE ON TO NEXT DH
   8467	025642	000773 				BR	40$
   8468						;
   8469	025644				50$:
   8470	025644	011101 				MOV	@R1,R1		;SET UP FOR DM11
   8471	025646	042704 	177760 			BIC	#177760,R4	;MASK UNIT NUMBER
   8472	025652	012605 				MOV	(SP)+,R5	;RESTORE R5
   8473	025654					.INH6			; +++003 DISALLOW INTERRUPTS
	025654	013746 	177776 			MOV	@#PS,-(SP)
	025660	112737 	000300 	177776 		MOVB	#300,@#PS
   8474	025666					CALL	.DMHUP		;;; +++003 HANGUP THE DEVICE
	025666	004737 	040250'			JSR	PC,.DMHUP
   8475	025672					.ENB6			;;; +++003 ALLOW INTERRUPTS
	025672	012637 	177776 			MOV	(SP)+,@#PS
   8476	025676	012601 				MOV	(SP)+,R1	;RESTORE TTY EXTERNAL PAGE
   8477	025700	032760 	040000 	000016 		BIT	#BIT14,E.FW+6(R0) ; +++010 IS THIS AN AUTO-BAUD LINE??
   8478	025706	001403 				BEQ	60$		; ++010 NO -- GO ON
   8479	025710	052765 	000040 	000006 		BIS	#TT.ABL,STSW1(R5) ; +++010 YES -- SET THE FLAG
   8480	025716				60$:
   8481	025716					.INH6			;LOCK OUT INTERRUPTS THAT WOULD CHANGE UNIT
	025716	013746 	177776 			MOV	@#PS,-(SP)
	025722	112737 	000300 	177776 		MOVB	#300,@#PS
   8482	025730					CALL	.DHSPD		;;; +++010 SET DH11 LINE SPEED
	025730	004737 	037702'			JSR	PC,.DHSPD
   8483	025734	000553 				BR	DEAND2		;;; +++003 DEALLOCATE NODE
   8484						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 155
QUEUED PROTOCOL -- STOP LINE INPUT

   8486						.SBTTL	QUEUED PROTOCOL -- STOP LINE INPUT
   8487
   8488					;
   8489					;	STOP INPUT FROM LINE -- FUNCTION 26
   8490					;
   8491	025736				STPLIN::
   8492	025736	000360 	000010 			SWAB	E.FW(R0)	;SWAP THE BYTES
   8493	025742					CALL	FDVNMM		;FIND DEVICE
	025742	004737 	026550'			JSR	PC,FDVNMM
   8494	025746	032762 	000002 	000006 		BIT	#TT.CTY,STSW1(R2) ; +++003 IS THIS A CTY?
   8495	025754	001411 				BEQ	10$		; +++003 NO -- GO ON
   8496	025756	105737 	001224'			TSTB	.KLNSW+0	; +++003 YES -- IS KLINIK ACTIVE?
   8497	025762	003406 				BLE	10$		; +++003 NOT THAT WE CARE -- GO ON
   8498	025764	010246 				MOV	R2,-(SP)	; +++003 YES -- SAVE R2
   8499	025766	013702 	002636'			MOV	KLNPTR,R2	; +++003 KLINIK POINTER TO R2
   8500	025772					CALL	DLSTOP		; +++003 STOP THE KLINIK LINE
	025772	004737 	026062'			JSR	PC,DLSTOP
   8501	025776	012602 				MOV	(SP)+,R2	; +++003 RESTORE POINTER
   8502	026000				10$:
   8503	026000	022702 	003046'			CMP	#DHTBL,R2	; +++003 IS THIS A DH11??
   8504	026004	101023 				BHI	STOPDL		; +++003 NO -- STOP THE DL11E
   8505	026006	016203 	000004 			MOV	STSW0(R2),R3	;FIND THE REQUESTED SPEED
   8506	026012	010205 				MOV	R2,R5		; +++010 SET UP R5 FOR ".DHSPD"
   8507	026014	010304 				MOV	R3,R4		; +++010 SAVE R3 IN R4
   8508	026016	105760 	000010 			TSTB	E.FW(R0)	;CHECK TO SEE IF STOP OR START
   8509	026022	001002 				BNE	20$		; +++010 START LINE -- GO DO IT
   8510	026024	042703 	141700 			BIC	#S0.MSK!S0.ISP,R3	; [TCO 4.2284] STOP LINE -- SET LINE SPEED ON INPUT TO 0
   8511	026030				20$:				; +++010
   8512	026030					.INH6			; +++010 DISALLOW INTERRUPTS
	026030	013746 	177776 			MOV	@#PS,-(SP)
	026034	112737 	000300 	177776 		MOVB	#300,@#PS
   8513	026042					CALL	.DHSPD		;;; +++010 SET THE NEW LINE SPEED
	026042	004737 	037702'			JSR	PC,.DHSPD
   8514	026046	010462 	000004 			MOV	R4,STSW0(R2)	;;; +++010 SET THE SPEED IN THE DLS TABLE
   8515	026052	000504 				BR	DEAND2		;;; +++010 DEALLOCATE THE NODE
   8516						;
   8517	026054				STOPDL:				; +++003
   8518	026054					CALL	DLSTOP		; +++003 DO THE SET / CLEAR FOR THIS LINE
	026054	004737 	026062'			JSR	PC,DLSTOP
   8519	026060	000503 				BR	DEAND1		; +++003 DEALLOCATE NODE AND EXIT
   8520						;
   8521	026062				DLSTOP:
   8522	026062					.INH6			; +++003 DISALLOW INTERRUPTS
	026062	013746 	177776 			MOV	@#PS,-(SP)
	026066	112737 	000300 	177776 		MOVB	#300,@#PS
   8523	026074	016201 	000002 			MOV	TTYEXP(R2),R1	;;; +++003 I/O PAGE POINTER TO R1
   8524	026100	012703 	000100 			MOV	#DL.REN,R3	;;; +++003 START / STOP BIT TO R3
   8525	026104	105760 	000010 			TSTB	E.FW(R0)	;;; +++003 IS THIS A STOP OR A START??
   8526	026110	001004 				BNE	10$		;;; +++003 STOP -- GO ON
   8527	026112	105062 	000004 			CLRB	STSW0(R2)	;;; [TCO 4.2284] START THE  LINE
   8528	026116	050311 				BIS	R3,(R1)		;;; +++003 ENABLE INTERRUPPTS
   8529	026120	000404 				BR	20$		;;; +++003 AND RETURN
   8530						;
   8531	026122				10$:
   8532	026122	112762 	177777 	000004 		MOVB	#-1,STSW0(R2)	;;; [TCO 4.2284] STOP THE LINE
   8533	026130	040311 				BIC	R3,(R1)		;;; +++003 DISABLE INTERRUPTS
   8534	026132				20$:
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 155-1
QUEUED PROTOCOL -- STOP LINE INPUT

   8535	026132					.ENB6			;;; +++003 ALLOW INTERRUPTS
	026132	012637 	177776 			MOV	(SP)+,@#PS
   8536	026136					RETURN			; +++003 TO CALLER
	026136	000207 				RTS	PC
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 156
QUEUED PROTOCOL -- FIND LINE SPEED

   8538						.SBTTL	QUEUED PROTOCOL -- FIND LINE SPEED
   8539
   8540	026140				FNDSPD:
   8541	026140	012705 	026172'			MOV	#SPDTBL,R5	;FIND THE ADDRESS OF THE SPEED TABLE
   8542	026144	012701 	000016 			MOV	#SPDTBZ,R1	;SET UP THE TABLE SIZE
   8543	026150	005003 				CLR	R3		;SET UP COUNTER
   8544	026152				10$:
   8545	026152	020225 				CMP	R2,(R5)+	;COMPARE AGAINST TABLE
   8546	026154	001404 				BEQ	20$		;FOUND CORRECT ENTRY -- R3 IS CORRECT WHEN FOUND
   8547	026156	005203 				INC	R3		;UPDATE R3
   8548	026160	077104 				SOB	R1,10$		;TRY NEXT ENTRY
   8549	026162	005726 				TST	(SP)+		;RETURN TO DELETE NODE
   8550	026164	000441 				BR	DEAND1
   8551						;
   8552	026166				20$:
   8553	026166	000303 				SWAB	R3		;SET IN HIGH BYTE
   8554	026170					RETURN			;RETURN TO CALLER
	026170	000207 				RTS	PC
   8555
   8556	026172				SPDTBL:
   8557	026172	000000 				.WORD	0		;ZERO BAUD
   8558	026174	000062 				.WORD	50.		;50 BAUD
   8559	026176	000113 				.WORD	75.		;ETC ......
   8560	026200	000156 				.WORD	110.
   8561	026202	000206 				.WORD	134.
   8562	026204	000226 				.WORD	150.
   8563	026206	000310 				.WORD	200.
   8564	026210	000454 				.WORD	300.
   8565	026212	001130 				.WORD	600.
   8566	026214	002260 				.WORD	1200.
   8567	026216	003410 				.WORD	1800.
   8568	026220	004540 				.WORD	2400.
   8569	026222	011300 				.WORD	4800.
   8570	026224	022600 				.WORD	9600.
   8571
   8572		000016 			SPDTBZ=.-SPDTBL/2
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 157
QUEUED PROTOCOL -- XOFF

   8574						.SBTTL	QUEUED PROTOCOL -- XOFF
   8575
   8576					;
   8577					;	XOFF -- FUNCTION 20
   8578					;
   8579					;	THIS ROUTINE WILL INITIATE THE XOFF SEQUENCE FOR A TERMINAL LINE.
   8580					;	THE "XOFF" STATUS BIT ("TT.XOF") IS SET IN THE LINE STATUS WORD WHICH
   8581					;	BLOCKS ANY FURTHER OUTPUT FROM THE TERMINAL DRIVER. IF THE LINE IS
   8582					;	A DH11, THE OUTPUT IS NOT STOPPED IMMEDIATELY, BUT A RUNDOWN SEQUENCE
   8583					;	IS INITATED SINCE EARLIER DH11'S WILL "RUN AWAY" IF THE DEVICE BYTE
   8584					;	COUNT IS SIMPLY CLEARED. THE TERMINAL INTERRUPT SERVICE WILL RESET THE
   8585					;	PACKET ADDRESS AND BYTE COUNT AT OUTPUT DONE SO THAT THE XON CODE CAN
   8586					;	DO A NORMAL LINE START.
   8587					;
   8588					;	THIS MESSAGE IS IGNORED IF:
   8589					;
   8590					;		1. THE LINE IS ALREADY X'D OFF
   8591					;		2. THE LINE HAS NO OUTPUT PENDING (THREAD LIST EMPTY)
   8592					;		3. A SENDALL IS IN PROGRESS ON THIS LINE
   8593					;		4. THE CTY IS IN PDP-11 I/O WAIT AND THE CTY IS TO BE X'D OFF
   8594
   8595						.ENABL	LSB
   8596
   8597	026226				XOFF::
   8598	026226	012705 	037242'			MOV	#.TTXOF,R5	; [TCO 4.2181] SET UP DISPATCH ADDRESS
   8599	026232	000402 				BR	10$		; [TCO 4.2181] DO COMMON CODE
   8600						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 158
QUEUED PROTOCOL -- XON

   8602						.SBTTL	QUEUED PROTOCOL -- XON
   8603
   8604					;
   8605					;	XON -- FUNCTION 21
   8606					;
   8607					;	THIS ROUTINE WILL RESUME OUTPUT FOR A LINE WHICH WAS PREVIOUSLY
   8608					;	X'D OFF.  THE OUTPUT WILL BE RESUMED PER THE DATA IN THE CURRENT
   8609					;	NODE IN THE THREAD LIST FOR THIS LINE. (T.HCBC AND T.HACD) THIS
   8610					;	DATA IS SAVED AT OUTPUT INTERRUPT TIME FROM THE XOFF.
   8611					;
   8612					;	THIS MESSAGE WILL BE IGNORED IF:
   8613					;
   8614					;		1. THE LINE HAS NOT BEEN PREVIOUSLY X'D OFF
   8615					;		2. A SENDALL IS CURRENTLY IN PROGRESS ON THIS LINE
   8616					;
   8617					;	THE DEVICE WILL NOT BE RESTARTED IF:
   8618					;
   8619					;		1. OUTPUT IS ALREADY IN PROGRESS ON THIS LINE
   8620					;		2. THE OUTPUT THREAD LIST FOR THIS LINE IS EMPTY
   8621					;		3. THE DEVICE DOES NOT EXIST
   8622
   8623
   8624	026234				XON::
   8625	026234	012705 	037374'			MOV	#.TTXON,R5	; [TCO 4.2181] SET UP DISPATCH ADDRESS
   8626	026240				10$:
   8627	026240					CALL	FDVNMM		; [TCO 4.2181] FIND THIS DEVICE
	026240	004737 	026550'			JSR	PC,FDVNMM
   8628	026244					.INH6			; [TCO 4.2181] INHIBIT INTERRUPTS
	026244	013746 	177776 			MOV	@#PS,-(SP)
	026250	112737 	000300 	177776 		MOVB	#300,@#PS
   8629	026256	010546 				MOV	R5,-(SP)	;;; [TCO 4.2181] STACK THE DISPATCH
   8630	026260	010205 				MOV	R2,R5		;;; [TCO 4.2181] COPY DLS POINTER TO R5
   8631	026262					CALL	@(SP)+		;;; [TCO 4.2181] PROCESS THE DIRECTIVE
	026262	004736 				JSR	PC,@(SP)+
   8632	026264				DEAND2:
   8633	026264					.ENB6			;;; [TCO 4.2181] ENABLE INTERRUPTS
	026264	012637 	177776 			MOV	(SP)+,@#PS
   8634	026270				DEAND1:
   8635	026270	000137 	027076'			JMP	DEANOD		; [TCO 4.2181] DEALLOCATE THE NODE
   8636						;
   8637
   8638						.DSABL	LSB
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 159
QUEUED PROTOCOL -- HERE IS INITIAL STATUS

   8640						.SBTTL	QUEUED PROTOCOL -- HERE IS INITIAL STATUS
   8641
   8642					;
   8643					;	HERE IS INITIAL STATUS -- FUNCTION 1
   8644					;	FW IS ALLOCATED WITH LOW ORDER PART AS # OF TTY'S
   8645					;	BIT 16 IS ALLOCATED TO INDICATE 50CPS
   8646					;
   8647					;
   8648
   8649						.ENABL	LSB
   8650
   8651	026274				HICTS::
   8652	026274	012737 	000074 	001152'		MOV	#60.,.TKPS	;SET UP THE CLOCK TO 60. CPS
   8653	026302	105760 	000010 			TSTB	E.FW+0(R0)	; +++011 CHECK FOR 50 CPS (BYTES ARE SWAPPED)
   8654	026306	100003 				BPL	10$		;HIGH ORDER BIT SET IS 50CPS
   8655	026310	162737 	000012 	001152'		SUB	#10.,.TKPS	;SET TO 50 CPS
   8656	026316				10$:
   8657	026316	012703 	000001 			MOV	#D.CCTY,R3	;SET DEVICE ID
   8658	026322	012701 	000002 			MOV	#BC.HAD,R1	;SET HERE IS DEVICE STATUS
   8659	026326	013704 	002634'			MOV	CTYPTR,R4	;FIND THE CTY NUMBER
   8660	026332	162704 	002776'			SUB	#TTTBL,R4
   8661	026336	006204 				ASR	R4		;MAKE NUMBER
   8662	026340	006204 				ASR	R4
   8663	026342	006204 				ASR	R4
   8664	026344					CALL	..STFC		;START FUNCTION
	026344	004737 	044242'			JSR	PC,..STFC
   8665	026350	105737 	001214'			TSTB	.KLNMD+0	; +++009 ANY KLINIK PARAMETERS TO SEND??
   8666	026354	001415 				BEQ	15$		; +++009 NO -- GO ON
   8667	026356	010046 				MOV	R0,-(SP)	; +++009 YES -- SAVE R0
   8668	026360	012700 	001174'			MOV	#.KLNPB,R0	; +++009 BUFFER POINTER TO R0
   8669	026364	012710 	000026 			MOV	#KLNPLN,(R0)	; +++009 BYTE COUNT TO BUFFER HEADER
   8670	026370	012701 	100033 			MOV	#BC.SKP+100000,R1 ; +++009 FUNCTION CODE TO R1
   8671	026374	005002 				CLR	R2		; +++009 DON'T WAIT FOR IT
   8672	026376	012703 	000200 			MOV	#D.CCPU,R3	; +++009 DEVICE ID TO R3
   8673	026402					CALL	..STIN		; +++009 SEND THE KLINIK PARAMETERS
	026402	004737 	044432'			JSR	PC,..STIN
   8674	026406	012600 				MOV	(SP)+,R0	; +++009 RESTORE R0
   8675	026410				15$:				; +++009
   8676	026410	013704 	001156'			MOV	.BTPRM,R4	;SEND BOOT PARAMETERS
   8677	026414	012701 	000024 			MOV	#BC.BTP,R1	;SET BOOT PARAMETERS
   8678	026420	000407 				BR	20$		;DEALLOCATE NODE
   8679						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 160
QUEUED PROTOCOL -- RETURN TIME OF DAY

   8681						.SBTTL	QUEUED PROTOCOL -- RETURN TIME OF DAY
   8682
   8683					;
   8684					;	RTNTOD -- RETURN TIME OF DAY TO KL -- FUNCTION 11
   8685					;
   8686	026422				RTNTOD::
   8687	026422	012703 	000007 			MOV	#D.CCLK,R3	;SET UP TO POINT TO CLOCK
   8688	026426	012701 	000012 			MOV	#BC.HTD,R1	;SET DEVICE ID
   8689	026432	013704 	001136'			MOV	.DATE3,R4	;RETURN DATE OR 0 IF NONE HERE
   8690	026436	001003 				BNE	30$		;YES -- DATE VALID RETURN IT
   8691	026440				20$:
   8692	026440					CALL	..STFC		;SEND FUNCTION
	026440	004737 	044242'			JSR	PC,..STFC
   8693	026444	000406 				BR	40$		;DEALLOCATE NODE
   8694						;
   8695	026446				30$:
   8696	026446	012737 	177777 	002602'		MOV	#-1,.ABFLG	; +++010 FLAG "SETSPD" TO REPORT ALL LINES
   8697	026454					DIR$	#.RQSPD		; +++010 SET SPEED AND THEN RETURN TIME OF DAY
	026454	012746 	026464'			MOV	#.RQSPD,-(SP)
	026460	104375 				EMT	375
   8698	026462				40$:
   8699	026462	000702 				BR	DEAND1		; +++003 DEALLOCATE THIS NODE
   8700						;
   8701
   8702						.DSABL	LSB
   8703
   8704	026464				.RQSPD::			; +++010 ALSO CALLED FROM TTYDRR
   8705	026464					RQST$	SETSPD
	026464	   013 	   007 			.BYTE	11.,7
	026466	073634 	074504 			.RAD50	/SETSPD/
	026472	000000 	000000 			.WORD	0,0
	026476	000000 				.WORD
	026500	   000 	   000 			.BYTE	,
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 161
QUEUED PROTOCOL -- STRING DATA

   8707						.SBTTL	QUEUED PROTOCOL -- STRING DATA
   8708
   8709					;	STRDAT -- ROUTINE TO HANDLE STRING DATA -- FUNCTION 3
   8710					;	HIDVST -- ROUTINE TO RECIEVE DEVICE STATUS -- FUNCTION 7
   8711					;	RTDVST -- ROUTINE TO RECEIVE REQUEST FOR DEVICE STATUS -- FUNCTION 5
   8712					;	STDVST -- ROUTINE TOSET DEVICE STATUS -- FUNCTION 6
   8713					;	LDLPR -- ROUTINE TO LOAD LP RAM -- FUNCTION 30
   8714					;	LDLPV -- ROUTINE TO LOAD LP VFU -- FUNCTION 31
   8715					;
   8716					;
   8717	026502				HIDVST::
   8718	026502				LDLPR::
   8719	026502				LDLPV::
   8720	026502				STDVST::
   8721	026502				RTDVST::
   8722	026502				STRDAT::
   8723	026502	012702 	000006 			MOV	#6,R2		;MOVE OVER THE LISTHEAD AND COUNT
   8724	026506	060204 				ADD	R2,R4		;FIND THE DEVICE ADDRESS
   8725	026510	012401 				MOV	(R4)+,R1	;FIND THE DEVICE ADDRESS
   8726	026512	012403 				MOV	(R4)+,R3	;FIND THE FIRST WORD
   8727	026514	160204 				SUB	R2,R4		;BACKUP TO STORE IN THE HEADER
   8728	026516	111464 	000003 			MOVB	@R4,3(R4)	;SAVE FUNCTION CODE
   8729	026522	010414 				MOV	R4,@R4		;SAVE THE ADDRESS
   8730	026524	060224 				ADD	R2,(R4)+	;UPDATE ADDRESS
   8731	026526	000303 				SWAB	R3		;SET UP BYTES SWAPED
   8732	026530	110314 				MOVB	R3,@R4		;STORE BYTE COUNT
   8733	026532					CALL	FDVNM		;FIND DEVICE TABLE ENTRY
	026532	004737 	026564'			JSR	PC,FDVNM
   8734	026536	103557 				BCS	DEANOD		;ILLEGAL DEVICE -- FORGET IT
   8735					;
   8736	026540					CALL	@.DQPBA+Q.ST-20(R1) ;START DEVICE
	026540	004771 	007372'			JSR	PC,@.DQPBA+Q.ST-20(R1)
   8737	026544				10$:
   8738	026544	000137 	024750'			JMP	QPRDTL		;GO TO DO MORE WORK
   8739						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 162
QUEUED PROTOCOL -- FIND DEVICE NAME

   8741						.SBTTL	QUEUED PROTOCOL -- FIND DEVICE NAME
   8742
   8743						.ENABL	LSB
   8744
   8745					;+
   8746					; FDVNMM -- FIND DEVICE NAME
   8747					;
   8748					; THIS SUBROUTINE WILL RETURN A POINTER TO A DEVICE TABLE ENTRY IN R2 IF THE
   8749					; DEVICE EXISTS IN THE SYSTEM.
   8750					;
   8751					; INPUTS:
   8752					;
   8753					;	R0 -- POINTS TO THE TO11Q PACKET
   8754					;	R4 -- POINTS TO THE TO11Q PACKET
   8755					;
   8756					; OUTPUTS:
   8757					;
   8758					;	R0 -- POINTS TO THE TO11Q PACKET
   8759					;	R1 -- CONTAINS THE DEVICE CODE
   8760					;	R2 -- POINTS TO THE DEVICE TABLE ENTRY FOR THE DEVICE
   8761					;	R4 -- POINTS TO THE TO11Q PACKET
   8762					;
   8763					; NOTE:
   8764					;
   8765					; 	IF THE DEVICE DOES NOT EXIST, "FDVNMM" ACKNOWLEGES THE PACKET
   8766					;	AND IMMEDIATELY DEQUEUES IT WITHOUT RETURNING TO THE CALLING ROUTINE
   8767					;-
   8768
   8769	026550				FDVNMM:
   8770	026550	016001 	000006 			MOV	E.DV(R0),R1	;FIND DEVICE
   8771	026554	016003 	000010 			MOV	E.FW(R0),R3	;FIND FIRST WORD
   8772	026560	005046 				CLR	-(SP)		;SAVE ENTRY FLAG
   8773	026562	000402 				BR	10$
   8774						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 163
QUEUED PROTOCOL -- FIND DEVICE NAME

   8776					;+
   8777					; FDVNM -- FIND DEVICE NAME
   8778					;
   8779					; THIS ROUTINE PERFORMS EXACTLY THE SAME THE SAME FUNCTION AS "FDVNMM",
   8780					; ABOVE, EXCEPT THAT IT WILL RETURN WITH CC-C SET IF THE DEVICE DOES NOT EXIST.
   8781					;
   8782					; INPUTS:
   8783					;
   8784					;	R0 -- POINTS TO THE TO11Q PACKET
   8785					;	R1 -- CONTAINS THE DEVICE CODE FOR THE DEVICE
   8786					;	R3 -- CONTAINS THE FIRST WORD FROM TH T011Q PACKET
   8787					;	R4 -- POINTS TO THE TO11Q PACKET
   8788					;
   8789					; OUTPUTS:
   8790					;
   8791					;	R0 -- POINTS TO THE TO11Q PACKET
   8792					;	R1 -- CONTAINS THE DEVICE CODE
   8793					;	R2 -- POINTS TO THE DEVICE TABLE ENTRY FOR THE DEVICE
   8794					;	R4 -- POINTS TO THE TO11Q PACKET
   8795					;
   8796					; NOTE:
   8797					;
   8798					; 	IF THE DEVICE DOES NOT EXIST, THE T011Q PACKET IS ACKNOWLEDGED
   8799					;	AND CC-C IS SET FOR THE RETURN.
   8800					;-
   8801
   8802	026564				FDVNM:
   8803	026564	012746 	177777 			MOV	#-1,-(SP)	;SAVE ENTRY FLAG
   8804	026570				10$:
   8805	026570	010546 				MOV	R5,-(SP)	;SAVE REGISTERS
   8806	026572	010446 				MOV	R4,-(SP)
   8807	026574	010146 				MOV	R1,-(SP)	;SAVE DEVICE
   8808	026576	006301 				ASL	R1		;FIND THE DEVICE ADDRESS
   8809	026600	006301 				ASL	R1
   8810	026602	006301 				ASL	R1
   8811	026604	006301 				ASL	R1
   8812	026606	116105 	007370'			MOVB	.DQPBA-20+Q.TS(R1),R5 ;FIND THE SIZE OF A TABLE ENTRY
   8813	026612	016102 	007366'			MOV	.DQPBA-20+Q.DA(R1),R2 ;FIND THE TABLE HEAD ADDRESS
   8814	026616	105003 				CLRB	R3		;FIND THE LINE NUMBER
   8815	026620	000303 				SWAB	R3		;PUT IT IN LOWER ORDER OF BYTE
   8816	026622	010346 				MOV	R3,-(SP)	;SAVE LINE NUMBER
   8817	026624	126103 	007404'			CMPB	.DQPBA-20+Q.DZ(R1),R3 ;IS THIS A LEGAL NUMBER?
   8818	026630	101416 				BLOS	70$		;NO -- IGNORE IT -- NOTE THIS SETS C BIT
   8819	026632				20$:
   8820	026632	005303 				DEC	R3		;ATTEMPT TO FIND THE ADDRESS OF THE HEAD OF THE LIST
   8821	026634	100402 				BMI	30$		;FOUND IT -- QUIT -- NOTE THIS SHOULD CLEAR C
   8822	026636	060502 				ADD	R5,R2		;MULTIPLY BY TABLE ENTRY SIZE
   8823	026640	000774 				BR	20$		;AND TRY AGAIN
   8824						;
   8825	026642				30$:
   8826	026642	022626 				CMP	(SP)+,(SP)+
   8827	026644	000241 				CLC
   8828	026646				40$:
   8829	026646	012604 				MOV	(SP)+,R4
   8830	026650	012605 				MOV	(SP)+,R5	;RESTORE REGISTERS
   8831	026652	005226 				INC	(SP)+		;REMOVE THE ENTRY FLAG
   8832	026654	103401 				BCS	60$		; CHECK EXIT FLAG IF CC-C IS SET
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 163-1
QUEUED PROTOCOL -- FIND DEVICE NAME

   8833	026656				50$:
   8834	026656					RETURN			;RETURN TO CALLER
	026656	000207 				RTS	PC
   8835					;
   8836					; HERE TO SIMPLY DEALLOCATE TO11Q PACKET AND RETURN TO TOP OF TASK
   8837					;
   8838	026660				60$:
   8839	026660	001776 				BEQ	50$		; IF FLAG WAS -1, JUST RETURN WITH CC-C SET
   8840	026662	005726 				TST	(SP)+		; ELSE FLUSH RETURN
   8841	026664	000504 				BR	DEANOD		; DEALLOCATE AND START NEXT PACKET
   8842						;
   8843					;
   8844					; HERE TO ACKNOWLEDGE NON-EXISTENT DEVICE
   8845					;
   8846	026666				70$:
   8847	026666	012604 				MOV	(SP)+,R4	;SET LINE NUMBER
   8848	026670	012603 				MOV	(SP)+,R3	;SET DEVICE NAME
   8849	026672	012701 	000017 			MOV	#BC.SAK,R1	;SEND ACK
   8850	026676					CALL	..STFC		;START FUNCTION
	026676	004737 	044242'			JSR	PC,..STFC
   8851	026702	000261 				SEC			;SET ERROR
   8852	026704	000760 				BR	40$		;AND RETURN
   8853						;
   8854
   8855						.DSABL	LSB
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 164
QUEUED PROTOCOL -- LINE NUMBER - CHARACTER

   8857						.SBTTL	QUEUED PROTOCOL -- LINE NUMBER - CHARACTER
   8858
   8859					;
   8860					;	LINCHR --LINE NUMBER - CHARACTER -- FUNCTION 4
   8861					;
   8862	026706				LINCHR::
   8863	026706	010046 				MOV	R0,-(SP)	;SAVE THE NODE ADDRESS
   8864	026710	005046 				CLR	-(SP)
   8865	026712	116416 	000005 			MOVB	E.FN+1(R4),@SP	;SAVE SIZE OF BLOCK
   8866	026716	162716 	000010 			SUB	#E.FW,@SP	;SUBTRACT THE SIZE OF THE HEADER
   8867	026722	010405 				MOV	R4,R5		;SET UP THE POINTER TO THE BUFFER
   8868	026724	016404 	000006 			MOV	E.DV(R4),R4	;FIND THE DEVICE
   8869	026730	062705 	000010 			ADD	#E.FW,R5	;POINT TO THE CHARACTER
   8870	026734				4$:
   8871	026734	012701 	000014 			MOV	#T.HHDS+4,R1	;SET UP THE BUFFER SIZE
   8872					;
   8873	026740				5$:
   8874	026740					CALL	..ALOW		;ALLOCATE A BLOCK
	026740	004737 	043322'			JSR	PC,..ALOW
   8875					;
   8876	026744				10$:
   8877	026744	010002 				MOV	R0,R2		;SAVE THE NODE ADDRESS
   8878	026746	005722 				TST	(R2)+		;MOVE OVER THE THREAD POINTER
   8879	026750	010122 				MOV	R1,(R2)+	;SET UP THE CHARACTER COUNT
   8880	026752	010012 				MOV	R0,@R2		;SET UP THE MEMORY ADDRESS
   8881	026754	062722 	000012 			ADD	#T.HHDS+2,(R2)+	;POINT TO THE BUFFER
   8882	026760	012722 	000001 			MOV	#1,(R2)+	;SET UP THE CURRENT COUNT POINTER
   8883	026764	005722 				TST	(R2)+
   8884	026766	010401 				MOV	R4,R1		;PICK UP THE DEVICE
   8885	026770	112503 				MOVB	(R5)+,R3
   8886	026772	112522 				MOVB	(R5)+,(R2)+	;STORE THE CHARCTER
   8887	026774	000303 				SWAB	R3		;SET UP LINE NUMBER FOR FDVNM
   8888	026776					CALL	FDVNM		;FIND THE DEVICE NUMBER
	026776	004737 	026564'			JSR	PC,FDVNM
   8889	027002	103410 				BCS	30$		;ILLEGAL LINE NUMBER
   8890	027004					CALL	@.DQPBA+Q.ST-20(R1) ;START TTY
	027004	004771 	007372'			JSR	PC,@.DQPBA+Q.ST-20(R1)
   8891	027010				20$:
   8892	027010	162716 	000002 			SUB	#2,@SP		;POINT TO THE NEXT CHARACTER
   8893	027014	001347 				BNE	4$		;DO AT LEAST ONE MORE
   8894	027016	005726 				TST	(SP)+		;REMOVE COUNT
   8895	027020	012600 				MOV	(SP)+,R0	;SET UP TO RETURN NODE
   8896	027022	000425 				BR	DEANOD		;ALL DONE -- RETURN THE NODE
   8897						;
   8898	027024				30$:
   8899	027024					CALL	..DECN		;DEALLOCATE BUFFER
	027024	004737 	043162'			JSR	PC,..DECN
   8900	027030	000767 				BR	20$		;AND TRY NEXT BLOCK
   8901						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 165
QUEUED PROTOCOL -- RETURN TIME OF DAY

   8903						.SBTTL	QUEUED PROTOCOL -- RETURN TIME OF DAY
   8904
   8905					;
   8906					;	RETTOD -- RETURN TIME OF DAY -- FUNCTION 12
   8907					;
   8908	027032				RETTOD::
   8909	027032	062704 	000010 			ADD	#E.FW,R4	;MOVE OVER THE HEADER
   8910	027036	005724 				TST	(R4)+		;MOVE OVER THE VALID BIT AND CHECK IT
   8911	027040	001416 				BEQ	DEANOD		;TIME NOT VALID FORGET IT
   8912									; +++003 REMOVED ONE INSTRUCTION
   8913	027042	012703 	001136'			MOV	#.DATE,R3	;SET UP TO SET DATE
   8914	027046					.INH6			;;;INHIBIT CLOCK INTERRUPTS
	027046	013746 	177776 			MOV	@#PS,-(SP)
	027052	112737 	000300 	177776 		MOVB	#300,@#PS
   8915	027060	012423 				MOV	(R4)+,(R3)+	;;;SET UP VALIDITY BITS
   8916	027062	012423 				MOV	(R4)+,(R3)+	;;;SET UP YEAR
   8917	027064	012423 				MOV	(R4)+,(R3)+	;;;SET UP DAY
   8918									;;;SET UP MON
   8919	027066	012423 				MOV	(R4)+,(R3)+	;;;SAVE DAYLIGHT SAVINGS TIME INDICATOR (1=DST)
   8920									;;;SET UP DAY OF WEEK
   8921	027070	012423 				MOV	(R4)+,(R3)+	;;;SET SECONDS SINCE MIDNIGHT
   8922	027072					.ENB6			;ENABLE INTERRUPTS
	027072	012637 	177776 			MOV	(SP)+,@#PS
   8923	027076				DEANOD:
   8924	027076					CALL	..DECN		;DEALLOCATE BUFFER
	027076	004737 	043162'			JSR	PC,..DECN
   8925	027102				QPRDTF:
   8926	027102	000137 	024750'			JMP	QPRDTL		;GO TO NEXT FUNCTION
   8927						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 166
QUEUED PROTOCOL -- FLUSH DEVICE OUTPUT QUEUE

   8929						.SBTTL	QUEUED PROTOCOL -- FLUSH DEVICE OUTPUT QUEUE
   8930
   8931					;
   8932					;	FLDVOT -- FLUSH OUTPUT FOR THIS DEVICE -- FUNCTION 13
   8933					;
   8934	027106				FLDVOT::
   8935	027106					CALL	FDVNMM		;FIND THE DEVICE POINTER
	027106	004737 	026550'			JSR	PC,FDVNMM
   8936	027112	010146 				MOV	R1,-(SP)
   8937	027114					CALL	@.DQPBA+Q.SP-20(R1) ;STOP DEVICE
	027114	004771 	007374'			JSR	PC,@.DQPBA+Q.SP-20(R1)
   8938	027120	012601 				MOV	(SP)+,R1
   8939	027122	016100 	007366'			MOV	.DQPBA+Q.DA-20(R1),R0 ;FIND DEVICE TABLE BASE ADDRESS
   8940	027126	010205 				MOV	R2,R5		;FIND THIS DEVICE ADDRESS
   8941	027130	016403 	000006 			MOV	E.DV(R4),R3	;FIND DEVICE NUMBER
   8942	027134					CALL	..SACK		;SEND ACKNOWLEDGEMENT
	027134	004737 	044156'			JSR	PC,..SACK
   8943	027140	010400 				MOV	R4,R0		;SET UP TO RETURN NODE
   8944	027142	000755 				BR	DEANOD		;DEALLOCATE NODE
   8945						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 167
QUEUED PROTOCOL -- RECIEVE KLINIK PARAMETERS

   8947						.SBTTL	QUEUED PROTOCOL -- RECIEVE KLINIK PARAMETERS
   8948
   8949					;
   8950					;	RCVKLP -- RECIEVE KLINIK PARAMETERS -- FUNCTION 33
   8951					;
   8952	027144				RCVKLP::
   8953	027144	062704 	000012 			ADD	#E.FW+2,R4	; +++009 GET OVER THE INDIRECT HEADER
   8954	027150	012402 				MOV	(R4)+,R2	; +++009 BYTE COUNT TO R2
   8955	027152	001422 				BEQ	90$		; +++009 QUIT IF NULL
   8956	027154					.INH6			; +++009 DISALLOW INTERRUPTS
	027154	013746 	177776 			MOV	@#PS,-(SP)
	027160	112737 	000300 	177776 		MOVB	#300,@#PS
   8957	027166	006202 				ASR	R2		;;; +++009  MAKE A WORD COUNT
   8958	027170	012703 	001200'			MOV	#.KLNFT,R3	;;; +++009 BUFFER POINTER TO R3
   8959	027174	042737 	010000 	001012'		BIC	#EF.RKP,.COMEF+2 ;;; +++009 CLEAR THE FLAG
   8960	027202				10$:				;;; +++009
   8961	027202	012423 				MOV	(R4)+,(R3)+	;;; +++009 LOAD THE PARAMETERS
   8962	027204	077202 				SOB	R2,10$		;;; +++009 LOOP TILL DONE
   8963	027206	052737 	010000 	001012'		BIS	#EF.RKP,.COMEF+2 ;;; +++009 SET THE EVENT FLAG
   8964	027214					.ENB6			;;; +++009 ALLOW INTERRUPTS
	027214	012637 	177776 			MOV	(SP)+,@#PS
   8965	027220				90$:				; ++009
   8966	027220	000726 				BR	DEANOD		; +++009 DEQUEUE THIS NODE AND EXIT
   8967						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 168
QUEUED PROTOCOL -- SENDALL

   8969						.SBTTL	QUEUED PROTOCOL -- SENDALL
   8970
   8971					;
   8972					;	SNDALL -- SENDALL SERVICE -- FUNCTION 14
   8973					;
   8974
   8975	027222				SNDALL::
   8976	027222					CALL	.SNDAL		;DO SENDALL
	027222	004737 	027230'			JSR	PC,.SNDAL
   8977	027226	000725 				BR	QPRDTF		;AND RETURN
   8978						;
   8979					;
   8980					;	.SNDAL -- SUBROUTINE TO DO A SENDALL
   8981					;
   8982					;	CALLING SEQUENCE
   8983					;
   8984					;	R0 & R4 -- POINTER TO BUFFER TO BE SENT (QUEUED PROTOCOL FORMAT)
   8985					;
   8986					;	REGISTERS ALTERED
   8987					;
   8988					;	R0,R1,R2,R3,R5
   8989					;
   8990					;	THE SENDALL MESSAGES AND COUNTS ARE MAINTINED IN PARALLEL RING BUFFERS
   8991					;	IN ".SNDBF" AND ".SNDCN" (Q.V.). ".SNDLP" POINTS THE THE NEXT FREE LOGICAL
   8992					;	NODE IN THE SENDALL RING. EACH ENTRY IN THE DATA LINE SCANNER TABLE HAS
   8993					;	AS SENDALL INDEX BYTE IN "STSW1" ("TT.SND") WHICH POINTS TO THE LAST NODE
   8994					;	PROCESSED SENDALL RING. THE QUEUED PROTOCOL BUFFER IS DEALLOCATEED BY THE
   8995					;	TERMINAL DRIVER WHEN THE LAST TERMINAL HAS PROCESSED THAT NODE.
   8996					;
   8997					;	A SENDALL IS DEEMED TO BE PENDING FOR A LINE IF ITS SENDALL INDEX IS
   8998					;	DIFFERENT FROM THAT IN ".SNDLP". THE SENDALL WILL BE INITIATED AT "..STTY"
   8999					;	IF THE LINE IS IDLE, OR AT "STTYDN" IF THE LINE HAS ACTIVE OUTPUT.
   9000					;
   9001					;	IN ORDER TO PREVENT PROBLEMS ASSOCIATED WITH LARGE SENDALLS (A LARGE
   9002					;	SENDALL IS DEFINED AS ONE WHICH WILL FILL THE SENDALL RING), THE RING IS
   9003					;	ACTUALLY MANAGED AS A CIRCULAR LIST, WITH A GUARANTEED NULL ENTRY IN THE
   9004					;	LIST AT ALL TIMES. SHOULD A REQUEST BE MADE TO FILL AN EMPTY NODE IN THE
   9005					;	RING WITHOUT THE FOLLOWING NODE BEING EMPTY, THAT MODE WILL NOT BE FILLED
   9006					;	UNTIL THE FOLLOWING NODE BECOMES EMPTY (NULL). IN EFFECT, THE SENDALL
   9007					;	PROCESS IS DRIVEN BY THE SLOWEST TERMINAL(S) IN THE DATA LINE SCANNER.
   9008					;
   9009					;	TCO 4.2246 REMOVED SEVERAL INHIBIT AND ENABLE MACROS FROM THIS ROUTINE
   9010
   9011	027230				.SNDAL::
   9012	027230	010004 				MOV	R0,R4		; COPY SENDALL POINTER
   9013	027232	022020 				CMP	(R0)+,(R0)+	; GET OVER LISTHEAD
   9014	027234	010010 				MOV	R0,(R0)		; SET UP CURRENT ADDRESS POINTER
   9015	027236	062720 	000006 			ADD	#6,(R0)+	; CORRECT BUFFER POINTER
   9016	027242	116010 	000003 			MOVB	3(R0),(R0)	; MOVE THE BYTE COUNT
   9017	027246				10$:
   9018	027246					.INH6			; DISALLOW INTERRUPTS
	027246	013746 	177776 			MOV	@#PS,-(SP)
	027252	112737 	000300 	177776 		MOVB	#300,@#PS
   9019	027260	013701 	002604'			MOV	.SNDLP,R1	;;; FIND THE CURRENT POINTER FOR SENDALL
   9020	027264	010102 				MOV	R1,R2		;;; COPY IT TO R2
   9021	027266	006301 				ASL	R1		;;; MAKE RING WORD INDEX
   9022	027270	005202 				INC	R2		;;; UPDATE THE POINTER TO NEXT NODE
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 168-1
QUEUED PROTOCOL -- SENDALL

   9023	027272	042702 	177774 			BIC	#^C3,R2		;;; MODULO 4
   9024	027276	006302 				ASL	R2		;;; MAKE A WORD INDEX OF IT
   9025	027300	005762 	002606'			TST	.SNDBF(R2)	;;; HAVE WE WRAPPED AROUND??
   9026	027304	001111 				BNE	60$		;;; YES -- WAIT FOR IT TO DIE OUT
   9027	027306	006202 				ASR	R2		;;; NO -- RESET INDEX
   9028	027310	010237 	002604'			MOV	R2,.SNDLP	;;; SET THE POINTER TO THE NEXT RING BUFFER
   9029	027314	013761 	007464'	002616'		MOV	.DQDH0+Q.DZ,.SNDCN(R1) ;;; SET UP THE TTY COUNT
   9030	027322	001402 				BEQ	15$		;;; GO ON IF NO DH-11'S
   9031	027324	010461 	002606'			MOV	R4,.SNDBF(R1)	;;; SET PACKET IN THE CURRENT RING BUFFER
   9032	027330				15$:
   9033	027330	012702 	002776'			MOV	#DLTBL,R2	;;; DO THE DL-11C AND DL-11E'S
   9034	027334				20$:
   9035	027334	020237 	002636'			CMP	R2,KLNPTR	;;; IS THIS THE KLINIK LINE??
   9036	027340	001003 				BNE	25$		;;; NO -- GO ON
   9037	027342	105737 	001224'			TSTB	.KLNSW+0	;;; YES -- IS IT ACTIVE AS USER CONSOLE??
   9038	027346	002015 				BGE	30$		;;; NO -- FORGET IT
   9039	027350				25$:
   9040	027350	005762 	000002 			TST	TTYEXP(R2)	;;; IS IT HERE??
   9041	027354	001412 				BEQ	30$		;;; NO -- FORGET IT
   9042	027356	032762 	000400 	000006 		BIT	#TT.NSA,STSW1(R2) ;;; YES -- SUPPRESS SENDALLS??
   9043	027364	001006 				BNE	30$		;;; YES -- SO DO IT
   9044	027366	010246 				MOV	R2,-(SP)	;;; SAVE R2 FROM "COPBUF"
   9045	027370					CALL	COPBUF		;;; COPY THE BUFFER
	027370	004737 	027616'			JSR	PC,COPBUF
   9046	027374	012602 				MOV	(SP)+,R2	;;; RESTORE R2
   9047	027376					CALL	..STTY		;;; START THE LINE UP
	027376	004737 	043342'			JSR	PC,..STTY
   9048	027402				30$:
   9049	027402	062702 	000010 			ADD	#^D8,R2		;;; POINT TO THE NEXT LINE
   9050	027406	022702 	003046'			CMP	#DHTBL,R2	;;; IS IT A DL-11??
   9051	027412	101350 				BHI	20$		;;; YES -- DO THIS LINE
   9052	027414	010400 				MOV	R4,R0		;;; NO -- SET UP POINTER TO TTY BUFFER FOR "..STTY"
   9053	027416	010037 	002626'			MOV	R0,.CRSND	;;; SET THAT THIS IS CURRENT SENDALL
   9054	027422				35$:
   9055	027422	005737 	007464'			TST	.DQDH0+Q.DZ	;;; DH-11'S EXIST??
   9056	027426	001003 				BNE	45$		;;; YES -- GO ON
   9057	027430					CALL	..DECN		;;; NO -- DEALLOCATE THE NODE
	027430	004737 	043162'			JSR	PC,..DECN
   9058	027434	000426 				BR	55$		;;; AND GO AWAY
   9059						;
   9060	027436				45$:
   9061	027436	032762 	000410 	000006 		BIT	#TT.NSA!TT.ABW,STSW1(R2) ;;; IGNORE SENDALL OR AUTO-BAUD WAIT??
   9062	027444	001037 				BNE	70$		;;; YES -- DON'T START THIS LINE BUT ACCOUNT FOR IT
   9063	027446	032762 	000002 	000006 		BIT	#TT.CTY,STSW1(R2) ;;; NO -- IS THIS A CTY??
   9064	027454	001403 				BEQ	46$		;;; NO -- GO ON
   9065	027456	005737 	002632'			TST	.TTP11		;;; YES -- IN -11 I/O WAIT??
   9066	027462	001006 				BNE	50$		;;; YES -- DON'T RESTART
   9067	027464				46$:
   9068	027464	032762 	000001 	000006 		BIT	#TT.OUT,STSW1(R2) ;;; ANY KIND OF OUTPUT PENDING??
   9069	027472	001002 				BNE	50$		;;; YES -- DON'T RESTART
   9070	027474					CALL	..STTY		;;; NO -- START SENDALL FOR THIS TTY
	027474	004737 	043342'			JSR	PC,..STTY
   9071	027500				50$:
   9072	027500	062702 	000010 			ADD	#8.,R2		;;; LOOK AT THE NEXT DH-11
   9073	027504	005762 	000002 			TST	TTYEXP(R2)	;;; END OF LIST??
   9074	027510	001352 				BNE	45$		;;; [TCO 4.2246] NO -- TRY NEXT LINE
   9075	027512				55$:
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 168-2
QUEUED PROTOCOL -- SENDALL

   9076	027512	005037 	002626'			CLR	.CRSND		;;; YES -- CLEAR CURRENT SENDALL POINTER
   9077	027516	005037 	027660'			CLR	TTUNT		;;; CLEAR ALREADY SENT ERROR FLAG
   9078	027522					.ENB6			;;; ENABLE INTERRUPTS
	027522	012637 	177776 			MOV	(SP)+,@#PS
   9079	027526					RETURN			; RETURN TO CALLER
	027526	000207 				RTS	PC
   9080	027530				60$:
   9081	027530					.ENB6			;;; ENABLE INTERRUPTS
	027530	012637 	177776 			MOV	(SP)+,@#PS
   9082	027534					WSIG$S			; WAIT FOR NEXT SIGNIFICANT EVENT
	027534	012746 				MOV	(PC)+,-(SP)
	027536	   061 	   001 			.BYTE	49.,1
	027540	104375 				EMT	375
   9083	027542	000641 				BR	10$		; AND TRY AGAIN
   9084						;
   9111
   9112	027544				70$:				;;; HERE TO PRETEND WE DID SENDALL ON LINE
   9113	027544	013701 	002604'			MOV	.SNDLP,R1	;;; GET POINTER TO CURRENT SENDALL + 1
   9114	027550	005301 				DEC	R1		;;; MAKE IT POINTER TO CURRENT
   9115	027552	042701 	177774 			BIC	#177774,R1	;;; WE ONLY WANT TWO BITS
   9116	027556	006301 				ASL	R1		;;; MAKE IT INTO A WORD INDEX
   9117	027560	005361 	002616'			DEC	.SNDCN(R1)	;;; DECREMENT COUNT OF SENDALLS SENT
   9118	027564	003010 				BGT	80$		;;; IF SOME LEFT, DON'T FREE MESSAGE
   9119	027566	001403 				BEQ	75$		;;; DEALLOCATE IF COUNT IS ZERO
   9120	027570					.CRASH	SAQ		;;; CRASH IF IT WENT NEGATIVE
	027570	000004 				IOT
	027572	   123 	   101 	   121 		.ASCIZ	/SAQ/
	027575	   000
   9121						;
   9122
   9123	027576				75$:
   9124	027576	005061 	002606'			CLR	.SNDBF(R1)	;;; INDICATE NONEXISTANT
   9125	027602					CALL	..DECN		;;; DEALLOCATE THE NODE
	027602	004737 	043162'			JSR	PC,..DECN
   9126	027606				80$:				;;; HERE TO FINISH DUMMY SENDALL
   9127	027606	062762 	040000 	000006 		ADD	#TT.SNI,STSW1(R2);;; BUMP INDEX TO NEXT SENDALL
   9128	027614	000731 				BR	50$		;;; AND DO THE NEXT LINE
   9129						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 169
QUEUED PROTOCOL -- COPY BUFFER

   9131						.SBTTL	QUEUED PROTOCOL -- COPY BUFFER
   9132
   9133					;
   9134					;	COPBUF -- ROUTINE TO COPY A TTY BUFFER AND CORRECT THE
   9135					;	ADDRESS OF THE BUFFER IN THE CURRENT ADDRESS POINTER
   9136					;
   9137					;	CALLING SEQUENCE:
   9138					;
   9139					;	R4 -- ADDRESS OF BUFFER TO BE COPIED
   9140					;
   9141					;	CALL	COPBUB
   9142					;
   9143					;	EXIT CONDITIONS:
   9144					;
   9145					;	R0 -- NEW BUFFER ADDRESS
   9146					;
   9147					;	REGISTERS ALTERED:
   9148					;
   9149					;	R1,R2,R5
   9150					;
   9151	027616				COPBUF::
   9152	027616	016401 	000002 			MOV	2(R4),R1	;SET UP THE BUFFER SIZE
   9153	027622					CALL	..ALOW		;ALLOCATE A BUFFER
	027622	004737 	043322'			JSR	PC,..ALOW
   9154					;
   9155	027626				10$:
   9156	027626	010405 				MOV	R4,R5		;SAVE R5 BUFFER POINTER
   9157	027630	010002 				MOV	R0,R2		;SAVE TTY BUFFER POINTER
   9158	027632	006201 				ASR	R1		;MAKE WORD INDEX
   9159	027634				20$:
   9160	027634	012522 				MOV	(R5)+,(R2)+	;COPY THE BUFFER
   9161	027636	077102 				SOB	R1,20$		;COPY UNTIL FINISHED
   9162	027640	010060 	000004 			MOV	R0,T.HCAD(R0)	;SET THE CURRENT ADDRESS
   9163	027644	062760 	000012 	000004 		ADD	#T.HHDS+2,T.HCAD(R0) ;CORRECT IT TO POINT TO BUFFER
   9164	027652					RETURN
	027652	000207 				RTS	PC
   9165					;
   9166	027654				TTLGE:
   9167	027654	000014 				.WORD	14
   9168	027656	001100 				.WORD	DV.LOG!DV.HNG	;DEVICE HUNG
   9169	027660				TTUNT:
   9170	027660					.BLKW	4
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 170
DTE20 DRIVER -- DTE20 INTERRUPT SERVICE

   9172						.SBTTL	DTE20 DRIVER -- DTE20 INTERRUPT SERVICE
   9173
   9174	027670				.DTINT::
   9175	027670	010046 				MOV	R0,-(SP)	;SAVE REGISTERS
   9176	027672	010146 				MOV	R1,-(SP)
   9177	027674	010246 				MOV	R2,-(SP)
   9178	027676	010346 				MOV	R3,-(SP)
   9179	027700	010446 				MOV	R4,-(SP)
   9180	027702	010546 				MOV	R5,-(SP)
   9181	027704				INTLPS:
   9182	027704	013700 	001360'			MOV	.PRDTE,R0	;SET UP POINTER TO THIS PROCESSOR NUMBER
   9183	027710	013703 	001354'			MOV	.PRADR,R3	;ADDRESS OF COMM TABLE OFFSETS
   9184	027714	032777 	121000 	151434 		BIT	#TO10DN!TO10ER!MPE11,@.PRSTA ;TO 10 DONE OR ERROR?
   9185	027722	001026 				BNE	TOTNDN		;YES -- GO CHECK IT OUT
   9186	027724	132777 	000202 	151424 		BITB	#TO11DN!TO11ER,@.PRSTA ;TO 11 DONE OR ERROR?
   9187	027732	001402 				BEQ	4$		;NO -- GO ON
   9188	027734	000137 	030416'			JMP	TOELDN		;YES -- SEE WHAT IS NEXT FOR 11
   9189						;
   9190	027740				4$:
   9191	027740	032777 	004000 	151410 		BIT	#TO11DB,@.PRSTA	;NO -- CHECK FOR DOORBELL INTERRUPT
   9195	027746	001404 				BEQ	DTEXIT		; +++008 NONE -- DISMISS INTERRUPT
   9197	027750	005237 	001362'			INC	.PRDCT		; +001 ONE MORE DOORBELL RECIEVED...
   9198	027754	000137 	031106'			JMP	DBLRNG		;YES -- GO DO DOORBELL STUFF
   9199						;
   9210	027760				DTEXIT:
   9211	027760	012605 				MOV	(SP)+,R5	;RESTORE REGISTERS
   9212	027762	012604 				MOV	(SP)+,R4
   9213	027764	012603 				MOV	(SP)+,R3
   9214	027766	012602 				MOV	(SP)+,R2
   9215	027770	012601 				MOV	(SP)+,R1
   9216	027772	012600 				MOV	(SP)+,R0
   9217	027774	000137 	014244'			JMP	@#..INTX	;GO TO INTERRUPT EXIT
   9218						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 171
DTE20 DRIVER -- TO TEN DONE SERVICE

   9220						.SBTTL	DTE20 DRIVER -- TO TEN DONE SERVICE
   9221
   9222					;
   9223					;	TO TEN DONE INTERRUPT SERVICE
   9224					;
   9225	030000				TOTNDN:
   9226	030000	100403 				BMI	10$		;DONE?
   9227	030002					.CRASH	TET		;NO -- MUST BE EITHER MEMORY PARITY OR TO10ER
	030002	000004 				IOT
	030004	   124 	   105 	   124 		.ASCIZ	/TET/
	030007	   000
   9228
   9229	030010				10$:
   9231	030010	013704 	001314'			MOV	TO10SZ,R4
   9232	030014	063704 	001316'			ADD	TO10AS,R4
   9233	030020	020460 	000020 			CMP	R4,T10AD(R0)
   9234	030024	001403 				BEQ	13$
   9235	030026					.CRASH	DTF
	030026	000004 				IOT
	030030	   104 	   124 	   106 		.ASCIZ	/DTF/
	030033	   000
   9236	030034				13$:
   9237	030034	012737 	000001 	001316'		MOV	#1,TO10AS	;SET NO XFER EXPECTED
   9239	030042	012777 	040000 	151306 		MOV	#DON10C,@.PRSTA	;CLEAR DONE FLAGS
   9240	030050	013704 	001326'			MOV	TO10Q,R4	;START NEXT ENTRY IF THERE IS ONE
   9241	030054	005764 	000012 			TST	12(R4)		;CHECK FOR INDIRECT FUNCTION
   9242	030060	100432 				BMI	INDTTF		;YES -- START THE FUNCTIIN
   9243	030062	001010 				BNE	15$		;NO -- IF NE THEN NORMAL FUNCTION
   9244	030064	053777 	001264'	151174 		BIS	DTEMSK,@DTEADR	;NOT -- FINISH INDIRECT FUNCTION
   9245	030072					CALL	..DSEV		;DECLARE SIG EVENT
	030072	004737 	042444'			JSR	PC,..DSEV
   9246	030076	042737 	000006 	001322'		BIC	#TOIP!TOBM,STSTT+2 ;CLEAR INDIRECT IN PROGRESS
   9247	030104				15$:
   9248	030104					CALL	..NDEL
	030104	004737 	042500'			JSR	PC,..NDEL
   9249	030110	010046 				MOV	R0,-(SP)	;SAVE R0 -- CPU NUMBER
   9250	030112	016401 	000004 			MOV	4(R4),R1	;FIND THE SIZE OF THIS ENTRY
   9251	030116	010400 				MOV	R4,R0		;SET THE NODE ADDRESS
   9252	030120					CALL	..DECB		;DEALLOCATE
	030120	004737 	043166'			JSR	PC,..DECB
   9253	030124	012600 				MOV	(SP)+,R0	;RESTORE THE CPU NUMBER
   9254	030126	013704 	001326'			MOV	TO10Q,R4	;FIND THE LISTHEAD AGAIN
   9255	030132	022704 	001326'			CMP	#TO10Q,R4	;IS THERE ANOTHER ONE TO DO
   9256	030136	001662 				BEQ	INTLPS
   9257	030140					CALL	STNTQ		;START NEXT TEN QUEUE
	030140	004737 	031710'			JSR	PC,STNTQ
   9258	030144				20$:
   9259	030144	000657 				BR	INTLPS		;CHECK THE OTHER CONDITIONS NOW
   9260						;
   9261	030146				INDTTF:
   9262	030146	005064 	000012 			CLR	12(R4)		;SET INDICATOR TO INDICATE THAT THIS WAS INDIRECT
   9263	030152	005060 	000006 			CLR	DXWD1(R0)		;DEPOSIT THE WORD COUNT
   9264	030156	005060 	000004 			CLR	DXWD2(R0)
   9265	030162	005005 				CLR	R5
   9266	030164	156405 	000020 			BISB	20(R4),R5	;SET THE COUNT
   9267	030170	010560 	000002 			MOV	R5,DXWD3(R0)
   9269	030174	016437 	000022 	001316'		MOV	22(R4),TO10AS
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 171-1
DTE20 DRIVER -- TO TEN DONE SERVICE

   9270	030202	010537 	001314'			MOV	R5,TO10SZ
   9272	030206	016460 	000022 	000020 		MOV	22(R4),T10AD(R0)	;SET THE TO 10 ADDRESS
   9273	030214	012705 	000003 			MOV	#QSIZE-FORPRO,R5 ;DEPOSIT THE SIZE IN 10 MEMORY
   9274	030220	066305 	000004 			ADD	DMYN(R3),R5	;GET OFFSET
   9275	030224	012760 	010000 	000010 		MOV	#DEP,TNAD1(R0)	;SET DEPOSIT
   9276	030232	010560 	000012 			MOV	R5,TNAD2(R0)	;START XFER
   9277	030236					CALL	WFED		;WAIT FOR DEPOSIT
	030236	004737 	045016'			JSR	PC,WFED
   9278	030242	052737 	000006 	001322'		BIS	#TOIP!TOBM,STSTT+2 ;SET INDIRECT IN PROGRESS FLAG
   9279	030250	005060 	000036 			CLR	DAG3(R0)
   9280	030254	013760 	001320'	000006 		MOV	STSTT,DXWD1(R0)	;SET IN 10 MEMORY
   9281	030262	013760 	001322'	000004 		MOV	STSTT+2,DXWD2(R0)
   9282	030270	013760 	001324'	000002 		MOV	STSTT+4,DXWD3(R0)
   9283	030276	062760 	177777 	000012 		ADD	#STATUS-QSIZE,TNAD2(R0)	;DEPOSIT IN 10 MEMORY
   9284	030304					CALL	WFED		;WAIT FOR DEPOSIT
	030304	004737 	045016'			JSR	PC,WFED
   9285	030310	016437 	000024 	001264'		MOV	24(R4),DTEMSK	;GET READY TO SET EVENT FLAG FOR INDIRECT
   9286	030316	016437 	000026 	001266'		MOV	26(R4),DTEADR
   9287	030324	012777 	000400 	151024 		MOV	#TO10DB,@.PRSTA
   9288	030332	000427 				BR	SETDNE
   9289						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 172
DTE20 DRIVER -- TO ELEVEN DONE SERVICE

   9291						.SBTTL	DTE20 DRIVER -- TO ELEVEN DONE SERVICE
   9292
   9293					;
   9294					;	TO ELEVEN DONE SERVICE
   9295					;
   9296	030334				TOITDN:
   9297	030334	042737 	000001 	001322'		BIC	#TOIT,STSTT+2	;CKEAR PROCESSING QUEUE STATUS
   9298	030342				STTOIP:
   9299	030342	012702 	000002 			MOV	#STATUS-FORPRO,R2 ;YES -- BETTER INDICATE THAT 11 IS FINISHED
   9300	030346	066302 	000004 			ADD	DMYN(R3),R2	;POINT TO STATUS WORD
   9301	030352	012760 	010000 	000010 		MOV	#DEP,TNAD1(R0)	;INDICATE WRITE
   9302	030360	013760 	001320'	000006 		MOV	STSTT,DXWD1(R0)	;SET UP TO DEPOSIT
   9303	030366	013760 	001322'	000004 		MOV	STSTT+2,DXWD2(R0)
   9304	030374	013760 	001324'	000002 		MOV	STSTT+4,DXWD3(R0)
   9305	030402	010260 	000012 			MOV	R2,TNAD2(R0)	;START XFER
   9306	030406					CALL	WFED		;WAIT FODEPOSIT
	030406	004737 	045016'			JSR	PC,WFED
   9307	030412				SETDNE:
   9308	030412	000137 	027704'			JMP	INTLPS
   9309						;
   9310	030416				TOELDN:
   9311	030416	100403 				BMI	10$		;ERROR?
   9312	030420				5$:
   9313	030420					.CRASH	ETE		;YES -- TO ELEVEN ERROR FLAG UP
	030420	000004 				IOT
	030422	   105 	   124 	   105 		.ASCIZ	/ETE/
	030425	   000
   9314
   9315	030426				10$:
   9317	030426	013701 	001312'			MOV	TO11BS,R1
   9318	030432	052701 	170000 			BIS	#170000,R1
   9319	030436	005401 				NEG	R1
   9320	030440	032737 	020000 	001312'		BIT	#TO11BM,TO11BS
   9321	030446	001001 				BNE	6$
   9322	030450	006301 				ASL	R1
   9323	030452				6$:
   9324	030452	063701 	001310'			ADD	TO11AS,R1
   9325	030456	020160 	000022 			CMP	R1,T11AD(R0)
   9326	030462	001406 				BEQ	7$
   9327	030464	016027 	000022 			MOV	T11AD(R0),(PC)+
   9328	030470	000000 				.WORD	0
   9329	030472					.CRASH	DTB
	030472	000004 				IOT
	030474	   104 	   124 	   102 		.ASCIZ	/DTB/
	030477	   000
   9330	030500				7$:
   9332	030500	000337 	001274'			SWAB	TO11FN		;CHECK FOR INDIRECT FUNCTION
   9333	030504	012777 	000100 	150644 		MOV	#DON11C,@.PRSTA	;CLEAR DONE FLAGS
   9334
   9335						.ENABL	LSB
   9336
   9337	030512	005737 	001274'			TST	TO11FN		;SET IN THE CORRECT ORDER
   9338	030516	001052 				BNE	40$		;YES -- BETTER QUEUE IT
   9339	030520				8$:
   9340	030520	013701 	001270'			MOV	TO11NP,R1	;ENTER THE NODE IN THE QUEUE
   9341	030524	012704 	001334'			MOV	#TO11Q,R4	;FIND THE LISTHEAD
   9342	030530	005037 	001306'			CLR	TO11QP		; +++004 CLEAR THE ENTRY COUNT
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 172-1
DTE20 DRIVER -- TO ELEVEN DONE SERVICE

   9343	030534				9$:
   9344	030534	010402 				MOV	R4,R2		;SAVE THE CURRENT POINTER
   9345	030536	005237 	001306'			INC	TO11QP		; +++004 INCREMENT THE ENTRY COUNT
   9346	030542	011404 				MOV	@R4,R4		;LOOK FOR THE NEXT ENTRY
   9347	030544	001373 				BNE	9$		;FOUND ONE -- TRY AGAIN
   9348	030546	005011 				CLR	@R1		;CLEAR THE THREAD WORD
   9349	030550	010112 				MOV	R1,@R2		;STORE THIS NODE AS THE LAST ONE
   9350					;	CMP	#12,TO11QP
   9351					;	BHI	10$
   9352					;	MOV	#20000,@R0	;STOP DTE! (THE HARD WAY!)
   9353	030552				10$:
   9354	030552				STEIF:
   9355	030552	052737 	000100 	006506'		BIS	#EF.TED,DTETSK+A.EF ;SET TENDONE EVENT FLAG
   9356	030560					CALL	..DSEV
	030560	004737 	042444'			JSR	PC,..DSEV
   9357	030564	005737 	001332'			TST	EQSZ		;ANY MORE TO XFER?
   9358	030570	001661 				BEQ	TOITDN		;NO -- SET DONE TO 10
   9359	030572				STQUE:
   9360	030572	005001 				CLR	R1		;ASSUME NO 10 INTERRUPT WANTED
   9361	030574	162737 	000012 	001332'		SUB	#10.,EQSZ	;SUBTRACT THE SIZE OFTHE HEADER
   9362	030602	001002 				BNE	5$		;DON'T SET TO INTERRUPT 10
   9363	030604	052701 	100000 			BIS	#IFLOP,R1	;COUNT GOING TO ZERO THIS TIME INTERRUPT 10
   9364	030610				5$:
   9366	030610	012737 	001272'	001310'		MOV	#TO11HD,TO11AS	;SAVE ADDRESS
   9368	030616	012760 	001272'	000022 		MOV	#TO11HD,T11AD(R0) ;SET UP THE CURRENT ADDRESS
   9369	030624	052701 	027766 			BIS	#-10.&7777+TO11BM,R1
   9370	030630	010160 	000016 			MOV	R1,T11BC(R0)	;START XFER
   9372	030634	010137 	001312'			MOV	R1,TO11BS	;SAVE COUNT
   9374
   9375	030640				30$:
   9376	030640	000137 	027704'			JMP	INTLPS		;GO WORK ON THE NEXT THING
   9377						;
   9378	030644				40$:
   9379	030644	000337 	001272'			SWAB	TO11HD		;SWAP BYTES TO CORRECT DIRECTION
   9380	030650	000337 	001276'			SWAB	TO11DV
   9381	030654	010005 				MOV	R0,R5		;SAVE THE CPU NIMBER -ALSO RESTART HERE IF ALL FAIL
   9382	030656	022737 	000010 	001276'		CMP	#.DQPSZ,TO11DV	;LEGAL DEVICE?
   9383	030664	103003 				BHIS	42$		;YES -- ALL OK
   9384	030666					.CRASH	PT1		;NO -- PROTOCOL BROKEN
	030666	000004 				IOT
	030670	   120 	   124 	   061 		.ASCIZ	/PT1/
	030673	   000
   9385	030674				42$:
   9386	030674	005737 	001274'			TST	TO11FN		;INDIRECT FUNCTION?
   9387	030700	100471 				BMI	44$		;YES -- GET OUT AND WAIT FOR REST
   9388	030702	123727 	001274'	000035 		CMPB	TO11FN,#BC.FNM	;FUNCTION MAX?
   9389	030710	103403 				BLO	46$		;YES -- ALL OK HERE
   9390	030712					.CRASH	PT2		;NO -- PROTOCOL BROKEN
	030712	000004 				IOT
	030714	   120 	   124 	   062 		.ASCIZ	/PT2/
	030717	   000
   9391	030720				46$:
   9392	030720	013701 	001272'			MOV	TO11HD,R1	;SET THE NODE SIZE
   9393	030724	122121 				CMPB	(R1)+,(R1)+	;ADD 2 BYTES
   9394	030726					CALL	..ALCB		;ALLOCATE A BLOCK
	030726	004737 	043034'			JSR	PC,..ALCB
   9395	030732	103003 				BCC	50$		;GOT IT ALL OK
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 172-2
DTE20 DRIVER -- TO ELEVEN DONE SERVICE

   9396	030734					.CRASH	BF1
	030734	000004 				IOT
	030736	   102 	   106 	   061 		.ASCIZ	/BF1/
	030741	   000
   9397
   9398	030742				50$:
   9399	030742	010037 	001270'			MOV	R0,TO11NP	;SET THE NODE POINTER
   9400	030746	005720 				TST	(R0)+		;MOVE OVER THREAD WORD
   9401	030750	010120 				MOV	R1,(R0)+	;STORE THE NODE SIZE
   9402	030752	113720 	001274'			MOVB	TO11FN,(R0)+	;SAVE THE FUNCTION
   9403	030756	113720 	001272'			MOVB	TO11HD,(R0)+	;SAVE SIZE
   9404	030762	013720 	001276'			MOV	TO11DV,(R0)+	;SAVE THE DEVICE
   9405	030766	013720 	001302'			MOV	TO11FW,(R0)+	;SAVE THE FIRST FUNCTION WORD
   9406	030772	010065 	000022 			MOV	R0,T11AD(R5)	;SET UP XFER ADDRESS JUST IN CASE
   9408	030776	010037 	001310'			MOV	R0,TO11AS	;SAVE ADDRESS
   9410	031002	012702 	020000 			MOV	#TO11BM,R2	;SET UP BYTE MODE MASK
   9411	031006	013701 	001272'			MOV	TO11HD,R1	;FIND THE HEADER
   9412	031012	162701 	000012 			SUB	#10.,R1		;ANY MORE HERE?
   9413	031016	001416 				BEQ	67$		;NO -- JUST QUIT AND QUEUE IT
   9414	031020	160137 	001332'			SUB	R1,EQSZ		;YES -- ACCOUNT FOR ITS SIZE
   9415	031024	001002 				BNE	65$		;SET INTERRUPT BOTH IF ZERO'S COUNT
   9416	031026	052702 	100000 			BIS	#IFLOP,R2	;SET IFLOP
   9417	031032				65$:
   9418	031032	005401 				NEG	R1		;SET UP BYTE COUNTER
   9419	031034	042701 	170000 			BIC	#170000,R1	;MASK TO 0-11
   9420	031040	050102 				BIS	R1,R2		;SET UP FOR BYTE POINTER
   9421	031042	010265 	000016 			MOV	R2,T11BC(R5)	;SET BYTE COUNT AND START
   9423	031046	010237 	001312'			MOV	R2,TO11BS
   9425	031052	000404 				BR	44$		;WAIT FOR XFER
   9426						;
   9427	031054				67$:
   9428	031054	005037 	001274'			CLR	TO11FN		;INDICATE NO FUNCTION IN PROGRESS
   9429	031060				39$:
   9430	031060	010500 				MOV	R5,R0		;RESTORE R0
   9431	031062	000616 				BR	8$		;AND TRY NEXT
   9432						;
   9433	031064				44$:
   9434	031064	010500 				MOV	R5,R0
   9435	031066	005737 	001274'			TST	TO11FN		;IS IT INDIRECT?
   9436	031072	100002 				BPL	45$
   9437	031074	000137 	030334'			JMP	TOITDN
   9438						;
   9439	031100				45$:
   9440	031100	005037 	001274'			CLR	TO11FN		;CLEAR FUNCTION INDICATOR TO START Q MECHANISM
   9441	031104	000655 				BR	30$
   9442						;
   9443						.DSABL	LSB
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 173
DTE20 DRIVER -- DOORBELL SERVICE

   9445						.SBTTL	DTE20 DRIVER -- DOORBELL SERVICE
   9446
   9447					;
   9448					;	DOOR BELL INTERRUPT SERVICE
   9449					;
   9450	031106				DBLRNG:
   9451	031106	005060 	000010 			CLR	TNAD1(R0)	;READ STATUS WORD
   9452	031112	012702 	000002 			MOV	#STATUS-FORPRO,R2 ;FIND THE ADDRESS OF HIS STATUS-TO ME
   9453	031116	066302 	000010 			ADD	EHSM(R3),R2
   9454	031122	010260 	000012 			MOV	R2,TNAD2(R0)	;READ THAT STATUS WORD
   9455	031126					CALL	WFED		;WAIT FOR EXAMINE
	031126	004737 	045016'			JSR	PC,WFED
   9456	031132	103420 				BCS	10$
   9457	031134	016037 	000006 	001336'		MOV	DXWD1(R0),STATI	;SAVE STATUS
   9458	031142	016037 	000004 	001340'		MOV	DXWD2(R0),STATI+2
   9459	031150	016037 	000002 	001342'		MOV	DXWD3(R0),STATI+4
   9460	031156	005737 	001336'			TST	STATI		;VALID EXAMINE?
   9461	031162	001006 				BNE	DBLSTS		;MUST BE SET IF WORD IS NON-ZERO
   9462	031164					CALL	..DTSP		;GOOD-BYE PRIMARY PROTOCOL AND
	031164	004737 	045450'			JSR	PC,..DTSP
   9463	031170					CALL	..DTP2		;HELLO SECONDARY PROTOCOL.
	031170	004737 	045466'			JSR	PC,..DTP2
   9464	031174				10$:
   9465	031174				DBLXIT:				; +++012
   9466	031174	000137 	027760'			JMP	DTEXIT		;RETURN
   9467						;
   9468	031200				DBLSTS:
   9469	031200	032737 	000016 	001336'		BIT	#16,STATI	;DISASTER?(POWER FAIL/RELOAD)
   9470	031206	001431 				BEQ	10$		;NO -- ALL OK
   9471	031210	032737 	000004 	001336'		BIT	#LOAD11,STATI	;LOAD THE 10 REQUEST?
   9472	031216	001013 				BNE	5$		;YES -- BETTER RELOAD HIM
   9473	031220	032737 	000010 	001336'		BIT	#KLPWRF,STATI	; +++012 KL POWERFAIL??
   9474	031226	001404 				BEQ	1$		; +++012 NO -- DIE...
   9475	031230	052737 	004000 	001012'		BIS	#EF.PFR,.COMEF+2 ; +++012 YES -- NOTE THAT WE EXPECT IT
   9476	031236	000756 				BR	DBLXIT		; +++012 AND RETURN THROUGH "DTEXIT"
   9477						;			; +++012 IN ANTICIPATION OF OUR POWERFAIL
   9478	031240				1$:				; +++012
   9479	031240					.CRASH	UIE		;UNIMPLEMENTED FUNCTION
	031240	000004 				IOT
	031242	   125 	   111 	   105 		.ASCIZ	/UIE/
	031245	   000
   9480						;
   9481	031246				5$:
   9482	031246	052737 	000040 	001126'		BIS	#KS.TRR,.KLITK	;REQUEST RE-BOOT
   9483	031254	105237 	001122'			INCB	.NOERR		;SIGNAL ERROR BEING SERVED
   9484	031260					CALL	..DTSP		;TURN OFF ALL PROTOCOLS
	031260	004737 	045450'			JSR	PC,..DTSP
   9485	031264	105237 	001124'			INCB	.TKTN		;REQUEST DIAGNOSIS
   9486	031270	000501 				BR	35$		;AND CLEAR FLAGS
   9487						;
   9488	031272				10$:
   9489	031272	032737 	000002 	001340'		BIT	#TOIP,STATI+2	;INDIRECT IN PROGRESS
   9490	031300	001505 				BEQ	30$		;NO -- MUST BE NORMAL
   9491	031302	005737 	001274'			TST	TO11FN		;TO ELEVEN FUNCTION?
   9492	031306	100403 				BMI	20$		;YES -- ALL OK
   9493	031310					.CRASH	PT3		;OOPS PROTOCOL BROKEN
	031310	000004 				IOT
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 173-1
DTE20 DRIVER -- DOORBELL SERVICE

	031312	   120 	   124 	   063 		.ASCIZ	/PT3/
	031315	   000
   9494
   9495	031316				20$:
   9496	031316	062760 	000001 	000012 		ADD	#QSIZE-STATUS,TNAD2(R0) ;READ THE STATUS WORD
   9497	031324					CALL	WFED		;WAIT FOR EXAMINE
	031324	004737 	045016'			JSR	PC,WFED
   9498	031330	103461 				BCS	35$
   9499	031332	016001 	000002 			MOV	DXWD3(R0),R1 	;START TRANSFER
   9500	031336	010002 				MOV	R0,R2		;SAVE DTE20 ADDRESS
   9501	031340	062701 	000012 			ADD	#12,R1		;INCLUDE 12 BYTE HEADER
   9502	031344					CALL	..ALCB		;ALLOCATE A BUFFER
	031344	004737 	043034'			JSR	PC,..ALCB
   9503	031350	103003 				BCC	99$		;NO BUFFER OVERFLOW ALL OK
   9504	031352					.CRASH	BO2
	031352	000004 				IOT
	031354	   102 	   117 	   062 		.ASCIZ	/BO2/
	031357	   000
   9505
   9506	031360				99$:
   9507	031360	010037 	001270'			MOV	R0,TO11NP	;SAVE THE NODE POINTER
   9508	031364	005720 				TST	(R0)+		;STORE SOME STUFF IN IT
   9509	031366	010120 				MOV	R1,(R0)+	;SAVE THE BYTE COUNT OF THE BUFFER
   9510	031370	113720 	001274'			MOVB	TO11FN,(R0)+	;SAVBE THE FUNCTION CODE
   9511	031374	113720 	001272'			MOVB	TO11HD,(R0)+
   9512	031400	013720 	001276'			MOV	TO11DV,(R0)+	;SAVE THE DEVICE CODE
   9513	031404	013720 	001302'			MOV	TO11FW,(R0)+	;SAVE THE FIRST WORD
   9514	031410	016201 	000002 			MOV	DXWD3(R2),R1	;RESET THE BYTE COUNT
   9515	031414	005401 				NEG	R1		;MAKE COUNT NEGITIVE
   9516	031416	042701 	170000 			BIC	#170000,R1	;MASK OFF COUNT
   9517	031422	106001 				RORB	R1		;!!!WARNING THIS ASSUMES C BIT IS SET BY NEG R1!!!!^^
   9518	031424	032737 	000004 	001340'		BIT	#TOBM,STATI+2	;WORD MODE?
   9519	031432	001003 				BNE	25$		;YES -- DON'T SET BYTE FLAG
   9520	031434	106101 				ROLB	R1		;!!^^SEE ABOVE -- RESTORE TO BYTE COUNT!!
   9521	031436	052701 	020000 			BIS	#TO11BM,R1	;SET BYTE MODE
   9522	031442				25$:
   9523	031442	052701 	100000 			BIS	#IFLOP,R1 	;SET INTERRUPT BOTH
   9524	031446	010062 	000022 			MOV	R0,T11AD(R2)	;AND START XFER
   9525	031452	010162 	000016 			MOV	R1,T11BC(R2)	;SET BYTE COUNT
   9527	031456	010037 	001310'			MOV	R0,TO11AS
   9528	031462	010137 	001312'			MOV	R1,TO11BS
   9530	031466	005037 	001274'			CLR	TO11FN		;INDICATE NO FUNCTION IN PROGRESS
   9531	031472	010200 				MOV	R2,R0
   9532	031474				35$:
   9533	031474	012777 	002000 	147654 		MOV	#INT11C,@.PRSTA
   9534	031502	052737 	000001 	001322'		BIS	#TOIT,STSTT+2	;SET TO IT
   9535	031510	000137 	030342'			JMP	STTOIP		;RETURN
   9536						;
   9537	031514				30$:
   9538	031514	123737 	001342'	001324'		CMPB	STATI+4,TO10QC	;IS THIS THE CORRECT COUNT
   9539	031522	001764 				BEQ	35$		;YES -- CONTINUE PROCESSING
   9540	031524	052737 	000001 	001322'		BIS	#TOIT,STSTT+2	;SET QUEUE IN PROGRESS
   9541	031532	105237 	001324'			INCB	TO10QC		;INDICATE Q UPDATED
   9542	031536	123737 	001342'	001324'		CMPB	STATI+4,TO10QC	;COUNT CORRECT?
   9543	031544	001403 				BEQ	40$		;YES -- PROCEED
   9544	031546					.CRASH	ILQ		;NO -- DISASTER
	031546	000004 				IOT
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 173-2
DTE20 DRIVER -- DOORBELL SERVICE

	031550	   111 	   114 	   121 		.ASCIZ	/ILQ/
	031553	   000
   9545
   9546	031554				40$:
   9547	031554	012760 	010000 	000010 		MOV	#DEP,TNAD1(R0)	;SET UP TO DEPOSIT
   9548	031562	013760 	001320'	000006 		MOV	STSTT,DXWD1(R0)	;THE STATUS
   9549	031570	013760 	001322'	000004 		MOV	STSTT+2,DXWD2(R0)
   9550	031576	013760 	001324'	000002 		MOV	STSTT+4,DXWD3(R0)
   9551	031604	012702 	000002 			MOV	#STATUS-FORPRO,R2
   9552	031610	066302 	000004 			ADD	DMYN(R3),R2
   9553	031614	010260 	000012 			MOV	R2,TNAD2(R0)
   9554	031620					CALL	WFED		;START DEPOSIT
	031620	004737 	045016'			JSR	PC,WFED
   9555	031624	012777 	002000 	147524 		MOV	#INT11C,@.PRSTA
   9556	031632	012702 	000003 			MOV	#QSIZE-FORPRO,R2 ;FIND THE QUEUE SIZE
   9557	031636	066302 	000010 			ADD	EHSM(R3),R2	;EXAMINE HIS FOR ME
   9558	031642	005060 	000010 			CLR	TNAD1(R0)	;CLEAR DEPOSIT BIT
   9559	031646	010260 	000012 			MOV	R2,TNAD2(R0)
   9560	031652					CALL	WFED		;WAIT FOR EXAMINE/DEPOSIT
	031652	004737 	045016'			JSR	PC,WFED
   9561	031656	103412 				BCS	77$
   9562	031660	016037 	000002 	001332'		MOV	DXWD3(R0),EQSZ	;SET UP Q SIZE
   9563	031666	023727 	001332'	000144 		CMP	EQSZ,#100.	;LEGAL SIZE
   9564	031674	103403 				BLO	77$		;YES -- ALL OK
   9565	031676					.CRASH	PT4
	031676	000004 				IOT
	031700	   120 	   124 	   064 		.ASCIZ	/PT4/
	031703	   000
   9566									;THIS AUTOMATICALLY SETS UP EQSZ
   9567	031704				77$:
   9568	031704	000137 	030572'			JMP	STQUE		;AND PROCESS QUEUE
   9569						;
QPRDTE	- DTE-20 DRIVER AND PRI	MACRO M1110  15-OCT-79 13:47  PAGE 174
DTE20 DRIVER -- START TO TEN QUEUE

   9571						.SBTTL	DTE20 DRIVER -- START TO TEN QUEUE
   9572
   9573					;
   9574					;	STNTQ -- SUBROUTINE TO START NEXT TO TEN QUEUE
   9575					;
   9576					;	THIS ROUTINE MUST BE ENTERED WITH INTERRUPTS INHIBITTED
   9577					;
   9578	031710				STNTQ::
   9579	031710	010546 				MOV	R5,-(SP)	;;;SAVE REGISTERS
   9580	031712	010046 				MOV	R0,-(SP)
   9581	031714	013700 	001360'			MOV	.PRDTE,R0	;;;SET UP ADDRESS OF DTE20
   9582	031720	005060 	000006 			CLR	DXWD1(R0)
   9583	031724	005060 	000004 			CLR	DXWD2(R0)
   9584	031730	010405 				MOV	R4,R5		;;;SAVE THE NODE ADDRESS
   9585	031732	062705 	000006 			ADD	#6,R5		;;;MOVE OVER LISTHEAD AND NODE SIZE
   9587	031736	011537 	001314'			MOV	@R5,TO10SZ
   9589	031742	012560 	000002 			MOV	(R5)+,DXWD3(R0)	;;;SET THE QUEUE SIZE IN MY AREA TO HIM
   9590	031746	010560 	000020 			MOV	R5,T10AD(R0)	;;;SET UP THE TO10 ADDRESS
   9591	031752	012760 	000001 	000036 		MOV	#1,DAG3(R0)	;;;SET BYTE MODE
   9593	031760	010537 	001316'			MOV	R5,TO10AS
   9595	031764	013705 	001354'			MOV	.PRADR,R5	;;;FIND THE CORRECT DTE
   9596	031770	016505 	000004 			MOV	DMYN(R5),R5	;;;FIND THE OFFSET INTO MY AREA
   9597	031774	062705 	000003 			ADD	#QSIZE-FORPRO,R5 ;;; FIND Q SIZE
   9598	032000	012760 	010000 	000010 		MOV	#DEP,TNAD1(R0)	;;;SET UP TO DO DEPOSIT
   9599	032006	010560 	000012 			MOV	R5,TNAD2(R0)
   9600	032012					CALL	WFED
	032012	004737 	045016'			JSR	PC,WFED
   9601	032016	105237 	001325'			INCB	TO11QC		;;;INCREMENT THE COUNT
   9602	032022	013760 	001320'	000006 		MOV	STSTT,DXWD1(R0)
   9603	032030	013760 	001322'	000004 		MOV	STSTT+2,DXWD2(R0)
   9604	032036	013760 	001324'	000002 		MOV	STSTT+4,DXWD3(R0)
   9605	032044	062760 	177777 	000012 		ADD	#STATUS-QSIZE,TNAD2(R0)
   9606	032052					CALL	WFED		;;;EXAMINE/DEPOSIT
	032052	004737 	045016'			JSR	PC,WFED
   9607	032056	012777 	000400 	147272 		MOV	#TO10DB,@.PRSTA	;;;RING UP THE 10
   9608	032064	012600 				MOV	(SP)+,R0
   9609	032066	012605 				MOV	(SP)+,R5	;;;RESTORE REGISTERS
   9610	032070					RETURN
	032070	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 175
DTE20 DRIVER -- START TO TEN QUEUE

   9612						.TITLE	TTYDRR	- GENERAL TTY HANDLER
   9613	032072					IDENT$	13,40
						.IDENT	/013400/
   9614					;
   9615					;                             COPYRIGHT (C) 1975, 1978 BY
   9616					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   9617					;
   9618					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   9619					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   9620					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   9621					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   9622					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   9623					;
   9624					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   9625					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   9626					;       CORPORATION.
   9627					;
   9628					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   9629					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   9630					;
   9631					; VERSION 13-40
   9632					;
   9633					; R. MC LEAN
   9634					;  7-APR-75
   9635					;
   9636					; TERMINAL DRIVER FOR DL11-AAND DL11-E LINE INTERFACES AND DH11 LINE MULTIPLEX
   9637					;
   9638					; MODIFICATIONS:
   9639					;
   9640					;	NO.	DATE		PROGRAMMER	PURPOSE
   9641					;	---	----		----------	-------
   9642					;	001	08-NOV-76	K. RETI		ADD SUPPRESS SEND-ALL
   9643					;				R. BELANGER	CODE.
   9644					;
   9645					;	002	16-NOV-76	R. BELANGER	FIX TYPO IN EDIT 001
   9646					;
   9647					;	003	16-NOV-76	T. PORCHER	ADD CODE TO ALLOW CTY
   9648					;				R. BELANGER	TO BE MOVED
   9649					;	004	29-NOV-76	A. PECKHAM	RELOCATED ACKAL FOR LPT
   9650					;	005	03-FEB-77	R. BELANGER	ADDED GENERALIZED DL11E
   9651					;						SERVICE AND NEW KLINIK
   9652					;						HOOKS AND HANDLES
   9653					;	006	07-MAR-77	A. PECKHAM	CLEAN UP "TT.OUT" MANAGEMENT
   9654					;	007	01-JUL-77	R. BELANGER	FIX BUG IN INTERNAL I/O INITIALIZATION
   9655					;	008	14-JUL-77	R. BELANGER	ADD AUTO-BAUD SUPPORT
   9656					;	009	10-AUG-77	R. BELANGER	FIX DL11E INPUT TO IGNORE
   9657					;						CHARACTERS WITH FRAMING ERRORS
   9658					;						(DN20 RUNNING OPEN ON POWERFAIL)
   9659					;	010	02-SEP-77	R. BELANGER	XON/XOFF BUG FIX
   9660					;	011	06-SEP-77	R. BELANGER	SHORTEN TIMEOUT COUNT TO 4 SECONDS
   9661					;	012	28-OCT-77	R. BELANGER	IGNORE DH-11 CHARACTERS WITH FRMING ERRORS
   9662					;	013	02-NOV-77	R. BELANGER	FIX LONG SENDALLS
   9663					;  TCO 4.2054	20-OCT-78	R. BELANGER	FIX BUG IN DH-11 ERROR LOGGING
   9664					;  TCO 4.2055	20-OCT-78	R. BELANGER	ADD DETACH ON RING FEATURE
   9665					;						FIX BUGS IN MODEM CONTROL
   9666					;  TCO 4.2095	30-NOV-78	R. BELANGER	ELIMINATE DH11 POLLING ON CLOCK
   9667					;						SET DH-11 SILO ALARM TO 0
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 175-1
DTE20 DRIVER -- START TO TEN QUEUE

   9668					;  TCO 4.2096	30-NOV-78	R. BELANGER	FIX OUTPUT INTERRUPT SERVICE
   9669					;						TO ELIMINATE XOFF/XON RACE CONDITION
   9670					;  TCO 4.2103	04-DEC-78	R. BELANGER	ADD AUTO-BAUD CAPABILITY TO
   9671					;						1200 BAUD
   9672					;  TCO 4.2105	04-DEC-78	R. BELANGER	IGNORE RING INTERRUPTS IF
   9673					;						NOT IN PRIMARY PROTOCOL
   9674					;  TCO 4.2107	06-DEC-78	R. BELANGER	NEW KEEP-ALIVE ERROR RECOVERY
   9675					;  TCO 4.2140	02-JAN-78	R. BELANGER	INHIBIT REQUEST FOR "SETSPD"
   9676					;						FROM AUTO-BAUD DISCONNECT WHEN
   9677					;						PRIMARY PROTOCOL IS NOT RUNNING
   9678					;  TCO 4.2181	01-FEB-79	R. BELANGER	ADD INTERNAL XOFF PROCESSING
   9679					;  TCO 4.2205	08-MAR-79	R. BELANGER	ADD CODE TO SHUT OFF LINES AFTER
   9680					;						4 CONSECUTIVE FRAMING ERRORS,
   9681					;						LOG THE LINE SHUTDOWN,
   9682					;						AND TO REENABLE THEM ON TIMEOUT
   9683					;						REMOVE REFERENCE TO "TT.ECH"
   9684					;  TCO 4.2206	08-MAR-79	R. BELANGER	MODIFY DM-11/BB TIMEOUT TO
   9685					;						ALWAYS MAINTAIN INTERRUPT ENABLE
   9686					;  TCO 4.2211	12-MAR-79	R. BELANGER	ALLOW RSX20F TO ACCEPT TERMINAL
   9687					;				K. LEFEBVRE	INPUT WHILE IN PROTOCOL PAUSE
   9688					;						UNTIL FREE-POOL IS EXHAUSTED,
   9689					;						THEN CRASH (B01).
   9690					;  TCO 4.2244	05-APR-79	R. BELANGER	FIX DH-11 SILO LOCKUP ON LOCAL XOFF
   9691					;  TCO 4.2245	10-APR-79	R. BELANGER	ADD ERROR LOGGING FOR DH-11 FRAMING ERROR
   9692					;  TCO 4.2246	16-MAY-79	R. BELANGER	ELIMINATE RACE CONDITION IN SENDALLS
   9693					;  TCO 4.2247	29-MAY-79	R. BELANGER	FIX PDP-11 I/O DONE PROCESSING
   9694					;  TCO 4.2264	30-MAY-79	R. BELANGER	RESET AUTO-BAUD LINE SPEED TO 300
   9695					;						BAUD ON CARRIER LOSS.
   9696					;  TCO 4.2284	14-JUN-79	R. BELANGER	FIX CARRIER PROCESSING IN MODEM
   9697					;						CONTROL; SUPERCEDES TCO 4.2264.
   9698					;  TCO 4.2309	25-JUN-79	R. BELANGER	ADD BELL 212A MODEM SUPPORT.
   9699					;  TCO 4.2333	16-JUL-79	R. BELANGER	REJECT CHARACTERS FROM LINES WHICH
   9700					;						ARE IN CARRIER WAIT.
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 176
TTY DRIVER -- DEFINITIONS

   9702						.SBTTL	TTY DRIVER -- DEFINITIONS
   9703
   9704					;
   9705					; MACRO LIBRARY CALLS
   9706					;
   9708						.MCALL	.STKM,WTLO$,CLEF$,CALL,RETURN,WSIG$S,.INH5,.ENB5,.INH6,.ENB6
   9709						.MCALL	DIR$,RQST$,EHSG$,DMYG$,$DEF,.CRASH
   9710	032072					$DEF
   9712					;
   9713					; EQUATED SYMBOLS
   9714					;
   9715					; TERMINAL CONTROL BLOCK OFFSET DEFINITIONS
   9716					;
   9717					; FOR USE ONLY WITH CTY
   9718					;
   9719		000000 				STATS=0			;TERMINAL STATUS WORD (MUST BE ZERO)
   9720		000002 				STRBF=2			;CURRENT BUFFER ADDRESS (INPUT)
   9721		000004 				RMBYT=4			;REMAINING BYTES IN BUFFER (INPUT)
   9722		000005 				FNBYT=5			;TERMINAL BYTE (INPUT)
   9723		000006 				CURBF=6			;STARTING BUFFER ADDRESS (INPUT)
   9724		000010 				MECNT=10		;MULTI-ECHO BYTE COUNT
   9725		000011 				FLBYT=11		;FILL BYTE
   9726		000012 				MEBUF=12		;MULTI-ECHO BUFFER ADDRESS
   9727		000014 				MBUFR=14		;DYNAMIC MULTI-ECHO BUFFER
   9728		000016 				HORPS=16		;HORIZONTAL POSITION OF CARRIAGE
   9729		000020 				DHBUF=20		;DH CHARACTER BUFFER
   9730					;
   9731					; TERMINAL STATUS WORD BIT DEFINITIONS
   9732					;
   9733		100000 				MODE=100000		;MODE OF BUSY TERMINAL (0=INPUT 1=OUTPUT)
   9734		074000 				LFCT=074000		;UNPROCESSED LINE FEED COUNT FIELD
   9735		004000 				LFBT=004000		;UNPROCESSED LINE FEED ADD/SUB BIT
   9736		002000 				CRTY=002000		;CARRIAGE CONTROL AT END OF LINE (1=YES)
   9737		001000 				CRJT=001000		;CARRIAGE RETURN JUST TYPED (1=YES)
   9738		000400 				EOLS=000400		;END OF LINE SEEN (1=YES)
   9739		000040 				CTLO=000040		;OUTPUT DISABLED (1=YES)
   9740		000020 				RUBP=000020		;RUBOUT SEQUENCE IN PROGRESS (1=YES)
   9741		000017 				FLCT=000017		;UNPROCESSED FILL COUNT FIELD
   9742		000001 				FLBT=000001		;UNPROCESSED FILL COUNT BIT
   9743					;
   9744					; TERMINAL STATUS OFFSETS FOR ALL TTY'S
   9745					;
   9746		000000 				THRED==0		;OUTPUT THREAD WORD POINTER (MUST BE ZERO)
   9747		000002 				TTYEXP==2		;EXTERNAL PAGE ADDRESS
   9748		000004 				STSW0==4		;STATUS WORD 0 (SAME AS DH LINE STATUS WORD)
   9749									; HOLDS AUTO-BAUD REQUEST IN BIT 15
   9750									; HOLDS CVONNECTED BIT IN BIT 14
   9751									; HOLDS LINE SPEED FOR DH11'S
   9752									; HOLDS INPUT BLOCK FLAG FOR DL11'S IN LOW BYTE
   9753		000006 				STSW1==6		;STATUS WORD 1 -- SPECIFIC CHARACTERISTICS
   9754					;
   9755					;	STSW0 DEFINITIONS
   9756					;
   9757		100000 				S0.ABR==100000		; [TCO 4.2284] AUTO-BAUD REPORT PENDING
   9758		040000 				S0.CON==040000		; [TCO 4.2284] REMOTE LINE IS CONNECTED
   9759		001700 				S0.ISP==001700		; [TCO 4.2205] INPUT SPEED FIELD MASK
   9760		036000 				S0.OSP==036000		; [TCO 4.2205] OUTPUT SPEED FIELD MASK
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 176-1
TTY DRIVER -- DEFINITIONS

   9761		140000 				S0.MSK==S0.ABR!S0.CON	; [TCO 4.2284] BIT MASK FOR "SETSPD" TASK
   9762		037700 				S0.SPD==S0.OSP!S0.ISP	; [TCO 4.2205] TERMINAL SPEED MASK
   9763					;
   9764					;	STSW1 BIT DEFINITIONS
   9765					;
   9766					;	HIGH BYTE
   9767					;
   9768		140000 				TT.SND==140000		; +001 INDEX OF NEXT SEND-ALL TO DO FOR THIS LINE
   9769		040000 				TT.SNI==040000		; +001 TO INCREMENT SEND-ALL INDEX
   9770									; [TCO 4.2205] NOTE: THE NEXT THREE BITS MUST REMAIN
   9771									; [TCO 4.2205]       CONTIGUOUS AND IN THE SAME ORDER!!
   9772		020000 				TT.RSI==020000		; [TCO 4.2205] RESTART TERMINAL INPUT ON TIMEOUT
   9773		014000 				TT.FEC==014000		; [TCO 4.2205] FRAMING ERROR COUNT FIELD
   9774					;
   9775		004000 				TT.FEI==004000		; [TCO 4.2205] TO INCREMENT FRAMING ERROR COUNT
   9776		002000 				TT.RIP==002000		; TTY REMOTE IN PROGRESS
   9777		001000 				TT.SIP==001000		; TTY SENDALL IN PROGRESS
   9778		000400 				TT.NSA==000400		; SUPPRESS SENDALLS
   9779					;
   9780					;	LOW BYTE
   9781					;
   9782		000200 				TT.XOF==000200		; +++010 TTY IS X'D OFF (WAS "TT.BSY")
   9783									; +++010 !!! MUST BE SIGN BIT OF LOW BYTE !!!!
   9784		000100 				TT.RMT==000100		; REMOTE FLAG
   9785		000040 				TT.ABL==000040		; AUTO-BAUD LINE
   9786		000020 				TT.XEN==000020		; [TCO 4.2181] XON/XOFF ENABLED ON THIS LINE
   9787		000010 				TT.ABW==000010		; +++008 LINE IS IN AUTO-BAUD WAIT
   9788		000004 				TT.CRW==000004		; WAITING FOR CARRIER FLAG
   9789		000002 				TT.CTY==000002		; TTY IS A CONSOLE TTY
   9790		000001 				TT.OUT==000001		; TTY OUTPUT FLAG
   9791					;
   9792					;	THREAD ENTRIES ARE IN THE FOLLOWING FORMAT
   9793					;
   9794		000000 				T.HRED==0		; THREAD WORD (MUST BE ZERO)
   9795		000002 				T.HBCT==2		; BYTE COUNT OF THIS BUFFER
   9796		000004 				T.HCAD==4		; CURRENT ADDRESS OF THIS POINTER
   9797		000006 				T.HCBC==6		; CURRENT BYTE COUNT OF CARS LEFT IN BUFFER
   9798		000007 				T.HFCN==7		; FUNCTION CODE
   9799		000010 				T.HHDS==10		; SIZE OF THIS HEADER
   9800					;
   9801					;	DL11E RCSR BITS
   9802					;
   9803		100000 				DL.DSC==BIT15		; +++005 DL11E DATASET STATUS CHANGE
   9804		040000 				DL.RNG==BIT14		; +++005 DL11E RING INDICATOR
   9805		020000 				DL.CTS==BIT13		; +++005 DL11E CLEAR TO SEND
   9806		010000 				DL.CAR==BIT12		; +++005 DL11E CARRIER DETECT
   9807		004000 				DL.RAC==BIT11		; +++005 DL11E RECIEVER ACTIVE
   9808		002000 				DL.SRD==BIT10		; +++005 DL11E SECONDARY RECIEVED DATA
   9809		000200 				DL.RDN==BIT7		; +++005 DL11E RECIVER DONE
   9810		000100 				DL.REN==BIT6		; +++005 DL11E RECIEVER INTERRUPT ENABLE
   9811		000040 				DL.DEN==BIT5		; +++005 DL11E DATASET INTERRUPT ENABLE
   9812		000010 				DL.STD==BIT3		; +++005 DL11E SECONDARY TRANSMITTED DATA
   9813		000004 				DL.RTS==BIT2		; +++005 DL11E REQUEST TO SEND
   9814		000002 				DL.DTR==BIT1		; +++005 DL11E DATA TERMINAL READY
   9815		000001 				DL.RDE==BIT0		; +++005 DL11E READER ENABLE
   9816		001420 				DL.UNA==BIT9!BIT8!BIT4	; +++005 DL11E UNASSIGNED
   9817					;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 176-2
TTY DRIVER -- DEFINITIONS

   9818					;	DL11E RBUF BITS
   9819					;
   9820		020000 				DL.FER==BIT13		; +++009 DL11 FRAMING ERROR
   9821					;
   9822					;	DL11E XCSR BITS
   9823					;
   9824		000100 				DL.XEN==BIT6		; +++005 DL11E XMTR ENABLE
   9825					;
   9826					;	DH11 NRCR BITS
   9827					;
   9828		020000 				DH.FER==BIT13		; +++012 DH11 FRAMING ERROR
   9829					;
   9830					; SPECIAL CHARACTER DEFINITIONS
   9831					;
   9832		000011 				C.HTAB==11		; HORIZONTAL TAB CHARACTER
   9833		000012 				C.HLFD==12		; LINE FEED CHARACTER
   9834		000013 				C.HVTB==13		; VERTICAL TAB CHARACTER
   9835		000014 				C.HFFD==14		; FORM FEED CHARACTER
   9836		000015 				C.HCRT==15		; CARRIARGE RETURN CHARACTER
   9837		000021 				C.HXON==21		; XON CHARACTER
   9838		000023 				C.HXOF==23		; XOFF CHARACTER
   9839		000032 				C.HEOF==32		; END-OF-FILE CHARACTER
   9840		000033 				C.HESC==33		; ESCAPE CHARACTER
   9841		000033 				C.HALT==C.HESC		; ALIAS ATL-MODE
   9842		000040 				C.HSPC==40		; SPACE CHARACTER
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 177
TTY DRIVER -- DEFINITIONS

   9844	032072				TTYHD::
   9845	032072					.STKM	0,0,0,0,0,0,0,TTINI,174000,TTYSP
	032140	000000 	000000 	000000 		.WORD	0,0,0,0
	032146	000000
	032166	174000 	032550'	032352'		.WORD	174000,TTINI,TTYSP
	032222	000005 				.WORD	5
	032224	007606'				.WORD	TTPEN
	032226	000000 				.WORD	0
	032230	000000 				.WORD	0
	032232	000000 				.WORD	0
	032234	000000 				.WORD	0
	032236	000000 				.WORD	0
	032240	000000 				.WORD	0
	032242	000000 				.WORD	0
	032244	000000 				.WORD	0
	032246	000000 				.WORD	0
	032250	000000 				.WORD	0
	032352	000000 				.WORD	0
	032354	000000 				.WORD	0
	032356	000000 				.WORD	0
	032360	000000 				.WORD	0
	032362	000000 				.WORD	0
	032364	000000 				.WORD	0
	032366	032550'				.WORD	TTINI
	032370	174000 				.WORD	174000
   9846					;
   9847					; LOCAL DATA
   9848					;
   9849					;
   9850					; CONTROL OUTPUT MESSAGES
   9851					;
   9852	032372				CTRLC:
   9853	032372	   136 	   103 	   015 		.ASCII	/^C/<15><12>
	032375	   012
   9854	032376				CTRLU:
   9855	032376	   136 	   125 	   015 		.ASCII	/^U/<15><12>
	032401	   012
   9856	032402				CTRLZ:
   9857	032402	   136 	   132 	   015 		.ASCII	/^Z/<15><12>
	032405	   012
   9858
   9859	032406				TTWLO:				; +++008
   9860	032406					WTLO$	1,EF.NIR!EF.IOD!EF.TMO!EF.RQM!EF.RKR!EF.RKH!EF.RSS
	032406	   053 	   003 			.BYTE	43.,3
	032410	000001 				.WORD	1
	032412	007330 				.WORD	EF.NIR!EF.IOD!EF.TMO!EF.RQM!EF.RKR!EF.RKH!EF.RSS
   9861	032414				EXKAL:
   9862	032414					EHSG$	0,PSWW1,KPAL0
	032414	002411 				.WORD	400*5.+DR.DTE
	032416	000010 				.WORD	DF.EHG
	032420	000005 				.WORD	PSWW1
	032422	001372'				.WORD	KPAL0
	032424	000000 				.WORD	0
   9863	032426				DPKAL:
   9864	032426					DMYG$	PSWW1,KPAL1
	032426	002011 				.WORD	400*4.+DR.DTE
	032430	000004 				.WORD	DF.DMG
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 177-1
TTY DRIVER -- DEFINITIONS

	032432	000005 				.WORD	PSWW1
	032434	001402'				.WORD	KPAL1
   9865	032436				RQMCR:
   9866	032436					RQST$	PARSER,,249.
	032436	   013 	   007 			.BYTE	11.,7
	032440	062072 	073632 			.RAD50	/PARSER/
	032444	000000 	000000 			.WORD	0,0
	032450	000371 				.WORD	249.
	032452	   000 	   000 			.BYTE	,
   9867	032454				RQKLR:
   9868	032454					RQST$	KLRING,,10
	032454	   013 	   007 			.BYTE	11.,7
	032456	043262 	035167 			.RAD50	/KLRING/
	032462	000000 	000000 			.WORD	0,0
	032466	000010 				.WORD	10
	032470	   000 	   000 			.BYTE	,
   9869	032472				RQKLD:				; +++005
   9870	032472					RQST$	KLDISC,,10
	032472	   013 	   007 			.BYTE	11.,7
	032474	043244 	035473 			.RAD50	/KLDISC/
	032500	000000 	000000 			.WORD	0,0
	032504	000010 				.WORD	10
	032506	   000 	   000 			.BYTE	,
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 178
TTY DRIVER -- DEFINITIONS

   9872					;
   9873					;	AUTO-BAUD TABLES
   9874					;
   9875	032510				CHTBL:
   9876	032510	   214 				.BYTE	214		; <CR> AT 110 BAUD
   9877	032511	   234 				.BYTE	234		; <CR> AT 110 BAUD
   9878	032512	   346 				.BYTE	346		; <CR> AT 150 BAUD
   9879	032513	   015 				.BYTE	15		; <CR> AT 300 BAUD
   9880	032514	   215 				.BYTE	215		; <CR> AT 300 BAUD
   9881	032515	   174 				.BYTE	174		; <^C> AT 110 BAUD
   9882	032516	   036 				.BYTE	36		; <^C> AT 150 BAUD
   9883	032517	   203 				.BYTE	203		; <^C> AT 300 BAUD
   9884	032520	   003 				.BYTE	3		; <^C> AT 300 BAUD
   9885	032521	   376 				.BYTE	376		; [TCO 4.2103] <ANYTHING> AT 1200 BAUD
   9886	032522	   377 				.BYTE	377		; [TCO 4.2103] <ANYTHING> AT 1200 BAUD
   9887
   9888		000013 				CHTBLN= .-CHTBL
   9889					.EVEN
   9890
   9891	032524				IDXTB:
   9892	032524	   000 				.BYTE	0		; [TCO 4.2103] INDEX FOR 110 BAUD
   9893	032525	   000 				.BYTE	0		; [TCO 4.2103] INDEX FOR 110 BAUD
   9894	032526	   002 				.BYTE	2		; [TCO 4.2103] INDEX FOR 150 BAUD
   9895	032527	   004 				.BYTE	4		; [TCO 4.2103] INDEX FOR 300 BAUD
   9896	032530	   004 				.BYTE	4		; [TCO 4.2103] INDEX FOR 300 BAUD
   9897	032531	   000 				.BYTE	0		; [TCO 4.2103] INDEX FOR 110 BAUD
   9898	032532	   002 				.BYTE	2		; [TCO 4.2103] INDEX FOR 150 BAUD
   9899	032533	   004 				.BYTE	4		; [TCO 4.2103] INDEX FOR 300 BAUD
   9900	032534	   004 				.BYTE	4		; [TCO 4.2103] INDEX FOR 300 BAUD
   9901	032535	   006 				.BYTE	6		; [TCO 4.2103] INDEX FOR 1200 BAUD
   9902	032536	   006 				.BYTE	6		; [TCO 4.2103] INDEX FOR 1200 BAUD
   9903					.EVEN
   9904
   9905	032540				SPDTB:
   9906	032540	006307 				.WORD	6307		; [TCO 4.2103] 110 BAUD LINE SPEED
   9907	032542	012503 				.WORD	12503		; [TCO 4.2103] 150 BAUD LINE SPEED
   9908	032544	016703 				.WORD	16703		; [TCO 4.2103] 300 BAUD LINE SPEED
   9909	032546	023103 				.WORD	23103		; [TCO 4.2103] 1200 BAUD LINE SPEED
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 179
TTY DRIVER -- TTINI (TTY QUEUE SERVICE)

   9911						.SBTTL	TTY DRIVER -- TTINI (TTY QUEUE SERVICE)
   9912
   9913						.ENABL	LSB
   9914
   9915					;
   9916					; TERMINAL DRIVER EVENT FLAG SERVICE
   9917					;
   9918
   9919	032550				TTINI::
   9920	032550					DIR$	#TTWLO		; WAIT FOR TTY
	032550	012746 	032406'			MOV	#TTWLO,-(SP)
	032554	104375 				EMT	375
   9921	032556					.INH6			;;; INHIBIT TASK SWITCHING
	032556	013746 	177776 			MOV	@#PS,-(SP)
	032562	112737 	000300 	177776 		MOVB	#300,@#PS
   9922	032570	013705 	001006'			MOV	.CRTSK,R5	;;; FIND THE CURRENT TASK POINTER
   9923	032574	016504 	000020 			MOV	A.EF(R5),R4	;;; FIND EVENT FLAGS
   9924	032600	005065 	000020 			CLR	A.EF(R5)	;;; CLEAR EVENT FLAGS
   9925	032604					.ENB6			; ENABLE TASK SWITCHING
	032604	012637 	177776 			MOV	(SP)+,@#PS
   9926	032610	010446 				MOV	R4,-(SP)	; [TCO 4.2247] STACK THE EVENT FLAGS
   9927	032612	032716 	000200 			BIT	#EF.RQM,(SP)	; [TCO 4.2247]REQUEST MCR?
   9928	032616	001403 				BEQ	10$		; NO -- MUST BE SOMETHING ELSE
   9929	032620					DIR$	#RQMCR		; YES -- REQUEST PARSER
	032620	012746 	032436'			MOV	#RQMCR,-(SP)
	032624	104375 				EMT	375
   9930	032626				10$:
   9931	032626	032716 	001000 			BIT	#EF.RKR,(SP)	; [TCO 4.2247] KLINIK RING INTERRUPT?
   9932	032632	001403 				BEQ	15$		; +++005 NO -- FORGET IT
   9933	032634					DIR$	#RQKLR		; YES -- REQUEST KLRING
	032634	012746 	032454'			MOV	#RQKLR,-(SP)
	032640	104375 				EMT	375
   9934	032642				15$:				; +++005
   9935	032642	032716 	002000 			BIT	#EF.RKH,(SP)	; [TCO 4.2247] KLINIK HANGUP?
   9936	032646	001403 				BEQ	20$		; +++005 NO -- GO ON
   9937	032650					DIR$	#RQKLD		; +++005 YES -- REQUEST KLDISC
	032650	012746 	032472'			MOV	#RQKLD,-(SP)
	032654	104375 				EMT	375
   9938	032656				20$:
   9939	032656	032716 	004000 			BIT	#EF.RSS,(SP)	; [TCO 4.2247] AUTO-BAUD REQUEST??
   9940	032662	001412 				BEQ	30$		; +++008 NO -- GO ON
   9941	032664	005737 	002602'			TST	.ABFLG		; +++008 YES -- INTERLOCK SET??
   9942	032670	001007 				BNE	30$		; +++008 YES -- GO ON
   9943	032672	013737 	002600'	002602'		MOV	.ABCNT,.ABFLG	; +++008 NO -- REAL REQUEST??
   9944	032700	001403 				BEQ	30$		; +++008 NO -- IGNORE IT
   9945	032702					DIR$	#.RQSPD		; +++008 YES -- REQUEST "SETSPD"
	032702	012746 	026464'			MOV	#.RQSPD,-(SP)
	032706	104375 				EMT	375
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 180
TTY DRIVER -- TIMEOUT SERVICE

   9947						.SBTTL	TTY DRIVER -- TIMEOUT SERVICE
   9948
   9949	032710				30$:
   9950	032710	032716 	000100 			BIT	#EF.TMO,(SP)	; [TCO 4.2247] TIMEOUT?
   9951	032714	001431 				BEQ	35$		; [TCO 4.2247] NO -- GO ON
   9952	032716					.INH5			; [TCO 4.2309] DISALLOW TERMINAL INTERRUPTS
	032716	013746 	177776 			MOV	@#PS,-(SP)
	032722	112737 	000240 	177776 		MOVB	#240,@#PS
   9953	032730	105337 	002660'			DECB	TMOCNT+0	;;; [TCO 4.2309] ONLY DO TIMEOUT EVERY 10 SEC
   9954	032734	001007 				BNE	310$		;;; [TCO 4.2309] NOT YET -- SEE ABOUT ERROR LOGGING
   9955	032736	112737 	000012 	002660'		MOVB	#^D10,TMOCNT+0	;;; [TCO 4.2309] RESET TIMEOUT COUNT
   9957	032744					CALL	.DHTMO		;;; [TCO 4.2205] CHECK FOR TIMEOUT ON DM1-1/BBS AND DH-11S
	032744	004737 	040712'			JSR	PC,.DHTMO
   9959	032750					CALL	.DLTMO		;;; CHECK FOR TIMEOUT ON DL-11ES
	032750	004737 	040442'			JSR	PC,.DLTMO
   9960	032754				310$:
   9961	032754	105337 	002661'			DECB	TMOCNT+1	;;; [TCO 4.2309] MODEM TIMEOUT DUE??
   9962	032760	001005 				BNE	320$		;;; [TCO 4.2309] NO -- GO ON
   9963	032762	112737 	000026 	002661'		MOVB	#^D22,TMOCNT+1	;;; [TCO 4.2309] YES -- RESET TIMEOUT COUNT
   9964	032770					CALL	.DMTMO		;;; [TCO 4.2309] AND CHECK DM-11/BB'S
	032770	004737 	041242'			JSR	PC,.DMTMO
   9965	032774				320$:
   9966	032774					.ENB5			;;; [TCO 4.2054] ALLOW INTERRUPTS
	032774	012637 	177776 			MOV	(SP)+,@#PS
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 181
TTY DRIVER -- TERMINAL ERROR LOGGING

   9968						.SBTTL	TTY DRIVER -- TERMINAL ERROR LOGGING
   9969
   9970	033000				35$:
   9971	033000	012704 	002654'			MOV	#.TTELQ,R4	; [TCO 4.2245] POINT TO ERROR LOG BUFFER
   9972	033004				40$:
   9973	033004	011400 				MOV	(R4),R0		; [TCO 4.2245] ANYTHING THERE??
   9974	033006	001432 				BEQ	55$		; [TCO 4.2245] NO -- GO ON
   9975	033010	032020 				BIT	(R0)+,(R0)+	; [TCO 4.2245] YES -- MOVE OVER THE LISTHEAD
   9976	033012	012703 	000003 			MOV	#D.CDH1,R3	; [TCO 4.2245] SET UP DEVICE CODE
   9977	033016	012702 	000001 			MOV	#1,R2		; [TCO 4.2245] SET UP EVENT FLAG
   9978	033022	012701 	100007 			MOV	#BC.HDS+BIT15,R1 ; [TCO 4.2245] SET UP FUNCTION CODE
   9979	033026					CALL	..STIN		; [TCO 4.2245] LOG THE ERROR
	033026	004737 	044432'			JSR	PC,..STIN
   9980	033032	103413 				BCS	50$		; [TCO 4.2245] ERROR IF CC-C IS SET
   9981	033034	013701 	001006'			MOV	.CRTSK,R1	; [TCO 4.2245] POINT TO CURRENT TASK
   9982	033040				45$:
   9983	033040	030261 	000020 			BIT	R2,A.EF(R1)	; [TCO 4.2245] HAS THE EVENT FLAG SET??
   9984	033044	001004 				BNE	47$		; [TCO 4.2245] YES -- GO ON
   9985	033046					WSIG$S			; [TCO 4.2245] NO -- WAIT A CLOCK TICK
	033046	012746 				MOV	(PC)+,-(SP)
	033050	   061 	   001 			.BYTE	49.,1
	033052	104375 				EMT	375
   9986	033054	000771 				BR	45$		; [TCO 4.2245] AND TRY AGAIN
   9987						;
   9988	033056				47$:
   9989	033056	040261 	000020 			BIC	R2,A.EF(R1)	; [TCO 4.2245] CLEAR THE EVENT FLAG
   9990	033062				50$:
   9991	033062	034040 				BIT	-(R0),-(R0)	; [TCO 4.2245] BACK OVER THE LISTHEAD
   9992	033064	011014 				MOV	(R0),(R4)	; [TCO 4.2245] REMOVE FROM LIST
   9993	033066					CALL	..DECN		; [TCO 4.2245] AND DEQUEUE THE NODE
	033066	004737 	043162'			JSR	PC,..DECN
   9994	033072	000744 				BR	40$		; [TCO 4.2245] AND SEE ABOUT OTHER ERRORS
   9995						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 182
TTY DRIVER -- ACK ALL SERVICE

   9997						.SBTTL	TTY DRIVER -- ACK ALL SERVICE
   9998
   9999	033074				55$:
  10001	033074	005737 	001162'			TST	.ACKAL		; ACK ALL REQUESTED??
  10002	033100	001443 				BEQ	60$		; NO -- CONTINUE
  10003	033102	005037 	001162'			CLR	.ACKAL		; YES -- CLEAR FLAG
  10004	033106	012703 	000005 			MOV	#D.CLPT,R3	; +004 SET LINE ALLOCATION ON LPT
  10005	033112	012704 	000214 			MOV	#140.,R4	; +004 140 BYTES
  10006	033116	012701 	000023 			MOV	#BC.SLA,R1	; +004 SET LINE ALLOCATION
  10007	033122					CALL	..STFC
	033122	004737 	044242'			JSR	PC,..STFC
  10008	033126	062704 	000400 			ADD	#400,R4		; +004 ALSO LPT1
  10009	033132					CALL	..STFC
	033132	004737 	044242'			JSR	PC,..STFC
  10010	033136	012701 	000025 			MOV	#BC.AKA,R1	; SEND ACK ALL
  10011	033142	012703 	000007 			MOV	#7,R3		; RANDOM FUNCTION CODE (ZERO A BAD IDEA HERE)
  10012									; DON'T CARE ABOUT FIRST WORD SENT
  10013	033146					CALL	..STFC		; START ACK FUNCTION
	033146	004737 	044242'			JSR	PC,..STFC
  10014	033152	005737 	001136'			TST	.DATE3		; REALLY DO IT?
  10015	033156	001414 				BEQ	60$		; NOPE -- FORGET IT
  10016	033160	012700 	001134'			MOV	#.CLKSW,R0	; RETURN THE TIME OF DAY TO THE 10
  10017	033164	012701 	100012 			MOV	#100000+BC.HTD,R1
  10018	033170	005002 				CLR	R2
  10019	033172	012703 	000007 			MOV	#D.CCLK,R3
  10020	033176	012710 	000014 			MOV	#14,@R0		; 14 BYTES
  10021	033202					CALL	..STIN		; YES -- THEN START INDIRECT FUNCTION
	033202	004737 	044432'			JSR	PC,..STIN
  10022	033206	005010 				CLR	(R0)		; +++005 RESET CLOCK FLAG
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 183
TTY DRIVER -- KL KEEP-ALIVE SERVICE

  10024						.SBTTL	TTY DRIVER -- KL KEEP-ALIVE SERVICE
  10025
  10026					;+
  10027					; QUEUED PROTOCOL KEEP-ALIVE SERVICE
  10028					;
  10029					; THE QUEUED PROTOCOL KEEP-ALIVE SERVICE IS DONE AS PART OF THE TERMINAL
  10030					; DRIVER TIMEOUT SERVICE AS IS IT CONVENIENT AND ELIMINATESS THE NEED FOR
  10031					; A SEPARATE QUEUED PROTOCOL TIMEOUT SERVICE TASK.
  10032					;
  10033					; NO KEEP-ALIVE CHECKING OR MAINTENANCE WILL BE DONE IF THE FRONT-END IS NOT
  10034					; RUNNING PRIMARY PROTOCOL.
  10035					;
  10036					; KEEP-ALIVE MAINTENANCE IS ALWAYS DONE WHILE THE FRONT-END IS IN PRIMARY
  10037					; PROTOCOL BUT KEEP-ALIVE CHECKING IS DONE ONLY IF ".NOERR" IS CLEAR (ERRORS
  10038					; ARE TO BE IGNORED)
  10039					;
  10040					; THE KL10'S KEEP-ALIVE COUNT IS EXAMINED ONCE PER TIMEOUT AND CHECKED TO
  10041					; VERIFY THAT THE KEEP-ALIVE COUNT IS CHANGING. IF THE EXAMINE FAILS, THE
  10042					; KL10 IS ASSUMED TO BE DEAD, AND THE ERROR IS IGNORED AT THIS LEVEL.
  10043					;
  10044					; IF THE EXAMINE SUCCEEDS AND THE KL10 KEEP-ALIVE COUNT IS CHANGING, ALL IS
  10045					; WELL AND THE KEEP-ALIVE RETRY COUNTER, ".KPAC+0", IS RESET IN CASE THIS IS
  10046					; A CONTINUATION. THE CONTINUATION ATTEMPT IS MARKED BY DRIVING ".KPAC+1"
  10047					; NON-ZERO.
  10048					;
  10049					; IF THE KL10 KEEP-ALIVE COUNT HAS NOT CHANGED, THE KL10 IS ALLOWED 5 TIMEOUT
  10050					; PERIODS FOR THE KEEP-ALIVE COUNT TO BEGIN CHANGING. IF THIS TIME EXPIRES
  10051					; WITH NO RESUMPTION OF KEEP-ALIVE COUNTING, THE ERROR IS FLAGGED AND "TKTN"
  10052					; INVOKED.
  10053					;
  10054					; ON THE FIRST KEEP-ALIVE-CEASE, KLINIT (Q.V.) WILL EXECUTE THE KL10 INSTRUCTION
  10055					; IN LOCATION 71 IN ORDER THAT THE KL10 ATTEMPT TO DO SOMETHING ON ITS OWN ABOUT
  10056					; THE ERROR. THE FRONT-END WILL WAIT ONE KEEP-ALIVE PERIOD FOR THIS TO HAPPEN.
  10057					; IF THE SECOND KEEP-ALIVE PERIOD EXPIRES, A FULL ERROR DUMP AND RELOAD OF THE
  10058					; KL10 IS REQUESTED.
  10059					;
  10060					; IN ALL CASES, THE FRONT-END WILL ATTEMPT TO CONTINUE ITS HALF OF THE KEEP-ALIVE
  10061					; DIALOG.
  10062					;-
  10063
  10064	033210				60$:
  10065	033210	032716 	000100 			BIT	#EF.TMO,(SP)	; [TCO 4.2247] IS THIS A CLOCK REQUEST??
  10066	033214	001455 				BEQ	95$		; [TCO 4.2247] NO -- GO ON
  10067	033216	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ; [TCO 4.2107] YES -- ARE WE IN PRIMARY PROTOCOL??
  10068	033224	001451 				BEQ	95$		; [TCO 4.2107] NO -- DON'T WORRY ABOUT KEEP-ALIVE
  10069	033226	005737 	001122'			TST	.NOERR		; [TCO 4.2107] YES -- DO WE CARE ABOUT HIS KEEP-ALIVE??
  10070	033232	001041 				BNE	90$		; [TCO 4.2107] NO -- GO ON
  10071	033234					DIR$	#EXKAL		; [TCO 4.2107] YES -- READ KL KEEP-ALIVE COUNTER
	033234	012746 	032414'			MOV	#EXKAL,-(SP)
	033240	104375 				EMT	375
  10072	033242	103435 				BCS	90$		; [TCO 4.2107] KL10 IS ALREADY DEAD IF CC-C IS SET
  10073	033244	123737 	001372'	001400'		CMPB	KPAL0,OKPAL0	; [TCO 4.2107] IS HIS COUNT CHANGING??
  10074	033252	001023 				BNE	80$		; [TCO 4.2107] YES -- GO ON
  10075	033254	105337 	001410'			DECB	.KPAC+0		; [TCO 4.2107] NO -- IS HE DEAD??
  10076	033260	003023 				BGT	85$		; [TCO 4.2107] NO -- NOT YET, ANYWAY
  10077	033262				65$:
  10078	033262	105337 	001411'			DECB	.KPAC+1		; [TCO 4.2107] YES -- SECOND TIME??
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 183-1
TTY DRIVER -- KL KEEP-ALIVE SERVICE

  10079	033266	100404 				BMI	70$		; [TCO 4.2107] YES -- GO ON
  10080	033270	005737 	001412'			TST	.KACFL		; [TCO 4.2107] NO -- RETRIES ALLOWED??
  10081	033274	001005 				BNE	75$		; [TCO 4.2107] YES -- GO ON
  10082	033276	000771 				BR	65$		; [TCO 4.2107] NO -- FORCE SECOND ERROR
  10083						;
  10084					;
  10085					; HERE ON SECOND KEEP-ALIVE ERROR
  10086					;
  10087	033300				70$:
  10088	033300					CALL	..DTSP		; [TCO 4.2107] KILL ALL PROTOCOLS
	033300	004737 	045450'			JSR	PC,..DTSP
  10089	033304	105237 	001122'			INCB	.NOERR		; [TCO 4.2107] INDICATE WE ARE SERVICING A REAL ERROR
  10090					;
  10091					; HERE ON FIRST KEEP-ALIVE ERROR
  10092					;
  10093	033310				75$:
  10094	033310	052737 	000020 	001126'		BIS	#KS.CST,.KLITK	; [TCO 4.2107] FLAG THE ERROR
  10095	033316	105237 	001124'			INCB	.TKTN		; [TCO 4.2107] REQUEST TKTN
  10096					;
  10097					; HERE WHEN HIS KEEP-ALIVE IS RUNNING OR HAS TIMED OUT
  10098					;
  10099	033322				80$:
  10100	033322	112737 	000005 	001410'		MOVB	#.KALSC,.KPAC+0	; [TCO 4.2107] RESET RETRY COUNTER
  10101	033330				85$:
  10102	033330	013737 	001372'	001400'		MOV	KPAL0,OKPAL0	; [TCO 4.2107] SAVE HIS COUNT FOR THE NEXT TIME AROUND
  10103					;
  10104					; INCREMENT AND TRANSMIT OUR KEEP-ALIVE COUNT
  10105					;
  10106	033336				90$:
  10107	033336	005237 	001402'			INC	KPAL1		; [TCO 4.2107] INCREMENT OUR KEEP-ALIVE COUNTER
  10108	033342					DIR$	#DPKAL		; [TCO 4.2107] AND GIVE IT TO HIM
	033342	012746 	032426'			MOV	#DPKAL,-(SP)
	033346	104375 				EMT	375
  10109
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 184
TTY DRIVER -- CTY SERVICE

  10112						.SBTTL	TTY DRIVER -- CTY SERVICE
  10113
  10114	033350				95$:
  10115	033350	032726 	000020 			BIT	#EF.IOD,(SP)+	; [TCO 4.2247] I/O DONE??
  10116	033354	001072 				BNE	105$		; [TCO 4.2247] YES -- HANDLE THAT FIRST
  10117	033356	005737 	002730'			TST	TTPKT		; NO -- CHECK PACKET
  10118	033362	001162 				BNE	TTINO		; PACKET IN USE -- WAIT
  10119	033364				DQNXT:
  10120	033364					.INH6			; +++007 DISALLOW INTERRUPTS
	033364	013746 	177776 			MOV	@#PS,-(SP)
	033370	112737 	000300 	177776 		MOVB	#300,@#PS
  10121	033376	105737 	001224'			TSTB	.KLNSW+0	;;; +++005 IS KLINIK ACTIVE??
  10122	033402	003406 				BLE	100$		;;; +++005 NO -- GO ON
  10123	033404	013700 	002636'			MOV	KLNPTR,R0	;;; +++005 KLINIK LINE POINTER TO R0
  10124	033410	032760 	000001 	000006 		BIT	#TT.OUT,STSW1(R0) ;;; +++005 IS IT BUSY??
  10125	033416	001142 				BNE	TTINX		;;; +++005 YES -- WAIT A WHILE
  10126	033420				100$:				;;; +++005
  10127	033420	013700 	002634'			MOV	CTYPTR,R0	;;; +++005 CHECK AND WAIT FOR I/O FROM 10 TO STOP
  10128	033424	032760 	000001 	000006 		BIT	#TT.OUT,STSW1(R0) ;;; +++005 OUTPUT IN PROGRESS?
  10129	033432	001134 				BNE	TTINX		;;; +++005
  10130	033434	012700 	052124 			MOV	#"TT,R0		;;; +++005 SET UP TO DEQUEUE FROM TTY LUN
  10131	033440					CALL	..DQRN		;;; +++005 GET AN I/O PACKET TO PROCESS
	033440	004737 	042050'			JSR	PC,..DQRN
  10132	033444	103527 				BCS	TTINX		;;; +++005 IF CC-C IS SET CONTROLLER BUSY OR NO REQUEST
  10133	033446	005237 	002632'			INC	.TTP11		;;; +++007 SET PDP11 I/O IN PROGRESS
  10134	033452					.ENB6			;;; +++007 ALLOW INTERRUPTS
	033452	012637 	177776 			MOV	(SP)+,@#PS
  10135					;
  10136					; THE FOLLOWING ARGUMENTS ARE RETURNED BY ..DQRN:
  10137					;
  10138					;	R0 -- LOGICAL UNIT NUMBER
  10139					;	R1 -- ADDRESS OF THE I/O REQUEST PACKET.
  10140					;
  10141	033456	010137 	002730'			MOV	R1,TTPKT	; SAVE PACKET ADDRESS
  10142	033462	010337 	002724'			MOV	R3,BYCNT 	; SAVE THE BYTE COUNT
  10143	033466	010337 	002722'			MOV	R3,CNT		; SAVE IT HERE ALSO
  10144	033472	010537 	002726'			MOV	R5,CRADR	; SAVE CURRENT ADDRESS
  10145	033476	013705 	002634'			MOV	CTYPTR,R5	; FIND THE CTY TERMINAL
  10146	033502	012703 	002662'			MOV	#CTYSTS,R3	; FIND TERMINAL STATUS WORD
  10147	033506	122761 	000001 	000015 		CMPB	#IO.WLB/256.,R.FC+1(R1) ;WRITE LOGICAL FUNCTION?
  10148	033514	001451 				BEQ	125$		; IF EQ YES
  10149	033516	042713 	000040 			BIC	#CTLO,@R3	; ENABLE OUTPUT
  10150	033522	122761 	000002 	000015 		CMPB	#IO.RLB/256.,R.FC+1(R1) ;READ LOGICAL FUNCTION?
  10151	033530	001422 				BEQ	115$		; YES -- PROCESS REQUEST
  10152	033532	012703 	000001 			MOV	#IS.SUC,R3	; SET UP THE ERROR STATUS
  10153	033536	005004 				CLR	R4		; INDICATE NO TRANSFER
  10154	033540	000407 				BR	110$		; TRY AGAIN
  10155						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 185
TTY DRIVER -- CTY I/O DONE SERVICE

  10157						.SBTTL	TTY DRIVER -- CTY I/O DONE SERVICE
  10158
  10159	033542				105$:
  10160	033542	013701 	002730'			MOV	TTPKT,R1	; FIND THE I/O PACKET
  10161	033546	001706 				BEQ	DQNXT
  10162	033550	016104 	000026 			MOV	R.PB+2(R1),R4	; SET THE COUNT XFERED
  10163	033554	013703 	002726'			MOV	CRADR,R3	; RETURN THE STATUS
  10164	033560				110$:
  10165	033560					CALL	..IODN		; CALL I/O DONE OUTINE
	033560	004737 	041730'			JSR	PC,..IODN
  10166	033564	005337 	002632'			DEC	.TTP11		; PDP11 INPUT NOT IN PROGREESS
  10167	033570	005037 	002730'			CLR	TTPKT		; SET NO PACKET IN USE
  10168	033574	000673 				BR	DQNXT		; AND WAIT FOR NEXT JOB
  10169						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 186
TTY DRIVER -- CTY INPUT SERVICE

  10171						.SBTTL	TTY DRIVER -- CTY INPUT SERVICE
  10172
  10173					;
  10174					; REQUEST IS A SOLICITED INPUT REQUEST-GET A BUFFER FOR INPUT
  10175					;
  10176	033576				115$:				; SET SOLICITED INPUT FLAG
  10177	033576	042713 	102400 			BIC	#MODE!EOLS!CRTY,@R3
  10178	033602	013763 	002726'	000006 		MOV	CRADR,CURBF(R3) ;SET RANDOM INPUT VALUES
  10179	033610	013763 	002724'	000004 		MOV	BYCNT,RMBYT(R3)
  10180	033616	013763 	002726'	000002 		MOV	CRADR,STRBF(R3)
  10181	033624	032713 	001000 			BIT	#CRJT,@R3	; CARRIAGE RETURN JUST TYPED?
  10182	033630	001426 				BEQ	135$		; NO -- NO CARRAGE CONTROL NECESSARY
  10183	033632				120$:
  10184	033632	062713 	004000 			ADD	#LFBT,@R3	; FORCE LINE FEED
  10185	033636	000423 				BR	135$		; AND FORCE IT OUT
  10186						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 187
TTY DRIVER -- CTY OUTPUT SERVICE

  10188						.SBTTL	TTY DRIVER -- CTY OUTPUT SERVICE
  10189
  10190					;
  10191					; REQUEST IS AN OUTPUT REQUEST-SET UP CARRIAGE CONTROL FLAGS
  10192					;
  10193	033640				125$:
  10194	033640	005737 	007622'			TST	TTPEN+U.AF	; CHECK FOR ATTACHED
  10195	033644	001002 				BNE	130$		; YES -- DON'T CLEAR STATUS FLAGS
  10196	033646	042713 	000040 			BIC	#CTLO,@R3	; ENABLE OUTPUT
  10197	033652				130$:
  10198	033652	042713 	076437 			BIC	#LFCT!CRTY!EOLS!RUBP!FLCT,@R3 ;CLEAR STATUS WORD
  10199	033656	052713 	100000 			BIS	#MODE,@R3	; SET OUTPUT MODE
  10200	033662	005761 	000030 			TST	R.PB+4(R1)	; CHECK FOR CARRAGE CONTROL
  10201	033666	001407 				BEQ	135$		; NO -- NOTHING TO DO
  10202	033670	122761 	000044 	000030 		CMPB	#'$,R.PB+4(R1)	; $?
  10203	033676	001755 				BEQ	120$		; YES -- DON'T FAKE CARRAGE CONTROL HERE
  10204	033700	052713 	002000 			BIS	#CRTY,@R3	; YES -- IT WILL ALWAYS BE ASSUMED ' '
  10205	033704	000752 				BR	120$		; OUTPUT CRLF
  10206						;
  10207	033706				135$:
  10208	033706					.INH6			; +++006 DISALLOW INTERRUPTS
	033706	013746 	177776 			MOV	@#PS,-(SP)
	033712	112737 	000300 	177776 		MOVB	#300,@#PS
  10209	033720					CALL	OUTPT		;;; +++006 START OUTPUT
	033720	004737 	034620'			JSR	PC,OUTPT
  10210	033724				TTINX:				;;; +++007
  10211	033724					.ENB6			;;; +++006 ALLOW INTERRUPTS
	033724	012637 	177776 			MOV	(SP)+,@#PS
  10212	033730				TTINO:
  10213	033730	000137 	032550'			JMP	TTINI		; MAKE SURE OUTPUT IS ACTIVE
  10214						;
  10215						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 188
TTY DRIVER -- $DHOUT (DH11 OUTPUT INTERRUPT)

  10217						.SBTTL	TTY DRIVER -- $DHOUT (DH11 OUTPUT INTERRUPT)
  10218					;
  10219					;	DHOUT -- DH11 TERMINAL MUX OUT INTERRUPTS
  10220					;
  10221	033734				$DHOUT::			;;; REF LABEL
  10222	033734	013737 	177776 	002646'		MOV	@#PS,DHTMP	;;; SAVE CONTROLLER NUMBER
  10223	033742					CALL	R3,DHSAV	;;; SAVE R3 AND SETUP R3 AND R4
	033742	004337 	037120'			JSR	R3,DHSAV
  10224	033746				10$:
  10225	033746	042714 	101077 			BIC	#101077,@R4	;;; CLEAR CURRENT UNIT AND TRANSMIT INT
  10226	033752				20$:
  10227	033752	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; OUTPUT INTERRUPT EXPECTED?
  10228	033760	001403 				BEQ	30$		;;; IF EQ NO
  10229	033762	005764 	000010 			TST	10(R4)		;;; ZERO BYTE COUNT?
  10230	033766	001407 				BEQ	40$		;;; IF EQ YES
  10231	033770				30$:
  10232	033770	005214 				INC	@R4		;;; INCREMENT UNIT NUMBER
  10233	033772	062705 	000010 			ADD	#10,R5		;;; POINT TO NEXT ENTRY
  10234	033776	026504 	000002 			CMP	TTYEXP(R5),R4	;;; SAME DH ?
  10235	034002	001763 				BEQ	20$		;;; YES -- CHECK NEXT UNIT
  10236	034004					RETURN
	034004	000207 				RTS	PC
  10237	034006				40$:
  10238	034006	042765 	000001 	000006 		BIC	#TT.OUT,STSW1(R5) ;;; THIS OPERATION IS FINISHED
  10239	034014	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  10240	034022	001003 				BNE	60$		;;; YES -- DO SPECIAL CTY CHECK
  10241	034024				50$:
  10242	034024					CALL	STTYDN		;;; NO -- START NEXT OUTPUT PACKET
	034024	004737 	034052'			JSR	PC,STTYDN
  10243	034030	000757 				BR	30$		;;; SEE ABOUT OTHER LINES IN THIS DH-11
  10244						;
  10245					;
  10246					; HERE FOR SPECIAL CTY CHECKS AND PROCESSING
  10247					;
  10248	034032				60$:
  10249	034032	005737 	002632'			TST	.TTP11		;;; IS THIS PDP11 OUTPUT?
  10250	034036	001772 				BEQ	50$		;;; NO -- THEN HANDLE AS NORMAL CASE
  10251	034040	010446 				MOV	R4,-(SP)	;;; SAVE R4
  10252	034042					CALL	OUTPT3		;;; FINISH OUTPUT PROCESSING
	034042	004737 	034540'			JSR	PC,OUTPT3
  10253	034046	012604 				MOV	(SP)+,R4	;;; RESTORE R4
  10254	034050	000747 				BR	30$		;;; GO AGAIN
  10255						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 189
TTY DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)

  10257						.SBTTL	TTY DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)
  10258
  10259					;+
  10260					;	STTYDN -- REMOVE ENTRY FOR LAST OPERATION
  10261					;
  10262					;	IF THIS IS A SENDALL WHICH HAS FINSHED, DECREMENT THE COUNT FOR
  10263					;	THE NODE IN THE SENDALL RING. IF THE COUNT HAS EXHAUSTED, DEALLOCATE
  10264					;	THER CURRENT SENDALL BUFFER. THE SENDALL OFFSET FOR THIS LINE IS MOVED
  10265					;	TO THE NEXT NODE IN THE SENDALL RING.
  10266					;
  10267					;	IF THIS IS A NORMAL I/O TERMINATION,, ALTER THE BUFFER ADDRESS AND BYTE
  10268					;	COUNT IN THE CURRENT NODE SO THAT THE XON CODE CAN DO A NORMAL LINE
  10269					;	START. THE PACKET WILL BE ACK'ED AND DEALLOCATED AFTER THE LINE HAS
  10270					;	BEEN X'D ON.
  10271					;
  10272					;	IF THE PACKET IS FINISHED, THE CURRENT NODE IS REMOVED FROM THE
  10273					;	THREAD LIST, DEALLOCATED AND AN ATTEMPT MADE TO START THE NEXT ENTRY
  10274					;	IN THE THREAD LIST. IF THE LIST IS EMPTY, THIS LINE WILL BE ACK'ED.
  10275					;-
  10276
  10277	034052				STTYDN:
  10278	034052	032765 	001000 	000006 		BIT	#TT.SIP,STSW1(R5) ;;; IS THIS A SENDALL IN PROGRESS??
  10279	034060	001432 				BEQ	20$		;;; NO -- DON'T MAKE SENDALL RETURN CHECKS
  10280	034062	042765 	001000 	000006 		BIC	#TT.SIP,STSW1(R5) ;;; YES -- CLEAR SENDALL IN PROGRESS
  10281	034070	016502 	000006 			MOV	STSW1(R5),R2	;;; FIND THE POSITION IN THE SEND ALL TABLE
  10282	034074	062765 	040000 	000006 		ADD	#TT.SNI,STSW1(R5) ;;; MOVE TO NEXT SENDALL RING WORD
  10283	034102	006102 				ROL	R2		;;; FIND THE POSITION IN THE TABLE
  10284	034104	006102 				ROL	R2		;;; OF THE CURRENT SENDALL
  10285	034106	006102 				ROL	R2		;;; JUST FINISHED
  10286	034110	042702 	177774 			BIC	#177774,R2	;;; MASK OFF JUNK
  10287	034114	006302 				ASL	R2		;;; MAKE A WORD INDEX
  10288	034116	005362 	002616'			DEC	.SNDCN(R2)	;;; DECREMENT THE CURRENT INUSE COUNT
  10289	034122	003033 				BGT	STNXT		;;; THIS SENDALL QUEUE NOT FINISHED -- DON'T RELEASE IT
  10290	034124	001403 				BEQ	10$		;;; FINISHED -- DEQUEUE AND DEALLOCATE
  10291	034126					.CRASH	SAI		;;; CRASH IF IT WENT NEGATIVE
	034126	000004 				IOT
	034130	   123 	   101 	   111 		.ASCIZ	/SAI/
	034133	   000
  10292						;
  10293	034134				10$:
  10294	034134	016200 	002606'			MOV	.SNDBF(R2),R0	;;; PICK UP THE ENTRY
  10295	034140	005062 	002606'			CLR	.SNDBF(R2)	;;; CLEAR OUT THIS ENTRY (MARK END OF RING)
  10296	034144	000420 				BR	30$		;;; AND CONTINUE
  10297						;
  10298	034146				20$:				;;; HERE TO REMOVE THREAD ENTRY (NOT SENDALL)
  10299	034146	011500 				MOV	(R5),R0		;;; PICK UP THE THREAD POINTER
  10300	034150	001420 				BEQ	STNXT		;;; GO ON IF EMPTY
  10301									;;; [TCO 4.2096] REMOVED 2 INSTRUCTIONS
  10302	034152	016401 	000006 			MOV	6(R4),R1	;;; PICK UP CURRENT DH-11 ADDRESS
  10303	034156	116002 	000006 			MOVB	T.HCBC(R0),R2	;;; GET ORIGINAL BYTE COUNT
  10304	034162	016046 	000004 			MOV	T.HCAD(R0),-(SP) ;;; ORIGINAL ADDRESS TO STACK
  10305	034166	010160 	000004 			MOV	R1,T.HCAD(R0)	;;; CURRENT ADDRESS TO PACKET
  10306	034172	162601 				SUB	(SP)+,R1	;;; COMPUTE OFFSET INTO PACKET
  10307	034174	160102 				SUB	R1,R2		;;; DISCOUNT FROM PACKET SIZE
  10308	034176	110260 	000006 			MOVB	R2,T.HCBC(R0)	;;; AND SET NEW PACKET SIZE
  10309	034202	003003 				BGT	STNXT		;;; [TCO 4.2096] DON'T DEQUEUE IF NOT FINISHED
  10310	034204	011015 				MOV	@R0,(R5)	;;; DELINK THIS THREAD NODE
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 189-1
TTY DRIVER -- STTYDN (REMOVE PROCESSED OUTPUT NODE)

  10311	034206				30$:
  10312	034206					CALL	..DECN		;;; DEALLOCATE THE NODE
	034206	004737 	043162'			JSR	PC,..DECN
  10313									;;; AND START THE NEXT PACKET
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 190
TTY DRIVER -- STNXT (START NEXT OUTPUT OPERATION)

  10315						.SBTTL	TTY DRIVER -- STNXT (START NEXT OUTPUT OPERATION)
  10316
  10317					;+
  10318					;	STNXT -- START NEXT OUTPUT OPERATION
  10319					;
  10320					;	R0 -- POINTS TO THREAD NODE TO BE STARTED
  10321					;	R4 -- POINTS TO I/O PAGE ADDR THIS DEVICE
  10322					;	R5 -- POINTS TO DLS TABLE THIS DEVICE
  10323					;
  10324					;	BEFORE ATTEMPTING TO START THE NEXT NODE IN THE THREAD LIST, SEE IF A
  10325					;	SENDALL IS PENDING FOR THIS LINE, (".SNDLP" .NE. "TT.SND"). IF SO, START
  10326					;	THE SENDALL. IF SENDALLS ARE SUPPRESSED FOR THIS LINE, IGNORE IT.
  10327					;
  10328					;	IF NO SENDALL IS PENDING FOR THIS LINE, ATTEMPT TO START THE THE NEXT
  10329					;	NODE IN THE THREAD LIST. IF ANOTHER ENTRY EXISTS, START IT; IF NOT, SEND
  10330					;	AN ACK. IF THE LINE HAS BEEN X'D OFF, DO NOTHING.
  10331					;
  10332					;	NOTE: SENDALLS ARE FORCED OUT OVER THE XOFF -- THEY ARE NOT TO BE STOPPED.
  10333					;-
  10334
  10335	034212				STNXT:
  10336	034212	016502 	000006 			MOV	STSW1(R5),R2	;;; FIND THE STATUS WORD TO LOOK AT
  10337	034216	006102 				ROL	R2		;;; GET THE RING INDEX OUT OF STATUS WORD
  10338	034220	006102 				ROL	R2
  10339	034222	006102 				ROL	R2
  10340	034224	042702 	177774 			BIC	#^C3,R2		;;; R2 NOW HAS OFFSET INTO SENDALL RING
  10341	034230	020237 	002604'			CMP	R2,.SNDLP	;;; ANY SENDALLS PENDING THIS LINE??
  10342	034234	001414 				BEQ	10$		;;; NO -- CONTINUE NORMAL I/O
  10343	034236	032765 	000400 	000006 		BIT	#TT.NSA,STSW1(R5) ;;; [TCO 4.2246] YES -- ARE WE SUPPRESSING SENDALL'S??
  10344	034244	001010 				BNE	10$		;;; [TCO 4.2246] YES -- IGNORE IT
  10345	034246	006302 				ASL	R2		;;; NO -- MAKE R2 A WORD INDEX INTO RING
  10346	034250	016200 	002606'			MOV	.SNDBF(R2),R0	;;; GET THE NEXT SENDALL NODE INTO R0
  10347	034254	001404 				BEQ	10$		;;; CONTINUE NORMAL I/O IF EMPTY
  10348	034256	052765 	001000 	000006 		BIS	#TT.SIP,STSW1(R5) ;;; SET SENDALL IN PROGRESS
  10349	034264	000405 				BR	.DHSTO		;;; AND START IT UP
  10350						;
  10351	034266				10$:
  10352	034266	011500 				MOV	(R5),R0		;;; [TCO 4.2096] START THE XFER ON THIS STRING
  10353	034270	001477 				BEQ	TTACK		;;; [TCO 4.2096] SEND AN ACK IF END
  10354	034272	105765 	000006 			TSTB	STSW1+0(R5)	;;; [TCO 4.2096] IS THIS LINE X'D OFF??
  10355	034276	100473 				BMI	TTOUTR		;;; [TCO 4.2096] YES -- GO AWAY
  10356					;	BR	.DHSTO		;;; NO -- GO ON
  10357						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 191
TTY DRIVER -- .DHSTO (START DH-11 OUTPUT)

  10359						.SBTTL	TTY DRIVER -- .DHSTO (START DH-11 OUTPUT)
  10360
  10361					;+
  10362					; .DHSTO -- START DH-11 OUTPUT
  10363					;
  10364					; THIS SUBROUTINE WILL START OUTPUT ON A DH-11 LINE
  10365					;
  10366					; INPUTS:
  10367					;
  10368					;	R0 -- POINTS TO THE I/O PACKET
  10369					;	R4 -- EXTERNAL PAGE POINTER FOR THIS LINE
  10370					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  10371					;
  10372					; OUTPUTS:
  10373					;
  10374					;	R2 IS CLOBBERED
  10375					;-
  10376
  10377	034300				.DHSTO::
  10378	034300	016064 	000004 	000006 		MOV	T.HCAD(R0),6(R4) ;;; SET UP THE DH-11 ADDRESS REGISTER
  10379	034306	016064 	000006 	000010 		MOV	T.HCBC(R0),10(R4) ;;; SET UP THE BYTE COUNT
  10380	034314	005464 	000010 			NEG	10(R4)		;;; MAKE THE BYTE COUNT NEGATIVE
  10381	034320	011402 				MOV	@R4,R2		;;; FIND THE UNIT NUMBER TO START THE DH-11
  10382	034322	042702 	177760 			BIC	#177760,R2	;;; MASK OFF HIGH ORDER JUNK
  10383	034326	006302 				ASL	R2		;;; MAKE AN INDEX INTO BIT TABLE
  10384	034330	056264 	041540'	000012 		BIS	BITTBL(R2),12(R4) ;;; START THE DH-11
  10385	034336	000450 				BR	TTOUTX		;;; MARK OUTPUT BUSY AND EXIT
  10386						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 192
TTY DRIVER -- $TTOUT (DL11 OUTPUT INTERRUPT)

  10388						.SBTTL	TTY DRIVER -- $TTOUT (DL11 OUTPUT INTERRUPT)
  10389					;+
  10390					; **-$TTOUT-DL11 TERMINAL OUTPUT INTERRUPTS
  10391					;-
  10392
  10393	034340				$TTOUT::			;;; REF LABEL
  10394	034340	013737 	177776 	002650'		MOV	@#PS,DLTMP	;;; SAVE CONTROLLER NUMBER
  10395	034346					CALL	R3,TTSAV	;;; SAVE R3 AND SETUP R3, R4, AND R5
	034346	004337 	037156'			JSR	R3,TTSAV
  10396	034352	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; OUTPUT INTERRUPT EXPECTED??
  10397	034360	001443 				BEQ	TTACK		;;; NO -- SO ACK THE LINE
  10398	034362	042765 	000001 	000006 		BIC	#TT.OUT,STSW1(R5) ;;; YES -- MARK OUTPUT DONE
  10399	034370	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CONSOLE??
  10400	034376	001403 				BEQ	STTYO		;;; NO -- SEND THE LINE
  10401	034400	005737 	002632'			TST	.TTP11		;;; YES -- IS THIS PDP11 INPUT??
  10402	034404	001055 				BNE	OUTPT3		;;; YES -- SPECIAL CASE
  10403	034406				STTYO:
  10404	034406	011500 				MOV	(R5),R0		;;; [TCO 4.2096] NO -- PICK UP THIS LINE IN USE
  10405	034410	001427 				BEQ	TTACK		;;; [TCO 4.2096] ACK THE LINE IF END OF THREAD LIST
  10406	034412	105765 	000006 			TSTB	STSW1+0(R5)	;;; [TCO 4.2096] IS THIS LINE X'D OFF??
  10407	034416	100423 				BMI	TTOUTR		;;; [TCO 4.2096] YES -- JUST GO AWAY
  10408	034420	005360 	000006 			DEC	T.HCBC(R0)	;;; DECREMENT THE BYTE COUNT
  10409	034424	001005 				BNE	.DLSTO		;;; FINISHED?
  10410	034426	011015 				MOV	@R0,(R5)	;;; SAVE NEXT THREAD POINTER
  10411	034430					CALL	..DECN		;;; DEALLOCATE THE BUFFER
	034430	004737 	043162'			JSR	PC,..DECN
  10412	034434	011500 				MOV	(R5),R0		;;; SET THE NEW THREAD POINTER
  10413	034436	001414 				BEQ	TTACK		;;; GO ACK THE LINE
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 193
TTY DRIVER -- .DLSTO (START DL-11 OUTPUT)

  10415						.SBTTL	TTY DRIVER -- .DLSTO (START DL-11 OUTPUT)
  10416
  10417					;+
  10418					; .DLSTO -- START DL-11 OUTPUT
  10419					;
  10420					; THIS SUBROUTINE WILL START OUTPUT ON A DL-11 LINE
  10421					;
  10422					; INPUTS:
  10423					;
  10424					;	R0 -- POINTS TO THE I/O PACKET
  10425					;	R4 -- EXTERNAL PAGE ADDRESS OF THIS DEVICE
  10426					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  10427					;
  10428					; OUTPUTS:
  10429					;
  10430					;	NO REGISTERS ARE ALTERED
  10431					;-
  10432
  10433	034440				.DLSTO::
  10434	034440	117064 	000004 	000006 		MOVB	@T.HCAD(R0),6(R4) ;;; START THE NEXT CHARACTER
  10435	034446	005260 	000004 			INC	T.HCAD(R0)	;;; UPDATE THE CHARACTER POINTER
  10436	034452	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; INSURE INTERRUPT ENABLED
  10437	034460				TTOUTX:
  10438	034460	052765 	000001 	000006 		BIS	#TT.OUT,STSW1(R5) ;;; MARK OUTPUT BUSY
  10439	034466				TTOUTR:
  10440	034466					RETURN			;;; RETURN TO CALLER
	034466	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 194
TTY DRIVER -- TTACK (ACKNOWLEDGE A TTY LINE)

  10442						.SBTTL	TTY DRIVER -- TTACK (ACKNOWLEDGE A TTY LINE)
  10443
  10444	034470				TTACK::				;;; +++006 REMOVED ONE INSTRUCTION
  10445	034470	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IF THIS IS A CTY
  10446	034476	001411 				BEQ	15$		;;; +++005 GO ON IF NOT
  10447	034500	005737 	002632'			TST	.TTP11		;;; IT IS TALKING
  10448	034504	001014 				BNE	20$		;;;  TO THE -11, THEN IGNORE.
  10449	034506				10$:
  10450	034506	105737 	001224'			TSTB	.KLNSW+0	;;; +++005 IS KLINIK ACTIVE??
  10451	034512	001403 				BEQ	15$		;;; +++005 NO -- GO ON
  10452	034514	020537 	002636'			CMP	R5,KLNPTR	;;; +++005 YES -- IS THIS THE KLINIK LINE??
  10453	034520	001406 				BEQ	20$		;;; +++005 YES -- DON'T ACK IT!
  10454	034522				15$:
  10455	034522	010346 				MOV	R3,-(SP)	;;; NO -- SAVE R3
  10456	034524	012703 	000004 			MOV	#D.CDLS,R3	;;; SET DATA LINE SCANNER
  10457	034530					CALL	..SACK		;;; ACKNOWLEDGE
	034530	004737 	044156'			JSR	PC,..SACK
  10458	034534	012603 				MOV	(SP)+,R3	;;; RESTORE R3
  10459	034536				20$:
  10460	034536					RETURN			;;; RETURN TO CALLER
	034536	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 195
TTY DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)

  10462						.SBTTL	TTY DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)
  10463
  10464	034540				OUTPT3:				;;; +++005 HERE TO SYNCH CTY OUTPUT
  10465									;;; +++006 REMOVED ONE INSTRUCTION
  10466	034540	105737 	001224'			TSTB	.KLNSW+0	;;; +++005 KLINIK REMOTE CONSOLE ACTIVE?
  10467	034544	003425 				BLE	OUTPT		;;; +++005 NO -- CONTINUE
  10468	034546	010546 				MOV	R5,-(SP)	;;; +++005 SAVE CURRENT POINTER
  10469	034550	022705 	003046'			CMP	#DHTBL,R5	;;; +++005 IS CTY A DH11 LINE??
  10470	034554	101410 				BLOS	10$		;;; +++005 YES -- GO ON
  10471	034556	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; +++005 NO -- IS THIS LINE FINISHED??
  10472	034564	001012 				BNE	30$		;;; +++005 NO -- EXIT
  10473	034566	013705 	002634'			MOV	CTYPTR,R5	;;; +++005 YES -- POINT TO THE CTY
  10474	034572	020516 				CMP	R5,(SP)		;;; +++005 HAVE WE ALREADY CHECKED IT??
  10475	034574	001002 				BNE	20$		;;; +++005 NO -- GO ON
  10476	034576				10$:
  10477	034576	013705 	002636'			MOV	KLNPTR,R5	;;; +++005 YES -- POINT TO THE KLINIK LINE
  10478	034602				20$:
  10479	034602	032765 	000001 	000006 		BIT	#TT.OUT,STSW1(R5) ;;; +++005 IS IT FINISHED??
  10480	034610	001402 				BEQ	90$		;;; +++005 YES -- TYPE IF FINISHED
  10481	034612				30$:
  10482	034612	012605 				MOV	(SP)+,R5	;;; +++005 NO -- RESTORE POINTER
  10483	034614					RETURN			;;; +++005 RETURN TO CALLER
	034614	000207 				RTS	PC
  10484	034616				90$:
  10485	034616	005726 				TST	(SP)+		;;; +++005 CLEAR STACK
  10486					;
  10487					; OUTPUT NEXT BYTE
  10488					;
  10489						.ENABL	LSB
  10490	034620				OUTPT:
  10491	034620	013705 	002634'			MOV	CTYPTR,R5	;;; +++005 POINT TO THE CTY
  10492	034624	012703 	002662'			MOV	#CTYSTS,R3	;;;GET CTY BLOCK POINTER
  10493	034630	032713 	000017 			BIT	#FLCT,@R3	;;;SHOULD A FILL BE ECHOED?
  10494	034634	001107 				BNE	60$		;;;IF NE YES
  10495	034636	032713 	074000 			BIT	#LFCT,@R3	;;;ANY UNPROCESSED LINE FEEDS?
  10496	034642	001070 				BNE	40$		;;;IF NE YES
  10497	034644	105763 	000010 			TSTB	MECNT(R3)	;;;MULTIECHO SEQUENCE IN PROGRESS?
  10498	034650	001072 				BNE	50$		;;;IF NE YES
  10499	034652	005713 				TST	@R3		;;;INPUT OR OUTPUT IN PROGRESS?
  10500	034654	100055 				BPL	INPPT		;;;IF PL INPUT
  10501					;
  10502					; OUTPUT REQUEST IN PROGRESS
  10503					;
  10504	034656	005737 	002724'			TST	BYCNT		;;;ANY MORE BYTES TO OUTPUT?
  10505	034662	100416 				BMI	20$		;;;IF MI NO
  10506	034664	005337 	002724'			DEC	BYCNT		;;;DECREMENT BYTE COUNT
  10507	034670	100405 				BMI	10$		;;;IF MI CHECK CARRIAGE CONTROL
  10508	034672	117746 	146030 			MOVB	@CRADR,-(SP)	;;;STORE CHARACTER ON STACK
  10509									;;;!!!NOTE: THIS SHOULD BE VXFR AND BLXI!!!!!
  10510	034676	005237 	002726'			INC	CRADR		;;;UPDATE POINTER TO NEXT CHARACTER
  10511	034702	000467 				BR	ECHOB		;;;ECHO NEXT BYTE
  10512						;
  10513	034704				10$:
  10514	034704	112746 	000015 			MOVB	#C.HCRT,-(SP)	;;;ASSUME TRAILING CARRIAGE RETURN REQUIRED
  10515	034710	032713 	002000 			BIT	#CRTY,@R3	;;;OUTPUT TRAILING CARRIAGE RETURN?
  10516	034714	001062 				BNE	ECHOB		;;;IF NE YES
  10517	034716	005726 				TST	(SP)+		;;;CLEAN STACK
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 195-1
TTY DRIVER -- OUTPT3 (PDP-11 CTY OUTPUT ROUTINES)

  10518	034720				20$:
  10519	034720	012737 	000001 	002726'		MOV	#IS.SUC&377,CRADR ;;;SET SUCCESSFUL COMPLETION STATUS
  10520	034726				TTYDNE:
  10521	034726	052737 	000020 	006546'		BIS	#EF.IOD,TTYTSK+A.EF ;;;SET EVENT FLAG INDICATING I/O DONE
  10522	034734					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	034734	004737 	042444'			JSR	PC,..DSEV
  10523	034740	105737 	001224'			TSTB	.KLNSW+0	;;; +++005 IS KLINIK ACTIVE??
  10524	034744	003412 				BLE	TTYDNX		;;; +++005 NO -- GO ON
  10525	034746	010546 				MOV	R5,-(SP)	;;; +++005 YES -- SAVE R5
  10526	034750	010446 				MOV	R4,-(SP)	;;; +++005 AND R4
  10527	034752	013705 	002636'			MOV	KLNPTR,R5	;;; +++005 POINT TO THE KLINIK LINE
  10528	034756	016504 	000002 			MOV	TTYEXP(R5),R4	;;; +++005 I/O PAGE POINTER TO R5
  10529	034762					CALL	STTYO		;;; +++005 START OR DEALLOCATE
	034762	004737 	034406'			JSR	PC,STTYO
  10530	034766	012604 				MOV	(SP)+,R4	;;; +++005 RESTORE REGISTERS
  10531	034770	012605 				MOV	(SP)+,R5	;;; +++005 SO
  10532	034772				TTYDNX:				;;; +++005
  10533	034772	022705 	003046'			CMP	#DHTBL,R5	;;;CALLED FROM DH?
  10534	034776	101002 				BHI	30$		;;; NO --TRY THE ONE ON DL11
  10535									;;; +003 REMOVED ONE INSTRUCTION
  10536	035000	000137 	034052'			JMP	STTYDN		;;;GO DO ACK AND CLEAR BUSY
  10537						;
  10538	035004				30$:
  10539	035004	000137 	034406'			JMP	STTYO		;;; SEE WHAT'S NEXT FOR DL11
  10540						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 196
TTY DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)

  10542						.SBTTL	TTY DRIVER -- INPTT (PDP-11 CTY INPUT ROUTINES)
  10543
  10544					;
  10545					; INPUT REQUEST IN PROGRESS
  10546					;
  10547	035010				INPPT:
  10548	035010	032713 	000400 			BIT	#EOLS,@R3	;;;END OF LINE SEEN?
  10549	035014	001402 				BEQ	INPT0
  10550	035016	000137 	035406'			JMP	INPT1
  10551						;
  10552	035022				INPT0:
  10553	035022					RETURN			;;;
	035022	000207 				RTS	PC
  10554					;
  10555					; ECHO LINE FEED
  10556					;
  10557	035024				40$:
  10558	035024	162713 	004000 			SUB	#LFBT,@R3	;;;REDUCE LINE FEED COUNT
  10559	035030	112746 	000012 			MOVB	#C.HLFD,-(SP)	;;;SET TO ECHO LINE FEED
  10560	035034	000412 				BR	ECHOB		;;;ECHO BYTE
  10561						;
  10562					;
  10563					; MULTI-ECHO SEQUENCE
  10564					;
  10565	035036				50$:
  10566	035036	117346 	000012 			MOVB	@MEBUF(R3),-(SP) ;;;SET NEXT BYTE TO ECHO
  10567	035042	005263 	000012 			INC	MEBUF(R3)	;;;INCREMENT BUFFER ADDRESS
  10568	035046	105363 	000010 			DECB	MECNT(R3)	;;;DECREMENT MULTIECHO BYTE COUNT
  10569	035052	000403 				BR	ECHOB		;;;ECHO BYTE
  10570						;
  10571					;
  10572					; ECHO FILL BYTE
  10573					;
  10574	035054				60$:
  10575	035054	005313 				DEC	@R3		;;;DECREMENT FILL COUNT
  10576	035056	116346 	000011 			MOVB	FLBYT(R3),-(SP)	;;;SET TO ECHO FILL BYTE
  10577						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 197
TTY DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)

  10579						.SBTTL	TTY DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)
  10580
  10581					;
  10582					; ECHO NEXT BYTE
  10583					;
  10584
  10585	035062				ECHOB:
  10586	035062	042716 	177600 			BIC	#177600,@SP	;;;MASK OFF PARITY
  10587	035066	121627 	000037 			CMPB	@SP,#37		;;;IS THIS A CONTROL BYTE?
  10588	035072	101054 				BHI	70$		;;;IF HI NO
  10589	035074	122716 	000015 			CMPB	#C.HCRT,@SP	;;;CARRIAGE RETURN?
  10590	035100	001427 				BEQ	10$		;;;IF EQ YES
  10591	035102	122716 	000014 			CMPB	#C.HFFD,@SP	;;;FORM FEED?
  10592	035106	001432 				BEQ	30$		;;;IF EQ YES
  10593	035110	122716 	000013 			CMPB	#C.HVTB,@SP	;;;VERTICAL TAB?
  10594	035114	001431 				BEQ	40$		;;;IF EQ YES
  10595	035116	122716 	000012 			CMPB	#C.HLFD,@SP	;;;LINE FEED?
  10596	035122	001432 				BEQ	50$		;;;IF EQ YES
  10597	035124	122716 	000011 			CMPB	#C.HTAB,@SP	;;;HORIZONTAL TAB?
  10598	035130	001041 				BNE	80$		;;;IF NE NO
  10599					;
  10600					; HORIZONTAL TAB
  10601					;
  10602	035132	116316 	000016 			MOVB	HORPS(R3),@SP	;;;GET CURRENT HORIZONTAL POSITION
  10603	035136	052716 	177770 			BIS	#177770,@SP	;;;CALCULATE BLANK COUNT TO NEXT TAB STOP
  10604	035142	005416 				NEG	@SP		;;;
  10605	035144	051613 				BIS	@SP,@R3		;;;MERGE BLANK COUNT
  10606	035146	112763 	000040 	000011 		MOVB	#' ,FLBYT(R3)	;;;SET FILL TO A BLANK
  10607	035154				5$:
  10608	035154	005726 				TST	(SP)+		;;;REMOVE BYTE FROM STACK
  10609	035156	000620 				BR	OUTPT		;;;START OUTPUT
  10610						;
  10611					;
  10612					; CARRIAGE RETURN
  10613					;
  10614	035160				10$:
  10615	035160				20$:
  10616	035160	052713 	001000 			BIS	#CRJT,@R3	;;;SET CARRIAGE RETURN JUST TYPED
  10617	035164	005213 				INC	@R3		;;;ALWAYS ONE FILL BYTE
  10618	035166	105063 	000016 			CLRB	HORPS(R3)	;;;CLEAR HORIZONTAL POSITION
  10619	035172	000411 				BR	60$		;;;OUTPUT CARRIAGE RETURN
  10620						;
  10621					;
  10622					; FORM FEED
  10623					;
  10624	035174				30$:
  10625	035174	062713 	020000 			ADD	#LFBT*4,@R3	;;;ADD IN FOUR LINE FEEDS
  10626					;
  10627					; VERTICAL TAB
  10628					;
  10629	035200				40$:
  10630	035200	062713 	014000 			ADD	#LFBT*3,@R3	;;;ADD IN THREE LINE FEEDS
  10631	035204	112716 	000012 			MOVB	#C.HLFD,@SP	;;;CHANGE BYTE TO LINE FEED
  10632					;
  10633					; LINE FEED
  10634					;
  10635	035210				50$:
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 197-1
TTY DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)

  10636	035210	042713 	001000 			BIC	#CRJT,@R3	;;;CLEAR CARRIAGE RETURN JUST TYPED
  10637	035214	000407 				BR	80$
  10638						;
  10639	035216				60$:
  10640	035216	105063 	000011 			CLRB	FLBYT(R3)	;;;SET NULL FILL BYTE
  10641	035222	000404 				BR	80$		;;;
  10642						;
  10643					;
  10644					; BYTE REQUIRES HORIZONTAL POSITION
  10645					;
  10646	035224				70$:
  10647	035224	042713 	001000 			BIC	#CRJT,@R3	;;;CLEAR CARRIAGE RETURN JUST TYPED
  10648	035230	105263 	000016 			INCB	HORPS(R3)	;;;INCREMENT HORIZONTAL POSITION
  10649	035234				80$:
  10650	035234	005713 				TST	@R3		;;;INPUT MODE?
  10651	035236	100003 				BPL	81$		;;;IF PL YES
  10652	035240	032713 	000040 			BIT	#CTLO,@R3	;;;OUTPUT DISABLED?
  10653	035244	001343 				BNE	5$		;;;IF NE YES
  10654	035246				81$:
  10655	035246	105737 	001224'			TSTB	.KLNSW+0	;;; +++005 KLINIK REMOTE MODE ACTIVE?
  10656	035252	003420 				BLE	82$		;;; +++005 NO -- BETTER LEAVE IT ALONE
  10657	035254	010546 				MOV	R5,-(SP)	;;; +++005 SAVE DLS POINTER
  10658	035256	013705 	002636'			MOV	KLNPTR,R5	;;; +++005 GET KLINIK DLS POINTER
  10659	035262	016503 	000002 			MOV	TTYEXP(R5),R3	;;; +++005 POINT TO CSR
  10660	035266	001411 				BEQ	84$		;;;  +++005 IGNORE IF NOT THERE
  10661	035270	116663 	000002 	000006 		MOVB	2(SP),6(R3)	;;; +++005 START KLINIK LINE
  10662	035276	052763 	000100 	000004 		BIS	#DL.XEN,4(R3)	;;; +++005 ENABLE XMTR INTERRUPTS
  10663	035304	052765 	000001 	000006 		BIS	#TT.OUT,STSW1(R5) ;;; +++005 SET TTY BUSY
  10664	035312				84$:
  10665	035312	012605 				MOV	(SP)+,R5	;;; +++005 RESTORE CTY POINTER
  10666	035314				82$:
  10667	035314	016503 	000002 			MOV	TTYEXP(R5),R3	;;;GET ADDRESS OF CONTROL STATUS REGISTER
  10668	035320	022705 	003046'			CMP	#DHTBL,R5	;;;IS THIS A DL ?
  10669	035324	101021 				BHI	90$		;;;YES -- SPECIAL CASE
  10670	035326	112637 	002702'			MOVB	(SP)+,DHBUF+CTYSTS ;;;PUT BYTE IN OUTPUT BUFFER
  10671	035332	042713 	001077 			BIC	#1077,@R3	;;;CLEAR CURRENT UNIT
  10672	035336	153713 	002640'			BISB	$UNIT,@R3	;;;SELECT DESIRED UNIT
  10673	035342	042723 	000060 			BIC	#60,(R3)+	;;;
  10674	035346	062703 	000004 			ADD	#4,R3		;;;POINT TO CURRENT ADDRESS REGISTER
  10675	035352	012723 	002702'			MOV	#DHBUF+CTYSTS,(R3)+
  10676	035356	012723 	177777 			MOV	#-1,(R3)+	;;;SET BYTE COUNT TO MINUS ONE
  10677									;;; +++006 REMOVED ONE INSTRUCTION
  10678	035362	053713 	002642'			BIS	$BTMSK,@R3 	;;;START OUTPUT
  10679	035366	000405 				BR	99$		;;; +++005 MARK OUTPUT BUSY AND EXIT
  10680						;
  10681	035370				90$:
  10682	035370	112663 	000006 			MOVB	(SP)+,6(R3)	;;;OUTPUT BYTE
  10683	035374	052763 	000100 	000004 		BIS	#DL.XEN,4(R3)	;;;ENABLE OUTPUT INTERRUPT
  10684	035402				99$:
  10685	035402	000137 	034460'			JMP	TTOUTX		;;; +++005 MARK OUTPUT BUSY AND EXIT
  10686						;
  10687					;
  10688					; END OF INPUT LINE
  10689					;
  10690	035406				INPT1:
  10691	035406	012703 	002664'			MOV	#CTYSTS+2,R3	;;;FIND THE TERMINAL STATUS WORD
  10692	035412	117337 	000000 	002726'		MOVB	@(R3),CRADR	;;;FIND THE LAST CHARACTER
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 197-2
TTY DRIVER -- ECHOB (PDP-11 CTY ECHO ROUTINES)

  10693	035420	016346 	000004 			MOV	4(R3),-(SP)
  10694	035424	162316 				SUB	(R3)+,@SP	;;;FIND THE BYTE COUNT
  10695	035426	112713 	000001 			MOVB	#IS.SUC&377,@R3 ;;;ASSUME NORMAL TERMINATION
  10696	035432	012300 				MOV	(R3)+,R0	;;;GET FINAL BYTE AND STATUS
  10697	035434	100006 				BPL	40$		;;;IF PL NORMAL TERMINATION
  10698	035436	012700 	015366 			MOV	#32*400+366,R0	;;;ASSUME ^Z
  10699	035442	105243 				INCB	-(R3)		;;;CONTROL Z?
  10700	035444	001402 				BEQ	40$		;;;IF EQ YES
  10701	035446	012700 	000361 			MOV	#IE.ABO&377,R0	;;;SET ABORT STATUS
  10702	035452				40$:
  10703	035452	013701 	002730'			MOV	TTPKT,R1	;;;FIND THE PACKET ADDRESS
  10704	035456	010037 	002726'			MOV	R0,CRADR	;;;SAVE THE STARTS FIRST WORD
  10705	035462	012661 	000026 			MOV	(SP)+,R.PB+2(R1) ;;;STORE THE BYTE COUNT
  10706	035466				50$:
  10707	035466	000137 	034726'			JMP	TTYDNE
  10708						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 198
TTY DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)

  10710						.SBTTL	TTY DRIVER -- .KW11S (KW11 LINE CLOCK INTERRUPT)
  10711
  10712					;+
  10713					; **-KW11L LINE CLOCK INTERRUPT SERVICE HANDLER
  10714					;
  10715					;	THIS ROUTINE UPDATES THE COUNT OF CLOCK TICK WHICH ARE PENDING
  10716					;	SERVICE (NORMALLY ONLY ONE).  THESE CLOCK TICKS ARE HONORED AT
  10717					;	TASK LEVEL AT "..INTX".  AN ATTEMPT IS MADE TO START UP THE TO-10
  10718					;	QUEUE ON EVERY CLOCK TICK AS WELL.
  10719					;
  10720					; NOTE:
  10721					;
  10722					;	THIS CODE USED TO DUMP THE DH-11 SILOS ON THE CLOCK.  SINCE THE
  10723					;	DH-11 SILO ALARM LEVELS ARE NOW SET TO 0, THIS IS NO LONGER
  10724					;	REQUIRED.
  10725					;-
  10726
  10727	035472				.KW11S::
  10728	035472					CALL	R3,DHSAV	;;; [TCO 4.2095] MUST SAVE REGISTERS
	035472	004337 	037120'			JSR	R3,DHSAV
  10729	035476	105237 	001015'			INCB	.SERFG+1	;;; [TCO 4.2095] BUMP PENDING TICK COUNT
  10730	035502	000420 				BR	DHISTQ		;;; [TCO 4.2095] AND SEE ABOUT STARTING TO-10 QUEUE
  10731						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 199
TTY DRIVER -- $DHINP (DH11 INPUT INTERRUPT)

  10733						.SBTTL	TTY DRIVER -- $DHINP (DH11 INPUT INTERRUPT)
  10734					;+
  10735					; **-$DHINP-DH11 TERMINAL MULTIPLEXER INPUT INTERRUPTS
  10736					;
  10737					; THIS IS THE DH-11 INTERRUPT SERVICE HEAD, ALL DEVICE DEPENDENT INPUT
  10738					; PROCESSING IS DONE IN THIS ROUTINE.  THE SPECIFIC FUNCTIONS PERFORMED
  10739					; HERE ARE:
  10740					;
  10741					;	1. SILO UNLOAD
  10742					;	2. AUTO-BAUD DETECT
  10743					;	3. FRAMING ERROR PROCESSING
  10744					;	4. TO-10 QUEUE ENTRY.
  10745					;	5. TO-10 QUEUE START-UP.
  10746					;
  10747					; THE SILO UNLOAD WILL DUMP THE INTERRUPTING DH-11'S SILO UNTIL:
  10748					;
  10749					;	1. THE SILO IS EMPTIED
  10750					;	2. AN XOFF CHARACTER IS UNLOADED FROM A LINE WHICH IS ENABLED FOR
  10751					;	   LOCAL XOFF PROCESSING.
  10752					;
  10753					; THE LAST POINT IS REQUIRED BECAUSE OF SUSPECTED DH-11 HARDWARE BUG WHICH
  10754					; APPEARS TO CAUSE THE SILO TO "LOCK-UP" AFTER THE TRANSMITTER IS X'D-OFF.
  10755					;
  10756					; WHEN THE SILO UNLOAD IS COMPLETE, AN ATTEMPT IS MADE TO START UP THE TO-10 QUEUE.
  10757					;
  10758					; AUTO-BAUD DETECTION IS PERFORMED FOR LINES WHICH ARE IN AUTO-BAUD WAIT; THAT IS,
  10759					; CONNECTED BUT NO SPEED DETERMINED AS YET.  AUTO-BAUD DETECTION IS KEYED ON
  10760					; <CONTROL-C> AND <CARRIAGE-RETURN> CHARACTERS FOR LINE SPEEDSS OF 110, 150, 300,
  10761					; AND 1200 BAUD.  AUTO-BAUD DETECT CONTINUES UNTIL A PATTERN MATCH IS MADE, OR
  10762					; THE LINE DISCONNECTS. CHARACTERS EXAMINED FOR AUTO-BAUD DETECT ARE NOT
  10763					; CHECKED FOR FRAMING ERRORS OR ENTERED INTO THE TO-10 QUEUE.
  10764					;
  10765					; WHEN THE LINE HAS SUCCESSFULLY AUTO-BAUDED, THE CONNECT MESSAGE IS SENT TO THE
  10766					; KL10, AS OPPOSED TO WHEN CARRIER IS ASSERTED FOR NON-AUTO-BAUD LINES.
  10767					; A REQUEST IS ALSO MADE TO REPORT THE LINE SPEED TO THE KL10.
  10768					;
  10769					; FRAMING ERRORS ARE SENSED AND COUNTED FOR EACH CHARACTER RECEIVED FROM A GIVEN
  10770					; LINE.  THE FRAMING ERROR COUNT IS CLEARED UPON RECEIPT OF A CHARACTER WITHOUT
  10771					; AN ASSOCIATED FRAMING ERROR.  WHEN FOUR (4) CONSECUTIVE FRAMING ERRORS HAVE
  10772					; BEEN TALLIED FOR A LINE, ITS INPUT SPEED IS SET TO ZERO BAUD, AND FLAGGED TO
  10773					; HAVE ITS INPUT SPEED REENABLED BY THE TERMINAL POLLING SERVICE (".DHTMO", Q.V.)
  10774					;
  10775					; THE FOUR ERROR CHARACTERS ARE PASSED TO THE KL10, ALL SUBSEQUENT ERROR CHARACTERS
  10776					; ARE IGNORED.
  10777					;
  10778					; NORMAL CHARACTERS ARE SIMPLY ENTERED INTO THE TO-10 QUEUE.
  10779					;-
  10780
  10781						.ENABL	LSB
  10782
  10783	035504				$DHINP::			;;; REFERENCE LABEL
  10784	035504	013737 	177776 	002646'		MOV	@#PS,DHTMP	;;; SAVE THE CONTROLLER NUMBER
  10785	035512					CALL	R3,DHSAV	;;; SAVE R3 AND SETUP R4 AND R5
	035512	004337 	037120'			JSR	R3,DHSAV
  10786									;;; [TCO 4.2095] REMOVED ONE INSTRUCTION
  10787	035516				10$:
  10788	035516	010537 	002652'			MOV	R5,DHSTSV	;;; SET UP THE HEAD OF THIS CONTROLLER TABLE ADDRESS
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 199-1
TTY DRIVER -- $DHINP (DH11 INPUT INTERRUPT)

  10789	035522	016504 	000002 			MOV	TTYEXP(R5),R4	;;; SET UP EXTERNAL PAGE ADDRESS FOR CONTROLLER
  10790	035526	001414 				BEQ	30$		;;; GUARD AGAINST SPURIOUS INTERRUPTS
  10791	035530				20$:
  10792	035530	012746 	035530'			MOV	#20$,-(SP)	;;; [TCO 4.2244] SET RETURN ADDRESS
  10793	035534	016446 	000002 			MOV	2(R4),-(SP)	;;; GET NEXT BYTE FROM CONTROLLER SILO
  10794	035540	100410 				BMI	40$		;;; PROCESS CHARACTER FROM LINE IF THERE
  10795	035542	032626 				BIT	(SP)+,(SP)+	;;; REMOVE NULL CHARACTER AND RETURN ADDRESS
  10796	035544				DHISTQ:				;;; [TCO 4.2095] REMOVED 4 INSTRUCTIONS
  10797	035544	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;;; [TCO 4.2095] PRIMARY PROTOCOL RUNNING??
  10798	035552	001402 				BEQ	30$		;;; [TCO 4.2095] NO -- DON'T BOTHER IT
  10799	035554					CALL	..STQ		;;; [TCO 4.2095] YES -- ATTEMPT TO START TO-10 QUEUE
	035554	004737 	044634'			JSR	PC,..STQ
  10800	035560				30$:
  10801	035560					RETURN			;;; DISMISS INTERRUPT
	035560	000207 				RTS	PC
  10802					;
  10803					;	HERE WITH A CHARACTER TO PROCESS
  10804					;
  10805	035562				40$:
  10806	035562	116605 	000001 			MOVB	1(SP),R5	;;; GET THE LINE NUMBER
  10807	035566	042705 	177760 			BIC	#^C17,R5	;;; GET RID OF ERRORS, ETC.
  10808	035572	010503 				MOV	R5,R3		;;; COPY LINE NUMBER TO R3
  10809	035574	006305 				ASL	R5		;;; MAKE A TABLE POINTER TO LINE WTHIN MUX
  10810	035576	006305 				ASL	R5		;;;
  10811	035600	006305 				ASL	R5		;;;
  10812	035602	063705 	002652'			ADD	DHSTSV,R5	;;; FROM BASE OF CONTROLLER TABLE
  10813	035606	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;;; [TCO 4.2309] IS PRIMARY PROTOCOL RUNNING??
  10814	035614	001435 				BEQ	70$		;;; [TCO 4.2309] NO -- JUST CHECK FRAMING ERRORS
  10815	035616	032765 	000010 	000006 		BIT	#TT.ABW,STSW1(R5) ;;; YES -- IS THE LINE IN IN AUTO-BAUD WAIT??
  10816	035624	001431 				BEQ	70$		;;; [TCO 4.2205] NO -- CHECK FOR FRAMING ERROR
  10817					;
  10818					;	HERE WITH A CHARACTER FROM AN AUTO-BAUD LINE
  10819					;
  10820	035626	005002 				CLR	R2		;;; YES -- CLEAR TABLE INDEX
  10821	035630	012701 	000013 			MOV	#CHTBLN,R1	;;; [TCO 4.2103] TABLE LENGTH TO R1
  10822	035634				50$:
  10823	035634	121662 	032510'			CMPB	(SP),CHTBL(R2)	;;; MATCH A BIT PATTERN??
  10824	035640	001403 				BEQ	60$		;;; YES -- DONE
  10825	035642	005202 				INC	R2		;;; NO -- NEXT PATTERN
  10826	035644	077105 				SOB	R1,50$		;;; TRY AGAIN
  10827	035646	000556 				BR	TTINPB		;;; NO MATCH -- FLUSH CHRARACTER AND DISMISS
  10828						;
  10829					;
  10830					;	HERE ON AUTO-BAUD PATTERN MATCH
  10831					;
  10832	035650				60$:				;;; HERE ON BIT PATTERN MATCH
  10833	035650	042765 	000010 	000006 		BIC	#TT.ABW,STSW1(R5) ;;; NO LONGER IN AUTO-BAUD WAIT
  10834	035656	116202 	032524'			MOVB	IDXTB(R2),R2	;;; [TCO 4.2103] FIND INDEX FOR LINE SPEED
  10835	035662	016203 	032540'			MOV	SPDTB(R2),R3	;;; [TCO 4.2103] FIND THE SPEED
  10836	035666					CALL	.DHSPD		;;; SET THE LINE SPEED
	035666	004737 	037702'			JSR	PC,.DHSPD
  10837	035672					CALL	.DHSPF		;;; FLAG THE NEW SPEED
	035672	004737 	037646'			JSR	PC,.DHSPF
  10838	035676	010446 				MOV	R4,-(SP)	;;; SAVE R4
  10839	035700					CALL	.STTYD		;;; RING THE LINE
	035700	004737 	040176'			JSR	PC,.STTYD
  10840	035704	012604 				MOV	(SP)+,R4	;;; RESTORE R4
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 199-2
TTY DRIVER -- $DHINP (DH11 INPUT INTERRUPT)

  10841	035706	000536 				BR	TTINPB		;;; DISMISS THE INTERRUPT
  10842						;
  10843					;
  10844					; HERE TO CHECK FOR A FRAMING ERROR
  10845					;
  10846	035710				70$:				;;; [TCO 4.2205]
  10847	035710	032716 	020000 			BIT	#DH.FER,(SP)	;;; [TCO 4.2205] FRAMING ERROR PRESENT??
  10848	035714	001004 				BNE	80$		;;; [TCO 4.2205] YES -- COUNT IT UP
  10849	035716	042765 	014000 	000006 		BIC	#TT.FEC,STSW1(R5) ;;; [TCO 4.2205] NO -- FLUSH ANY PREVIOUS COUNT
  10850	035724	000452 				BR	TTSTCH		;;; [TCO 4.2205] STORE THE CHARACTER AND RETURN
  10851						;
  10852					;
  10853					; HERE TO COUNT A FRAMING ERROR AND SHUT OFF THE LINE IF REQUIRED
  10854					;
  10855	035726				80$:				;;; [TCO 4.2205]
  10856	035726	032765 	020000 	000006 		BIT	#TT.RSI,STSW1(R5) ;;; [TCO 4.2205] INPUT RESTART ALREADY PENDING??
  10857	035734	001123 				BNE	TTINPB		;;; [TCO 4.2205] YES -- FLUSH CHARACTER AND RETURN
  10858	035736	062765 	004000 	000006 		ADD	#TT.FEI,STSW1(R5) ;;; [TCO 4.2205] NO -- COUNT THIS FRAMING ERROR
  10859									;;; [TCO 4.2205] NOTE: THIS WILL ALSO SET "TT.RSI" ON
  10860									;;; [TCO 4.2205]       FRAMING ERROR COUNT OVERFLOW
  10861	035744	016502 	000006 			MOV	STSW1(R5),R2	;;; [TCO 4.2205] COPY STATUS WORD TO R2
  10862	035750	042702 	163777 			BIC	#^C<TT.FEC>,R2	;;; [TCO 4.2205] MASK AND TEST FRAMING ERROR COUNT
  10863	035754	001036 				BNE	TTSTCH		;;; [TCO 4.2205] STILL OK -- GO ON
  10864	035756	042714 	001077 			BIC	#1077,(R4)	;;; [TCO 4.2205] OVERFLOWED -- CLEAR LINE NUMBER
  10865	035762	050314 				BIS	R3,(R4)		;;; [TCO 4.2205] SET THIS LINE NUMBER
  10866	035764	042764 	001700 	000004 		BIC	#S0.ISP,4(R4)	;;; [TCO 4.2205] SET INPUT SPEED TO ZERO
  10867	035772	012703 	000300 			MOV	#DV.LOG!DV.URE,R3 ;;; [TCO 4.2245] SET STANDARD STATUS
  10868	035776	011637 	002656'			MOV	(SP),.TTELB	;;; [TCO 4.2245] SAVE THE ERROR DATA
  10869	036002					CALL	.TTERL		;;; [TCO 4.2245] LOG THE ERROR
	036002	004737 	041356'			JSR	PC,.TTERL
  10870	036006	000421 				BR	TTSTCH		;;; [TCO 4.2205] STORE THE CHARACTER AND EXIT
  10871						;
  10872
  10873						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 200
TTY DRIVER -- $TTINP (DL11 INPUT INTERRUPT)

  10875						.SBTTL	TTY DRIVER -- $TTINP (DL11 INPUT INTERRUPT)
  10876
  10877					;+
  10878					; **-$TTINP-DL11 TERMINAL INPUT INTERRUPTS
  10879					;
  10880					; THIS IS THE DL-11 INPUT INTERRUPT HEAD, ALL DEVICE DEPENDENT INPUT PROCESSING
  10881					; IS DONE HERE.
  10882					;
  10883					; THE DL-11 INPUT SERVICE IS MUCH SIMPLER THAT THAT OF THE DH-11.  CONTROL WILL
  10884					; BE TRANSFERRED TO THE DL-11/E MODEM INTERRUPT SERVICE, IF REQUIRED.  CHARACTERS
  10885					; WITH FRAMING ERRORS ARE SIMPLY IGNORED, AND AN ATTMEPT IS MADE TO START THE
  10886					; TO-10 QUEUE WHE THE INTERRUPT IS DISMISSED.
  10887					;
  10888					; CHARACTERS FROM DL-11'S ARE ENTERED INTO THE TO-10 QUEUE FOR TRANSMISSION TO
  10889					; THE KL10 IN THE SAME MANNER AS FOR CHARACTERS FROM DH-11'S.
  10890					;-
  10891
  10892						.ENABL	LSB
  10893
  10894	036010				$TTINP::			;;; REF LABEL
  10895	036010	013737 	177776 	002650'		MOV	@#PS,DLTMP	;;; SAVE CONTROLLER NUMBER
  10896	036016					CALL	R3,TTSAV	;;; SAVE R3 AND SETUP R4 AND R5
	036016	004337 	037156'			JSR	R3,TTSAV
  10897	036022	011400 				MOV	(R4),R0		;;; GET STATUS
  10898	036024	100531 				BMI	.DLINT		;;; THIS IS MODEM INTERRUPT.
  10899	036026				TTINPA:
  10900	036026	012746 	035544'			MOV	#DHISTQ,-(SP)	;;; RETURN THROUGH TO10Q STARTUP
  10901	036032	016446 	000002 			MOV	2(R4),-(SP)	;;; GET INPUT BYTE AND FLAGS
  10902	036036	032716 	020000 			BIT	#DL.FER,(SP)	;;; FRAMING ERROR PRESENT??
  10903	036042	001060 				BNE	TTINPB		;;; YES -- FORGET IT
  10904	036044	105765 	000004 			TSTB	STSW0+0(R5)	;;; [TCO 4.2284] NO -- IS THIS LINE TURNED OFF??
  10905	036050	001055 				BNE	TTINPB		;;; YES -- GO AWAY
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 201
TTY DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)

  10907						.SBTTL	TTY DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)
  10908
  10909					;+
  10910					; TTSTCH -- STORE TERMINAL CHARACTER IN TO-10 QUEUE
  10911					;
  10912					; THIS ROUTINE PERFORMS DEVICE INDEPENDENT INPUT CHARACTER PROCESSING.
  10913					; SPECIFIC FUNCTIONS PERFORMED ARE:
  10914					;
  10915					;	1. KLINIK INPUT PROCESSING
  10916					;	2. PROTOCOL PAUSE INPUT PRECESSING
  10917					;	3. LOCAL XOFF PROCESSING
  10918					;	4. PDP-11 CTY INPUT PROCESSING
  10919					;	5. SECONDARY PROTOCOL INPUT PROCESSING.
  10920					;
  10921					; CHARACTERS FROM THE KLINIK LINE ARE IGNORED IF KLINIK IS NOT ENABLED.
  10922					;
  10923					; CHARACTERS RECEIVED DURING PROTOCOL PAUSE ARE BUFFERED UNTIL A MINIMUM THREHHOL
  10924					; IS CROSSED, WHEREUPON THE FRONT-END IS CRASHED (B01).
  10925					;
  10926					; XOFF CHARACTERS ARE PROCESSED LOCALLY FOR LINES WHICH ARE SO ENABLED.  THE
  10927					; RETURN IS ALTERED SO AS TO TERMINATE A DH-11 SILO UNLOAD.
  10928					;
  10929					; PDP-11 CTY CHARACTERS ARE ECHOED AND PASSED TO THE TASK WHICH "OWNS" THE CTY.
  10930					;
  10931					; A <CONTROL-C> CHARACTER IS DECLARED AS A SIGNIFICANT EVENT.
  10932					; A <CONTROL-BACKSLASH> CHARACTER REQUESTS THE PARSER TASK.
  10933					;
  10934					; CHARACTERS RECEIVED WHILE IN SECONDARY PROTOCOL ARE PASSED TO THE BOOT
  10935					; PROTOCOL TASK.
  10936					;
  10937					; NORMAL CHARACTERS RECEIVED IN PRIMARY PROTOCOL ARE QUEUED UP FOR TRANSMISSION
  10938					; TO THE KL10.  CHARACTERS RECEIVED FROM A LINE WHICH IS IN CARRIER-WAIT ARE
  10939					; IGNORED.
  10940					;-
  10941
  10942	036052				TTSTCH:
  10943	036052	020537 	002636'			CMP	R5,KLNPTR	;;; IS THIS THE KLINIK LINE??
  10944	036056	001003 				BNE	10$		;;; NO -- GO ON
  10945	036060	105737 	001224'			TSTB	.KLNSW+0	;;; YES -- IS KLINIK ACTIVE??
  10946	036064	001447 				BEQ	TTINPB		;;; NO -- GO AWAY
  10947	036066				10$:
  10948	036066	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS THE CTY?
  10949	036074	001045 				BNE	50$		;;; YES -- SPECIAL CASE
  10950	036076				20$:				;;; [TCO 4.2211]
  10951	036076	032765 	000004 	000006 		BIT	#TT.CRW,STSW1(R5) ;;; [TCO 4.2333] NO -- IS THE LINE IN CARRIER-WAIT??
  10952	036104	001037 				BNE	TTINPB		;;; [TCO 4.2333] YES -- IGNORE IT
  10953	036106	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;;; [TCO 4.2181] NO -- IS PRIMARY PROTOCOL RUNNING?
  10954	036114	001012 				BNE	30$		;;; [TCO 4.2211] YES -- GO ON
  10955	036116	105737 	001370'			TSTB	.PRPSE		;;; [TCO 4.2211] NO -- PROTOCOL PAUSE??
  10956	036122	001430 				BEQ	TTINPB		;;; [TCO 4.2211] NO -- FLUSH CHARACTER AND DISMISS
  10957	036124	022737 	000140 	001422'		CMP	#140,.FREPL+2	;;; [TCO 4.2211] YES -- WITHIN  LIMITS??
  10958	036132	002403 				BLT	30$		;;; [TCO 4.2211] YES -- GO ON
  10959	036134					.CRASH	B01		;;; [TCO 4.2211] NO -- CRASH
	036134	000004 				IOT
	036136	   102 	   060 	   061 		.ASCIZ	/B01/
	036141	   000
  10960						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 201-1
TTY DRIVER -- TTSTCH (STORE CHARACTER IN TO10Q)

  10961	036142				30$:				;;; [TCO 4.2211]
  10962	036142	032765 	000020 	000006 		BIT	#TT.XEN,STSW1(R5) ;;; [TCO 4.2181] IS INTERNAL XOFF ENABLED??
  10963	036150	001413 				BEQ	40$		;;; [TCO 4.2211] NO -- GO ON
  10964	036152	011646 				MOV	(SP),-(SP)	;;; [TCO 4.2181] YES -- GET CHARACTER FOR INPUT CHECK
  10965	036154	042716 	177600 			BIC	#^C177,(SP)	;;; [TCO 4.2181] FLUSH LINE NUMBER AND PARITY
  10966	036160	022726 	000023 			CMP	#C.HXOF,(SP)+	;;; [TCO 4.2181] IS IT AN XOFF??
  10967	036164	001005 				BNE	40$		;;; [TCO 4.2211] NO -- GO ON
  10968	036166					CALL	.TTXOF		;;; [TCO 4.2181] YES -- PROCESS XOFF
	036166	004737 	037242'			JSR	PC,.TTXOF
  10969	036172	012766 	035544'	000002 		MOV	#DHISTQ,2(SP)	;;; SET ALTERNATE RETURN
  10970	036200				40$:				;;; [TCO 4.2211]
  10971	036200					CALL	..STCH		;;; STORE CHARACTER WITH PARITY
	036200	004737 	044112'			JSR	PC,..STCH
  10972	036204				TTINPB:
  10973	036204	005726 				TST	(SP)+		;;; REMOVE THE CHARACTER
  10974	036206					RETURN			;;; AND EXIT
	036206	000207 				RTS	PC
  10975	036210				50$:
  10976	036210	013705 	002634'			MOV	CTYPTR,R5	;;; POINT TO REAL CTY
  10977	036214	011600 				MOV	(SP),R0		;;; GET THE CHARACTER AND
  10978	036216	042700 	177600 			BIC	#^C177,R0	;;; MASK OFF PARITY
  10979	036222	122700 	000003 			CMPB	#'C-100,R0	;;; ^C?
  10980	036226	001005 				BNE	60$		;;; NO -- DON'T SET EVENT FLAG
  10981	036230	052737 	100000 	001012'		BIS	#EF.CTC,.COMEF+2 ;;; TELL THE MONITOR
  10982	036236					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	036236	004737 	042444'			JSR	PC,..DSEV
  10983	036242				60$:
  10984	036242	123700 	002630'			CMPB	.BRKCH,R0	;;; NULL CHARACTER?
  10985	036246	001006 				BNE	70$		;;; NO -- ALL OK
  10986	036250	052737 	000200 	006546'		BIS	#EF.RQM,TTYTSK+A.EF ;;; START PARSER TASK
  10987	036256					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	036256	004737 	042444'			JSR	PC,..DSEV
  10988	036262	000750 				BR	TTINPB		;;; IGNORE CHARACTER
  10989						;
  10990	036264				70$:
  10991	036264	005737 	002632'			TST	.TTP11		;;; IS THIS PDP11 INPUT?
  10992	036270	001074 				BNE	TTCTY		;;; YES -- GO DO ECHO ETC
  10993	036272	032737 	020000 	001012'		BIT	#EF.PR2,.COMEF+2 ;;; IS THIS BOOT PROTOCOL?
  10994	036300	001676 				BEQ	20$		;;; [TCO 4.2211] NO -- THEN JUST TREAT IT AS A NORMAL REQUEST
  10995	036302	112637 	001160'			MOVB	(SP)+,.BTSCH	;;; STORE CHARACTER FOR BOOT PROTOCOL
  10996	036306					RETURN
	036306	000207 				RTS	PC
  10997
  10998						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 202
TTY DRIVER -- .DLINT (DL11-E DATASET INTERRUPT SERVICE)

  11000						.SBTTL	TTY DRIVER -- .DLINT (DL11-E DATASET INTERRUPT SERVICE)
  11001					;+
  11002					;	.DLINT -- DL11E DATASET INTERRUPT SERVICE
  11003					;
  11004					; ENTER WITH:
  11005					;
  11006					;	R0 -- CSR FOR THIS DEVICE
  11007					;	R4 -- POINTS TO EXTERNAL PAGE FOR THIS DEVICE
  11008					;	R5 -- POINTS TO DLS ENTRY FOR THIS DEVICE
  11009					;
  11010					;-
  11011
  11012	036310				.DLINT::			;;; CALLED FROM "$TTINP"
  11013	036310	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5);;; REMOTE TERMINAL??
  11014	036316	001454 				BEQ	40$		;;; NO -- NOISE - GO AWAY
  11015	036320	032700 	040000 			BIT	#DL.RNG,R0	;;; YES -- DID IT RING??
  11016	036324	001421 				BEQ	20$		;;; NO -- GO LOOK AT CARRIER
  11017	036326	012714 	000046 			MOV	#DL.DTR!DL.DEN!DL.RTS,(R4)
  11018									;;; SET UP TO WAIT FOR CARRIER
  11019	036332	020537 	002636'			CMP	R5,KLNPTR	;;; IS THIS THE KLINIK LINE??
  11020	036336	001403 				BEQ	10$		;;; YES -- GO ON
  11021	036340					CALL	.TTRNG		;;; NO -- DISCONNECT AND SET CARRIER WAIT
	036340	004737 	040162'			JSR	PC,.TTRNG
  11022	036344	000411 				BR	20$		;;; AND GO  ON
  11023						;
  11024	036346				10$:
  11025	036346	105737 	001224'			TSTB	.KLNSW+0	;;; IS KLINIK ALREADY ACTIVE??
  11026	036352	001006 				BNE	20$		;;; YES -- NOISE - GO ON
  11027	036354	052737 	001000 	006546'		BIS	#EF.RKR,TTYTSK+A.EF ;;; NO -- REQUEST KLR
  11028	036362					CALL	..DSEV		;;; DECLARE A SIGNIFICANT EVENT
	036362	004737 	042444'			JSR	PC,..DSEV
  11029	036366	000434 				BR	50$		;;; AND LET IT HANDLE CARRIER
  11030						;
  11031	036370				20$:
  11032	036370	032700 	010000 			BIT	#DL.CAR,R0	;;; CARRIER DETECT UP??
  11033	036374	001420 				BEQ	30$		;;; NO -- GO LOOK AT DATA TERMINAL READY
  11034	036376	032714 	000004 			BIT	#DL.RTS,(R4)	;;; YES -- IS REQUEST TO SEND UP??
  11035	036402	001426 				BEQ	50$		;;; NO -- JUST EXIT
  11036	036404	042765 	002004 	000006 		BIC	#TT.CRW!TT.RIP,STSW1(R5)
  11037	036412	052714 	000100 			BIS	#DL.REN,(R4)	;;; ENABLE RCVR INTERRUPTS
  11038	036416	020537 	002636'			CMP	R5,KLNPTR	;;; IS THIS THE KLINIK LINE??
  11039	036422	001412 				BEQ	40$		;;; YES -- GO ON
  11040	036424	010446 				MOV	R4,-(SP)	;;; NO -- SAVE R4
  11041	036426					CALL	.STTYD		;;; TELL -10 ABOUT DIALUP
	036426	004737 	040176'			JSR	PC,.STTYD
  11042	036432	012604 				MOV	(SP)+,R4	;;; RESTORE R4
  11043	036434	000405 				BR	40$		;;; AND GO AWAY
  11044						;
  11045	036436				30$:				;;; HERE IF CARRIER IS OFF
  11046	036436	032714 	000002 			BIT	#DL.DTR,(R4)	;;; DATA TERMINAL READY LIT??
  11047	036442	001406 				BEQ	50$		;;; NO -- EXIT
  11048	036444					CALL	.TTSCW		;;; YES -- WAIT FOR CARRIER
	036444	004737 	040166'			JSR	PC,.TTSCW
  11049	036450				40$:
  11050	036450	105714 				TSTB	(R4)		;;; RCVR DONE LIT??
  11051	036452	100002 				BPL	50$		;;; [TCO 4.2211] NO -- EXIT
  11052	036454	000137 	036026'			JMP	TTINPA		;;; [TCO 4.2211] YES -- PROCESS DATA
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 202-1
TTY DRIVER -- .DLINT (DL11-E DATASET INTERRUPT SERVICE)

  11053						;
  11054	036460				50$:
  11055	036460					RETURN			;;; TO CALLER
	036460	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 203
TTY DRIVER -- TTCTY (CTY SERVICE)

  11057						.SBTTL	TTY DRIVER -- TTCTY (CTY SERVICE)
  11058
  11059						.ENABL	LSB
  11060	036462				TTCTY:
  11061	036462	013705 	002634'			MOV	CTYPTR,R5	;;;RESET TO CTY AND
  11062	036466	012703 	002662'			MOV	#CTYSTS,R3	;;;GET CTY BLOCK POINTER.
  11063	036472	110016 				MOVB	R0,(SP)		;;;USE CHARACTER WITHOUT PARITY.
  11064	036474	122716 	000017 			CMPB	#'O-100,@SP	;;;CONTROL O?
  11065	036500	001010 				BNE	95$		;;;IF NE NO
  11066	036502	011346 				MOV	@R3,-(SP)	;;;XOR CTLO BIT
  11067	036504	042716 	177737 			BIC	#^C<CTLO>,@SP	;;;WITH STATUS WORD
  11068	036510	052713 	000040 			BIS	#CTLO,@R3
  11069	036514	042613 				BIC	(SP)+,@R3
  11070	036516				80$:
  11071					;
  11072					; CONTROLLER IS BUSY ON OUTPUT-IGNORE INPUT REQUEST
  11073					;
  11074	036516				85$:
  11075	036516	005726 				TST	(SP)+		;;;REMOVE BYTE FROM STACK
  11076	036520				90$:
  11077	036520					RETURN			;;;EXIT INTERRUPT
	036520	000207 				RTS	PC
  11078					;
  11079					; CONTROLLER IS BUSY ON INPUT OR OUTPUT
  11080					;
  11081	036522				95$:
  11082	036522	005713 				TST	@R3		;;;BUSY ON INPUT?
  11083	036524	100774 				BMI	80$		;;;IF MI NO
  11084					;
  11085					; PROCESS NEXT INPUT BYTE
  11086					;
  11087	036526				100$:
  11088	036526	122716 	000177 			CMPB	#177,@SP	;;;RUBOUT?
  11089	036532	001453 				BEQ	115$		;;;IF EQ YES
  11090	036534	122716 	000025 			CMPB	#25,@SP		;;;LINE DELETE?
  11091	036540	001477 				BEQ	125$		;;;IF EQ YES
  11092	036542	122716 	000175 			CMPB	#175,@SP	;;;ALTMODE?
  11093	036546	101511 				BLOS	1$		;;;IF LOS YES
  11094	036550	122716 	000033 			CMPB	#C.HESC,@SP	;;;ALTMODE?
  11095	036554	001506 				BEQ	1$		;;;IF EQ YES
  11096	036556	122716 	000032 			CMPB	#C.HEOF,@SP	;;;CONTROL Z?
  11097	036562	001510 				BEQ	11$		;;;IF EQ YES
  11098	036564	122716 	000015 			CMPB	#C.HCRT,@SP	;;;CARRIAGE RETURN?
  11099	036570	001525 				BEQ	41$		;;;IF EQ YES
  11100	036572	122716 	000003 			CMPB	#3,@SP		;;;^C?
  11101	036576	001511 				BEQ	21$		;;;YES
  11102	036600	122716 	000140 			CMPB	#140,@SP	;;;CHECK FOR LC
  11103	036604	103005 				BHIS	105$		;;;NO
  11104	036606	122716 	000173 			CMPB	#173,@SP
  11105	036612	103402 				BLO	105$
  11106	036614	042716 	000040 			BIC	#40,@SP		;;;YES
  11107					;
  11108					; STORE BYTE IN INPUT BUFFER
  11109					;
  11110	036620				105$:
  11111	036620	111673 	000006 			MOVB	@SP,@CURBF(R3)	;;;STORE BYTE IN BUFFER
  11112	036624	005263 	000006 			INC	CURBF(R3)	;;;INCREMENT BUFFER ADDRESS
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 203-1
TTY DRIVER -- TTCTY (CTY SERVICE)

  11113	036630	105363 	000004 			DECB	RMBYT(R3)	;;;ANY REMAINING SPACE IN BUFFER
  11114	036634	001004 				BNE	110$		;;;IF NE YES
  11115	036636	005363 	000006 			DEC	CURBF(R3)	;;;BACK UP TO END OF BUFFER
  11116	036642	052713 	000400 			BIS	#EOLS,@R3	;;;TERMINATE ON BYTE COUNT
  11117	036646				110$:
  11118	036646	032713 	000020 			BIT	#RUBP,@R3	;;;RUBOUT IN PROGRESS?
  11119	036652	001500 				BEQ	61$		;;;IF EQ NO
  11120	036654	042713 	000020 			BIC	#RUBP,@R3	;;;CLEAR RUBOUT IN PROGRESS
  11121	036660	000417 				BR	120$		;;;
  11122						;
  11123					;
  11124					; RUBOUT
  11125					;
  11126	036662				115$:
  11127	036662	026363 	000006 	000002 		CMP	CURBF(R3),STRBF(R3) ;;;ANY BYTES TO RUBOUT?
  11128	036670	001712 				BEQ	80$		;;;IF EQ NO
  11129	036672	005363 	000006 			DEC	CURBF(R3)	;;;BACK UP ONE BYTE
  11130	036676	117316 	000006 			MOVB	@CURBF(R3),@SP	;;;GET BYTE TO BE RUBBED OUT
  11131	036702	105263 	000004 			INCB	RMBYT(R3)	;;;INCREMENT REMAINING SPACE IN BUFFER
  11132	036706	032713 	000020 			BIT	#RUBP,@R3	;;;RUBOUT ALREADY IN PROGRESS?
  11133	036712	001060 				BNE	61$		;;;IF NE YES
  11134	036714	052713 	000020 			BIS	#RUBP,@R3	;;;SET RUBOUT IN PROGRESS
  11135	036720				120$:
  11136	036720	000316 				SWAB	@SP		;;;SWAP BYTE TO HIGH BYTE
  11137	036722	112716 	000134 			MOVB	#'\,@SP		;;;INSERT BACKSLASH
  11138	036726	011663 	000014 			MOV	@SP,MBUFR(R3)	;;;INSERT TEXT IN MULTI-ECHO BUFFER
  11139	036732	012716 	000002 			MOV	#2,@SP		;;;SET LENGTH OF BUFFER
  11140	036736	000457 				BR	81$		;;;
  11141						;
  11142					;
  11143					; LINE DELETE
  11144					;
  11145	036740				125$:
  11146	036740	012716 	000004 			MOV	#4,@SP		;;;SET LENGTH OF BUFFER
  11147	036744	012746 	032376'			MOV	#CTRLU,-(SP)	;;;SET ADDRESS OF MULTI-ECHO BUFFER
  11148	036750	042713 	000020 			BIC	#RUBP,@R3	;;;CLEAR RUBOUT IN PROGRESS FLAG
  11149	036754	013763 	002722'	000004 		MOV	CNT,RMBYT(R3)	;;;RESET REMAINING BYTES IN BUFFER
  11150	036762	016363 	000002 	000006 		MOV	STRBF(R3),CURBF(R3) ;;;RESET ADDRESS IN BUFFER
  11151	036770	000445 				BR	91$		;;;
  11152						;
  11153					;
  11154					; ALTMODE CODES 33, 175, AND 176
  11155					;
  11156	036772				1$:
  11157	036772	105016 				CLRB	@SP		;;;SET TO ECHO ZERO BYTE
  11158	036774	112763 	000033 	000005 		MOVB	#C.HESC,FNBYT(R3) ;;;SET FINAL BYTE
  11159	037002	000422 				BR	51$		;;;SET END OF LINE SEEN
  11160						;
  11161					;
  11162					; CONTROL Z
  11163					;
  11164	037004				11$:
  11165	037004	105363 	000005 			DECB	FNBYT(R3)	;;;SET CONTROL Z FLAG
  11166	037010	012716 	000004 			MOV	#4,@SP
  11167	037014	012746 	032402'			MOV	#CTRLZ,-(SP)	;;;SET ADDRESS OF MULTI-ECHO BUFFER
  11168	037020	000406 				BR	31$
  11169						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 203-2
TTY DRIVER -- TTCTY (CTY SERVICE)

  11170					;
  11171					; CONTROL C
  11172					;
  11173	037022				21$:
  11174	037022	111663 	000005 			MOVB	@SP,FNBYT(R3)	;;;SET IN LAST CHARACTER
  11175	037026	012716 	000004 			MOV	#4,@SP		;;;SET COUNT
  11176	037032	012746 	032372'			MOV	#CTRLC,-(SP)	;;;SET  CNTRL C
  11177	037036				31$:
  11178	037036	052713 	000400 			BIS	#EOLS,@R3	;;;SET END OF LINE
  11179	037042	000420 				BR	91$		;;;AND ECHO
  11180						;
  11181					;
  11182					; CARRIAGE RETURN /CNTRL Z
  11183					;
  11184	037044				41$:
  11185	037044	111663 	000005 			MOVB	@SP,FNBYT(R3)
  11186	037050				51$:
  11187	037050	052713 	000400 			BIS	#EOLS,@R3	;;;SET END OF LINE SEEN
  11188	037054				61$:
  11189	037054	032713 	074000 			BIT	#LFCT,@R3	;;;ANY LINE FEEDS WAITING?
  11190	037060	001002 				BNE	71$		;;;IF NE YES
  11191	037062	000137 	035062'			JMP	ECHOB		;;;ECHO BYTE
  11192						;
  11193	037066				71$:
  11194	037066	111663 	000014 			MOVB	@SP,MBUFR(R3)	;;;SET FOR MULTI-ECHO OF ONE BYTE
  11195	037072	012716 	000001 			MOV	#1,@SP		;;;SET LENGTH OF BUFFER
  11196	037076				81$:
  11197	037076	010346 				MOV	R3,-(SP)	;;;CALCULATE ADDRESS OF MULTI-ECHO BUFFER
  11198	037100	062716 	000014 			ADD	#MBUFR,@SP	;;;
  11199	037104				91$:
  11200	037104	012663 	000012 			MOV	(SP)+,MEBUF(R3)	;;;INSERT ADDRESS OF MULTI-ECHO BUFFER
  11201	037110	112663 	000010 			MOVB	(SP)+,MECNT(R3)	;;;INSERT LENGTH OF BUFFER
  11202	037114	000137 	034620'			JMP	OUTPT		;;;START OUTPUT
  11203						;
  11204						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 204
TTY DRIVER -- DHSAV (DH11 REGISTER SAVE/RESTORE CO-ROUTINE)

  11206						.SBTTL	TTY DRIVER -- DHSAV (DH11 REGISTER SAVE/RESTORE CO-ROUTINE)
  11207
  11208					; DH11 TERMINAL MULTIPLEXER SAVE ROUTINE
  11209					;
  11210					; THIS ROUTINE SAVES R0 THRU R5 ON THE STACK AND RETURNS:
  11211					;
  11212					;	R4 -- POINTS TO EXTERNAL PAGE FOR THIS DEVICE (UNIT)
  11213					;	R5 -- POINTS TO THE DLS ENTRY FOR THIS DEVICE (UNIT)
  11214					;
  11215						.ENABL LSB
  11216	037120				DHSAV:
  11217	037120	010046 				MOV	R0,-(SP)	;SAVE REGISTERS
  11218	037122	010146 				MOV	R1,-(SP)
  11219	037124	010246 				MOV	R2,-(SP)
  11220	037126	010446 				MOV	R4,-(SP)
  11221	037130	010546 				MOV	R5,-(SP)
  11222	037132	010346 				MOV	R3,-(SP)	;;;SET RETURN ADDRESS
  11223	037134	013705 	002646'			MOV	DHTMP,R5	;;;RET SAVED PS WORD
  11224	037140	042705 	177760 			BIC	#177760,R5	;;;CLEAR ALL BUT CONTROLLER NUMBER
  11225	037144	000305 				SWAB	R5		;;;CONVERT TO WORD INDEX
  11226	037146	006205 				ASR	R5
  11227	037150	062705 	003046'			ADD	#DHTBL,R5	;;;POINT TO THE BEGINNING OF DH TABLE
  11228	037154	000417 				BR	20$		;;;FINISH IN COMMON CODE
  11229						;
  11230					;
  11231					; DL11 TERMINAL SAVE ROUTINE
  11232					;
  11233	037156				TTSAV:
  11234	037156	010046 				MOV	R0,-(SP)	;SAVE REGISTERS
  11235	037160	010146 				MOV	R1,-(SP)
  11236	037162	010246 				MOV	R2,-(SP)
  11237	037164	010446 				MOV	R4,-(SP)
  11238	037166	010546 				MOV	R5,-(SP)
  11239	037170	010346 				MOV	R3,-(SP)	;;;SET RETURN ADDRESS
  11240	037172	013705 	002650'			MOV	DLTMP,R5	;;;RETRIEVE SAVED PS WORD
  11241	037176	042705 	177760 			BIC	#177760,R5	;;;CLEAR ALL BUT CONTROLLER (UNIT) NUMBER
  11242	037202	006305 				ASL	R5		;;;CONVERT TO WORD INDEX
  11243	037204	006305 				ASL	R5
  11244	037206	006305 				ASL	R5
  11245	037210	062705 	002776'			ADD	#TTTBL,R5	;;;POINT TO THE BEGINNING OF THE DL TABLE
  11246	037214				20$:
  11247	037214	016504 	000002 			MOV	TTYEXP(R5),R4	;;;SET UP EXTERNAL PAGE ADDRESS OF THIS DEVICE
  11248	037220					CALL	@(SP)+		;;;CALL THE CALLER BACK
	037220	004736 				JSR	PC,@(SP)+
  11249	037222	012605 				MOV	(SP)+,R5	;;;RESTORE REGISTERS
  11250	037224	012604 				MOV	(SP)+,R4
  11251	037226	012602 				MOV	(SP)+,R2
  11252	037230	012601 				MOV	(SP)+,R1
  11253	037232	012600 				MOV	(SP)+,R0
  11254	037234	012603 				MOV	(SP)+,R3
  11255	037236	000137 	014244'			JMP	..INTX		;;;EXIT FROM INTERRUPT
  11256						;
  11257						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 205
TTY DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)

  11259						.SBTTL	TTY DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)
  11260
  11261					;+
  11262					; .TTXOF -- DEVICE DEPENDENT XOFF PROCESSING
  11263					;
  11264					; THIS SUBROUTINE WILL PROCESS AN XOFF AND STOP OUTPUT ON A SPECIFIED
  11265					; TERMINAL LINE.
  11266					;
  11267					; INPUTS:
  11268					;
  11269					;	R5 -- POINTER TO DATA LINE SCANNER TABLE ENTRY FOR LINE TO BE STOPPED.
  11270					;
  11271					; OUTPUTS:
  11272					;
  11273					;	THE LINE IS STOPPED.
  11274					;
  11275					; CALLED FROM QUEUED PROTOCOL TASK AND TERMINAL INPUT SERVICE
  11276					;-
  11277
  11278						.ENABL	LSB
  11279
  11280	037242				.TTXOF::
  11281	037242	105765 	000006 			TSTB	STSW1+0(R5)	;;; [TCO 4.2181] ALREADY X'D OFF??
  11282	037246	100451 				BMI	30$		;;; [TCO 4.2181] YES -- JUST EXIT
  11283	037250	032765 	001000 	000006 		BIT	#TT.SIP,STSW1(R5) ;;; [TCO 4.2181] NO -- SENDALL IN PROGRESS??
  11284	037256	001042 				BNE	.DLXOF		;;; [TCO 4.2181] YES -- MARK XOFF AND RETURN
  11285	037260	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; [TCO 4.2181] NO -- IS THIS A CTY??
  11286	037266	001414 				BEQ	10$		;;; [TCO 4.2181] NO -- GO ON
  11287	037270	005737 	002632'			TST	.TTP11		;;; [TCO 4.2181] YES -- IN PDP-11 I/O WAIT??
  11288	037274	001036 				BNE	30$		;;; [TCO 4.2181] YES -- JUST EXIT
  11289	037276	105737 	001224'			TSTB	.KLNSW+0	;;; [TCO 4.2181] NO -- IS KLINIK ACTIVE??
  11290	037302	003406 				BLE	10$		;;; [TCO 4.2181] NO -- NOT THAT WE CARE -- GO ON
  11291	037304	010546 				MOV	R5,-(SP)	;;; [TCO 4.2181] YES -- SAVE CTY POINTER
  11292	037306	013705 	002636'			MOV	KLNPTR,R5	;;; [TCO 4.2181] SUBSTITUTE KLINIK POINTER
  11293	037312					CALL	10$		;;; [TCO 4.2181] STOP THE KLINIK LINE
	037312	004737 	037320'			JSR	PC,10$
  11294	037316	012605 				MOV	(SP)+,R5	;;; [TCO 4.2181] RESTORE CTY POINTER
  11295	037320				10$:
  11296	037320	016501 	000002 			MOV	TTYEXP(R5),R1	;;; [TCO 4.2181] GET EXTERNAL PAGE POINTER
  11297	037324	001422 				BEQ	30$		;;; [TCO 4.2181] JUST EXIT IF NON-EXISTENT LINE
  11298	037326	010504 				MOV	R5,R4		;;; [TCO 4.2181] COPY DLS POINTER TO R4
  11299	037330	162704 	003046'			SUB	#DHTBL,R4	;;; [TCO 4.2181] IS THIS A DH-11??
  11300	037334	100413 				BMI	.DLXOF		;;; [TCO 4.2181] NO -- STOP DL-11 LINE
  11301					;
  11302					; HERE TO STOP A DH-11 LINE
  11303					;
  11304	037336				.DHXOF::
  11305	037336	005715 				TST	(R5)		;;; [TCO 4.2181] YES -- ANY OUTPUT PENDING??
  11306	037340	001411 				BEQ	.DLXOF		;;; [TCO 4.2181] NO -- MARK XOFF AND EXIT
  11307	037342					CALL	.STDHL		;;; [TCO 4.2181] YES -- SET UP DH-11 FOR LINE STOP
	037342	004737 	037576'			JSR	PC,.STDHL
  11308	037346	022761 	177776 	000010 		CMP	#-2,10(R1)	;;; [TCO 4.2181] MUST WE TRUNCATE PACKET??
  11309	037354	003403 				BLE	.DLXOF		;;; [TCO 4.2181] NO -- JUST LET I/O RUN DOWN
  11310	037356	012761 	177777 	000010 		MOV	#-1,10(R1)	;;; [TCO 4.2181] YES -- TRUNCATE IT
  11311					;
  11312					; HERE TO STOP  DL-11 LINE
  11313					;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 205-1
TTY DRIVER -- .TTXOF (DEVICE DEPENDENT XOFF PROCESSING)

  11314	037364				.DLXOF::
  11315	037364	052765 	000200 	000006 		BIS	#TT.XOF,STSW1(R5) ;;; [TCO 4.2181] MARK THE LINE AS X'D OFF
  11316	037372				30$:
  11317	037372					RETURN			;;; [TCO 4.2181] TO CALLER
	037372	000207 				RTS	PC
  11318
  11319						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 206
TTY DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)

  11321						.SBTTL	TTY DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)
  11322
  11323					;+
  11324					; .TTXON -- DEVICE DEPENDENT XON PROCESSING
  11325					;
  11326					; THIS SUBROUTINE WILL PROCESS AN XON AND START OUTPUT ON A SPECIFIED
  11327					; TERMINAL LINE.
  11328					;
  11329					; INPUTS:
  11330					;
  11331					;	R5 -- POINTER TO DATA LINE SCANNER TABLE ENTRY FOR LINE TO BE STARTED.
  11332					;
  11333					; OUTPUTS:
  11334					;
  11335					;	THE LINE IS STARTED.
  11336					;
  11337					; CALLED FROM QUEUED PROTOCOL TASK AND TERMINAL INPUT SERVICE
  11338					;-
  11339
  11340						.ENABL	LSB
  11341
  11342	037374				.TTXON::
  11343	037374	105765 	000006 			TSTB	STSW1+0(R5)	;;; [TCO 4.2181] IS LINE X'D OFF??
  11344	037400	100075 				BPL	50$		;;; [TCO 4.2181] NO -- JUST EXIT
  11345	037402	032765 	001001 	000006 		BIT	#TT.SIP!TT.OUT,STSW1(R5) ;;; [TCO 4.2181] YES -- SENDALL IN PROGRESS??
  11346									;;; [TCO 4.2181] OR ALREADY BUSY??
  11347	037410	001066 				BNE	40$		;;; [TCO 4.2181] YES -- RESET LINE STATE AND EXIT
  11348	037412	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; [TCO 4.2181] NO -- IS THIS THE CTY??
  11349	037420	001414 				BEQ	10$		;;; [TCO 4.2181] NO -- GO ON
  11350	037422	005737 	002632'			TST	.TTP11		;;; [TCO 4.2181] YES -- IN PDP-11 I/O WAIT??
  11351	037426	001057 				BNE	40$		;;; [TCO 4.2181] YES -- RESET XOFF AND EXIT
  11352	037430	105737 	001224'			TSTB	.KLNSW+0	;;; [TCO 4.2181] NO -- IS KLINIK ACTIVE??
  11353	037434	003406 				BLE	10$		;;; [TCO 4.2181] NO -- NOT THAT WE CARE - GO ON
  11354	037436	010546 				MOV	R5,-(SP)	;;; [TCO 4.2181] YES -- SAVE CTY POINTER
  11355	037440	013705 	002636'			MOV	KLNPTR,R5	;;; [TCO 4.2181] SUBSTITUTE KLINIK LINE POINTER
  11356	037444					CALL	10$		;;; [TCO 4.2181] START THE KLINIK LINE
	037444	004737 	037452'			JSR	PC,10$
  11357	037450	012605 				MOV	(SP)+,R5	;;; [TCO 4.2181] RESTORE CTY POINTER
  11358	037452				10$:
  11359	037452	016501 	000002 			MOV	TTYEXP(R5),R1	;;; [TCO 4.2181] COPY EXTERNAL PAGE POINTER TO R1
  11360	037456	001446 				BEQ	50$		;;; [TCO 4.2181] JUST EXIT IF NONEXISTENT LINE
  11361	037460	011503 				MOV	(R5),R3		;;; [TCO 4.2181] COPY THREAD POINTER TO R3
  11362	037462	001441 				BEQ	40$		;;; [TCO 4.2181] RESET STATUS AND EXIT IF EMPTY
  11363	037464	010504 				MOV	R5,R4		;;; [TCO 4.2181] COPY DLS TABLE POINTER TO R4
  11364	037466	162704 	003046'			SUB	#DHTBL,R4	;;; [TCO 4.2181] IS THIS A DL-11??
  11365	037472	100425 				BMI	.DLXON		;;; [TCO 4.2181] YES -- START THE DL-11
  11366					;
  11367					; HERE TO START A DH-11 LINE
  11368					;
  11369	037474				.DHXON::
  11370	037474					CALL	.STDHL		;;; [TCO 4.2181] SET UP FOR THIS LINE NUMBER
	037474	004737 	037576'			JSR	PC,.STDHL
  11371	037500	062701 	000006 			ADD	#6,R1		;;; [TCO 4.2181] POINT TO CURRENT ADDRESS REGISTER
  11372	037504	116302 	000006 			MOVB	T.HCBC(R3),R2	;;; [TCO 4.2181] GET BYTE COUNT FROM THREAD NODE
  11373	037510	001007 				BNE	20$		;;; [TCO 4.2181] PROCEED IF PACKET NOT EMPTY
  11374	037512	005363 	000004 			DEC	T.HCAD(R3)	;;; [TCO 4.2181] EMPTY -- BACK UP ONE BYTE
  11375	037516	105073 	000004 			CLRB	@T.HCAD(R3)	;;; [TCO 4.2181] AND RENDER IT NULL
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 206-1
TTY DRIVER -- .TTXON (DEVICE DEPENDENT XON PROCESSING)

  11376	037522	005202 				INC	R2		;;; [TCO 4.2181] ACCOUNT FOR THE BYTE
  11377	037524	110263 	000006 			MOVB	R2,T.HCBC(R3)	;;; [TCO 4.2181] IN THE THREAD PACKET
  11378	037530				20$:
  11379	037530	005402 				NEG	R2		;;; [TCO 4.2181] NEGATE THE BYTE COUNT
  11380	037532	016321 	000004 			MOV	T.HCAD(R3),(R1)+ ;;; [TCO 4.2181] SET THE PACKET ADDRESS
  11381	037536	010221 				MOV	R2,(R1)+	;;; [TCO 4.2181] AND THE BYTE COUNT
  11382	037540	056411 	041540'			BIS	BITTBL(R4),(R1)	;;; [TCO 4.2181] START UP THE DH-11
  11383	037544	000405 				BR	30$		;;; [TCO 4.2181] AND EXIT
  11384						;
  11385					;
  11386					; HERE TO START A DL-11 LINE
  11387					;
  11388	037546				.DLXON::
  11389	037546	105061 	000006 			CLRB	6(R1)		;;; [TCO 4.2181] SET A NULL BYTE TO START DL-11
  11390	037552	052761 	000100 	000004 		BIS	#DL.XEN,4(R1)	;;; [TCO 4.2181] ENABLE OUTPUT INTERRUPTS
  11391	037560				30$:
  11392	037560	052765 	000001 	000006 		BIS	#TT.OUT,STSW1(R5) ;;; [TCO 4.2181] MARK OUTPUT BUSY
  11393	037566				40$:
  11394	037566	042765 	000200 	000006 		BIC	#TT.XOF,STSW1(R5) ;;; [TCO 4.2181] MARK LINE AS X'D ON
  11395	037574				50$:
  11396	037574					RETURN			;;; [TCO 4.2181] TO CALLER
	037574	000207 				RTS	PC
  11397
  11398						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 207
TTY DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROLLER)

  11400						.SBTTL	TTY DRIVER -- .STDHL (SET UP DH-11 LINE NUMBER IN CONTROLLER)
  11401
  11402					;+
  11403					; .STDHL -- SET UP DH-11 LINE NUMBER IN CONTROLLER
  11404					;
  11405					; INPUTS:
  11406					;
  11407					;	R4 -- DLS BLOCK OFFSET FOR THIS LINE
  11408					;	R1 -- ADDRESS OF DH-11 CSR
  11409					;
  11410					; OUTPUTS:
  11411					;
  11412					;	LINE NUMBER IS SET IN DH-11 CSR
  11413					;	R4 -- WORD INDEX FOR LINE NUMBER WITHIN CONTROLLER
  11414					;-
  11415
  11416	037576				.STDHL::
  11417	037576	006204 				ASR	R4		;;; COMPUTE DH-11
  11418	037600	006204 				ASR	R4		;;; LINE NUMBER
  11419	037602	006204 				ASR	R4		;;; SO
  11420	037604	042704 	177760 			BIC	#^C17,R4	;;; FLUSH EXTRANEOUS TRASH
  11421	037610	042711 	001077 			BIC	#1077,(R1)	;;; CLEAR LINE NUMBER REGISTER
  11422	037614	050411 				BIS	R4,(R1)		;;; SET LINE NUMBER
  11423	037616	006304 				ASL	R4		;;; CONVERT LINE NUMBER TO WORD INDEX
  11424	037620					RETURN			;;; TO CALLER
	037620	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 208
TTY DRIVER -- .DHSPD (DH-11 AUTO-BAUD SUPPORT)

  11426						.SBTTL	TTY DRIVER -- .DHSPD (DH-11 AUTO-BAUD SUPPORT)
  11427
  11428					;	.DHSPR -- RESET A DH-11 LINE TO DEFAULT AUTO-BAUD SPEED
  11429					;
  11430					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS DH-11 LINE
  11431					;
  11432
  11433						.ENABL	LSB
  11434
  11435	037622				.DHSPR::
  11436	037622	016546 	000004 			MOV	STSW0(R5),-(SP) ;;; SAVE LINE SPEED WORD AS FLAG
  11437	037626	010346 				MOV	R3,-(SP)	;;; SAVE R3
  11438	037630	012703 	016703 			MOV	#16703,R3	;;; DEFAULT LINE SPEED TO R3 (300 BAUD)
  11439	037634					CALL	.DHSPD		;;; SET IT
	037634	004737 	037702'			JSR	PC,.DHSPD
  11440	037640	012603 				MOV	(SP)+,R3	;;; RESTORE R3
  11441	037642	005726 				TST	(SP)+		;;; HAS THE TASK BEEN BLOCKED??
  11442	037644	100405 				BMI	10$		;;; YES -- DON'T COUNT THIS LINE
  11443					;
  11444					;	.DHSPF -- FLAG LINE SPEED TO BE REPORTED TO KL
  11445					;
  11446					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS DH-11 LINE
  11447					;
  11448
  11449	037646				.DHSPF::
  11450	037646	005237 	002600'			INC	.ABCNT		;;; INCREMENT THE COUNT
  11451	037652	052765 	100000 	000004 		BIS	#S0.ABR,STSW0(R5) ;;; [TC0 4.2284] FLAG THE LINE SPEED
  11452	037660				10$:
  11453	037660	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;;; [TCO 4.2140] IS PRIMARY PROTOCOL RUNNING??
  11454	037666	001433 				BEQ	30$		;;; [TCO 4.2140] NO -- GO ON
  11455	037670	052737 	004000 	006546'		BIS	#EF.RSS,TTYTSK+A.EF ;;; [TCO 4.2140] YES -- REQUEST THE TASK
  11456	037676	000137 	042444'			JMP	..DSEV		;;; DECLARE A SIGNIFICANT EVENT AND RETURN
  11457						;
  11458					;
  11459					;	.DHSPD -- SET LINE SPEED FOR A DH-11 LINE
  11460					;
  11461					;	R3 -- LINE SPEED TO BE SET
  11462					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS DH-11 LINE
  11463					;
  11464
  11465	037702				.DHSPD::
  11466	037702	010446 				MOV	R4,-(SP)	;;; SAVE R4
  11467	037704	010146 				MOV	R1,-(SP)	;;; AND R1
  11468	037706	010504 				MOV	R5,R4		;;; TABLE POINTER TO R4
  11469	037710	162704 	003046'			SUB	#DHTBL,R4	;;; COMPUTE DH-11 LINE NUMBER
  11470	037714	100416 				BMI	20$		;;; DON'T TOUCH DL-11
  11471	037716	016501 	000002 			MOV	TTYEXP(R5),R1	;;; EXTERNAL PAGE POINTER TO R1
  11472	037722	001413 				BEQ	20$		;;; QUIT IF NON-EXISTENT DEVICE
  11473	037724					CALL	.STDHL		;;; SET THE DH-11 LINE NUMBER
	037724	004737 	037576'			JSR	PC,.STDHL
  11474	037730	042703 	140000 			BIC	#S0.MSK,R3	;;; [TCO 4.2284] FLUSH STATUS BITS
  11475	037734	010361 	000004 			MOV	R3,4(R1)	;;; SET THE NEW LINE SPEED
  11476	037740	042765 	037777 	000004 		BIC	#^C<S0.MSK>,STSW0(R5) ;;; [TCO 4.2284] CLEAR OLD LINE SPEED
  11477	037746	050365 	000004 			BIS	R3,STSW0(R5)	;;; [TCO 4.2284] MARK IT IN LINE TABLE TOO
  11478	037752				20$:
  11479	037752	012601 				MOV	(SP)+,R1	;;; RESTORE R1
  11480	037754	012604 				MOV	(SP)+,R4	;;; AND R4
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 208-1
TTY DRIVER -- .DHSPD (DH-11 AUTO-BAUD SUPPORT)

  11481	037756				30$:
  11482	037756					RETURN			;;; TO CALLER
	037756	000207 				RTS	PC
  11483
  11484						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 209
TTY DRIVER -- $DMINT (DM11 MODEM CONTROL INTERRUPT)

  11486						.SBTTL	TTY DRIVER -- $DMINT (DM11 MODEM CONTROL INTERRUPT)
  11487
  11488					;+
  11489					; **-$DMINT-DM11-BB MODEM CONTROL MULTIPLEXER INTERRUPTS
  11490					;
  11491					;	THIS ROUTINE SERVICES INTERRUPTS FROM THE DM-11/BB MODEM CONTROLS
  11492					;	FOR THE FOLLOWING EVENTS:
  11493					;
  11494					;	1. DATA-SET RING
  11495					;	2. CARRIER DETECT TRANSITION
  11496					;	3. CARRIER DROP TRANSITION
  11497					;
  11498					;	ON DATA SET RING, IF THE DM-11/BB'S ARE NOT INHIBITED, THE FOLLOWING
  11499					;	IS DONE.
  11500					;
  11501					;	DATA-TERMINAL READY, DATA ENABLE AND RING ENABLE ARE SET FOR THE LINE.
  11502					;	THE LINE IS PUT INTO THE CARRIER-WAIT STATE.
  11503					;
  11504					;	ON CARRIER-DETECT TRANSITION THE FOLLOWING IS DONE:
  11505					;
  11506					;	THE LINE IS REMOVED FROM THE CARRIER-WAIT STATE.
  11507					;	IF THE LINE IS AN AUTO-BAUD LINE, IT IS PUT INTO AUTO-BAUD WAIT, OTHERWISE
  11508					;	A CONNECT MESSAGE IS TRANSMITTED TO THE KL10.
  11509					;
  11510					;	ON CARRIER-DROP, THE LINE IS PUT INTO THE CARRIER-WAIT STATE AND IS
  11511					;	TIMED-OUT BY THE TIME-OUT SERVICE IN ".DMTMO" (Q.V.)
  11512					;
  11513					;	ANY NON-RING INTERRUPT INITIATED WITHOUT DATA-TERMINAL READY BEING
  11514					;	SET WILL BE IGNORED.
  11515					;-
  11516
  11517						.ENABL	LSB
  11518
  11519	037760				$DMINT::			;;; [TCO 4.2055] REF LABEL
  11520	037760	013737 	177776 	002644'		MOV	@#PS,DMTMP	;;; [TCO 4.2055] SAVE CONTROLLER NUMBER
  11521	037766					CALL	R3,TTSAV	;;; [TCO 4.2055] SAVE REGISTERS
	037766	004337 	037156'			JSR	R3,TTSAV
  11522	037772	013703 	002644'			MOV	DMTMP,R3	;;; [TCO 4.2055] RETRIEVE SAVED PS WORD
  11523	037776	042703 	177760 			BIC	#177760,R3	;;; [TCO 4.2055] CLEAR ALL BUT CONTROLLER NUMBER
  11524	040002	006303 				ASL	R3		;;; [TCO 4.2055] CONVERT TO WORD INDEX
  11525	040004	006303 				ASL	R3		;;; [TCO 4.2055] SO
  11526	040006	016304 	002732'			MOV	DMTBL(R3),R4	;;; [TCO 4.2055] GET ADDRESS OF DM-11/BB CSR
  11527	040012	012405 				MOV	(R4)+,R5	;;; [TCO 4.2055] GET INTERRUPT STATUS
  11528	040014	010546 				MOV	R5,-(SP)	;;; [TCO 4.2055] COPY TO STACK
  11529	040016	042705 	177760 			BIC	#177760,R5	;;; [TCO 4.2055] CLEAR ALL BUT UNIT NUMBER
  11530	040022	006305 				ASL	R5		;;; [TCO 4.2055] CONVERT UNIT NUMBER TO WORD INDEX
  11531	040024	006305 				ASL	R5		;;; [TCO 4.2055] THUS
  11532	040026	006305 				ASL	R5		;;; [TCO 4.2055] AND SO
  11533	040030	066305 	002734'			ADD	DMTBL+2(R3),R5	;;; [TCO 4.2055] CALCULATE ADDRESS OF "DHTBL" ENTRY
  11534	040034	011402 				MOV	@R4,R2		;;; [TCO 4.2055] GET UNIT STATUS
  11535	040036	052714 	000001 			BIS	#1,(R4)		;;; [TCO 4.2055] JUST SET RING ENABLE FOR NOW
  11536	040042	005102 				COM	R2		;;; [TCO 4.2055] INVERT UNIT STATUS
  11537	040044	005726 				TST	(SP)+		;;; [TCO 4.2055] IS THIS A RING INTERRUPT??
  11538	040046	100012 				BPL	20$		;;; [TCO 4.2055] NO -- GO ON
  11539	040050	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;;; [TCO 4.2105] YES -- IS PRIMARY PROTOCOL RUNNING??
  11540	040056	001403 				BEQ	10$		;;; [TCO 4.2105] NO -- IGNORE INTERRUPT
  11541	040060	005737 	002576'			TST	.INHDM		;;; [TCO 4.2055] YES -- ARE DM-11/BB'S INHIBITED??
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 209-1
TTY DRIVER -- $DMINT (DM11 MODEM CONTROL INTERRUPT)

  11542	040064	001406 				BEQ	30$		;;; [TCO 4.2055] NO -- GO ON
  11543	040066				10$:
  11544	040066	042744 	001200 			BIC	#1200,-(R4)	;;; [TCO 4.2055] YES -- REENABLE SCANNING
  11545	040072	000440 				BR	60$		;;; [TCO 4.2055] AND EXIT
  11546						;
  11547					;
  11548					; HERE FOR A NON-RING INTERRUPT
  11549					;
  11550	040074				20$:
  11551	040074	032702 	000004 			BIT	#4,R2		;;; [TCO 4.2055] IS REQUEST TO SEND UP??
  11552	040100	001372 				BNE	10$		;;; [TCO 4.2055] NO -- JUST REENABLE SCAN AND EXIT
  11553					;
  11554					; HERE FOR A RING INTERRUPT OR AN ALLOWABLE NON-RING INTERRUPT
  11555					;
  11556	040102				30$:
  11557	040102	052714 	000007 			BIS	#7,(R4)		;;; [TCO 4.2055] SET RTS + DE + RE
  11558	040106	042744 	001200 			BIC	#1200,-(R4)	;;; [TCO 4.2055] REENABLE SCANNING
  11559	040112	005702 				TST	R2		;;; [TCO 4.2055] RING INTERRUPT??
  11560	040114	100022 				BPL	.TTRNG		;;; [TCO 4.2055] YES -- GO HANDLE IT
  11561	040116	032702 	000140 			BIT	#140,R2		;;; [TCO 4.2055] NO -- CARRIER AND CLEAR TO SEND SET?
  11562	040122	001021 				BNE	.TTSCW		;;; [TCO 4.2055] IF .NE. NO (MUST BE CARRIER DROP)
  11563					;
  11564					; CARRIER ON TRANSITION
  11565					;
  11566	040124	042765 	002004 	000006 		BIC	#TT.CRW!TT.RIP,STSW1(R5) ;;; [TCO 4.2055] CLEAR CARRIER WAIT
  11567	040132	032765 	040000 	000004 		BIT	#S0.CON,STSW0(R5) ;;; [TCO 4.2309] WAS LINE ALREADY CONNECTED??
  11568	040140	001015 				BNE	60$		;;; [TCO 4.2309] YES -- LEAVE IT ALONE
  11569	040142	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ;;; [TCO 4.2055] NO -- IS THIS AN AUTO-BAUD LINE??
  11570	040150	001412 				BEQ	.STTYD		;;; [TCO 4.2055] NO -- REPORT CONNECTION AND EXIT
  11571	040152	052765 	000010 	000006 		BIS	#TT.ABW,STSW1(R5) ;;; [TCO 4.2055] YES -- MARK AUTO-BAUD WAIT
  11572	040160	000405 				BR	60$		;;; [TCO 4.2055] AND EXIT
  11573						;
  11574					;
  11575					; RING TRANSITION (DM-11/BB'S ENABLED)
  11576					;
  11577	040162				.TTRNG:
  11578	040162					CALL	.STTYH		;;; [TCO 4.2055] TRANSMIT HANGUP
	040162	004737 	040212'			JSR	PC,.STTYH
  11579					;
  11580					; CARRIER DROP TRANSITION
  11581					;
  11582	040166				.TTSCW:
  11583	040166	052765 	002004 	000006 		BIS	#TT.CRW!TT.RIP,STSW1(R5) ;;; [TCO 4.2055] SET CARRIER WAIT
  11584	040174				60$:
  11585	040174					RETURN			;;; [TCO 4.2055] DISMISS AND RETURN
	040174	000207 				RTS	PC
  11586
  11587						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 210
TTY DRIVER -- .STTYD (DIALUP/HANGUP SERVICE)

  11589						.SBTTL	TTY DRIVER -- .STTYD (DIALUP/HANGUP SERVICE)
  11590
  11591					;+
  11592					; .STTYD -- DILAUP SERVICE
  11593					; .STTYH -- HANGUP SERVICE
  11594					;
  11595					; THESE SUBROUTINES WILL REPORT A DILAUP OR HANGUP TO THE KL10
  11596					;
  11597					; INPUTS:
  11598					;
  11599					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  11600					;
  11601					; OUTPUTS:
  11602					;
  11603					;	R4,R3,R1 ALTERED
  11604					;-
  11605
  11606						.ENABL	LSB
  11607
  11608	040176				.STTYD::
  11609	040176	052765 	040000 	000004 		BIS	#S0.CON,STSW0(R5) ;;; [TCO 4.2284] MARK LINE CONNECT
  11610	040204	012701 	000015 			MOV	#BC.TDU,R1	;;; DIALUP FUNCTION
  11611	040210	000405 				BR	10$		;;; DO COMMON CODE
  11612						;
  11613	040212				.STTYH::
  11614	040212	042765 	040000 	000004 		BIC	#S0.CON,STSW0(R5) ;;; [TCO 4.2284] MARK LINE DISCONNECT
  11615	040220	012701 	000016 			MOV	#BC.THU,R1	;;; HANGUP FUNCTION
  11616	040224				10$:
  11617	040224	010504 				MOV	R5,R4		;;; SET UP TO RETURN DIALUP OR HANGUP
  11618	040226	162704 	002776'			SUB	#DLTBL,R4	;;; FIND UNIT NUMBER IN R4
  11619	040232	006204 				ASR	R4		;;; DIVIDE BY 8
  11620	040234	006204 				ASR	R4		;;;
  11621	040236	006204 				ASR	R4		;;; SO
  11622	040240	012703 	000004 			MOV	#D.CDLS,R3	;;; DATA LINE SCANNER
  11623	040244	000137 	044242'			JMP	..STFC		;;; START FUNCTION AND EXIT
  11624						;
  11625
  11626						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 211
TTY DRIVER -- .DMHUP (DM11 HANGUP)

  11628						.SBTTL	TTY DRIVER -- .DMHUP (DM11 HANGUP)
  11629					;+
  11630					; SUBROUTINE TO HANG UP A DM11-BB UNIT IF NOT READY
  11631					;
  11632					; INPUTS:
  11633					;
  11634					;	R1 -- POINTER TO DM-11/BB CSR
  11635					;	R4 -- DM-11/BB UNIT NUMBER
  11636					;	R5 -- POINTER TO DLS TABLE ENTRY FOR THIS LINE
  11637					;
  11638					; OUTPUTS:
  11639					;
  11640					;	NO REGISTERS ALTERED
  11641					;-
  11642
  11643						.ENABL	LSB
  11644
  11645	040250				.DMHUP::
  11646	040250	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ;;; REMOTE TTY??
  11647	040256	001441 				BEQ	20$		;;; NO -- FORGET IT
  11648	040260	042711 	001040 			BIC	#1040,@R1	;;; YES -- DISABLE SCAN
  11649	040264				10$:
  11650	040264	032711 	000020 			BIT	#20,@R1		;;; SCAN STOPPED??
  11651	040270	001375 				BNE	10$		;;; NO -- WAIT FOR IT
  11652	040272	042711 	001017 			BIC	#1017,@R1	;;; YES -- CLEAR CURRENT UNIT
  11653	040276	050421 				BIS	R4,(R1)+ 	;;; SELECT DESIRED UNIT
  11654	040300	012711 	000001 			MOV	#1,@R1		;;; ENABLE RING INTERRUPT
  11655	040304	052741 	000140 			BIS	#140,-(R1)	;;; RESTART SCAN AND ENABLE INTERRUPTS
  11656	040310	000433 				BR	DLHUPX		;;; RESET THE LINE STATE AND EXIT
  11657						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 212
TTY DRIVER -- .DLHUP (DL11E HANGUP)

  11659						.SBTTL	TTY DRIVER -- .DLHUP (DL11E HANGUP)
  11660					;+
  11661					; THIS ROUTINE SERVICES A DL11-E HANGUP REQUEST.
  11662					; IF THE KLINIK LINE IS ACTIVE, THE KLINIK DISCONNECT TASK, KLDISC, IS
  11663					; REQUESTED. OTHERWISE THE LINE IS HUNG UP HERE
  11664					;
  11665					; INPUT ARGUMENTS:
  11666					;
  11667					;	R5 POINTS TO THE DLS TABLE ENTRY FOR THIS LINE
  11668					;
  11669					; OUTPUT ARGUMENTS:
  11670					;
  11671					;	R4 -- POINTER TO DL11 CSR
  11672					;-
  11673
  11674	040312				.DLHUP::
  11675	040312	032765 	000100 	000006 		BIT	#TT.RMT,STSW1(R5) ;;; REMOTE LINE??
  11676	040320	001420 				BEQ	20$		;;; NO -- FORGET IT
  11677	040322	016504 	000002 			MOV	TTYEXP(R5),R4	;;; YES -- SAVE I/O PAGE ADDRESS
  11678	040326	023705 	002636'			CMP	KLNPTR,R5	;;; IS THIS THE KLINIK LINE??
  11679	040332	001014 				BNE	30$		;;; NO -- GO ON
  11680	040334	105737 	001224'			TSTB	.KLNSW+0	;;; YES -- IS IT ACTIVE??
  11681	040340	001411 				BEQ	30$		;;; INACTIVE -- JUST HANG IT UP
  11682	040342	112737 	000002 	001225'		MOVB	#2,.KLNSW+1	;;; FLAG THE DISCONNECT
  11683	040350	052737 	002000 	006546'		BIS	#EF.RKH,TTYTSK+A.EF ;;; REQUEST KLDISC
  11684	040356	000137 	042444'			JMP	..DSEV		;;; DECLARE A SIGNIFICANT EVENT AND EXIT
  11685						;
  11686	040362				20$:
  11687	040362					RETURN			;;; AND GO AWAY
	040362	000207 				RTS	PC
  11688	040364				30$:
  11689	040364	005764 	000002 			TST	2(R4)		;;; CLEAR INPUT FLAGS
  11690	040370	012714 	000140 			MOV	#DL.DEN!DL.REN,(R4) ;;; HANG THE LINE UP
  11691	040374	105065 	000004 			CLRB	STSW0+0(R5)	;;; [TCO 4.2284] ENABLE INPUT SIDE IF IT WASN'T
  11692	040400				DLHUPX:
  11693	040400	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;;; PRIMARY PROTOCOL RUNNING?
  11694	040406	001413 				BEQ	40$		;;; NO -- WAIT FOR IT
  11695	040410	042765 	002414 	000006 		BIC	#TT.CRW!TT.NSA!TT.ABW!TT.RIP,STSW1(R5) ;;; YES -- CLEAR CARRIER WAIT
  11696	040416	010446 				MOV	R4,-(SP)
  11697	040420	010346 				MOV	R3,-(SP)	;;; SAVE REGISTERS
  11698	040422	010146 				MOV	R1,-(SP)
  11699	040424					CALL	.STTYH		;;; TELL THE KL ABOUT HANGUP
	040424	004737 	040212'			JSR	PC,.STTYH
  11700	040430	012601 				MOV	(SP)+,R1	;;; RESTORE
  11701	040432	012603 				MOV	(SP)+,R3
  11702	040434	012604 				MOV	(SP)+,R4
  11703	040436				40$:
  11704	040436	000137 	041464'			JMP	.TTRST		;;; [TCO 4.2205] RESET THE LINE STATE AND EXIT
  11705						;
  11706
  11707						.DSABL	LSB
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 213
TTY DRIVER -- .DLTMO (DL11-E MODEM CONTROL TIMEOUT)

  11709						.SBTTL	TTY DRIVER -- .DLTMO (DL11-E MODEM CONTROL TIMEOUT)
  11710					;+
  11711					; THIS ROUTINE INSURES THAT THE CTY IS RUNNING AND TIMES OUT THE
  11712					; DL11-E LINE WHEN CARRIER IS LOST.
  11713					;
  11714					; INPUTS:
  11715					;
  11716					;	NONE
  11717					;
  11718					; OUTPUTS:
  11719					;
  11720					;	NONE
  11721					;
  11722					; NOTE:
  11723					;
  11724					;	THIS ROUTINE MUST BE CALLED AT BR5 OR HIGHER
  11725					;	NXM VECTOR IS ALTERED DURING POWER FAIL RECOVERY
  11726					;-
  11727
  11728	040442				.DLTMO::
  11729	040442	012705 	002776'			MOV	#DLTBL,R5	;;; GET LOCAL DL11C POINTER
  11730	040446	016504 	000002 			MOV	TTYEXP(R5),R4	;;; AND EXTERNAL PAGE POINTER
  11731	040452	001413 				BEQ	20$		;;; IF NO ONE HAS THE LINE
  11732	040454					CALL	105$		;;; [TCO 4.2309] CHECK INPUT ENABLE
	040454	004737 	040660'			JSR	PC,105$
  11733	040460				10$:
  11734	040460	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; ENABLE XMTR INTERRUPTS
  11735	040466	005737 	001030'			TST	.PFIOW		;;; IS THIS A POWER FAIL START??
  11736	040472	001403 				BEQ	20$		;;; NO -- GO ON
  11737	040474	012737 	040650'	000004 		MOV	#100$,@#4	;;; YES -- SET NXM TRAP FOR DEVICE CHECKS
  11738	040502				20$:
  11739	040502	012705 	003006'			MOV	#DLETBL,R5	;;; GET DL11-E TABLE POINTER
  11740	040506	012700 	000004 			MOV	#DLECNT,R0	;;; COUNT OF DL11-E'S TO R0
  11741	040512	001455 				BEQ	90$		;;; GO AWAY IF NO DL11-E'S
  11742	040514				30$:
  11743	040514	016504 	000002 			MOV	TTYEXP(R5),R4	;;; EXTERNAL PAGE POINTER TO R4
  11744	040520	001447 				BEQ	80$		;;; TRY NEXT IF THIS ONE ISN'T THERE
  11745	040522	052714 	000040 			BIS	#DL.DEN,(R4)	;;; ENABLE DATASET INTERRUPTS
  11746	040526	052764 	000100 	000004 		BIS	#DL.XEN,4(R4)	;;; SO
  11747	040534					CALL	105$		;;; [TCO 4.2309] CHECK INPUT ENABLES
	040534	004737 	040660'			JSR	PC,105$
  11748	040540				40$:
  11749	040540	005737 	001030'			TST	.PFIOW		;;; POWER FAIL??
  11750	040544	001417 				BEQ	60$		;;; NO -- GO ON
  11751	040546	032714 	010000 			BIT	#DL.CAR,(R4)	;;; YES -- IS CARRIER DETECT UP??
  11752	040552	001406 				BEQ	50$		;;; [TCO 4.2055] NO -- GO ON
  11753	040554	032714 	000004 			BIT	#DL.RTS,(R4)	;;; [TCO 4.2055] YES -- IS REQUEST TO SEND UP??
  11754	040560	001411 				BEQ	60$		;;; [TCO 4.2055] NO -- GO ON
  11755	040562	052714 	000006 			BIS	#DL.DTR!DL.RTS,(R4) ;;; YES -- ENABLE THIS DL11-E LINE
  11756	040566	000424 				BR	80$		;;; AND TRY THE NEXT ONE
  11757						;
  11758	040570				50$:				;;; [TCO 4.2055]
  11759	040570	032714 	000002 			BIT	#DL.DTR,(R4)	;;; IS DATA TERMINAL READY UP??
  11760	040574	001403 				BEQ	60$		;;; NO -- GO ON
  11761	040576					CALL	.TTSCW		;;; [TCO 4.2309] YES -- SET CARRIER WAIT STATE
	040576	004737 	040166'			JSR	PC,.TTSCW
  11762	040602	000416 				BR	80$		;;; AND DO THE NEXT LINE
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 213-1
TTY DRIVER -- .DLTMO (DL11-E MODEM CONTROL TIMEOUT)

  11763						;
  11764	040604				60$:
  11765	040604	032765 	000004 	000006 		BIT	#TT.CRW,STSW1(R5) ;;; WAITING FOR CARRIER??
  11766	040612	001412 				BEQ	80$		;;; NO -- GO ON
  11767	040614	032765 	002000 	000006 		BIT	#TT.RIP,STSW1(R5) ;;; YES -- IS THIS THE FIRST TIME??
  11768	040622	001404 				BEQ	70$		;;; NO -- GO HANG THE LINE UP
  11769	040624	042765 	002000 	000006 		BIC	#TT.RIP,STSW1(R5) ;;; YES -- SET TIMEOUT REQUEST
  11770	040632	000402 				BR	80$		;;; AND TRY THE NEXT LINE
  11771						;
  11772	040634				70$:
  11773	040634					CALL	.DLHUP		;;; HANG UP THE LINE
	040634	004737 	040312'			JSR	PC,.DLHUP
  11774	040640				80$:
  11775	040640	062705 	000010 			ADD	#^D8,R5		;;; POINT TO THE NEXT DLS ENTRY
  11776	040644	077055 				SOB	R0,30$		;;; DO THE NEXT LINE
  11777	040646				90$:
  11778	040646					RETURN
	040646	000207 				RTS	PC
  11779	040650				100$:				;;; HERE ON NXM INTERRUPT
  11780	040650	022626 				CMP	(SP)+,(SP)+	;;; CLEAR THE INTERRUPT
  11781	040652	005065 	000002 			CLR	TTYEXP(R5)	;;; SET NON-EXISTENT DEVICE
  11782	040656	000770 				BR	80$		;;; AND TRY FOR NEXT LINE
  11783						;
  11784	040660				105$:
  11785	040660	005737 	001030'			TST	.PFIOW		;;; [TCO 4.2309] IS THIS A POWER-FAIL RESTART??
  11786	040664	001404 				BEQ	110$		;;; [TCO 4.2309] NO -- GO ON
  11787	040666	105065 	000004 			CLRB	STSW0(R5)	;;; [TCO 4.2309] YES -- ENABLE INPUT
  11788	040672					CALL	.TTRST		;;; [TCO 4.2309] RESET THIS LINE
	040672	004737 	041464'			JSR	PC,.TTRST
  11789	040676				110$:
  11790	040676	105765 	000004 			TSTB	STSW0(R5)	;;; [TCO 4.2309] INPUT ENABLED??
  11791	040702	001002 				BNE	115$		;;; [TCO 4.2309] NO -- GO ON
  11792	040704	052714 	000100 			BIS	#DL.REN,(R4)	;;; [TCO 4.2309] YES -- ENABLE INTERRUPTS
  11793	040710				115$:
  11794	040710					RETURN
	040710	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 214
TTY DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  11796						.SBTTL	TTY DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)
  11797
  11798					;+
  11799					; .DHTMO -- DH-11 CONTROLLER TIMEOUT
  11800					;
  11801					; THIS SUBROUTINE IS CALLED FROM THE POWER-FAIL RESTART CODE, AND EVERY 10
  11802					; SECONDS FROM THE TERMINAL SERVICE DISPATCH.  THIS SUBROUTINE PERFORMS THE
  11803					; FOLLWING FUNCTIONS:
  11804					;
  11805					;	1. DH-11 CONTROLLER INITIALIZATION
  11806					;	2. DM-11/BB INTIALIZATION
  11807					;	3. DH-11 STATUS MAINTENANCE
  11808					;	4. DH-11 INPUT RESTART
  11809					;	5. DM-11/BB STATUS MAINTENANCE
  11810					;	6. DM-11/BB CARRIER POLLING AND MAINTENANCE
  11811					;	7. DH-11 ERROR LOGGING
  11812					;
  11813					; INPUTS:
  11814					;
  11815					;	NONE
  11816					;
  11817					; OUTPUTS:
  11818					;
  11819					; ALL DH-11 CONTROLLERS ARE SCANNED FOR INTERRUPT ENABLE OR NXM.  IF THE
  11820					; INTERRUPT ENABLE IS NOT PRESENT OR THE DH-11 CONTROLLER HAS ENCOUNTERED
  11821					; AN NXM, THE CONTROLLER IS (RE)INITIALIZED.  IF THIS IS A POWER-FAIL RESTART
  11822					; THE LINE STATUS IS RESET AND THE OUTPUT QUEUES FOR ALL LINES ON THE CONTROLLER
  11823					; ARE DEALLOCATED, OTHERWISE THESE CONDITIONS WILL BE LOGGED AS AN ERROR.
  11824					; IF THE DH-11 LINE HAS AN INPUT RESTART PENDING, THE LINE SPEED IS SET UP SO
  11825					; NORMAL INPUT MAY PROCEED.
  11826					;
  11827					; ALL DM-11/BB CONTROLLERS ARE SCANNED FOR INTERRUPT ENABLE AND CARRIER
  11828					; MAINTENANCE.  IF A CARRIER TIMEOUT HAS OCCURRED, THE UNIT IS HUNG UP AND,
  11829					; IF THE LINE IS AN AUTO-BAUD LINE, IS SPEED IS RESET TO DEFAULT.
  11830					;
  11831					; NO REGISTERS ARE PRESERVED
  11832					;
  11833					; NOTE:
  11834					;	THIS ROUTINE MUST BE CALLED AT BR5 OR HIGHER
  11835					;
  11836					; NOTE:
  11837					;	THE NXM VECTOR IS ALTERED ON POWER-FAIL RESTART.  IT IS ASSUMED THAT
  11838					;	THIS VECTOR WILL BE RESET BY THE CALLING ROUTINE.
  11839					;
  11840					; NOTE:
  11841					;	THIS ROUTINE WILL EXIT THROUGH THE DM-11/BB TIMEOUT ROUTINE, BELOW
  11842					;-
  11843
  11844	040712				.DHTMO::
  11845	040712	012700 	002732'			MOV	#DMTBL,R0	;;; [TCO 4.2205] SET UP DM-11/BB TABLE POINTER
  11846	040716	012701 	003046'			MOV	#DHTBL,R1	;;; [TCO 4.2205] SET UP DH-11 TABLE POINTER
  11847	040722	005737 	001030'			TST	.PFIOW		;;; [TCO 4.2205] POWER-FAIL RESTART??
  11848	040726	001403 				BEQ	10$		;;; [TCO 4.2205] NO -- GO ON
  11849	040730	012737 	041176'	000004 		MOV	#DMTNXM,@#4	;;; [TCO 4.2205] YES -- HANDLE OUR OWN TRAPS
  11850					;
  11851					; INITIALIZE FOR CURRENT DH-11 CONTROLLER
  11852					;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 214-1
TTY DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  11853	040736				10$:
  11854	040736	005002 				CLR	R2		;;; [TCO 4.2205] INIT UNIT COUNTER
  11855	040740	005046 				CLR	-(SP)		;;; [TCO 4.2205] INIT RESET FLAG ON STACK
  11856	040742	012705 	000020 			MOV	#^D16,R5	;;; [TCO 4.2205] INIT ITERATION COUNTER
  11857					;
  11858					; INITIALIZE FOR CURRENT DH-11 LINE
  11859					;
  11860					; REGISTER SUMMARY:
  11861					;
  11862					;	R0 -- POINTER TO DM-11/BB TABLE
  11863					;	R1 -- POINTER TO DH-11 TABLE
  11864					;	R2 -- UNIT COUNTER
  11865					;	R3 -- LINE SPEED WORD
  11866					;	R4 -- I/O PAGE POINTER
  11867					;	R5 -- AUXILLIARY DH-11 TABLE POINTER
  11868					;	(SP) -- CONTROLLER RESET FLAG
  11869					;		MUST BE FLUSHED ON EXIT
  11870					;
  11871	040746				20$:
  11872	040746	016104 	000002 			MOV	TTYEXP(R1),R4	;;; [TCO 4.2205] GET EXTERNAL PAGE POINTER FOR THIS DH-11
  11873	040752	001510 				BEQ	90$		;;; [TCO 4.2205] ALL DONE IF .EQ. 0
  11874	040754	042714 	001077 			BIC	#1077,(R4)	;;; [TCO 4.2205] CLEAR OUT PREVIOUS LINE NUMBER
  11875	040760	050214 				BIS	R2,(R4)		;;; [TCO 4.2205] AND SET THE CURRENT LINE NUMBER
  11876	040762	005716 				TST	(SP)		;;; [TCO 4.2205] HAVE WE RESET THIS DH-11??
  11877	040764	001022 				BNE	40$		;;; [TCO 4.2205] YES -- CONTINUE SETTING LINES UP
  11878	040766	032714 	002000 			BIT	#2000,(R4)	;;; [TCO 4.2205] NO -- DID IT GET AN NXM??
  11879	040772	001003 				BNE	30$		;;; [TCO 4.2205] YES -- HANDLE AS A TIMEOUT
  11880	040774	032714 	000100 			BIT	#100,(R4)	;;; [TCO 4.2205] NO -- ARE INTERRUPTS ENABLED??
  11881	041000	001025 				BNE	50$		;;; [TCO 4.2205] YES -- CHECK FOR REMOTE LINE
  11882	041002				30$:
  11883	041002	005737 	001030'			TST	.PFIOW		;;; [TCO 4.2205] NO -- IS THIS A POWER-FAIL RESTART??
  11884	041006	001004 				BNE	35$		;;; [TCO 4.2205] YES -- GO ON
  11885	041010	012703 	002100 			MOV	#DV.LOG!DV.LIN,R3 ;;; [TCO 4.2245] SET STANDARD STATUS
  11886	041014					CALL	.TTERL		;;; [TCO 4.2245] LOG THE ERROR
	041014	004737 	041356'			JSR	PC,.TTERL
  11887					;
  11888					; HERE TO RESET AND INITIALIZE A DH-11 CONTROLLER
  11889					;
  11890	041020				35$:
  11891	041020	012714 	004000 			MOV	#4000,(R4)	;;; [TCO 4.2205] MASTER CLEAR THE DH-11
  11892	041024	005064 	000016 			CLR	16(R4)		;;; [TCO 4.2205] INIT THE SILO ALARM TO ZERO
  11893	041030	005316 				DEC	(SP)		;;; [TCO 4.2205] INDICATE THAT WE HAVE RESET THIS DH-11
  11894					;
  11895					; HERE TO RESET AND INITIALIZE A DH-11 LINE
  11896					;
  11897	041032				40$:
  11898	041032	005737 	001030'			TST	.PFIOW		;;; [TCO 4.2205] IS THIS A POWER-FAIL RESTART??
  11899	041036	001412 				BEQ	55$		;;; [TCO 4.2205] NO -- GO ON
  11900	041040	010546 				MOV	R5,-(SP)	;;; [TCO 4.2205] YES -- SAVE R5
  11901	041042	010105 				MOV	R1,R5		;;; [TCO 4.2205] COPY DLS POINTER TO R5
  11902	041044					CALL	.TTRST		;;; [TCO 4.2205] RESET THIS LINE
	041044	004737 	041464'			JSR	PC,.TTRST
  11903	041050	012605 				MOV	(SP)+,R5	;;; [TCO 4.2205] RESTORE R5
  11904	041052	000404 				BR	55$		;;; [TCO 4.2205] AND SET UP THE LINE SPEED
  11905						;
  11906					;
  11907					; HERE TO CHECK FOR LINE RESTART
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 214-2
TTY DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  11908					;
  11909	041054				50$:
  11910	041054	032761 	020000 	000006 		BIT	#TT.RSI,STSW1(R1) ;;; [TCO 4.2205] DOES THIS LINE NEED RESTARTING??
  11911	041062	001411 				BEQ	60$		;;; [TCO 4.2205] NO -- GO ON
  11912	041064				55$:
  11913	041064	016103 	000004 			MOV	STSW0(R1),R3	;;; [TCO 4.2205] YES -- GET THE LINE SPEED
  11914	041070	042703 	140000 			BIC	#S0.MSK,R3	;;; [TCO 4.2284] GET RID OF THE AUTO-BAUD FLAG
  11915	041074	010364 	000004 			MOV	R3,4(R4)	;;; [TCO 4.2205] SET THE LINE SPEED IN THE DH-11
  11916	041100	042761 	020000 	000006 		BIC	#TT.RSI,STSW1(R1) ;;; [TCO 4.2205] AND RESET THE RESTART FLAG
  11917					;
  11918					; HERE TO CHECK A REMOTE LINE
  11919					;
  11920	041106				60$:
  11921	041106	032761 	000100 	000006 		BIT	#TT.RMT,STSW1(R1) ;;; [TCO 4.2205] IS THIS A REMOTE LINE??
  11922	041114	001414 				BEQ	70$		;;; [TCO 4.2205] NO -- GO ON
  11923	041116	011003 				MOV	(R0),R3		;;; [TCO 4.2205] YES -- POINT TO DM-11/BB CSR
  11924	041120	010223 				MOV	R2,(R3)+	;;; [TCO 4.2205] SET THE UNIT NUMBER
  11925	041122	000240 				NOP			;;; [TCO 4.2205] INSURE SCAN HAS SETTLED
  11926	041124	052713 	000001 			BIS	#1,(R3)		;;; [TCO 4.2205] ENABLE DATA-SET INTERRUPTS
  11927	041130	032713 	000004 			BIT	#4,(R3)		;;; [TCO 4.2205] IS REQUEST-TO-SEND UP??
  11928	041134	001402 				BEQ	65$		;;; [TCO 4.2205] NO -- GO ON
  11929	041136	012713 	000007 			MOV	#7,(R3)		;;; [TCO 4.2205] YES -- ENABLE LINE
  11930	041142				65$:
  11931	041142	012743 	000140 			MOV	#140,-(R3)	;;; [TCO 4.2205] ENABLE SCAN
  11932	041146				70$:
  11933	041146	005202 				INC	R2		;;; [TCO 4.2205] NEXT UNIT
  11934	041150	062701 	000010 			ADD	#^D8,R1		;;; [TCO 4.2205] NEXT DH-11 LINE IN DLS TABLE
  11935	041154	005305 				DEC	R5		;;; [TCO 4.2205] ITERATE THROUGH THIS DH-11/DM-11 PAIR
  11936	041156	001273 				BNE	20$		;;; [TCO 4.2205] SO
  11937	041160	005726 				TST	(SP)+		;;; [TCO 4.2205] DONE -- FLUSH AND TEST CONTROLLER RESET FLAG
  11938	041162	001402 				BEQ	80$		;;; [TCO 4.2205] GO ON IF DH-11 WASN'T RESET
  11939	041164	012714 	030100 			MOV	#30100,(R4)	;;; [TCO 4.2205] WAS RESET -- ENABLE IT
  11940	041170				80$:
  11941	041170	032020 				BIT	(R0)+,(R0)+	;;; [TCO 4.2205] NEXT DM-11/BB IN TABLE
  11942	041172	000661 				BR	10$		;;; [TCO 4.2205] START OVER
  11943						;
  11944	041174				90$:
  11945	041174	034646 				BIT	-(SP),-(SP)	;;; [TCO 4.2205] DUMMY PS/PC TO STACK
  11946					;	BR	DMTNXM		;;; [TCO 4.2205] FAKE THE NXM TRAP
  11947						;
  11948					;
  11949					; HERE ON TRAP-AT-4 DURING INITIALIZATION OR END OF DH-11 TABLE DURING TIMEOUT
  11950					;
  11951					;	R1 -- POINTS TO FIRST INVALID ENTRY IN DHTBL
  11952					;
  11953					; STACK SUMMARY:
  11954					;
  11955					;	0(SP) -- TRAP PC
  11956					;	2(SP) -- TRAP PSW
  11957					;	4(SP) -- INITIALIZATION FLAG FROM .DHTMO, ABOVE
  11958
  11959	041176				DMTNXM:
  11960	041176	005061 	000002 			CLR	2(R1)		;;; [TCO 4.2205] INDICATE THIS IS THE LAST DH-11
  11961	041202	162701 	003046'			SUB	#DHTBL,R1	;;; [TCO 4.2205] COMPUTE OFFSET INTO TABLE
  11962	041206	006201 				ASR	R1		;;; [TCO 4.2205] COMPUTE LINE COUNT
  11963	041210	006201 				ASR	R1
  11964	041212	006201 				ASR	R1
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 214-3
TTY DRIVER -- .DHTMO (DH-11 CONTROLLER TIMEOUT)

  11965	041214	010137 	007464'			MOV	R1,.DQDH0+Q.DZ	;;; [TCO 4.2205] SET THE LINE COUNT
  11966	041220	062701 	000005 			ADD	#DLCNT,R1	;;; [TCO 4.2205] COMPUTE COUNT OF TTYS
  11967	041224	010137 	007424'			MOV	R1,.DQPBA+Q.DZ	;;; [TCO 4.2205] AND SET IT
  11968	041230	010137 	007504'			MOV	R1,.DQDLS+Q.DZ	;;; [TCO 4.2205] HERE TOO
  11969	041234	032626 				BIT	(SP)+,(SP)+	;;; [TCO 4.2205] FLUSH PS/PC
  11970	041236	005726 				TST	(SP)+		;;; [TCO 4.2205] AND INITIALIZATION FLAG
  11971	041240					RETURN			;;; [TCO 4.2309] AND EXIT
	041240	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 215
TTY DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)

  11973						.SBTTL	TTY DRIVER -- .DMTMO (DM-11/BB MODEM CONTROL TIMEOUT)
  11974
  11975					;+
  11976					; .DMTMO -- DM-11/BB CARRIER WAIT TIMEOUT
  11977					;
  11978					; INPUTS:
  11979					;
  11980					;	NONE
  11981					;
  11982					; OUTPUTS:
  11983					;
  11984					;	NO REGISTERS PRESERVED
  11985					;
  11986					; REGISTER SUMMARY:
  11987					;
  11988					;	R0 -- DM-11/BB TABLE POINTER
  11989					;	R1 -- POINTER TO DM-11/BB CSR
  11990					;	R4 -- UNIT NUMBER
  11991					;	R5 -- POINTER TO DLS TABLE ENTRY FOR THIS LINE
  11992					;-
  11993
  11994	041242				.DMTMO::
  11995	041242	012700 	002732'			MOV	#DMTBL,R0	;;; [TCO 4.2206] INIT DM-11/BB TABLE POINTER
  11996	041246	005737 	007464'			TST	.DQDH0+Q.DZ	;;; [TCO 4.2206] ANY DH-11 LINES??
  11997	041252	001440 				BEQ	50$		;;; [TCO 4.2206] NO -- JUST EXIT
  11998	041254				10$:
  11999	041254	012001 				MOV	(R0)+,R1	;;; [TCO 4.2206] POINT TO DM-11/BB CSR
  12000	041256	012005 				MOV	(R0)+,R5	;;; [TCO 4.2206] POINT TO DHTBL ENTRY
  12001	041260	005004 				CLR	R4		;;; [TCO 4.2206] INIT UNIT NUMBER
  12002	041262				20$:
  12003	041262	005765 	000002 			TST	TTYEXP(R5)	;;; [TCO 4.2206] THIS DH-11 EXIST??
  12004	041266	001432 				BEQ	50$		;;; [TCO 4.2206] NO -- EXIT
  12005	041270	032765 	000004 	000006 		BIT	#TT.CRW,STSW1(R5) ;;; [TCO 4.2206] WAITING FOR CARRIER??
  12006	041276	001417 				BEQ	40$		;;; [TCO 4.2206] NO -- GO ON
  12007	041300	032765 	002000 	000006 		BIT	#TT.RIP,STSW1(R5) ;;; [TCO 4.2206] YES -- TIMING OUT??
  12008	041306	001010 				BNE	30$		;;; [TCO 4.2206] NO -- GO ON
  12009	041310					CALL	.DMHUP		;;; [TCO 4.2206] HANG UP THE LINE
	041310	004737 	040250'			JSR	PC,.DMHUP
  12010	041314	032765 	000040 	000006 		BIT	#TT.ABL,STSW1(R5) ;;; [TCO 4.2206] IS THIS AN AUTO-BAUD LINE??
  12011	041322	001405 				BEQ	40$		;;; [TCO 4.2206] NO -- GO ON
  12012	041324					CALL	.DHSPR		;;; [TCO 4.2206] YES -- RESET THE LINE SPEED TO DEFAULT
	041324	004737 	037622'			JSR	PC,.DHSPR
  12013	041330				30$:
  12014	041330	042765 	002000 	000006 		BIC	#TT.RIP,STSW1(R5) ;;; [TCO 4.2206] MARK OR CLEAR TIMEOUT REQUEST
  12015	041336				40$:
  12016	041336	062705 	000010 			ADD	#^D8,R5		;;; [TCO 4.2206] POINT TO NEXT DHTBL ENTRY
  12017	041342	005204 				INC	R4		;;; [TCO 4.2206] INCREMENT UNIT NUMBER
  12018	041344	022704 	000020 			CMP	#^D16,R4	;;; [TCO 4.2206] HAVE WE OVERFLOWED??
  12019	041350	003344 				BGT	20$		;;; [TCO 4.2206] NO -- GO ON
  12020	041352	000740 				BR	10$		;;; [TCO 4.2206] YES -- START NEXT UNIT
  12021						;
  12022	041354				50$:
  12023	041354					RETURN			;;; [TCO 4.2206] TO CALLER
	041354	000207 				RTS	PC
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 216
TTY DRIVER -- .TTERL (TERMINAL ERROR LOGGING)

  12025						.SBTTL	TTY DRIVER -- .TTERL (TERMINAL ERROR LOGGING)
  12026
  12027					;+
  12028					; .TTERL -- TERMINAL ERROR LOGGING
  12029					;
  12030					; THIS SUBROUTINE WILL ENTER A TERMINAL ERROR REPORT IN THE TERMINAL
  12031					; ERROR LOGGING QUEUE.
  12032					;
  12033					; INPUTS:
  12034					;
  12035					;	R4 -- I/O PAGE POINTER FOR THIS DEVICE
  12036					;	R3 -- ERROR STATUS FOR THIS REPORT
  12037					;
  12038					; OUTPUTS:
  12039					;
  12040					;	NO REGISTERS ARE ALTERED
  12041					;-
  12042
  12043						.ENABL	LSB
  12044
  12045	041356				.TTERL::
  12046	041356	010246 				MOV	R2,-(SP)	;;; [TCO 4.2245] SAVE REGISTERS
  12047	041360	010146 				MOV	R1,-(SP)	;;; [TCO 4.2245]
  12048	041362	010046 				MOV	R0,-(SP)	;;; [TCO 4.2245]
  12049	041364	010446 				MOV	R4,-(SP)	;;; [TCO 4.2245]
  12050	041366	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;;; [TCO 4.2245] IS PRIMARY PROTOCOL RUNNING??
  12051	041374	001427 				BEQ	30$		;;; [TCO 4.2245] NO -- JUST EXIT
  12052	041376	012701 	000016 			MOV	#16,R1		;;; [TCO 4.2245] SET UP NODE SIZE
  12053	041402					CALL	..ALCB		;;; [TCO 4.2245] GET ONE FROM THE POOL
	041402	004737 	043034'			JSR	PC,..ALCB
  12054	041406	103422 				BCS	30$		;;; [TCO 4.2245] ERROR IF CC-C IS SET
  12055	041410	010160 	000002 			MOV	R1,T.HBCT(R0)	;;; [TCO 4.2245] GOT ONE -- SET NODE SIZE
  12056	041414	012701 	002654'			MOV	#.TTELQ,R1	;;; [TCO 4.2245] SET UP QUEUE POINTER
  12057	041420				10$:
  12058	041420	011102 				MOV	(R1),R2		;;; [TCO 4.2245] FIND THE LAST NODE IN THE QUEUE
  12059	041422	001402 				BEQ	20$		;;; [TCO 4.2245] FOUND IT -- GO ON
  12060	041424	010201 				MOV	R2,R1		;;; [TCO 4.2245] NOT YET -- TRY AGAIN
  12061	041426	000774 				BR	10$		;;; [TCO 4.2245] SO
  12062						;
  12063	041430				20$:
  12064	041430	010011 				MOV	R0,(R1)		;;; [TCO 4.2245] ADD THIS NODE
  12065	041432	005020 				CLR	(R0)+		;;; [TCO 4.2245] MARK NEW END OF QUEUE
  12066	041434	005720 				TST	(R0)+		;;; [TCO 4.2245] GET OVER THE LISTHEAD (PACKET SIZE)
  12067	041436	012720 	000012 			MOV	#12,(R0)+	;;; [TCO 4.2245] SET MESSAGE SIZE
  12068	041442	010320 				MOV	R3,(R0)+	;;; [TCO 4.2245] SET ERROR STATUS
  12069	041444	010420 				MOV	R4,(R0)+	;;; [TCO 4.2245] SET THE DEVICE ADDRESS
  12070	041446	012420 				MOV	(R4)+,(R0)+	;;; [TCO 4.2245] SET DEVICE STATUS
  12071	041450	013710 	002656'			MOV	.TTELB,(R0)	;;; [TCO 4.2245] SET SAVED STATUS, IF ANY
  12072	041454				30$:
  12073	041454	005037 	002656'			CLR	.TTELB		;;; [TCO 4.2245] CLEAR SAVED STATUS
  12074	041460	012604 				MOV	(SP)+,R4	;;; [TCO 4.2245] RESTORE REGISTERS
  12075	041462	000422 				BR	50$		;;; [TCO 4.2245] AND EXIT
  12076						;
TTYDRR	- GENERAL TTY HANDLER	MACRO M1110  15-OCT-79 13:47  PAGE 217
TTY DRIVER -- .TTRST (RESET A TERMINAL LINE)

  12078						.SBTTL	TTY DRIVER -- .TTRST (RESET A TERMINAL LINE)
  12079
  12080					;+
  12081					; .TTRST -- RESET A TERMINAL LINE
  12082					;
  12083					; THIS SUBROUTINE WILL RESET A LINE'S STATUS AND CLEAR IT'S OUTPUT QUEUE
  12084					;
  12085					; INPUTS:
  12086					;
  12087					;	R5 -- POINTS TO DLS TABLE ENTRY FOR THIS LINE
  12088					;
  12089					; OUTPUTS:
  12090					;
  12091					;	NO REGISTERS ARE ALTERED
  12092					;	LINE STATUS IS RESET
  12093					;	LINES OUTPUT QUEUE IS EMPTY
  12094					;
  12095					; NOTE:
  12096					;	THIS SUBROUTINE MUST BE CALLED AT BR5 OR HIGHER
  12097					;-
  12098
  12099	041464				.TTRST::
  12100	041464	010246 				MOV	R2,-(SP)	;;; [TCO 4.2205] SAVE REGISTERS
  12101	041466	010146 				MOV	R1,-(SP)
  12102	041470	010046 				MOV	R0,-(SP)
  12103	041472	010502 				MOV	R5,R2		;;; [TCO 4.2205] COPY DLS POINTER TO R2
  12104	041474	005737 	001030'			TST	.PFIOW		;;; [TCO 4.2205] POWER FAIL RESTART??
  12105	041500	001406 				BEQ	40$		;;; [TCO 4.2205] NO -- GO ON
  12106	041502	042765 	141411 	000006 		BIC	#TT.SND!TT.NSA!TT.ABW!TT.SIP!TT.OUT,STSW1(R5)
  12107									;;; [TCO 4.2205] YES -- SET POWER UP STATUS
  12108	041510	042765 	140000 	000004 		BIC	#S0.MSK,STSW0(R5) ;;; [TCO 4.2309] RESET CONNECT BIT
  12109	041516				40$:
  12110	041516					CALL	..STPT		;;; [TCO 4.2205] STOP THE LINE AND FLUSH OUTPUT
	041516	004737 	043632'			JSR	PC,..STPT
  12111	041522	042765 	014220 	000006 		BIC	#TT.XOF!TT.XEN!TT.FEC,STSW1(R5)
  12112									;;; [TCO 4.2205] RESET THE LINE STATUS
  12113	041530				50$:
  12114	041530	012600 				MOV	(SP)+,R0	;;; [TCO 4.2205] RESTORE REGISTERS
  12115	041532	012601 				MOV	(SP)+,R1
  12116	041534	012602 				MOV	(SP)+,R2
  12117	041536				60$:
  12118	041536					RETURN			;;; [TCO 4.2205] TO CALLER
	041536	000207 				RTS	PC
  12119
  12120						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 218
TTY DRIVER -- .TTRST (RESET A TERMINAL LINE)

  12122						.TITLE	SCOMM	- COMMON DATA AND SUBROUTINES
  12123	041540					IDENT$	10,12,RSX$$F
						.IDENT	/E10120/
  12124					;
  12125					;                             COPYRIGHT (C) 1975, 1978 BY
  12126					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
  12127					;
  12128					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
  12129					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
  12130					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
  12131					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
  12132					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
  12133					;
  12134					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
  12135					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
  12136					;       CORPORATION.
  12137					;
  12138					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
  12139					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
  12140					;
  12141					;		MODULE: "SCOMM"
  12142					;		VERSION: 10-12
  12143					;		AUTHOR: R. MCLEAN
  12144					;		DATE: 19 JUL 75
  12145					;
  12146					;
  12147					;	MODIFICATIONS:
  12148					;
  12149					;	THIS MODULE CONTAINS:
  12150					;
  12151					;	1 -- THIS MODULE CONTAINS SYSTEM COMMON MODULES AND TABLES
  12152					;
  12153					;	NO.	DATE		PROGRAMMER	PURPOSE
  12154					;	---	----		----------	-------
  12155					;	001	27-JUL-76	J. MASSE	CHANGE 'LBNL' FOR DX0 & DX1
  12156					;						FROM 496. TO 494.
  12157					;	002	8-AUG-76	J. MASSE	CHANGE VERSION NO. TO 004A
  12158					;	003	9-AUG-76	J. MASSE	ADD KLINIK HOOKS
  12159					;	004	20-OCT-76	A. PECKHAM	ADD DORBELL COUNTER
  12160					;	005	20-OCT-76	A. PECKHAM	CHANGE VERSION NO. TO 006A
  12161					;	006	03-FEB-77	R. BELANGER	ADD GENERALIZED DL11E
  12162					;						SERVICE AND NEW KLINIK
  12163					;						HOOKS AND HANDLES
  12164					;	007	07-MAR-77	A. PECKHAM	FIXED BUG  IN ..STTY
  12165					;	008	14-MAR-77	R. BELANGER	CONDITIONALLY REMOVE
  12166					;						SUPPORT FOR DTE20 DIRECTIVES
  12167					;						ADD CODE FOR DYNAMIC ALLOCATION
  12168					;						OF .BGBUF AND .FREPL
  12169					;	009	15-JUL-77	R. BELANGER	ADD AUTO BAUD SUPPORT
  12170					;	010	02-SEP-77	R. BELANGER	XON/XOFF BUG FIX
  12171					;   TCO 4.2047	18-OCT-78	R. BELANGER	FIX ..STTY TO NOT QUEUE
  12172					;     						OUTPUT FOR NON-EX LINES
  12173					;   TCO 4.2096	30-NOV-78	R. BELANGER	FIX "..STPT" TO INSURE DEQUEUE
  12174					;						OF TRUNCATED PACKET AT OUTPUT DONE
  12175					;   TCO 4.2107	06-DEC-78	R. BELANGER	ADD ".KACFL" FLAG FOR NEW
  12176					;						KEEP-ALIVE ERROR PROCESSING
  12177					;   TCO 4.2208	08-MAR-79	R. BELANGER	FIX BUG IN "..STIN" TO DISALLOW
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 218-1
TTY DRIVER -- .TTRST (RESET A TERMINAL LINE)

  12178					;						ACCESS TO KL MEMORY DURING
  12179					;						PROTOCOL PAUSE.
  12180					;   TCO 4.2212	08-MAR-79	R. BELANGER	MOVE DATABASE TO FE STATUS BLOCK
  12181					;   TCO 4.2216	16-MAR-79	R. BELANGER	ALLOW DTE-20 TO RUN AT FULL SPEED
  12182					;   TCO 4.2217	19-MAR-79	R. BELANGER	RETRY ALL EBUS PARITY ERRORS AND
  12183					;						SNAPSHOT ALL FAILURES
  12184					;   TCO 4.2265	23-MAY-79	R. BELANGER	FIX KLINIK BUG
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 219
TTY DRIVER -- .TTRST (RESET A TERMINAL LINE)

  12186					; MACRO LIBRARY CALLS
  12187					;
  12188						.MCALL	.CRASH
  12189						.MCALL	MTPI,MFPI,MTPS,MFPS,CALL,RETURN,.INH5,.ENB5
  12190						.MCALL	$DEF,F11DF$
  12191						.MCALL	.INH0,.ENB0,WSIG$S
  12192						.MCALL	.ENB,.INH,.ENB6,.INH6
  12193	041540					$DEF
  12194	041540					F11DF$
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 220
SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)

  12196						.SBTTL	SCOMM MODULE -- BITTBL (ASH/BIC/BIS SIMULATION)
  12197
  12198	041540				BITTBL::
  12199	041540	000001 				.WORD	1
  12200	041542	000002 				.WORD	2
  12201	041544	000004 				.WORD	4
  12202	041546	000010 				.WORD	10
  12203	041550	000020 				.WORD	20
  12204	041552	000040 				.WORD	40
  12205	041554	000100 				.WORD	100
  12206	041556	000200 				.WORD	200
  12207	041560	000400 				.WORD	400
  12208	041562	001000 				.WORD	1000
  12209	041564	002000 				.WORD	2000
  12210	041566	004000 				.WORD	4000
  12211	041570	010000 				.WORD	10000
  12212	041572	020000 				.WORD	20000
  12213	041574	040000 				.WORD	40000
  12214	041576	100000 				.WORD	100000
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 221
SCOMM MODULE -- .CEFN   (CONVERT EFN)

  12216						.SBTTL	SCOMM MODULE -- .CEFN   (CONVERT EFN)
  12217
  12218					; .CEFN -- SUBROUTINE TO CONVERT AN EVENT FLAG NUMBER INTO A FORM SUCH THAT
  12219					; IT MAY BE READ, SET, AND CLEARED VIA "BIT", "BIS", AND "BIC" INSTRUCTIONS.
  12220					;
  12221					; ALTERNATE ENTRY POINT .CEFN3 THAT DETERMINES EFN WITHOUT DOIN
  12222					; MOVE FROM PRIVIOUS
  12223					; ENTRY CONDITIONS:
  12224					;
  12225					;	R1 --  ADDRESS OF A WORD CONTAINING
  12226					;	R3 -- EFN NUMBER (FOR .CEFN3 ENTRY ONLY)
  12227					;	      THE EVENT FLAG NUMBER, AND THE EFN CAN BE FETCHED
  12228					;	R5 -- ATL NODE ADDRESS OF ISSUING TASK (.CRTSK)
  12229					;
  12230					; CALLING SEQUENCE:
  12231					;
  12232					;	CALL  .CEFN
  12233					;	CALL	.CEFN3
  12234					;
  12235					; EXIT CONDITIONS:
  12236					;
  12237					;	R3 -- BIT MASK SELECTING FLAG IN WORD
  12238					;	R2 -- ADDRESS OF WORD CONTAINING THE FLAG
  12239					;
  12240					;	IF AN EVENT FLAG IS NOT SPECIFIED (EFN=0),
  12241					;	BOTH R2 & R3 ARE RETURNED ZERO.
  12242					;
  12243					;	CONDITION CODES ARE SET PER "TST R3" AT RETURN
  12244					;
  12245					;	IF EFN IS OUT OF RANGE (<0 OR >64.) CONTROL IS TRANSFERRED
  12246					;	TO DIRECTIVE ERROR STATUS 'E.97'.
  12247					;
  12248					; REGISTERS ALTERED:
  12249					;
  12250					;	R2 & R3
  12251					;
  12252	041600	005002 			.CEFN::	CLR	R2		;(CLEARED FOR DIVIDE AND ERROR RETURN)
  12253	041602					MFPS	@R1,R3
	041602	011103 				MOV	@R1,R3
  12254	041604	042703 	177400 		.CEFN3::BIC	#177400,R3
  12255	041610	001423 				BEQ	20$		;EFN=0 -- NO FLAG SPECIFIED
  12256	041612	020327 	000100 			CMP	R3,#64.		;IS EFN IN RANGE: 0-64.?
  12257	041616	101022 				BHI	X8X97		;NO -- RETURN STS=-97
  12258	041620	005303 				DEC	R3		;YES -- CONVERT EFN TO INDEX (0,2,4,6)
  12259									;IN R2, AND FLAG MASK IN R3.
  12260	041622					CALL	DIV216		;DIVIDE R2 BY 16
	041622	004737 	042454'			JSR	PC,DIV216
  12261	041626	006302 				ASL	R2
  12262	041630	006303 				ASL	R3		;FIND BIT MASK
  12263	041632	016303 	041540'			MOV	BITTBL(R3),R3
  12264	041636	020227 	000004 			CMP	R2,#4		;FLAG IN RANGE 33-64?
  12265	041642	002403 				BLT	10$
  12266	041644	062702 	001004'			ADD	#.COMEF-4,R2	;YES -- SET R2 TO ADDRESS OF WORD IN
  12267	041650	000403 				BR	20$		;SCOMM(COMMON EVENT FLAGS)
  12268						;
  12269	041652	060502 			10$:	ADD	R5,R2		;NO -- SET R2 TO ADDRESS OF WORD IN
  12270	041654	062702 	000020 			ADD	#A.EF,R2	;ATL NODE (TASK'S EVENT FLAGS)
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 221-1
SCOMM MODULE -- .CEFN   (CONVERT EFN)

  12271	041660	005703 			20$:	TST	R3		;SET CONDITION CODES
  12272	041662					RETURN
	041662	000207 				RTS	PC
  12273
  12274	041664	104637 			X8X97::TRAP	DE.97
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 222
SCOMM MODULE -- .CKDEL  (CLOCK DELETE)

  12276						.SBTTL	SCOMM MODULE -- .CKDEL  (CLOCK DELETE)
  12277					;
  12278					;
  12279					;
  12280					;	.CKDEL -- SUBROUTINE TO REMOVE AN ENTRY FORM THE CLOCK LIST
  12281					;
  12282					;	CALLING SEQUENCE:
  12283					;
  12284					;	R4 -- POINTER TO ENTRY TO BE REMOVED
  12285					;
  12286					;	CALL	.CKDEL
  12287					;
  12288					;	EXIT CONDITIONS:
  12289					;
  12290					;	NO ERROR CONDITIONS:
  12291					;
  12292					;	REGISTERS ALTERED: NONE
  12293					;
  12294						.ENABL	LSB
  12295	041666	010446 			.CKDEL::MOV	R4,-(SP)	;SAVE REGISTERS
  12296	041670	010546 				MOV	R5,-(SP)
  12297	041672	010405 				MOV	R4,R5
  12298	041674	062705 	000014 			ADD	#C.SZ,R5	;LOOK AT THE NEXT ENTRY
  12299	041700	012524 			10$:	MOV	(R5)+,(R4)+	;NO -- MOVE AN ENTRY UP
  12300	041702	001406 				BEQ	30$		;END OF TABLE
  12301	041704	012524 				MOV	(R5)+,(R4)+
  12302	041706	012524 				MOV	(R5)+,(R4)+
  12303	041710	012524 				MOV	(R5)+,(R4)+
  12304	041712	012524 				MOV	(R5)+,(R4)+
  12305	041714	012524 				MOV	(R5)+,(R4)+
  12306	041716	000770 				BR	10$		;TRY AGAIN
  12307						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 223
SCOMM MODULE -- .CKDEL  (CLOCK DELETE)

  12342
  12343	041720	005024 			30$:	CLR	(R4)+		;INSURE LAST ENTRY 0
  12344	041722	012605 				MOV	(SP)+,R5	;RESTORE
  12345	041724	012604 				MOV	(SP)+,R4
  12346	041726					RETURN			;RETURN TO CALLER
	041726	000207 				RTS	PC
  12348						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 224
SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)

  12350						.SBTTL	SCOMM MODULE -- ..IODN	(SUBROUTINE TO COMPLETE I/O)
  12351					;+
  12352					;
  12353					;	..IODN -- SUBROUTINE TO COMPLETE THE USER'S I/O
  12354					;		REQUEST.  ..IODN SETS TWO WORDS OF
  12355					;		THE I/O STATUS BLOCK IN THE USER'S AREA AND
  12356					;		 AN EVENT FLAG (IF SPECIFIED) IS SET.
  12357					;		THE REQUEST NODE IS RETURNED TO THE POOL .
  12358					;
  12359					;		JUST BEFORE ..IODN EXITS IT DECLARES A SIG EVENT TO INFORM THE
  12360					;		SYSTEM THAT SOME I/O IS COMPLETE AND
  12361					;		POSSIBLE A TASK MAY BE RESTARTED.
  12362					;
  12363					;
  12364					;	CALLING SEQUENCE:
  12365					;		R1 -- REQUEST NODE ADDRESS
  12366					;		R3 -- I/O STATUS BLOCK WD. 00
  12367					;		R4 -- I/O STATUS BLOCK WD. 01.
  12368					;		CALL	..IODN
  12369					;-
  12370					;
  12371					;
  12372	041730	010046 			..IODN::MOV	R0,-(SP)	;SAVE THE REGISTERS
  12373	041732	010446 				MOV	R4,-(SP)
  12374									;STATUS SO THAT THEY CAN BE SET BY BLXO
  12375	041734	010346 				MOV	R3,-(SP)
  12376	041736	010604 				MOV	SP,R4		;POINT TO THE TWO VALUES FOR I/O STATUS BLOCK
  12377	041740	010246 				MOV	R2,-(SP)
  12378	041742	012703 	000004 			MOV	#4,R3		;SET UP TO MOVE 4 BYTES
  12379	041746	016102 	000016 			MOV	R.SB(R1),R2
  12380	041752	001402 				BEQ	10$		;SKIP IF NO STATUS BLOCK
  12381	041754					CALL	..BLXO		;MOVE THE TWO WORDS
	041754	004737 	045556'			JSR	PC,..BLXO
  12382	041760	012602 			10$:	MOV	(SP)+,R2	;RESTORE R2
  12383	041762	012603 				MOV	(SP)+,R3
  12384	041764	116100 	000013 			MOVB	R.FN(R1),R0	;PICKUP EVENT FLAG NUMBER
  12385	041770	001404 				BEQ	20$		;DON'T TRY TO SET IF NO FLAG
  12386	041772	016104 	000006 			MOV	R.AT(R1),R4	;FIND THE ATL NODE ADDRESS
  12387	041776					CALL	..SEFN		;SET THE EVENT FLAG
	041776	004737 	042372'			JSR	PC,..SEFN
  12388	042002				20$:	CALL	..DSEV		; DECLARE A SIGNIFICANT EVENT
	042002	004737 	042444'			JSR	PC,..DSEV
  12389	042006	016104 	000020 			MOV	R.AS(R1),R4	;AST ADDRESS?
  12390	042012	001406 				BEQ	30$		;NO -- FORGET IT
  12391	042014	010546 				MOV	R5,-(SP)	;SAVE R5
  12392	042016	016105 	000006 			MOV	R.AT(R1),R5	;SET UP THE ATL ADDRESS
  12393	042022					CALL	.STAST		;START AST (NOTE -- CAN'T FAIL)!!
	042022	004737 	015342'			JSR	PC,.STAST
  12394	042026	012605 				MOV	(SP)+,R5	;RESTORE R5
  12395	042030	010100 			30$:	MOV	R1,R0		;SET UP NODE ADDRESS
  12396	042032	012701 	000040 			MOV	#32.,R1		;SET UP SIZE OFNODE
  12397	042036					CALL	..DECB		;DEALLOCATE CORE BUFFER
	042036	004737 	043166'			JSR	PC,..DECB
  12398	042042	012604 				MOV	(SP)+,R4
  12399	042044	012600 				MOV	(SP)+,R0
  12400	042046					RETURN
	042046	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 225
SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)

  12402						.SBTTL	SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)
  12403					;+
  12404					;
  12405					;
  12406					;	..DQRN --  ROUTINE TO PICK A REQEST NODE FROM PUD
  12407					;
  12408					;
  12409					;	THE NODE ON THE TOP IF THE QUEUE (HIGHEST PRIORITY)
  12410					;		PICKED FROM THE QUEUE AND RETURNED TO THE
  12411					;		HANDLER TASK.
  12412					;	IF NO NODE CAN BE FOUND ..DQRN RETURNS WITH
  12413					;		THE CONDITION CODES SET TO INDICATE FAILURE
  12414					;		TO PICK A NODE
  12415					;		TASK SWITCHING IS INHIBITED DURING THE SCAN OF
  12416					;		THE DEQUE TO PREVENT ..IPRI FROM
  12417					;		INSERTING A NODE INTO THE LIST WHILE ONE
  12418					;		IS BEING REMOVED.
  12419					;
  12420					;	CALLING SEQUENCE:
  12421					;
  12422					;		R0 -- ASCII 2 CHARACTER DEVICE NAME
  12423					;
  12424					;		CALL	..DQRN
  12425					;
  12426					;	EXIT CONDITIONS:
  12427					;		R0 -- PUD ADDRESS OF NODE PICKED+U.RF
  12428					;		R1 -- ADDRESS OF REQUEST NODE OR UNDEFINED IF NO NODE FOUND
  12429					;		R2 -- UNIT NUMBER
  12430					;		R3 -- BYTE COUNT
  12431					;		R4 -- HIGH ORDER ADDRESS (BITS 4,5)
  12432					;		R5 -- LOW ORDER ADDRESS
  12433					;
  12434					;		CC -- C BIT SET IF NO NODE FOUND
  12435					;		CC -- C BIT CLEAR IF NODE FOUND
  12436					;
  12437					;		EVENT FLAG EF.NIR CLEARED IF NO NODE FOUND
  12438					;		EVENT FLAG EF.NIR SET IF NODE FOUND
  12439					;-
  12440					;
  12441					;
  12442	042050	013701 	001006'		..DQRN::MOV	.CRTSK,R1	;CLEAR THE EVENT FLAG OF THE HANDLER
  12443	042054	042761 	000010 	000020 		BIC	#EF.NIR,A.EF(R1)
  12444	042062	012704 	007606'			MOV	#.PUDBA,R4	;FIND THE LOGICAL UNIT NUMBER
  12445	042066	020014 			10$:	CMP	R0,@R4		;FIND THE POINTER TO THIS LUN
  12446	042070	001403 				BEQ	20$		;FOUND CORRECT LUN
  12447	042072	062704 	000050 			ADD	#U.SZ,R4	;POINT TO NEXT LUN
  12448	042076	000773 				BR	10$		;AND TRY AGAIN
  12449						;
  12450	042100	062704 	000022 		20$:	ADD	#U.RF,R4	;NO -- DEQUE FIRST NODE
  12451	042104					.INH0			;;INHIBIT TASK SWITCHING
	042104	013746 	177776 			MOV	@#PS,-(SP)
	042110	112737 	000140 	177776 		MOVB	#140,@#PS
  12452	042116	010446 			30$:	MOV	R4,-(SP)	;;SAVE ADDRESS
  12453	042120					CALL	..PICK		;;PICK A NODE IF POSSIBLE
	042120	004737 	042656'			JSR	PC,..PICK
  12454	042124	103011 				BCC	40$		;;POSSIBLE -- CONTINUE
  12455	042126	012604 				MOV	(SP)+,R4	;;RESTORE PUD ADDRESS
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 225-1
SCOMM MODULE -- ..DQRN	(DEQUEUE A NORMAL REQUEST)

  12456	042130	062704 	000050 			ADD	#U.SZ,R4	;;LOOK AT NEXT ENTRY
  12457	042134	026464 	177756 	177706 		CMP	-U.RF(R4),-U.RF-U.SZ(R4) ;CHECK DEVICE NAME
  12458	042142	001765 				BEQ	30$
  12459	042144	005216 				INC	@SP		;;SET CARRY
  12460	042146	000466 				BR	65$		;;AND RETURN
  12461						;
  12462	042150	010401 			40$:	MOV	R4,R1		;;SET UP NODE ADDRESS FOR RETURN
  12463	042152	016102 	000004 			MOV	R.TD(R1),R2	;;YES -- CHHANGE THE DISK ADDRESS
  12464	042156	013704 	001006'			MOV	.CRTSK,R4	;;SET THE EVENT FLAG
  12465	042162	016105 	000014 			MOV	R.FC(R1),R5	;;FIND THE FUNCTION CODE
  12466	042166	020527 	001400 			CMP	R5,#IO.ATT	;;ATTACH FUNCTION?
  12467	042172	001457 				BEQ	70$		;;YES -- HANDLE ATTACH HERE
  12468	042174	020527 	002000 			CMP	R5,#IO.DET	;;DETACH ?
  12469	042200	001470 				BEQ	80$		;;YES HANDLE HERE
  12470	042202	022705 	001010 			CMP	#IO.LOV,R5	;;IS THE FUNCTION CODE LOAD OVERLAY?
  12471	042206	001013 				BNE	50$		;;NO -- PROCEED
  12472	042210	066261 	000034 	000034 		ADD	S.DL+2(R2),R.PB+10(R1)
  12473	042216	005561 	000032 			ADC	R.PB+6(R1)
  12474	042222	066261 	000032 	000032 		ADD	S.DL(R2),R.PB+6(R1)
  12475	042230	012761 	001000 	000014 	45$:	MOV	#IO.RLB,R.FC(R1) ;SET FUNCTION CODE TO READ LOGICAL BLOCK
  12476	042236	022761 	000050 	000014 	50$:	CMP	#IO.LTK,R.FC(R1) ;;IS THIS A LOAD TASK FUNCTION?
  12477	042244	001013 				BNE	60$		;; PROCEED
  12478	042246	016202 	000012 			MOV	S.BA(R2),R2	;;SET THE CORE ADDRESS
  12485	042252	010261 	000024 			MOV	R2,R.PB(R1)	;;SET CORE ADDRESS
  12486	042256	016102 	000006 			MOV	R.AT(R1),R2	;;FIND THE ATL NODE ADDRESS
  12487	042262	062702 	000030 			ADD	#A.FM+4,R2	;;SET I/O STATUS WORD TO POINT TO A.FM+4
  12488	042266	010261 	000016 			MOV	R2,R.SB(R1)	;;
  12489	042272	000756 				BR	45$		;;CHANGE FUNCTION TO READ
  12490						;
  12491	042274	052764 	000010 	000020 	60$:	BIS	#EF.NIR,A.EF(R4) ;;FOR DQ NORMAL
  12492	042302	016103 	000026 			MOV	R.PB+2(R1),R3	;;FIND THE SIZE OF THE XFER
  12493	042306	016102 	000024 			MOV	R.PB(R1),R2	;;SET UP FOR VALIDATE
  12494	042312					CALL	..VXFR		;;VALIDATE XFER
	042312	004737 	045536'			JSR	PC,..VXFR
  12495	042316	012600 				MOV	(SP)+,R0		;;FIND THE PUD ADDRESS
  12496	042320	116002 	177760 			MOVB	U.UN-U.RF(R0),R2 ;;SET UNIT NUMBER ON STACK
  12497	042324				65$:	.ENB0			;;ENABLE INTERRUPTS
	042324	004737 	042720'			JSR	PC,..ENB0
  12498	042330					RETURN			;NO -- RETURN
	042330	000207 				RTS	PC
  12499					;
  12500	042332	012604 			70$:	MOV	(SP)+,R4	;;RESTORE PUD ADDRESS
  12501	042334	016164 	000006 	177772 		MOV	R.AT(R1),U.AF-U.RF(R4)	;;SET ATTACH FLAG
  12502	042342				75$:	.ENB0			;;ENABLE TASK SWITCHING
	042342	004737 	042720'			JSR	PC,..ENB0
  12503	042346	012703 	000001 			MOV	#1,R3		;;RETURN +1 STATUS
  12504	042352	005004 				CLR	R4
  12505	042354					CALL	..IODN
	042354	004737 	041730'			JSR	PC,..IODN
  12506	042360	000633 				BR	..DQRN		;DEQUEUE AGAIN
  12507						;
  12508	042362	012604 			80$:	MOV	(SP)+,R4	;;RESTORE PUD ADDRESS
  12509	042364	005064 	177772 			CLR	U.AF-U.RF(R4)	;;CLEAR ATTACH
  12510	042370	000764 				BR	75$		;;AND RETURN I/O DONE STATUS
  12511						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 226
SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)

  12513						.SBTTL	SCOMM MODULE -- ..SEFN	(SET EVENT FLAG)
  12514					;+
  12515					;
  12516					;
  12517					;	..SEFN -- SUBROUTINE TO SET AN EVENT FLAG FOR A HANDLER TASK.
  12518					;		THIS IS A GENERAL ROUTINE TO SET ANY EVENT FLAG AND
  12519					;		MAY BE USED BY A HANDLER TASK AT INTERRUPT LEVEL.
  12520					;		THE MAIN PURPOSE OF THIS ROUTINE IS TO
  12521					;		SET THE REQUESTOR'S EVENT FLAG FOR ..IODN.
  12522					;
  12523					;
  12524					;	CALLING SEQUENCE:
  12525					;		R0 -- EVENT FLAG NUMBER 1-64
  12526					;		R4 -- ACTIVE TASK LIST ENTRY
  12527					;		CALL	..SEFN
  12528					;-
  12529					;
  12530	042372	010246 			..SEFN::MOV	R2,-(SP)	;SAVE USED REGISTERS
  12531	042374	010346 				MOV	R3,-(SP)
  12532	042376	010003 				MOV	R0,R3		;
  12533	042400	005303 				DEC	R3		;DECREMENT FOR 1 LESS THAN COUNT
  12534									;CONVERT EFN TO INDEX AND
  12535	042402					CALL	DIV216		;FLAG MASK
	042402	004737 	042454'			JSR	PC,DIV216
  12536	042406	006302 				ASL	R2
  12537	042410	006303 				ASL	R3		;FIND BIT MASK ADDRESS
  12538	042412	020227 	000004 			CMP	R2,#4		;TEST FOR COMMON SET
  12539	042416	002403 				BLT	10$		;NO -- FLAGS IN ATL
  12540	042420	062702 	001004'			ADD	#.COMEF-4,R2	;YES -- POINT TO COMMON FLAGS
  12541	042424	000403 				BR	20$
  12542						;
  12543	042426	060402 			10$:	ADD	R4,R2		;POINT TO ATL SET
  12544	042430	062702 	000020 			ADD	#A.EF,R2
  12545	042434	056312 	041540'		20$:	BIS	BITTBL(R3),@R2	;SET EVENT FLAGS
  12546	042440	012603 				MOV	(SP)+,R3
  12547	042442	012602 				MOV	(SP)+,R2
  12548					;	BR	..DSEV		; DECLARE A SIGNIFICANT EVENT
  12549						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 227
SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)

  12551						.SBTTL	SCOMM MODULE -- ..DSEV	(DECLARE SIGNIFICANT EVENT)
  12552
  12553					;+
  12554					; ..DSEV -- COMMON ROUTINE TO DECLARE A SIGNIFICANT EVENT
  12555					;
  12556					; INPUTS:
  12557					;
  12558					;	SPECIFIC EVENT MUST BE DECLARED BY CALLER
  12559					;
  12560					; OUTPUTS:
  12561					;
  12562					;	NO REGISTERS ALTERED
  12563					;-
  12564
  12565	042444				..DSEV::
  12566	042444	152737 	000001 	001014'		BISB	#EV.SE,.SERFG+0	;DECLARE SIGNIFIGANT EVENT
  12567	042452					RETURN			;RETURN
	042452	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 228
SCOMM MODULE -- DIV216   (DIV R2 BY 16)

  12569						.SBTTL	SCOMM MODULE -- DIV216   (DIV R2 BY 16)
  12570					;
  12571					;	DIV216 -- SUBROUTINE TO SIMULATE A HARDWARE
  12572					;	DIVIDE INSTRUCTION (DIV #16,R2)
  12573					;
  12574					;	CALLING SEQUENCE:
  12575					;
  12576					;	R3 -- NUMBER TO BE DIVIDED BY 16
  12577					;	CALL	DIV216
  12578					;
  12579					;	EXIT CONDITIONS:
  12580					;	R3 -- REMAINDER
  12581					;	R2 -- QUOTIENT
  12582					;
  12583	042454	010302 			DIV216::MOV	R3,R2		;FIND THE REMAINDER
  12584	042456	042703 	177760 			BIC	#177760,R3	;MASK OFF THE REMAINDER
  12585	042462	006002 				ROR	R2		;DIVIDE R2 BY 2
  12586	042464	006002 				ROR	R2		;AGAIN
  12587	042466	006002 				ROR	R2		;AND AGAIN
  12588	042470	006002 				ROR	R2		;NOW HAVE DONE IT BY 16.
  12589	042472	042702 	170000 			BIC	#170000,R2	;MASK OFF JUNK PROPIGATED BY ROR
  12590	042476					RETURN			;RETURN TO CALLER
	042476	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 229
SCOMM MODULE -- ..NDEL	(NODE DELETE)

  12592						.SBTTL	SCOMM MODULE -- ..NDEL	(NODE DELETE)
  12593					;+
  12594					;
  12595					;	..NDEL -- ROUTINE TO DELETE A NODE FROM A LIST
  12596					;		THIS IS A BASIC SUBROUTINE TO DELETE
  12597					;		NODES FROM A LIST.  IT DOES NOT DO
  12598					;		ANY ACCOUNTING OR LOOKING THE NODE
  12599					;		IT ASSUMES THAT THERE IS A NODE TO BE PICKED
  12600					;		AND INHIBITS INTERRUPTS TO PREVENT CONFLICTS WITH
  12601					;		NODES BEING ADDED TO A DEQUE.
  12602					;
  12603					;
  12604					;	CALLING SEQUENCE:
  12605					;		R4 -- POINTER TO NODE TO BE DELETED
  12606					;		CALL	..NDEL
  12607					;-
  12608					;
  12609	042500	010146 			..NDEL::MOV	R1,-(SP)	;SAVE R1
  12610	042502					.INH6			;;;INHIBIT ALL INTERRUPTS
	042502	013746 	177776 			MOV	@#PS,-(SP)
	042506	112737 	000300 	177776 		MOVB	#300,@#PS
  12611	042514	011401 				MOV	@R4,R1		;;;PICK THE NODE
  12612	042516	010174 	000002 			MOV	R1,@2(R4)	;;;
  12613	042522	016461 	000002 	000002 		MOV	2(R4),2(R1)	;;;
  12614	042530					.ENB6			;;;ENABLE INTERRUPTS
	042530	012637 	177776 			MOV	(SP)+,@#PS
  12615	042534	012601 				MOV	(SP)+,R1	;RESTORE R1
  12616	042536					RETURN			;RETURN TO CALLER
	042536	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 230
SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)

  12618						.SBTTL	SCOMM MODULE -- ..IPRI	(INSERT NODE BY PRIORITY)
  12619					;+
  12620					;
  12621					;	..IPRI -- ROUTINE TO INSERT A NODE BY PRIORITY
  12622					;		THIS ROUTINE WILL SEARCH A QUEUE (TASK SWITCHING INHIBITED)
  12623					;		AND INSERT A NODE IN IT'S CORRECT PRIORITY POSITION.  IF THERE
  12624					;		IS A NODE IN THE
  12625					;		LIST WITH THE SAME PRIORITY AS THE ONE
  12626					;		TO BE INSERTED THE NEW NODE WILL COME AFTER
  12627					;		THE OTHER NODES WITH THE SAME PRIORITY (FIFO)
  12628					;		..IPRI EXPECTS THE NODE TO HAVE A PRIORITY
  12629					;		IN THE COMMON NODE PRIORITY POSITION.
  12630					;
  12631					;
  12632					;	CALLING SEQUENCE:
  12633					;		R1 -- NODE ADDRESS
  12634					;		R2 -- LIST HEAD
  12635					;		CALL	..IPRI
  12636					;-
  12637					;
  12638					;
  12639	042540	010446 			..IPRI::MOV	R4,-(SP)	;SAVE R4
  12640	042542	010204 				MOV	R2,R4		;PICK UP THE POINTER TO THE LIST HEAD
  12641	042544					.INH0			;;INHIBIT ALL INTERRUPTS DURING SCAN
	042544	013746 	177776 			MOV	@#PS,-(SP)
	042550	112737 	000140 	177776 		MOVB	#140,@#PS
  12642	042556	011404 			10$:	MOV	@R4,R4		;;PICK UP THE FIRST NODE
  12643	042560	020402 				CMP	R4,R2		;;END OF THE SCAN?
  12644	042562	001404 				BEQ	20$		;;YES -- INSERT THE NODE
  12645	042564	126461 	000010 	000010 		CMPB	N.PR(R4),N.PR(R1) ;;NO -- LOOK AT THE PRIORITIES
  12646	042572	103371 				BHIS	10$		;;NO MATCH TRY AGAIN
  12647	042574	016404 	000002 		20$:	MOV	N.BP(R4),R4	;;BACK UP ONE
  12648	042600					CALL	..NADD		;;ADD THE NODE TO THE QUEUE
	042600	004737 	042614'			JSR	PC,..NADD
  12649	042604					.ENB0			;;ENABLE INTERRUPTS
	042604	004737 	042720'			JSR	PC,..ENB0
  12650	042610	012604 				MOV	(SP)+,R4	;RESTORE R4
  12651	042612					RETURN			;RETURN TO CALLER
	042612	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 231
SCOMM MODULE -- ..NADD	(NODE ADD)

  12653						.SBTTL	SCOMM MODULE -- ..NADD	(NODE ADD)
  12654					;+
  12655					;
  12656					;
  12657					;	..NADD -- ROUTINE TO ADD A NODE TO A DEQUEUE
  12658					;		..NADD IS THE GENERAL PICK A NODE ROUTINE
  12659					;		THE ADDITION OF A NODE IS DONE WITH INTERRUPTS
  12660					;		INHIBITED TO PREVENT A CONFLICT WITH
  12661					;		NODE DELETION.
  12662					;
  12663					;
  12664					;	CALLING SEQUENCE:
  12665					;		R1 -- NODE ADDRESS
  12666					;		R4 -- ADDRESS OF LISTHEAD OR PREVIOUS NODE
  12667					;		CALL	..NADD
  12668					;-
  12669					;
  12670					;
  12671	042614	010246 			..NADD::MOV	R2,-(SP)	;SAVE R2
  12672	042616	010461 	000002 			MOV	R4,2(R1)	;SET UP BACKWARD POINTER IN NODE
  12673	042622					.INH6			;;;INHIBIT INTERRUPTS
	042622	013746 	177776 			MOV	@#PS,-(SP)
	042626	112737 	000300 	177776 		MOVB	#300,@#PS
  12674	042634	011411 				MOV	@R4,@R1		;;;SET UP FORWARD POINTER
  12675	042636	010114 				MOV	R1,@R4		;;;FORWARD POINTER FROM LIST HEAD
  12676	042640	011102 				MOV	@R1,R2		;;;
  12677	042642	010162 	000002 			MOV	R1,2(R2)	;;;
  12678	042646					.ENB6			;;;ENABLE INTERRUPTS
	042646	012637 	177776 			MOV	(SP)+,@#PS
  12679	042652	012602 				MOV	(SP)+,R2	;RESTORE R2
  12680	042654					RETURN			;RETURN TO CALLER
	042654	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 232
SCOMM MODULE -- ..PICK	(PICK A NODE)

  12682						.SBTTL	SCOMM MODULE -- ..PICK	(PICK A NODE)
  12683					;+
  12684					;
  12685					;
  12686					;	..PICK -- ROUTINE TO PICK A NODE FROM A DEQUEUE
  12687					;		..PICK IS THE GENERAL PICK A NODE ROUTINE.
  12688					;		IT'S PRIMARY USE IS TO PICK A NODE FROM
  12689					;		A LIST.  IT CHECKS TO SEE THAT A NODE DOES
  12690					;		EXIST IN THE LIST BUT IT DOES NO
  12691					;		ACCOUNTING OF THE NODES.  ..PICK INHIBITS
  12692					;		INTERRUPTS TO PREVENT A NODE FROM
  12693					;		BEING ADDED WHILE IT CHECKS TO SEE
  12694					;		IF THERE IS REALLY A NODE TO BE PICKED.
  12695					;
  12696					;	CALLING SEQUENCE:
  12697					;		R4 -- LIST HEAD OR PREVIOUS NODE TO THE NODE TO BE PICKED
  12698					;		CALL	..PICK
  12699					;
  12700					;	EXIT CONDITIONS:
  12701					;		CC - C BIT CLEAR
  12702					;		R4 -- PICKED NODE ADDRESS
  12703					;	ERROR CONDITIONS:
  12704					;		CC -- C BIT SET
  12705					;		NOTE -- THIS CONDITION CAN'T HAPPEN UNLESS R4 IS THE LISTHEAD
  12706					;		R4 -- ZERO
  12707					;-
  12708					;
  12709					;
  12710					;
  12711	042656	000241 			..PICK::CLC			;ASSUME SUCCESS
  12712	042660					.INH6			;;;INHIBIT ALL INTERRPUTS
	042660	013746 	177776 			MOV	@#PS,-(SP)
	042664	112737 	000300 	177776 		MOVB	#300,@#PS
  12713	042672	020414 				CMP	R4,@R4		;;;IS THERE A NODE TO PICK?
  12714	042674	001406 				BEQ	20$		;;;NO -- THEN DON'T PICK IT
  12715	042676	011404 				MOV	@R4,R4		;;;
  12716	042700					CALL	..NDEL		;;;DELETE THE NODE
	042700	004737 	042500'			JSR	PC,..NDEL
  12717	042704				10$:	.ENB6			;;;ENABLE INTERRUPTS
	042704	012637 	177776 			MOV	(SP)+,@#PS
  12718	042710					RETURN			;RETURN TO CALLER
	042710	000207 				RTS	PC
  12719					;
  12720	042712	005004 			20$:	CLR	R4		;NO NODE FOUND CLEAR RETURNED VALUE
  12721	042714	005216 				INC	@SP		;SET C BIT TO INDICATE ERROR
  12722	042716	000772 				BR	10$		;RETURN
  12723						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 233
SCOMM MODULE -- ..ENB0	(ENABLE TASK SWITCHING)

  12725						.SBTTL	SCOMM MODULE -- ..ENB0	(ENABLE TASK SWITCHING)
  12726					;+
  12727					;
  12728					;
  12729					;	..ENB0 -- ROUTINE TO ENABLE TASK SWITCHING
  12730					;		..ENB0 -- ENABLES TASK SWITCHING AND
  12731					;		ALLOWS THE SYSTEM TO UPDATE THE CLOCK AND
  12732					;		RECOGNIZE SIGNIFIGANT EVENTS.  THIS
  12733					;		ROUTINE MUST BE ENTERED WITH THE PS SAVED ON
  12734					;		THE TOP OF THE STACK.  THE USUAL WAY
  12735					;		SETTING UP TO USE THIS ROUTINE IS BY USE OF
  12736					;		THE .INH0 MACRO.
  12737					;		THIS ROUTINE WILL NOT ENABLE TASK SWITCHING IF
  12738					;		THE PRIORITY SAVED ON THE STACK
  12739					;		DOES NOT INDICATE A RETURN TO PRIORITY 0 (NON
  12740					;		ENTERED AT PROCESSOR PRIORITY LEVEL 3
  12741					;
  12742					;		CALLING SEQUENCE:
  12743					;			CALL	..ENB0
  12744					;
  12745					;		NOTE -- PS SAVED BY .INH0 MUST BE ON THE TOP OF THE STACK
  12746					;
  12747					;		.INH0 IS A MACRO DEFINED AS FOLLOWS:
  12748					;			.MACRO	.INH0
  12749					;				MOV	PS,-(SP)
  12750					;				BIS	#140,PS
  12751					;			.ENDM
  12752					;
  12753					;-
  12754					;
  12755					;
  12756	042720	010146 			..ENB0::MOV	R1,-(SP)	;;
  12757	042722	016601 	000004 			MOV	4(SP),R1	;;PICK UP THE STATUS WORD FROM THE STACK
  12758	042726	032701 	000340 			BIT	#340,R1		;;TEST THE STATUS RETURNING TO
  12759	042732	001003 				BNE	20$		;;IF RETURNING TO OTHER THAN 0 DON'T ENABLE TASK SWITCHING
  12760	042734	010146 			10$:	MOV	R1,-(SP)	;;NEW STATUS WORD IN R1
  12761									;; PLACE IT ON THE STACK
  12762									;;TO SET UP FOR COMMON SCAN
  12763	042736	004737 	014244'			JSR	PC,..INTX	;;PUSH THE RETURN ADDRESS ON THE STACK
  12764	042742	012601 			20$:	MOV	(SP)+,R1	;RESTORE R1 TO PRE-TASK SWITCHING STATE
  12765	042744	016637 	000002 	177776 		MOV	2(SP),@#PS	;SET UP THE NEW PROCESSOR STATUS
  12766	042752	000002 				RTI			;RTI POPS THE STACK TWICE AND RETURNS TO THE CALLER
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 234
SCOMM MODULE -- ..FSTD	(FIND STD ENTRY)

  12768						.SBTTL	SCOMM MODULE -- ..FSTD	(FIND STD ENTRY)
  12769					;+
  12770					;
  12771					; ..FSTD -- SUBROUTINE TO SEARCH THE SYSTEM TASK DIRECTORY FOR AN
  12772					;         ENTRY FOR A NAMED TASK.
  12773					;
  12774					; ENTRY CONDITIONS:
  12775					;
  12776					;	R1 --  ADDRESS  OF THE FIRST WORD
  12777					;	      OF A TWO WORD BLOCK CONTAINING A TASK NAME (RADIX-50),
  12778					;	      AND THE BLOCK CAN BE FETCHED
  12779					;
  12780					; CALLING SEQUENCE:
  12781					;
  12782					;	CALL  ..FSTD
  12783					;
  12784					; EXIT CONDITIONS:
  12785					;
  12786					;	R1 -- ADVANCED BY FOUR (2 WORDS),
  12787					;	R2 -- STD ENTRY ADDRESS, OR ZERO IF NAME NOT FOUND.
  12788					;	R3 -- 1 BEYOND ALPHA PLACE TO INSERT
  12789					;
  12790					;	CONDITION CODES SET PER "TST R2".
  12791					;
  12792					; REGISTERS ALTERED:
  12793					;
  12794					;
  12795					; INTERNAL REGISTER USAGE:
  12796					;
  12797					;-
  12798					;
  12799	042754	010546 			..FSTD::MOV	R5,-(SP)
  12800	042756	013703 	005710'			MOV	.STDTA,R3	;FIND THE BEGINNING
  12801	042762	010305 				MOV	R3,R5		;FIND THE END
  12802	042764	063705 	005714'			ADD	.STDTZ,R5
  12803	042770					MFPI	(R1)+		;FIND TASK NAME
	042770	012146 				MOV	(R1)+,-(SP)
  12804	042772					MFPI	(R1)+
	042772	012146 				MOV	(R1)+,-(SP)
  12805	042774	012302 			5$:	MOV	(R3)+,R2
  12806	042776	021266 	000002 			CMP	@R2,2(SP)	;TASK NAME CORRECT?
  12807	043002	101007 				BHI	50$		;NO -- TRY NEXT ONE
  12808	043004	103404 				BLO	10$		;NO AND NOT HERE
  12809	043006	026216 	000002 			CMP	2(R2),@SP	;MAYBE CHECK SECOND HALF
  12810	043012	001404 				BEQ	30$		;GOT IT
  12811	043014	101002 				BHI	50$		;NO -- AND NOTHING THERE
  12812	043016	020305 			10$:	CMP	R3,R5		;END OF LIST?
  12813	043020	101765 				BLOS	5$		;NO -- CONTUNUE
  12814	043022	005002 			50$:	CLR	R2		;RETURN R2 0
  12815	043024	022626 			30$:	CMP	(SP)+,(SP)+	;REMOVE NAME
  12816	043026	012605 				MOV	(SP)+,R5
  12817	043030	005702 				TST	R2		;RETURN CONDITIONS PER R2
  12818	043032				60$:	RETURN			;RETURN TO CALLER
	043032	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 235
SCOMM MODULE -- ..ALCB/..DECB/..ALC2/..DEC2	(ALLOCATE/DEALLOCA

  12820						.SBTTL	SCOMM MODULE -- ..ALCB/..DECB/..ALC2/..DEC2	(ALLOCATE/DEALLOCATE CORE)
  12821					;+
  12822					;
  12823					; THIS ROUTINE IS CALLED TO ALLOCATE AN  CORE BUFFER. THE ALLOCATION
  12824					; ALGORITHM IS FIRST FIT AND BLOCKS ARE ALLOCATED IN MULTIPLES OF FOUR
  12825					; BYTES.
  12826					;
  12827					; INPUTS:
  12828					;
  12829					;	R0=ADDRESS OF CORE ALLOCATION LISTHEAD IF ENTRY AT $ALOC1.
  12830					;	R1=SIZE OF THE CORE BUFFER TO ALLOCATE IN BYTES.
  12831					;
  12832					; OUTPUTS:
  12833					;
  12834					;	CC-C SET IF INSUFFICIENT CORE IS AVAILABLE TO ALLOCATE THE BLOCK.
  12835					;
  12836					;	CC-C CLEAR IF THE BLOCK IS ALLOCATED.
  12837					;	R0 -- ADDRESS OF THE ALLOCATED BLOCK.
  12838					;	R1 -- SIZE OF THE ALLOCATED BLOCK
  12839					;-
  12840
  12841	043034				..ALCB::
  12842	043034	062701 	000003 			ADD	#3,R1		;MASK TO CORRECT SIZE
  12843	043040	042701 	000003 			BIC	#3,R1
  12844	043044	012700 	001420'			MOV	#.FREPL,R0	;POINT TO ALLOCATION LISTHEAD
  12845	043050				..ALC2::
  12846	043050	010346 				MOV	R3,-(SP)	; SAVE R3
  12847	043052	010003 				MOV	R0,R3		; COPY LISTHEAD POINTER TO R3
  12848	043054	160163 	000002 			SUB	R1,2(R3)	;CHECK TO SEE IF POOL LOW
  12849					;	CMP	.FREPL+2,#POLMIN
  12850					;	BHIS	10$		;NO -- DON'T SLOW DOWN
  12851					;	MOV	#20000,@.PRDTE	;YES -- SLOW DTE
  12852	043060				10$:
  12853	043060	010246 				MOV	R2,-(SP)	;SAVE REGISTERS
  12854	043062	000241 				CLC			;ASSUME SUCCESS
  12855	043064					.INH6			;;;INHIBIT INTERRUPTS
	043064	013746 	177776 			MOV	@#PS,-(SP)
	043070	112737 	000300 	177776 		MOVB	#300,@#PS
  12856	043076				15$:
  12857	043076	010002 				MOV	R0,R2		;;;SAVE ADDRESS OF CURRENT BLOCK
  12858	043100	011200 				MOV	@R2,R0		;;;GET ADDRESS OF NEXT BLOCK
  12859	043102	001421 				BEQ	30$		;;;IF EQ END OF CHAIN
  12860	043104	026001 	000002 			CMP	2(R0),R1	;;;BLOCK BIG ENOUGH?
  12861	043110	103772 				BLO	15$		;;;IF LO NO
  12862	043112	001407 				BEQ	20$		;;;IF EQ BLOCK IS EXACT SIZE
  12863	043114	005720 				TST	(R0)+		;;;POINT TO SIZE
  12864	043116	160110 				SUB	R1,@R0		;;;ALLOCATE BLOCK
  12865	043120	060001 				ADD	R0,R1		;;;POINT TO NEXT FREE SPACE
  12866	043122	011011 				MOV	@R0,@R1		;;;STORE NEW POINTER
  12867	043124	014041 				MOV	-(R0),-(R1)	;;;STORE ADDRESS
  12868	043126	010110 				MOV	R1,@R0		;;;STORE SIZE
  12869	043130	160001 				SUB	R0,R1
  12870	043132				20$:
  12871	043132	011012 				MOV	@R0,@R2		;;;REMOVE BLOCK FROM LIST
  12872	043134				40$:
  12873	043134					.ENB6			;;;ENABLE INTERRUPTS
	043134	012637 	177776 			MOV	(SP)+,@#PS
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 235-1
SCOMM MODULE -- ..ALCB/..DECB/..ALC2/..DEC2	(ALLOCATE/DEALLOCA

  12874	043140	012602 				MOV	(SP)+,R2	;RESTORE REGISTERS
  12875	043142	012603 				MOV	(SP)+,R3	; RESTORE R3
  12876	043144					RETURN			; RETURN WITH R0 POINTING TO CALLER'S NODE
	043144	000207 				RTS	PC
  12877	043146				30$:
  12878	043146	005216 				INC	@SP		;;;SET CARRY
  12879	043150	060163 	000002 			ADD	R1,2(R3)	;;;RESET COUNTER
  12880	043154	000767 				BR	40$		;;;AND RETURN
  12881						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 236
SCOMM MODULE -- ..ALCB/..DECB/..ALC2/..DEC2	(ALLOCATE/DEALLOCA

  12883					;+
  12884					;
  12885					; THIS ROUTINE IS CALLED TO DEALLOCATE AN EXEC CORE BUFFER. THE BLOCK IS
  12886					; INSERTED INTO THE FREE BLOCK CHAIN BY CORE ADDRESS. IF AN ADJACENT
  12887					; BLOCK IS CURRENTLY FREE, THEN THE TWO BLOCKS ARE MERGED AND INSERTED
  12888					; IN THE FREE BLOCK CHAIN.
  12889					;
  12890					; INPUTS:
  12891					;
  12892					;	R0=ADDRESS OF THE CORE BUFFER TO BE DEALLOCATED.
  12893					;	R1=SIZE OF THE CORE BUFFER TO DEALLOCATE IN BYTES.
  12894					;	R3=ADDRESS OF CORE ALLOCATION LISTHEAD IF ENTRY AT ..DEC1.
  12895					;
  12896					; OUTPUTS:
  12897					;
  12898					;	THE CORE BLOCK IS MERGED INTO THE FREE CORE CHAIN BY CORE
  12899					;	ADDRESS AND IS AGCOMERATED IF NECESSARY WITH ADJACENT BLOCKS.
  12900					;-
  12901
  12902						.ENABL	LSB
  12903
  12904	043156				..DEC2::
  12905	043156	010346 				MOV	R3,-(SP)	;SAVE REGISTERS
  12906	043160	000411 				BR	10$
  12907						;
  12908	043162				..DECN::
  12909	043162	016001 	000002 			MOV	T.HBCT(R0),R1	; PACKET SIZE TO R1
  12910	043166				..DECB::
  12911	043166	010346 				MOV	R3,-(SP)	;SAVE REGISTERS
  12912	043170	062701 	000003 			ADD	#3,R1		;ROUND OFF
  12913	043174	042701 	000003 			BIC	#3,R1
  12914	043200	012703 	001420'			MOV	#.FREPL,R3
  12915	043204				10$:
  12916	043204	060163 	000002 			ADD	R1,2(R3)	;UPDATE SIZE
  12917					;	CMP	.FREPL+2,#POLMIN ;MIN OK?
  12918					;	BLOS	20$		;NO -- DON'T SPEED DTE
  12919					;	MOV	#37777,@.PRDTE	;YES -- SET DELAY COUNTER
  12920	043210				20$:
  12921	043210	010246 				MOV	R2,-(SP)
  12922	043212	010146 				MOV	R1,-(SP)
  12923	043214	010046 				MOV	R0,-(SP)
  12924	043216					.INH6			;;;INHIBIT INTERRUPTS
	043216	013746 	177776 			MOV	@#PS,-(SP)
	043222	112737 	000300 	177776 		MOVB	#300,@#PS
  12925	043230				40$:
  12926	043230	010302 				MOV	R3,R2		;;;SAVE ADDRESS OF CURRENT BLOCK
  12927	043232	011203 				MOV	@R2,R3		;;;GET ADDRESS OF NEXT BLOCK
  12928	043234	001402 				BEQ	50$		;;;IF EQ END OF CHAIN
  12929	043236	020003 				CMP	R0,R3		;;;BLOCK GO HERE?
  12930	043240	103373 				BHIS	40$		;;;IF HIS NO
  12931	043242				50$:
  12932	043242	010310 				MOV	R3,@R0		;;;ASSUME NO AGLOMERATION
  12933	043244	010046 				MOV	R0,-(SP)	;;;CALCULATE ADDRESS OF NEW BLOCK
  12934	043246	060116 				ADD	R1,@SP		;;;
  12935	043250	020326 				CMP	R3,(SP)+	;;;EQUAL TO NEXT IN CHAIN?
  12936	043252	001002 				BNE	60$		;;;IF NE NO
  12937	043254	012310 				MOV	(R3)+,@R0	;;;MOVE LINK WORD TO BLOCK RELEASED
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 236-1
SCOMM MODULE -- ..ALCB/..DECB/..ALC2/..DEC2	(ALLOCATE/DEALLOCA

  12938	043256	061301 				ADD	@R3,R1		;;;MERGE TWO BLOCKS
  12939	043260				60$:
  12940	043260	010246 				MOV	R2,-(SP)	;;;SAVE ADDRESS OF PREVIOUS BLOCK
  12941	043262	010022 				MOV	R0,(R2)+	;;;ASSUME NO AGLOMERATION
  12942	043264	061216 				ADD	@R2,@SP		;;;CALCULATE ADDRESS OF NEXT BLOCK
  12943	043266	020026 				CMP	R0,(SP)+	;;;EQUAL TO BLOCK BEING RELEASED?
  12944	043270	001003 				BNE	70$		;;;IF NE NO
  12945	043272	061201 				ADD	@R2,R1		;;;MERGE TWO BLOCKS
  12946	043274	011042 				MOV	@R0,-(R2)	;;;MOVE LINK WORD TO PREVIOUS BLOCK
  12947	043276	010200 				MOV	R2,R0		;;;SET NEW ADDRESS OF BLOCK
  12948	043300				70$:
  12949	043300	010160 	000002 			MOV	R1,2(R0)	;;;SET SIZE OF BLOCK RELEASED
  12950	043304					.ENB6			;;;ENABLE INTERRUPTS
	043304	012637 	177776 			MOV	(SP)+,@#PS
  12951	043310				80$:
  12952	043310	012600 				MOV	(SP)+,R0	;RESTORE REGISTERS
  12953	043312	012601 				MOV	(SP)+,R1
  12954	043314	012602 				MOV	(SP)+,R2
  12955	043316	012603 				MOV	(SP)+,R3
  12956	043320					RETURN
	043320	000207 				RTS	PC
  12957						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 237
SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)

  12959						.SBTTL	SCOMM MODULE -- ..ALOW	(ALLOCATE OR WAIT)
  12960					;
  12961					;+
  12962					;
  12963					;	..ALOW -- SUBROUTINE TO ALLOCATE A BUFFER (..ALCB) OR WAIT
  12964					;	IF ONE IS NOT AVAILABLE
  12965					;
  12966					;	CALLING SEQUENCE:
  12967					;
  12968					;	SAME AS ..ALCB
  12969					;
  12970					;-
  12971	043322				..ALOW::CALL	..ALCB		;TRY TO ALLOCATE A CORE BUFFER
	043322	004737 	043034'			JSR	PC,..ALCB
  12972	043326	103004 				BCC	10$		;RETURN IF SUCCESSFUL
  12973	043330					WSIG$S			;WAIT FOR SIG EVENT
	043330	012746 				MOV	(PC)+,-(SP)
	043332	   061 	   001 			.BYTE	49.,1
	043334	104375 				EMT	375
  12974	043336	000771 				BR	..ALOW		;AND TRY AGAIN
  12975						;
  12976	043340				10$:	RETURN			;RETURN TO CALLER
	043340	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 238
SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)

  12978						.SBTTL	SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)
  12979
  12980					;+
  12981					; ..STTY -- START TERMINAL OUTPUT
  12982					;
  12983					; THIS SUBROUTINE WILL ENTER A TERMINAL OUTPUT PACKET IN A TERMINAL'S THREAD
  12984					; LIST AND START THE LINE IF THIS IS REQUIRED.  IF THE REQUEST IS FOR THE CTY
  12985					; AND KLINIK IS ACTIVE IN REMOTE MODE, THE REQUEST WILL BE PROCESSED FOR BOTH
  12986					; THE REMOTE AND LOCAL CTYS.
  12987					;
  12988					; REQUESTS FOR SENDALL PACKETS ARE NOT QUEUED UP FOR DH-11S, RATHER THEY ARE
  12989					; LEFT IN THE SENDALL RING BUFFERS.  SENDALL PACKETS FOR DL-11S ARE SIMPLY
  12990					; QUEUED UP AS NORMAL OUTPUT BY THE SENDALL SERVICE.
  12991					;
  12992					; NORMAL OUTPUT PACKETS ARE NOT QUEUED UP, BUT IMMEDIATELY DEALLOCATED IF:
  12993					;
  12994					;	1. THE DEVICE DOES NOT EXIST.
  12995					;	2. THE DEVICE IS IN AUTO-BAUD WAIT.
  12996					;
  12997					; NORMAL OUTPUT PACKETS ARE NOT STARTED IF:
  12998					;
  12999					;	1. THE DEVICE IS ALREADY OUTPUT ACTIVE.
  13000					;	2. THE DEVICE IS X'D-OFF.
  13001					;	3. THE DEVICE IS A CTY IN PDP-11 I/O WAIT.
  13002					;
  13003					; SENDALL PACKETS ARE ALWAYS STARTED ON X'D-OFF LINES.  THIS ROUTINE ASSUMES
  13004					; THAT THE SENDALL SERVICE WILL NOT ATTEMPT TO START A SENDALL ON A LINE WHICH:
  13005					;
  13006					;	1. IS OUTPUT ACTIVE.
  13007					;	2. IS SUPPRESSING SENDALLS.
  13008					;	3. DOES NOT EXIST.
  13009					;	4. IS IN AUTO-BAUD WAIT.
  13010					;
  13011					; INPUTS:
  13012					;
  13013					;	R0 -- POINTS TO OUTPUT PACKET
  13014					;	R2 -- POINTS TO DATA LINE SCANNER TABLE ENTRY FOR THIS LINE
  13015					;	R4 -- POINTS TO QUEUED PROTOCOL PACKET CONTAINING REQUEST
  13016					;
  13017					; OUTPUTS:
  13018					;
  13019					;	NO REGISTERS ARE ALTERED
  13020					;-
  13021
  13022	043342				..STTY::
  13023	043342					.INH5			; DISALLOW TERMINAL INTERRUPTS
	043342	013746 	177776 			MOV	@#PS,-(SP)
	043346	112737 	000240 	177776 		MOVB	#240,@#PS
  13024	043354	010546 				MOV	R5,-(SP)	;;; SAVE REGISTERS
  13025	043356	010446 				MOV	R4,-(SP)
  13026	043360	010346 				MOV	R3,-(SP)
  13027	043362	010246 				MOV	R2,-(SP)
  13028	043364	010146 				MOV	R1,-(SP)
  13029	043366	010046 				MOV	R0,-(SP)
  13030	043370	010205 				MOV	R2,R5		;;; COPY DLS TABLE POINTER TO R5
  13031	043372	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  13032	043400	001415 				BEQ	10$		;;; NO -- GO ON
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 238-1
SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)

  13033	043402	105737 	001224'			TSTB	.KLNSW+0	;;; YES -- IS REMOTE KLINIK ACTIVE??
  13034	043406	003412 				BLE	10$		;;; NO -- GO ON
  13035	043410	010004 				MOV	R0,R4		;;; [TCO 4.2265] YES -- COPY BUFFER
  13036	043412					CALL	COPBUF		;;; SO
	043412	004737 	027616'			JSR	PC,COPBUF
  13037	043416	013705 	002636'			MOV	KLNPTR,R5	;;; SUBSTITUTE KLINIK POINTER
  13038	043422					CALL	20$		;;; START THE KLINIK LINE
	043422	004737 	043462'			JSR	PC,20$
  13039	043426	016605 	000004 			MOV	4(SP),R5	;;; GET CTY POINTER
  13040	043432	011600 				MOV	(SP),R0		;;; [TCO 4.2265] AND THE BUFFER POINTER
  13041	043434				10$:
  13042	043434					CALL	20$		;;; START UP THE LINE
	043434	004737 	043462'			JSR	PC,20$
  13043	043440	012600 				MOV	(SP)+,R0	;;; RESTORE REGISTERS
  13044	043442	012601 				MOV	(SP)+,R1
  13045	043444	012602 				MOV	(SP)+,R2
  13046	043446	012603 				MOV	(SP)+,R3
  13047	043450	012604 				MOV	(SP)+,R4
  13048	043452	012605 				MOV	(SP)+,R5
  13049	043454					.ENB5			;;; ALLOW INTERRUPTS
	043454	012637 	177776 			MOV	(SP)+,@#PS
  13050	043460					RETURN			; TO CALLER
	043460	000207 				RTS	PC
  13051					;
  13052					; HERE TO SEE IF THE LINE EXISTS
  13053					;
  13054	043462				20$:
  13055	043462	005765 	000002 			TST	TTYEXP(R5)	;;; DOES THE DEVICE EXIST??
  13056	043466	001457 				BEQ	80$		;;; NO -- DEALLOCATE THE NODE AND EXIT
  13057					;
  13058					; HERE TO SEE IF A SENDALL MUST BE STARTED ON THIS LINE
  13059					;
  13060	043470	105060 	000007 			CLRB	T.HFCN(R0)	;;; CLEAR THE FUNCTION CODE
  13061	043474	020037 	002626'			CMP	R0,.CRSND	;;; IS THIS A SENDALL??
  13062	043500	001416 				BEQ	40$		;;; YES -- START IT UP
  13063					;
  13064					; HERE TO START NORMAL OUTPUT ON THIS LINE
  13065					;
  13066	043502	032765 	000010 	000006 		BIT	#TT.ABW,STSW1(R5) ;;; IS THIS LINE IN AUTO-BAUD WAIT??
  13067	043510	001046 				BNE	80$		;;; YES -- DEALLOCATE THE NODE AND EXIT
  13068	043512	010501 				MOV	R5,R1		;;; NO -- SET UP TO FIND END OF THREAD LIST
  13069	043514				30$:
  13070	043514	010102 				MOV	R1,R2		;;; COPY NODE POINTER TO R2
  13071	043516	011201 				MOV	(R2),R1		;;; FIND END OF LIST
  13072	043520	001375 				BNE	30$		;;; KEEP GOING
  13073	043522	010012 				MOV	R0,(R2)		;;; SET THIS NODE IN THE THREAD LIST
  13074	043524	005010 				CLR	(R0)		;;; MARK THE END OF THE LIST
  13075	043526	032765 	000201 	000006 		BIT	#TT.XOF!TT.OUT,STSW1(R5) ;;; IS THE LINE X'D OFF
  13076									;;; OR ALREADY ACTIVE??
  13077	043534	001030 				BNE	60$		;;; YES -- JUST EXIT
  13078					;
  13079					; HERE TO START UP THE DEVICE
  13080					;
  13081	043536				40$:
  13082	043536	032765 	000002 	000006 		BIT	#TT.CTY,STSW1(R5) ;;; IS THIS A CTY??
  13083	043544	001403 				BEQ	50$		;;; NO -- GO ON
  13084	043546	005737 	002632'			TST	.TTP11		;;; YES -- IN PDP-11 I/O WAIT??
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 238-2
SCOMM MODULE -- ..STTY (START TERMINAL OUTPUT)

  13085	043552	001021 				BNE	60$		;;; YES -- JUST EXIT
  13086	043554				50$:
  13087	043554	010504 				MOV	R5,R4		;;; NO -- COPY DLS POINTER TO R4
  13088	043556	016501 	000002 			MOV	TTYEXP(R5),R1	;;; EXTERNAL PAGE POINTER TO R1
  13089	043562	162704 	003046'			SUB	#DHTBL,R4	;;; IS THIS A DL-11??
  13090	043566	002414 				BLT	70$		;;; YES -- HANDLE DL-11
  13091					;
  13092					; HERE TO START UP A DH-11 LINE
  13093					;
  13094	043570					CALL	.STDHL		;;; SET THE LINE NUMBER IN THE DH-11
	043570	004737 	037576'			JSR	PC,.STDHL
  13095	043574	010104 				MOV	R1,R4		;;; EXTERNAL PAGE POINTER TO R4
  13096	043576					CALL	.DHSTO		;;; START THE DH-11 OUTPUT
	043576	004737 	034300'			JSR	PC,.DHSTO
  13097	043602	020037 	002626'			CMP	R0,.CRSND	;;; IS THIS A SENDALL??
  13098	043606	001003 				BNE	60$		;;; NO -- JUST EXIT
  13099	043610	052765 	001000 	000006 		BIS	#TT.SIP,STSW1(R5) ;;; YES -- MARK SENDALL IN PROGRESS
  13100	043616				60$:
  13101	043616					RETURN			;;; AND EXIT
	043616	000207 				RTS	PC
  13102					;
  13103					; HERE TO START UP A DL-11 LINE
  13104					;
  13105	043620				70$:
  13106	043620	010104 				MOV	R1,R4		;;; EXTERNAL PAGE POINTER TO R4
  13107	043622	000137 	034440'			JMP	.DLSTO		;;; START DL-11 OUTPUT
  13108						;
  13109					;
  13110					; HERE TO DEALLOCATE A NODE AND EXIT
  13111					;
  13112	043626				80$:
  13113	043626	000137 	043162'			JMP	..DECN		;;; DEALLOCATE NODE AND EXIT
  13114						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 239
SCOMM MODULE -- ..STPT	(STOP TTY)

  13116						.SBTTL	SCOMM MODULE -- ..STPT	(STOP TTY)
  13117					;
  13118					;+
  13119					;
  13120					;	..STPT -- SUBROUTINE TO STOP TTY OUTPUT AND FLUSH THE BUFFERS
  13121					;
  13122					;	ENTRY CONDITIONS:
  13123					;	R2 -- POINTER TO TTYTBL (TABLE WHERE QUEUE FOR THIS LINE IS)
  13124					;
  13125					;	CALL	..STPT
  13126					;
  13127					;	EXIT CONDITIONS;
  13128					;
  13129					;	CC-C CLEAR
  13130					;
  13131					;	R0,R1 REGISTERS ALTERED
  13132					;
  13133					;-
  13134					;
  13135	043632				..STPT::
  13136	043632					.INH5			; INHIBIT TERMINAL INTERRUPTS
	043632	013746 	177776 			MOV	@#PS,-(SP)
	043636	112737 	000240 	177776 		MOVB	#240,@#PS
  13137	043644	032762 	000002 	000006 		BIT	#TT.CTY,STSW1(R2) ;;; IS THIS A CTY??
  13138	043652	001411 				BEQ	5$		;;; NO -- GO ON
  13139	043654	105737 	001224'			TSTB	.KLNSW+0	;;; YES -- IS KLINIK ACTIVE??
  13140	043660	003406 				BLE	5$		;;; NOT THAT WE CARE
  13141	043662	010246 				MOV	R2,-(SP)	;;; YES -- SAVE R2
  13142	043664	013702 	002636'			MOV	KLNPTR,R2	;;; KLINIK LINE POINTER TO R2
  13143	043670					CALL	10$		;;; DEQUEUE AND STOP KLINIK LINE
	043670	004737 	043710'			JSR	PC,10$
  13144	043674	012602 				MOV	(SP)+,R2	;;; RESTORE R2
  13145	043676				5$:				;;;
  13146	043676					CALL	10$		;;; DEQUEUE AND STOP LINE
	043676	004737 	043710'			JSR	PC,10$
  13147	043702					.ENB5			;;; ALLOW TERMINAL INTERRUPTS
	043702	012637 	177776 			MOV	(SP)+,@#PS
  13148	043706					RETURN			; AND EXIT
	043706	000207 				RTS	PC
  13149					;
  13150					; HERE TO FLUSH OUTPUT LIST AND STOP LINE
  13151					;
  13152	043710				10$:
  13153	043710	020227 	003046'			CMP	R2,#DHTBL	;;; IS THIS A DH-11??
  13154	043714	103455 				BLO	40$		;;; NO -- GO STOP DL11 OUTPUT
  13155	043716	010246 				MOV	R2,-(SP)	;;; YES -- SAVE DH-11 POINTER
  13156	043720	011202 				MOV	(R2),R2		;;; MOVE OVER FIRST NODE
  13157	043722	001402 				BEQ	20$		;;; ONLY ONE NODE -- FORGET IT
  13158	043724					CALL	60$		;;; FLUSH THE THREAD LIST
	043724	004737 	044074'			JSR	PC,60$
  13159					;
  13160					; HERE TO STOP A DH-11 LINE
  13161					;
  13162	043730				20$:
  13163	043730	012602 				MOV	(SP)+,R2	;;; RESTORE DH-11 POINTER
  13164	043732	010201 				MOV	R2,R1		;;; INSURE TTY WILL STOP
  13165	043734	032762 	000001 	000006 		BIT	#TT.OUT,STSW1(R2) ;;; OUTPUT ACTIVE??
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 239-1
SCOMM MODULE -- ..STPT	(STOP TTY)

  13166	043742	001454 				BEQ	60$		;;; NO -- GET RID OF FIRST NODE AND EXIT
  13167	043744	032762 	001000 	000006 		BIT	#TT.SIP,STSW1(R2) ;;; MAYBE -- CHECK FOR SENDALL
  13168	043752	001050 				BNE	60$		;;; YES -- GET RID OF FIRST NODE AND EXIT
  13169	043754	032762 	000002 	000006 		BIT	#TT.CTY,STSW1(R2) ;;; IS THIS A CTY??
  13170	043762	001403 				BEQ	30$		;;; NO -- GO ON
  13171	043764	005737 	002632'			TST	.TTP11		;;; YES -- -11 I/O WAIT??
  13172	043770	001041 				BNE	60$		;;; YES -- GET RID OF FIRST NODE AND EXIT
  13173	043772				30$:				;;;
  13174	043772	162701 	003046'			SUB	#DHTBL,R1	;;; FIND THE DH-11 UNIT NUMBER
  13175	043776	006201 				ASR	R1		;;;
  13176	044000	006201 				ASR	R1		;;;
  13177	044002	006201 				ASR	R1		;;;
  13178	044004	042701 	177760 			BIC	#^C17,R1	;;; MASK OFF JUNK
  13179	044010	016200 	000002 			MOV	TTYEXP(R2),R0	;;; FIND I/O PAGE ADDRESS
  13180	044014	042710 	001077 			BIC	#1077,(R0)	;;; CLEAR CURRENT UNIT
  13181	044020	050110 				BIS	R1,(R0)		;;; SET UP DESIRED UNIT
  13182	044022	022760 	177776 	000010 		CMP	#-2,10(R0)	;;; MORE THAN TWO CHARACTERS LEFT??
  13183	044030	003427 				BLE	70$		;;; NO -- GO ON
  13184	044032	012760 	177777 	000010 		MOV	#-1,10(R0)	;;; YES -- FORCE THE RUNDOWN
  13185	044040	011200 				MOV	(R2),R0		;;; [TCO 4.2096] PICK UP NODE POINTER
  13186	044042	105060 	000006 			CLRB	T.HCBC(R0)	;;; [TCO 4.2096] MARK EMPTY TO FORCE DEQUEUE
  13187	044046	000420 				BR	70$		;;; AND EXIT
  13188						;
  13189					;
  13190					; HERE TO STOP A DL11 LINE
  13191					;
  13192	044050				40$:
  13193	044050	032762 	000002 	000006 		BIT	#TT.CTY,STSW1(R2) ;;; IS THIS A CTY??
  13194	044056	001406 				BEQ	60$		;;; NO -- GO ON
  13195	044060	005737 	002632'			TST	.TTP11		;;; YES -- -11 I/O WAIT??
  13196	044064	001003 				BNE	60$		;;; YES -- JUST FLUSH THREAD LIST
  13197	044066	042762 	000001 	000006 		BIC	#TT.OUT,STSW1(R2) ;;; NO -- SET NO INTERRUPT EXPECTED
  13198					;
  13199					; INTERNAL SUBROUTINE TO REMOVE THREAD LIST ENTRIES UP TO THAT
  13200					; POINTED TO BY R2
  13201					;
  13202	044074				60$:
  13203	044074	011200 				MOV	(R2),R0		;;; GET THIS NODE POINTER
  13204	044076	001404 				BEQ	70$		;;; END OF LIST IF .EQ. 0
  13205	044100	011012 				MOV	(R0),(R2)	;;; DELINK AND
  13206	044102					CALL	..DECN		;;; DEALLOACATE THIS NODE
	044102	004737 	043162'			JSR	PC,..DECN
  13207	044106	000772 				BR	60$		;;; DO THE NEXT NODE
  13208						;
  13209	044110				70$:
  13210	044110					RETURN			;;; TO CALLER
	044110	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 240
SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 Q)

  13212						.SBTTL	SCOMM MODULE -- ..STCH	(STORE CHARACTER IN TO 10 Q)
  13213					;+
  13214					;
  13215					;
  13216					;	..STCH -- SUBROUTINE TO STORE A CHARACTER IN THE TO 10
  13217					;	QUEUE AND IF THAT QUEUE IS FULL SEND IT TO THE KL10 BY
  13218					;	ENTERING IT IN THE TO10Q.
  13219					;
  13220					;	CALLING SEQUENCE:
  13221					;
  13222					;	MOV	CHARACTER,-(SP)
  13223					;	R5 -- POINTER TO DEVICE TABLE ENTRY
  13224					;	CALL	..STCH
  13225					;
  13226					;	REGISTERS ALTERED: NONE
  13227					;
  13228					;-
  13229						.ENABL	LSB
  13230
  13231	044112				..STCH::
  13232	044112	010446 				MOV	R4,-(SP)	; SAVE REGISTERS
  13233	044114	010346 				MOV	R3,-(SP)
  13234	044116	010146 				MOV	R1,-(SP)
  13235	044120	012703 	000004 			MOV	#D.CDLS,R3	; SET UP AS DATA/LINE SCANNER
  13236	044124					CALL	STLN		; GET LINE NUMBER
	044124	004737 	044176'			JSR	PC,STLN
  13237	044130	000304 				SWAB	R4		; AND PUT IN HIGH ORDER BYTE
  13238	044132	156604 	000010 			BISB	10(SP),R4	; SET CHARACTER
  13239	044136	012701 	000004 			MOV	#BC.LNC,R1	; SET LINE/CHARACTER
  13240	044142				STCM:
  13241	044142					CALL	..STFC		; STORE FUNCTION
	044142	004737 	044242'			JSR	PC,..STFC
  13242	044146	012601 				MOV	(SP)+,R1	; RESTORE
  13243	044150	012603 				MOV	(SP)+,R3
  13244	044152	012604 				MOV	(SP)+,R4
  13245	044154				10$:
  13246	044154					RETURN
	044154	000207 				RTS	PC
  13247
  13248						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 241
SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)

  13250						.SBTTL	SCOMM MODULE -- ..SACK	(SEND ACKNOWLEDGEMENT)
  13251
  13252					;+
  13253					;
  13254					;	..SACK -- SUBROUTINE TO ACKNOWLEDGE THE OUTPUT OF CHARACTER OR STRINGS
  13255					;
  13256					;	CALLING SEQUENCE:
  13257					;
  13258					;	R3 -- DEVICE ID
  13259					;	R5 -- DEVICE TABLE POINTER
  13260					;
  13261					;	EXIT CONDITIONS:
  13262					;	NO REGISTERS ALTERED
  13263					;
  13264					;-
  13265
  13266	044156	010446 			..SACK::MOV	R4,-(SP)	;SAVE REGISTERS
  13267	044160	010346 				MOV	R3,-(SP)
  13268	044162	010146 				MOV	R1,-(SP)
  13269	044164					CALL	STLN		;GET LINE NUMBER.
	044164	004737 	044176'			JSR	PC,STLN
  13270	044170	012701 	000017 			MOV	#BC.SAK,R1
  13271	044174	000762 				BR	STCM		;STORE COMMON
  13272						;
  13273	044176	010246 			STLN:	MOV	R2,-(SP)
  13274	044200	005004 				CLR	R4		;DEFAULT LINE # TO ZERO.
  13275	044202	010302 				MOV	R3,R2		;COMPUTE OFFSET TO
  13276	044204	006302 				ASL	R2		;DEVICE QUEUE ENTRY
  13277	044206	006302 				ASL	R2
  13278	044210	006302 				ASL	R2
  13279	044212	006302 				ASL	R2
  13280	044214	010501 				MOV	R5,R1		;NOW COMPUTE OFFSET
  13281	044216	166201 	007366'			SUB	.DQPBA-20(R2),R1;INTO DEVICE LINE TABLE
  13282	044222	001405 				BEQ	20$		;FIRST ENTRY - ALL DONE.
  13283	044224	116202 	007370'			MOVB	.DQPBA-20+2(R2),R2 ;GET TABLE ENTRY SIZE
  13284	044230	005204 			10$:	INC	R4		;AND MARCH THROUGH
  13285	044232	160201 				SUB	R2,R1
  13286	044234	003375 				BGT	10$
  13287	044236	012602 			20$:	MOV	(SP)+,R2
  13288	044240					RETURN			;GOOD-BYE !
	044240	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 242
SCOMM MODULE -- ..STFC	(STORE FUNCTION)

  13290						.SBTTL	SCOMM MODULE -- ..STFC	(STORE FUNCTION)
  13291
  13292					;+
  13293					;
  13294					;	..STFC -- SUBROUTINE TO START A ONE WORD FUNCTION OF CHARACTER
  13295					;
  13296					;	CALLING SEQUENCE:
  13297					;
  13298					;	R1 -- FUNCTION CODE
  13299					;	R3 -- DEVICE ID
  13300					;	R4 -- CHARACTER TO BE SENT TO 10 AND LINE NUMBER
  13301					;
  13302					;	EXIT CONDITIONS:
  13303					;
  13304					;-
  13305
  13306	044242	010546 			..STFC::MOV	R5,-(SP)	;SAVE R5
  13307	044244					.INH6
	044244	013746 	177776 			MOV	@#PS,-(SP)
	044250	112737 	000300 	177776 		MOVB	#300,@#PS
  13308	044256	020137 	001250'			CMP	R1,.CPFN	;THE CORRECT CURRENT FUNCTION?
  13309	044262	001026 				BNE	10$		;NO -- MUST RESET
  13310	044264	020337 	001252'			CMP	R3,.CPDV	;SAME DEVICE?
  13311	044270	001023 				BNE	10$		;MUST RESET HERE ALSO
  13312	044272	010477 	134760 		5$:	MOV	R4,@.CRPB	;SET THE LINE NUMBER
  13313	044276	012705 	000002 			MOV	#2,R5
  13314	044302	060537 	001256'			ADD	R5,.CRPB
  13315	044306	060577 	134750 			ADD	R5,@.CRSB
  13316	044312	060537 	001246'			ADD	R5,.CRQZ
  13317	044316	160537 	001254'			SUB	R5,.CRSZ
  13318	044322	001002 				BNE	7$		;YES -- RETURN TO CALLER
  13319	044324					CALL	..STQ		;NO -- BETTER START QUEUE
	044324	004737 	044634'			JSR	PC,..STQ
  13320	044330				7$:	.ENB6			;ENABLE INTERRUPTS
	044330	012637 	177776 			MOV	(SP)+,@#PS
  13321	044334	012605 				MOV	(SP)+,R5	;RESTORE
  13322	044336					RETURN			;RETURN TO CALLER
	044336	000207 				RTS	PC
  13323					;
  13324	044340	022737 	000012 	001254'	10$:	CMP	#10.,.CRSZ	;IS THERE ROOM?
  13325	044346	101402 				BLOS	15$		;YES -- START NEW ENTRY
  13326	044350				13$:	CALL	..STQ		;NO -- ENTER IT IN THE QUEUE
	044350	004737 	044634'			JSR	PC,..STQ
  13327	044354	010046 			15$:	MOV	R0,-(SP)	;SAVE R0
  13328	044356	012705 	000010 			MOV	#10,R5
  13329	044362	013700 	001256'			MOV	.CRPB,R0	;FIND CURRENT BUFFER POINTER
  13330	044366	060537 	001246'			ADD	R5,.CRQZ	;UPDATE QUEUE COUNTS
  13331	044372	160537 	001254'			SUB	R5,.CRSZ
  13332	044376	010037 	001262'			MOV	R0,.CRSB	;SET UP CURRENT BUFFER POINTER
  13333	044402	010520 				MOV	R5,(R0)+	;SET UP CURRENT SIZE
  13334	044404	010120 				MOV	R1,(R0)+	;SET THE FUNCTION CODE
  13335	044406	010137 	001250'			MOV	R1,.CPFN	;SAVE CURRENT FUNCTION
  13336	044412	010320 				MOV	R3,(R0)+	;SET DEVICE CODE
  13337	044414	010337 	001252'			MOV	R3,.CPDV	;SET DEVICE CODE FOR REFER LATER
  13338	044420	005020 				CLR	(R0)+		;CLEAR SPARE WORD
  13339	044422	010037 	001256'			MOV	R0,.CRPB	;SET CURRENT BUFFER POINTER
  13340	044426	012600 				MOV	(SP)+,R0	;RESTORE R0
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 242-1
SCOMM MODULE -- ..STFC	(STORE FUNCTION)

  13341	044430	000720 				BR	5$		;AND SET FUNCTION
  13342						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 243
SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)

  13344						.SBTTL	SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)
  13345					;
  13346					;+
  13347					;
  13348					;	..STIN -- SUBROUTINE TO START AN INDIRECT DTE20 FUNCTION
  13349					;	TO THE 10
  13350					;
  13351					;  ENTRY CONDITIONS:
  13352					;
  13353					;	R0 -- BUFFER ADDRESS
  13354					;	R1 -- FUNCTION +100000
  13355					;	R2 -- EFN/BUFFER SIZE
  13356					;	R3 -- DEVICE ID
  13357					;
  13358					;	NOTE :  THE FIRST WORD OF THE BUFFER MUST CONTAIN THE
  13359					;	LINE NUMBER AND BUFFER SIZE
  13360					;
  13361					;	MAY NOT BE CALLED FROM ISR
  13362					;
  13363					;
  13364					;	CALL	..STIN
  13365					;
  13366					;  EXIT CONDITIONS:
  13367					;	CC-C CLEAR SUCCESS
  13368					;	CC-C SET FAILURE -- PRIMARY PROTOCOL IN USE
  13369					;
  13370					;-
  13371					;
  13372	044432				..STIN::
  13373	044432	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ; [TCO 4.2208] IS PRIMARY PROTOCOL RUNNING??
  13374	044440	001002 				BNE	10$		; [TCO 4.2208] YES -- GO ON
  13375	044442	000261 				SEC			; [TCO 4.2208] NO -- SET ERROR RETURN
  13376	044444	000472 				BR	40$		; [TCO 4.2208] AND EXIT
  13377						;
  13378	044446				10$:
  13379	044446	010546 				MOV	R5,-(SP)	;SAVE REGISTERS
  13380	044450	010046 				MOV	R0,-(SP)
  13381	044452	010146 				MOV	R1,-(SP)
  13382	044454	012701 	000030 			MOV	#30,R1		;SET UP TO ALLOCATE A BUFFER
  13383	044460					CALL	..ALOW		;ALLOCATE BUFFER
	044460	004737 	043322'			JSR	PC,..ALOW
  13384	044464				20$:
  13385	044464	010005 				MOV	R0,R5		;MOVE BUFFER ADDRESS TO R5
  13386	044466	022525 				CMP	(R5)+,(R5)+	;MOVE OVER THE LISTHEAD
  13387	044470	010125 				MOV	R1,(R5)+	;STORE THE BUFFER SIZE
  13388	044472	012715 	000012 			MOV	#12,@R5		;PUT IN THE SIZE OF THIS HEADER PACKET
  13389	044476	012525 				MOV	(R5)+,(R5)+	;ALSO PUT IT IN FIRST WORD TO 10
  13390	044500	011625 				MOV	@SP,(R5)+	;STORE FUNCTION CODE
  13391	044502	010325 				MOV	R3,(R5)+	;STORE THE DEVICE I/D
  13392	044504	005025 				CLR	(R5)+		;CLEAR THE SPARE WORD
  13393	044506	016601 	000002 			MOV	2(SP),R1	;RESTORE BUFFER ADDRESS
  13394	044512	012125 				MOV	(R1)+,(R5)+	;SET BYTE COUNT/LINE NUMBER
  13395	044514	010125 				MOV	R1,(R5)+	;SET UP BUFFER ADDRESS
  13396	044516	010246 				MOV	R2,-(SP)	;SAVE REGISTERS MODIFIED
  13397	044520	010346 				MOV	R3,-(SP)
  13398	044522	010546 				MOV	R5,-(SP)
  13399	044524	013705 	001006'			MOV	.CRTSK,R5	;SET UP TO CONVERT EFN
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 243-1
SCOMM MODULE -- ..STIN	(START INDIRECT FUNCTION)

  13400	044530	010203 				MOV	R2,R3
  13401	044532					CALL	.CEFN3		;CONVERT EFN
	044532	004737 	041604'			JSR	PC,.CEFN3
  13402	044536	012605 				MOV	(SP)+,R5	;RESTORE R5
  13403	044540	010325 				MOV	R3,(R5)+	;SET MASK
  13404	044542	010225 				MOV	R2,(R5)+	;SET ADDRESS
  13405	044544	012603 				MOV	(SP)+,R3	;RESTORE REGISTERS
  13406	044546	012602 				MOV	(SP)+,R2
  13407	044550	010446 				MOV	R4,-(SP)	;SAVE R4
  13408	044552	010001 				MOV	R0,R1		;SET UP TO ENTER NODE
  13409	044554					.INH6			;INHIBIT DTE20 INTERRUPTS
	044554	013746 	177776 			MOV	@#PS,-(SP)
	044560	112737 	000300 	177776 		MOVB	#300,@#PS
  13410	044566	012704 	001326'			MOV	#TO10Q,R4	;;;START TO 10 Q IF NECESSARY
  13411	044572	021404 				CMP	@R4,R4		;;;CHECK TO SEE IF ALREADY GOING
  13412	044574	001003 				BNE	30$		;;;YES -- JUST ENTER IN Q
  13413	044576	010104 				MOV	R1,R4		;;;NO -- SET NODE ADDRESS
  13414	044600					CALL	STNTQ		;;;START QUEUE
	044600	004737 	031710'			JSR	PC,STNTQ
  13415	044604				30$:
  13416	044604	013704 	001330'			MOV	TO10Q+2,R4	;;;ENTER Q
  13417	044610					CALL	..NADD		;;;ADD NODE
	044610	004737 	042614'			JSR	PC,..NADD
  13418	044614					.ENB6			;;;ENABLE INTERRUPTS
	044614	012637 	177776 			MOV	(SP)+,@#PS
  13419	044620	012604 				MOV	(SP)+,R4	;;;RESTORE REGISTERS
  13420	044622	012601 				MOV	(SP)+,R1
  13421	044624	012600 				MOV	(SP)+,R0
  13422	044626	012605 				MOV	(SP)+,R5
  13423	044630	000241 				CLC			;CLEAR C
  13424	044632				40$:				; [TCO 4.2208]
  13425	044632					RETURN			;RETURN TO CALLER
	044632	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 244
SCOMM MODULE -- ..STQ	(STORE IN TO 10 Q)

  13427						.SBTTL	SCOMM MODULE -- ..STQ	(STORE IN TO 10 Q)
  13428					;
  13429					;+
  13430					;
  13431					;	..STQ -- SUBROUTINE TO STORE IN THE TO 10 Q AND
  13432					;	GET ANOTHER BUFFER FOR TRANSFERRING TO THE TO 10 QUEUE.
  13433					;	INIAN -- SPECIAL ENTRY POINT FOR INI.MAC (INITIALIZATION)
  13434					;	IT SHOULD BE USED BY NO OTHERS!!
  13435					;
  13436					;
  13437					;	CALLING SEQUENCE:
  13438					;
  13439					;	.CP?? MUST BE SETUP TO THE LAST Q ENTRY
  13440					;	CALL	..STQ
  13441					;
  13442					;	EXIT CONDITIONS:
  13443					;
  13444					;	.CP?? IS SET UP TO POINT TO A NEW QUEUE
  13445					;
  13446					;-
  13447					;
  13448						.ENABL	LSB
  13449	044634	010046 			..STQ::	MOV	R0,-(SP)	;SAVE REGISTERS
  13450	044636	010146 				MOV	R1,-(SP)
  13451	044640	010446 				MOV	R4,-(SP)
  13452	044642	013704 	001260'			MOV	.CRHD,R4	;FIND THE HEADER OF THE CURRENT BUFFER
  13453	044646	013764 	001246'	000006 		MOV	.CRQZ,6(R4)	;SET THE CURRENT QUEUE SIZE IN THE BUFFER
  13454									;AND CHECK TO SEE IF ANYTHING THERE
  13455	044654	001454 				BEQ	40$		;NO -- DON'T ATTEMPT TO SEND TO 10
  13456	044656	012701 	001326'			MOV	#TO10Q,R1	;FIND THE LISTHEAD OF THE 10Q
  13457	044662	021101 				CMP	@R1,R1		;IS THERE AN ENTRY?
  13458	044664	001003 				BNE	20$		;ALREADY STARTED?
  13459	044666					CALL	STNTQ		;START THE QUEUE UP
	044666	004737 	031710'			JSR	PC,STNTQ
  13460	044672	000404 				BR	25$
  13461						;
  13462	044674	022737 	000014 	001254'	20$:	CMP	#14,.CRSZ
  13463	044702	101441 				BLOS	40$		;YES -- DON'T QUEUE IT YET
  13464	044704	010401 			25$:	MOV	R4,R1		;SET UP THE NODE ADDRESS
  13465	044706	013704 	001330'			MOV	TO10Q+2,R4	;SET UP LISTHEAD ADDRESS
  13466	044712					CALL	..NADD		;ADD THE NODE TO THE LIST
	044712	004737 	042614'			JSR	PC,..NADD
  13467	044716	012701 	000140 		INIAN::	MOV	#E.OPSZ,R1	;SET UP THE BUFFER SIZE
  13468	044722				27$:	CALL	..ALCB		;ALLOCATE A BUFFER
	044722	004737 	043034'			JSR	PC,..ALCB
  13469	044726	103010 				BCC	30$		;GO SET UP NEW BUFFER POINTERS
  13470	044730	012701 	000030 			MOV	#30,R1		;TRY FOR A SMALLER BUFFER
  13471	044734					CALL	..ALCB
	044734	004737 	043034'			JSR	PC,..ALCB
  13472	044740	103003 				BCC	30$		;GOT IT -- ALL OK
  13473	044742					.CRASH	B03
	044742	000004 				IOT
	044744	   102 	   060 	   063 		.ASCIZ	/B03/
	044747	   000
  13474					;
  13475					;
  13476	044750	010037 	001260'		30$:	MOV	R0,.CRHD	;SET UP THE POINTER TO THE HEAD OF THE BUFFER
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 244-1
SCOMM MODULE -- ..STQ	(STORE IN TO 10 Q)

  13477	044754	005037 	001252'			CLR	.CPDV		;SET NO DEVICE IN USE
  13478	044760	022020 				CMP	(R0)+,(R0)+	;MOVE OVER THE FORWARD/BACKWARD POINTERS
  13479	044762	010120 				MOV	R1,(R0)+	;SET UB NODE SIZE
  13480	044764	005020 				CLR	(R0)+		;SET UP CURRENT SIZE OF Q
  13481	044766	010037 	001256'			MOV	R0,.CRPB	;SET THE CURRENT BUFFER POINTER
  13482	044772	162701 	000012 			SUB	#10.,R1		;DON'T WANT TO INCLUDE HEADER
  13483	044776	010137 	001254'			MOV	R1,.CRSZ	;SET UP SIZE OF Q(MAX)
  13484	045002	005037 	001246'			CLR	.CRQZ		;CLEAR CURRENT QUEUE SIZE
  13485	045006	012604 			40$:	MOV	(SP)+,R4	;RESTORE REGISTSERS
  13486	045010	012601 				MOV	(SP)+,R1
  13487	045012	012600 				MOV	(SP)+,R0
  13488	045014					RETURN			;RETURN TO CALLER
	045014	000207 				RTS	PC
  13489					;
  13490						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 245
SCOMM MODULE -- WFED	(WAIT FOR EXAMINE/DEPOSIT)

  13492						.SBTTL	SCOMM MODULE -- WFED	(WAIT FOR EXAMINE/DEPOSIT)
  13493
  13494					;+
  13495					; WFED -- WAITS FOR EXAMINE/DEPOSIT TRANSFERS AND CHECKS TO SEE
  13496					;	  THAT E-BOX HAS NOT STOPPED
  13497					;
  13498					; CALLING SEQUENCE:
  13499					;
  13500					;	CALL	WFED
  13501					;
  13502					; ENTRY CONDITIONS:
  13503					;
  13504					;	R0 -- ADDRESS OF DTE20
  13505					;	IF ".NOERR" .NE. 0 -- ONLY CHECK TIMEOUT, ELSE CHECK ALL ERRORS
  13506					;
  13507					; EXIT CONDITIONS:
  13508					;
  13509					; SUCCESS:
  13510					;
  13511					;	NO REGISTERS ALTERED CC-C CLEAR
  13512					;
  13513					; NORMAL ERROR CONDITIONS:
  13514					;
  13515					;	CC-C SET -- E-BOX STOPPED (PROTOCOL STOPPED - KS.CES SET IN .KLITK)
  13516					;	CC-C SET -- DEP/EX FAILURE (PROTOCOL STOPPED - KS.DEX SET IN .KLITK)
  13517					;
  13518					;	CC-C CLEAR -- E-BUS PARITY ERROR (PROTOCOL UNCHANGED -- KS.EPE SET IN .KLITK)
  13519					;	CC-C CLEAR -- TEN STOPPED (PROTOCOL STOPPED -- KS.TSP SET IN .KLITK)
  13520					;
  13521					; SPECIAL ERROR CONDITIONS:
  13522					;
  13523					;	TIMEOUT AND ".NOERR" .NE. 0 - CC-C SET
  13524					;
  13525					; NOTE:
  13526					;
  13527					;	**** THIS ROUTINE MUST BE ENTERED AT PRI6 ****
  13528					;-
  13529
  13530	045016				WFED::
  13531	045016	010146 				MOV	R1,-(SP)	;;; [TCO 4.2217] SAVE R1
  13532	045020	010246 				MOV	R2,-(SP)	;;; [TCO 4.2217] AND R2
  13533	045022				10$:
  13534	045022	012737 	003000 	001344'		MOV	#3000,DEXST	;;; [TCO 4.2217] SET UP TIMEOUT COUNT
  13535					;
  13536					; TIMEOUT A DEPOSIT OR EXAMINE
  13537					;
  13538	045030				15$:
  13539	045030	032760 	000004 	000034 		BIT	#DEXDON,STATD(R0) ;;; [TCO 4.2217] TRANSFER COMPLETED??
  13540	045036	001024 				BNE	25$		;;; [TCO 4.2217] YES -- GO ON
  13541	045040	005337 	001344'			DEC	DEXST		;;; [TCO 4.2217] NO -- TIMED OUT??
  13542	045044	001371 				BNE	15$		;;; [TCO 4.2217] NO -- GO ON
  13543					;
  13544					; HERE TO CHECK TIMEOUT ERRORS
  13545					;
  13546	045046	005060 	000030 			CLR	DAG1(R0)	;;; [TCO 4.2217] YES -- CLEAR FLAGS
  13547	045052	105737 	001122'			TSTB	.NOERR		;;; [TCO 4.2217] IGNORE ERRORS??
  13548	045056	001100 				BNE	60$		;;; [TCO 4.2217] YES -- FLAG TIMEOUT AND EXIT
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 245-1
SCOMM MODULE -- WFED	(WAIT FOR EXAMINE/DEPOSIT)

  13549	045060	032760 	004000 	000030 		BIT	#DS04,DAG1(R0)	;;; [TCO 4.2217] NO -- CLOCK ERROR STOP??
  13550	045066	001404 				BEQ	20$		;;; [TCO 4.2217] NO -- GO ON
  13551	045070	052737 	000002 	001126'		BIS	#KS.CES,.KLITK	;;; [TCO 4.2217] YES -- FLAG IT
  13552	045076	000462 				BR	50$		;;; [TCO 4.2217] AND EXIT
  13553						;
  13554	045100				20$:
  13555	045100	052737 	000010 	001126'		BIS	#KS.DEX,.KLITK	;;; [TCO 4.2217] SET DEPOSIT/EXAMINE FAILURE
  13556	045106	000456 				BR	50$		;;; [TCO 4.2217] AND EXIT
  13557						;
  13558					;
  13559					; HERE TO CHECK NON-TIMEOUT ERRORS
  13560					;
  13561	045110				25$:
  13562	045110	105737 	001122'			TSTB	.NOERR		;;; [TCO 4.2217] IGNORE ERRORS??
  13563	045114	001062 				BNE	65$		;;; [TCO 4.2217] YES -- JUST EXIT
  13564	045116	032760 	000020 	000034 		BIT	#BPARER,STATD(R0) ;;; [TCO 4.2217] NO -- EBUS PARITY ERROR??
  13565	045124	001004 				BNE	30$		;;; [TCO 4.2217] YES -- PROCESS IT
  13566	045126	105737 	001365'			TSTB	.EPEFL		;;; [TCO 4.2217] NO -- DID WE RECOVER ONE??
  13567	045132	001423 				BEQ	35$		;;; [TCO 4.2217] YES -- SAVE RECOVERED DATA
  13568	045134	000427 				BR	45$		;;; [TCO 4.2217] NO -- GO ON
  13569						;
  13570					;
  13571					; HERE TO SNAPSHOT AN EBUS PARITY ERROR
  13572					;
  13573	045136				30$:
  13574	045136	105737 	001364'			TSTB	.EPFFL		;;; [TCO 4.2217] ARE WE WAITING TO REPORT ONE??
  13575	045142	001046 				BNE	60$		;;; [TCO 4.2217] YES -- JUST EXIT
  13576	045144	052737 	000004 	001126'		BIS	#KS.EPE,.KLITK	;;; [TCO 4.2217] NO -- FLAG THE EBUS PARITY ERROR
  13577	045152					CALL	100$		;;; [TCO 4.2217] GET THE ADDRESS AND DATA
	045152	004737 	045270'			JSR	PC,100$
  13578	045156	103436 				BCS	55$		;;; [TCO 4.2217] ERROR IF CC-C IS SET
  13579	045160	105337 	001365'			DECB	.EPEFL		;;; [TCO 4.2217] IS THIS A RETRY??
  13580	045164	100410 				BMI	40$		;;; [TCO 4.2217] YES -- ONLY ONE ALLOWED
  13581	045166	012760 	000100 	000032 		MOV	#DRESET,DAG2(R0) ;;; [TCO 4.2217] NO -- RESET THE DTE-20
  13582	045174	011222 				MOV	(R2),(R2)+	;;; [TCO 4.2217] AND RESTART THE TRANSFER
  13583	045176	011212 				MOV	(R2),(R2)	;;; [TCO 4.2217] SO
  13584	045200	000710 				BR	10$		;;; [TCO 4.2217] TIME THE RETRY OUT
  13585						;
  13586					;
  13587					; HERE TO SNAPSHOT A RECOVERED EBUS PARITY ERROR
  13588					;
  13589	045202				35$:
  13590	045202					CALL	100$		;;; [TCO 4.2217] SAVE RECOVERED DATA
	045202	004737 	045270'			JSR	PC,100$
  13591	045206				40$:
  13592	045206	105237 	001364'			INCB	.EPFFL		;;; [TCO 4.2217] FLAG THE REPORT
  13593	045212	000420 				BR	55$		;;; [TCO 4.2217] AND EXIT
  13594						;
  13595					;
  13596					; HERE TO CHECK OTHER NON-TIMEOUT ERRORS
  13597					;
  13598	045214				45$:
  13599	045214	005060 	000030 			CLR	DAG1(R0)	;;; [TCO 4.2217] RESET FLAGS
  13600	045220	105737 	001123'			TSTB	.NOHLT		;;; [TCO 4.2217] HALTS ALLOWED??
  13601	045224	001016 				BNE	65$		;;; [TCO 4.2217] YES -- JUST EXIT
  13602	045226	032760 	001000 	000030 		BIT	#DS06,DAG1(R0)	;;; [TCO 4.2217] NO -- IS THE KL HALTED??
  13603	045234	001412 				BEQ	65$		;;; [TCO 4.2217] NO -- JUST EXIT
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 245-2
SCOMM MODULE -- WFED	(WAIT FOR EXAMINE/DEPOSIT)

  13604	045236	052737 	000001 	001126'		BIS	#KS.TSP,.KLITK	;;; [TCO 4.2217] YES -- FLAG THE ERROR
  13605					;
  13606					; HERE ON A FATAL ERROR
  13607					;
  13608	045244				50$:
  13609	045244	105237 	001122'			INCB	.NOERR		;;; [TCO 4.2217] RECOGNIZE THE ERROR
  13610	045250					CALL	..DTSP		;;; [TCO 4.2217] STOP ALL PROTOCOLS
	045250	004737 	045450'			JSR	PC,..DTSP
  13611					;
  13612					; ERROR EXIT
  13613					;
  13614	045254				55$:
  13615	045254	105237 	001124'			INCB	.TKTN		;;; [TCO 4.2217] REQUEST NOTIFICATION
  13616	045260				60$:
  13617	045260	000261 				SEC			;;; [TCO 4.2217] SET ERROR RETURN
  13618					;
  13619					; NORMAL EXIT
  13620					;
  13621	045262				65$:
  13622	045262	012602 				MOV	(SP)+,R2	;;; [TCO 4.2217] RESTORE REGISTERS
  13623	045264	012601 				MOV	(SP)+,R1	;;; [TCO 4.2217] SO
  13624	045266					RETURN			;;; [TCO 4.2217] TO CALLER
	045266	000207 				RTS	PC
  13625					;
  13626					; INTERNAL SUBROUTINE TO SNAPSHOT THE DTE-20
  13627					;
  13628	045270				100$:
  13629	045270	010046 				MOV	R0,-(SP)	;;; [TCO 4.2217] SAVE THE DTE-20 POINTER
  13630	045272	005737 	001366'			TST	.EBPEQ		;;; [TCO 4.2217] IS THIS A RETRY??
  13631	045276	001013 				BNE	110$		;;; [TCO 4.2217] YES -- GO ON
  13632	045300	012701 	000104 			MOV	#104,R1		;;; [TCO 4.2217] NO -- SET UP BUFFER SIZE
  13633	045304					CALL	..ALCB		;;; [TCO 4.2217] ALLOCATE A BLOCK
	045304	004737 	043034'			JSR	PC,..ALCB
  13634	045310	103415 				BCS	130$		;;; [TCO 4.2217] ERROR IF CC-C IS SET
  13635	045312	010037 	001366'			MOV	R0,.EBPEQ	;;; [TCO 4.2217] SET POINTER IN ROOT
  13636	045316	005720 				TST	(R0)+		;;; [TCO 4.2217] GET OVER THE LINKAGE
  13637	045320	010120 				MOV	R1,(R0)+	;;; [TCO 4.2217] SET THE NODE SIZE
  13638	045322	010001 				MOV	R0,R1		;;; [TCO 4.2217]BUFFER POINTER TO R1
  13639	045324	011600 				MOV	(SP),R0		;;; [TCO 4.2217] RESTORE DTE-20 POINTER
  13640	045326				110$:
  13641	045326	012702 	000020 			MOV	#20,R2		;;; [TCO 4.2217] INIT LOOP COUNTER
  13642	045332				120$:
  13643	045332	012021 				MOV	(R0)+,(R1)+	;;; [TCO 4.2217] SNAPSHOT THE DTE-20
  13644	045334	077202 				SOB	R2,120$		;;; [TCO 4.2217] SO
  13645	045336	011602 				MOV	(SP),R2		;;; [TCO 4.2217] GET DTE-20 POINTER
  13646	045340	062702 	000010 			ADD	#TNAD1,R2	;;; [TCO 4.2217] POINT TO THE ADDRESS WORDS
  13647	045344				130$:
  13648	045344	012600 				MOV	(SP)+,R0	;;; [TCO 4.2217] RESTORE R0
  13649	045346					RETURN			;;; [TCO 4.2217] TO CALLER
	045346	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 246
SCOMM MODULE -- SWFED	(START AND WAIT FOR EX/DEP)

  13651						.SBTTL	SCOMM MODULE -- SWFED	(START AND WAIT FOR EX/DEP)
  13652					;+
  13653					;	SWFED -- STARTS A DEPOSIT/EXAMINE SEQUENCE AND WAITS FOR
  13654					;	ITS COMPLETION.
  13655					;
  13656					;	NOTE: **** THIS ROUTINE MUST BE ENTERED AT PRI6 ****
  13657					;
  13658					;	CALLING SEQUENCE:
  13659					;
  13660					;	R0 -- ADDRESS OF DTE20
  13661					;	R1-- HIGH ORDER EXAMINE/DEPOSIT ADDRESS WORD (FOR TENAD1)
  13662					;	R2 -- LOW ORDER EXAMINE/DEPOSIT ADDRESS WORD (FOR TENAD2)
  13663					;	R3 -- ADDRESS TO XFER 3 WORD BLOCK TO OR FROM
  13664					;
  13665					;	CALL	SWFED
  13666					;
  13667					;	EXIT CONDITIONS:
  13668					;
  13669					;	SUCCESS NO REGISTERS ALTERED CC-C CLEAR
  13670					;
  13671					;	ERROR CONDITIONS:
  13672					;
  13673					;	CC-C SET
  13674					;-
  13675					;
  13676	045350	010346 			SWFED::	MOV	R3,-(SP)	;SAVE REGISTERS
  13677	045352	032701 	010000 			BIT	#DEP,R1		;CHECK FOR DEPOSIT
  13678	045356	001016 				BNE	20$		;YES -- GO TO DEPOSIT PART OF SUB
  13679	045360	010160 	000010 			MOV	R1,TNAD1(R0)	;SET UP ADDRESS OF XFER IN DTE
  13680	045364	010260 	000012 			MOV	R2,TNAD2(R0)	;START XFER
  13681	045370					CALL	WFED		;WAIT FOR EXAMINE/DEPOSIT
	045370	004737 	045016'			JSR	PC,WFED
  13682	045374	103423 				BCS	40$		;COMPLAIN ABOUT E BOX STOPPED
  13683	045376					MTPS	DXWD3(R0),(R3)+	;STORE THE WORD XFERED
	045376	016023 	000002 			MOV	DXWD3(R0),(R3)+
  13684	045402					MTPS	DXWD2(R0),(R3)+
	045402	016023 	000004 			MOV	DXWD2(R0),(R3)+
  13685	045406					MTPS	DXWD1(R0),(R3)+
	045406	016023 	000006 			MOV	DXWD1(R0),(R3)+
  13686	045412	000414 				BR	40$		;ALL DONE.
  13687						;
  13688	045414				20$:	MFPS	(R3)+,DXWD3(R0) ;TRANSFER TO 10
	045414	012360 	000002 			MOV	(R3)+,DXWD3(R0)
  13689	045420					MFPS	(R3)+,DXWD2(R0) ;SET UP WORD IN DTE
	045420	012360 	000004 			MOV	(R3)+,DXWD2(R0)
  13690	045424					MFPS	(R3)+,DXWD1(R0)
	045424	012360 	000006 			MOV	(R3)+,DXWD1(R0)
  13691	045430	010160 	000010 			MOV	R1,TNAD1(R0)	;SET HIGH ORDER ADDRESS
  13692	045434	010260 	000012 			MOV	R2,TNAD2(R0)
  13693	045440					CALL	WFED		;WAIT FOR EXAMINE/DEPOSIT
	045440	004737 	045016'			JSR	PC,WFED
  13694
  13695	045444	012603 			40$:	MOV	(SP)+,R3	;RESTORE R3
  13696	045446					RETURN			;RETURN TO CALLER
	045446	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 247
SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)

  13698						.SBTTL	SCOMM MODULE -- ..DTSP	(STOP DTE PROTOCOLS)
  13699
  13700					;+
  13701					;
  13702					;	..DTSP -- SUBROUTINE TO TURN OFF PRIMARY AND SECONDARY PROTOCOLS.
  13703					;	THIS REQUIRES TURNING OFF THE DTE INTERRUPT.
  13704					;
  13705					;	CALLING SEQUENCE:
  13706					;	(NO REGISTERS USED)
  13707					;
  13708					;	CALL	..DTSP
  13709					;
  13710					;	EXIT CONDITIONS:
  13711					;
  13712					;	SUCCESS IS ASSURED, CC-C IS CLEARED
  13713					;
  13714					;	THERE ARE NO ERRORS
  13715					;
  13716					;-
  13717
  13718						.ENABL	LSB
  13719
  13720	045450				..DTSP::
  13721	045450	012777 	000010 	133700 		MOV	#INTROF,@.PRSTA	;; TURN OFF DTE INTERRUPTS
  13722	045456	042737 	060000 	001012'		BIC	#EF.PR1!EF.PR2,.COMEF+2 ;; AND PROTOCOLS
  13723	045464	000422 				BR	30$		;; AND EXIT
  13724						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 248
SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)

  13726						.SBTTL	SCOMM MODULE -- ..DTP2	(START SECONDARY PROTOCOL)
  13727
  13728					;+
  13729					;	..DTP2 -- SUBROUTINE TO TURN ON SECONDARY PROTOCOL.
  13730					;	A CHECK IS MADE TO MAKE SURE PRIMARY PROTOCOL IS OFF.
  13731					;
  13732					;	CALLING SEQUENCE:
  13733					;	(NO REGISTERS USED)
  13734					;
  13735					;	CALL	..DTP2
  13736					;
  13737					;	EXIT CONDITIONS:
  13738					;
  13739					;	SUCCESS IS ASSURED, CC-C IS CLEARED
  13740					;
  13741					;	THERE ARE NO ERRORS
  13742					;
  13743					;-
  13744
  13745	045466				..DTP2::
  13746	045466	032737 	040000 	001012'		BIT	#EF.PR1,.COMEF+2 ;; IF PRIMARY PROTOCOL IS ON,
  13747	045474	001402 				BEQ	10$		;; THEN
  13748	045476					CALL	..DTSP		;; TURN IT OFF
	045476	004737 	045450'			JSR	PC,..DTSP
  13749	045502				10$:
  13750	045502	012777 	004010 	133646 		MOV	#INTROF!INT11S,@.PRSTA ;; DISABLE INTERRUPTS
  13751	045510	052737 	020000 	001012'		BIS	#EF.PR2,.COMEF+2 ;; LET THE BOOT PROTOCOL TASK GO
  13752	045516	000403 				BR	20$		;;  AND RETURN
  13753						;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 249
SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)

  13755						.SBTTL	SCOMM MODULE -- ..DTP1 (START PRIMARY PROTOCOL)
  13756
  13757					;+
  13758					;	..DTP1 -- SUBROUTINE TO TURN ON PRIMARY PROTOCOL.
  13759					;
  13760					;	CALLING SEQUENCE:
  13761					;	(NO REGISTERS USED)
  13762					;
  13763					;	CALL	..DTP1
  13764					;
  13765					;	EXIT CONDITIONS:
  13766					;
  13767					;	ERROR CONDITIONS:
  13768					;
  13769					;-
  13770
  13771	045520				..DTP1::
  13772	045520	052737 	040000 	001012'		BIS	#EF.PR1,.COMEF+2 ;; ENABLE THE PROTOCOL TASK
  13773	045526				20$:
  13774	045526					CALL	..DSEV		;; DECLARE A SIGNIFICANT EVENT
	045526	004737 	042444'			JSR	PC,..DSEV
  13775	045532				30$:
  13776	045532	000241 				CLC			;; MAKE SURE CC-C
  13777	045534					RETURN			;; AND RETURN
	045534	000207 				RTS	PC
  13778
  13779						.DSABL	LSB
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 250
SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)

  13781						.SBTTL	SCOMM MODULE -- ..VXFR	(VALADATE TRANSFER)
  13782					;+
  13783					;
  13784					;
  13785					;	..VXFR -- ROUTINE TO VALADATE A USER'S TRANSFER REQUEST
  13786					;		..VXFR CHECKS TO SEE IF A USER'S REQUEST TO TRANSFER
  13787					;		INTO OR OUT OF HIS SPACE IS LEGAL.
  13788					;		..VXFR WILL CHECK TO SEE THAT TRANSFER'S ACROSS VIRTUAL
  13789					;		BOUNDS ARE ALSO TRANSFER'S IN CONTIGUOUS CORE.
  13790					;		THIS MEANS THAT AFTER VALIDATION A HANDLER
  13791					;		TASK DOES NOT HAVE TO WORRY ABOUT
  13792					;		THE VALIDITY OF TRANSFERING A CONTIGUOUS BLOCK
  13793					;		OF CORE INTO THE USER'S AREA.
  13794					;		..VXFR WILL ALSO RETURN TO THE CALLER THE PHYSICAL
  13795					;		18 BIT ADDRESS OF THE USER'S BUFFER.  ..VXFR
  13796					;		WILL NOT LET THE USER TRANSFER INTO READONLY SPACE
  13797					;		IF THE DIRECTION SPECIFIED BY THE HANDLER
  13798					;		IS WRITE.
  13799					;
  13800					;
  13801					;	CALLING SEQUENCE:
  13802					;		R1 -- REQUEST NODE ADDRESS
  13803					;		R2 -- STARTING ADDRESS (VIRTUAL)
  13804					;		R3 -- TRANSFER LENGTH
  13805					;		CALL	..VXFR
  13806					;
  13807					;		EXIT CONDITIONS:
  13808					;		R4 -- HIGH ORDER ADDRESS (BITS 4,5)
  13809					;		R5 -- LOW ORDER ADDRESS
  13810					;
  13811					;		ERROR EXIT -- C BIT SET
  13812					;-
  13813					;
  13814					;
  13815					;
  13817	045536	010205 			..VXFR::MOV	R2,R5		;IF NOT KT11 THEN JUST RETURN CURRENT ADDRESS
  13818	045540	005004 				CLR	R4
  13819	045542					RETURN
	045542	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 251
SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)

  13927						.SBTTL	SCOMM MODULE -- ..BLXO	(BLOCK OUTPUT) ..BLXI  (BLOCK INPUT)
  13928					;+
  13929					;
  13930					;
  13931					;	..BLXO -- ROUTINE TO PASS INFORMATION TO A USER'S PARTITION
  13932					;		..BLXO VALIDATES THE TRANSFER OF THE REQUEST TO
  13933					;		TRANSFER TO OR FROM A HANDLER TASK'S AREA.
  13934					;
  13935					;		..BLXI -- ROUTINE TO PASS INFORMATION FROM A USER'S
  13936					;			PARTITION.  ..BLXO VALIDATES THE TRANSFER OF THE
  13937					;			REQUEST TO TRANSFER TO A HANDLER TASK'S AREA.
  13938					;
  13939					;
  13940					;	CALLING SEQUENCE:
  13941					;		R1 -- REQUEST NODE ADDRESS
  13942					;		R2 -- STARTING ADDRESS (VIRTUAL)
  13943					;		R3 -- TRANSFER LENGTH (BYTES)
  13944					;		R4 -- HANDLER VIRTUAL ADDRESS
  13945					;		CALL	..BLXO  OR CALL ..BLXI
  13946					;
  13947					;	EXIT CONDITIONS
  13948					;		CC -- C BIT SET
  13949					;
  13950					;	NOTE -- RESTRICTED TO 4K-64 (10) WORD TRANSFER'S
  13951					;-
  13952					;
  13953					;
  13954					;
  13955					;
  13956	045544	010446 			..BLXI::MOV	R4,-(SP)
  13957	045546	010546 				MOV	R5,-(SP)
  13958	045550	012705 	000001 			MOV	#1,R5		;SET DIRECTION OF TRANSFER TO  IN
  13959	045554	000403 				BR	BLXCOM		;AND ENTER COMMON CODE
  13960						;
  13961	045556	010446 			..BLXO::MOV	R4,-(SP)	;SAVE THE REGISTERS
  13962	045560	010546 				MOV	R5,-(SP)
  13963	045562	005005 				CLR	R5		;INDICATE TRANSFER OUT
  13964	045564	010546 			BLXCOM:	MOV	R5,-(SP)	;SAVE THE DIRECTION OF TRANSFER
  13965	045566					CALL	..VXFR		;VALADATE TRANSFER
	045566	004737 	045536'			JSR	PC,..VXFR
  13978	045572	010346 				MOV	R3,-(SP)	;SAVE R3
  13983	045574	016604 	000006 			MOV	6(SP),R4	;SET UP THE FROM ADDRESS
  13984	045600	005766 	000002 			TST	2(SP)
  13986	045604	001403 				BEQ	BLXPLP		;DIRECTION OK FOR OUTPUT --DO TRANSFER
  13993	045606	010546 				MOV	R5,-(SP)
  13994	045610	010405 				MOV	R4,R5
  13995	045612	012604 				MOV	(SP)+,R4
  13997	045614	112425 			BLXPLP:	MOVB	(R4)+,(R5)+	;MOVE A BYTE
  13998	045616	077302 				SOB	R3,BLXPLP	;YES -- FINISHED?
  13999	045620	012603 				MOV	(SP)+,R3	;RESTORE R3
  14004									;CLEAR C BIT TO INDICATE LEGAL TRANSFER
  14005	045622	005726 				TST	(SP)+		;REMOVE THE DIRECTION WORD FROM THE STACK
  14006	045624	012605 			BLXRTN:	MOV	(SP)+,R5	;RESTORE REGISTERS
  14007	045626	012604 				MOV	(SP)+,R4
  14008	045630					RETURN			;RETURN TO CALLER
	045630	000207 				RTS	PC
  14009					;
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 252
SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL

  14018						.SBTTL	SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL)
  14019
  14020					;+
  14021					;
  14022					;CALL:	JSR	PC,..VTOL	;CLOSED, RETURN IN-LINE
  14023					;
  14024					;IN:	R1 - POINTER TO REQUEST NODE, CONTAINING:
  14025					;	R.AT - ATL OF CALLING TASK
  14026					;	R.LU - LUN HAVING WINDOW IN LUT(N2)
  14027					;	R.FC - I/O FUNCTION CODE, VIRTUAL READ OR WRITE
  14028					;	R.PB+6,+10 - VIRTUAL BLOCK NUMBER TO MAP
  14029					;
  14030					;OUT:	C=0 - MAPPING SUCCESSFUL
  14031					;	R1 - POINTER TO REQUEST NODE, CONTAINING
  14032					;	R.FC - I/O FUNCTION CODE, LOGICAL READ OR WRITE
  14033					;	R.PB+6,+10 - LOGICAL BLOCK NUMBER MAPPED
  14034					;
  14035					;	C=1 MAPPING FAILURE
  14036					;
  14037					;NOTE:	THIS LIBRARY ROUTINE USES THE FOLLOWING
  14038					;	OTHER LIBRARY ROUTINES---
  14039					;
  14040					;	..SPD3 - SWAP PAGE-3 DESCRIPTORS, EXEC FUNCTION
  14041					;	..VVLL - INTERNAL VIRTUAL TO LOGICAL FILE FUNCTION
  14042					;
  14043					;-
  14044
  14045	045632				..VTOL::
  14046	045632	010046 				MOV	R0,-(SP)	;SAVE WORKING REGISTERS
  14047	045634	010146 				MOV	R1,-(SP)
  14048	045636	010246 				MOV	R2,-(SP)
  14049	045640	010346 				MOV	R3,-(SP)
  14050	045642	010446 				MOV	R4,-(SP)
  14051
  14052					; GET WINDOW POINTER FROM LUT(N2) IN TASK HEADER
  14053
  14054	045644	010104 				MOV	R1,R4		; SAVE POINTER TO REQUEST NODE
  14055	045646	016402 	000006 			MOV	R.AT(R4),R2	; POINT TO ATL NODE
  14056	045652	116403 	000012 			MOVB	R.LU(R4),R3	; GET LUN
  14057	045656	006303 				ASL	R3
  14058	045660	006303 				ASL	R3
  14059	045662	066203 	000012 			ADD	A.HA(R2),R3	;!!!!!DOESN'T WORK IF MACY11 CONDITIONAL IS OFF
  14060	045666	016301 	000130 			MOV	H.LUT(R3),R1 ; GET WINDOW POINTER FROM LUT
  14061	045672	001441 				BEQ	30$		; NO WINDOW, NO MAP....
  14062	045674	030127 	000001 			BIT	R1,#1		; SEE IF WINDOW POINTER IS ODD
  14063	045700	001036 				BNE	30$		; ECCCHH!
  14064
  14065					; SEE IF THIS IS A READ OR WRITE AND CHECK PERMISSIONS APPROPRIATELY.
  14066
  14067	045702	012746 	001000 			MOV	#IO.RLB,-(SP)	; SET UP FOR A READ
  14068	045706	026427 	000014 	010400 		CMP	R.FC(R4),#IO.RVB ; SEE IF IT IS A READ
  14069	045714	001405 				BEQ	10$		; YES
  14070	045716	012716 	000400 			MOV	#IO.WLB,(SP)	; NO, MUST BE A WRITE
  14071	045722	031127 	001000 			BIT	(R1),#WI.WRV	; SEE IF THE FILE IS WRITE ACCESSED
  14072	045726	001422 				BEQ	20$		; IF NOT, CAN'T WRITE IT
  14073
  14074					; NOW DO THE MAPPING ALREADY
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 252-1
SCOMM MODULE -- ..VTOL	(MAP VIRTUAL TO LOGICAL BLOCK, EXTERNAL

  14075
  14076	045730	016400 	000026 		10$:	MOV	R.PB+2(R4),R0	; GET BYTE COUNT
  14077	045734	016402 	000032 			MOV	R.PB+6.(R4),R2	; HIGH ORDER VBN
  14078	045740	016403 	000034 			MOV	R.PB+8.(R4),R3	; LOW ORDER VBN
  14079	045744					CALL	..VVLL		; CALL THE MAPPER
	045744	004737 	046014'			JSR	PC,..VVLL
  14080	045750	103411 				BCS	20$		; NO SUCH LUCK
  14081	045752	005700 				TST	R0		; CHECK IF MAPPING IS COMPLETE
  14082	045754	001007 				BNE	20$		; NO
  14083
  14084					; SUCCESSFUL MAPPING - TURN THE NODE INTO A LOGICAL TRANSFER
  14085
  14086	045756	010264 	000032 			MOV	R2,R.PB+6.(R4)	; SET HIGH ORDER LBN
  14087	045762	010364 	000034 			MOV	R3,R.PB+8.(R4)	; SET LOW ORDER LBN
  14088	045766	012664 	000014 			MOV	(SP)+,R.FC(R4)	; SET FUNCTION CODE
  14089	045772	000402 				BR	40$
  14090						;
  14091	045774	005726 			20$:	TST	(SP)+		; CLEAN THE STACK
  14092	045776	000261 			30$:	SEC			; SET FAILURE
  14093	046000	012604 			40$:	MOV	(SP)+,R4	;RESTORE REGISTERS
  14094	046002	012603 				MOV	(SP)+,R3
  14095	046004	012602 				MOV	(SP)+,R2
  14096	046006	012601 				MOV	(SP)+,R1
  14097	046010	012600 				MOV	(SP)+,R0
  14098	046012					RETURN
	046012	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 253
SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL

  14100						.SBTTL	SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL)
  14101
  14102					;+
  14103					;
  14104					;CALL:	JSR	PC,..VVLL	;CLOSED, RETURN IN-LINE
  14105					;
  14106					;IN:	R0 - NUMBER OF BYTES IN TRANSFER
  14107					;	R1 - ADDRESS OF WINDOW
  14108					;	R2,R3 - VBN TO MAP
  14109					;
  14110					;OUT:	SUCCESS - C=0
  14111					;	R0 - NUMBER OF BLOCKS NOT MAPPED
  14112					;	R2,R3 - LOGICAL BLOCK NUMBER DESIRED
  14113					;
  14114					;	FAILURE - C=1
  14115					;	R0,R2,R3 - GARBAGED
  14116					;
  14117					;NOTE:	THIS ROUTINE MAKES NO EXTERNAL CALLS.
  14118					;	THIS ROUTINES IS USED BY---
  14119					;
  14120					;	..VTOL	EXTERNAL VIRTUAL TO LOGICAL MAPPER
  14121					;		WINDOW TURN FILE CONTROL PRIMITIVE
  14122					;		INDEX FILE FILE CONTROL UTILITY
  14123					;
  14124					;-
  14125
  14126	046014				..VVLL::
  14127	046014	010146 				MOV	R1,-(SP)	;SAVE WORKING REGISTERS
  14128	046016	010446 				MOV	R4,-(SP)
  14129	046020	010546 				MOV	R5,-(SP)
  14130	046022					.INH0			; INHIBIT TASK SWITCHING
	046022	013746 	177776 			MOV	@#PS,-(SP)
	046026	112737 	000140 	177776 		MOVB	#140,@#PS
  14131	046034	062700 	000777 			ADD	#511.,R0	;; ROUND UP BYTE COUNT TO NEXT BLOCK
  14132	046040	006000 				ROR	R0		;; RECOVER CARRY
  14133	046042	105000 				CLRB	R0		;; CLEAR FRACTIONAL PART
  14134	046044	000300 				SWAB	R0		;; AND CONVERT TO BLOCK COUNT
  14135
  14136					; GET STARTING VBN OF CURRENT WINDOW
  14137
  14138	046046	111104 				MOVB	(R1),R4		;; GET COUNT OF RETRIEVAL POINTERS
  14139	046050	001417 				BEQ	40$		;; EMPTY WINDOW
  14140	046052	062701 	000006 			ADD	#W.VBN,R1	;; POINT TO STARTING VBN IN WINDOW
  14141	046056	012105 				MOV	(R1)+,R5	;; GET HIGH ORDER VBN
  14142	046060	042705 	177400 			BIC	#177400,R5	;; MASK OFF HIGH BYTE
  14143	046064	160502 				SUB	R5,R2		;; SUBTRACT FROM DESIRED VBN
  14144	046066	162103 				SUB	(R1)+,R3	;; SUBTRACT LOW ORDER
  14145	046070	005602 				SBC	R2		;; AND THE CARRY
  14146	046072	002406 				BLT	40$		;; WINDOW IS PAST VBN - OUT
  14147
  14148					; NOW SCAN THE WINDOW FOR THE DESIRED VBN
  14149
  14150	046074	161103 			10$:	SUB	(R1),R3		;; ACCUMULATE BLOCK COUNT
  14151	046076	005602 				SBC	R2
  14152	046100	103407 				BLO	20$		;; BRANCH IF WE GO BELOW ZERO
  14153	046102	062701 	000006 			ADD	#6,R1		;; SKIP OVER THIS RETRIEVAL POINTER
  14154	046106	077406 				SOB	R4,10$		;; AND LOOP FOR RETRIEVAL POINTERS
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 253-1
SCOMM MODULE -- ..VVLL	(MAP VIRTUAL TO LOGICAL BLOCK, INTERNAL

  14155	046110				40$:	.ENB0			;; OUT OF POINTERS - VBN IS BEYOND WINDOW
	046110	004737 	042720'			JSR	PC,..ENB0
  14156	046114	000261 				SEC			;SET FAILURE
  14157	046116	000430 				BR	50$		;RETURN
  14158						;
  14159					;
  14160					; FOUND THE RIGHT RETRIEVAL POINTER - COMPUTE LBN
  14161					;
  14162	046120	010305 			20$:	MOV	R3,R5		;; R5 = - (BLOCKS IN THIS EXTENT PAST VBN)
  14163									;; COMPUTE NUMBER OF CONTIGUOUS BLOCKS
  14164	046122	005405 				NEG	R5		;; STARTING AT DESIRED VBN
  14165	046124	062103 				ADD	(R1)+,R3	;; COMPUTE LBN OFFSET IN THIS EXTENT
  14166	046126	005502 				ADC	R2
  14167	046130	062102 				ADD	(R1)+,R2	;; GET HIGH ORDER LBN
  14168	046132	062103 				ADD	(R1)+,R3	;; AND LOW ORDER LBN
  14169	046134	005502 				ADC	R2
  14170	046136	160500 				SUB	R5,R0		;; SEE IF THE TRANSFER LIES WITHIN THIS EXTENT
  14171	046140	101413 				BLOS	25$		;; YES
  14172
  14173	046142	005304 				DEC	R4		;; SEE IF THERE IS ANOTHER POINTER
  14174	046144	001412 				BEQ	30$		;; NO
  14175	046146	020021 				CMP	R0,(R1)+	;; SEE IF REMAINDER OF TRANSFER LIES IN NEXT EXTENT
  14176	046150	101010 				BHI	30$		;; NO
  14177	046152	060305 				ADD	R3,R5		;; COMPUTE END LBN + 1
  14178	046154	010204 				MOV	R2,R4
  14179	046156	005504 				ADC	R4		;; COMPUTE HIGH ORDER
  14180	046160	020421 				CMP	R4,(R1)+	;; SEE IF NEXT EXTENT IS CONTIGUOUS WITH THIS ONE
  14181	046162	001003 				BNE	30$		;; NO
  14182	046164	020521 				CMP	R5,(R1)+	;; COMPARE LOW ORDER
  14183	046166	001001 				BNE	30$		;; NO
  14184
  14185	046170	005000 			25$:	CLR	R0		;; TRANSFER IS COMPLETELY MAPPED
  14186	046172				30$:	.ENB0			; ENABLE TASK SWITCHING
	046172	004737 	042720'			JSR	PC,..ENB0
  14187	046176	000241 				CLC			; SET SUCCESS
  14188	046200	012605 			50$:	MOV	(SP)+,R5	; RESTORE REGISTES
  14189	046202	012604 				MOV	(SP)+,R4
  14190	046204	012601 				MOV	(SP)+,R1
  14191	046206					RETURN
	046206	000207 				RTS	PC
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 1209
END

  15149						.SBTTL	END
  15150					;
  15151					;                             COPYRIGHT (C) 1975, 1978 BY
  15152					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
  15153					;
  15154					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
  15155					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
  15156					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
  15157					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
  15158					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
  15159					;
  15160					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
  15161					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
  15162					;       CORPORATION.
  15163					;
  15164					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
  15165					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
  15166					;
  15167		010672'				.END	INITLM
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 1209-1
SYMBOL TABLE

ACKNOW  025412RG 	BITTBL  041540RG 	CRCEVF  005256RG 	C.AS  = 000002 G 	DE.90 = 000246 G
ADRSAV  005130RG 	BIT0  = 000001   	CREVFG  005254RG 	C.AT  = 000000 G 	DE.91 = 000245 G
AF.PP = 000200 G 	BIT1  = 000002   	CREXP = 005552RG 	C.FA  = 000012 G 	DE.92 = 000244 G
ASXCMN  013372R  	BIT10 = 002000   	CRHD  = ****** GX	C.FM  = 000010 G 	DE.93 = 000243 G
ASXDT   013246R  	BIT11 = 004000   	CRHUNG  005260RG 	C.HALT= 000033 G 	DE.94 = 000242 G
ASXEXT  013562R  	BIT12 = 010000   	CRJT  = 001000   	C.HCRT= 000015 G 	DE.95 = 000241 G
ASXE1   013222RG 	BIT13 = 020000   	CROBAR  001034RG 	C.HEOF= 000032 G 	DE.96 = 000240 G
ASXE2   013236R  	BIT14 = 040000   	CRSIZE= 000010 G 	C.HESC= 000033 G 	DE.97 = 000237 G
ASXLRF  013406R  	BIT15 = 100000   	CRSTB   011160R  	C.HFFD= 000014 G 	DE.98 = 000236 G
ASXLRQ  013444R  	BIT2  = 000004   	CRSTBH  005264RG 	C.HLFD= 000012 G 	DE.99 = 000235 G
ASXSCN  013234R  	BIT3  = 000010   	CRSTBK  005266RG 	C.HSPC= 000040 G 	DFTBL   025024RG
ASXTE   014054R  	BIT4  = 000020   	CRSTK = ****** GX	C.HTAB= 000011 G 	DFTSZ = 000070
ASXWR0  013274R  	BIT5  = 000040   	CRSTLN= 000016 G 	C.HVTB= 000013 G 	DFUNC = 000200
ASXWR1  013304R  	BIT6  = 000100   	CRSTS = 005554RG 	C.HXOF= 000023 G 	DF.DMG= 000004
ASXWR2  013314R  	BIT7  = 000200   	CRTBL   005550RG 	C.HXON= 000021 G 	DF.DMN= 000007
ASXWR3  013324R  	BIT8  = 000400   	CRTHD = 005550RG 	C.RS  = 000006 G 	DF.DOR= 000001
ASXWR4  013334R  	BIT9  = 001000   	CRTNXA  014302R  	C.SD  = 000004 G 	DF.EHG= 000010
A.EF  = 000020 G 	BLKTT   005200RG 	CRTNX1  014274R  	C.SZ  = 000014 G 	DF.EHM= 000011
A.FB  = 000015 G 	BLXCOM  045564R  	CRTNX2  014302R  	C1    = 140010   	DF.EMG= 000005
A.FM  = 000024 G 	BLXPLP  045614R  	CRTNX3  014304R  	C1DB  = 140110   	DF.EMN= 000006
A.HA  = 000012 G 	BLXRTN  045624R  	CRTY  = 002000   	DAG1  = 000030   	DF.KLR= 000012
A.PD  = 000006 G 	BPARER= 000020   	CR$BF1= 030736RG 	DAG2  = 000032   	DF.KLW= 000013
A.PF  = 000034 G 	BPTTRP  011246R  	CR$BO2= 031354RG 	DAG3  = 000036   	DF.KLX= 000014
A.RP  = 000010 G 	BTPHD   015444RG 	CR$B01= 036136RG 	DATE  = 000004   	DF.OFF= 000002
A.SP  = 000004 G 	BTPRO   015744R  	CR$B03= 044744RG 	DBLRNG  031106R  	DF.ON = 000003
A.SZ  = 000036 G 	BYCNT   002724RG 	CR$CBR= 017352RG 	DBLSTS  031200R  	DF.PDP= 000016
A.TD  = 000016 G 	BYTESA  005132RG 	CR$DTB= 030474RG 	DBLXIT  031174R  	DF.PEX= 000015
A.TS  = 000014 G 	CDBA  = 177164 G 	CR$DTD= 011234RG 	DCOMST= 000001   	DHBUF = 000020
BC.AKA= 000025 G 	CDCC  = 177162 G 	CR$DTF= 030030RG 	DEAND1  026270R  	DHCNT = 000200 G
BC.BTP= 000024 G 	CDD   = 000020   	CR$ETE= 030422RG 	DEAND2  026264R  	DHISTQ  035544R
BC.DES= 000010 G 	CDDB  = 177166 G 	CR$FTA= 011136RG 	DEAND3  025422R  	DHSAV   037120R
BC.EDR= 000027 G 	CDRTPD  007246RG 	CR$IAS= 014454RG 	DEANOD  027076R  	DHSTSV  002652RG
BC.FNM= 000035 G 	CDST  = 177160 G 	CR$ILF= 025116RG 	DEP   = 010000   	DHTBL   003046RG
BC.FOD= 000013 G 	CDTSK   006666RG 	CR$ILQ= 031550RG 	DEPOF   001232RG 	DHTMP   002646RG
BC.HAD= 000002 G 	CESCHK  021244R  	CR$LRF= 013440RG 	DEX   = 000400   	DH.FER= 020000 G
BC.HDS= 000007 G 	CHNPNT= 000001   	CR$MPE= 011300RG 	DEXCOM  013056R  	DIAG1 = 174430
BC.HTD= 000012 G 	CHTBL   032510R  	CR$PT1= 030670RG 	DEXDON= 000004   	DIAG2 = 174432
BC.LDR= 000030 G 	CHTBLN= 000013   	CR$PT2= 030714RG 	DEXST   001344RG 	DIAG3 = 174436
BC.LDV= 000031 G 	CH.FOR= 000100 G 	CR$PT3= 031312RG 	DEXTM1  001352RG 	DIALUP  025114RG
BC.LNC= 000004 G 	CH.LAB= 000001 G 	CR$PT4= 031700RG 	DEXTM2  001350RG 	DIKL10= 000010
BC.NSA= 000032 G 	CH.NAT= 000020 G 	CR$RES= 011242RG 	DEXTM3  001346RG 	DIRDPT  012630R
BC.RDS= 000005 G 	CH.NDC= 000010 G 	CR$SAI= 034130RG 	DEXWD1= 174406   	DIRMAX= 000102
BC.RQD= 000001 G 	CH.OFF= 000200 G 	CR$SAQ= 027572RG 	DEXWD2= 174404   	DIROK   012624R
BC.RTD= 000011 G 	CH.UNL= 000040 G 	CR$TBT= 011250RG 	DEXWD3= 174402   	DIV216  042454RG
BC.SAK= 000017 G 	CMEDP   020520R  	CR$TET= 030004RG 	DE.01 = 000377 G 	DLCNT = 000005 G
BC.SDS= 000006 G 	CMNABO  011100RG 	CR$T04= 011212RG 	DE.02 = 000376 G 	DLECNT= 000004 G
BC.SKP= 000033 G 	CMNABT  012754R  	CR$UIE= 031242RG 	DE.03 = 000375 G 	DLETBL  003006RG
BC.SLA= 000023 G 	CMSG    011514R  	CSDONE  014224R  	DE.04 = 000374 G 	DLHUPX  040400R
BC.SNA= 000014 G 	CNT     002722RG 	CS.EXP= 177670   	DE.05 = 000373 G 	DLSTOP  026062R
BC.SPT= 000026 G 	CNUPE = 000002   	CTLO  = 000040   	DE.06 = 000372 G 	DLTBL   002776RG
BC.STR= 000003 G 	COMBSE  001226RG 	CTRLC   032372R  	DE.07 = 000371 G 	DLTMP   002650RG
BC.STS= 000022 G 	COMTRP  011000R  	CTRLU   032376R  	DE.08 = 000370 G 	DLYCNT= 174400
BC.TDU= 000015 G 	COPBUF  027616RG 	CTRLZ   032402R  	DE.09 = 000367 G 	DL.CAR= 010000 G
BC.THU= 000016 G 	CRADR   002726RG 	CTYPTR  002634RG 	DE.10 = 000366 G 	DL.CTS= 020000 G
BC.XEN= 000034 G 	CRBFLN= 000240 G 	CTYSTS  002662RG 	DE.11 = 000365 G 	DL.DEN= 000040 G
BC.XOF= 000020 G 	CRBUFF  005306RG 	CURBF = 000006   	DE.80 = 000260 G 	DL.DSC= 100000 G
BC.XON= 000021 G 	CRBUFH  005304RG 	CYCLS = 000002   	DE.81 = 000257 G 	DL.DTR= 000002 G
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 1209-2
SYMBOL TABLE

DL.FER= 020000 G 	DURE  = 000004   	EF.CRI= 002000 G 	E.RKR = 000012 G 	H.CSP = 000000 G
DL.RAC= 004000 G 	DVCH  = 110220   	EF.CTC= 100000 G 	E.RQM = 000010 G 	H.DSW = 000046 G
DL.RDE= 000001 G 	DV.EOF= 000040 G 	EF.DTE= 000001 G 	E.RSS = 000014 G 	H.FCP = 000050 G
DL.RDN= 000200 G 	DV.F11= 000400 G 	EF.IOD= 000020 G 	E.TMO = 000007 G 	H.FOR = 000052 G
DL.REN= 000100 G 	DV.HNG= 001000 G 	EF.NIR= 000010 G 	E.TTY = 000003 G 	H.HSZ = 000002 G
DL.RNG= 040000 G 	DV.IOP= 000020 G 	EF.PFR= 004000 G 	E.WFM = 000011 G 	H.IPC = 000076 G
DL.RTS= 000004 G 	DV.LIN= 002000 G 	EF.PR1= 040000 G 	FC.CEF= 020000   	H.IPS = 000074 G
DL.SRD= 002000 G 	DV.LOG= 000100 G 	EF.PR2= 020000 G 	FC.DIR= 040000   	H.ISP = 000100 G
DL.STD= 000010 G 	DV.NXD= 000001 G 	EF.RKH= 002000 G 	FC.FCO= 010000   	H.KCAC= 000020 G
DL.UNA= 001420 G 	DV.OFL= 000002 G 	EF.RKP= 010000 G 	FC.WAC= 100000   	H.KCHN= 000010 G
DL.XEN= 000100 G 	DV.OIR= 000004 G 	EF.RKR= 001000 G 	FDVNM   026564R  	H.KEXT= 000004 G
DMTBL   002732RG 	DV.SCN= 000010 G 	EF.RQM= 000200 G 	FDVNMM  026550R  	H.KMOS= 000002 G
DMTMP   002644RG 	DV.URE= 000200 G 	EF.RSS= 004000 G 	FEHD  = ****** GX	H.KPWR= 000040 G
DMTNXM  041176R  	DWNMS   012404R  	EF.SND= 100000 G 	FESTK = ****** GX	H.KUDF= 000001 G
DMYN  = 000004 G 	DWNMSG  012372R  	EF.TED= 000100   	FETBL   005116RG 	H.LUT = 000130 G
DNBLK   005162RG 	DWNMSZ= 000043   	EF.TMO= 000100 G 	FETPD   007166RG 	H.OVL = 000054 G
DNFCN   005164RG 	DXBUF   005056RG 	EF.TTY= 000004 G 	FETSK   006726RG 	H.TKVA= 000106 G
DNSTS   005172RG 	DXCNT   005054RG 	EF.WFM= 000400 G 	FE0PUD  010546RG 	IDXTB   032524R
DON10C= 040000   	DXHD  = ****** GX	EHSG  = 000006 G 	FLBT  = 000001   	IE.ABO= 177761
DON10S= 100000   	DXPKT   005076RG 	EHSM  = 000010 G 	FLBYT = 000011   	IE.ACT= 177771
DON11C= 000100   	DXRTC   005052RG 	EMGSTK  011000RG 	FLCT  = 000017   	IE.ADP= 177636
DON11S= 000200   	DXSTK = ****** GX	EMTSTK  001116RG 	FLDVOT  027106RG 	IE.ALN= 177736
DPCMN   020514R  	DXTPD   007306RG 	EMTTRP  012450RG 	FNBYT = 000005   	IE.AST= 177660
DPKAL   032426R  	DXTSK   006766RG 	EMYN  = 000002 G 	FNDCPU  021160R  	IE.BAD= 177777
DPMSEP  020546R  	DXUNIT  005074RG 	EM.DRO= 000020 G 	FNDDTE  021212R  	IE.BBE= 177710
DPSEC   020544R  	DXVCB   005060RG 	ENBXOF  025132RG 	FNDSPD  026140R  	IE.BDI= 177714
DPS4  = 040000   	DXWD1 = 000006   	EOLS  = 000400   	FORPRO= 000020   	IE.BDR= 177716
DQNXT   033364R  	DXWD2 = 000004   	EPTR  = 000000   	FW    = 000300   	IE.BDV= 177711
DRESET= 000100   	DXWD3 = 000002   	EQSZ    001332RG 	F.DREF  000042   	IE.BHD= 177700
DRXCOM  013072R  	DXWRD1= 002000   	ERR10C= 010000   	F.DRNM  000044   	IE.BLK= 177754
DRXRR   013104R  	DX0PEN  010356RG 	ERR10S= 020000   	F.FEXT  000002   	IE.BNM= 177712
DR.DTE= 000011   	DX1PEN  010426RG 	ERR11C= 000001   	F.FNUM  000006   	IE.BTF= 177675
DR.00 = 000000 G 	D$$H11= 000010   	ERR11S= 000002   	F.FOWN  000014   	IE.BTP= 177725
DR.01 = 000001 G 	D.AT  = 000000 G 	EV.AS = 000002 G 	F.FPRO  000016   	IE.BVR= 177701
DR.02 = 000002 G 	D.CCDR= 000006 G 	EV.PF = 000200 G 	F.FSEQ  000010   	IE.BYT= 177755
DR.03 = 000003 G 	D.CCLK= 000007 G 	EV.SE = 000001 G 	F.FSQN  000013   	IE.CKP= 177766
DSEND = 000004   	D.CCPU= 000200 G 	EXCMN   020554R  	F.FVBN  000046   	IE.CKS= 177742
DS.99   012622R  	D.CCTY= 000001 G 	EXKAL   032414R  	F.HDLB  000022   	IE.CLO= 177732
DS04  = 004000   	D.CDH1= 000003 G 	E.BOV = 000006 G 	F.LBN   000026   	IE.CON= 177752
DS05  = 002000   	D.CDLS= 000004 G 	E.CLK = 000002 G 	F.LGTH  000052   	IE.DAA= 177770
DS06  = 001000   	D.CDL1= 000002 G 	E.DTE = 000001 G 	F.LINK  000000   	IE.DAO= 177763
DTEADR  001266RG 	D.CKLE= 000201 G 	E.DV  = 000006 G 	F.NACS  000036   	IE.DFU= 177750
DTECMD= 000451   	D.CKLN= 000210 G 	E.FCRI= 000073 G 	F.NLCK  000037   	IE.DNA= 177771
DTEDSP  020036R  	D.CLPT= 000005 G 	E.FCTC= 000100 G 	F.NWAC  000040   	IE.DNR= 177775
DTEFLG= 000444   	D.FA  = 000004 G 	E.FN  = 000004 G 	F.RVN   000012   	IE.DUN= 177767
DTEF11= 000450   	D.FEPD= 000010 G 	E.FP  = 000000 G 	F.SCHA  000021   	IE.DUP= 177707
DTEHD   024410RG 	D.FM  = 000002 G 	E.FPFR= 000074 G 	F.SIZE  000032   	IE.EBX= 177776
DTEMSK  001264RG 	D.SZ  = 000006 G 	E.FPR1= 000077 G 	F.STAT  000040   	IE.EOF= 177766
DTEMTD= 000455   	D1011 = 000040   	E.FPR2= 000076 G 	F.STD   000004   	IE.EOT= 177702
DTEMTI= 000456   	EBSEL = 000100   	E.FRKP= 000075 G 	F.UCHA  000020   	IE.EOV= 177765
DTENM = 000000   	EBUSPC= 000020   	E.FSND= 000040 G 	F11TPD  007346RG 	IE.EXP= 177676
DTESP   024670RG 	EBUSPS= 000004   	E.FW  = 000010 G 	GENTPD  007366RG 	IE.FEX= 177717
DTETPD  007146RG 	ECHOB   035062R  	E.IOD = 000005 G 	HANGUP  025210RG 	IE.FHE= 177705
DTETSK  006466RG 	EDONES= 040000   	E.LS  = 000002 G 	HIBYTE= 177400   	IE.FOP= 177713
DTEXIT  027760R  	EDRMT   025122RG 	E.NIR = 000004 G 	HICTS   026274RG 	IE.HFU= 177744
DTTSK   006726RG 	EF.BOV= 000040 G 	E.OPSZ= 000140 G 	HIDVST  026502RG 	IE.HWR= 177772
DUPE  = 000020   	EF.CLK= 000002 G 	E.RKH = 000013 G 	HORPS = 000016   	IE.IDU= 177644
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 1209-3
SYMBOL TABLE

IE.IEF= 177637   	INSTPD  007126RG 	IO.RCV= 015000   	KLCST   020636R  	K.LSKL= 000001 G
IE.IFC= 177776   	INTLPS  027704R  	IO.RDB= 001200   	KLNLGL= 000016 G 	K.LUND= 000000 G
IE.IFU= 177747   	INTROF= 000010   	IO.RDN= 000022   	KLNPLN= 000026 G 	K.LUSR= 177777 G
IE.ILL= 177726   	INTRON= 000040   	IO.REL= 013400   	KLNPTR  002636RG 	LDLPR   026502RG
IE.ILU= 177640   	INTSON= 000001   	IO.RHD= 001010   	KLPWRF= 000010   	LDLPV   026502RG
IE.INS= 177776   	INT10S= 000400   	IO.RLB= 001000   	KL.CFL= 000400 G 	LFBT  = 004000
IE.IPR= 177641   	INT11C= 002000   	IO.RLV= 001100   	KL.CFM= 000002 G 	LFCT  = 074000
IE.ISQ= 177703   	INT11S= 004000   	IO.RNA= 005400   	KL.DEF= 002000 G 	LINCHR  026706RG
IE.ITI= 177643   	IOPSIZ= 007777   	IO.RNC= 001004   	KL.KAC= 001000 G 	LKS   = 177546 G
IE.ITS= 177770   	IOTTRP  011304R  	IO.RNE= 001020   	KL.LCA= 000100 G 	LOAD11= 000004
IE.LCK= 177745   	IO.ACE= 007400   	IO.RTC= 003400   	KL.LRM= 000001 G 	LOWCOD= 000000RG
IE.LNL= 177646   	IO.ACR= 006400   	IO.RTI= 016400   	KL.LVB= 000004 G 	LPCEVF  005564RG
IE.MBK= 177721   	IO.ACW= 007000   	IO.RTK= 000060   	KL.SPF= 000040 G 	LPCSA = 000002 G
IE.MOD= 177753   	IO.ADS= 014000   	IO.RVB= 010400   	KL.SSC= 000200 G 	LPCSM = 000022 G
IE.NBF= 177731   	IO.APC= 014000   	IO.RWD= 002400   	KL.VBD= 000020 G 	LPEVFG  005562RG
IE.NBK= 177727   	IO.APV= 014010   	IO.RWU= 002540   	KL.VBN= 000010 G 	LPEXPA= 175400 G
IE.NFI= 177704   	IO.ATT= 001400   	IO.R1C= 002400   	KPAL0   001372RG 	LPEXPZ= 000020 G
IE.NLN= 177733   	IO.CCI= 014000   	IO.SAO= 004000   	KPAL1   001402RG 	LPHD  = ****** GX
IE.NNC= 177674   	IO.CCT= 002460   	IO.SCS= 013000   	KPAR0 = 172360   	LPHUNG  005566RG
IE.NOD= 177751   	IO.CLN= 003400   	IO.SDI= 013000   	KPAR1 = 172362   	LPITH = 000006 G
IE.NSF= 177746   	IO.CON= 015400   	IO.SDO= 012400   	KPAR2 = 172364   	LPMCB = 000020 G
IE.OFL= 177677   	IO.CRC= 001020   	IO.SEC= 002520   	KPAR3 = 172366   	LPRMA = 000040 G
IE.ONP= 177773   	IO.CRE= 012000   	IO.SEM= 002440   	KPAR4 = 172370   	LPRMC = 000044 G
IE.OVR= 177756   	IO.CTI= 015400   	IO.SHT= 002410   	KPAR5 = 172372   	LPRMZ = 000042 G
IE.PRI= 177760   	IO.CTL= 016400   	IO.SLO= 005400   	KPAR6 = 172374   	LPRTY = 000024 G
IE.RAC= 177724   	IO.DAC= 010000   	IO.SMO= 002560   	KPAR7 = 172376   	LPSIZE= 000010 G
IE.RAT= 177723   	IO.DCI= 014400   	IO.SNM= 002450   	KPDR0 = 172300   	LPSTBH  005572RG
IE.RBG= 177730   	IO.DCT= 002470   	IO.SPB= 002420   	KPDR1 = 172302   	LPSTBK  005574RG
IE.RCN= 177722   	IO.DEL= 012400   	IO.SPF= 002440   	KPDR2 = 172304   	LPSTK = ****** GX
IE.RER= 177740   	IO.DET= 002000   	IO.SSO= 004400   	KPDR3 = 172306   	LPSTLN= 000030 G
IE.RNM= 177715   	IO.DIS= 016000   	IO.SST= 002430   	KPDR4 = 172310   	LPSTS = 000000 G
IE.RSU= 177757   	IO.DTI= 016000   	IO.STC= 002500   	KPDR5 = 172312   	LPTBL   005624RG
IE.SDP= 177635   	IO.ENA= 006000   	IO.STP= 016400   	KPDR6 = 172314   	LPTBL2  005644RG
IE.SNC= 177735   	IO.EOF= 003000   	IO.SYN= 003040   	KPDR7 = 172316   	LPTBL3  005664RG
IE.SPC= 177772   	IO.ESA= 002500   	IO.TRM= 002410   	KS.CES= 000002 G 	LPTHD = 000004 G
IE.SQC= 177734   	IO.EXT= 011400   	IO.UNL= 000042   	KS.CST= 000020 G 	LPTPD   007226RG
IE.SRE= 177762   	IO.FDX= 003020   	IO.WAT= 013400   	KS.DEX= 000010 G 	LPTSK   006626RG
IE.STK= 177706   	IO.FNA= 004400   	IO.WLB= 000400   	KS.EPE= 000004 G 	LPUNIT  005560RG
IE.ULN= 177773   	IO.HDX= 003010   	IO.WLS= 000410   	KS.PFT= 000100 G 	LPUTBL  005704RG
IE.UPN= 177777   	IO.HIS= 015000   	IO.WLV= 000500   	KS.PTO= 000200 G 	LP0PUD  010476RG
IE.VER= 177774   	IO.INL= 002400   	IO.WVB= 011000   	KS.TRR= 000040 G 	L$$P20= 000002
IE.WAC= 177743   	IO.ITI= 017000   	IO.XMT= 014400   	KS.TSP= 000001 G 	L.DT0 = 000003 G
IE.WAT= 177741   	IO.KIL= 000012   	IO.XNA= 014410   	K.LBPW= 000005 G 	L.DX0 = 000005 G
IE.WER= 177737   	IO.LED= 012000   	IQ.Q  = 000002   	K.LCKL= 177777 G 	L.DX1 = 000006 G
IE.WLK= 177764   	IO.LOV= 001010   	IQ.X  = 000001   	K.LCON= 000004 G 	L.RP4 = 000002 G
IE.2DV= 177720   	IO.LTK= 000050   	IS.BV = 000005   	K.LDCM= 000001 G 	L.TTY = 000001 G
IFLOP = 100000   	IO.MCS= 013400   	IS.CLR= 000000   	K.LDRP= 177777 G 	MBUFR = 000014
IGNO    011512RG 	IO.MDA= 016000   	IS.CR = 006401   	K.LDSC= 000003 G 	MEBUF = 000012
INDTTF  030146R  	IO.MDI= 014400   	IS.ESC= 015401   	K.LLTO= 000006 G 	MECNT = 000010
INIAN   044716RG 	IO.MDO= 015400   	IS.PND= 000000   	K.LRAC= 000001 G 	MODE  = 100000
INITLM  010672RG 	IO.MLO= 006000   	IS.RDD= 000002   	K.LRBA= 000007 G 	MPE11 = 001000
INPPT   035010R  	IO.MOD= 003000   	IS.SET= 000002   	K.LRMN= 000003 G 	NODADR  005126RG
INPT0   035022R  	IO.MSO= 005000   	IS.SUC= 000001   	K.LRNG= 000002 G 	NOSNDA  025140RG
INPT1   035406R  	IO.RAL= 001010   	KBB0  = 177562 G 	K.LROP= 000001 G 	NTKXEN  012154R
INSHD = ****** GX	IO.RAT= 013000   	KBB1  = 175612 G 	K.LRPR= 000002 G 	NTKXEP  012160R
INSTAL= ****** GX	IO.RBC= 003000   	KBS0  = 177560 G 	K.LRRJ= 177777 G 	NTKXSP  012134RG
INSTK = ****** GX	IO.RCI= 015000   	KBS1  = 175610 G 	K.LSCK= 000001 G 	NULHD   011654RG
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 1209-4
SYMBOL TABLE

NULSTP= 000040   	QPROAD  017174R  	R.AS  = 000020 G 	STNTQ   031710RG 	TOIP  = 000002
NULTSK  007066RG 	QPROMS  017152R  	R.AT  = 000006 G 	STNXT   034212R  	TOIT  = 000001
NUPE  = 000002   	QPRTPD  007266RG 	R.DP  = 000011 G 	STOPDL  026054R  	TOITDN  030334R
N.BP  = 000002 G 	QPRTSK  007026RG 	R.FC  = 000014 G 	STPLIN  025736RG 	TOTNDN  030000R
N.FP  = 000000 G 	QSIZE = 000023   	R.FN  = 000013 G 	STQUE   030572R  	TO10  = 000200
N.OVPT= 000054 G 	Q.AK  = 000012 G 	R.LU  = 000012 G 	STRBF = 000002   	TO10AD= 174420
N.PR  = 000010 G 	Q.DA  = 000000 G 	R.PB  = 000024 G 	STRDAT  026502RG 	TO10AS  001316RG
OKPAL0  001400RG 	Q.DZ  = 000016 G 	R.PR  = 000010 G 	STSTT   001320RG 	TO10BC= 174414
OUTPT   034620R  	Q.D1  = 000006 G 	R.QSGC= 000015   	STSWD   005134RG 	TO10BM= 000001
OUTPT3  034540R  	Q.IOAE= 000012   	R.QSPC= 000014   	STSW0 = 000004 G 	TO10DB= 000400
PARLOA  017664R  	Q.IOEF= 000006   	R.QSPN= 000006   	STSW1 = 000006 G 	TO10DN= 100000
PARLOT  017736R  	Q.IOFN= 000002   	R.QSPR= 000012   	STTOIP  030342R  	TO10DT= 174424
PARSAV  001022RG 	Q.IOLU= 000004   	R.QSTN= 000002   	STTYDN  034052R  	TO10ER= 020000
PATSIZ= 000040 G 	Q.IOPL= 000014   	R.SB  = 000016 G 	STTYO   034406R  	TO10PK  005140RG
PERCLR= 001000   	Q.IOPR= 000007   	R.TD  = 000004 G 	STXAS = 000000 G 	TO10Q   001326RG
PHYS  = 100000   	Q.IOSB= 000010   	R.UI  = 000022 G 	STXCS = 000000 G 	TO10QC= 001324RG
PIDENT= 000000   	Q.SI  = 000004 G 	SCD   = 000040   	STXDX = 000000 G 	TO10SZ  001314RG
POLMIN= 001400 G 	Q.SP  = 000006 G 	SETDNE  030412R  	SWFED   045350RG 	TO11  = 000100
PRB0  = 177566 G 	Q.ST  = 000004 G 	SETLIN  025426RG 	SWR   = 177570   	TO11AD= 174422
PRB1  = 175616 G 	Q.SZ  = 000020 G 	SETSPD  025442RG 	SWSLLT= 100000   	TO11AS  001310RG
PRI7  = 000340 G 	Q.TS  = 000002 G 	SEXCM   021564R  	SY0PUD  010616RG 	TO11BC= 174416
PRMBLK  023016R  	RAMIS0= 010000   	SEXP0   021572R  	S.BA  = 000012 G 	TO11BM= 020000
PRMEMN  001230RG 	RCVKLP  027144RG 	SEXP1   021652R  	S.DI  = 000011 G 	TO11BS  001312RG
PROPNT= 000021   	RESERV  011240R  	SEXP2   021554R  	S.DL  = 000032 G 	TO11DB= 004000
PROTBL  001234RG 	RETTOD  027032RG 	SEX97   021654R  	S.DP  = 000010 G 	TO11DN= 000200
PRS0  = 177564 G 	RFMAD0= 100000   	SF.EX = 000004 G 	S.FW  = 000006 G 	TO11DT= 174426
PRS1  = 175614 G 	RFMAD1= 040000   	SF.FX = 000002 G 	S.LZ  = 000014 G 	TO11DV  001276RG
PRTOFF= 004000   	RFMAD2= 020000   	SF.IR = 040000 G 	S.PC  = 000020 G 	TO11ER= 000002
PRVCM   021072R  	RFMAD3= 010000   	SF.PT = 000001 G 	S.RB  = 000026 G 	TO11FN  001274RG
PR0   = 000000   	RF.XR = 000002 G 	SF.ST = 100000 G 	S.RF  = 000024 G 	TO11FW  001302RG
PR1   = 000040   	RM    = 000010   	SF.TA = 000001 G 	S.SP  = 000022 G 	TO11GW  001304RG
PR2   = 000100   	RMBYT = 000004   	SKX     023046R  	S.SS  = 000030 G 	TO11HD  001272RG
PR3   = 000140   	RPBUF   005104RG 	SNDALL  027222RG 	S.STBK= 000012   	TO11NP  001270RG
PR4   = 000200   	RPCNT   005110RG 	SNDMSG  012447R  	S.SZ  = 000036 G 	TO11Q   001334RG
PR5   = 000240   	RPCW2   005114RG 	SPDTB   032540R  	S.TD  = 000004 G 	TO11QC= 001325RG
PR6   = 000300   	RPHD  = ****** GX	SPDTBL  026172R  	S.TN  = 000000 G 	TO11QP  001306RG
PR7   = 000340 G 	RPPEN   007656RG 	SPDTBZ= 000016   	S.TZ  = 000016 G 	TO11SP  001300RG
PS    = 177776 G 	RPRNA   005102RG 	SPSAV   001020RG 	S0.ABR= 100000 G 	TRPASV  001120RG
PSWW1 = 000005   	RPRTC   005100RG 	STAT  = 174434   	S0.CON= 040000 G 	TRPXIT  011142R
PSWW10= 000014   	RPSTK = ****** GX	STATD = 000034   	S0.ISP= 001700 G 	TRP4    011170R
PSWW11= 000015   	RPTPD   007326RG 	STATI   001336RG 	S0.MSK= 140000 G 	TS.EXT= 000026 G
PSWW12= 000016   	RPTSK   006566RG 	STATS = 000000   	S0.OSP= 036000 G 	TS.LRF= 000006 G
PSWW13= 000017   	RPUNIT  005112RG 	STATUS= 000022   	S0.SPD= 037700 G 	TS.LRQ= 000002 G
PSWW2 = 000006   	RQKLD   032472R  	STCM    044142R  	TBIT  = 000020 G 	TS.RUN= 000010 G
PSWW3 = 000007   	RQKLR   032454R  	STDCDR  006322RG 	TENAD1= 174410   	TS.SUS= 000012 G
PSWW4 = 000010   	RQMCR   032436R  	STDDTE  005762RG 	TENAD2= 174412   	TS.TKN= 000004 G
PSWW5 = 000011   	RQSPB   023704R  	STDDX   006062RG 	TF.OU = 000002 G 	TS.WF0= 000014 G
PSWW6 = 000012   	RQSPT   023700RG 	STDFED  006022RG 	THRED = 000000 G 	TS.WF1= 000016 G
PSWW7 = 000013   	RQSTD   023716R  	STDF11  006122RG 	TMOCNT  002660RG 	TS.WF2= 000020 G
PULSE = 000020   	RSX$$E= 000041   	STDINS  006222RG 	TNAD1 = 000010   	TS.WF3= 000022 G
PWRXSP  001032RG 	RSX$$F= 000105   	STDLPT  006262RG 	TNAD2 = 000012   	TS.WF4= 000024 G
PWR.UP  017322RG 	RSX$$K= 000126   	STDQPR  006422RG 	TN.EMT= 000012 G 	TTACK   034470RG
QNDSV   023010R  	RSX$$V= 000013   	STDRPT  006162RG 	TN.LRF= 000040 G 	TTCNT = 000205 G
QPRDTC  024710RG 	RTDVST  026502RG 	STDTTY  006362RG 	TN.TRP= 000014 G 	TTCTY   036462R
QPRDTE  024714RG 	RTNTOD  026422RG 	STDVST  026502RG 	TOBM  = 000004   	TTINI   032550RG
QPRDTF  027102R  	RUBP  = 000020   	STEIF   030552R  	TOD   = 000003   	TTINO   033730R
QPRDTL  024750R  	R$$11D= 000001   	STLN    044176R  	TOELDN  030416R  	TTINPA  036026R
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 1209-5
SYMBOL TABLE

TTINPB  036204R  	T.SZ  = 000020 G 	U.C4  = 000012 G 	XOFF    026226RG 	.ATLLH  006462RG
TTINX   033724R  	T10AD = 000020   	U.DACP= 000036 G 	XON     026234RG 	.BGBST= 076000 G
TTLGE   027654R  	T11AD = 000022   	U.DN  = 000000 G 	X.X94   015262R  	.BGBUF  001414RG
TTOUTR  034466R  	T11BC = 000016   	U.FB  = 000003 G 	X.X95   015264R  	.BGLEN= 002000 G
TTOUTX  034460R  	U     = 000040   	U.FO  = 000043 G 	X8X97   041664RG 	.BM873= 173000 G
TTPEN   007606RG 	UC.CCL= 000002 G 	U.GC  = 000031 G 	X9X96   015340R  	.BRCLK= 005000
TTPKT   002730RG 	UC.COM= 020000 G 	U.HA  = 000020 G 	ZSTOP = 040000   	.BRKCH  002630RG
TTSAV   037156R  	UC.DIR= 000010 G 	U.LBH = 000044 G 	$BTMSK  002642RG 	.BTPRM  001156RG
TTSTCH  036052R  	UC.ETB= 000100 G 	U.LBN = 000046 G 	$CDINT= ****** GX	.BTSCH  001160RG
TTTBL   002776RG 	UC.F11= 040000 G 	U.PC  = 000030 G 	$CD11 = 000001   	.BTSTK  015724RG
TTUNT   027660R  	UC.INB= 000400 G 	U.PR  = 000042 G 	$DBDTE= 000001   	.CECLK= 004000
TTWLO   032406R  	UC.ISP= 002000 G 	U.RB  = 000024 G 	$DHINP  035504RG 	.CEFN   041600RG
TTYDNE  034726R  	UC.MNT= 100000 G 	U.RF  = 000022 G 	$DHOUT  033734RG 	.CEFN3  041604RG
TTYDNX  034772R  	UC.PSE= 010000 G 	U.RP  = 000016 G 	$DH11 = 000001   	.CKASS  001050RG
TTYEND= 005046RG 	UC.REC= 000001 G 	U.SZ  = 000050 G 	$DIV  = ****** GX	.CKDEL  041666RG
TTYEXP= 000002 G 	UC.SDI= 000020 G 	U.TF  = 000042 G 	$DMINT  037760RG 	.CLKBA  002370RG
TTYHD   032072RG 	UC.SQD= 000040 G 	U.UI  = 000030 G 	$DORBL  020074RG 	.CLKEA  002574RG
TTYSP   032352RG 	UC.SWL= 001000 G 	U.UN  = 000002 G 	$DPMYG  020512RG 	.CLKSW  001134RG
TTYTPD  007206RG 	UC.TTY= 000004 G 	U.VA  = 000026 G 	$DPMYN  020566RG 	.CLKSZ= 000007 G
TTYTSK  006526RG 	UC.0SP= 004000 G 	U.VP  = 000032 G 	$DSW  = 000046 G 	.CLRMR= 006000
TT.ABL= 000040 G 	UF.OFL= 000040 G 	VC.BMW= 000002   	$DTE  = 000001   	.CLRUN= 010000
TT.ABW= 000010 G 	UF.RD = 000040 G 	VC.IFW= 000001   	$DTEOF  020076RG 	.COMEF  001010RG
TT.CRW= 000004 G 	UF.RH = 000200 G 	V.FCB   000006   	$DTEON  020110RG 	.CONBT= 012000
TT.CTY= 000002 G 	UF.TL = 000100 G 	V.FFNU  000055   	$DXINT= ****** GX	.CPDV   001252RG
TT.FEC= 014000 G 	UNASG1= 000032   	V.FIEX  000025   	$EXHSG  020574RG 	.CPFN   001250RG
TT.FEI= 004000 G 	UNASG2= 000033   	V.FMAX  000016   	$EXHSM  020602RG 	.CPUSN  010666RG
TT.NSA= 000400 G 	UNASG3= 000034   	V.FPRO  000030   	$EXMYG  020550RG 	.CRHD   001260RG
TT.OUT= 000001 G 	UNASG4= 000035   	V.FRBK  000034   	$EXMYN  020560RG 	.CRPB   001256RG
TT.RIP= 002000 G 	UNASG5= 000036   	V.IBLB  000012   	$FE   = 000001   	.CRPFL  005262RG
TT.RMT= 000100 G 	UNASG6= 000037   	V.IBSZ  000013   	$F11  = 000001   	.CRQZ   001246RG
TT.RSI= 020000 G 	UNRGFN  025114RG 	V.IFWI  000002   	$KLDFC  020770RG 	.CRSB   001262RG
TT.SIP= 001000 G 	UPAR0 = 177640   	V.LABL  000040   	$KLDFR  020610R  	.CRSND  002626RG
TT.SND= 140000 G 	UPAR1 = 177642   	V.LGTH  000056   	$KLDFW  020746RG 	.CRSZ   001254RG
TT.SNI= 040000 G 	UPAR2 = 177644   	V.LRUC  000035   	$KLDFX  020722RG 	.CRTSK  001006RG
TT.XEN= 000020 G 	UPAR3 = 177646   	V.SBCL  000021   	$LPINT= ****** GX	.CSHRG= 164000
TT.XOF= 000200 G 	UPAR4 = 177650   	V.SBLB  000024   	$LP20 = 000001   	.CTYPT  002634RG
T.BA  = 000004 G 	UPAR5 = 177652   	V.SBSZ  000022   	$MUL  = ****** GX	.CYLTM= 000074 G
T.FW  = 000010 G 	UPAR6 = 177654   	V.STAT  000054   	$PRVDP  021104RG 	.DATE   001136RG
T.HBCT= 000002 G 	UPAR7 = 177656   	V.STD   000004   	$PRVEX  021046RG 	.DATE3  001136RG
T.HCAD= 000004 G 	UPDR0 = 177600   	V.TRCT  000000   	$RP04 = 000001   	.DAY    001142RG
T.HCBC= 000006 G 	UPDR1 = 177602   	V.WISZ  000020   	$RWDRG  021126RG 	.DBINT= ****** GX
T.HFCN= 000007 G 	UPDR2 = 177604   	WEP   = 000010   	$RX11 = 000001   	.DHSPD  037702RG
T.HHDS= 000010 G 	UPDR3 = 177606   	WFED    045016RG 	$TOP10= 000001   	.DHSPF  037646RG
T.HP  = 000012 G 	UPDR4 = 177610   	WFXSET  013374R  	$TTINP  036010RG 	.DHSPR  037622RG
T.HRED= 000000 G 	UPDR5 = 177612   	WI.BPS= 100000   	$TTOUT  034340RG 	.DHSTO  034300RG
T.PN  = 000000 G 	UPDR6 = 177614   	WI.DLK= 010000   	$T1091= 000001   	.DHTMO  040712RG
T.PZ  = 000006 G 	UPDR7 = 177616   	WI.EXT= 002000   	$UNIT   002640RG 	.DHXOF  037336RG
T.RAPB= 000004 G 	UT.LG = 000004 G 	WI.LCK= 004000   	$$    = 000037   	.DHXON  037474RG
T.RAPE= 000012 G 	UT.PR = 000001 G 	WI.RDV= 000400   	$$MSG = 000000   	.DLHUP  040312RG
T.RAPF= 000016 G 	UT.SL = 000002 G 	WI.WRV= 001000   	$$$   = 007372R  	.DLINT  036310RG
T.RAPI= 000006 G 	U.ACP = 000040 G 	WTLODT  024402R  	$$$ARG= 000011   	.DLSTO  034440RG
T.RAPM= 000002 G 	U.AF  = 000014 G 	W.CTL   000000   	$$$OST= 000016   	.DLTMO  040442RG
T.RAPR= 000010 G 	U.AR  = 000034 G 	W.FCB   000002   	$$$T1 = 000000   	.DLXOF  037364RG
T.RAPT= 000014 G 	U.CH  = 000032 G 	W.RTRV  000012   	$$$UNI= 000002   	.DLXON  037546RG
T.RAP4= 000000 G 	U.C1  = 000004 G 	W.STD   000004   	.ABCNT  002600RG 	.DMHUP  040250RG
T.RB  = 000016 G 	U.C2  = 000006 G 	W.VBN   000006   	.ABFLG  002602RG 	.DMTMO  041242RG
T.RF  = 000014 G 	U.C3  = 000010 G 	W.WISZ  000007   	.ACKAL  001162RG 	.DOW    001145RG
SCOMM	- COMMON DATA AND SUBRO	MACRO M1110  15-OCT-79 13:47  PAGE 1209-6
SYMBOL TABLE

.DQDH0  007446RG 	.FEMOD  001166RG 	.LDRJD= 064000   	.RP1PE  007726RG 	.TTRST  041464RG
.DQDLS  007466RG 	.FEPPU  015162RG 	.LDRJV= 063000   	.RP2PE  007776RG 	.TTSCW  040166R
.DQPBA  007406RG 	.FEST = ****** GX	.LDRM1= 060000   	.RP3PE  010046RG 	.TTXOF  037242RG
.DQPEA  007606RG 	.FESTB  001000RG 	.LDRM2= 061000   	.RP4PE  010116RG 	.TTXON  037374RG
.DQPSZ= 000010 G 	.FREPL  001420RG 	.LDRM3= 062000   	.RP5PE  010166RG 	.VCLUN  015266RG
.DRLTC= 015000   	.FSRPT= 000050 G 	.LDSEL= 044000   	.RP6PE  010236RG 	.VERNO  001036RG
.DRSRN  012764RG 	.GFNR = 102000   	.LPPFL  005570RG 	.RP7PE  010306RG 	.WRMBX= 071000
.DR.NS  013072RG 	.HRDWR  010670RG 	.MEMRS= 076000   	.RQESD  015152RG 	.X.02   023044R
.DSACF= 066000   	.INHDM  002576RG 	.MON    001143RG 	.RQSPD  026464RG 	.YEAR   001140RG
.DSIOJ= 065000   	.INICL= 070000   	.MSIZE  001114RG 	.SECLK= 003000   	..AKCR= ****** GX
.DST    001144RG 	.INTEN= 000100 G 	.NOERR  001122RG 	.SEND   023170RG 	..AKLP= ****** GX
.DTINT  027670RG 	.IOSNP  011530R  	.NOHLT= 001123RG 	.SERFG  001014RG 	..ALCB  043034RG
.D.ASS  021270RG 	.IRLTC= 014000   	.PARER  011254R  	.SETMR= 007000   	..ALC2  043050RG
.D.CEF  021540RG 	.KACFL  001412RG 	.PARRG= 172100 G 	.SETRN= 011000   	..ALOW  043322RG
.D.CMT  022156RG 	.KALSC= 000005 G 	.PAT..  011614RG 	.SEWFL  001016RG 	..BLXI  045544RG
.D.DSE  021574RG 	.KLERW  001164RG 	.PCAB1= 150000   	.SNDAL  027230RG 	..BLXO  045556RG
.D.DTE  017742RG 	.KLFLG  001172RG 	.PCAB2= 151000   	.SNDBF  002606RG 	..DECB  043166RG
.D.EXT  022330RG 	.KLITK  001126RG 	.PCAB3= 152000   	.SNDCN  002616RG 	..DECN  043162RG
.D.GLI  021374RG 	.KLIWD  001130RG 	.PCAB4= 153000   	.SNDLP  002604RG 	..DEC2  043156RG
.D.GMP  024042RG 	.KLNBC  001176RG 	.PDP11= 000050   	.SSCLK= 002000   	..DQRN  042050RG
.D.GPP  023720RG 	.KLNFD  001202RG 	.PFAIL  001026RG 	.SSM    001146RG 	..DSEV  042444RG
.D.GTP  021424RG 	.KLNFT  001200RG 	.PFASS  001052RG 	.SSTCO  012740RG 	..DTP1  045520RG
.D.MKT  022054RG 	.KLNLB  001176RG 	.PFIOW  001030RG 	.SSTET  012732RG 	..DTP2  045466RG
.D.PUT  023450RG 	.KLNMD  001214RG 	.PFRST  017530RG 	.STAST  015342RG 	..DTSP  045450RG
.D.QIO  022352RG 	.KLNPB  001174RG 	.POLLH  001424RG 	.STDHL  037576RG 	..ENB0  042720RG
.D.RAF  021632RG 	.KLNPE= 001216RG 	.POLND  002330RG 	.STDTA  005710RG 	..FSTD  042754RG
.D.REC  023270RG 	.KLNPT  002636RG 	.POLST  001430RG 	.STDTB  005716RG 	..INTX  014244RG
.D.REF  021616RG 	.KLNPW  001216RG 	.PRADR  001354RG 	.STDTC  005712RG 	..IODN  041730RG
.D.REQ  023472RG 	.KLNSW  001224RG 	.PRDCT  001362RG 	.STDTZ  005714RG 	..IPRI  042540RG
.D.RES  022236RG 	.KLNTD  001210RG 	.PRDTE  001360RG 	.STPCL= 000000   	..NADD  042614RG
.D.ROE  023270RG 	.KLNTT  001206RG 	.PRPSE  001370RG 	.STRCL= 001000   	..NDEL  042500RG
.D.ROS  023270RG 	.KLRLD  001170RG 	.PRSTA  001356RG 	.STTYD  040176RG 	..PICK  042656RG
.D.SAR  023036RG 	.KPAC   001410RG 	.PUDBA  007606RG 	.STTYH  040212RG 	..SACK  044156RG
.D.SEF  021556RG 	.KW11S  035472RG 	.PUDEA  010666RG 	.SYUIC  001154RG 	..SEFN  042372RG
.D.SEN  023022RG 	.LCEND= 010672RG 	.PWRDN  017176RG 	.TICK   024174RG 	..SPLP= ****** GX
.D.STV  023436RG 	.LCRDL= 052000   	.RCRM1= 147000   	.TICKS  001132RG 	..STCH  044112RG
.D.SUS  022224RG 	.LCRDR= 051000   	.RCRM2= 146000   	.TKPS   001152RG 	..STCR= ****** GX
.D.WFL  021734RG 	.LCRM1= 057000   	.RCRM3= 145000   	.TKTN   001124RG 	..STFC  044242RG
.D.WFO  021660RG 	.LCRM2= 056000   	.RCRM4= 144000   	.TKTN.  012354R  	..STIN  044432RG
.D.WFS  021656RG 	.LCRM3= 055000   	.RCSPF= 141000   	.TOD.   012336R  	..STLP= ****** GX
.D.WSE  022042RG 	.LCRM4= 054000   	.RDJ14= 134000   	.TPDBA  007126RG 	..STPT  043632RG
.EBPEQ  001366RG 	.LCRM5= 053000   	.RDJ71= 135000   	.TPDEA  007406RG 	..STQ   044634RG
.EIOJA= 067000   	.LDAR = 077000   	.RDMAB= 133000   	.TTELB  002656RG 	..STTY  043342RG
.EPEFL  001365RG 	.LDBRL= 043000   	.REQS   014460RG 	.TTELQ  002654RG 	..VTOL  045632RG
.EPFFL  001364RG 	.LDBRR= 042000   	.RPADR  005244RG 	.TTERL  041356RG 	..VVLL  046014RG
.EXEND  001002RG 	.LDCK1= 046000   	.RPSIZ  005250RG 	.TTP11  002632RG 	..VXFR  045536RG
.FEACK= ****** GX	.LDCK2= 047000   	.RPUNT  005240RG 	.TTRNG  040162R  	...GBL= 000000
.FEACT  005242RG 	.LDDIS= 045000

. ABS.	000056	   000
      	046210	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  18437 WORDS  ( 73 PAGES)
DYNAMIC MEMORY:  19876 WORDS  ( 76 PAGES)
ELAPSED TIME:  00:12:09
,[100,20]RSXT1091.LST/-SP/CRF=[100,30]RSXT1091.TMP
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ACKNOW	  025412 RG	 151-8281  #153-8396  
ADRSAV	  005130 RG	#30-1003   
AF.PP 	= 000200  G	#51-2286   
ASXCMN	  013372 R	 69-3091    69-3096    69-3101    69-3106   #69-3117   
ASXDT 	  013246 R	 68-3048   #68-3050   
ASXEXT	  013562 R	 68-3079   #72-3168   
ASXE1 	  013222 RG	 39-1616   #68-3035    73-3264    75-3486   
ASXE2 	  013236 R	 65-2946   #68-3047    70-3129    72-3249   
ASXLRF	  013406 R	 68-3061   #70-3125    71-3138   
ASXLRQ	  013444 R	 68-3057   #71-3135   
ASXSCN	  013234 R	#68-3046    68-3059    68-3065    69-3117    71-3136   
ASXTE 	  014054 R	 68-3063    69-3120    71-3163   #73-3260   
ASXWR0	  013274 R	 68-3069   #69-3090   
ASXWR1	  013304 R	 68-3071   #69-3095   
ASXWR2	  013314 R	 68-3073   #69-3100   
ASXWR3	  013324 R	 68-3075   #69-3105   
ASXWR4	  013334 R	 68-3077   #69-3110   
A.EF  	= 000020  G	 13-766    #51-2255    69-3090    69-3095    69-3110    69-3112   *71-3135    71-3155   *76-3578   
                        *76-3630   *76-3634   *80-3915    114-5819   114-5820  *128-6827  *151-8247  *172-9355   179-9923  
                        *179-9924   181-9983  *181-9989  *195-10521 *201-10986 *202-11027 *208-11455 *212-11683  221-12270 
                        *225-12443 *225-12491  226-12544 
A.FB  	= 000015  G	#51-2253   
A.FM  	= 000024  G	*40-1681   #51-2257    69-3090    69-3095    69-3100    69-3105    69-3110    69-3112    69-3114   
                         69-3116   *70-3125    71-3137   *76-3615   *115-5886   116-5952  *116-5978  *126-6475   225-12487 
A.HA  	= 000012  G	#51-2251    71-3140    73-3277    73-3292    78-3750    143-7831   252-14059 
A.PD  	= 000006  G	 40-1684   #51-2249    70-3128    72-3174    143-7830   145-7952  
A.PF  	= 000034  G	#51-2261   *76-3578   *139-7566   139-7569  
A.RP  	= 000010  G	#51-2250    128-6696   143-7840  
A.SP  	= 000004  G	#51-2247   *71-3160   *73-3290    73-3291    79-3804   
A.SZ  	= 000036  G	#51-2263   
A.TD  	= 000016  G	 40-1670   #51-2254    65-2710    65-2878    71-3161    72-3173    124-6384   128-6756   131-7062  
                         131-7088   135-7312   137-7476   143-7829  
A.TS  	= 000014  G	*40-1682   #51-2252    68-3047   *69-3119   *70-3126   *71-3139   *115-5887  *116-5965  *116-5977  
                        *123-6326   124-6387  *124-6390  *126-6474   131-7090  *131-7092  
BC.AKA	= 000025  G	#150-8221   182-10010 
BC.BTP	= 000024  G	#150-8220   159-8677  
BC.DES	= 000010  G	#150-8208  
BC.EDR	= 000027  G	#150-8223  
BC.FNM	= 000035  G	#150-8229   172-9388  
BC.FOD	= 000013  G	#150-8211  
BC.HAD	= 000002  G	#150-8202   159-8658  
BC.HDS	= 000007  G	#150-8207   181-9978  
BC.HTD	= 000012  G	#150-8210   160-8688   182-10017 
BC.LDR	= 000030  G	#150-8224  
BC.LDV	= 000031  G	#150-8225  
BC.LNC	= 000004  G	#150-8204   240-13239 
BC.NSA	= 000032  G	#150-8226  
BC.RDS	= 000005  G	#150-8205  
BC.RQD	= 000001  G	#150-8201  
BC.RTD	= 000011  G	#150-8209  
BC.SAK	= 000017  G	#150-8215   163-8849   241-13270 
BC.SDS	= 000006  G	#150-8206  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

BC.SKP	= 000033  G	#150-8227   159-8670  
BC.SLA	= 000023  G	#150-8219   182-10006 
BC.SNA	= 000014  G	#150-8212  
BC.SPT	= 000026  G	#150-8222  
BC.STR	= 000003  G	#150-8203  
BC.STS	= 000022  G	#150-8218  
BC.TDU	= 000015  G	#150-8213   210-11610 
BC.THU	= 000016  G	#150-8214   210-11615 
BC.XEN	= 000034  G	#150-8228  
BC.XOF	= 000020  G	#150-8216  
BC.XON	= 000021  G	#150-8217  
BITTBL	  041540 RG	 191-10384  206-11382 #220-12198  221-12263  226-12545 
BIT0  	= 000001	#5-255      38-1582   #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9815  
                        #219-12193 
BIT1  	= 000002	#5-255      38-1583   #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9814  
                        #219-12193 
BIT10 	= 002000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9808  #219-12193 
BIT11 	= 004000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9807  #219-12193 
BIT12 	= 010000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9806  #219-12193 
BIT13 	= 020000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9805   176-9820  
                         176-9828  #219-12193 
BIT14 	= 040000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   154-8417   154-8477  #176-9710  
                         176-9804  #219-12193 
BIT15 	= 100000	#5-255     #46-2028   #79-3885    80-3915   #81-4174   #85-4394   #149-8178  #176-9710   176-9803  
                         181-9978  #219-12193 
BIT2  	= 000004	#5-255      38-1584   #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9813  
                        #219-12193 
BIT3  	= 000010	#5-255      38-1585   #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9812  
                        #219-12193 
BIT4  	= 000020	#5-255      38-1586   #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9816  
                        #219-12193 
BIT5  	= 000040	#5-255      38-1587   #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9811  
                        #219-12193 
BIT6  	= 000100	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9810   176-9824  
                        #219-12193 
BIT7  	= 000200	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9809  #219-12193 
BIT8  	= 000400	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9816  #219-12193 
BIT9  	= 001000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   176-9816  #219-12193 
BLKTT 	  005200 RG	#30-1020   
BLXCOM	  045564 R	 251-13959 #251-13964 
BLXPLP	  045614 R	 251-13986 #251-13997  251-13998 
BLXRTN	  045624 R	#251-14006 
BPARER	= 000020	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193  245-13564 
BPTTRP	  011246 R	 40-1701   #40-1722   
BTPHD 	  015444 RG	 33-1285    34-1345    35-1384   #80-3909   
BTPRO 	  015744 R	 80-3910    80-3910   #80-3912    80-3957    80-4032    80-4119   
BYCNT 	  002724 RG	#16-850    *184-10142  186-10179  195-10504 *195-10506 
BYTESA	  005132 RG	#30-1005   
CDBA  	= 177164  G	#31-1037   
CDCC  	= 177162  G	#31-1036   
CDD   	= 000020	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
CDDB  	= 177166  G	#31-1038    31-1052   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CDRTPD	  007246 RG	 33-1278    34-1318   #35-1379   
CDST  	= 177160  G	#31-1035    31-1052    31-1068   
CDTSK 	  006666 RG	 34-1312   #34-1317   
CESCHK	  021244 R	 96-4938    96-4938    96-4963    96-4963    96-4970    96-4970   #102-5168  
CHNPNT	= 000001	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
CHTBL 	  032510 R	#178-9875   178-9888   199-10823 
CHTBLN	= 000013	#178-9888   199-10821 
CH.FOR	= 000100  G	#55-2429   
CH.LAB	= 000001  G	#55-2433   
CH.NAT	= 000020  G	#55-2431   
CH.NDC	= 000010  G	#55-2432   
CH.OFF	= 000200  G	#55-2428   
CH.UNL	= 000040  G	#55-2430   
CMEDP 	  020520 R	#90-4728    91-4770   
CMNABO	  011100 RG	 40-1672    40-1675   #40-1679    65-2833   
CMNABT	  012754 R	 65-2717   #65-2832    65-2884   
CMSG  	  011514 R	 41-1752   #41-1805   
CNT   	  002722 RG	#16-848    *184-10143  203-11149 
CNUPE 	= 000002	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
COMBSE	  001226 RG	#9-573     *89-4608    89-4667   
COMTRP	  011000 R	 6-314      6-316      6-318      6-320     #40-1656   
COPBUF	  027616 RG	 64-2659    64-2659    168-9045   168-9045  #169-9151   238-13036  238-13036 
CRADR 	  002726 RG	#16-852    *184-10144  185-10163  186-10178  186-10180  195-10508 *195-10510 *195-10519 *197-10692 
                        *197-10704 
CRBFLN	= 000240  G	#31-1059   
CRBUFF	  005306 RG	#31-1057    31-1059   
CRBUFH	  005304 RG	#31-1055   
CRCEVF	  005256 RG	 31-1041   #31-1042   
CREVFG	  005254 RG	#31-1040   
CREXP 	= 005552 RG	#31-1067   
CRHD  	= ******  GX	 33-1278    34-1318    35-1380   
CRHUNG	  005260 RG	#31-1044   
CRJT  	= 001000	#176-9737   186-10181  197-10616  197-10636  197-10647 
CROBAR	  001034 RG	#7-459     *82-4225   *83-4238   
CRSIZE	= 000010  G	#31-1073   
CRSTB 	  011160 R	 40-1695   #40-1698   
CRSTBH	  005264 RG	#31-1049   
CRSTBK	  005266 RG	#31-1051    31-1053   
CRSTK 	= ******  GX	 34-1318   
CRSTLN	= 000016  G	#31-1053   
CRSTS 	= 005554 RG	#31-1069   
CRTBL 	  005550 RG	#31-1064    31-1073    36-1437   
CRTHD 	= 005550 RG	#31-1065   
CRTNXA	  014302 R	 75-3443   #75-3452   
CRTNX1	  014274 R	 75-3446   #75-3449   
CRTNX2	  014302 R	#75-3458   
CRTNX3	  014304 R	 75-3450   #75-3473    75-3504   
CRTY  	= 002000	#176-9736   186-10177  187-10198  187-10204  195-10515 
CR$BF1	= 030736 RG	#172-9396  
CR$BO2	= 031354 RG	#173-9504  
CR$B01	= 036136 RG	#201-10959 
CR$B03	= 044744 RG	#244-13473 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CR$CBR	= 017352 RG	#83-4240   
CR$DTB	= 030474 RG	#172-9329  
CR$DTD	= 011234 RG	#40-1717   
CR$DTF	= 030030 RG	#171-9235  
CR$ETE	= 030422 RG	#172-9313  
CR$FTA	= 011136 RG	#40-1686   
CR$IAS	= 014454 RG	#75-3516   
CR$ILF	= 025116 RG	#151-8303  
CR$ILQ	= 031550 RG	#173-9544  
CR$LRF	= 013440 RG	#70-3130   
CR$MPE	= 011300 RG	#40-1734   
CR$PT1	= 030670 RG	#172-9384  
CR$PT2	= 030714 RG	#172-9390  
CR$PT3	= 031312 RG	#173-9493  
CR$PT4	= 031700 RG	#173-9565  
CR$RES	= 011242 RG	#40-1720   
CR$SAI	= 034130 RG	#189-10291 
CR$SAQ	= 027572 RG	#168-9120  
CR$TBT	= 011250 RG	#40-1723   
CR$TET	= 030004 RG	#171-9227  
CR$T04	= 011212 RG	#40-1710   
CR$UIE	= 031242 RG	#173-9479  
CSDONE	  014224 R	 73-3261   #73-3351   
CS.EXP	= 177670	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
CTLO  	= 000040	#176-9739   184-10149  187-10196  197-10652  203-11067  203-11068 
CTRLC 	  032372 R	#177-9852   203-11176 
CTRLU 	  032376 R	#177-9854   203-11147 
CTRLZ 	  032402 R	#177-9856   203-11167 
CTYPTR	  002634 RG	#15-816     159-8659   184-10127  184-10145  195-10473  195-10491  201-10976  203-11061 
CTYSTS	  002662 RG	#16-844     184-10146  195-10492 *197-10670  197-10675  197-10691  203-11062 
CURBF 	= 000006	#176-9723  *186-10178  203-11111 *203-11112 *203-11115  203-11127 *203-11129  203-11130 *203-11150 
CYCLS 	= 000002	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
C.AS  	= 000002  G	#52-2300   
C.AT  	= 000000  G	#52-2299    121-6236  
C.FA  	= 000012  G	#52-2304   
C.FM  	= 000010  G	#52-2303   
C.HALT	= 000033  G	#176-9841  
C.HCRT	= 000015  G	#176-9836   195-10514  197-10589  203-11098 
C.HEOF	= 000032  G	#176-9839   203-11096 
C.HESC	= 000033  G	#176-9840   176-9841   203-11094  203-11158 
C.HFFD	= 000014  G	#176-9835   197-10591 
C.HLFD	= 000012  G	#176-9833   196-10559  197-10595  197-10631 
C.HSPC	= 000040  G	#176-9842  
C.HTAB	= 000011  G	#176-9832   197-10597 
C.HVTB	= 000013  G	#176-9834   197-10593 
C.HXOF	= 000023  G	#176-9838   201-10966 
C.HXON	= 000021  G	#176-9837  
C.RS  	= 000006  G	#52-2302   
C.SD  	= 000004  G	#52-2301   
C.SZ  	= 000014  G	#13-758     13-767    #52-2306    119-6140   121-6247   147-8090   222-12298 
C1    	= 140010	#37-1474    37-1536    37-1541    37-1553   
C1DB  	= 140110	#37-1476    37-1480    37-1486    37-1491    37-1496    37-1501    37-1506    37-1511    37-1516   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DAG1  	= 000030	#3-128      80-3945    80-3993   *96-4942    96-4944   *96-4979   *99-5086    99-5089   *102-5169  
                         102-5170  *245-13546  245-13549 *245-13599  245-13602 
DAG2  	= 000032	#3-127     *83-4246   *102-5172  *245-13581 
DAG3  	= 000036	#3-125     *171-9279  *174-9591  
DATE  	= 000004	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DBLRNG	  031106 R	 170-9198  #173-9450  
DBLSTS	  031200 R	 173-9461  #173-9468  
DBLXIT	  031174 R	#173-9465   173-9476  
DCOMST	= 000001	#5-255     #46-2028   #79-3885   #81-4174   #85-4394    96-4940    96-4944    96-4965    96-4972   
                        #149-8178  #176-9710  #219-12193 
DEAND1	  026270 R	 151-8287   153-8400   155-8519   156-8550  #158-8634   160-8699  
DEAND2	  026264 R	 152-8340   153-8391   154-8483   155-8515  #158-8632  
DEAND3	  025422 R	 151-8310  #153-8399   154-8411   154-8448  
DEANOD	  027076 R	 158-8635   161-8734   163-8841   164-8896   165-8911  #165-8923   166-8944   167-8966  
DEP   	= 010000	#5-255      41-1775   #46-2028   #79-3885    80-3975    80-4013    80-4019    80-4061    80-4111   
                        #81-4174   #85-4394    90-4727    96-4980    97-5018    98-5054   #149-8178   171-9275   172-9301  
                         173-9547   174-9598  #176-9710  #219-12193  246-13677 
DEPOF 	  001232 RG	#9-577     *89-4610    89-4662    91-4768   
DEX   	= 000400	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DEXCOM	  013056 R	#65-2890   
DEXDON	= 000004	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193  245-13539 
DEXST 	  001344 RG	#10-671    *96-4943   *96-4946   *245-13534 *245-13541 
DEXTM1	  001352 RG	#10-677     89-4642   
DEXTM2	  001350 RG	#10-675     89-4603    89-4615    89-4638    89-4675   
DEXTM3	  001346 RG	#10-673     89-4599   
DEXWD1	= 174406	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DEXWD2	= 174404	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DEXWD3	= 174402	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DE.01 	= 000377  G	#65-2847    76-3653    119-6137   128-6728   141-7689   141-7696  
DE.02 	= 000376  G	#65-2848    90-4736    96-4948    97-5023    100-5127   124-6376   131-7027   135-7337   145-7960  
DE.03 	= 000375  G	#65-2849    77-3700    90-4738   
DE.04 	= 000374  G	#65-2850    132-7149  
DE.05 	= 000373  G	#65-2851    106-5411   128-6661  
DE.06 	= 000372  G	#65-2852   
DE.07 	= 000371  G	#65-2853    76-3651    124-6396  
DE.08 	= 000370  G	#65-2854    124-6394   135-7387   139-7571  
DE.09 	= 000367  G	#65-2855   
DE.10 	= 000366  G	#65-2856   
DE.11 	= 000365  G	#65-2857   
DE.80 	= 000260  G	#65-2858   
DE.81 	= 000257  G	#65-2859   
DE.90 	= 000246  G	#65-2860    104-5315  
DE.91 	= 000245  G	#65-2861   
DE.92 	= 000244  G	#65-2862    104-5291  
DE.93 	= 000243  G	#65-2863   
DE.94 	= 000242  G	#65-2864    77-3709   
DE.95 	= 000241  G	#65-2865    77-3710   
DE.96 	= 000240  G	#65-2866    78-3777   
DE.97 	= 000237  G	#65-2867    114-5826   119-6109   121-6245   221-12274 
DE.98 	= 000236  G	#65-2868    116-5981  
DE.99 	= 000235  G	 65-2774   #65-2869    87-4520   
DFTBL 	  025024 RG	 151-8264  #151-8266   151-8296  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DFTSZ 	= 000070	 151-8261  #151-8296  
DFUNC 	= 000200	#5-255     #46-2028   #79-3885   #81-4174   #85-4394    96-4940    96-4965    96-4972   #149-8178  
                        #176-9710  #219-12193 
DF.DMG	= 000004	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   177-9864  #219-12193 
DF.DMN	= 000007	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.DOR	= 000001	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.EHG	= 000010	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   177-9862  #219-12193 
DF.EHM	= 000011	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.EMG	= 000005	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.EMN	= 000006	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.KLR	= 000012	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.KLW	= 000013	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.KLX	= 000014	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.OFF	= 000002	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.ON 	= 000003	#5-255     #46-2028   #79-3885    80-4106   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.PDP	= 000016	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DF.PEX	= 000015	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DHBUF 	= 000020	#176-9729  *197-10670  197-10675 
DHCNT 	= 000200  G	#26-940     36-1427   
DHISTQ	  035544 R	 198-10730 #199-10796  200-10900  201-10969 
DHSAV 	  037120 R	 188-10223  198-10728  199-10785 #204-11216 
DHSTSV	  002652 RG	#15-831    *199-10788  199-10812 
DHTBL 	  003046 RG	 17-865     17-866     17-867     17-868     17-869     17-870     17-871     17-872     17-873    
                        #19-907     26-940     36-1427    153-8364   154-8462   155-8503   168-9050   195-10469  195-10533 
                         197-10668  204-11227  205-11299  206-11364  208-11469  214-11846  214-11961  238-13089  239-13153 
                         239-13174 
DHTMP 	  002646 RG	#15-827    *188-10222 *199-10784  204-11223 
DH.FER	= 020000  G	#176-9828   199-10847 
DIAG1 	= 174430	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DIAG2 	= 174432	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DIAG3 	= 174436	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DIALUP	  025114 RG	 151-8279  #151-8301  
DIKL10	= 000010	#5-255     #46-2028   #79-3885   #81-4174   #85-4394    96-4940    96-4972    96-4979   #149-8178  
                        #176-9710  #219-12193 
DIRDPT	  012630 R	 65-2775   #65-2777    65-2815   
DIRMAX	= 000102	 65-2772   #65-2815   
DIROK 	  012624 R	 65-2773   #65-2775   
DIV216	  042454 RG	 115-5874   115-5874   221-12260  221-12260  226-12535  226-12535 #228-12583 
DLCNT 	= 000005  G	#18-902     36-1423    153-8368   154-8447   214-11966 
DLECNT	= 000004  G	#18-903     213-11740 
DLETBL	  003006 RG	 15-820    #18-897     18-903     213-11739 
DLHUPX	  040400 R	 211-11656 #212-11692 
DLSTOP	  026062 R	 155-8500   155-8500   155-8518   155-8518  #155-8521  
DLTBL 	  002776 RG	 15-817    #18-895     18-902     36-1423    168-9033   210-11618  213-11729 
DLTMP 	  002650 RG	#15-829    *192-10394 *200-10895  204-11240 
DLYCNT	= 174400	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DL.CAR	= 010000  G	#176-9806   202-11032  213-11751 
DL.CTS	= 020000  G	#176-9805  
DL.DEN	= 000040  G	#176-9811   202-11017  212-11690  213-11745 
DL.DSC	= 100000  G	#176-9803  
DL.DTR	= 000002  G	#176-9814   202-11017  202-11046  213-11755  213-11759 
DL.FER	= 020000  G	#176-9820   200-10902 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DL.RAC	= 004000  G	#176-9807  
DL.RDE	= 000001  G	#176-9815  
DL.RDN	= 000200  G	#176-9809  
DL.REN	= 000100  G	 155-8524  #176-9810   202-11037  212-11690  213-11792 
DL.RNG	= 040000  G	#176-9804   202-11015 
DL.RTS	= 000004  G	#176-9813   202-11017  202-11034  213-11753  213-11755 
DL.SRD	= 002000  G	#176-9808  
DL.STD	= 000010  G	#176-9812  
DL.UNA	= 001420  G	#176-9816  
DL.XEN	= 000100  G	#176-9824   193-10436  197-10662  197-10683  206-11390  213-11734  213-11746 
DMTBL 	  002732 RG	#17-864     153-8370   154-8461   209-11526  209-11533  214-11845  215-11995 
DMTMP 	  002644 RG	#15-825    *209-11520  209-11522 
DMTNXM	  041176 R	 214-11849 #214-11959 
DMYN  	= 000004  G	#9-594     *89-4661   *89-4662    93-4833    171-9274   172-9300   173-9552   174-9596  
DNBLK 	  005162 RG	#30-1012   
DNFCN 	  005164 RG	#30-1014   
DNSTS 	  005172 RG	#30-1017   
DON10C	= 040000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   171-9239  #176-9710  #219-12193 
DON10S	= 100000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DON11C	= 000100	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   172-9333  #176-9710  #219-12193 
DON11S	= 000200	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DPB.CK	= ******	 104-5273   106-5400  
DPCMN 	  020514 R	#90-4727    93-4834   
DPKAL 	  032426 R	#177-9863   183-10108 
DPMSEP	  020546 R	 90-4729   #90-4738   
DPSEC 	  020544 R	 90-4733   #90-4736   
DPS4  	= 040000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DQNXT 	  033364 R	#184-10119  185-10161  185-10168 
DRESET	= 000100	#5-255     #46-2028   #79-3885   #81-4174    83-4246   #85-4394    102-5172  #149-8178  #176-9710  
                        #219-12193  245-13581 
DRXCOM	  013072 R	 65-2889   #65-2895   
DRXRR 	  013104 R	 65-2892   #65-2897   
DR.DTE	= 000011	#5-255     #46-2028   #79-3885    80-4106   #81-4174   #85-4394   #149-8178  #176-9710   177-9862  
                         177-9864  #219-12193 
DR.00 	= 000000  G	#65-2840    111-5674   112-5724   113-5783  
DR.01 	= 000001  G	#65-2841    76-3650    76-3652    88-4562    90-4734    96-4959    97-5021    99-5090    104-5317  
                         106-5420   108-5529   114-5824   115-5889   116-5967   116-5979   117-6015   119-6151   121-6234  
                         124-6393   126-6476   128-6833   130-6949   135-7371   137-7478   139-7567   143-7856  
DR.02 	= 000002  G	#65-2842    110-5624   123-6328   131-7094  
DR.03 	= 000003  G	#65-2843    131-7096  
DSEND 	= 000004	#5-255     #46-2028   #79-3885   #81-4174   #85-4394    96-4972    96-4976    96-4979   #149-8178  
                        #176-9710  #219-12193 
DS.99 	  012622 R	#65-2774    65-2791    65-2807    65-2808    65-2812   
DS04  	= 004000	#5-255     #46-2028   #79-3885    80-3945    80-3993   #81-4174   #85-4394    102-5170  #149-8178  
                        #176-9710  #219-12193  245-13549 
DS05  	= 002000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DS06  	= 001000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193  245-13602 
DTEADR	  001266 RG	#10-625     171-9244  *171-9286  
DTECMD	= 000451	#5-255     #46-2028   #79-3885    80-3962    80-4039   #81-4174   #85-4394   #149-8178  #176-9710  
                        #219-12193 
DTEDSP	  020036 R	 86-4448   #86-4453   
DTEFLG	= 000444	#5-255     #46-2028   #79-3885    80-3976    80-4112   #81-4174   #85-4394   #149-8178  #176-9710  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #219-12193 
DTEF11	= 000450	#5-255     #46-2028   #79-3885    80-4014   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DTEHD 	  024410 RG	 33-1231    34-1298    35-1363   #151-8238  
DTEMSK	  001264 RG	#10-623     171-9244  *171-9285  
DTEMTD	= 000455	#5-255     #46-2028   #79-3885    80-4062   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DTEMTI	= 000456	#5-255     #46-2028   #79-3885    80-4003    80-4020   #81-4174   #85-4394   #149-8178  #176-9710  
                        #219-12193 
DTENM 	= 000000	#9-590     
DTESP 	  024670 RG	 34-1298    151-8239  #151-8239  
DTETPD	  007146 RG	 33-1231   #35-1362   
DTETSK	  006466 RG	 34-1293   #34-1297    34-1301   *172-9355  
DTEXIT	  027760 R	 170-9195  #170-9210   173-9466  
DTTSK 	  006726 RG	 34-1318   #34-1327    34-1332   
DUPE  	= 000020	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DURE  	= 000004	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DVCH  	= 110220	#37-1470    37-1480    37-1486    37-1491    37-1496    37-1501    37-1506    37-1511    37-1516   
                         37-1536    37-1541    37-1553   
DV.EOF	= 000040  G	#58-2485   
DV.F11	= 000400  G	#58-2488   
DV.HNG	= 001000  G	#58-2489    169-9168  
DV.IOP	= 000020  G	#58-2484   
DV.LIN	= 002000  G	#58-2490    214-11885 
DV.LOG	= 000100  G	#58-2486    169-9168   199-10867  214-11885 
DV.NXD	= 000001  G	#58-2480   
DV.OFL	= 000002  G	#58-2481   
DV.OIR	= 000004  G	#58-2482   
DV.SCN	= 000010  G	#58-2483   
DV.URE	= 000200  G	#58-2487    199-10867 
DWNMS 	  012404 R	 64-2672   #64-2677    64-2679   
DWNMSG	  012372 R	 64-2658   #64-2672   
DWNMSZ	= 000043	 64-2672    64-2672   #64-2679   
DXBUF 	  005056 RG	#28-969    
DXCNT 	  005054 RG	#28-967    
DXHD  	= ******  GX	 33-1245    34-1339    35-1393   
DXPKT 	  005076 RG	#28-975    
DXRTC 	  005052 RG	#28-965    
DXSTK 	= ******  GX	 34-1339   
DXTPD 	  007306 RG	 33-1245   #35-1392   
DXTSK 	  006766 RG	 34-1332   #34-1338    34-1345    37-1536    37-1541   
DXUNIT	  005074 RG	#28-973    
DXVCB 	  005060 RG	#28-971    
DXWD1 	= 000006	#3-134     *80-4012    96-4952   *96-4975   *171-9263  *171-9280  *172-9302   173-9457  *173-9548  
                        *174-9582  *174-9602   246-13685 *246-13690 
DXWD2 	= 000004	#3-135      80-4007   *80-4011    96-4951   *96-4974   *171-9264  *171-9281  *172-9303   173-9458  
                        *173-9549  *174-9583  *174-9603   246-13684 *246-13689 
DXWD3 	= 000002	#3-136      80-3937    80-3967   *80-3974   *80-4010   *80-4018    80-4046    80-4048    80-4056   
                        *80-4060    80-4074   *80-4110    96-4950   *96-4973   *171-9267  *171-9282  *172-9304   173-9459  
                         173-9499   173-9514  *173-9550   173-9562  *174-9589  *174-9604   246-13683 *246-13688 
DXWRD1	= 002000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
DX0PEN	  010356 RG	 33-1251   #37-1535    37-1536    37-1565   
DX1PEN	  010426 RG	#37-1540    37-1541   
D$$H11	= 000010	#1-45       6-391     
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

D.AT  	= 000000  G	#53-2322   
D.CCDR	= 000006  G	#36-1436   
D.CCLK	= 000007  G	#36-1439    160-8687   182-10019 
D.CCPU	= 000200  G	#36-1453    159-8672  
D.CCTY	= 000001  G	#36-1418    159-8657  
D.CDH1	= 000003  G	#36-1425    181-9976  
D.CDLS	= 000004  G	#36-1429    194-10456  210-11622  240-13235 
D.CDL1	= 000002  G	#36-1422   
D.CKLE	= 000201  G	#36-1454   
D.CKLN	= 000210  G	#36-1455   
D.CLPT	= 000005  G	#36-1433    182-10004 
D.FA  	= 000004  G	#53-2324   
D.FEPD	= 000010  G	#36-1442   
D.FM  	= 000002  G	#53-2323   
D.SZ  	= 000006  G	#53-2326   
D1011 	= 000040	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
EBSEL 	= 000100	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
EBUSPC	= 000020	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
EBUSPS	= 000004	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
ECHOB 	  035062 R	 195-10511  195-10516  196-10560  196-10569 #197-10585  203-11191 
EDONES	= 040000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
EDRMT 	  025122 RG	 151-8289  #151-8308  
EF.BOV	= 000040  G	#47-2112   
EF.CLK	= 000002  G	#47-2104   
EF.CRI	= 002000  G	#47-2144    80-3930    80-3949    80-4072    82-4203   
EF.CTC	= 100000  G	#47-2134    201-10981 
EF.DTE	= 000001  G	#47-2102   
EF.IOD	= 000020  G	#47-2110    177-9860   184-10115  195-10521 
EF.NIR	= 000010  G	#47-2108    76-3630    128-6827   177-9860   225-12443  225-12491 
EF.PFR	= 004000  G	 40-1715   #47-2142    80-4072    82-4203    84-4327    173-9475  
EF.PR1	= 040000  G	#47-2136    64-2628    90-4728    183-10067  199-10797  199-10813  201-10953  208-11453  209-11539 
                         212-11693  216-12050  243-13373  247-13722  248-13746  249-13772 
EF.PR2	= 020000  G	#47-2138    201-10993  247-13722  248-13751 
EF.RKH	= 002000  G	#47-2122    177-9860   179-9935   212-11683 
EF.RKP	= 010000  G	#47-2140    167-8959   167-8963  
EF.RKR	= 001000  G	#47-2120    177-9860   179-9931   202-11027 
EF.RQM	= 000200  G	#47-2116    177-9860   179-9927   201-10986 
EF.RSS	= 004000  G	#47-2124    177-9860   179-9939   208-11455 
EF.SND	= 100000  G	#47-2129   
EF.TED	= 000100	#150-8189   150-8234   172-9355  
EF.TMO	= 000100  G	 13-765    #47-2114    177-9860   180-9950   183-10065 
EF.TTY	= 000004  G	#47-2106   
EF.WFM	= 000400  G	#47-2118   
EHSG  	= 000006  G	#9-596     *89-4668    94-4867   
EHSM  	= 000010  G	#9-598     *89-4684    95-4899    173-9453   173-9557  
EIS   	= ******	 251-13987  251-13992 
EMGSTK	  011000 RG	#39-1620    40-1661    41-1749   
EMTSTK	  001116 RG	#7-473     *40-1676   *65-2707   *65-2726    65-2829    65-2832   *65-2876    65-2890    65-2895   
                         65-2917   
EMTTRP	  012450 RG	 6-324     #65-2702   
EMYN  	= 000002  G	#9-592     *89-4659    92-4801   
EM.DRO	= 000020  G	#65-2698    65-2728    65-2760   *65-2891   *65-2896    65-2916   *126-6470  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ENBXOF	  025132 RG	 151-8294  #152-8321  
EOLS  	= 000400	#176-9738   186-10177  187-10198  196-10548  203-11116  203-11178  203-11187 
EPTR  	= 000000	#5-255     #46-2028   #79-3885    80-3961    80-3975    80-4002    80-4013    80-4019    80-4038   
                         80-4061    80-4111   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
EQSZ  	  001332 RG	#10-664     172-9357  *172-9361  *172-9414  *173-9562   173-9563  
ERR10C	= 010000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
ERR10S	= 020000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
ERR11C	= 000001	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
ERR11S	= 000002	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
EV.AS 	= 000002  G	#62-2598    75-3489    75-3505    79-3819   
EV.PF 	= 000200  G	 39-1614   #62-2599    75-3482    75-3512    83-4262   
EV.SE 	= 000001  G	#62-2595    68-3035    73-3262    75-3482    117-6014   227-12566 
EXCMN 	  020554 R	#91-4769    92-4802    94-4868    95-4900   
EXKAL 	  032414 R	#177-9861   183-10071 
E.BOV 	= 000006  G	#47-2113   
E.CLK 	= 000002  G	#47-2105   
E.DTE 	= 000001  G	#47-2103   
E.DV  	= 000006  G	#150-8196   162-8770   164-8868   166-8941  
E.FCRI	= 000073  G	#47-2145   
E.FCTC	= 000100  G	#47-2135   
E.FN  	= 000004  G	#150-8195   151-8258   164-8865  
E.FP  	= 000000  G	#150-8193  
E.FPFR	= 000074  G	#47-2143   
E.FPR1	= 000077  G	#47-2137   
E.FPR2	= 000076  G	#47-2139    80-3914    80-4105   
E.FRKP	= 000075  G	#47-2141   
E.FSND	= 000040  G	#47-2130   
E.FW  	= 000010  G	#150-8197   151-8309  *152-8332   152-8336   153-8367   154-8410   154-8417   154-8423   154-8428  
                         154-8438   154-8446  *154-8450   154-8456   154-8477  *155-8492   155-8508   155-8525   159-8653  
                         162-8771   164-8866   164-8869   165-8909   167-8953  
E.IOD 	= 000005  G	#47-2111   
E.LS  	= 000002  G	#150-8194  
E.NIR 	= 000004  G	#47-2109   
E.OPSZ	= 000140  G	#150-8185   244-13467 
E.RKH 	= 000013  G	#47-2123   
E.RKR 	= 000012  G	#47-2121   
E.RQM 	= 000010  G	#47-2117   
E.RSS 	= 000014  G	#47-2125   
E.TMO 	= 000007  G	#47-2115   
E.TTY 	= 000003  G	#47-2107   
E.WFM 	= 000011  G	#47-2119   
FDVNM 	  026564 R	 161-8733   161-8733  #163-8802   164-8888   164-8888  
FDVNMM	  026550 R	 152-8333   152-8333   153-8351   153-8351   153-8397   153-8397   154-8409   154-8409   154-8451  
                         154-8451   155-8493   155-8493   158-8627   158-8627  #162-8769   166-8935   166-8935  
FEHD  	= ******  GX	 33-1235    34-1332    35-1367   
FESTK 	= ******  GX	 34-1332   
FETBL 	  005116 RG	#30-996     36-1443   
FETPD 	  007166 RG	 33-1235   #35-1366   
FETSK 	  006726 RG	#34-1331    34-1339    37-1553   *80-3915   
FE0PUD	  010546 RG	#37-1552    37-1553   
FLBT  	= 000001	#176-9742  
FLBYT 	= 000011	#176-9725   196-10576 *197-10606 *197-10640 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

FLCT  	= 000017	#176-9741   187-10198  195-10493 
FLDVOT	  027106 RG	 151-8277  #166-8934  
FNBYT 	= 000005	#176-9722  *203-11158 *203-11165 *203-11174 *203-11185 
FNDCPU	  021160 R	 86-4446    86-4446   #100-5115  
FNDDTE	  021212 R	 96-4936    96-4936    96-4961    96-4961    96-4968    96-4968    97-5013    97-5013    98-5050   
                         98-5050    99-5081    99-5081   #101-5146  
FNDSPD	  026140 R	 154-8424   154-8424   154-8429   154-8429  #156-8540  
FORPRO	= 000020	#5-255     #46-2028   #79-3885   #81-4174   #85-4394    89-4622    89-4663    89-4669   #149-8178  
                         171-9273   172-9299   173-9452   173-9551   173-9556   174-9597  #176-9710  #219-12193 
FW    	= 000300	#37-1472    37-1480    37-1486    37-1491    37-1496    37-1501    37-1506    37-1511    37-1516   
                         37-1536    37-1541   
F11TPD	  007346 RG	 33-1251   #35-1402    40-1684    70-3128   
GENTPD	  007366 RG	#35-1406   
HANGUP	  025210 RG	 151-8280  #153-8350  
HDR64 	= ******	 71-3141    73-3278    73-3293    78-3751    145-7974   225-12479 
HIBYTE	= 177400	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
HICTS 	  026274 RG	 151-8267  #159-8651  
HIDVST	  026502 RG	 151-8273  #161-8717  
HORPS 	= 000016	#176-9728   197-10602 *197-10618 *197-10648 
H.CSP 	= 000000  G	#49-2179   
H.DSW 	= 000046  G	#49-2181    73-3284    73-3299   
H.FCP 	= 000050  G	#49-2182   
H.FOR 	= 000052  G	#49-2183   
H.HSZ 	= 000002  G	#49-2180   
H.IPC 	= 000076  G	#49-2186    71-3148   
H.IPS 	= 000074  G	#49-2185    71-3149   
H.ISP 	= 000100  G	#49-2187    71-3156   
H.KCAC	= 000020  G	#38-1586   
H.KCHN	= 000010  G	#38-1585   
H.KEXT	= 000004  G	#38-1584   
H.KMOS	= 000002  G	#38-1583   
H.KPWR	= 000040  G	#38-1587   
H.KUDF	= 000001  G	#38-1582   
H.LUT 	= 000130  G	#49-2189    71-3150    71-3153    78-3757    143-7837   252-14060 
H.OVL 	= 000054  G	#49-2184   
H.TKVA	= 000106  G	#49-2188    71-3147    143-7834  
IDXTB 	  032524 R	#178-9891   199-10834 
IE.ABO	= 177761	 197-10701 
IFLOP 	= 100000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   172-9363   172-9416   173-9523  
                        #176-9710  #219-12193 
IGNO  	  011512 RG	 36-1420    36-1420    36-1423    36-1423    36-1427    36-1427    36-1431    36-1431    36-1434   
                         36-1437    36-1437    36-1443    36-1443   #41-1796   
INDTTF	  030146 R	 171-9242  #171-9261  
INIAN 	  044716 RG	 39-1618   #244-13467 
INITLM	  010672 RG	#39-1599    1209-15167
INPPT 	  035010 R	 195-10500 #196-10547 
INPT0 	  035022 R	 196-10549 #196-10552 
INPT1 	  035406 R	 196-10550 #197-10690 
INSHD 	= ******  GX	 33-1268    35-1359   
INSTAL	= ******  GX	 33-1268   
INSTK 	= ******  GX	 33-1268   
INSTPD	  007126 RG	 33-1268   #35-1358   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

INTLPS	  027704 R	#170-9181   171-9256   171-9259   172-9308   172-9376  
INTROF	= 000010	#5-255     #46-2028   #79-3885    80-3922   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
                         247-13721  248-13750 
INTRON	= 000040	#5-255     #46-2028   #79-3885    80-4115   #81-4174   #85-4394    89-4657   #149-8178  #176-9710  
                        #219-12193 
INTSON	= 000001	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
INT10S	= 000400	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
INT11C	= 002000	#5-255     #46-2028   #79-3885    80-3966    80-4041    80-4050   #81-4174   #85-4394   #149-8178  
                         173-9533   173-9555  #176-9710  #219-12193 
INT11S	= 004000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193  248-13750 
IOPSIZ	= 007777	#42-1832    42-1842   
IOTTRP	  011304 R	 40-1702   #41-1745   
IO.ATT	= 001400	 225-12466 
IO.DET	= 002000	 225-12468 
IO.LOV	= 001010	 225-12470 
IO.LTK	= 000050	 76-3601    225-12476 
IO.RLB	= 001000	 128-6797   184-10150  225-12475  252-14067 
IO.RVB	= 010400	 128-6795   128-6803   252-14068 
IO.STC	= 002500	 128-6785  
IO.WLB	= 000400	 80-4122    128-6794   184-10147  252-14070 
IO.WVB	= 011000	 128-6792   128-6805  
IS.SUC	= 000001	 184-10152  195-10519  197-10695 
KBB0  	= 177562  G	#47-2037   
KBB1  	= 175612  G	#47-2041   
KBS0  	= 177560  G	#47-2036   
KBS1  	= 175610  G	#47-2040   
KLCST 	  020636 R	#96-4942    96-4977    96-4986   
KLNLGL	= 000016  G	#8-559     
KLNPLN	= 000026  G	 8-541      8-545     #8-564      159-8669  
KLNPTR	  002636 RG	#15-819     153-8358   155-8499   168-9035   184-10123  194-10452  195-10477  195-10527  197-10658 
                         201-10943  202-11019  202-11038  205-11292  206-11355  212-11678  238-13037  239-13142 
KLPWRF	= 000010	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   173-9473  #176-9710  #219-12193 
KL.CFL	= 000400  G	#54-2342   
KL.CFM	= 000002  G	#54-2333   
KL.DEF	= 002000  G	#54-2344   
KL.KAC	= 001000  G	#54-2343   
KL.LCA	= 000100  G	#54-2338   
KL.LRM	= 000001  G	#54-2332   
KL.LVB	= 000004  G	#54-2334   
KL.SPF	= 000040  G	#54-2337   
KL.SSC	= 000200  G	#54-2340   
KL.VBD	= 000020  G	#54-2336   
KL.VBN	= 000010  G	#54-2335   
KPAL0 	  001372 RG	#11-703     89-4690    177-9862   183-10073  183-10102 
KPAL1 	  001402 RG	#11-707     177-9864  *183-10107 
KPAR0 	= 172360	#47-2051   
KPAR1 	= 172362	#47-2052   
KPAR2 	= 172364	#47-2053   
KPAR3 	= 172366	#47-2054   
KPAR4 	= 172370	#47-2055   
KPAR5 	= 172372	#47-2056   
KPAR6 	= 172374	#47-2057   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

KPAR7 	= 172376	#47-2058   
KPDR0 	= 172300	#47-2060   
KPDR1 	= 172302	#47-2061   
KPDR2 	= 172304	#47-2062   
KPDR3 	= 172306	#47-2063   
KPDR4 	= 172310	#47-2064   
KPDR5 	= 172312	#47-2065   
KPDR6 	= 172314	#47-2066   
KPDR7 	= 172316	#47-2067   
KS.CES	= 000002  G	#54-2352    245-13551 
KS.CST	= 000020  G	#54-2355    183-10094 
KS.DEX	= 000010  G	#54-2354    245-13555 
KS.EPE	= 000004  G	#54-2353    245-13576 
KS.PFT	= 000100  G	#54-2357    83-4258   
KS.PTO	= 000200  G	#54-2358    80-3954   
KS.TRR	= 000040  G	#54-2356    173-9482  
KS.TSP	= 000001  G	#54-2351    245-13604 
KT11  	= ******	 65-2727    65-2730    65-2823    65-2903    65-2906    65-2915    65-2919    73-3272    73-3311   
                         73-3352    75-3495    78-3746    79-3806    128-6800   141-7717   145-7988   250-13816  250-13821 
                         251-13966  251-13979  251-13982  251-14000  251-14010 
K.LBPW	= 000005  G	#59-2517   
K.LCKL	= 177777  G	#59-2501   
K.LCON	= 000004  G	#59-2511   
K.LDCM	= 000001  G	#59-2508   
K.LDRP	= 177777  G	#59-2509   
K.LDSC	= 000003  G	#59-2507   
K.LLTO	= 000006  G	#59-2519   
K.LRAC	= 000001  G	#59-2504   
K.LRBA	= 000007  G	#59-2521   
K.LRMN	= 000003  G	#59-2514   
K.LRNG	= 000002  G	#59-2503   
K.LROP	= 000001  G	#59-2512   
K.LRPR	= 000002  G	#59-2513   
K.LRRJ	= 177777  G	#59-2505   
K.LSCK	= 000001  G	#59-2499   
K.LSKL	= 000001  G	#59-2500   
K.LUND	= 000000  G	#59-2497   
K.LUSR	= 177777  G	#59-2515   
LDLPR 	  026502 RG	 151-8290  #161-8718  
LDLPV 	  026502 RG	 151-8291  #161-8719  
LFBT  	= 004000	#176-9735   186-10184  196-10558  197-10625  197-10630 
LFCT  	= 074000	#176-9734   187-10198  195-10495  203-11189 
LINCHR	  026706 RG	 151-8270  #164-8862  
LKS   	= 177546  G	#47-2035    83-4268    83-4270    84-4328   
LOAD11	= 000004	#5-255      41-1774   #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   173-9471  #176-9710  
                        #219-12193 
LOWCOD	= 000000 RG	#6-311      6-312      6-330      6-330      6-330      6-330      6-337      6-337      6-343     
                         6-343      6-349      6-349      6-349      6-349      6-349      6-349      6-349      6-349     
                         6-349      6-349      6-349      6-349      6-349      6-349      6-349      6-354      6-359     
                         6-359      6-365      6-365      6-365      6-365      6-369      6-377      6-378      6-383     
                         6-384      6-390      6-390      6-390      6-390      6-390      6-390      6-390      6-390     
                         6-395      6-395      6-395      6-395      6-395      6-395      6-395      6-395      6-395     
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         6-395      6-395      6-395      6-395      6-395      6-395      6-395      6-395      6-395     
                         6-395      6-395      6-395      6-395      6-395      6-395      6-395      6-395      6-395     
                         6-395      6-395      6-395      6-395      6-395     
LPCEVF	  005564 RG	 32-1090   #32-1092   
LPCSA 	= 000002  G	#32-1129   #32-1129   
LPCSM 	= 000022  G	#32-1140   
LPEVFG	  005562 RG	#32-1089   
LPEXPA	= 175400  G	#32-1080    32-1129    32-1129   
LPEXPZ	= 000020  G	#32-1081    32-1104   
LPHD  	= ******  GX	 33-1273    34-1312    35-1375   
LPHUNG	  005566 RG	#32-1095   
LPITH 	= 000006  G	#32-1129   #32-1129   
LPMCB 	= 000020  G	#32-1139   
LPRMA 	= 000040  G	#32-1150   
LPRMC 	= 000044  G	#32-1152   
LPRMZ 	= 000042  G	#32-1151   
LPRTY 	= 000024  G	#32-1141   
LPSIZE	= 000010  G	#32-1130    32-1135    32-1146    32-1161    32-1161   
LPSTBH	  005572 RG	#32-1101   
LPSTBK	  005574 RG	#32-1103    32-1106   
LPSTK 	= ******  GX	 34-1312   
LPSTLN	= 000030  G	#32-1106   
LPSTS 	= 000000  G	#32-1129   #32-1129   
LPTBL 	  005624 RG	#32-1112    32-1130    32-1139    32-1140    32-1141    32-1150    32-1151    32-1152    32-1161   
                         32-1161    36-1434   
LPTBL2	  005644 RG	#32-1134    32-1139    32-1140    32-1141   
LPTBL3	  005664 RG	#32-1145    32-1150    32-1151    32-1152   
LPTHD 	= 000004  G	#32-1129   #32-1129   
LPTPD 	  007226 RG	 33-1273   #35-1374   
LPTSK 	  006626 RG	 34-1305   #34-1311    34-1318    37-1548   
LPUNIT	  005560 RG	#32-1086   
LPUTBL	  005704 RG	#32-1156   
LP0PUD	  010476 RG	#37-1547    37-1548   
L$$P20	= 000002	#1-39       32-1114    32-1130    32-1135    32-1146    32-1158   
L.DT0 	= 000003  G	#37-1521   
L.DX0 	= 000005  G	#37-1534   
L.DX1 	= 000006  G	#37-1539   
L.RP4 	= 000002  G	#37-1468   
L.TTY 	= 000001  G	#37-1464   
MACY11	= ******	 46-2020    79-3882    81-4172    103-5210   105-5353   107-5457   109-5571   118-6051   120-6188  
                         122-6286   125-6433   127-6514   129-6891   136-7423   138-7514   140-7607   142-7768   144-7893  
                         146-8035   149-8175   176-9707  
MBUFR 	= 000014	#176-9727  *203-11138 *203-11194  203-11198 
MEBUF 	= 000012	#176-9726   196-10566 *196-10567 *203-11200 
MECNT 	= 000010	#176-9724   195-10497 *196-10568 *203-11201 
MODE  	= 100000	#176-9733   186-10177  187-10199 
MPE11 	= 001000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   170-9184  #176-9710  #219-12193 
NODADR	  005126 RG	#30-1001   
NOSNDA	  025140 RG	 151-8292  #152-8329  
NTKXEN	  012154 R	#64-2624   
NTKXEP	  012160 R	 63-2622    63-2622   #64-2625    64-2640    64-2648    64-2651   
NTKXSP	  012134 RG	 34-1348    63-2622   #63-2622   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

NULHD 	  011654 RG	 34-1348   #63-2622   
NULSTP	= 000040	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
NULTSK	  007066 RG	 34-1294    34-1345   #34-1347   
NUPE  	= 000002	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
N.BP  	= 000002  G	#47-2150    230-12647 
N.FP  	= 000000  G	#47-2149   
N.OVPT	= 000054  G	#47-2089   
N.PR  	= 000010  G	#47-2151    230-12645  230-12645 
OKPAL0	  001400 RG	#11-705    *89-4690    183-10073 *183-10102 
OUTPT 	  034620 R	 187-10209  187-10209  195-10467 #195-10490  197-10609  203-11202 
OUTPT3	  034540 R	 188-10252  188-10252  192-10402 #195-10464 
PARLOA	  017664 R	#84-4316    84-4319   
PARLOT	  017736 R	 84-4312   #84-4336   
PARSAV	  001022 RG	#7-444      40-1728    41-1759   
PATSIZ	= 000040  G	#5-245      43-1873   
PERCLR	= 001000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PHYS  	= 100000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PIDENT	= 000000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
POLMIN	= 001400  G	#5-246     
PRB0  	= 177566  G	 41-1785   #47-2039   
PRB1  	= 175616  G	 41-1783   #47-2043   
PRI7  	= 000340  G	#5-255     #46-2028   #47-2048    65-2936   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  
                        #219-12193 
PRMBLK	  023016 R	 128-6811  #128-6841  
PRMEMN	  001230 RG	#9-575     *89-4606    89-4673   
PROPNT	= 000021	#5-255     #46-2028   #79-3885   #81-4174   #85-4394    89-4663   #149-8178  #176-9710  #219-12193 
PROTBL	  001234 RG	#9-603      89-4627    100-5115  
PRS0  	= 177564  G	 41-1787   #47-2038   
PRS1  	= 175614  G	 41-1791   #47-2042   
PRTOFF	= 004000	#5-255     #46-2028   #79-3885    80-3961    80-3975    80-4002    80-4013    80-4019    80-4038   
                         80-4061    80-4111   #81-4174   #85-4394    97-5017    98-5054   #149-8178  #176-9710  #219-12193 
PRVCM 	  021072 R	#97-5019    98-5055   
PR0   	= 000000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PR1   	= 000040	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PR2   	= 000100	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PR3   	= 000140	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PR4   	= 000200	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PR5   	= 000240	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PR6   	= 000300	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PR7   	= 000340  G	#5-255     #46-2028   #47-2047   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PS    	= 177776  G	#5-255      39-1615    40-1657   #46-2028   #47-2034    64-2624    64-2633    64-2633    64-2638   
                         64-2646    73-3266    73-3349    75-3441    79-3801    79-3801   #79-3885    80-3926    80-3929   
                         80-3929    80-3956    80-3988    80-3990    80-3990    80-4057    80-4059    80-4059   #81-4174   
                        #85-4394   #149-8178   151-8245   151-8245   151-8248   151-8250   151-8250   151-8255   152-8334  
                         152-8334   153-8359   153-8359   153-8361   153-8380   153-8380   153-8388   153-8388   154-8473  
                         154-8473   154-8475   154-8481   154-8481   155-8512   155-8512   155-8522   155-8522   155-8535  
                         158-8628   158-8628   158-8633   165-8914   165-8914   165-8922   167-8956   167-8956   167-8964  
                         168-9018   168-9018   168-9078   168-9081  #176-9710   179-9921   179-9921   179-9925   180-9952  
                         180-9952   180-9966   184-10120  184-10120  184-10134  187-10208  187-10208  187-10211  188-10222 
                         192-10394  199-10784  200-10895  209-11520 #219-12193  225-12451  225-12451  229-12610  229-12610 
                         229-12614  230-12641  230-12641  231-12673  231-12673  231-12678  232-12712  232-12712  232-12717 
                         233-12765  235-12855  235-12855  235-12873  236-12924  236-12924  236-12950  238-13023  238-13023 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         238-13049  239-13136  239-13136  239-13147  242-13307  242-13307  242-13320  243-13409  243-13409 
                         243-13418  253-14130  253-14130 
PSWW1 	= 000005	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710   177-9862   177-9864  
                        #219-12193 
PSWW10	= 000014	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW11	= 000015	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW12	= 000016	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW13	= 000017	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW2 	= 000006	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW3 	= 000007	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW4 	= 000010	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW5 	= 000011	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW6 	= 000012	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PSWW7 	= 000013	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PULSE 	= 000020	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
PWRXSP	  001032 RG	#7-457     *82-4223    83-4235   
PWR.UP	  017322 RG	 82-4224   #83-4234    83-4236   
QNDSV 	  023010 R	*128-6783  *128-6809  *128-6810  #128-6839   128-6841  
QPRDTC	  024710 RG	#151-8241   151-8257  
QPRDTE	  024714 RG	 151-8239   151-8239  #151-8243  
QPRDTF	  027102 R	#165-8925   168-8977  
QPRDTL	  024750 R	#151-8249   161-8738   165-8926  
QPROAD	  017174 R	*80-4056    80-4122   #80-4123   
QPROMS	  017152 R	 80-4058   #80-4121   
QPRTPD	  007266 RG	 33-1285   #35-1383   
QPRTSK	  007026 RG	 34-1339   #34-1344    34-1348   
QSIZE 	= 000023	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   171-9273   171-9283   173-9496  
                         173-9556   174-9597   174-9605  #176-9710  #219-12193 
Q.AK  	= 000012  G	#57-2463    153-8398   153-8398  
Q.DA  	= 000000  G	#57-2458    163-8813   166-8939  
Q.DZ  	= 000016  G	#57-2465    163-8817   168-9029   168-9055  *214-11965 *214-11967 *214-11968  215-11996 
Q.D1  	= 000006  G	#56-2452    132-7152  
Q.IOAE	= 000012	#80-4122   
Q.IOEF	= 000006	#80-4122   
Q.IOFN	= 000002	#80-4122   
Q.IOLU	= 000004	#80-4122   
Q.IOPL	= 000014	#80-4122   
Q.IOPR	= 000007	#80-4122   
Q.IOSB	= 000010	#80-4122   
Q.SI  	= 000004  G	#56-2451   *132-7160   135-7345   135-7355  
Q.SP  	= 000006  G	#57-2461    166-8937   166-8937  
Q.ST  	= 000004  G	#57-2460    161-8736   161-8736   164-8890   164-8890  
Q.SZ  	= 000020  G	#36-1416    36-1447   #57-2466   
Q.TS  	= 000002  G	#57-2459    163-8812  
RAMIS0	= 010000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
RCVKLP	  027144 RG	 151-8293  #167-8952  
RESERV	  011240 R	 40-1700   #40-1719   
RETTOD	  027032 RG	 151-8276  #165-8908  
RFMAD0	= 100000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
RFMAD1	= 040000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
RFMAD2	= 020000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
RFMAD3	= 010000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RF.XR 	= 000002  G	#61-2571   
RM    	= 000010	#5-255     #46-2028   #79-3885    80-3943   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
RMBYT 	= 000004	#176-9721  *186-10179 *203-11113 *203-11131 *203-11149 
RPBUF 	  005104 RG	#29-985    
RPCNT 	  005110 RG	#29-987    
RPCW2 	  005114 RG	#29-991    
RPHD  	= ******  GX	 33-1263    34-1305    35-1398   
RPPEN 	  007656 RG	#37-1479    37-1480   
RPRNA 	  005102 RG	#29-983    
RPRTC 	  005100 RG	#29-981    
RPSTK 	= ******  GX	 34-1305   
RPTPD 	  007326 RG	 33-1263   #35-1397   
RPTSK 	  006566 RG	 34-1301   #34-1304    34-1312    37-1480    37-1486    37-1491    37-1496    37-1501    37-1506   
                         37-1511    37-1516   
RPUNIT	  005112 RG	#29-989    
RQKLD 	  032472 R	#177-9869   179-9937  
RQKLR 	  032454 R	#177-9867   179-9933  
RQMCR 	  032436 R	#177-9865   179-9929  
RQSPB 	  023704 R	 141-7679   141-7700   141-7728  #141-7730  
RQSPT 	  023700 RG	 141-7721  #141-7728  
RQSTD 	  023716 R	*141-7698   141-7708  #141-7731  
RSX$$E	= 000041	#3-100      4-188      7-462     
RSX$$F	= 000105	#3-108     #3-113      3-119      4-188      4-188      7-462      44-1878    44-1878    218-12123 
                         218-12123 
RSX$$K	= 000126	#3-104      7-462     
RSX$$V	= 000013	#3-99       4-188      7-462     
RTDVST	  026502 RG	 151-8271  #161-8721  
RTNTOD	  026422 RG	 151-8275  #160-8686  
RUBP  	= 000020	#176-9740   187-10198  203-11118  203-11120  203-11132  203-11134  203-11148 
R$$11D	= 000001	#1-48      
R.AS  	= 000020  G	#61-2558    224-12389 
R.AT  	= 000006  G	#61-2551    224-12386  224-12392  225-12486  225-12501  252-14055 
R.DP  	= 000011  G	#61-2553   
R.FC  	= 000014  G	#61-2556    128-6784  *128-6794  *128-6797   128-6810   184-10147  184-10150  225-12465 *225-12475 
                         225-12476  252-14068 *252-14088 
R.FN  	= 000013  G	#61-2555    224-12384 
R.LU  	= 000012  G	#61-2554    252-14056 
R.PB  	= 000024  G	#61-2560    185-10162  187-10200  187-10202 *197-10705 *225-12472 *225-12473 *225-12474 *225-12485 
                         225-12492  225-12493  252-14076  252-14077  252-14078 *252-14086 *252-14087 
R.PR  	= 000010  G	#61-2552   
R.QSGC	= 000015	#64-2666   #64-2669   #160-8705  #177-9866  #177-9868  #177-9870  
R.QSPC	= 000014	#64-2666   #64-2669   #160-8705  #177-9866  #177-9868  #177-9870  
R.QSPN	= 000006	#64-2666   #64-2669   #160-8705  #177-9866  #177-9868  #177-9870  
R.QSPR	= 000012	#64-2666   #64-2669   #160-8705  #177-9866  #177-9868  #177-9870  
R.QSTN	= 000002	#64-2666   #64-2669   #160-8705  #177-9866  #177-9868  #177-9870  
R.SB  	= 000016  G	#61-2557    224-12379 *225-12488 
R.TD  	= 000004  G	#61-2550    225-12463 
R.UI  	= 000022  G	#61-2559   
SCD   	= 000040	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
SETDNE	  030412 R	 171-9288  #172-9307  
SETLIN	  025426 RG	 151-8285  #154-8408  
SETSPD	  025442 RG	 151-8284  #154-8416  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

SEXCM 	  021564 R	#111-5671   112-5735  
SEXP0 	  021572 R	 110-5622  #111-5674  
SEXP1 	  021652 R	 112-5734  #114-5824  
SEXP2 	  021554 R	#110-5624   111-5672   113-5782  
SEX97 	  021654 R	 110-5620   111-5670   113-5780  #114-5826   115-5868   115-5870   116-5963  
SF.EX 	= 000004  G	#50-2231    72-3193    141-7704  
SF.FX 	= 000002  G	 33-1231    33-1235    33-1245    33-1263    33-1268    33-1273    33-1278    33-1282    33-1285   
                        #50-2230    72-3177    76-3561   
SF.IR 	= 040000  G	#50-2232    141-7704  
SF.PT 	= 000001  G	#50-2229   
SF.ST 	= 100000  G	 33-1231    33-1235    33-1245    33-1251    33-1263    33-1268    33-1273    33-1278    33-1282   
                         33-1285   #50-2233   
SF.TA 	= 000001  G	 33-1231    33-1235    33-1245    33-1263    33-1273    33-1278    33-1282    33-1285   #50-2228   
                         72-3175    72-3228    76-3541    76-3579    76-3639    124-6377   141-7704  
SKX   	  023046 R	 131-7026  #131-7029  
SNDALL	  027222 RG	 151-8278  #168-8975  
SNDMSG	  012447 R	*64-2632    64-2656   *64-2662   #64-2680   
SPDTB 	  032540 R	#178-9905   199-10835 
SPDTBL	  026172 R	 156-8541  #156-8556   156-8572  
SPDTBZ	= 000016	 156-8542  #156-8572  
SPSAV 	  001020 RG	#7-441     *41-1748   
STAT  	= 174434	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
STATD 	= 000034	#3-126     *89-4657    245-13539  245-13564 
STATI 	  001336 RG	#10-669    *173-9457  *173-9458  *173-9459   173-9460   173-9469   173-9471   173-9473   173-9489  
                         173-9518   173-9538   173-9542  
STATS 	= 000000	#176-9719  
STATUS	= 000022	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   171-9283   172-9299   173-9452  
                         173-9496   173-9551   174-9605  #176-9710  #219-12193 
STCM  	  044142 R	#240-13240  241-13271 
STDCDR	  006322 RG	 33-1179   #33-1277    34-1318   
STDDTE	  005762 RG	 33-1181   #33-1230    34-1298   
STDDX 	  006062 RG	 33-1189   #33-1244    34-1339   
STDFED	  006022 RG	 33-1186   #33-1234    34-1332   
STDF11	  006122 RG	 33-1192   #33-1249   
STDINS	  006222 RG	 33-1203   #33-1267    141-7720  
STDLPT	  006262 RG	 33-1195   #33-1272    34-1312   
STDQPR	  006422 RG	 33-1197   #33-1284    34-1345   
STDRPT	  006162 RG	 33-1199   #33-1262    34-1305   
STDTTY	  006362 RG	 33-1201   #33-1281    34-1301   
STDVST	  026502 RG	 151-8272  #161-8720  
STEIF 	  030552 R	#172-9354  
STLN  	  044176 R	 240-13236  240-13236  241-13269  241-13269 #241-13273 
STNTQ 	  031710 RG	 171-9257   171-9257  #174-9578   243-13414  243-13414  244-13459  244-13459 
STNXT 	  034212 R	 189-10289  189-10300  189-10309 #190-10335 
STOPDL	  026054 R	 155-8504  #155-8517  
STPLIN	  025736 RG	 151-8288  #155-8491  
STQUE 	  030572 R	#172-9359   173-9568  
STRBF 	= 000002	#176-9720  *186-10180  203-11127  203-11150 
STRDAT	  026502 RG	 151-8269  #161-8722  
STSTT 	  001320 RG	#10-655     10-658     10-659    *171-9246  *171-9278   171-9280   171-9281   171-9282  *172-9297  
                         172-9302   172-9303   172-9304  *173-9534  *173-9540   173-9548   173-9549   173-9550   174-9602  
                         174-9603   174-9604  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

STSWD 	  005134 RG	#30-1007   
STSW0 	= 000004  G	 155-8505  *155-8514  *155-8527  *155-8532  #176-9748   200-10904  208-11436 *208-11451 *208-11476 
                        *208-11477  209-11567 *210-11609 *210-11614 *212-11691 *213-11787  213-11790  214-11913 *217-12108 
STSW1 	= 000006  G	*152-8335  *152-8338   153-8353   153-8382  *154-8458  *154-8479   155-8494   168-9042   168-9061  
                         168-9063   168-9068  *168-9127  #176-9753   184-10124  184-10128  188-10227 *188-10238  188-10239 
                         189-10278 *189-10280  189-10281 *189-10282  190-10336  190-10343 *190-10348  190-10354  192-10396 
                        *192-10398  192-10399  192-10406 *193-10438  194-10445  195-10471  195-10479 *197-10663  199-10815 
                        *199-10833 *199-10849  199-10856 *199-10858  199-10861  201-10948  201-10951  201-10962  202-11013 
                        *202-11036  205-11281  205-11283  205-11285 *205-11315  206-11343  206-11345  206-11348 *206-11392 
                        *206-11394 *209-11566  209-11569 *209-11571 *209-11583  211-11646  212-11675 *212-11695  213-11765 
                         213-11767 *213-11769  214-11910 *214-11916  214-11921  215-12005  215-12007  215-12010 *215-12014 
                        *217-12106 *217-12111  238-13031  238-13066  238-13075  238-13082 *238-13099  239-13137  239-13165 
                         239-13167  239-13169  239-13193 *239-13197 
STTOIP	  030342 R	#172-9298   173-9535  
STTYDN	  034052 R	 188-10242  188-10242 #189-10277  195-10536 
STTYO 	  034406 R	 192-10400 #192-10403  195-10529  195-10529  195-10539 
STXAS 	= 000000  G	#47-2096    65-2945   
STXCS 	= 000000  G	#47-2097   
STXDX 	= 000000  G	 6-324     #47-2098   
SWFED 	  045350 RG	 89-4600    89-4600    89-4611    89-4611    89-4624    89-4624    89-4664    89-4664    89-4671   
                         89-4671    90-4732    90-4732    97-5019    97-5019   #246-13676 
SWR   	= 177570	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
SWSLLT	= 100000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
SY0PUD	  010616 RG	#37-1556   
S.BA  	= 000012  G	#50-2211    76-3574    225-12478 
S.DI  	= 000011  G	#50-2210    76-3622   
S.DL  	= 000032  G	#50-2219    76-3607    76-3608    225-12472  225-12474 
S.DP  	= 000010  G	#50-2209    76-3551    141-7705  
S.FW  	= 000006  G	#50-2208   *72-3175    72-3177    72-3193   *72-3228    76-3541    76-3561   *76-3579   *76-3639   
                         124-6377   143-7835  
S.LZ  	= 000014  G	#50-2212    76-3605   
S.PC  	= 000020  G	#50-2214    76-3566   
S.RB  	= 000026  G	#50-2217    132-7162  
S.RF  	= 000024  G	#50-2216    135-7313   141-7705  
S.SP  	= 000022  G	#50-2215    76-3564    76-3571   
S.SS  	= 000030  G	 40-1671   #50-2218    65-2711    65-2879   *71-3162   *137-7477  
S.SZ  	= 000036  G	#50-2222   
S.TD  	= 000004  G	#50-2207    76-3548   
S.TN  	= 000000  G	#50-2205    135-7360   135-7361   143-7845   143-7846  
S.TZ  	= 000016  G	#50-2213    77-3696   
S0.ABR	= 100000  G	#176-9757   176-9761   208-11451 
S0.CON	= 040000  G	#176-9758   176-9761   209-11567  210-11609  210-11614 
S0.ISP	= 001700  G	 155-8510  #176-9759   176-9762   199-10866 
S0.MSK	= 140000  G	 155-8510  #176-9761   208-11474  208-11476  214-11914  217-12108 
S0.OSP	= 036000  G	#176-9760   176-9762  
S0.SPD	= 037700  G	#176-9762  
TBIT  	= 000020  G	#47-2094   
TENAD1	= 174410	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TENAD2	= 174412	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TF.OU 	= 000002  G	 35-1359    35-1363    35-1367    35-1371    35-1375    35-1380    35-1384    35-1393    35-1398   
                        #48-2173    72-3184    72-3214    76-3583    76-3611    76-3620   
THRED 	= 000000  G	#176-9746  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 20

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TMOCNT	  002660 RG	#15-837    *180-9953  *180-9955  *180-9961  *180-9963  
TNAD1 	= 000010	#3-132     *80-3933   *80-3961   *80-3975   *80-4002   *80-4013   *80-4019   *80-4038   *80-4061   
                        *80-4111   *96-4980   *171-9275  *172-9301  *173-9451  *173-9547  *173-9558  *174-9598   245-13646 
                        *246-13679 *246-13691 
TNAD2 	= 000012	#3-133     *80-3934   *80-3962   *80-3976   *80-4003   *80-4014   *80-4020   *80-4039   *80-4062   
                        *80-4112   *96-4981   *171-9276  *171-9283  *172-9305  *173-9454  *173-9496  *173-9553  *173-9559  
                        *174-9599  *174-9605  *246-13680 *246-13692 
TN.EMT	= 000012  G	#56-2445    65-2716   
TN.LRF	= 000040  G	#56-2447    70-3125   
TN.TRP	= 000014  G	#56-2446    65-2883   
TOBM  	= 000004	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   171-9246   171-9278   173-9518  
                        #176-9710  #219-12193 
TOD   	= 000003	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TOELDN	  030416 R	 170-9188  #172-9310  
TOIP  	= 000002	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   171-9246   171-9278   173-9489  
                        #176-9710  #219-12193 
TOIT  	= 000001	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   172-9297   173-9534   173-9540  
                        #176-9710  #219-12193 
TOITDN	  030334 R	#172-9296   172-9358   172-9437  
TOTNDN	  030000 R	 170-9185  #171-9225  
TO10  	= 000200	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO10AD	= 174420	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO10AS	  001316 RG	#10-651     171-9232  *171-9237  *171-9269  *174-9593  
TO10BC	= 174414	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO10BM	= 000001	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO10DB	= 000400	#5-255      41-1777   #46-2028   #79-3885    80-3979    80-4023    80-4065    80-4115   #81-4174   
                         84-4330   #85-4394   #149-8178   171-9287   174-9607  #176-9710  #219-12193 
TO10DN	= 100000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   170-9184  #176-9710  #219-12193 
TO10DT	= 174424	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO10ER	= 020000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   170-9184  #176-9710  #219-12193 
TO10PK	  005140 RG	#30-1009   
TO10Q 	  001326 RG	#10-661     80-4079    80-4080    171-9240   171-9254   171-9255   243-13410  243-13416  244-13456 
                         244-13465 
TO10QC	= 001324 RG	#10-658    *80-4093    173-9538  *173-9541   173-9542  
TO10SZ	  001314 RG	#10-649     171-9231  *171-9270  *174-9587  
TO11  	= 000100	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO11AD	= 174422	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO11AS	  001310 RG	#10-645     172-9324  *172-9366  *172-9408  *173-9527  
TO11BC	= 174416	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO11BM	= 020000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   172-9320   172-9369   172-9410  
                         173-9521  #176-9710  #219-12193 
TO11BS	  001312 RG	#10-647     172-9317   172-9320  *172-9372  *172-9423  *173-9528  
TO11DB	= 004000	#5-255     #46-2028   #79-3885    80-3947    80-3991   #81-4174   #85-4394   #149-8178   170-9191  
                        #176-9710  #219-12193 
TO11DN	= 000200	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   170-9186  #176-9710  #219-12193 
TO11DT	= 174426	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
TO11DV	  001276 RG	#10-634    *172-9380   172-9382   172-9404   173-9512  
TO11ER	= 000002	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178   170-9186  #176-9710  #219-12193 
TO11FN	  001274 RG	#10-632    *172-9332   172-9337   172-9386   172-9388   172-9402  *172-9428   172-9435  *172-9440  
                         173-9491   173-9510  *173-9530  
TO11FW	  001302 RG	#10-638     172-9405   173-9513  
TO11GW	  001304 RG	#10-641    
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 21

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TO11HD	  001272 RG	#10-630     172-9366   172-9368  *172-9379   172-9392   172-9403   172-9411   173-9511  
TO11NP	  001270 RG	#10-628     172-9340  *172-9399  *173-9507  
TO11Q 	  001334 RG	#10-667     151-8251  *151-8253   172-9341  
TO11QC	= 001325 RG	#10-659    *174-9601  
TO11QP	  001306 RG	#10-643    *172-9342  *172-9345  
TO11SP	  001300 RG	#10-636    
TRPASV	  001120 RG	#7-475     *40-1657   *40-1658    40-1673    40-1681    40-1694   *65-2716   *65-2883   
TRPXIT	  011142 R	#40-1688    40-1716   
TRP4  	  011170 R	 40-1699   #40-1704   
TS.EXT	= 000026  G	#68-3078    126-6474  
TS.LRF	= 000006  G	#68-3060   
TS.LRQ	= 000002  G	#68-3056    76-3616    76-3635   
TS.RUN	= 000010  G	 34-1298    34-1301    34-1305    34-1312    34-1318    34-1332    34-1339    34-1345    34-1348   
                        #68-3062    69-3119    71-3139    76-3568    124-6390   131-7092  
TS.SUS	= 000012  G	#68-3064    123-6326   124-6387   131-7090  
TS.TKN	= 000004  G	 40-1682   #68-3058    70-3126   
TS.WF0	= 000014  G	#68-3066    115-5884   116-5976  
TS.WF1	= 000016  G	#68-3070   
TS.WF2	= 000020  G	#68-3072   
TS.WF3	= 000022  G	#68-3074   
TS.WF4	= 000024  G	#68-3076    116-5965  
TTACK 	  034470 RG	 190-10353  192-10397  192-10405  192-10413 #194-10444 
TTCNT 	= 000205  G	#26-941     36-1420    36-1431   
TTCTY 	  036462 R	 201-10992 #203-11060 
TTINI 	  032550 RG	 177-9845   177-9845  #179-9919   187-10213 
TTINO 	  033730 R	 184-10118 #187-10212 
TTINPA	  036026 R	#200-10899  202-11052 
TTINPB	  036204 R	 199-10827  199-10841  199-10857  200-10903  200-10905  201-10946  201-10952  201-10956 #201-10972 
                         201-10988 
TTINX 	  033724 R	 184-10125  184-10129  184-10132 #187-10210 
TTLGE 	  027654 R	#169-9166  
TTOUTR	  034466 R	 190-10355  192-10407 #193-10439 
TTOUTX	  034460 R	 191-10385 #193-10437  197-10685 
TTPEN 	  007606 RG	#37-1465    37-1466    63-2622    80-3910    151-8239   177-9845   187-10194 
TTPKT 	  002730 RG	#16-854     184-10117 *184-10141  185-10160 *185-10167  197-10703 
TTSAV 	  037156 R	 192-10395  200-10896 #204-11233  209-11521 
TTSTCH	  036052 R	 199-10850  199-10863  199-10870 #201-10942 
TTTBL 	  002776 RG	#18-894     26-941     36-1420    36-1431    159-8660   204-11245 
TTUNT 	  027660 R	*168-9077  #169-9169  
TTWLO 	  032406 R	#177-9859   179-9920  
TTYDNE	  034726 R	#195-10520  197-10707 
TTYDNX	  034772 R	 195-10524 #195-10532 
TTYEND	= 005046 RG	#26-942    
TTYEXP	= 000002  G	 154-8455   155-8523   168-9040   168-9073  #176-9747   188-10234  195-10528  197-10659  197-10667 
                         199-10789  204-11247  205-11296  206-11359  208-11471  212-11677  213-11730  213-11743 *213-11781 
                         214-11872  215-12003  238-13055  238-13088  239-13179 
TTYHD 	  032072 RG	 33-1282    34-1301    35-1371   #177-9844  
TTYSP 	  032352 RG	 34-1301    177-9845  #177-9845  
TTYTPD	  007206 RG	 33-1282   #35-1370   
TTYTSK	  006526 RG	 13-761     13-766     34-1298   #34-1300    34-1305    37-1466   *195-10521 *201-10986 *202-11027 
                        *208-11455 *212-11683 
TT.ABL	= 000040  G	 153-8382   154-8479  #176-9785   209-11569  215-12010 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 22

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TT.ABW	= 000010  G	 168-9061  #176-9787   199-10815  199-10833  209-11571  212-11695  217-12106  238-13066 
TT.CRW	= 000004  G	#176-9788   201-10951  202-11036  209-11566  209-11583  212-11695  213-11765  215-12005 
TT.CTY	= 000002  G	 18-896     153-8353   155-8494   168-9063  #176-9789   188-10239  192-10399  194-10445  201-10948 
                         205-11285  206-11348  238-13031  238-13082  239-13137  239-13169  239-13193 
TT.FEC	= 014000  G	#176-9773   199-10849  199-10862  217-12111 
TT.FEI	= 004000  G	#176-9775   199-10858 
TT.NSA	= 000400  G	 152-8330   168-9042   168-9061  #176-9778   190-10343  212-11695  217-12106 
TT.OUT	= 000001  G	 168-9068  #176-9790   184-10124  184-10128  188-10227  188-10238  192-10396  192-10398  193-10438 
                         195-10471  195-10479  197-10663  206-11345  206-11392  217-12106  238-13075  239-13165  239-13197 
TT.RIP	= 002000  G	#176-9776   202-11036  209-11566  209-11583  212-11695  213-11767  213-11769  215-12007  215-12014 
TT.RMT	= 000100  G	 18-898     18-899     18-900     18-901     154-8458  #176-9784   202-11013  211-11646  212-11675 
                         214-11921 
TT.RSI	= 020000  G	#176-9772   199-10856  214-11910  214-11916 
TT.SIP	= 001000  G	#176-9777   189-10278  189-10280  190-10348  205-11283  206-11345  217-12106  238-13099  239-13167 
TT.SND	= 140000  G	#176-9768   217-12106 
TT.SNI	= 040000  G	 168-9127  #176-9769   189-10282 
TT.XEN	= 000020  G	 152-8322  #176-9786   201-10962  217-12111 
TT.XOF	= 000200  G	#176-9782   205-11315  206-11394  217-12111  238-13075 
T.BA  	= 000004  G	#48-2161   
T.FW  	= 000010  G	#48-2163   *72-3184    72-3214    76-3583    76-3611   *76-3620   
T.HBCT	= 000002  G	#176-9795  *216-12055  236-12909 
T.HCAD	= 000004  G	*169-9162  *169-9163  #176-9796   189-10304 *189-10305  191-10378  193-10434 *193-10435 *206-11374 
                         206-11375  206-11380 
T.HCBC	= 000006  G	#176-9797   189-10303 *189-10308  191-10379 *192-10408  206-11372 *206-11377 *239-13186 
T.HFCN	= 000007  G	#176-9798  *238-13060 
T.HHDS	= 000010  G	 164-8871   164-8881   169-9163  #176-9799  
T.HP  	= 000012  G	#48-2164   
T.HRED	= 000000  G	#176-9794  
T.PN  	= 000000  G	#48-2159    143-7843   143-7844   145-7953   145-7954  
T.PZ  	= 000006  G	#48-2162    77-3698    143-7832  
T.RAPB	= 000004  G	#60-2528   
T.RAPE	= 000012  G	#60-2531    65-2713   
T.RAPF	= 000016  G	#60-2533   
T.RAPI	= 000006  G	#60-2529   
T.RAPM	= 000002  G	#60-2527   
T.RAPR	= 000010  G	#60-2530   
T.RAPT	= 000014  G	#60-2532    65-2881   
T.RAP4	= 000000  G	#60-2526   
T.RB  	= 000016  G	#48-2166   
T.RF  	= 000014  G	#48-2165    72-3217    76-3645   
T.SZ  	= 000020  G	#48-2168    77-3691    145-7962  
T10AD 	= 000020	#3-130      171-9233  *171-9272  *174-9590  
T11AD 	= 000022	#3-129      172-9325   172-9327  *172-9368  *172-9406  *173-9524  
T11BC 	= 000016	#3-131     *172-9370  *172-9421  *173-9525  
U     	= 000040	#6-386     #6-391      6-393     
UC.CCL	= 000002  G	 37-1466    37-1548   #55-2411   
UC.COM	= 020000  G	#55-2422   
UC.DIR	= 000010  G	#55-2413   
UC.ETB	= 000100  G	#55-2416   
UC.F11	= 040000  G	#55-2423   
UC.INB	= 000400  G	#55-2417   
UC.ISP	= 002000  G	#55-2419   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 23

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

UC.MNT	= 100000  G	#55-2424   
UC.PSE	= 010000  G	#55-2421   
UC.REC	= 000001  G	 37-1466    37-1548   #55-2410   
UC.SDI	= 000020  G	#55-2414   
UC.SQD	= 000040  G	#55-2415   
UC.SWL	= 001000  G	#55-2418   
UC.TTY	= 000004  G	 37-1466   #55-2412   
UC.0SP	= 004000  G	#55-2420   
UF.OFL	= 000040  G	#55-2406   
UF.RD 	= 000040  G	#55-2403   
UF.RH 	= 000200  G	 37-1553   #55-2404   
UF.TL 	= 000100  G	#55-2405   
UNASG1	= 000032	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
UNASG2	= 000033	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
UNASG3	= 000034	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
UNASG4	= 000035	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
UNASG5	= 000036	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
UNASG6	= 000037	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
UNRGFN	  025114 RG	 151-8262   151-8268   151-8274   151-8286  #151-8302  
UPAR0 	= 177640	#47-2069   
UPAR1 	= 177642	#47-2070   
UPAR2 	= 177644	#47-2071   
UPAR3 	= 177646	#47-2072   
UPAR4 	= 177650	#47-2073   
UPAR5 	= 177652	#47-2074   
UPAR6 	= 177654	#47-2075   
UPAR7 	= 177656	#47-2076   
UPDR0 	= 177600	#47-2078   
UPDR1 	= 177602	#47-2079   
UPDR2 	= 177604	#47-2080   
UPDR3 	= 177606	#47-2081   
UPDR4 	= 177610	#47-2082   
UPDR5 	= 177612	#47-2083   
UPDR6 	= 177614	#47-2084   
UPDR7 	= 177616	#47-2085   
UT.LG 	= 000004  G	#55-2439   
UT.PR 	= 000001  G	#55-2437   
UT.SL 	= 000002  G	#55-2438   
U.ACP 	= 000040  G	#55-2393    128-6790  
U.AF  	= 000014  G	#55-2375    187-10194 *225-12501 *225-12509 
U.AR  	= 000034  G	#55-2391   
U.CH  	= 000032  G	#55-2389   
U.C1  	= 000004  G	#55-2371   
U.C2  	= 000006  G	#55-2372   
U.C3  	= 000010  G	#55-2373   
U.C4  	= 000012  G	#55-2374   
U.DACP	= 000036  G	#55-2392   
U.DN  	= 000000  G	#55-2368   
U.FB  	= 000003  G	#55-2370   
U.FO  	= 000043  G	#55-2396   
U.GC  	= 000031  G	#55-2387   
U.HA  	= 000020  G	#55-2377    128-6777  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 24

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

U.LBH 	= 000044  G	#55-2397   
U.LBN 	= 000046  G	#55-2398   
U.PC  	= 000030  G	#55-2386   
U.PR  	= 000042  G	#55-2395   
U.RB  	= 000024  G	#55-2379   
U.RF  	= 000022  G	#55-2378    76-3627    128-6824   225-12450  225-12457  225-12457  225-12496 *225-12501 *225-12509 
U.RP  	= 000016  G	#55-2376    78-3767   
U.SZ  	= 000050  G	 33-1251   #55-2399    76-3624    104-5298   225-12447  225-12456  225-12457 
U.TF  	= 000042  G	#55-2394   
U.UI  	= 000030  G	#55-2385   
U.UN  	= 000002  G	#55-2369    104-5294   225-12496 
U.VA  	= 000026  G	#55-2384   
U.VP  	= 000032  G	#55-2388   
WEP   	= 000010	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
WFED  	  045016 RG	 80-3935    80-3935    80-3963    80-3963    80-3977    80-3977    80-4005    80-4005    80-4015   
                         80-4015    80-4021    80-4021    80-4029    80-4029    80-4040    80-4040    80-4063    80-4063   
                         80-4113    80-4113    96-4984    96-4984    171-9277   171-9277   171-9284   171-9284   172-9306  
                         172-9306   173-9455   173-9455   173-9497   173-9497   173-9554   173-9554   173-9560   173-9560  
                         174-9600   174-9600   174-9606   174-9606  #245-13530  246-13681  246-13681  246-13693  246-13693 
WFXSET	  013374 R	 69-3111    69-3113    69-3115   #69-3118   
WI.WRV	= 001000	 252-14071 
WTLODT	  024402 R	#150-8233   151-8244  
W.VBN 	  000006	 253-14140 
XOFF  	  026226 RG	 151-8282  #157-8597  
XON   	  026234 RG	 151-8283  #158-8624  
X.X94 	  015262 R	 77-3690   #77-3709   
X.X95 	  015264 R	 77-3705   #77-3710   
X8X97 	  041664 RG	 221-12257 #221-12274 
X9X96 	  015340 R	 78-3761   #78-3777   
ZSTOP 	= 040000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
$BTMSK	  002642 RG	#15-823     197-10678 
$CDINT	= ******  GX	 6-361     
$CD11 	= 000001	#1-40       30-1031    33-1178    33-1215    33-1275    34-1316    35-1377   
$DBDTE	= 000001	#1-46       10-640     151-8260   171-9230   171-9268   172-9316   172-9365   172-9371   172-9407  
                         172-9422   173-9526   174-9586   174-9592  
$DHINP	  035504 RG	 6-390      6-390      6-390      6-390      6-390      6-390      6-390      6-390     #199-10783 
$DHOUT	  033734 RG	 6-390      6-390      6-390      6-390      6-390      6-390      6-390      6-390     #188-10221 
$DH11 	= 000001	#1-44       180-9956  
$DIV  	= ******  GX	 108-5499   108-5499   108-5503   108-5503  
$DMINT	  037760 RG	 6-390      6-390      6-390      6-390      6-390      6-390      6-390      6-390     #209-11519 
$DORBL	  020074 RG	 86-4453   #87-4502   
$DPMYG	  020512 RG	 86-4456   #90-4726   
$DPMYN	  020566 RG	 86-4459   #93-4833   
$DSW  	= 000046  G	#47-2087   *65-2898    73-3285    73-3300   
$DTA  	= ******	 6-351      26-944     33-1182    33-1224    33-1237    34-1323    35-1385    37-1522   
$DTE  	= 000001	#1-47       84-4329    182-10000 
$DTEDR	= ******	 13-773     65-2803    87-4503    170-9192   222-12308 
$DTEOF	  020076 RG	 86-4454   #88-4549   
$DTEON	  020110 RG	 86-4455   #89-4594   
$DXINT	= ******  GX	 6-372     
$EXHSG	  020574 RG	 86-4460   #94-4867   
$EXHSM	  020602 RG	 86-4461   #95-4899   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 25

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$EXMYG	  020550 RG	 86-4457   #91-4768   
$EXMYN	  020560 RG	 86-4458   #92-4801   
$FE   	= 000001	#1-42       33-1185    33-1221    33-1232    34-1330    35-1364    37-1550   
$F11  	= 000001	#1-43       33-1191    33-1202    33-1206    33-1247    33-1265    35-1356    35-1400    64-2637   
                         252-14017 
$KLDFC	  020770 RG	 96-4966   #96-4973   
$KLDFR	  020610 R	 86-4462   #96-4936   
$KLDFW	  020746 RG	 86-4463   #96-4968   
$KLDFX	  020722 RG	 86-4464   #96-4961   
$LPINT	= ******  GX	 6-407      6-408     
$LP20 	= 000001	#1-38       6-406      31-1076    33-1194    33-1209    33-1270    34-1310    35-1372    37-1545   
$MUL  	= ******  GX	 80-3918    80-3918   
$PRVDP	  021104 RG	 86-4466   #98-5049   
$PRVEX	  021046 RG	 86-4465   #97-5012   
$RP04 	= 000001	#1-41       33-1198    33-1212    33-1260    34-1303    35-1395    37-1478   
$RWDRG	  021126 RG	 86-4467   #99-5081   
$RX11 	= 000001	#1-58       6-371      27-961     33-1188    33-1218    33-1242    33-1250    34-1337    35-1390   
                         37-1532   
$TOP10	= 000001	#1-51       1-54       3-109      37-1561    54-2339    64-2674   
$TOP20	= ******	 1-62       3-116      37-1557   
$TTINP	  036010 RG	 6-332      6-380      6-397      6-400      6-403     #200-10894 
$TTOUT	  034340 RG	 6-333      6-381      6-398      6-401      6-404     #192-10393 
$T1091	= 000001	#1-36       1-50       1-55       3-110      37-1562   
$UNIT 	  002640 RG	#15-821     197-10672 
$$    	= 000037	#41-1750    41-1750   #41-1753    41-1753   #41-1768    41-1768   #64-2659    64-2659   #64-2661   
                         64-2661   #72-3190    72-3190   #72-3192    72-3192   #72-3212    72-3212   #72-3218    72-3218   
                        #72-3226    72-3226   #72-3229    72-3229   #75-3513    75-3513   #76-3555    76-3555   #76-3587   
                         76-3587   #76-3592    76-3592   #76-3628    76-3628   #76-3631    76-3631   #76-3646    76-3646   
                        #79-3798    79-3798   #79-3813    79-3813   #80-3918    80-3918   #80-3935    80-3935   #80-3955   
                         80-3955   #80-3963    80-3963   #80-3977    80-3977   #80-4005    80-4005   #80-4015    80-4015   
                        #80-4021    80-4021   #80-4029    80-4029   #80-4031    80-4031   #80-4040    80-4040   #80-4063   
                         80-4063   #80-4082    80-4082   #80-4089    80-4089   #80-4113    80-4113   #80-4116    80-4116   
                        #83-4244    83-4244   #83-4245    83-4245   #83-4260    83-4260   #84-4299    84-4299   #84-4302   
                         84-4302   #84-4303    84-4303   #86-4446    86-4446   #88-4560    88-4560   #88-4561    88-4561   
                        #89-4600    89-4600   #89-4611    89-4611   #89-4624    89-4624   #89-4664    89-4664   #89-4671   
                         89-4671   #89-4691    89-4691   #90-4732    90-4732   #96-4936    96-4936   #96-4938    96-4938   
                        #96-4961    96-4961   #96-4963    96-4963   #96-4968    96-4968   #96-4970    96-4970   #96-4984   
                         96-4984   #97-5013    97-5013   #97-5019    97-5019   #98-5050    98-5050   #99-5081    99-5081   
                        #104-5267   104-5267  #106-5408   106-5408  #108-5499   108-5499  #108-5503   108-5503  #110-5612  
                         110-5612  #111-5662   111-5662  #112-5721   112-5721  #112-5725   112-5725  #113-5772   113-5772  
                        #115-5874   115-5874  #119-6101   119-6101  #121-6239   121-6239  #124-6369   124-6369  #124-6392  
                         124-6392  #128-6657   128-6657  #128-6680   128-6680  #128-6725   128-6725  #128-6807   128-6807  
                        #128-6812   128-6812  #128-6816   128-6816  #128-6826   128-6826  #128-6828   128-6828  #130-6937  
                         130-6937  #130-6947   130-6947  #131-7020   131-7020  #131-7035   131-7035  #131-7041   131-7041  
                        #131-7066   131-7066  #132-7136   132-7136  #132-7147   132-7147  #132-7163   132-7163  #135-7321  
                         135-7321  #135-7330   135-7330  #135-7347   135-7347  #135-7369   135-7369  #141-7645   141-7645  
                        #141-7653   141-7653  #141-7673   141-7673  #141-7687   141-7687  #141-7695   141-7695  #141-7722  
                         141-7722  #147-8078   147-8078  #147-8084   147-8084  #147-8091   147-8091  #152-8333   152-8333  
                        #153-8351   153-8351  #153-8360   153-8360  #153-8381   153-8381  #153-8384   153-8384  #153-8389  
                         153-8389  #153-8397   153-8397  #153-8398   153-8398  #154-8409   154-8409  #154-8424   154-8424  
                        #154-8429   154-8429  #154-8451   154-8451  #154-8474   154-8474  #154-8482   154-8482  #155-8493  
                         155-8493  #155-8500   155-8500  #155-8513   155-8513  #155-8518   155-8518  #158-8627   158-8627  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 26

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #158-8631   158-8631  #159-8664   159-8664  #159-8673   159-8673  #160-8692   160-8692  #161-8733  
                         161-8733  #161-8736   161-8736  #163-8850   163-8850  #164-8874   164-8874  #164-8888   164-8888  
                        #164-8890   164-8890  #164-8899   164-8899  #165-8924   165-8924  #166-8935   166-8935  #166-8937  
                         166-8937  #166-8942   166-8942  #168-8976   168-8976  #168-9045   168-9045  #168-9047   168-9047  
                        #168-9057   168-9057  #168-9070   168-9070  #168-9125   168-9125  #169-9153   169-9153  #171-9245  
                         171-9245  #171-9248   171-9248  #171-9252   171-9252  #171-9257   171-9257  #171-9277   171-9277  
                        #171-9284   171-9284  #172-9306   172-9306  #172-9356   172-9356  #172-9394   172-9394  #173-9455  
                         173-9455  #173-9462   173-9462  #173-9463   173-9463  #173-9484   173-9484  #173-9497   173-9497  
                        #173-9502   173-9502  #173-9554   173-9554  #173-9560   173-9560  #174-9600   174-9600  #174-9606  
                         174-9606  #180-9957   180-9957  #180-9959   180-9959  #180-9964   180-9964  #181-9979   181-9979  
                        #181-9993   181-9993  #182-10007  182-10007 #182-10009  182-10009 #182-10013  182-10013 #182-10021 
                         182-10021 #183-10088  183-10088 #184-10131  184-10131 #185-10165  185-10165 #187-10209  187-10209 
                        #188-10223  188-10223 #188-10242  188-10242 #188-10252  188-10252 #189-10312  189-10312 #192-10395 
                         192-10395 #192-10411  192-10411 #194-10457  194-10457 #195-10522  195-10522 #195-10529  195-10529 
                        #198-10728  198-10728 #199-10785  199-10785 #199-10799  199-10799 #199-10836  199-10836 #199-10837 
                         199-10837 #199-10839  199-10839 #199-10869  199-10869 #200-10896  200-10896 #201-10968  201-10968 
                        #201-10971  201-10971 #201-10982  201-10982 #201-10987  201-10987 #202-11021  202-11021 #202-11028 
                         202-11028 #202-11041  202-11041 #202-11048  202-11048 #204-11248  204-11248 #205-11293  205-11293 
                        #205-11307  205-11307 #206-11356  206-11356 #206-11370  206-11370 #208-11439  208-11439 #208-11473 
                         208-11473 #209-11521  209-11521 #209-11578  209-11578 #212-11699  212-11699 #213-11732  213-11732 
                        #213-11747  213-11747 #213-11761  213-11761 #213-11773  213-11773 #213-11788  213-11788 #214-11886 
                         214-11886 #214-11902  214-11902 #215-12009  215-12009 #215-12012  215-12012 #216-12053  216-12053 
                        #217-12110  217-12110 #221-12260  221-12260 #224-12381  224-12381 #224-12387  224-12387 #224-12388 
                         224-12388 #224-12393  224-12393 #224-12397  224-12397 #225-12453  225-12453 #225-12494  225-12494 
                        #225-12497  225-12497 #225-12502  225-12502 #225-12505  225-12505 #226-12535  226-12535 #230-12648 
                         230-12648 #230-12649  230-12649 #232-12716  232-12716 #237-12971  237-12971 #238-13036  238-13036 
                        #238-13038  238-13038 #238-13042  238-13042 #238-13094  238-13094 #238-13096  238-13096 #239-13143 
                         239-13143 #239-13146  239-13146 #239-13158  239-13158 #239-13206  239-13206 #240-13236  240-13236 
                        #240-13241  240-13241 #241-13269  241-13269 #242-13319  242-13319 #242-13326  242-13326 #243-13383 
                         243-13383 #243-13401  243-13401 #243-13414  243-13414 #243-13417  243-13417 #244-13459  244-13459 
                        #244-13466  244-13466 #244-13468  244-13468 #244-13471  244-13471 #245-13577  245-13577 #245-13590 
                         245-13590 #245-13610  245-13610 #245-13633  245-13633 #246-13681  246-13681 #246-13693  246-13693 
                        #248-13748  248-13748 #249-13774  249-13774 #251-13965  251-13965 #252-14079  252-14079 #253-14155 
                         253-14155 #253-14186  253-14186 
$$$   	= 007372 R	#35-1359    35-1359   #35-1363    35-1363   #35-1367    35-1367   #35-1371    35-1371   #35-1375   
                         35-1375   #35-1380    35-1380   #35-1384    35-1384   #35-1393    35-1393   #35-1398    35-1398   
                        #35-1403    35-1403   #35-1407    35-1407   
$$$ARG	= 000011	#80-4122    80-4122   #80-4122    80-4122   #80-4122    80-4122   #80-4122    80-4122   
$$$GLB	= ******	 64-2666    64-2666    64-2666    64-2666    64-2666    64-2666    64-2669    64-2669    64-2669   
                         64-2669    64-2669    64-2669    80-4122    80-4122    80-4122    80-4122    80-4122    80-4122   
                         80-4122    80-4122    150-8234   160-8705   160-8705   160-8705   160-8705   160-8705   160-8705  
                         177-9860   177-9866   177-9866   177-9866   177-9866   177-9866   177-9866   177-9868   177-9868  
                         177-9868   177-9868   177-9868   177-9868   177-9870   177-9870   177-9870   177-9870   177-9870  
                         177-9870  
$$$OST	= 000016	#64-2666    64-2666    64-2666   #64-2666    64-2666    64-2666   #64-2666    64-2666    64-2666   
                        #64-2666    64-2666    64-2666   #64-2666    64-2666    64-2666   #64-2666   #64-2669    64-2669   
                         64-2669   #64-2669    64-2669    64-2669   #64-2669    64-2669    64-2669   #64-2669    64-2669   
                         64-2669   #64-2669    64-2669    64-2669   #64-2669   #80-4122    80-4122    80-4122   #80-4122   
                         80-4122    80-4122   #80-4122    80-4122    80-4122   #80-4122    80-4122    80-4122   #80-4122   
                         80-4122    80-4122   #80-4122    80-4122    80-4122   #80-4122    80-4122   #160-8705   160-8705  
                         160-8705  #160-8705   160-8705   160-8705  #160-8705   160-8705   160-8705  #160-8705   160-8705  
                         160-8705  #160-8705   160-8705   160-8705  #160-8705  #177-9866   177-9866   177-9866  #177-9866  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 27

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         177-9866   177-9866  #177-9866   177-9866   177-9866  #177-9866   177-9866   177-9866  #177-9866  
                         177-9866   177-9866  #177-9866  #177-9868   177-9868   177-9868  #177-9868   177-9868   177-9868  
                        #177-9868   177-9868   177-9868  #177-9868   177-9868   177-9868  #177-9868   177-9868   177-9868  
                        #177-9868  #177-9870   177-9870   177-9870  #177-9870   177-9870   177-9870  #177-9870   177-9870  
                         177-9870  #177-9870   177-9870   177-9870  #177-9870   177-9870   177-9870  #177-9870  
$$$T1 	= 000000	#64-2666    64-2666    64-2666    64-2666   #64-2666    64-2666   #64-2669    64-2669    64-2669   
                         64-2669   #64-2669    64-2669   #160-8705   160-8705   160-8705   160-8705  #160-8705   160-8705  
                        #177-9866   177-9866   177-9866   177-9866  #177-9866   177-9866  #177-9868   177-9868   177-9868  
                         177-9868  #177-9868   177-9868  #177-9870   177-9870   177-9870   177-9870  #177-9870   177-9870  
$$$UNI	= 000002	#32-1113    32-1129    32-1129    32-1129   #32-1129    32-1129    32-1129    32-1129   #32-1129   
                        #32-1157    32-1161    32-1161   #32-1161    32-1161    32-1161   #32-1161   
.ABCNT	  002600 RG	#15-796    *84-4306    179-9943  *208-11450 
.ABFLG	  002602 RG	#15-798    *84-4307   *160-8696   179-9941  *179-9943  
.ACKAL	  001162 RG	#7-523      64-2630   *80-4117    182-10001 *182-10003 
.ATLLH	  006462 RG	#34-1292    34-1298    34-1348    68-3036    76-3580    124-6379   124-6382   131-7082   131-7085  
.BGBST	= 076000  G	#12-717     12-724     39-1604   
.BGBUF	  001414 RG	#12-723     39-1609   
.BGLEN	= 002000  G	#12-718     12-725     39-1611   
.BM873	= 173000  G	#47-2044    82-4216   
.BRCLK	= 005000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.BRKCH	  002630 RG	#15-811     201-10984 
.BTPRM	  001156 RG	#7-519      159-8676  
.BTSCH	  001160 RG	#7-521     *80-3980    80-3996   *80-4017   *201-10995 
.BTSTK	  015724 RG	 34-1345    80-3910   #80-3910   
.CECLK	= 004000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.CEFN 	  041600 RG	 110-5612   110-5612   111-5662   111-5662   112-5725   112-5725   113-5772   113-5772   119-6101  
                         119-6101   128-6680   128-6680   132-7136   132-7136  #221-12252 
.CEFN3	  041604 RG	#221-12254  243-13401  243-13401 
.CKASS	  001050 RG	#7-464      75-3500   *75-3502   *147-8086  
.CKDEL	  041666 RG	 121-6239   121-6239   147-8091   147-8091  #222-12295 
.CLKBA	  002370 RG	#13-760     119-6134   121-6229   147-8069  
.CLKEA	  002574 RG	#13-770     119-6135   121-6231  
.CLKSW	  001134 RG	#7-496      64-2647   *64-2649   *147-8056  *147-8059   182-10016 
.CLKSZ	= 000007  G	#13-757     13-767    
.CLRMR	= 006000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.CLRUN	= 010000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.COMEF	  001010 RG	#7-434      40-1715    64-2628    69-3100    69-3105    69-3114    69-3116    80-3930    80-3949   
                        *80-4072   *82-4203   *84-4327    90-4728    114-5821   114-5822  *167-8959  *167-8963  *173-9475  
                         183-10067  199-10797  199-10813  201-10953 *201-10981  201-10993  208-11453  209-11539  212-11693 
                         216-12050  221-12266  226-12540  243-13373 *247-13722  248-13746 *248-13751 *249-13772 
.CONBT	= 012000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.CPDV 	  001252 RG	#10-612    *80-4094    242-13310 *242-13337 *244-13477 
.CPFN 	  001250 RG	#10-610     242-13308 *242-13335 
.CPUSN	  010666 RG	#38-1574   
.CRHD 	  001260 RG	#10-618     80-4095    244-13452 *244-13476 
.CRPB 	  001256 RG	#10-616    *80-4097    242-13312 *242-13314  242-13329 *242-13339 *244-13481 
.CRPFL	  005262 RG	#31-1046   *84-4305   
.CRQZ 	  001246 RG	#10-608    *80-4102   *242-13316 *242-13330  244-13453 *244-13484 
.CRSB 	  001262 RG	#10-620     242-13315 *242-13332 
.CRSND	  002626 RG	#15-809    *168-9053  *168-9076   238-13061  238-13097 
.CRSZ 	  001254 RG	#10-614    *80-4101   *242-13317  242-13324 *242-13331  244-13462 *244-13483 
.CRTSK	  001006 RG	#7-431      40-1669    40-1680    65-2709    65-2771    65-2877    72-3244   *72-3247    73-3260   
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 28

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         73-3267   *73-3348    79-3802    151-8246   179-9922   181-9981   225-12442  225-12464  243-13399 
.CSHRG	= 164000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.CTYPT	  002634 RG	#15-815    
.CYLTM	= 000074  G	 7-515      13-763     13-764    #52-2309   
.DATE 	  001136 RG	#7-498      165-8913  
.DATE3	  001136 RG	#7-499      160-8689   182-10014 
.DAY  	  001142 RG	#7-504      108-5510  
.DBINT	= ******  GX	 6-367     
.DHSPD	  037702 RG	 154-8482   154-8482   155-8513   155-8513   199-10836  199-10836  208-11439  208-11439 #208-11465 
.DHSPF	  037646 RG	 199-10837  199-10837 #208-11449 
.DHSPR	  037622 RG	 153-8384   153-8384  #208-11435  215-12012  215-12012 
.DHSTO	  034300 RG	 190-10349 #191-10377  238-13096  238-13096 
.DHTMO	  040712 RG	 84-4302    84-4302    180-9957   180-9957  #214-11844 
.DHXOF	  037336 RG	#205-11304 
.DHXON	  037474 RG	#206-11369 
.DLHUP	  040312 RG	 153-8360   153-8360   153-8389   153-8389  #212-11674  213-11773  213-11773 
.DLINT	  036310 RG	 200-10898 #202-11012 
.DLSTO	  034440 RG	 192-10409 #193-10433  238-13107 
.DLTMO	  040442 RG	 84-4303    84-4303    180-9959   180-9959  #213-11728 
.DLXOF	  037364 RG	 205-11284  205-11300  205-11306  205-11309 #205-11314 
.DLXON	  037546 RG	 206-11365 #206-11388 
.DMHUP	  040250 RG	 153-8381   153-8381   154-8474   154-8474  #211-11645  215-12009  215-12009 
.DMTMO	  041242 RG	 180-9964   180-9964  #215-11994 
.DOW  	  001145 RG	#7-510     
.DQDH0	  007446 RG	#36-1426    168-9029   168-9055  *214-11965  215-11996 
.DQDLS	  007466 RG	#36-1430   *214-11968 
.DQPBA	  007406 RG	#36-1419    36-1447    153-8398   153-8398  *154-8410   161-8736   161-8736   163-8812   163-8813  
                         163-8817   164-8890   164-8890   166-8937   166-8937   166-8939  *214-11967  241-13281  241-13283 
.DQPEA	  007606 RG	#36-1446    36-1447   
.DQPSZ	= 000010  G	#36-1447    172-9382  
.DRLTC	= 015000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.DRSRN	  012764 RG	 6-326     #65-2871   
.DR.NS	  013072 RG	#65-2894    89-4694    145-7991  
.DSACF	= 066000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.DSIOJ	= 065000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.DST  	  001144 RG	#7-508     
.DTINT	  027670 RG	 6-416      6-416      6-416      6-416     #170-9174  
.D.ASS	  021270 RG	 65-2780   #104-5264  
.D.CEF	  021540 RG	 65-2792   #110-5612  
.D.CMT	  022156 RG	 65-2790   #121-6228  
.D.DSE	  021574 RG	 65-2794   #112-5721  
.D.DTE	  017742 RG	 65-2781   #86-4428   
.D.EXT	  022330 RG	 65-2802   #126-6470   135-7384  
.D.GLI	  021374 RG	 65-2779   #106-5399  
.D.GMP	  024042 RG	 65-2814   #145-7946  
.D.GPP	  023720 RG	 65-2813   #143-7827  
.D.GTP	  021424 RG	 65-2811   #108-5495  
.D.MKT	  022054 RG	 65-2788   #119-6101  
.D.PUT	  023450 RG	 65-2789   #139-7564  
.D.QIO	  022352 RG	 65-2777    65-2778   #128-6651  
.D.RAF	  021632 RG	 65-2796   #114-5819  
.D.REC	  023270 RG	 65-2785   #135-7309  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 29

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.D.REF	  021616 RG	 65-2795   #113-5772  
.D.REQ	  023472 RG	 65-2782   #141-7645  
.D.RES	  022236 RG	 65-2800   #124-6369  
.D.ROE	  023270 RG	 65-2786   #135-7310  
.D.ROS	  023270 RG	 65-2787   #135-7311  
.D.SAR	  023036 RG	 65-2784   #131-7020  
.D.SEF	  021556 RG	 65-2793   #111-5662  
.D.SEN	  023022 RG	 65-2783   #130-6937  
.D.STV	  023436 RG	 65-2810   #137-7476  
.D.SUS	  022224 RG	 65-2799   #123-6326   135-7385  
.D.WFL	  021734 RG	 65-2798   #116-5949  
.D.WFO	  021660 RG	#115-5867   128-6837  
.D.WFS	  021656 RG	 65-2797   #115-5865  
.D.WSE	  022042 RG	 65-2801   #117-6013  
.EBPEQ	  001366 RG	#10-694     245-13630 *245-13635 
.EIOJA	= 067000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.EPEFL	  001365 RG	#10-689     245-13566 *245-13579 
.EPFFL	  001364 RG	#10-687     245-13574 *245-13592 
.EXEND	  001002 RG	#7-423      39-1600   
.FEACK	= ******  GX	 36-1443   
.FEACT	  005242 RG	#30-1024   *80-4118   
.FEMOD	  001166 RG	#7-527     
.FEPPU	  015162 RG	#77-3683    131-7041   131-7041   141-7653   141-7653  
.FEST 	= ******  GX	 36-1443   
.FESTB	  001000 RG	#7-421      7-422     
.FREPL	  001420 RG	#12-727    *39-1603   *39-1608    201-10957  235-12844  236-12914 
.FSRPT	= 000050  G	#47-2088   
.GFNR 	= 102000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.HRDWR	  010670 RG	#38-1579   
.INHDM	  002576 RG	#15-794    *151-8309   209-11541 
.INICL	= 070000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.INTEN	= 000100  G	#47-2049    84-4328   
.IOSNP	  011530 R	 41-1750    41-1750   #42-1834   
.IRLTC	= 014000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.KACFL	  001412 RG	#11-711     183-10080 
.KALSC	= 000005  G	#52-2311    89-4688    183-10100 
.KLERW	  001164 RG	#7-525     
.KLFLG	  001172 RG	#7-531     
.KLITK	  001126 RG	#7-488     *80-3954   *83-4258   *173-9482  *183-10094 *245-13551 *245-13555 *245-13576 *245-13604 
.KLIWD	  001130 RG	#7-491     
.KLNBC	  001176 RG	#8-544      8-564     
.KLNFD	  001202 RG	#8-549     
.KLNFT	  001200 RG	#8-546      8-559      167-8958  
.KLNLB	  001176 RG	#8-543     
.KLNMD	  001214 RG	#8-556      159-8665  
.KLNPB	  001174 RG	#8-540      159-8668  
.KLNPE	= 001216 RG	#8-560     
.KLNPT	  002636 RG	#15-818    
.KLNPW	  001216 RG	#8-561     
.KLNSW	  001224 RG	#8-565      41-1781    41-1789    153-8355   155-8496   168-9037   184-10121  194-10450  195-10466 
                         195-10523  197-10655  201-10945  202-11025  205-11289  206-11352  212-11680 *212-11682  238-13033 
                         239-13139 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 30

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.KLNTD	  001210 RG	#8-554     
.KLNTT	  001206 RG	#8-551     
.KLRLD	  001170 RG	#7-529     
.KPAC 	  001410 RG	#11-709    *89-4688   *89-4689   *183-10075 *183-10078 *183-10100 
.KW11S	  035472 RG	 6-339     #198-10727 
.LCEND	= 010672 RG	 7-422     #38-1591   
.LCRDL	= 052000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LCRDR	= 051000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LCRM1	= 057000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LCRM2	= 056000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LCRM3	= 055000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LCRM4	= 054000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LCRM5	= 053000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDAR 	= 077000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDBRL	= 043000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDBRR	= 042000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDCK1	= 046000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDCK2	= 047000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDDIS	= 045000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDRJD	= 064000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDRJV	= 063000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDRM1	= 060000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDRM2	= 061000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDRM3	= 062000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LDSEL	= 044000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.LPPFL	  005570 RG	#32-1098   *84-4304   
.MEMRS	= 076000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.MON  	  001143 RG	#7-506      108-5513  
.MSIZE	  001114 RG	#7-471     
.NOERR	  001122 RG	#7-482      7-484     *39-1612   *80-3953   *83-4259   *173-9483   183-10069 *183-10089  245-13547 
                         245-13562 *245-13609 
.NOHLT	= 001123 RG	#7-484      245-13600 
.PARER	  011254 R	 6-345     #40-1725   
.PARRG	= 172100  G	 40-1726   #47-2045    84-4311   
.PAT..	  011614 RG	#43-1871   
.PCAB1	= 150000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.PCAB2	= 151000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.PCAB3	= 152000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.PCAB4	= 153000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.PDP11	= 000050	#143-7813   143-7836  
.PFAIL	  001026 RG	#7-453      75-3445   *82-4208   *83-4247   
.PFASS	  001052 RG	#7-466      75-3503    75-3508   *75-3509   
.PFIOW	  001030 RG	#7-455     *83-4248   *84-4291   *84-4309    213-11735  213-11749  213-11785  214-11847  214-11883 
                         214-11898  217-12104 
.PFRST	  017530 RG	 75-3513    75-3513   #84-4283   
.POLLH	  001424 RG	#12-731     12-737     12-747     72-3191    72-3225    76-3554    76-3591    132-7146   135-7368  
                         141-7686   141-7692  
.POLND	  002330 RG	 12-733    #12-746    
.POLST	  001430 RG	 12-732    #12-735    
.PRADR	  001354 RG	#10-679    *89-4653    170-9183   174-9595  
.PRDCT	  001362 RG	#10-685    *80-3960   *80-4037   *170-9197  
.PRDTE	  001360 RG	#10-683     41-1772    80-3920    83-4243    89-4596    89-4651    101-5155   151-8242   170-9182  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 31

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         174-9581  
.PRPSE	  001370 RG	#10-697     64-2654   *80-3913   *80-3932   *80-3973   *84-4308    201-10955 
.PRSTA	  001356 RG	#10-681     40-1708    41-1777    80-3921    83-4272    84-4330    170-9184   170-9186   170-9191  
                         171-9239   171-9287   172-9333   173-9533   173-9555   174-9607   247-13721  248-13750 
.PUDBA	  007606 RG	 33-1251   #37-1462    76-3623    104-5287   225-12444 
.PUDEA	  010666 RG	#37-1568    104-5289  
.PWRDN	  017176 RG	 6-322      75-3447   #82-4202    83-4257   
.RCRM1	= 147000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.RCRM2	= 146000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.RCRM3	= 145000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.RCRM4	= 144000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.RCSPF	= 141000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.RDJ14	= 134000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.RDJ71	= 135000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.RDMAB	= 133000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.REQS 	  014460 RG	 72-3229    72-3229   #76-3541    128-6816   128-6816   131-7066   131-7066   141-7673   141-7673  
.RPADR	  005244 RG	#30-1026   
.RPSIZ	  005250 RG	#30-1028   
.RPUNT	  005240 RG	#30-1022   
.RP1PE	  007726 RG	#37-1485    37-1486   
.RP2PE	  007776 RG	#37-1490    37-1491   
.RP3PE	  010046 RG	#37-1495    37-1496   
.RP4PE	  010116 RG	#37-1500    37-1501   
.RP5PE	  010166 RG	#37-1505    37-1506   
.RP6PE	  010236 RG	#37-1510    37-1511   
.RP7PE	  010306 RG	#37-1515    37-1516   
.RQESD	  015152 RG	#76-3650    131-7072   141-7676  
.RQSPD	  026464 RG	 160-8697  #160-8704   179-9945  
.SECLK	= 003000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.SEND 	  023170 RG	 128-6812   128-6812   130-6947   130-6947   131-7035   131-7035  #132-7129   141-7722   141-7722  
.SERFG	  001014 RG	#7-437     *39-1614   *68-3035    73-3262    75-3449    75-3477    75-3482    75-3489   *75-3505   
                        *75-3512   *79-3819   *82-4209   *83-4262   *147-8094  *147-8098  *198-10729 *227-12566 
.SETMR	= 007000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.SETRN	= 011000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.SEWFL	  001016 RG	#7-439     *117-6014   147-8098  *147-8099  
.SNDAL	  027230 RG	 64-2661    64-2661    168-8976   168-8976  #168-9011  
.SNDBF	  002606 RG	#15-805     168-9025  *168-9031  *168-9124   189-10294 *189-10295  190-10346 
.SNDCN	  002616 RG	#15-807    *168-9029  *168-9117  *189-10288 
.SNDLP	  002604 RG	#15-803     84-4292    168-9019  *168-9028   168-9113   190-10341 
.SSCLK	= 002000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.SSM  	  001146 RG	#7-512      108-5497  *147-8051  *147-8053   147-8054  
.SSTCO	  012740 RG	 40-1677   #65-2822   
.SSTET	  012732 RG	 65-2714   #65-2819    65-2882   
.STAST	  015342 RG	#79-3796    147-8084   147-8084   224-12393  224-12393 
.STDHL	  037576 RG	 205-11307  205-11307  206-11370  206-11370 #207-11416  208-11473  208-11473  238-13094  238-13094 
.STDTA	  005710 RG	#33-1170    72-3196    234-12800 
.STDTB	  005716 RG	 33-1171   #33-1177   
.STDTC	  005712 RG	#33-1172   
.STDTZ	  005714 RG	#33-1174    72-3197   *72-3198   *141-7716   234-12802 
.STPCL	= 000000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.STRCL	= 001000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.STTYD	  040176 RG	 199-10839  199-10839  202-11041  202-11041  209-11570 #210-11608 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 32

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.STTYH	  040212 RG	 209-11578  209-11578 #210-11613  212-11699  212-11699 
.SYUIC	  001154 RG	#7-517      128-6765   143-7838  
.TICK 	  024174 RG	 75-3480   #147-8043   147-8095  
.TICKS	  001132 RG	#7-494      147-8043  
.TKPS 	  001152 RG	#7-514      80-3916    108-5495   147-8045  *159-8652  *159-8655  
.TKTN 	  001124 RG	#7-486     *40-1683    64-2634   *64-2636   *70-3127   *80-3952   *83-4261   *173-9485  *183-10095 
                        *245-13615 
.TKTN.	  012354 R	 64-2639   #64-2669   
.TOD. 	  012336 R	 64-2650   #64-2665   
.TPDBA	  007126 RG	#35-1355    77-3688    77-3689    145-7958  
.TPDEA	  007406 RG	#35-1409    145-7956  
.TTELB	  002656 RG	#15-835    *199-10868  216-12071 *216-12073 
.TTELQ	  002654 RG	#15-833     181-9971   216-12056 
.TTERL	  041356 RG	 199-10869  199-10869  214-11886  214-11886 #216-12045 
.TTP11	  002632 RG	#15-813     168-9065  *184-10133 *185-10166  188-10249  192-10401  194-10447  201-10991  205-11287 
                         206-11350  238-13084  239-13171  239-13195 
.TTRNG	  040162 R	 202-11021  202-11021  209-11560 #209-11577 
.TTRST	  041464 RG	 212-11704  213-11788  213-11788  214-11902  214-11902 #217-12099 
.TTSCW	  040166 R	 202-11048  202-11048  209-11562 #209-11582  213-11761  213-11761 
.TTXOF	  037242 RG	 157-8598   201-10968  201-10968 #205-11280 
.TTXON	  037374 RG	 158-8625  #206-11342 
.VCLUN	  015266 RG	#78-3742    104-5267   104-5267   106-5408   106-5408   128-6657   128-6657  
.VERNO	  001036 RG	#7-461     
.WRMBX	= 071000	#5-255     #46-2028   #79-3885   #81-4174   #85-4394   #149-8178  #176-9710  #219-12193 
.X.02 	  023044 R	 130-6943  #131-7027  
.YEAR 	  001140 RG	#7-502      108-5515  
..AKCR	= ******  GX	 36-1437   
..AKLP	= ******  GX	 36-1434   
..ALCB	  043034 RG	 76-3587    76-3587    128-6725   128-6725   172-9394   172-9394   173-9502   173-9502   216-12053 
                         216-12053 #235-12841  237-12971  237-12971  244-13468  244-13468  244-13471  244-13471  245-13633 
                         245-13633 
..ALC2	  043050 RG	#235-12845 
..ALOW	  043322 RG	 164-8874   164-8874   169-9153   169-9153  #237-12971  237-12974  243-13383  243-13383 
..BLXI	  045544 RG	#251-13956 
..BLXO	  045556 RG	 224-12381  224-12381 #251-13961 
..DECB	  043166 RG	 80-4089    80-4089    171-9252   171-9252   224-12397  224-12397 #236-12910 
..DECN	  043162 RG	 84-4299    84-4299    164-8899   164-8899   165-8924   165-8924   168-9057   168-9057   168-9125  
                         168-9125   181-9993   181-9993   189-10312  189-10312  192-10411  192-10411 #236-12908  238-13113 
                         239-13206  239-13206 
..DEC2	  043156 RG	#236-12904 
..DQRN	  042050 RG	 184-10131  184-10131 #225-12442  225-12506 
..DSEV	  042444 RG	 76-3631    76-3631    79-3798    79-3798    112-5721   112-5721   124-6392   124-6392   128-6828  
                         128-6828   132-7169   147-8078   147-8078   171-9245   171-9245   172-9356   172-9356   195-10522 
                         195-10522  201-10982  201-10982  201-10987  201-10987  202-11028  202-11028  208-11456  212-11684 
                         224-12388  224-12388 #227-12565  249-13774  249-13774 
..DTP1	  045520 RG	 89-4691    89-4691   #249-13771 
..DTP2	  045466 RG	 88-4561    88-4561    173-9463   173-9463  #248-13745 
..DTSP	  045450 RG	 80-3955    80-3955    83-4260    83-4260    88-4560    88-4560    173-9462   173-9462   173-9484  
                         173-9484   183-10088  183-10088  245-13610  245-13610 #247-13720  248-13748  248-13748 
..ENB0	  042720 RG	 79-3813    79-3813    80-4031    80-4031    80-4116    80-4116    225-12497  225-12497  225-12502 
                         225-12502  230-12649  230-12649 #233-12756  253-14155  253-14155  253-14186  253-14186 
..FSTD	  042754 RG	 124-6369   124-6369   130-6937   130-6937   131-7020   131-7020   135-7330   135-7330   141-7645  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 33

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         141-7645  #234-12799 
..INTX	  014244 RG	 40-1691   #75-3440    83-4263    147-8100   170-9217   204-11255  233-12763 
..IODN	  041730 RG	 185-10165  185-10165 #224-12372  225-12505  225-12505 
..IPRI	  042540 RG	 76-3628    76-3628    76-3646    76-3646    128-6826   128-6826  #230-12639 
..NADD	  042614 RG	 72-3192    72-3192    72-3212    72-3212    72-3226    72-3226    76-3592    76-3592    132-7163  
                         132-7163   135-7369   135-7369   141-7695   141-7695   230-12648  230-12648 #231-12671  243-13417 
                         243-13417  244-13466  244-13466 
..NDEL	  042500 RG	 72-3190    72-3190    80-4082    80-4082    135-7347   135-7347   171-9248   171-9248  #229-12609 
                         232-12716  232-12716 
..PICK	  042656 RG	 72-3218    72-3218    76-3555    76-3555    132-7147   132-7147   135-7321   135-7321   141-7687  
                         141-7687   225-12453  225-12453 #232-12711 
..SACK	  044156 RG	 166-8942   166-8942   194-10457  194-10457 #241-13266 
..SEFN	  042372 RG	 224-12387  224-12387 #226-12530 
..SPLP	= ******  GX	 36-1434   
..STCH	  044112 RG	 201-10971  201-10971 #240-13231 
..STCR	= ******  GX	 36-1437   
..STFC	  044242 RG	 159-8664   159-8664   160-8692   160-8692   163-8850   163-8850   182-10007  182-10007  182-10009 
                         182-10009  182-10013  182-10013  210-11623  240-13241  240-13241 #242-13306 
..STIN	  044432 RG	 159-8673   159-8673   181-9979   181-9979   182-10021  182-10021 #243-13372 
..STLP	= ******  GX	 36-1434   
..STPT	  043632 RG	 36-1420    36-1423    36-1427    36-1431    217-12110  217-12110 #239-13135 
..STQ 	  044634 RG	 199-10799  199-10799  242-13319  242-13319  242-13326  242-13326 #244-13449 
..STTY	  043342 RG	 36-1420    36-1423    36-1427    36-1431    168-9047   168-9047   168-9070   168-9070  #238-13022 
..VTOL	  045632 RG	 128-6807   128-6807  #252-14045 
..VVLL	  046014 RG	 252-14079  252-14079 #253-14126 
..VXFR	  045536 RG	 225-12494  225-12494 #250-13817  251-13965  251-13965 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 34

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		#5-250     #41-1750   #41-1753   #41-1768   #46-2025   #64-2659   #64-2661   #72-3190   #72-3192   #72-3212   
                #72-3218   #72-3226   #72-3229   #75-3513   #76-3555   #76-3587   #76-3592   #76-3628   #76-3631   #76-3646   
                #79-3798   #79-3813   #79-3883   #80-3918   #80-3935   #80-3955   #80-3963   #80-3977   #80-4005   #80-4015   
                #80-4021   #80-4029   #80-4031   #80-4040   #80-4063   #80-4082   #80-4089   #80-4113   #80-4116   #81-4173   
                #83-4244   #83-4245   #83-4260   #84-4299   #84-4302   #84-4303   #85-4392   #86-4446   #88-4560   #88-4561   
                #89-4600   #89-4611   #89-4624   #89-4664   #89-4671   #89-4691   #90-4732   #96-4936   #96-4938   #96-4961   
                #96-4963   #96-4968   #96-4970   #96-4984   #97-5013   #97-5019   #98-5050   #99-5081   #103-5211  #104-5267  
                #105-5354  #106-5408  #107-5459  #108-5499  #108-5503  #109-5573  #110-5612  #111-5662  #112-5721  #112-5725  
                #113-5772  #115-5874  #118-6053  #119-6101  #120-6189  #121-6239  #122-6287  #124-6369  #124-6392  #125-6434  
                #127-6515  #128-6657  #128-6680  #128-6725  #128-6807  #128-6812  #128-6816  #128-6826  #128-6828  #129-6892  
                #130-6937  #130-6947  #131-7020  #131-7035  #131-7041  #131-7066  #132-7136  #132-7147  #132-7163  #135-7321  
                #135-7330  #135-7347  #135-7369  #136-7425  #138-7515  #140-7608  #141-7645  #141-7653  #141-7673  #141-7687  
                #141-7695  #141-7722  #146-8036  #147-8078  #147-8084  #147-8091  #149-8177  #152-8333  #153-8351  #153-8360  
                #153-8381  #153-8384  #153-8389  #153-8397  #153-8398  #154-8409  #154-8424  #154-8429  #154-8451  #154-8474  
                #154-8482  #155-8493  #155-8500  #155-8513  #155-8518  #158-8627  #158-8631  #159-8664  #159-8673  #160-8692  
                #161-8733  #161-8736  #163-8850  #164-8874  #164-8888  #164-8890  #164-8899  #165-8924  #166-8935  #166-8937  
                #166-8942  #168-8976  #168-9045  #168-9047  #168-9057  #168-9070  #168-9125  #169-9153  #171-9245  #171-9248  
                #171-9252  #171-9257  #171-9277  #171-9284  #172-9306  #172-9356  #172-9394  #173-9455  #173-9462  #173-9463  
                #173-9484  #173-9497  #173-9502  #173-9554  #173-9560  #174-9600  #174-9606  #176-9708  #180-9957  #180-9959  
                #180-9964  #181-9979  #181-9993  #182-10007 #182-10009 #182-10013 #182-10021 #183-10088 #184-10131 #185-10165 
                #187-10209 #188-10223 #188-10242 #188-10252 #189-10312 #192-10395 #192-10411 #194-10457 #195-10522 #195-10529 
                #198-10728 #199-10785 #199-10799 #199-10836 #199-10837 #199-10839 #199-10869 #200-10896 #201-10968 #201-10971 
                #201-10982 #201-10987 #202-11021 #202-11028 #202-11041 #202-11048 #204-11248 #205-11293 #205-11307 #206-11356 
                #206-11370 #208-11439 #208-11473 #209-11521 #209-11578 #212-11699 #213-11732 #213-11747 #213-11761 #213-11773 
                #213-11788 #214-11886 #214-11902 #215-12009 #215-12012 #216-12053 #217-12110 #219-12189 #221-12260 #224-12381 
                #224-12387 #224-12388 #224-12393 #224-12397 #225-12453 #225-12494 #225-12497 #225-12502 #225-12505 #226-12535 
                #230-12648 #230-12649 #232-12716 #237-12971 #238-13036 #238-13038 #238-13042 #238-13094 #238-13096 #239-13143 
                #239-13146 #239-13158 #239-13206 #240-13236 #240-13241 #241-13269 #242-13319 #242-13326 #243-13383 #243-13401 
                #243-13414 #243-13417 #244-13459 #244-13466 #244-13468 #244-13471 #245-13577 #245-13590 #245-13610 #245-13633 
                #246-13681 #246-13693 #248-13748 #249-13774 #251-13965 #252-14079 #253-14155 #253-14186 
CLEF$ 		#176-9708  
CLEF$C		#46-2026   
CLEF$S		#46-2024   #79-3883   #80-4105   
CMKT$S		#46-2025   
DECL$S		#46-2025   
DHPSW 		#5-298      6-390      6-390      6-390      6-390      6-390      6-390      6-390      6-390     
DIR$  		#46-2024    64-2639    64-2650   #80-3914    80-3914   #80-3927    80-3927   #80-3989    80-3989    80-4058   
                #80-4105    80-4105   #80-4106    80-4106   #146-8036  #149-8177   151-8244   160-8697  #168-9082   168-9082  
                #176-9709   179-9920   179-9929   179-9933   179-9937   179-9945  #181-9985   181-9985   183-10071  183-10108 
                #237-12973  237-12973 
DMYG$ 		#176-9709  #177-9864  
DTON$S		#46-2025   #79-3883   #80-4106   
EHSG$ 		#176-9709   177-9862  
ERR$  		#64-2639   #64-2650   #80-3914   #80-3927   #80-3989   #80-4058   #80-4105   #80-4106   #151-8244  #160-8697  
                #168-9082  #179-9920  #179-9929  #179-9933  #179-9937  #179-9945  #181-9985  #183-10071 #183-10108 #237-12973 
F11DF$		#5-252      5-256     #219-12190  219-12194 
IDENT$		#4-147     #4-188     #4-188     #44-1878   #44-1878   #79-3822   #79-3822   #81-4127   #81-4127   #85-4344   
                #85-4344   #103-5177  #103-5177  #105-5320  #105-5320  #107-5424  #107-5424  #109-5533  #109-5533  #118-6019  
                #118-6019  #120-6155  #120-6155  #122-6252  #122-6252  #125-6400  #125-6400  #127-6480  #127-6480  #129-6845  
                #129-6845  #136-7391  #136-7391  #138-7481  #138-7481  #140-7574  #140-7574  #142-7735  #142-7735  #144-7860  
                #144-7860  #148-8103  #148-8103  #175-9613  #175-9613  #218-12123 #218-12123 
MFPI  		#46-2025   #77-3683   #77-3684   #85-4392   #103-5212  #104-5264  #104-5279  #105-5354  #106-5407  #109-5573  
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 35

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

                #118-6053  #119-6116  #119-6117  #119-6118  #127-6515  #128-6656  #128-6666  #128-6668  #128-6700  #129-6892  
                #132-7129  #132-7155  #135-7315  #135-7316  #136-7425  #138-7515  #144-7894  #145-7946  #145-7947  #219-12189 
                #234-12803 #234-12804 
MFPS  		#5-250      40-1674   #46-2025    65-2713    65-2747    65-2881    77-3703   #85-4392    86-4431    86-4439   
                 86-4440    86-4443    96-4973    96-4974    96-4975    97-5014    97-5015    98-5051    98-5052    99-5086   
                #103-5212   104-5281   104-5283  #105-5354   106-5415  #107-5459   108-5524  #109-5573   116-5953   116-5956  
                 116-5959   116-5961   116-5969   116-5971  #118-6053  #127-6515   128-6653   128-6687   128-6771  #129-6892  
                 135-7353  #136-7425   137-7477  #138-7515   139-7564  #140-7608   141-7681   141-7682   141-7683   141-7684  
                 141-7685  #142-7769   143-7849  #144-7894   145-7970  #219-12189  221-12253  246-13688  246-13689  246-13690 
MOV$  		#80-3914    80-3914   #80-4105    80-4105   
MRKT$ 		#46-2026   #149-8177  
MRKT$S		#46-2026   
MTPI  		#46-2025   #85-4392   #105-5354  #106-5417  #107-5459  #108-5526  #109-5573  #118-6053  #127-6515  #128-6672  
                #128-6674  #129-6892  #136-7425  #138-7515  #144-7894  #145-7983  #219-12189 
MTPS  		#46-2025   #85-4392   #96-4950   #96-4951   #96-4952   #96-4955   #96-4956   #96-4957   #96-4958   #99-5089   
                #109-5573  #114-5819  #114-5820  #114-5821  #114-5822  #118-6053  #127-6515  #129-6892  #135-7360  #135-7361  
                #135-7365  #136-7425  #138-7515  #142-7769  #143-7853  #144-7894  #145-7986  #219-12189 #246-13683 #246-13684 
                #246-13685 
OFF$  		#64-2666   #64-2666   #64-2666   #64-2666   #64-2666   #64-2666   #64-2666   #64-2669   #64-2669   #64-2669   
                #64-2669   #64-2669   #64-2669   #64-2669   #80-4122   #80-4122   #80-4122   #80-4122   #80-4122   #80-4122   
                #80-4122   #80-4122   #80-4122   #160-8705  #160-8705  #160-8705  #160-8705  #160-8705  #160-8705  #160-8705  
                #177-9866  #177-9866  #177-9866  #177-9866  #177-9866  #177-9866  #177-9866  #177-9868  #177-9868  #177-9868  
                #177-9868  #177-9868  #177-9868  #177-9868  #177-9870  #177-9870  #177-9870  #177-9870  #177-9870  #177-9870  
                #177-9870  
PSW   		#5-285     #6-312     #6-314     #6-316     #6-318     #6-320     #6-322     #6-324     #6-326     #6-330     
                #6-330     #6-330     #6-330     #6-332     #6-333     #6-337     #6-337     #6-339     #6-343     #6-343     
                #6-345     #6-349     #6-349     #6-349     #6-349     #6-349     #6-349     #6-349     #6-349     #6-349     
                #6-349     #6-349     #6-349     #6-349     #6-349     #6-349     #6-354     #6-359     #6-359     #6-361     
                #6-365     #6-365     #6-365     #6-365     #6-367     #6-369     #6-372     #6-377     #6-378     #6-380     
                #6-381     #6-383     #6-384     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     
                #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     
                #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     #6-395     
                #6-395     #6-395     #6-395     #6-395     #6-395     #6-397     #6-398     #6-400     #6-401     #6-403     
                #6-404     #6-407     #6-408     #6-416     #6-416     #6-416     #6-416     
QDPB$ 		#80-4122   #80-4122   
QIOSY$		#46-2026   #46-2027   
QIOW$ 		#46-2024   #79-3883    80-4122   
RETURN		 41-1797    42-1851   #46-2025    76-3544    76-3559    76-3648    77-3707    78-3773    79-3816   #79-3883   
                 83-4275    84-4332   #85-4392    100-5125   101-5154   102-5174  #103-5211  #105-5354  #107-5459  #109-5573  
                #118-6053  #120-6189  #122-6287  #125-6434  #127-6515  #129-6892  #136-7425  #138-7515  #140-7608  #146-8036  
                #149-8177   155-8536   156-8554   163-8834   168-9079   169-9164   174-9610  #176-9708   188-10236  193-10440 
                 194-10460  195-10483  196-10553  199-10801  201-10974  201-10996  202-11055  203-11077  205-11317  206-11396 
                 207-11424  208-11482  209-11585  212-11687  213-11778  213-11794  214-11971  215-12023  217-12118 #219-12189 
                 221-12272  223-12346  224-12400  225-12498  227-12567  228-12590  229-12616  230-12651  231-12680  232-12718 
                 234-12818  235-12876  236-12956  237-12976  238-13050  238-13101  239-13148  239-13210  240-13246  241-13288 
                 242-13322  243-13425  244-13488  245-13624  245-13649  246-13696  249-13777  250-13819  251-14008  252-14098 
                 253-14191 
RQST$ 		#46-2023   #64-2666   #64-2669   #149-8176  #160-8705  #176-9709  #177-9866  #177-9868  #177-9870  
RSXVR$		#5-258     #7-462     #7-462     
R50$  		#64-2666    64-2666    64-2666   #64-2669    64-2669    64-2669   #160-8705   160-8705   160-8705  #177-9866  
                 177-9866   177-9866  #177-9868   177-9868   177-9868  #177-9870   177-9870   177-9870  
WSIG$S		#46-2026   #79-3884   #80-3927   #80-3989   #149-8179  #168-9082  #176-9708  #181-9985  #219-12191 #237-12973 
RSXT1091   CREATED BY  MACRO  ON 15-OCT-79 AT 13:52	PAGE 36

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

WTLO$ 		#46-2026   #149-8177   150-8234  #176-9708   177-9860  
WTLO$C		#46-2026   
WTSE$ 		#46-2024   #149-8177  
WTSE$S		#46-2024   #79-3883   #80-3914   #149-8176  
$DEF  		#5-252      5-255     #46-2024    46-2028   #79-3884    79-3885   #81-4173    81-4174   #85-4392    85-4394   
                #149-8176   149-8178  #176-9709   176-9710  #219-12190  219-12193 
.ATLEN		#5-251      34-1298    34-1301    34-1305    34-1312    34-1318    34-1332    34-1339    34-1345    34-1348   
.CRASH		#5-250      40-1686    40-1710    40-1717    40-1720    40-1723    40-1734   #46-2023    70-3130    75-3516   
                #79-3883   #81-4173    83-4240   #85-4392   #146-8036  #149-8177   151-8303   168-9120   171-9227   171-9235  
                 172-9313   172-9329   172-9384   172-9390   172-9396   173-9479   173-9493   173-9504   173-9544   173-9565  
                #176-9709   189-10291  201-10959 #219-12188  244-13473 
.DQPEN		#5-253      36-1420    36-1423    36-1427    36-1431    36-1434    36-1437    36-1440    36-1443   #46-2025   
                #149-8177  
.ENB  		#46-2023   #85-4392   #219-12192 
.ENB0 		#46-2023    79-3813   #79-3884    80-4031    80-4116   #219-12191  225-12497  225-12502  230-12649  253-14155 
                 253-14186 
.ENB5 		#46-2023   #149-8179  #176-9708   180-9966  #219-12189  238-13049  239-13147 
.ENB6 		#46-2023    64-2624    64-2638    64-2646   #79-3884    80-3926    80-3956    80-3988    80-4057   #149-8177  
                 151-8248   151-8255   153-8361   154-8475   155-8535   158-8633   165-8922   167-8964   168-9078   168-9081  
                #176-9708   179-9925   184-10134  187-10211 #219-12192  229-12614  231-12678  232-12717  235-12873  236-12950 
                 242-13320  243-13418 
.INH  		#46-2023   #85-4392   #219-12192 
.INH0 		#46-2023   #79-3801   #219-12191 #225-12451 #230-12641 #253-14130 
.INH5 		#46-2023   #149-8179  #176-9708  #180-9952  #219-12189 #238-13023 #239-13136 
.INH6 		#46-2023   #64-2633   #79-3884   #80-3929   #80-3990   #80-4059   #149-8177  #151-8245  #151-8250  #152-8334  
                #153-8359  #153-8380  #153-8388  #154-8473  #154-8481  #155-8512  #155-8522  #158-8628  #165-8914  #167-8956  
                #168-9018  #176-9708  #179-9921  #184-10120 #187-10208 #219-12192 #229-12610 #231-12673 #232-12712 #235-12855 
                #236-12924 #242-13307 #243-13409 
.PUDEN		#5-251     #5-253      37-1466    37-1480    37-1486    37-1491    37-1496    37-1501    37-1506    37-1511   
                 37-1516    37-1536    37-1541    37-1548    37-1553    37-1565   
.STDEN		#5-251     #33-1231   #33-1235   #33-1245   #33-1251   #33-1263   #33-1268   #33-1273   #33-1278   #33-1282   
                #33-1285   
.STKM 		#46-2024    63-2622   #79-3883    80-3910   #146-8036  #149-8177   151-8239  #176-9708   177-9845  
.TPDEN		#5-253     #35-1359   #35-1363   #35-1367   #35-1371   #35-1375   #35-1380   #35-1384   #35-1393   #35-1398   
                #35-1403   #35-1407