Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/mcb/dcp.list
There are no other files named dcp.list in the archive.
DCP	MACRO M1110  04-FEB-80 13:06
TABLE OF CONTENTS

    10-  308	$DCPTB	- DDCMP FUNCTION DISPATCH TABLES
    11-  362	DCPXME	- TRANSMIT MESSAGE FOR THIS STATION
    12-  423	TXSND	- TRANSMIT A MESSAGE
    14-  663	BLCTL	- BUILD HEADERS FOR UNNUMBERED CONTROL MESSAGES.
    16-  750	BLDAT	- BUILD HEADER FOR DDCMP NUMBERED DATA MESSAGE.
    17-  790	BLMOP	- BUILD HEADER FOR DDCMP MOP MODE (BOOT) MESSAGE
    19-  858	CCBSET	- SAVE REGISTERS AND SET UP CCB FOR A DDCMP HEADER
    20-  920	CALTH	- FIND LENGTH AND END OF MESSAGE
    21-  953	DCPCTL	- DDCMP CONTROL FUNCTION ENTRY POINT
    22- 1065	CCPAST	- ASYNCH. ERROR HANDLING
    23- 1091	CTLENB	- ENABLE A LINE
    23- 1122	CCPENB	- LINE ENABLE COMPLETE
    24- 1150	CTLDIS	- DISABLE A LINE
    25- 1182	CTLMNT	- ENTER MAINTENANCE MODE
    26- 1216	CTLSTR	- ENTER START MODE
    27- 1288	SETLIN	- INITIALIZE LINE TABLE
    28- 1396	SETSTA	- INITIALIZE STATION TABLE
    29- 1462	CTLSTP	- SHUTDOWN A LINE
    30- 1562	CLNLIN	- DEALLOCATE ALL CCBS OWNED BY LINE
    31- 1617	CLNSTA	- KILL ALL OUTSTANDING MESSAGES
    32- 1655	DVRSN	- RESYNC THE DEVICE DRIVER
    32- 1686	DCPKCP	- KILL COMPLETION ROUTINE
    33- 1705	DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.
    35- 1909	SELND	- SELECT END PROCESSOR WITH POLL WAKING AND SHORT TIMER
    37- 2034	GTNXT	- GET NEXT STATION IN POLLING LIST
    38- 2098	DCPXCP	- TRANSMIT DONE ENTRY POINT
    39- 2345	DCPRCP	- RECEIVE MESSAGE DONE PROCESS
    48- 2763	CKCRC	- CRC COMPUTATION
    49- 2801	CKSTA	- CHECK FOR LEGAL STATION IN RECEIVED MESSAGE
    50- 2870	CKACK	- CHECK ON RECEIVED ACKNOWLEDGEMENT NUMBER
    52- 2954	RTACK	- RETURN ACKED MESSAGES
    53- 2989	TXRTX	- REQUEUE AND RETRANSMIT DATA MESSAGES FOR STATION
    54- 3025	NOTIF	- NOTIFY LLC OF FUNCTION COMPLETE OR STATUS CONDITION.
    55- 3056	SAV31	- SAVE REGISTERS R3 THROUGH R1
    56- 3084	RECEIVER ERROR CODE PROCESSING TABLE
    57- 3125	LGRER	- LOG RECEIVER ERRORS
    58- 3175	LGNAK	- LOG ERROR CODE IN RECEIVED NAK MESSAGES.
    58- 3203	LGCTR	- INCREMENT COUNTER AND LOG ERROR.
    59- 3232	LGENT	- LOG ENTRY IN ERROR LOGGING CIRCULAR BUFFER.
    60- 3272	T**TH	- THRESHOLD COUNTERS
    61- 3332	LOGGIT	- EVENT LOGGER
    62- 3370	SPPL*	- SET NEW POLLING STATE
    63- 3454	FNSTA	- FIND ADDRESS OF STATION BY LOGICAL STATION NO.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 3


      1		000000 			C$$MPT = 0			; INCLUDE MULTIPOINT CODE
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 4


						.NLIST	CND
      3						.TITLE	DCP
      4						.IDENT	/002080/
      9
     10					;
     11					; COPYRIGHT (C) 1978, 1979 BY
     12					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
     13					;
     14					;
     15					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
     16					; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
     17					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
     18					; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
     19					; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
     20					; TRANSFERRED.
     21					;
     22					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
     23					; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
     24					; CORPORATION.
     25					;
     26					; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
     27					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
     28					;
     29					;
     30					; MODULE DESCRIPTION:
     31					;
     32					;	DDCMP PROTOCOL PROCESS
     33					;
     34					;
     35					;
     36					; DISTRIBUTED SYSTEMS SOFTWARE ENGINEERING
     37					;
     38					; IDENT HISTORY:
     39					;
     40					; 1.00	10-FEB-78
     41					;	VERSION 2.0 RELEASE
     42					;
     43					; MODIFICATIONS:
     44					;
     45					; 2.00	29-MAR-79 ALAN D. PECKHAM
     46					;	RESTRUCTURE AND MODULARIZE FOR BETTER SUPPORTABILITY.
     47					;	ADD NEW POLLING ALGORITHM (FROM DMP11 SPECIFICATION).
     48					; 2.01	29-MAY-79 ALAN D. PECKHAM
     49					;	FIX DATA CRC CHECKING AND SAVE REGISTERS FROM $STCRC'S MAW.
     50					; 2.02	30-MAY-79 ALAN D. PECKHAM
     51					;	STATION SHUTDOWN COULD HANG UP CONTROL FUNCTION PROCESSING.
     52					;	ADD UNACKED MESSAGE CONDITION TO ACTIVE POLLING STATE.
     53					;	MOVE STATION POLLING PRIORITY RESET FROM END OF SELECTION INTERVAL
     54					;	TO BEGINNING OF INTERVAL.
     55					; 2.03	25-JUN-79 ALAN D. PECKHAM
     56					;	CONDITIONALIZATION FOR PT-PT ONLY VERSION.
     57					;	CORRECT BUG IN RETRANSMIT CODING CAUSED BY REDEFINITION OF S.MOTD
     58					; 2.04	7-AUG-79  ALAN D. PECKHAM
     59					;	WASN'T EXPECTING A SYNCHRONOUS COMPLETION FROM A CTL-ENB
     60					; 2.05	17-AUG-79 ALAN D. PECKHAM
     61					;	POINT-TO-POINT VERSION WAS CLEARING THE PENDING CONTROL FUNCTION QUEUE
     62					;	WHEN SCHEDULING A STOP OF THE STATION.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 4-1


     63					; 2.06	1-OCT-79  ALAN D. PECKHAM
     64					;	DEFAULT PT-PT TO NO MESSAGE ABUTTING TO ACCOMODATE DMC.
     65					; 2.07	17-OCT-79 ALAN D. PECKHAM
     66					;	REP FLAGS SS.REP AND SS.TIM SHOULD BE MUTUALLY EXCLUSIVE.
     67					;
     68					; 2.08	4-FEB-80 SCOTT G. ROBINSON
     69					;	DCPXCP FAILED TO SAVE R2 OVER CALL TO SPPLA THUS CAUSING
     70					;	REPS NOT TO HAPPEN IN WIERD WAYS.
     71					;
     72					; *****
     73					;
     74					; NOTE: THIS PROGRAM HAS BEEN RECENTLY BEEN MODIFIED, AND THE GLOBAL COMMENTS
     75					;	HAVE NOT BEEN UPDATED TO CORRESPOND TO THE CODE YET.
     76					;
     77					; *****
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 5


     79					;
     80					; FALL INTO NEXT ROUTINE
     81					;
     82						.MACRO	FALLR	SUBR
     83						    .IF NE SUBR-.
     84						.ERROR	;FAILURE ON ATTEMPTED CODE FALL THROUGH
     85						    .ENDC
     86						.ENDM	FALLR
     87					;
     88					; DISPATCH TABLE BUILDING MACROS
     89					;
     90						.MACRO	DSP OFF,ADR
     91						.IF NB	<OFF>
     92						DSPCHK	OFF,ADR
     93						.IFF
     94						DSPADR	ADR
     95						.ENDC
     96						.ENDM	DSP
     97					;
     98						.MACRO	DSPADR ADR
     99						.IF NB	<ADR>
    100						.WORD	ADR
    101						.IFF
    102						.WORD	.+1
    103						.ENDC
    104						.ENDM	DSPADR
    105					;
    106						.MACRO	DSPBEG BEG,MOD
    107						.IF NB	<BEG>
    108					BEG:
    109						.ENDC
    110						$$TABG	=.
    111						.MACRO	DSPCHK OFF,ADR
    112						.IF EQ	<.-$$TABG-<OFF'MOD'>>
    113						DSPADR	ADR
    114						.IFF
    115						.ERROR	DSP		;DISPATCH ADDRESS OUT OF SEQUENCE
    116						.ENDC
    117						.ENDM	DSPCHK
    118						.ENDM	DSPBEG
    119					;
    120						.MACRO	DSPEND
    121						.ENDM	DSPEND
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 6


    137					;
    138					;MACRO LIBRARY CALLS
    139					;
    140						.MCALL	CCBDF$,$LIBCN,$LIBCM,DDCDF$
    141						.MCALL	CMLDF$,EVLDF$,MAP,SAVMAP,RESMAP
    142	000000					CCBDF$
    143	000000					DDCDF$	<:>,<=>,LST
					;
					; DDCMP LINE TABLE OFFSETS
					;
	000000				.ASECT
		000000 				.=0
	000000				L.CTMO::.BLKB	1	; CURRENT TIMEOUT VALUE
	000001				L.ITMO::.BLKB	1	; LINK TIMER INITIAL VALUE
	000002				L.STS:: .BLKW	1	; LINE STATUS WORD
		000002 				LS.HDX==2		  ; SET IF LINK IS HALF DUPLEX
		000004 				LS.MPM==4		  ; SET IF MULTIPOINT MASTER
		000010 				LS.MPS==10		  ; SET IF MULTIPOINT SLAVE
									  ; ** NOTHING ELSE MUST BE IN LOWER BYTE **
		000400 				LS.LEN==400		  ; SET IF LINE ENABLED
		001000 				LS.PDD==1000		  ; SET IF TO POLL A DEAD STATION
		020000 				LS.CTL==20000		  ; SET IF CONTROL MESSAGE OUTSTANDING
		040000 				LS.RSA==40000		  ; SET IF CCB OUTSTANDING FOR A RESYNC
		100000 				LS.RSN==100000	  ; SET IF LINE IS IN RESYNC STATE
	000004				L.TDNQ::.BLKW	2	; TRANSMIT DONE QUEUE
	000010				L.FCNL::.BLKW	2	; CONTROL FUNCTION QUEUE
	000014				L.STAL::.BLKW	2	; STATIONS  LIST
	000020				L.CRST::.BLKW	1	; POINTER TO CURRENT STATION
	000022				L.ACST::.BLKW	1	; LAST ACTIVE STATION POLLED
	000024				L.DDST::.BLKW	1	; LAST DEAD STATION POLLED
	000026				L.XMST::.BLKW	1	; LAST STATION DATA TRANSMITTED FOR
	000030				L.HDR:: .BLKW	1	; LIST OF CCBS FOR HEADERS
						.IF	DF,M$$MGE
	000032				L.CRC:: .BLKW	2	; POINTER TO CRC LIBRARY ROUTINE
						.IFF
					L.CRC:: .BLKW	1	; POINTER TO CRC LIBRARY ROUTINE
						.ENDC
	000036				L.CHAR::.BLKW	2	; DEVICE CHARTERISTICS
	000042				L.LOGG::.BLKW	1	; EVENT LOGGING DESTINATION
	000044				L.UPDT::.BLKW	1	; ADDRESS OF POLLING UPDATE TIMER CCB
	000046				L.DEDT::.BLKW	1	; ADDRESS OF DEAD STATION POLLING TIMER CCB
	000050				L.PDLT::.BLKW	1	; ADDRESS OF POLLING DELAY TIMER CCB
	000052				L.BABT::.BLKW	1	; ADDRESS OF BABBLING STATION TIMER CCB
	000054				L.UPDI::.BLKB	1	; POLLING UPDATE INTERVAL (IN TICKS)
	000055				L.DEDI::.BLKB	1	; DEAD STATION POLLING INTERVAL (IN SECONDS)
	000056				L.PDLI::.BLKB	1	; POLLING DELAY INTERVAL (IN TICKS)
	000057				L.BABI::.BLKB	1	; BABBLING STATION TIMEOUT INTERVAL (IN SECONDS)
	000060				L.LNUM::.BLKB	1	; SYSTEM LINE NUMBER FOR THIS LINE
	000061				L.NMSG::.BLKB	1	; MAXIMUM DATA MESSAGES PENDING AT THE DRIVER.
	000062				L.MOTD::.BLKB	1	; MESSAGES OUTSTANDING TO THE DRIVER
	000063				L.ENA:: .BLKB	1	; LINE ENABLE COUNTER
	000064				L.NAST::.BLKB	1	; NUMBER OF ACTIVE STATIONS ON THIS LINE
	000065				L.NDED::.BLKB	1	; NUMBER OF DEAD STATIONS
						.EVEN
	000066				L.STBL::		; START OF STATION TABLES FOR LINE

					; DEFINITIONS FOR STATIONS TABLE OFFSETS
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 6-1


		000000 				.=0
	000000				S.LNK:: .BLKW	1	; STATION TABLE THREAD WORD
	000002				S.STS:: .BLKW	1	; STATION STATUS WORD
		000000 				SS.HLT==0		  ; STATION IS IN HALTED STATE
		000002 				SS.IST==2		  ; STATION IS IN ISTRT STATE
		000004 				SS.AST==4		  ; STATION IS IN ASTRT STATE
		000006 				SS.RUN==6		  ; STATION IS IN RUN STATE
		000010 				SS.MNT==10		  ; STATION IS IN MAINTENANCE STATE
					;
		000400 				SS.SEL==400		  ; STATION IS SELECTED
		001000 				SS.REP==1000		  ; REPLY TIMER REQUESTED
		002000 				SS.RTR==2000		  ; RETRANSMISSION REQUESTED
		004000 				SS.TIM==4000		  ; REPLY TIMER ACTIVE
		010000 				SS.PIG==10000		  ; PIGGYBACK SELECTS ON DATA MESSAGES
		020000 				SS.SHU==20000		  ; STATION BEING SHUT DOWN
		040000 				SS.ENA==40000		  ; STATION IS ENABLED
		100000 				SS.ACT==100000		  ; STATION HAS BEEN STARTED
	000004				S.PTXQ::.BLKW	2	; SLAVE-ONLY PRETRANSMIT QUEUE
	000010				S.TAKQ::.BLKW	2	; WAITING FOR ACKNOWLEDGE QUEUE
	000014				S.FCNL::.BLKW	1	; FUNCTION PENDING LIST
	000016				S.SLAN::.BLKB	1	; STATION LOGICAL ADDRESS NUMBER
	000017				S.SPAN::.BLKB	1	; STATION PHYSICAL ADDRESS NUMBER
	000020				S.STE:: .BLKB	1	; STATUS EXTENSION BYTE
		000001 				SE.SSK==1		  ; SET IF SEND STACK MESSAGE
		000002 				SE.SST==2		  ; SET IF SEND START MESSAGE
		000004 				SE.SNK==4		  ; SET IF SEND NAK MESSAGE
		000010 				SE.SRP==10		  ; SET IF SEND REP MESSAGE
		000020 				SE.SAK==20		  ; SET IF SEND ACK MESSAGE
		000040 				SE.SSL==40		  ; SET IF SEND SELECT ON THIS MESSAGE
	000021				S.PLS:: .BLKB	1	; POLLING STATE
		000000 				SP.PLO==0		  ; OFF-LINE
		000002 				SP.PLD==2		  ; DEAD
		000004 				SP.PLP==4		  ; POTENTIALLY DEAD
		000006 				SP.PLI==6		  ; INACTIVE
		000010 				SP.PLA==10		  ; ACTIVE
	000022				S.U::   .BLKW	1	; CURRENT STATION PRIORITY
	000024				S.I::   .BLKW	1	; CURRENT PRIORITY INCREMENT
	000026				S.PQ::  .BLKB	1	; POTENTIALLY DEAD INITIAL PRIORITY
	000027				S.PI::  .BLKB	1	; POTENTIALLY DEAD PRIORITY INCREMENT
	000030				S.IQ::  .BLKB	1	; INACTIVE INITIAL PRIORITY
	000031				S.II::  .BLKB	1	; INACTIVE PRIORITY INCREMENT
	000032				S.AQ::  .BLKB	1	; ACTIVE INITIAL PRIORITY
	000033				S.AI::  .BLKB	1	; ACTIVE PRIORITY INCREMENT
	000034				S.THI:: .BLKB	1	; THRESHOLD OF NON-DATA RESPONSES TO INACTIVE STATE
	000035				S.THP:: .BLKB	1	; THRESHOLD OF NON-RESPONSES TO POTENTIALLY DEAD STATE
	000036				S.THD:: .BLKB	1	; THRESHOLD OF NON-RESPONSES TO DEAD STATE
	000037				S.NMSG::.BLKB	1	; MAXIMUM DATA MESSAGES TO BE PIPELINED.
	000040				S.R::   .BLKB	1	; NO. OF LAST MESSAGE RECEIVED
	000041				S.TM1:: .BLKB	1	; NO. OF LAST MESSAGE QUEUED TO TRANSMITTER
	000042				S.X::   .BLKB	1	; NO. OF LAST MESSAGE RETURNED FROM TRANSMITTER
	000043				S.N::   .BLKB	1	; NO. OF HIGHEST MESSAGE RETURNED FROM TRANSMITTER
	000044				S.A::   .BLKB	1	; NO. OF LAST ACKED TRANSMITTED MESSAGE
	000045				S.AR::  .BLKB	1	; NO. OF LAST ACKED MESSAGE RETURNED
	000046				S.NRSP::.BLKB	1	; NUMBER OF TIMES NO RESPONSE RECEIVED TO A SELECT
	000047				S.NDAT::.BLKB	1	; NUMBER OF RESPONSES WITH NO DATA
	000050				S.MOTD::.BLKB	1	; NUMBER OF MESSAGES OUTSTANDING TO THE DRIVER
	000051				S.NKRE::.BLKB	1	; NAK REASON TO BE SENT IN NAK MESSAGE
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 6-2


					; COUNTERS FOR VARIOUS STATISTICS
	000052				S.CTB::			; BEGINNING OF BYTE COUNTERS
	000052				S.RCVE::.BLKB	1	; RECEIVE ERRORS
	000053				S.TMOE::.BLKB	1	; RECEIVE TIMEOUTS AND SELECTION ERRORS
	000054				S.RSTE::.BLKB	1	; RECEIVE SYSTEM RESOURCE ERRORS
	000055				S.XMTE::.BLKB	1	; TRANSMITTER ERRORS (FROM NAKS)
	000056				S.DSTE::.BLKB	1	; DESTINATION SYSTEM ERRORS (FROM NAKS)
	000057				S.STRC::.BLKB	1	; START AND RESTART COUNTER
	000060				S.REPS::.BLKB	1	; NO. OF REP MESSAGES SENT TO STATION
	000061				S.CTBE::		; END OF BYTE COUNTERS
					; THRESHOLD COUNTERS
	000061				S.RETH::.BLKB	1	; RECEIVER ERROR THRESHOLD COUNTER
	000062				S.RPTH::.BLKB	1	; REPS SENT THRESHOLD ERROR COUNTER
	000063				S.NAKT::.BLKB	1	; NAKS RECEIVED THRESHOLD COUNTER

					;WORD COUNTERS FOR VARIOUS STATISTICS
						.EVEN
	000064				S.TIM:: .BLKW	1	; TIME WHEN STATISTICS ZEROED
	000066				S.CTW::			; BEGINNING OF WORD COUNTERS
	000066				S.RCV:: .BLKW	1	; NUMBER OF MESSAGES RECEIVED
	000070				S.XMT:: .BLKW	1	; NUMBER OF MESSAGES TRANSMITTED
	000072				S.SEL:: .BLKW	1	; NUMBER OF TIMES SELECTED
	000074				S.CTWE::		; END OF WORD COUNTERS
	000074				S.STLG::		; LENGTH OF STATION TABLE

	000000				.PSECT
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 7


    145					;
    146					; STATUS BIT COMBINATIONS
    147					;
    148					; L.STS - LINE STATUS WORD
    149					;
    150		000014 				LS.MPT=LS.MPM!LS.MPS	 ; MASK FOR MULTIPOINT LINE.
    151					;
    152					; TIMER IDENTIFICATION - PLACED IN C.RSV OF TIMER CCB
    153					;
    154		000000 				TM.PDL=0		 ; POLLING DELAY TIMER
    155		000002 				TM.DED=2		 ; DEAD STATION POLLING TIMER
    156		000004 				TM.BAB=4		 ; BABBLING STATION TIMER
    157		000006 				TM.UPD=6		 ; POLLING UPDATE TIMER
    158					;
    159					; ASCII COMMUNICATION CHARACTERS
    160					;
    161		000005 				CM.ENQ=005		; ENQUIRE (CONTROL MESSAGE)
    162		000201 				CM.SOH=201		; START OF HEADER (DATA MESSAGE)
    163		000220 				CM.DLE=220		; DATA LINK ESCAPE (BOOT MESSAGE)
    164		000226 				CM.SYN=226		; SYN CHARACTER
    165					;
    166					; CONTROL MESSAGE TYPES
    167					;
    168		000001 				MT.ACK=001		; ACKNOWLEDGE
    169		000002 				MT.NAK=002		; NEGATIVE ACKNOWLEDGE
    170		000003 				MT.REP=003		; REPLY
    171		000004 				MT.RES=004		; RESET (ARCHAIC)
    172		000005 				MT.RSK=005		; RESET ACKNOWLEDGE (ARCHAIC)
    173		000006 				MT.STR=006		; START
    174		000007 				MT.STK=007		; START ACKNOWLEDGE
    175					;
    176					; DDCMP DEFINED NAK REASON ERROR CODES
    177					;
    178		000001 				RN.HBC=1		; HEADER BLOCK CHECK ERROR
    179		000002 				RN.DBC=2		; DATA BLOCK CHECK ERROR
    180		000003 				RN.REP=3		; REP RESPONSE
    181		000010 				RN.BUF=10		; RECEIVE BUFFER ALLOCATION ERROR
    182		000011 				RN.ROV=11		; RECEIVER OVERRUN FAILURE
    183		000020 				RN.MTL=20		; RECEIVED MESSAGE TOO LONG
    184		000021 				RN.HFE=21		; RECEIVED HEADER FORMAT ERROR
    185					;
    186					; SPECIAL HEADER BITS
    187					;
    188		000100 				DD.QSN=100		; DDCMP FINAL OR QSYNC BIT
    189		000200 				DD.SEL=200		; DDCMP SELECT BIT
    190					;
    191					; POSITIONAL CHECKS
    192					;
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 8


    201					;
    202					; INITIALIZATION VARIABLES - FOR BUILDING LINE AND STATION TABLES
    203					;
    204		000000 				LI.STS==0		; LINE STATUS.
    205
    207		000006 				LI.UPD==6.		; POLLING PRIORITY UPDATE INTERVAL (IN TICKS)
    208		000012 				LI.DED==10.		; DEAD STATION POLLING INTERVAL (IN SECONDS)
    213		000000 				LI.PDL==0.		; POLLING DELAY INTERVAL (IN TICKS)
    214		000000 				LI.BAB==0.		; BABBLING STATION TIMEOUT (IN SECONDS)
    215		000000 				LI.MSG==0.		; MAXIMUM DATA MESSAGES TO THE DRIVER
    216
    217		010000 				SI.STS==SS.PIG!SS.HLT	; STATION STATUS
    218		000000 				SI.PLS==SP.PLO		; POLLING STATE
    219		000000 				SI.STE==0		; STATUS EXTENSION
    220
    221		000000 				SI.A==0.*400+0.		; ACTIVE INCREMENT AND INITIAL VALUE
    222		000000 				SI.THI==0.		; THRESHOLD OF NON-DATA RESPONSES TO INACTIVE
    223		000000 				SI.I==0.*400+0.		; INACTIVE INCREMENT AND INITIAL VALUE
    224		000000 				SI.THP==0.		; THRESHOLD OF NON-RESPONSES TO POTENTIALLY DEAD
    225		000000 				SI.P==0.*400+0.		; POTENTIALLY DEAD INCREMENT AND INITIAL VALUE
    226		000000 				SI.THD==0.		; THRESHOLD OF NON-RESPONSES TO DEAD
    227		000000 				SI.MSG==0.		; MAXIMUM DATA MESSAGES TO BE PIPELINED
    228					;
    229					; UNINITIALIZED DEFAULTS - IF A VALUE IN THE TABLE IS ZERO, THESE ARE USED.
    230					;
    231	000000					.PSECT
    232	000000	   000 			.MNMSG::.BYTE	0.		; MINIMUM DATA MSGS TO THE DRIVER - NEW MSGS
    233									; GIVEN ONLY IF IT DROPS TO THIS OR BELOW.
    234	000001	   010 			.ERRTH::.BYTE	8.		; ERROR THRESHOLD - REPORT TO LLC AFTER
    235									; THIS MAY ERRORS.
    236					;
    237					; THE FOLLOWING TWO HAVE LOW BYTE FOR FDX PT-PT AND HIGH BYTE FOR ALL OTHERS
    238					;
    239	000002	   005 	   003 		.LIMSG::.BYTE	5.,	3.	; MAXIMUM DATA MESSAGES TO THE DRIVER
    240	000004	   001 	   002 		.SIMSG::.BYTE	1.,	2.	; MAXIMUM DATA MESSAGES TO BE PIPELINED
    241									; (STRUNG TOGETHER WITHOUT SYNS)
    243					;
    244					; THE FOLLOWING ARE MULTIPOINT ONLY
    245					;
    246	000006	   200 	   003 		.SIA::	.BYTE	128.,	  3.	; ACTIVE INITIAL VALUE AND INCREMENT
    247	000010	   154 	   002 		.SII::	.BYTE	128.-20., 2.	; INACTIVE INITIAL VALUE AND INCREMENT
    248	000012	   104 	   001 		.SIP::	.BYTE	128.-60., 1.	; POTENTIALLY DEAD INITIAL VALUE AND INCREMENT
    249	000014	   001 			.SITHI::.BYTE	1.		; THRESHOLD OF NON-DATA REPONSES TO INACTIVE
    250	000015	   002 			.SITHP::.BYTE	2.		; THRESHOLD OF NON-RESPONSES TO POTENTIALLY DEADD
    251	000016	   010 			.SITHD::.BYTE	8.		; THRESHOLD OF NON-RESPONSES TO DEAD
    253						.EVEN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 9


    255					;
    256					;%%%D/IAS%%%;
    257					;
    262						.MCALL	HWDDF$
    263	000020					HWDDF$
    265
    283
    284					; DEFINE EVENT LOGGING SYMBOLS
    285	000020					EVLDF$
    286					;
    287					; DEFINE THE THE CMLOG CALLING BLOCK
    288					;
    289		000004 				LGDAT=4			; HDR + THRESH = 2.WORDS = 4.BYTES
    290
    291	000000					.PSECT	DATA,D
    292	000000					CMLDF$	DCP,E$THDW,,,ERRTB,LGDAT
	000000	000000 			PDST:	.WORD	0		; LOGGING DESTINATION
	000002	000000 			PRSN:	.WORD	0		;    "    REASON
	000004	177777 			PDT1:	.WORD	-1		; FORMAT DEPENDENT ARG #1
	000006	177777 			PDT2:	.WORD	-1		;   "        "      "  #2
	000010	000004 			PLNG:	.WORD	LGDAT		; BYTES OF COROUTINE-ADDED INFO
	000012	014610 			PNAM:	.RAD50	/DCP/		; PROCESS NAME
	000014	000003 			PTYP:	.WORD	E$THDW		; EVENT TYPE CODE
	000016	000022'			PTAB:	.WORD	ERRTB		; ERROR CODE MAPPING TABLE
	000020	000000 			PSTA:	.WORD	0		; STATE WORD FOR USE BY $CMLOG
    293		000004'				PLIN=PDT1		; LINE NUMBER
    294		000005'				PSTN=PDT1+1		; STATION NUMBER
    295
    296					;
    297					; DEFINE THE ERROR XLATION TABLE
    298					;
    299	000022	177772 			ERRTB:	.WORD	-ERRTBL			; TABLE LENGTH
    300	000024	   374 	   011 			.BYTE	<CE.TMO&377>,E$RRTE	; RETRANSMISSION THRESH EXCEEDED
    301	000026	   372 	   014 			.BYTE	<CE.MOP&377>,E$RMOP	; MOP MSG RECEIVED DURING NORMAL OPER
    302	000030	   364 	   015 			.BYTE	<CE.SRC&377>,E$RSRC	; START MSG RCV'D  DURING NORMAL OPER
    303	000032	   376 	   031 			.BYTE	<CE.RTE&377>,E$RRET	; RCV ERROR THRESH EXCEEDED
    304	000034	   361 	   032 			.BYTE	<CE.NTE&377>,E$RNAK	; NAK THRESH EXCEEDED
    305	000036	   053 	   030 			.BYTE	<S.TMOE&377>,E$RSEL	; STATION SELECT ERROR
    306		000006 			  ERRTBL=<.-ERRTB-2>/2
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 10
$DCPTB	- DDCMP FUNCTION DISPATCH TABLES

    308						.SBTTL	$DCPTB	- DDCMP FUNCTION DISPATCH TABLES
    309					;+
    310					; THIS DISPATCH TABLE IS USED BY THE COMMUNICATIONS EXECUTIVE
    311					; TO DISPATCH FUNCTION REQUESTS FOR DDCMP LINE PROTOCOL MODULE.
    312					;-
    313
    314	000020					.PSECT
    315	000020				$DCPTB::DSPBEG
    316	000020					DSP	FC.XME,DCPXME	;TRANSMIT ENABLE (SEND MESSAGE)
    317	000022					DSP	FC.RCE,$RDBRT	;RECEIVE ENABLE (RETURN RECEIVE MESSAGE)
    318	000024					DSP	FC.KIL		;KILL I/O (UNSUPPORTED)
    319	000026					DSP	FC.CTL,DCPCTL	;EXECUTE CONTROL FUNCTION
    320	000030					DSP	FC.TIM,DCPTIM	;TIMEOUT ENTRY POINT
    321	000032					DSP	FC.XCP,DCPXCP	;TRANSMIT DONE (TX MESS RETRN BY DRIVER)
    322	000034					DSP	FC.RCP,DCPRCP	;RECEIVE DONE (MESS RECEIVED BY DRIVER)
    323	000036					DSP	FC.KCP,DCPKCP	;KILL COMPLETE
    324	000040					DSP	FC.CCP,DCPCCP	;CONTROL COMPLETE
    325	000042					DSPEND
    326					;
    327					; DISPATCH TABLE FOR CONTROL SUBFUNCTIONS
    328					;
    329	000042				CDISP:	DSPBEG	,</400>
    330	000042					DSP	FS.INI		;INITIALIZE
    331	000044					DSP	FS.STR,CTLSTR	;START
    332	000046					DSP	FS.STP,CTLSTP	;STOP
    333	000050					DSP	FS.TRM		;TERMINATE
    334	000052					DSP	FS.MNT,CTLMNT	;MAINTENANCE
    335	000054					DSP	FS.SET		;SET
    336	000056					DSP	FS.GET		;GET
    337	000060					DSP	FS.XON		;XON
    338	000062					DSP	FS.XOF		;XOFF
    339	000064					DSP	FS.RNG,$DDRNG	;LOOK FOR RING
    340	000066					DSP	FS.ENB,CTLENB	;ENABLE A LINE
    341	000070					DSP	FS.DIS,CTLDIS	;DISABLE A LINE
    342	000072					DSPEND
    343					;
    344					; DISPATCH TABLE FOR CONTROL COMPLETIONS
    345					;
    346	000072				CCMPTB:	DSPBEG	,</400>
    347	000072					DSP	FS.AST,CCPAST	;ASYNCH. ERROR
    348	000074					DSP	FS.STR,CCPSTR	;START
    349	000076					DSP	FS.STP,CCPSTP	;STOP
    350	000100					DSP	FS.TRM		;TERMINATE
    351	000102					DSP	FS.MNT		;MAINTENANCE
    352	000104					DSP	FS.SET		;SET CHARACTERISTICS
    353	000106					DSP	FS.GET		;GET CHARACTERISTICS
    354	000110					DSP	FS.XON		;XON
    355	000112					DSP	FS.XOF		;XOFF
    356	000114					DSP	FS.RNG		;LOOK FOR RING
    357	000116					DSP	FS.ENB,CCPENB	;ENABLE
    358	000120					DSP	FS.DIS,CCPNOP	;DISABLE
    359	000122					DSP	FS.MSN		;MODEM SENSE
    360	000124					DSPEND
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 11
DCPXME	- TRANSMIT MESSAGE FOR THIS STATION

    362						.SBTTL	DCPXME	- TRANSMIT MESSAGE FOR THIS STATION
    363					;+
    364					; THIS ENTRY POINT IS CALLED BY THE HIGHER LEVEL PROCESS TO TRANSMIT
    365					; A DATA OR MOP MESSAGE TO A STATION.  MESSAGES ARE ACCEPTED FOR
    366					; TRANSMISSION ONLY IF THE STATION IS IN MOP MODE OR HAS BEEN STARTED
    367					; UP AND IS IN NORMAL RUNNING MODE.  THE MESSAGE WILL BE SENT AS A
    368					; DDCMP NUMBERED DATA MESSAGE IF THE STATION IS ONLINE AND AS A DDCMP
    369					; MOP MESSAGE IF THE STATION IS IN MAINTENENCE MODE.
    370					;
    371					; IF THE LINE IS A MULTIPOINT MASTER AND POLLING IS SUSPENDED AND THE
    372					; STATION IS IN MOP MODE, THEN POLLING IS AWAKENED TO ENABLE TRANSMISSION
    373					; OF THE MOP MESSAGE.
    374					;
    375					; INPUTS:
    376					;	R5 = LINE TABLE ADDRESS
    377					;	R4 = MESSAGE CCB CHAIN FOR ONE MESSAGE
    378					;
    379					; OUTPUTS:
    380					;	NONE
    381					;
    382					; REGISTERS MODIFIED:
    383					;	ALL
    384					;-
    385
    386	000000					.PSECT	CODE,I
    388	000000				DCPXME:	CALL	FNSTA		;GET STATION TABLE ADDRESS
    392	000004	016002 	000002 			MOV	S.STS(R0),R2	;IF STATION NOT ACTIVE
    393	000010	100032 				BPL	70$		;THEN RETURN THIS FROM WHENCE IT CAME.
    394	000012	052764 	100000 	000022 		BIS	#CF.LB,C.FLG(R4) ;FORCE LAST BUFFER IN CCB (LJT)
    395	000020	042764 	000040 	000022 		BIC	#CF.SYN,C.FLG(R4) ;FORCE SYNC ONLY ON HEADER (LJT)
    396	000026	010003 				MOV	R0,R3		;GET ADDRESS OF
    397	000030	062703 	000004 			ADD	#S.PTXQ,R3	;PRE-TRANSMIT QUEUE
    398	000034					CALL	$CMQIN		;AND QUEUE THE ENTRY.
    400	000040	122702 	000010 			CMPB	#SS.MNT,R2	;IF NOT IN MOP MODE
    401	000044	001020 				BNE	80$		;THEN TRY TO SEND DATA.
    402	000046	032765 	000004 	000002 		BIT	#LS.MPM,L.STS(R5) ;IS THIS A MULTIPOINT MASTER?
    403	000054	001422 				BEQ	TXSND		;TRY TO SEND MOP MESSAGE IF NOT
    404	000056					CALL	SPPLA		;SET IN ACTIVE POLLING STATE.
    405	000062	005765 	000020 			TST	L.CRST(R5)	;IF NO CURRENT STATION
    406	000066	001002 				BNE	60$		;THEN
    407	000070					CALLR	POLWK		;WAKE UP POLLING.
    408	000074				60$:	RETURN
    412
    413	000076	012703 	100362 		70$:	MOV	#CE.ABO,R3	;COULD NOT DO
    414	000102					CALLR	$XMCMP		;RETURN IT TO THE SUCKER.
    416
    417	000106	005765 	000026 		80$:	TST	L.XMST(R5)	;IF ALL STATIONS WERE QUIESCENT
    418	000112	001003 				BNE	TXSND		;THEN
    419	000114	016565 	000014 	000026 		MOV	L.STAL(R5),L.XMST(R5) ;RESTART THE TRANSMITTER
    420	000122					FALLR	TXSND		;DROP INTO TRANSMIT ROUTINE.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 12
TXSND	- TRANSMIT A MESSAGE

    423						.SBTTL	TXSND	- TRANSMIT A MESSAGE
    424					;+
    425					; THIS CODE IS CALLED ANY TIME THERE IS A MESSAGE TO BE TRANSMITTED
    426					; TO ANY STATION ON A GIVEN LINE.
    427					;
    428					; INPUTS:
    429					;	R5 = LINE TABLE ADDRESS
    430					;
    431					; OUTPUTS:
    432					;	NONE
    433					;
    434					; REGISTERS MODIFIED:
    435					;	R4,R0
    436					;-
    437	000040					.PSECT	DATA,D
    438	000040	000000 	000040'		TXQUE:	.WORD	0,.-2		;QUEUE OF CONSTRUCTED MESSAGES
    439	000044	000000 			TXLST:	.WORD	0		;LAST HEADER IN QUEUE
    440	000046	000000 			TXCNT:	.WORD	0		;BABBLING COUNT FOR CURRENT TRANSMIT STATION
    441
    442	000122					.PSECT	CODE,I
    443					;
    444					; THE LINE MUST BE ENABLED TO TRANSMIT ANYTHING
    445					;
    446	000122	126567 	000062 	000000'	TXSND:	CMPB	L.MOTD(R5),.MNMSG ;IF ENOUGH MESSAGES TO THE DRIVER
    447	000130	101034 				BHI	14$		;OR
    448	000132	032765 	000400 	000002 		BIT	#LS.LEN,L.STS(R5) ;THIS LINE IS DISABLED
    449	000140	001430 				BEQ	14$		;THEN NOTHING CAN BE DONE.
    450	000142	004367 	010236 			JSR	R3,SAV31	;SAVE R3 THROUGH R1
    451	000146	010046 				MOV	R0,-(SP)
    452					;
    453					; IF THERE IS A CURRENT STATION, WE MUST HAVE PERMISSION
    454					; TO SEND TO IT.
    455					;
    456	000150	105067 	000046'			CLRB	TXCNT		;RESET BABBLING COUNT.
    457	000154	016500 	000020 			MOV	L.CRST(R5),R0	;GET CURRENT STATION
    459	000160	001561 				BEQ	60$		;IF THERE IS ONE
    461	000162	116067 	000037 	000046'		MOVB	S.NMSG(R0),TXCNT ;SET BABBLING COUNT
    462	000170	010001 				MOV	R0,R1		;AND POINT
    463	000172	005721 				TST	(R1)+		;TO STATUS WORD.
    464	000174	032711 	000400 			BIT	#SS.SEL,(R1)	;STATION IS NOT SELECTED
    466	000200	001551 				BEQ	60$		;THEN DO NOT TRANSMIT FOR THIS STATION.
    470	000202	111102 				MOVB	(R1),R2		;GET STATION STATE
    471	000204	000172 	000210'			JMP	@12$(R2)	;AND PROCESS ACCORDINGLY.
    472	000210				12$:	DSPBEG
    474	000210					DSP	SS.HLT,60$	; HALTED
    478	000212					DSP	SS.IST,20$	; INITIATE START
    479	000214					DSP	SS.AST,20$	; ACKNOWLEDGE START
    480	000216					DSP	SS.RUN,32$	; RUNNING
    481	000220					DSP	SS.MNT,40$	; MAINTENANCE
    482	000222					DSPEND
    483	000222				14$:	RETURN
    484					;
    485					; STATION STARTING UP - SEND SCHEDULED CONTROL MESSAGE
    486					;
    487	000224	032760 	000003 	000020 	20$:	BIT	#SE.SST!SE.SSK,S.STE(R0) ;IF START OR STACK SCHEDULED
    489	000232	001534 				BEQ	60$		;THEN
    493	000234					CALL	BLCTL		;BUILD AND QUEUE IT
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 12-1
TXSND	- TRANSMIT A MESSAGE

    494	000240	103067 				BCC	50$		;AND SET THE SELECT.
    495	000242	000167 	000402 			JMP	80$		;WHOOPS ! COULDN'T GET HEADER.
    496					;
    497					; SEND NON-ACK CONTROL MESSAGES FIRST
    498					;
    499	000246				30$:	CALL	BLCTL		;BUILD AND QUEUE MESSAGE
    500	000252	103462 				BCS	50$		;IF WE CAN.
    501	000254	032760 	000014 	000020 	32$:	BIT	#SE.SRP!SE.SNK,S.STE(R0) ;IF ANOTHER CONTROL MESSAGE TO SEND
    502	000262	001371 				BNE	30$		;THEN GO SEND IT.
    503					;
    504					; SEND AS MANY DATA MESSAGES AS ALLOWED
    505					;
    506	000264	032711 	022000 			BIT	#SS.RTR!SS.SHU,(R1) ;IF NOT RETRANSMITTING OR SHUTTING DOWN
    507	000270	001003 				BNE	34$		;THEN
    508	000272					CALL	TXDAT		;SEND AS MUCH DATA AS WE CAN
    509	000276	103450 				BCS	50$		;QUIT IF RESOURCE PROBLEMS.
    510					;
    511					; SCHEDULE AN ACK TO BE BUILT IF NECESSARY
    512					;
    513	000300	132760 	000040 	000020 	34$:	BITB	#SE.SSL,S.STE(R0) ;IF SELECT TO BE SENT
    514	000306	001415 				BEQ	38$		;AND
    515	000310	016704 	000044'			MOV	TXLST,R4	;NO LAST HEADER CCB
    516	000314	001407 				BEQ	36$		;THEN SCHEDULE AN ACK.
    517	000316	032711 	010000 			BIT	#SS.PIG,(R1)	;IF NOT PIGGYBACKING
    518	000322	001007 				BNE	38$		;AND
    519	000324	122764 	000201 	000024 		CMPB	#CM.SOH,C.BUF2(R4) ;LAST MESSAGE WAS A DATA MESSAGE
    520	000332	001003 				BNE	38$		;THEN
    521	000334	152760 	000020 	000020 	36$:	BISB	#SE.SAK,S.STE(R0) ;SCHEDULE AN ACK.
    522					;
    523					; SEND AN ACK IF ASKED NICELY
    524					;
    525	000342	132760 	000020 	000020 	38$:	BITB	#SE.SAK,S.STE(R0) ;IF ACK TO SEND
    526	000350	001423 				BEQ	50$		;THEN
    527	000352					CALL	BLCTL		;AND CREATE AN ACK.
    528	000356	000420 				BR	50$		;SET SELECT IF NECESSARY
    529					;
    530					; STATION IN MOP MODE - SEND MOP DATA MESSAGE
    531					;
    532	000360	010003 			40$:	MOV	R0,R3		;GET ADDRESS
    533	000362	062703 	000004 			ADD	#S.PTXQ,R3	;OF PRE-TRANSMIT QUEUE
    534	000366					CALL	$CMQRM		;AND PICK UP NEXT VICTIM.
    535	000372	103526 				BCS	80$		;IF NONE, DON'T SEND ANYTHING YET.
    536	000374					CALL	BLMOP		;BUILD AND QUEUE MAINTENANCE MESSAGE.
    538	000400	103003 				BCC	42$		;IF WE CAN'T
    542	000402					CALL	$CMQIF		;THEN RE-QUEUE DATA MESSAGE
    544	000406	000446 				BR	60$		;AND PASS THIS CHANCE BY.
    548
    549	000410	005713 			42$:	TST	(R3)		;IF NO MORE MESSAGES
    550	000412	001002 				BNE	50$		;THEN
    551	000414					CALL	SPPLO		;RESET POLLING TO OFFLINE.
    553					;
    554					; IF SELECT IS REQUESTED, THEN TURN THE SELECT ON THE LAST MESSAGE
    555					; IN THE CONSTRUCTED MESSAGE QUEUE.
    556					;
    557	000420	132760 	000040 	000020 	50$:	BITB	#SE.SSL,S.STE(R0) ;IF SELECTION REQUESTED
    559	000426	001436 				BEQ	60$		;THEN
    563	000430	016704 	000044'			MOV	TXLST,R4	;GET LAST HEADER CCB
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 12-2
TXSND	- TRANSMIT A MESSAGE

    565	000434	001433 				BEQ	60$		;IF THERE IS ONE
    569	000436	152764 	000200 	000026 		BISB	#DD.SEL,C.BUF2+2(R4) ;SET SELECT BIT
    570	000444	142760 	000040 	000020 		BICB	#SE.SSL,S.STE(R0) ;AND RESET SELECT REQUEST.
    571	000452	016402 	000032 			MOV	C.FLG2(R4),R2	;IF THERE IS A PREVIOUS HEADER
    572	000456	001403 				BEQ	52$		;THEN
    573	000460	152762 	000100 	000026 		BISB	#DD.QSN,C.BUF2+2(R2) ;TERMINATE IT
    574	000466	052764 	000040 	000022 	52$:	BIS	#CF.SYN,C.FLG(R4) ;AND RESYNCH ON THIS MESSAGE.
    575	000474	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MOP MODE
    576	000500	001404 				BEQ	54$		;OR
    578	000502	032765 	000012 	000002 		BIT	#LS.MPS!LS.HDX,L.STS(R5) ;SLAVE OR HALF DUPLEX
    579	000510	001405 				BEQ	60$		;THEN
    584	000512	042765 	000400 	000002 	54$:	BIC	#LS.LEN,L.STS(R5) ;DESELECT THE LINE
    585	000520	042711 	000400 			BIC	#SS.SEL,(R1)	;AND THE STATION.
    587					;
    588					; IF MULTIPOINT MASTER, THEN QUEUE DATA MESSAGES UP TO OUR LIMIT.
    589					;
    590	000524	032765 	000004 	000002 	60$:	BIT	#LS.MPM,L.STS(R5) ;IF LINE IS A MASTER
    591	000532	001446 				BEQ	80$		;AND
    592	000534	032765 	000400 	000002 		BIT	#LS.LEN,L.STS(R5) ;IT IS ENABLED
    593	000542	001442 				BEQ	80$		;THEN
    594	000544	016500 	000026 			MOV	L.XMST(R5),R0	;IF THERE IS
    595	000550	001437 				BEQ	80$		;A STATION WITH SOMETHING TO TRANSMIT
    596	000552	126565 	000062 	000061 	62$:	CMPB	L.MOTD(R5),L.NMSG(R5) ;AND NOT TOO MANY MESSAGES TO THE DRIVER
    597	000560	103033 				BHIS	80$		;THEN
    598	000562	011000 			64$:	MOV	(R0),R0		;GET NEXT STATION.
    599	000564	001002 				BNE	66$		;IF AT END OF LIST
    600	000566	016500 	000014 			MOV	L.STAL(R5),R0	;THEN GO TO FRONT.
    601	000572	032760 	022000 	000002 	66$:	BIT	#SS.SHU!SS.RTR,S.STS(R0) ;IF NOT SHUTTING DOWN OR RETRANSMITTING
    602	000600	001016 				BNE	68$		;AND
    603	000602	005760 	000004 			TST	S.PTXQ(R0)	;THERE IS DATA
    604	000606	001413 				BEQ	68$		;THEN
    605	000610	010001 				MOV	R0,R1		;GET ADDRESS
    606	000612	005721 				TST	(R1)+		;OF STATUS WORD.
    607	000614	122711 	000006 			CMPB	#SS.RUN,(R1)	;IF RUNNING
    608	000620	001006 				BNE	68$		;THEN
    609	000622	010065 	000026 			MOV	R0,L.XMST(R5)	;SET NEW TRANSMITTING STATION
    610	000626					CALL	TXDAT		;SEND DATA MESSAGES
    611	000632	103347 				BCC	62$		;AND LOOK AT MORE STATIONS
    612	000634	000405 				BR	80$		;OR NO MORE RESOURCES.
    613
    614	000636	026500 	000026 		68$:	CMP	L.XMST(R5),R0	;IF NOT EVERYONE CHECKED
    615	000642	001347 				BNE	64$		;THEN GO CHECK SOME MORE.
    616	000644	005065 	000026 			CLR	L.XMST(R5)	;OTHERWISE NO ONE WANTS SERVICE
    618					;
    619					; ENOUGH MESSAGES HAVE BEEN CONSTRUCTED; GIVE THEM TO THE DRIVER.
    620					;
    621	000650	016704 	000040'		80$:	MOV	TXQUE,R4	;IF NOTHING ON THE QUEUE
    622	000654	001413 				BEQ	82$		;THEN GO AWAY.
    623	000656					CALL	BLSYN		;OTHERWISE TERMINATE THE LAST HEADER
    624	000662	005067 	000040'			CLR	TXQUE		;RESET
    625	000666	012767 	000040'	000042'		MOV	#TXQUE,TXQUE+2	;THE MESSAGE QUEUE
    626	000674	005067 	000044'			CLR	TXLST		;THE LAST HEADER
    627	000700					CALL	$DDXME		;AND TRANSMIT THE MESSAGES.
    628	000704	012600 			82$:	MOV	(SP)+,R0	;RESTORE REGISTER
    629	000706					RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 13
TXSND	- TRANSMIT A MESSAGE

    631					;+
    632					; ON MULTIPOINT MASTERS WE CAN SEND DATA MESSAGES FOR OTHER STATIONS
    633					; AFTER WE HAVE SERVICED THE CURRENT ONE. HERE WE FIND ELIGIBLE STATIONS
    634					; AND SET UP DATA MESSAGES TO THE LIMIT OF THE STATION AND THE LINE.
    635					;
    636					; INPUTS:
    637					;	R5 = ADDRESS OF LINE TABLE
    638					;
    639					; OUTPUTS:
    640					;	NONE
    641					;
    642					; REGISTERS MODIFIED:
    643					;	R4,R3,R2,R1,R0
    644					;-
    645
    646	000710	010003 			TXDAT:	MOV	R0,R3		;GET ADDRESS
    647	000712	062703 	000004 			ADD	#S.PTXQ,R3	;OF PRE-TRANSMIT QUEUE.
    648	000716	126565 	000062 	000061 	12$:	CMPB	L.MOTD(R5),L.NMSG(R5) ;IF WE HAVE ROOM FOR ANOTHER DATA MSG
    649	000724	103011 				BHIS	14$		;THEN
    650	000726					CALL	$CMQRM		;PICK UP NEXT VICTIM.
    651	000732	103406 				BCS	14$		;
    652	000734					CALL	BLDAT		;BUILD AND QUEUE DATA MESSAGE.
    653	000740	103405 				BCS	16$		;IF SUCCESSFUL
    654	000742	105367 	000046'			DECB	TXCNT		;COUNT THIS MESSAGE OUT
    655	000746	001363 				BNE	12$		;AND DO MORE IF WE CAN.
    656	000750	000241 			14$:	CLC
    657	000752					RETURN
    658
    659	000754				16$:	CALL	$CMQIF		;RE-QUEUE MESSAGE
    660	000760	000261 				SEC
    661	000762					RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 14
BLCTL	- BUILD HEADERS FOR UNNUMBERED CONTROL MESSAGES.

    663						.SBTTL	BLCTL	- BUILD HEADERS FOR UNNUMBERED CONTROL MESSAGES.
    664					;+
    665					; HEADERS FOR ALL CONTROL MESSAGES ARE BUILT HERE.  THE PRIORITY
    666					; ORDER IS DETERMINED BY THE ORDER OF THE BITS IN S.STE
    667					; EACH BIT SET INDICATES THAT A MESSAGE OF A GIVEN TYPE
    668					; IS TO BE SENT.
    669					;
    670					; INPUT:
    671					;	R0 = STATION TABLE ADDRESS
    672					;	R5 = LINE TABLE ADDRESS
    673					; OUTPUT:
    674					;	R4 = CONSTRUCTED HEADER CCB
    675					;
    676					; REGISTERS MODIFIED:
    677					;	R4
    678					;-
    679
    680	000764	005004 			BLCTL:	CLR	R4		;NO DATA CCB
    681	000766	004167 	000346 			JSR	R1,CCBSET	;SAVE REGS AND SET UP CCB
    682	000772	112722 	000005 			MOVB	#CM.ENQ,(R2)+	;SET CONTROL FUNCTION
    683	000776	012701 	000044'			MOV	#CTLTB-4,R1	;AND GET FUNCTION TABLE
    684	001002	022121 			10$:	CMP	(R1)+,(R1)+	;BYPASS ENTRY
    685	001004	131160 	000020 			BITB	(R1),S.STE(R0)	;IS THIS THE ONE ?
    686	001010	001774 				BEQ	10$		;IF SO,
    687	001012	142160 	000020 			BICB	(R1)+,S.STE(R0)	;TURN IT OFF
    688	001016	112122 				MOVB	(R1)+,(R2)+	;COPY FUNCTION CODE
    689	001020	000131 				JMP	@(R1)+		;AND GO TO APPROPRIATE PROCESSOR
    690
    691					;
    692					; PRIORITY ORDERED TABLE FOR CHECKING FOR WHICH
    693					; CONTROL MESSAGE TO SEND
    694					;
    695
    696	000050					.PSECT	DATA,D
    697	000050	   001 	   007 		CTLTB:	.BYTE	SE.SSK,MT.STK	;STACK MESSAGE
    698	000052	001022'				.WORD	BLSTK
    699	000054	   002 	   006 			.BYTE	SE.SST,MT.STR	;START MESSAGE
    700	000056	001022'				.WORD	BLSTR
    701	000060	   004 	   002 			.BYTE	SE.SNK,MT.NAK	;NAK MESSAGE
    702	000062	001072'				.WORD	BLNAK
    703	000064	   010 	   003 			.BYTE	SE.SRP,MT.REP	;REP MESSAGE
    704	000066	001042'				.WORD	BLREP
    705	000070	   020 	   001 			.BYTE	SE.SAK,MT.ACK	;ACK MESSAGE
    706	000072	001110'				.WORD	BLACK
    707									;**WATCH OUT** CAN'T GET THIS FAR !
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 15
BLCTL	- BUILD HEADERS FOR UNNUMBERED CONTROL MESSAGES.

    709	001022					.PSECT	CODE,I
    710					;
    711					; BUILD DDCMP START MESSAGE
    712					;
    713	001022				BLSTR:
    714					;
    715					; BUILD DDCMP STACK MESSAGE
    716					;
    717	001022	105022 			BLSTK:	CLRB	(R2)+		;SUB-TYPE IS ZERO
    718	001024	105022 				CLRB	(R2)+		;FILLER
    719	001026	105022 				CLRB	(R2)+		;FILLER
    720	001030	052760 	001000 	000002 		BIS	#SS.REP,S.STS(R0) ;START REP TIMER
    721	001036					CALLR	TSTTH		;UPDATE THRESHOLD COUNTER
    722					;
    723					; BUILD DDCMP REP MESSAGE
    724					; LOG REP MESSAGE SENT AND SAVE NUMBER SENT IN MESSAGE FOR
    725					; RESPONSE FOR LATER COMPARISON.
    726					;
    727	001042	105022 			BLREP:	CLRB	(R2)+		;REP SUB-TYPE IS ZERO
    728	001044	105022 				CLRB	(R2)+		;FILLER
    729	001046	116022 	000043 			MOVB	S.N(R0),(R2)+	;LAST TX MESS NO. IS 5TH BYTE
    730	001052					CALL	BLSYN		;PRECEED WITH SYNS
    731
    732	001056	012703 	000060 			MOV	#S.REPS,R3	;OFFSET FOR REP COUNTER
    733	001062					CALL	LGCTR		;LOG AND BUMP COUNTER
    734	001066					CALLR	TNKTH		;UPDATE THRESHOLD COUNTER
    735					;
    736					; BUILD NAK MESSAGE
    737					;
    738	001072	116022 	000051 		BLNAK:	MOVB	S.NKRE(R0),(R2)+ ;WAS NAK, INSERT NAK REASON
    739	001076	116022 	000040 			MOVB	S.R(R0),(R2)+	;ACKNOWLEDGE LAST RECEIVED MESSAGE
    740	001102	105022 				CLRB	(R2)+		;FILLER
    741	001104					CALLR	BLSYN		;PRECEED WITH SYNS AND INSERT STATION.
    742					;
    743					; BUILD ACK MESSAGE
    744					;
    745	001110	105022 			BLACK:	CLRB	(R2)+		;ACK SUB-TYPE OF ZERO
    746	001112	116022 	000040 			MOVB	S.R(R0),(R2)+	;ACKNOWLEDGE LAST RECEIVED MESSAGE
    747	001116	105022 				CLRB	(R2)+		;FILLER
    748	001120					RETURN			;INSERT STATION AND RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 16
BLDAT	- BUILD HEADER FOR DDCMP NUMBERED DATA MESSAGE.

    750						.SBTTL	BLDAT	- BUILD HEADER FOR DDCMP NUMBERED DATA MESSAGE.
    751					;+
    752					; A COMPLETE HEADER FOR A NUMBERED DATA MESSAGE IS BUILT
    753					; INCLUDING MESSAGE TYPE, LENGTH OF MESSAGE (NOT INCLUDING
    754					; CRC AT END OF DATA), AND MESSAGE SEQUENCE NUMBER.
    755					;
    756					; INPUTS:
    757					;	R5 = ADDRESS OF LINE TABLE
    758					;	R4 = ADDRESS OF MESSAGE CHAIN
    759					;	R0 = ADDRESS OF STATION TABLE
    760					;
    761					; OUTPUTS:
    762					;	R4 = CONSTRUCTED HEADER WITH DATA CCB CHAINED TO IT
    763					;
    764					; REGISTERS MODIFIED:
    765					;	R4
    766					;-
    767
    768	001122					.PSECT	CODE,I
    769	001122	004167 	000212 		BLDAT:	JSR	R1,CCBSET	;SAVE REG AND DET UP CCB
    770	001126	112722 	000201 			MOVB	#CM.SOH,(R2)+	;FIRST CHAR IS SOH
    771	001132					CALL	BLLTH		;SET LENGTH OF MESSAGE
    772	001136	116022 	000040 			MOVB	S.R(R0),(R2)+	;ACKNOWLEDGE LAST MSG RCVD
    773	001142	126060 	000043 	000041 		CMPB	S.N(R0),S.TM1(R0) ;IF THIS MESSAGE
    774	001150	001002 				BNE	10$		;HAS NOT BEEN SENT BEFORE
    775	001152	105260 	000043 			INCB	S.N(R0)		;THEN UPDATE THE HIGH WATER MARK.
    776	001156	105260 	000041 		10$:	INCB	S.TM1(R0)	;GET NUMBER OF NEXT TRANSMIT MESSAGE
    777	001162	116022 	000041 			MOVB	S.TM1(R0),(R2)+	;MESSAGE NUMBER IS 5TH BYTE
    779	001166	016703 	000044'			MOV	TXLST,R3	;IF THERE IS A LAST HEADER
    780	001172	001406 				BEQ	20$		;AND
    781	001174	126360 	000031 	000017 		CMPB	C.BUF2+5(R3),S.SPAN(R0) ;STATION HAS CHANGED
    782	001202	001405 				BEQ	30$		;THEN
    783	001204					CALL	BLSYN		;RESYNCHRONIZE TRANSMITTER.
    785	001210	116067 	000037 	000046'	20$:	MOVB	S.NMSG(R0),TXCNT ;SET BABBLING COUNT.
    786	001216	142760 	000020 	000020 	30$:	BICB	#SE.SAK,S.STE(R0) ;(ACK NO LONGER NECESSARY)
    787	001224	105265 	000062 			INCB	L.MOTD(R5)	;ONE MORE DATA MESSAGE TO THE DRIVER.
    788	001230					RETURN			;SET STATION AND RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 17
BLMOP	- BUILD HEADER FOR DDCMP MOP MODE (BOOT) MESSAGE

    790						.SBTTL	BLMOP	- BUILD HEADER FOR DDCMP MOP MODE (BOOT) MESSAGE
    791					;+
    792					; INPUT:
    793					;	R5 = ADDRESS OF LINE TABLE
    794					;	R4 = ADDRESS OF MESSAGE CHAIN
    795					;	R0 = ADDRESS OF STATION TABLE
    796					;
    797					; OUTPUTS:
    798					;	R4 = CONSTRUCTED HEADER WITH DATA CCB CHAINED TO IT
    799					;
    800					; REGISTERS MODIFIED:
    801					;	R4
    802					;-
    803
    804	001232					.PSECT	CODE,I
    805	001232	004167 	000102 		BLMOP:	JSR	R1,CCBSET	;SAVE REGS AND SETUP CCB
    806	001236	112722 	000220 			MOVB	#CM.DLE,(R2)+	;FIRST CHAR IS DLE
    807	001242					CALL	BLLTH		;SET LENGTH OF MESSAGE INTO HDR
    808	001246	105022 				CLRB	(R2)+		;INSERT FILL
    809	001250	105022 				CLRB	(R2)+		;AND ANOTHER
    810	001252	152760 	000040 	000020 		BISB	#SE.SSL,S.STE(R0) ;SELECT MUST ACCOMPANY
    811	001260					CALL	BLSYN		;PRECEED WITH SYNS.
    812	001264	105265 	000062 			INCB	L.MOTD(R5)	;ONE MORE DATA MESSAGE TO THE DRIVER.
    813	001270					RETURN			;SET STATION AND RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 18
BLMOP	- BUILD HEADER FOR DDCMP MOP MODE (BOOT) MESSAGE

    815					;+
    816					; SET TO PRECEED THIS HEADER WITH SYNS AND SET QSYN ON LAST HEADER.
    817					;
    818					; INPUTS:
    819					;	R4 = CURRENT HEADER CCB
    820					;
    821					; OUTPUTS:
    822					;	NONE
    823					;
    824					; REGISTERS MODIFIED:
    825					;	R3
    826					;-
    827
    828	001272					.PSECT	CODE,I
    829	001272	016703 	000044'		BLSYN:	MOV	TXLST,R3	;IF THERE IS A LAST HEADER CCB
    830	001276	001403 				BEQ	10$		;THEN
    831	001300	152763 	000100 	000026 		BISB	#DD.QSN,C.BUF2+2(R3) ;SET THE QSYN BIT
    832	001306	052764 	000040 	000022 	10$:	BIS	#CF.SYN,C.FLG(R4) ;AND PRECEED THIS HEADER WITH SYNS.
    833	001314					RETURN
    834
    835					;+
    836					; CALCULATE THE LENGTH OF THE MESSAGE SEGMENT AND INSERT IT IN THE HEADER
    837					;
    838					; INPUTS:
    839					;	R4 = START OF HEADER CCB
    840					;	R2 = POINTER TO SECOND BYTE OF DDCMP HEADER
    841					;
    842					; OUTPUTS:
    843					;	R2 = ADVANCED TWO BYTES
    844					;
    845					; REGISTERS MODIFIED:
    846					;	R3,R2,R1
    847					;-
    848
    849	001316	010446 			BLLTH:	MOV	R4,-(SP)	;SAVE CCB
    850	001320	011404 				MOV	(R4),R4		;AND GET START OF MESSAGE.
    851	001322					CALL	CALTH		;CALCULATE LENGTH OF MESSAGE
    852	001326	110122 				MOVB	R1,(R2)+	;INSERT LOW BYTE
    853	001330	000301 				SWAB	R1		;AND
    854	001332	110122 				MOVB	R1,(R2)+	;HIGH BYTE.
    855	001334	012604 				MOV	(SP)+,R4	;RESTORE HEADER
    856	001336					RETURN			;AND GO AWAY.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 19
CCBSET	- SAVE REGISTERS AND SET UP CCB FOR A DDCMP HEADER

    858						.SBTTL	CCBSET	- SAVE REGISTERS AND SET UP CCB FOR A DDCMP HEADER
    859					;+
    860					; THIS CO-ROUTINE GETS A CCB FROM DDCMP'S INTERNAL POOL AND LINKS
    861					; THE REST OF THE MESSAGE TO IT. THE INITIAL CCB IS SET UP AS THE
    862					; HEADER CCB WITH THE REST OF THE HEADER TO BE SUPPLIED BY OTHER
    863					; ROUTINES
    864					;
    865					; CALLING SEQUENCE:
    866					;	JSR	R1,CCBSET
    867					;
    868					; INPUT:
    869					;	R5 = LINE TABLE ADDRESS
    870					;	R4 = ADDRESS OF CCB CHAIN
    871					;	R0 = STATION TABLE ADDRESS
    872					;
    873					; CO-ROUTINE OUTPUT:
    874					;	R4 = FORMATTED HEADER CCB
    875					;	R3 = UNDEFINED
    876					;	R2 = POINTER TO START OF DDCMP HEADER
    877					;	R1 = UNDEFINED
    878					;
    879					; FINAL OUTPUT:
    880					;   CARRY CLEAR
    881					;	R4 = CONSTRUCTED HEADER CCB
    882					;   CARRY SET
    883					;	NO HEADER CCB AVAILABLE
    884					;
    885					; REGISTERS MODIFIED:
    886					;	R4
    887					;-
    888
    889	001340	010246 			CCBSET:	MOV	R2,-(SP)	;SAVE R2
    890	001342	010346 				MOV	R3,-(SP)	;SAVE R3
    891	001344	010403 				MOV	R4,R3		;SAVE HIS DATA CCB
    892	001346					CALL	$CCBGT		;GET A CCB FOR A HEADER
    893	001352	103444 				BCS	80$		;AND IF SUCCESSFUL
    894	001354	010314 				MOV	R3,(R4)		;LINK TO REST OF IT.
    895	001356	010064 	000004 			MOV	R0,C.NSP(R4)	;SET STATION TABLE ADDRESS FOR LATER
    896	001362	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET DEVICE LINE NUMBER
    897	001370	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;SET STATION NUMBER
    898	001376	005064 	000012 			CLR	C.STS(R4)	;INITIAL STATUS
    899	001402	010402 				MOV	R4,R2		;COPY CCB ADDRESS
    900	001404	062702 	000020 			ADD	#C.CNT,R2	;POINT TO COUNT WORD
    901	001410	010203 				MOV	R2,R3		;AND KEEP COPY.
    902	001412	012722 	000006 			MOV	#6,(R2)+	;COUNT IS 6 BYTES (NO CRC)
    903	001416	012722 	100034 			MOV	#CF.SOM!CF.EOM!CF.HDR!CF.LB,(R2)+ ;SET FLAGS FOR HEADER
    904	001422	010243 				MOV	R2,-(R3)	;BUFFER ADDRESS
    905	001424	005043 				CLR	-(R3)		;AND MAPPING BIAS.
    906	001426					CALL	(R1)		;RETURN TO CALLER
    907	001430	116012 	000017 			MOVB	S.SPAN(R0),(R2)	;INSERT STATION ADDRESS.
    908	001434	016764 	000044'	000032 		MOV	TXLST,C.FLG2(R4) ;LINK PREVIOUS HEADER TO THIS ONE
    909	001442	010467 	000044'			MOV	R4,TXLST	;SET NEW LAST HEADER
    910	001446	012703 	000040'			MOV	#TXQUE,R3	;GET CONSTRUCTED MESSAGE QUEUE
    911	001452					CALL	$CMQIN		;AND INSERT IN QUEUE.
    912	001456	105260 	000050 			INCB	S.MOTD(R0)	;BUMP STATION MESSAGE COUNTER
    913	001462	005727 				TST	(PC)+		;CLEAR CARRY FOR SUCCESSFUL BUILD
    914	001464	010304 			80$:	MOV	R3,R4		;RECOVER HIS DATA CCB FOR UNSUCCESSFUL BUILD
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 19-1
CCBSET	- SAVE REGISTERS AND SET UP CCB FOR A DDCMP HEADER

    915	001466	012603 				MOV	(SP)+,R3	;RESTORE R3 THROUGH R1
    916	001470	012602 				MOV	(SP)+,R2
    917	001472	012601 				MOV	(SP)+,R1
    918	001474					RETURN			;RETURN TO CALLER
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 20
CALTH	- FIND LENGTH AND END OF MESSAGE

    920						.SBTTL	CALTH	- FIND LENGTH AND END OF MESSAGE
    921					;+
    922					; THE LENGTH OF A MESSAGE IS CALCULATED BY ACCUMULATING THE
    923					; LENGTH OF EVERY BUFFER ENTRY IN EACH CCB WHICH COMPRISES THE
    924					; MESSAGE.
    925					;
    926					; INPUTS:
    927					;	R4 = FIRST CCB OF MESSAGE CHAIN
    928					;
    929					; OUTPUTS:
    930					;	R3 = ADDRESS OF LAST CCB IN MESSAGE
    931					;	R1 = BYTE COUNT OF ENTIRE MESSAGE
    932					;
    933					; REGISTERS MODIFIED:
    934					;	R3,R1
    935					;-
    936
    937	001476	010403 			CALTH:	MOV	R4,R3		;COPY CCB ADDR OF START OF MESSAGE
    938	001500	005001 				CLR	R1		;INIT COUNTER
    939	001502	000401 				BR	20$		;START ON THIS CCB
    940
    941	001504	011303 			10$:	MOV	(R3),R3		;GET NEXT CCB IN CHAIN
    942	001506	066301 	000020 		20$:	ADD	C.CNT1(R3),R1	;ADD IN LENGTH OF SEGMENT
    943	001512	032763 	000004 	000022 		BIT	#CF.EOM,C.FLG1(R3) ;IF NOT END OF MESSAGE
    944	001520	001011 				BNE	90$		;AND
    945	001522	005763 	000022 			TST	C.FLG1(R3)	;OTHER DESCRIPTOR IN USE
    946	001526	100766 				BMI	10$		;THEN
    947	001530	066301 	000030 			ADD	C.CNT2(R3),R1	;ADD IN OTHER SEGMENT.
    948	001534	032763 	000004 	000032 		BIT	#CF.EOM,C.FLG2(R3) ;IF NOT END OF MESSAGE
    949	001542	001760 				BEQ	10$		;THEN GO FOR MORE.
    950
    951	001544				90$:	RETURN			;RETURN TO CALLER
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 21
DCPCTL	- DDCMP CONTROL FUNCTION ENTRY POINT

    953						.SBTTL	DCPCTL	- DDCMP CONTROL FUNCTION ENTRY POINT
    954					;+
    955					; THIS IS THE ENTRY POINT FOR ALL CONTROL FUNCTION REQUESTS.
    956					; IF NO FUNCTIONS ARE PENDING THE CCB IS ACTED UPON IMMEDIATELY,
    957					; OTHERWISE THE CCB IS QUEUED UNTIL THE CURRENT FUNCTION COMPLETES.
    958					; THE HALT FUNCTION CAUSES THE QUEUE TO BE EMPTIED AND THEN
    959					; IT EXECUTES IMMEDIATELY. THIS ROUTINE IS ENETERED AT DDCFN2 BY
    960					; THE CONTROL COMPLETE ROUTINE TO RETURN THE COMPLETION TO THE HLP
    961					; AND EXECUTE THE NEXT FUNCTION.
    962					;
    963					; INPUT:
    964					;	R5 = LINE TABLE ADDRESS
    965					;	R4 = CCB ADDRESS OF REQUEST
    966					;	R3 = FUNCTION CODE
    967					;
    968					; OUTPUT:
    969					;	FUNCTION PREFORMED AS REQUESTED OR ERROR RETURNED
    970					;
    971					; REGISTERS MODIFIED:
    972					;	R4,R3,R2,R1,R0
    973					;-
    974
    975	001546	005064 	000012 		DCPCTL:	CLR	C.STS(R4)	;INITIALIZE RETURN STATUS
    976	001552	022703 	000004 			CMP	#FS.STP/400,R3	;IS IT A HALT
    977	001556	001035 				BNE	40$		;NO, SO CONTINUE AS USUAL
    978					;
    979					; IF IT IS A STOP, WE MUST KILL ALL OTHER ACTIONS FOR THE
    980					; STATION BEFORE GOING FURTHER
    981					;
    982	001560	010401 				MOV	R4,R1		;SAVE THE CCB POINTER
    983	001562	010502 				MOV	R5,R2		;AND GET ADDRESS
    985	001564	062702 	000012 			ADD	#L.FCNL+2,R2	;OF CONTROL FUNCTION LIST.
    986	001570	011246 				MOV	(R2),-(SP)	;COPY THE LIST
    987	001572	014246 				MOV	-(R2),-(SP)	;ONTO STACK.
    988	001574	001424 				BEQ	30$		;IF NON-EMPTY
    989	001576	005012 				CLR	(R2)		;THEN SET IT EMPTY.
    990	001600	010262 	000002 			MOV	R2,2(R2)
    991	001604	010603 			10$:	MOV	SP,R3		;GET THE NEXT CONTROL CCB
    996	001606					CALL	$CMQRM		;AND
    997	001612	103415 				BCS	30$		;IF THERE IS ONE
    999	001614	026461 	000006 	000006 		CMP	C.LIN(R4),C.LIN(R1) ;CHECK IF IT IS FOR THIS STATION.
   1000	001622	001005 				BNE	20$		;IF SO,
   1002	001624	012703 	100362 			MOV	#CE.ABO,R3	;SET ABORT STATUS
   1003	001630					CALL	$CTCMP		;AND RETURN A COMPLETION
   1004	001634	000763 				BR	10$		;NOW BACK FOR THE NEXT
   1006
   1007	001636	010203 			20$:	MOV	R2,R3		;PUT CCB BACK INTO
   1008	001640					CALL	$CMQIN		;THE CONTROL FUNCTION QUEUE.
   1009	001644	000757 				BR	10$
   1010
   1011	001646	022626 			30$:	CMP	(SP)+,(SP)+	;REMOVE OUR TEMPORARY QUEUE
   1012	001650	010104 				MOV	R1,R4		;AND RECOVER THE CONTROL CCB.
   1016					;
   1017					; IF THERE IS A CONTROL FUNCTION IN PROGRESS, THEN JUST QUEUE THIS ONE UP
   1018					; FOR LATER PROCESSING.
   1019					;
   1020	001652	032765 	020000 	000002 	40$:	BIT	#LS.CTL,L.STS(R5) ;CONTROL MESSAGE OUTSTANDING
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 21-1
DCPCTL	- DDCMP CONTROL FUNCTION ENTRY POINT

   1021	001660	001433 				BEQ	CTLDSP		;NO, SO EXECUTE THIS ONE
   1022	001662	010503 				MOV	R5,R3		;GET LINE TABLE ADDRESS
   1023	001664	062703 	000010 			ADD	#L.FCNL,R3	;AND POINT TO CONTROL QUEUE
   1024	001670					CALLR	$CMQIN		;QUEUE THE CONTROL FUNCTION
   1025					;
   1026					; CONTROL FUNCTION COMPLETED TO THE DRIVER - DO END PROCESSING
   1027					;
   1029	001674				DCPCCP:	CALL	FNSTA		;GET THE PROPER STATION TABLE
   1033	001700	010001 				MOV	R0,R1		;COPY THE STATION TABLE ADDRESS
   1034	001702	005721 				TST	(R1)+		;POINT TO THE STATION STATUS WORD
   1035	001704					CALL	@CCMPTB(R3)	;DISPATCH TO PROPER ROUTINE
   1036	001710	103433 				BCS	CCPNOP		;IF NOT FINISHED, GO AWAY.
   1037					;
   1038					; CONTROL FUNCTION FINISHED - RETURN CCB AND TRY TO START NEW FUNCTION
   1039					;
   1040	001712	042765 	020000 	000002 	DDCFN2:	BIC	#LS.CTL,L.STS(R5) ;CONTROL MESSAGE COMPLETE
   1041	001720	005704 				TST	R4		;WAS A CCB RETURNED
   1042	001722	001404 				BEQ	30$		;NO, BUT TRY THE NEXT FUNCTION
   1043	001724	016403 	000012 			MOV	C.STS(R4),R3	;GET STATUS RETURNED BY LOWER LEVEL
   1044	001730					CALL	$CTCMP		;AND RETURN TO THE HLP
   1045	001734	010503 			30$:	MOV	R5,R3		;GET LINE TABLE ADDRESS
   1046	001736	062703 	000010 			ADD	#L.FCNL,R3	;POINT TO CONTROL QUEUE
   1047	001742					CALL	$CMQRM		;GET THE CONTROL CCB
   1048	001746	103414 				BCS	CCPNOP		;NONE SO EXIT
   1049					;
   1050					; INITIATE NEW FUNCTION
   1051					;
   1053	001750				CTLDSP:	CALL	FNSTA		;GET THE PROPER STATION TABLE
   1057	001754	010001 				MOV	R0,R1		;COPY THE STATION TABLE ADDRESS
   1058	001756	005721 				TST	(R1)+		;POINT TO THE STATION STATUS WORD
   1059	001760	116403 	000011 			MOVB	C.MOD(R4),R3	;COPY THE FUNCTION CODE
   1060	001764	052765 	020000 	000002 		BIS	#LS.CTL,L.STS(R5) ;INDICATE CONTROL MESSAGE IN PROGRESS
   1061	001772					CALL	@CDISP(R3)	;AND DISPATCH TO IT
   1062	001776	103345 				BCC	DDCFN2		;IF SYNCHRONOUS, THEN COMPLETE IMMEDIATELY
   1063	002000				CCPNOP:	RETURN			;OTHERWISE WAIT FOR COMPLETION.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 22
CCPAST	- ASYNCH. ERROR HANDLING

   1065						.SBTTL	CCPAST	- ASYNCH. ERROR HANDLING
   1066					;+
   1067					; DDCMP EXPECTS TO SEE ASYNC. ERRORS ONLY FROM THE MODEM CONTROLLER
   1068					; WHEN DSR IS LOST. THE ERROR (CE.DIS) IS IN THE CCB AND SIMPLY PASSED
   1069					; TO THE HIGHER LEVEL PROCESS.
   1070					;
   1071					;	*** CAUTION ***
   1072					;	THIS ROUTINE DOES NOT RETURN TO THE CALLER (TO AVOID THE MAINLINE
   1073					;	CONTROL COMPLETE CODE)
   1074					;
   1075					; INPUTS:
   1076					;	(SP) = CONTROL COMPLETE RETURN ADDRESS
   1077					;	R4 = CONTROL CCB
   1078					;
   1079					; OUTPUTS:
   1080					;	NONE
   1081					;
   1082					; REGISTERS MODIFIED:
   1083					;	SP,R4,R3
   1084					;-
   1085
   1086	002002	005726 			CCPAST:	TST	(SP)+		;REMOVE THE RETURN- AVOID CONFLICT WITH
   1087									;  NORMAL CONTROL FUNCTION.
   1088	002004	016403 	000012 			MOV	C.STS(R4),R3	;GET THE ERROR
   1089	002010					CALLR	$CTCMP		;POST THE ERROR AND EXIT DDCMP
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 23
CTLENB	- ENABLE A LINE

   1091						.SBTTL	CTLENB	- ENABLE A LINE
   1092					;+
   1093					; ENABLE A LINE ONLY ONCE.
   1094					; THIS ROUTINE AND CTLDIS MAINTAIN THE LINE ENABLE COUNTER (L.ENA)
   1095					;
   1096					; INPUTS:
   1097					;	R5 = LINE TABLE ADDRESS
   1098					;	R4 = CONTROL CCB
   1099					;	R1 = POINTER TO S.STS IN STATION TABLE
   1100					;	R0 = STATION TABLE ADDRESS
   1101					;
   1102					; OUTPUTS:
   1103					;   CARRY CLEAR
   1104					;	FUNCTION COMPLETED SUCCESSFULLY
   1105					;   CARRY SET
   1106					;	FUNCTION IN PROGRESS - COMPLETION ASYNCHRONOUS
   1107					;
   1108					; REGISTERS MODIFIED:
   1109					;	R4
   1110					;-
   1111
   1112						.ENABL	LSB
   1113	002014	032711 	040000 		CTLENB:	BIT	#SS.ENA,(R1)	;IF ALREADY ENABLED
   1114	002020	001015 				BNE	20$		;THEN RETURN IMMEDIATELY.
   1116	002022	105765 	000063 			TSTB	L.ENA(R5)	;IF THIS IS THE FIRST LINE
   1117	002026	001006 				BNE	10$		;THEN
   1119	002030					CALL	$DDENB		;TELL THE DRIVER.
   1120	002034	103410 				BCS	30$		;IF SYNCHRONOUS COMPLETION, FALL THROUGH.
   1121
   1122						.SBTTL	CCPENB	- LINE ENABLE COMPLETE
   1123					;+
   1124					; WHEN A ENABLE FUNCTION HAS COMPLETED UNSUCCESSFULLY, RE-ADJUST THE
   1125					; LINE ENABLE COUNTER TO FORCE ENABLE ON THE NEXT ATTEMPT.
   1126					;
   1127					; INPUTS:
   1128					;	R5 = LINE TABLE ADDRESS
   1129					;	R4 = CONTROL CCB
   1130					;	R1 = POINTER TO S.STS IN STATION TABLE
   1131					;	R0 = STATION TABLE ADDRESS
   1132					;
   1133					; OUTPUTS:
   1134					;	CARRY CLEAR
   1135					;
   1136					; REGISTERS MODIFIED:
   1137					;	R4
   1138					;-
   1139
   1140	002036	005764 	000012 		CCPENB:	TST	C.STS(R4)	;IF SUCCESSFUL
   1141	002042	100405 				BMI	30$		;THEN
   1142	002044	052711 	040000 		10$:	BIS	#SS.ENA,(R1)	;MARK AS ENABLED
   1144	002050	105265 	000063 			INCB	L.ENA(R5)	;STEP THE ENABLE COUNTER
   1146	002054	000241 			20$:	CLC			;SYNCHRONOUS RETURN
   1147	002056				30$:	RETURN
   1148						.DSABL	LSB
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 24
CTLDIS	- DISABLE A LINE

   1150						.SBTTL	CTLDIS	- DISABLE A LINE
   1151					;+
   1152					; A LINE IS DISABLED ONLY IF ALL STATIONS ON THAT LINE ARE STOPPED.
   1153					; DISABLES WILL ALWAYS COMPLETE SUCESSFULLY BUT THE ORDER OF STOP/DISABLE
   1154					; IS NECESSARY FOR CORRECT OPERATION.
   1155					;
   1156					; INPUTS:
   1157					;	R5 = LINE TABLE ADDRESS
   1158					;	R4 = CONTROL CCB
   1159					;	R1 = POINTER TO S.STS IN STATION TABLE
   1160					;	R0 = STATION TABLE ADDRESS
   1161					;
   1162					; OUTPUTS:
   1163					;	NONE
   1164					;
   1165					; REGISTERS MODIFIED:
   1166					;	R4
   1167					;-
   1168
   1169	002060	032711 	140000 		CTLDIS:	BIT	#SS.ACT!SS.ENA,(R1) ;IF ACTIVE OR ALREADY DISABLED
   1170	002064	003407 				BLE	10$		;THEN DISABLE INAPROPRIATE.
   1171	002066	042711 	040000 			BIC	#SS.ENA,(R1)	;MARK STATION AS DISABLED
   1173	002072	105365 	000063 			DECB	L.ENA(R5)	;ONE LESS STATION ACTIVE
   1174	002076	001002 				BNE	10$		;MORE STATIONS ACTIVE
   1176	002100					CALLR	$DDDIS		;DISABLE LINE.
   1177	002104	001403 			10$:	BEQ	20$		;EITHER ALREADY DISABLED
   1178	002106	012764 	100362 	000012 		MOV	#CE.ABO,C.STS(R4) ;OR STILL ACTIVE.
   1179	002114	000241 			20$:	CLC			;SYNCHRONOUS COMPLETION
   1180	002116					RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 25
CTLMNT	- ENTER MAINTENANCE MODE

   1182						.SBTTL	CTLMNT	- ENTER MAINTENANCE MODE
   1183					;+
   1184					; THIS ROUTINE PUTS DDCMP IN MAINTENANCE MODE, INITIALIZES DDCMPS
   1185					; LINE TABLE AND SENDS A START TO THE DRIVER IF IT IS NOT ALREADY
   1186					; STARTED.
   1187					;
   1188					; INPUTS:
   1189					;	R5 = LINE TABLE ADDRESS
   1190					;	R4 = CONTROL CCB
   1191					;	R1 = POINTER TO S.STS IN STATION TABLE
   1192					;	R0 = STATION TABLE ADDRESS
   1193					;
   1194					; OUTPUTS:
   1195					;   CARRY CLEAR
   1196					;	R4 = CONTROL CCB
   1197					;   CARRY SET
   1198					;	DRIVER IS STILL PROCESSING START
   1199					;
   1200					; REGISTERS MODIFIED:
   1201					;	R3,R2,R0
   1202					;-
   1203
   1204						.ENABL	LSB
   1205	002120	032711 	140000 		CTLMNT:	BIT	#SS.ACT!SS.ENA,(R1) ;IF ALREADY ACTIVE OR NOT ENABLED
   1206	002124	003403 				BLE	10$		;THEN CHECK ON WHAT WE MUST DO.
   1207	002126	112711 	000010 			MOVB	#SS.MNT,(R1)	;SET IN MOP MODE
   1208	002132	000435 				BR	30$		;DO COMMON STARTUP PROCESSING
   1209
   1210	002134	002405 			10$:	BLT	12$		;IF NOT ENABLED
   1211	002136	012764 	100362 	000012 		MOV	#CE.ABO,C.STS(R4) ;THEN JUST ABORT IT.
   1212	002144	000241 				CLC			;SET SYNCHRONOUS RETURN
   1213	002146					RETURN			;AND GO AWAY.
   1214	002150				12$:	CALLR	CTLSTP		;OTHERWISE STOP THE LINE FIRST.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 26
CTLSTR	- ENTER START MODE

   1216						.SBTTL	CTLSTR	- ENTER START MODE
   1217					;+
   1218					; THIS ROUTINE SETS UP EVERTHING SO THAT DDCMP CAN START THE LINE
   1219					; FOR MESSAGE MODE. AN ENTRY POINT IS PROVIDED THAT IS CALL FROM CTLMNT
   1220					; SO THAT JUST THE THINGS FOR MAINTENANCE MODE MAY BE INITIALIZED.
   1221					;
   1222					; INPUTS:
   1223					;	R5 = LINE TABLE ADDRESS
   1224					;	R4 = CONTROL CCB
   1225					;	R1 = POINTER TO S.STS IN STATION TABLE
   1226					;	R0 = STATION TABLE ADDRESS
   1227					;
   1228					; OUTPUTS:
   1229					;   CARRY CLEAR
   1230					;	R4 = 0
   1231					;	CCB WILL BE RETURNED WHEN THE STARTUP SEQUENCE HAS BEEN COMPLETED.
   1232					;   CARRY SET
   1233					;	DRIVER IS STILL PROCESSING START
   1234					;
   1235					; REGISTERS MODIFIED:
   1236					;	R4,R3,R2,R0
   1237					;-
   1238
   1239	002154	032711 	140000 		CTLSTR:	BIT	#SS.ACT!SS.ENA,(R1) ;IF ALREADY ACTIVE OR NOT ENABLED
   1240	002160	003765 				BLE	10$		;THEN CHECK ON WHAT WE MUST DO.
   1241	002162	062700 	000040 			ADD	#S.R,R0		;POINT TO MESSAGE COUNTERS
   1242	002166	012703 	000011 			MOV	#<S.NKRE-S.R>,R3 ;AND NUMBER OF COUNTERS
   1243	002172	105020 			20$:	CLRB	(R0)+		;CLEAR COUNTER
   1244	002174					SOB	R3,20$		;UNTIL ALL DONE
   1245	002200	162700 	000051 			SUB	#S.NKRE,R0	;AND RESTORE STATION TABLE ADDRESS.
   1246	002204	116760 	000001'	000061 		MOVB	.ERRTH,S.RETH(R0) ;RESET RECEIVE ERROR THRESHOLD.
   1247	002212	116760 	000001'	000062 		MOVB	.ERRTH,S.RPTH(R0) ;RESET SELECT LOST THRESHOLD.
   1248	002220	116760 	000001'	000063 		MOVB	.ERRTH,S.NAKT(R0) ;RESET MESSAGE LOST THRESHOLD.
   1249
   1250	002226	105765 	000064 		30$:	TSTB	L.NAST(R5)	;IF NOT THE FIRST ACTIVE STATION
   1251	002232	001011 				BNE	50$		;THEN BYPASS THE LINE INITIALIZATION.
   1252	002234					CALL	SETLIN		;SET UP THE LINE TABLE
   1253	002240	103446 				BCS	90$		;IF WE CAN
   1254	002242					CALL	$DDSTR		;AND START THE DEVICE
   1255	002246	103442 				BCS	82$		;DID NOT FINISH SO JUST EXIT
   1256
   1257	002250	005764 	000012 		CCPSTR:	TST	C.STS(R4)	;WERE WE SUCCESSFUL
   1258	002254	100440 				BMI	90$		;IF NOT,
   1259	002256				50$:	CALL	SETSTA		;SET UP THE STATION TABLE.
   1260	002262	052711 	100000 			BIS	#SS.ACT,(R1)	;MARK AS ACTIVE
   1261	002266	105265 	000064 			INCB	L.NAST(R5)	;AND BUMP NUMBER OF ACTIVE STATIONS.
   1262	002272	122711 	000010 			CMPB	#SS.MNT,(R1)	;MOP MODE ?
   1263	002276	001426 				BEQ	82$		;YES
   1264	002300	010460 	000014 			MOV	R4,S.FCNL(R0)	;SAVE START CCB UNTIL STACK
   1265	002304	112711 	000002 			MOVB	#SS.IST,(R1)	;SET INITIATE START STATE
   1266	002310	152760 	000042 	000020 		BISB	#SE.SST!SE.SSL,S.STE(R0) ;AND SET TO SEND START.
   1268	002316	032765 	000004 	000002 		BIT	#LS.MPM,L.STS(R5) ;IF MULTIPOINT MASTER
   1269	002324	001410 				BEQ	70$		;THEN
   1270	002326					CALL	SPPLA		;SET ACTIVE POLLING STATE.
   1271	002332	005765 	000020 			TST	L.CRST(R5)	;IF NO CURRENT STATION
   1272	002336	001003 				BNE	70$		;THEN
   1273	002340					CALL	POLWK		;START POLLING NEXT AVAILABLE STATION
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 26-1
CTLSTR	- ENTER START MODE

   1274	002344	000402 				BR	80$
   1275
   1277	002346				70$:	CALL	TXSND		;TRY TO SEND SOMETHING.
   1278	002352	005004 			80$:	CLR	R4		;RETURN WITH R4 ZERO AND CARRY CLEAR
   1279	002354				82$:	RETURN			;RETURN, START COMPLETED LATER
   1280
   1281	002356				90$:	CALL	CLNLIN		;CLEAN OUT CCB ALLOCATIONS FOR LINE
   1282	002362	112760 	000000 	000002 		MOVB	#SS.HLT,S.STS(R0) ;STATION IN HALT STATE AGAIN
   1283	002370	012764 	100362 	000012 		MOV	#CE.ABO,C.STS(R4) ;SET STATUS AS ABORT
   1284	002376	000241 				CLC			;FAKE SYNCH. COMPLETION
   1285	002400					RETURN			;AND EXIT
   1286						.DSABL	LSB
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 27
SETLIN	- INITIALIZE LINE TABLE

   1288						.SBTTL	SETLIN	- INITIALIZE LINE TABLE
   1289					;+
   1290					; THIS ROUTINE PROCESSES LINE PARAMETERS FROM L.CHAR (SET BY .DVCHA
   1291					; TEMPLATE OPERATOR) TO THE LINE STATUS WORD L.STS.
   1292					;
   1293					; INPUTS:
   1294					;	R5 = LINE TABLE ADDRESS
   1295					;
   1296					; OUTPUTS:
   1297					;	NONE
   1298					;
   1299					; REGISTERS MODIFIED:
   1300					;	R3
   1301					;-
   1302
   1303	002402	010446 			SETLIN:	MOV	R4,-(SP)	;...
   1304	002404	052765 	000400 	000002 		BIS	#LS.LEN,L.STS(R5) ;ENABLE THE LINE
   1305	002412	010065 	000020 			MOV	R0,L.CRST(R5)	;SET AS CURRENT STATION
   1307	002416	010065 	000022 			MOV	R0,L.ACST(R5)	;NEXT ACTIVE STATION TO POLL
   1308	002422	005065 	000024 			CLR	L.DDST(R5)	;NO DEAD STATION TO POLL
   1309	002426	005065 	000026 			CLR	L.XMST(R5)	;AND NOTHING TO TRANSMIT.
   1310	002432	105065 	000065 			CLRB	L.NDED(R5)	;NO DEAD STATIONS YET.
   1312	002436	105065 	000062 			CLRB	L.MOTD(R5)	;NO MESSAGES AT THE DRIVER.
   1313	002442	116565 	000041 	000001 		MOVB	L.CHAR+3(R5),L.ITMO(R5) ;SET TIMER FROM CHAR. BYTE 4
   1314					;	ASLB	L.ITMO(R5)	;USE TWICE THE TIME IT TAKES TO SEND ONE BUFFER
   1315	002450	105065 	000002 			CLRB	L.STS(R5)	;RESET MULTIPOINT AND HALF DUPLEX SIGNALS
   1316
   1318	002454	032765 	000010 	000040 		BIT	#10,L.CHAR+2(R5) ;PTP OR MULTIPOINT
   1319	002462	001420 				BEQ	22$		;POINT TO POINT
   1320	002464	032765 	000040 	000040 		BIT	#40,L.CHAR+2(R5) ;MULTIPOINT SLAVE ?
   1321	002472	001006 				BNE	20$		;YES
   1322	002474	052765 	000004 	000002 		BIS	#LS.MPM,L.STS(R5) ;SET MASTER
   1323	002502	005065 	000020 			CLR	L.CRST(R5)	;RESET CURRENT STATION.
   1324	002506	000406 				BR	22$
   1325	002510	052765 	000010 	000002 	20$:	BIS	#LS.MPS,L.STS(R5) ;SET SLAVE
   1326	002516	042765 	000400 	000002 		BIC	#LS.LEN,L.STS(R5) ;DON'T TRY TO SELECT YOURSELF.
   1332
   1333	002524	032765 	000001 	000036 	22$:	BIT	#1,L.CHAR(R5)	;IF HALF DUPLEX
   1334	002532	001403 				BEQ	30$		;THEN
   1335	002534	052765 	000002 	000002 		BIS	#LS.HDX,L.STS(R5) ;SET THE SIGNAL.
   1336	002542	005065 	000030 		30$:	CLR	L.HDR(R5)	;NO PRE-ALLOCATED HEADER CCBS.
   1337	002546	105765 	000061 			TSTB	L.NMSG(R5)	;IF MESSAGE LIMIT NOT SET
   1339	002552	001010 				BNE	40$		;THEN
   1343	002554	016703 	000002'			MOV	.LIMSG,R3	;GET DEFAULTS
   1345	002560	105765 	000002 			TSTB	L.STS(R5)	;IF NOT FDX PT-PT
   1346	002564	001401 				BEQ	32$		;THEN
   1347	002566	000303 				SWAB	R3		;SET FOR OTHER VALUE.
   1349	002570	110365 	000061 		32$:	MOVB	R3,L.NMSG(R5)	;SET THE DEFAULT VALUE.
   1351	002574	032765 	000010 	000002 	40$:	BIT	#LS.MPS,L.STS(R5) ;IF SLAVE
   1352	002602	001047 				BNE	50$		;THEN NO TIMERS.
   1353	002604	132765 	000004 	000002 		BITB	#LS.MPM,L.STS(R5) ;IF MULTIPOINT MASTER
   1354	002612	001422 				BEQ	46$		;THEN
   1355	002614	005003 				CLR	R3		;GET
   1356	002616	156503 	000054 			BISB	L.UPDI(R5),R3	;POLLING UPDATE INTERVAL
   1357	002622	001405 				BEQ	44$		;IF THERE IS ONE
   1358	002624	004267 	000076 			JSR	R2,80$
   1359	002630	   006 	   044 			.BYTE	TM.UPD,L.UPDT
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 27-1
SETLIN	- INITIALIZE LINE TABLE

   1360	002632					CALL	$SDLTM		;START THE TIMER UP.
   1361	002636	005003 			44$:	CLR	R3		;NOW GET
   1362	002640	156503 	000055 			BISB	L.DEDI(R5),R3	;THE DEAD STATION POLLING INTERVAL
   1363	002644	001405 				BEQ	46$		;AND IF NON-ZERO
   1364	002646	070327 	000074 			MUL	#60.,R3		;CONVERT INTERVAL TO TICKS.
   1365	002652	004267 	000050 			JSR	R2,80$		;ALLOCATE TIMER AND SAVE.
   1366	002656	   002 	   046 			.BYTE	TM.DED,L.DEDT
   1368	002660	005003 			46$:	CLR	R3		;GET
   1369	002662	156503 	000056 			BISB	L.PDLI(R5),R3	;POLLING DELAY INTERVAL
   1370	002666	001403 				BEQ	48$		;IF THERE IS ONE
   1371	002670	004267 	000032 			JSR	R2,80$		;ALLOCATE TIMER AND SAVE.
   1372	002674	   000 	   050 			.BYTE	TM.PDL,L.PDLT
   1373	002676	005003 			48$:	CLR	R3		;GET
   1374	002700	156503 	000057 			BISB	L.BABI(R5),R3	;BABBLING STATION TIMEOUT
   1375	002704	001406 				BEQ	50$		;IF THERE IS ONE
   1376	002706	070327 	000074 			MUL	#60.,R3		;CONVERT INTERVAL TO TICKS
   1377	002712	004267 	000010 			JSR	R2,80$		;ALLOCATE TIMER AND SAVE.
   1378	002716	   004 	   052 			.BYTE	TM.BAB,L.BABT
   1379	002720	000241 				CLC			;ALL DONE.
   1380	002722	012604 			50$:	MOV	(SP)+,R4	;RESTORE THE REGISTER
   1381	002724					RETURN
   1382
   1383	002726				80$:	CALL	$CCBGT		;IF CAN'T GET A CCB
   1384	002732	103415 				BCS	82$		;THEN GIVE UP.
   1385	002734	112264 	000002 			MOVB	(R2)+,C.RSV(R4)	;SET TIMER TYPE
   1386	002740	010464 	000004 			MOV	R4,C.NSP(R4)	;AND IDENTIFICATION.
   1387	002744	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE NUMBER
   1388	002752	010364 	000012 			MOV	R3,C.STS(R4)	;AND TIME INTERVAL IN TICKS.
   1389	002756	112203 				MOVB	(R2)+,R3	;GET DISPLACEMENT
   1390	002760	060503 				ADD	R5,R3		;INTO LINE TABEL
   1391	002762	010413 				MOV	R4,(R3)		;AND SAVE THE CCB.
   1392	002764	000202 				RTS	R2		;RETURN HAPPY.
   1393	002766	012602 			82$:	MOV	(SP)+,R2	;RESTORE REGISTER
   1394	002770	000754 				BR	50$		;AND ABORT THE START.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 28
SETSTA	- INITIALIZE STATION TABLE

   1396						.SBTTL	SETSTA	- INITIALIZE STATION TABLE
   1397					;+
   1398					; SET UP THE STATION TABLE WITH APPROPRIATE DEFAULTS AND POLLING PARAMETERS.
   1399					;
   1400					; INPUTS:
   1401					;	R5 = LINE TABLE ADDRESS
   1402					;	R1 = POINTER TO S.STS IN STATION TABLE
   1403					;	R0 = STATION TABLE ADDRESS
   1404					;
   1405					; OUTPUTS:
   1406					;	NONE
   1407					;
   1408					; REGISTERS MODIFIED:
   1409					;	R3
   1410					;-
   1411
   1412	002772	042711 	027000 		SETSTA:	BIC	#SS.REP!SS.TIM!SS.RTR!SS.SHU,(R1) ;INITIALIZE BITS
   1413	002776	052711 	000400 			BIS	#SS.SEL,(R1)	;ASSUME WE ARE TO BE SELECTED
   1414	003002	105060 	000020 			CLRB	S.STE(R0)	;NO SCHEDULED CONTROL MESSAGES
   1416	003006	005060 	000022 			CLR	S.U(R0)		;RESET THE POLLING PRIORITY
   1417	003012	005060 	000024 			CLR	S.I(R0)		;AND INCREMENT.
   1418	003016	105060 	000047 			CLRB	S.NDAT(R0)	;RESET NON-DATA
   1419	003022	105060 	000046 			CLRB	S.NRSP(R0)	;AND NON-RESPONSE COUNTERS.
   1421	003026	105760 	000037 			TSTB	S.NMSG(R0)	;IF MESSAGE LIMIT IS NOT SET
   1423	003032	001010 				BNE	20$		;THEN
   1427	003034	016703 	000004'			MOV	.SIMSG,R3	;GET DEFAULTS
   1429	003040	105765 	000002 			TSTB	L.STS(R5)	;IF NOT FDX PT-PT
   1430	003044	001401 				BEQ	12$		;THEN
   1431	003046	000303 				SWAB	R3		;SET FOR OTHER VALUE.
   1433	003050	110360 	000037 		12$:	MOVB	R3,S.NMSG(R0)	;SET THE DEFAULT VALUE.
   1435	003054	116503 	000002 		20$:	MOVB	L.STS(R5),R3	;IF FDX PT-PT
   1436	003060	001452 				BEQ	90$		;THEN NO POLLING TO BE DONE.
   1437	003062	132703 	000010 			BITB	#LS.MPS,R3	;IF A SLAVE
   1438	003066	001403 				BEQ	30$		;THEN
   1439	003070	042711 	000400 			BIC	#SS.SEL,(R1)	;DESLECT OURSELVES.
   1440	003074					RETURN
   1441	003076	005760 	000026 		30$:	TST	S.PQ(R0)	;SET DEFAULT POLLING PARAMETERS
   1442	003102	001003 				BNE	32$		;IF NECESSARY.
   1443	003104	016760 	000012'	000026 		MOV	.SIP,S.PQ(R0)
   1444	003112	005760 	000030 		32$:	TST	S.IQ(R0)
   1445	003116	001003 				BNE	34$
   1446	003120	016760 	000010'	000030 		MOV	.SII,S.IQ(R0)
   1447	003126	005760 	000032 		34$:	TST	S.AQ(R0)
   1448	003132	001003 				BNE	40$
   1449	003134	016760 	000006'	000032 		MOV	.SIA,S.AQ(R0)
   1450	003142	105760 	000034 		40$:	TSTB	S.THI(R0)	;SET DEFAULT THRESHOLDS
   1451	003146	001003 				BNE	42$		;IF NECESSARY
   1452	003150	116760 	000014'	000034 		MOVB	.SITHI,S.THI(R0)
   1453	003156	105760 	000035 		42$:	TSTB	S.THP(R0)
   1454	003162	001003 				BNE	44$
   1455	003164	116760 	000015'	000035 		MOVB	.SITHP,S.THP(R0)
   1456	003172	105760 	000036 		44$:	TSTB	S.THD(R0)
   1457	003176	001003 				BNE	90$
   1458	003200	116760 	000016'	000036 		MOVB	.SITHD,S.THD(R0)
   1460	003206				90$:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 29
CTLSTP	- SHUTDOWN A LINE

   1462						.SBTTL	CTLSTP	- SHUTDOWN A LINE
   1463					;+
   1464					; THIS ROUTINE STOPS A LINE. IT FIRST CHECKS IF ANY MESSAGES ARE
   1465					; OUTSTANDING TO THE DRIVER IF SO SHUTDOWN MODE IS ENTERED. WHEN ALL
   1466					; THE MESSAGES ARE RETURNED IT IS ENTERED AT HALTFN TO FINISH THE
   1467					; SHUTDOWN. ON MULTI DROP LINES THE CALL TO STOP THE DRIVER IS NOT MADE
   1468					; AND DDCMP'S BUFFERS ARE NOT RETURNED UNTIL THE LAST STATION IS SHUT
   1469					; DOWN. ALSO THE CALLING CCB IS PLACED IN THE CONTROL FUNCTION
   1470					; QUEUE SO NO OTHER FUNCTIONS WILL START UNTIL THE STOP IS COMPLETED.
   1471					;
   1472					; INPUTS:
   1473					;	R5 = LINE TABLE ADDRESS
   1474					;	R4 = CONTROL CCB
   1475					;	R1 = POINTER TO S.STS IN STATION TABLE
   1476					;	R0 = STATION TABLE ADDRESS
   1477					;
   1478					; OUTPUTS:
   1479					;   CARRY CLEAR
   1480					;	R4 = CONTROL CCB
   1481					;   CARRY SET
   1482					;	FUNCTION WILL COMPLETE LATER
   1483					;
   1484					; REGISTERS MODIFIED:
   1485					;	R3
   1486					;-
   1487
   1488						.ENABL	LSB
   1489	003210	005711 			CTLSTP:	TST	(R1)		;IF STATION NOT ACTIVE
   1490	003212	100107 				BPL	70$		;THEN RETURN IMMEDIATELY.
   1491	003214	032711 	020000 			BIT	#SS.SHU,(R1)	;IF SHUTDOWN ALREADY IN PROGRESS
   1492	003220	001406 				BEQ	20$		;THEN
   1493	003222	010503 				MOV	R5,R3		;GET ADDRESS
   1494	003224	062703 	000010 			ADD	#L.FCNL,R3	;OF CONTROL FUNCTION QUEUE
   1495	003230					CALL	$CMQIF		;AND APPEND TO FRONT.
   1496	003234	000441 				BR	30$		;RETURN ASYNCHRONOUSLY.
   1497
   1498	003236	052765 	020000 	000002 	20$:	BIS	#LS.CTL,L.STS(R5) ;SET CONTROL FUNCTION IN PROGRESS
   1499	003244	042711 	007377 			BIC	#SS.REP!SS.TIM!SS.RTR!377,(R1) ;RESET STATION STATUS
   1500	003250	052711 	020000 			BIS	#SS.SHU!SS.HLT,(R1) ;MARK LINE IN SHUTDOWN MODE AND HALTED.
   1501	003254	010402 				MOV	R4,R2		;SAVE THE CURRENT CCB
   1502	003256	016004 	000014 			MOV	S.FCNL(R0),R4	;AND IF THERE IS A CONTROL CCB
   1503	003262	001404 				BEQ	22$		;THEN
   1504	003264	012703 	100362 			MOV	#CE.ABO,R3	;RETURN WITH ABORT.
   1505	003270					CALL	$CTCMP
   1506	003274	010260 	000014 		22$:	MOV	R2,S.FCNL(R0)	;SAVE THE HALT CCB FOR LATER.
   1507	003300	026500 	000020 			CMP	L.CRST(R5),R0	;IF CURRENT STATION
   1508	003304	001010 				BNE	24$		;AND
   1509	003306	032711 	000400 			BIT	#SS.SEL,(R1)	;NOT SELECTED
   1510	003312	001005 				BNE	24$		;THEN
   1511	003314	016504 	000050 			MOV	L.PDLT(R5),R4	;DELAY TIMER MAY BE ACTIVE.
   1512	003320	001402 				BEQ	24$		;IF THERE IS A TIMER
   1513	003322					CALL	$CNDTM		;THEN CANCEL IT.
   1515	003326				24$:	CALL	SPPLO		;SET STATION TO OFFLINE.
   1516	003332	105760 	000050 			TSTB	S.MOTD(R0)	;ANY OUTSTANDING MESSAGES?
   1520	003336	001402 				BEQ	HALTFN		;CONTINUE IF NOT
   1521	003340	000261 			30$:	SEC			;SET THE CARRY FOR AN ASYNCH COMPLETION
   1522	003342					RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 29-1
CTLSTP	- SHUTDOWN A LINE

   1523
   1524	003344				HALTFN:	CALL	CLNSTA		;RETURN ALL OUTSTANDING TX MESSAGES
   1525	003350	105365 	000064 			DECB	L.NAST(R5)	;DEC ACTIVE STATION COUNTER
   1526	003354	003020 				BGT	60$		;BR IF NOT LAST STATION HALTED
   1527	003356	016004 	000014 			MOV	S.FCNL(R0),R4	;GET HALT CCB
   1528	003362	016460 	000010 	000014 		MOV	C.FNC(R4),S.FCNL(R0) ;SAVE FUNCTION CODE
   1529	003370					CALL	$DDSTP		;STOP THE DEVICE NOW.
   1530	003374	103761 				BCS	30$		;IF SYNCHRONOUS COMPLETION,
   1531
   1532	003376	016064 	000014 	000010 	CCPSTP:	MOV	S.FCNL(R0),C.FNC(R4) ;RESTORE FUNCTION CODE
   1533	003404	010460 	000014 			MOV	R4,S.FCNL(R0)	;AND CONTROL CCB POINTER
   1534	003410	105015 				CLRB	(R5)		;CANCEL ANY TIMEOUTS
   1535	003412					CALL	CLNLIN		;AND CLEAN UP THE LINE TABLE.
   1536	003416	042711 	120000 		60$:	BIC	#SS.SHU!SS.ACT,(R1) ;SHUTDOWN COMPLETE, NO LONGER ACTIVE.
   1537	003422	016004 	000014 			MOV	S.FCNL(R0),R4	;GET HALT CCB
   1538	003426	005060 	000014 			CLR	S.FCNL(R0)	;AND RESET FUNCTION POINTER.
   1539	003432	105764 	000010 		70$:	TSTB	C.FNC(R4)	;IF AN INTERNAL REQUEST
   1540	003436	001005 				BNE	72$		;THEN
   1541	003440	116464 	000002 	000011 		MOVB	C.RSV(R4),C.MOD(R4) ;SET NEW REQUESTED STATE
   1542	003446	105064 	000002 			CLRB	C.RSV(R4)	;CANCEL IT
   1543	003452	116403 	000011 		72$:	MOVB	C.MOD(R4),R3	;GET FUNCTION MODIFIER
   1544	003456	000173 	003462'			JMP	@74$(R3)	;AND CONTINUE THE FUNCTION.
   1545	003462				74$:	DSPBEG	,</400>
   1546	003462					DSP	FS.AST,92$	; (INTERNAL REQUEST COMPLETE)
   1547	003464					DSP	FS.STR,CTLSTR	; START
   1548	003466					DSP	FS.STP,90$	; STOP
   1549	003470					DSP	FS.TRM		; (NOT USED)
   1550	003472					DSP	FS.MNT,CTLMNT	; MAINTENANCE
   1551	003474					DSPEND
   1552
   1553	003474	012764 	000001 	000012 	90$:	MOV	#CS.SUC,C.STS(R4) ;INDICATE SUCCESS
   1554	003502	000241 				CLC			;HALT COMPLETED
   1555	003504					RETURN			;AND EXIT.
   1556
   1557	003506				92$:	CALL	$CCBRT		;RETURN THE REQUEST CCB
   1558	003512	005004 				CLR	R4		;NO CCB FOR CONTROL PROCESSING
   1559	003514					RETURN			;AND GO AWAY.
   1560						.DSABL	LSB
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 30
CLNLIN	- DEALLOCATE ALL CCBS OWNED BY LINE

   1562						.SBTTL	CLNLIN	- DEALLOCATE ALL CCBS OWNED BY LINE
   1563					;+
   1564					; THIS SUBROUTINE IS CALLED TO FLUSH THE HEADER AND TIMER CCBS FOR A LINE
   1565					; ON A FAULTY START OR A STOP REQUEST.
   1566					;
   1567					; INPUTS:
   1568					;	R5 = LINE TABLE ADDRESS
   1569					;
   1570					; OUTPUTS:
   1571					;	NONE
   1572					;
   1573					; REGISTERS MODIFIED:
   1574					;	NONE
   1575					;-
   1576
   1577	003516	010446 			CLNLIN:	MOV	R4,-(SP)
   1578	003520	016504 	000030 		10$:	MOV	L.HDR(R5),R4	;GET TOP HEADER CCB
   1580	003524	001405 				BEQ	20$		;IF NONE, ALL RETURNED
   1584	003526	011465 	000030 			MOV	(R4),L.HDR(R5)	;CLOSE TOP OF HEADER STACK
   1585	003532					CALL	$CCBRT		;RETURN CCB TO POOL
   1586	003536	000770 				BR	10$		;CONTINUE
   1587
   1589	003540	016504 	000044 		20$:	MOV	L.UPDT(R5),R4	;IF POLLING UPDATE TIMER EXISTS
   1590	003544	001406 				BEQ	30$		;THEN
   1591	003546					CALL	$CNDTM		;CANCEL IT
   1592	003552					CALL	$CCBRT		;RETURN IT
   1593	003556	005065 	000044 			CLR	L.UPDT(R5)	;AND INDICATE IT IS GONE.
   1594
   1595	003562	016504 	000046 		30$:	MOV	L.DEDT(R5),R4	;IF DEAD STATION INTERVAL TIMER EXISTS
   1596	003566	001406 				BEQ	40$		;THEN
   1597	003570					CALL	$CNDTM		;CANCEL IT
   1598	003574					CALL	$CCBRT		;RETURN IT
   1599	003600	005065 	000046 			CLR	L.DEDT(R5)	;AND INDICATE IT IS GONE.
   1600
   1602	003604	016504 	000050 		40$:	MOV	L.PDLT(R5),R4	;IF POLLING DELAY TIMER EXISTS
   1603	003610	001406 				BEQ	50$		;THEN
   1604	003612					CALL	$CNDTM		;CANCEL IT
   1605	003616					CALL	$CCBRT		;RETURN IT
   1606	003622	005065 	000050 			CLR	L.PDLT(R5)	;AND INDICATE IT IS GONE.
   1607
   1608	003626	016504 	000052 		50$:	MOV	L.BABT(R5),R4	;IF BABBLING STATION TIMER EXISTS
   1609	003632	001406 				BEQ	60$		;THEN
   1610	003634					CALL	$CNDTM		;CANCEL IT
   1611	003640					CALL	$CCBRT		;RETURN IT
   1612	003644	005065 	000052 			CLR	L.BABT(R5)	;AND INDICATE IT IS GONE.
   1613
   1614	003650	012604 			60$:	MOV	(SP)+,R4
   1615	003652					RETURN			;RETURN TO CALLER
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 31
CLNSTA	- KILL ALL OUTSTANDING MESSAGES

   1617						.SBTTL	CLNSTA	- KILL ALL OUTSTANDING MESSAGES
   1618					;+
   1619					; THIS ROUTINE RETURNS ALL THE MESSAGES ON THE WAITING-FOR-ACK QUEUE WITH
   1620					; AN ABORT STATUS AND THEN ALL THE MESSAGES IN THE PRE-TRANSMIT QUEUE.
   1621					; FINALLY, IT RETURNS ANY PENDING CONTROL FUNCTION.
   1622					;
   1623					; INPUTS:
   1624					;	R5 = LINE TABLE ADDRESS
   1625					;	R0 = STATION TABLE ADDRESS
   1626					;
   1627					; OUTPUTS:
   1628					;	NONE
   1629					;
   1630					; REGISTERS MODIFIED:
   1631					;	R3
   1632					;-
   1633
   1634	003654	010446 			CLNSTA:	MOV	R4,-(SP)	;SAVE R4
   1635
   1636	003656	010003 			10$:	MOV	R0,R3		;GET ADDRESS
   1637	003660	062703 	000010 			ADD	#S.TAKQ,R3	;OF WAITING-FOR-ACK QUEUE
   1638	003664					CALL	$CMQRM		;AND LOOK FOR A CANIDATE.
   1639	003670	103405 				BCS	20$		;IF THERE IS ONE
   1640	003672	012703 	100362 			MOV	#CE.ABO,R3	;THEN SEND IT BACK
   1641	003676					CALL	$XMCMP		;WITH ABORT AS STATUS.
   1642	003702	000765 				BR	10$		;GO FOR MORE.
   1643
   1644	003704	010003 			20$:	MOV	R0,R3		;GET ADDRESS
   1645	003706	062703 	000004 			ADD	#S.PTXQ,R3	;OF PRE-TRANSMIT QUEUE
   1646	003712					CALL	$CMQRM		;AND LOOK FOR A CANIDATE.
   1647	003716	103405 				BCS	30$		;IF THERE IS ONE
   1648	003720	012703 	100362 			MOV	#CE.ABO,R3	;THEN SEND IT BACK
   1649	003724					CALL	$XMCMP		;WITH ABORT AS STATUS.
   1650	003730	000765 				BR	20$		;GO FOR MORE.
   1651
   1652	003732	012604 			30$:	MOV	(SP)+,R4	;RESTORE R4
   1653	003734					RETURN			;RETURN TO CALLER
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 32
DVRSN	- RESYNC THE DEVICE DRIVER

   1655						.SBTTL	DVRSN	- RESYNC THE DEVICE DRIVER
   1656					;+
   1657					; THIS ROUTINE IS CALLED SO DDCMP CAN RESYNCHRONIZE THE DEVICE DRIVER
   1658					; FOR THIS LINE.  THE CCB FOR THIS FUNCTION COMES FROM DDCMPS INTERNAL
   1659					; POOL
   1660					;
   1661					; INPUTS:
   1662					;	R5=LINE TABLE ADDRESS
   1663					;	R0=STATION TABLE ADDRESS
   1664					;
   1665					; OUTPUTS:
   1666					;	NONE
   1667					;
   1668					; REGISTERS MODIFIED:
   1669					;	NONE
   1670					;-
   1671
   1672	003736	032765 	040000 	000002 	DVRSN:	BIT	#LS.RSA,L.STS(R5) ;IS LINE IN RESYNC MODE
   1673	003744	001023 				BNE	20$		;YES, SO JUST EXIT
   1674	003746	010446 				MOV	R4,-(SP)	;SAVE R4
   1675	003750					CALL	$CCBGT		;GET A CONTROL CCB
   1676	003754	103416 				BCS	10$		;IF ONE IS AVAILABLE
   1677	003756	052765 	140000 	000002 		BIS	#LS.RSN!LS.RSA,L.STS(R5) ;INDICATE IN RESYNC MODE
   1678	003764	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET THE LINE NUMBER
   1679	003772	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;AND CURRENT STATION
   1680	004000					CALL	$DDCRA		;AND CALL THE FUNCTION
   1681	004004	103402 				BCS	10$		;ASYNCH SO JUST EXIT
   1682	004006					CALL	DCPKCP		;OTHERWISE PERFORM COMPLETION RITUAL.
   1683	004012	012604 			10$:	MOV	(SP)+,R4	;RESTORE R4
   1684	004014				20$:	RETURN			;AND EXIT
   1685
   1686						.SBTTL	DCPKCP	- KILL COMPLETION ROUTINE
   1687					;+
   1688					; THIS ROUTINE IS FOR ASYNCHRONOUS COMPLETIONS OF THE DEVICE RESYNCH
   1689					; ROUTINE. RETURN THE CCB TO THE HEADER POOL.
   1690					;
   1691					; INPUTS:
   1692					;	R5 = LINE TABLE ADDRESS
   1693					;	R4 = CCB ADDRESS
   1694					;
   1695					; OUTPUTS:
   1696					;	NONE
   1697					;
   1698					; REGISTERS MODIFIED:
   1699					;	R4
   1700					;-
   1701
   1702	004016	042765 	040000 	000002 	DCPKCP:	BIC	#LS.RSA,L.STS(R5) ;INDICATE THE RESYNC CCB IS BACK
   1703	004024					CALLR	$CCBRT		;RETURN CCB TO LIST
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 33
DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.

   1705						.SBTTL	DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.
   1706					;+
   1707					; THIS ENTRY POINT IS CALLED THROUGH THE FUNCTION DISPATCH TABLE
   1708					; BY THE COMMUNICATIONS EXECUTIVE WHENEVER THE TIMER FOR
   1709					; A GIVEN LINE CONTROLLED BY DDCMP EXPIRES.
   1710					;
   1711					; ACTION PERFORMED
   1712					;
   1713					; 1) STATIONS IN MAINTENENCE MODE (MOP)
   1714					;	A CALL IS MADE TO SELECT END PROCESS (SELND) REGARDLESS OF
   1715					;	LINE TYPE.
   1716					;
   1717					; 2) STATIONS IN STARTUP STATE (START OR STACK)
   1718					;	LINE IS RESTARTED AND START MESSAGE SENT
   1719					;
   1720					; 3) STATIONS THAT ARE ONLINE
   1721					;	IF STATION IS NOT ALREADY IN REP MODE, THEN REP MODE IS
   1722					;	INITIALIZED AND THE REP THRESHOLD COUNTER IS SET.  IF ALREADY
   1723					;	IN REP MODE, THEN THRESHOLD COUNTER IS DECREMENTED AND STATION
   1724					;	IS MARKED TO BE SENT ANOTHER REP.  IF THRESHOLD COUNTER GOES
   1725					;	TO ZER3, THEN HIGHER LEVEL IS NOTIFIED, THE THRESHOLD IS LOGGED,
   1726					;	AND THE THRESHOLD COUNTER IS RESET.
   1727					;
   1728					; 4) HALTED STATIONS OR STATIONS IN SHUTDOWN
   1729					;	TIMEOUT IS IGNORED.  IF MULTIPOINT MASTER, THEN CALL IS
   1730					;	MADE TO SELND TO CONTINUE POLLING.
   1731					;
   1732					; 5) FOR ALL PHYSICAL LINE TYPES WHERE STATION IS NOT HALTED.
   1733					;	A CALL IS MADE TO SELND TO DO SELECTION INTERVAL SPECIFIC
   1734					;	PROCESSING.
   1735					;
   1736					; IN BRIEF, THE ROUTINES CALLED IN VARIOUS STATES ARE AS FOLLOWS:
   1737					;
   1738					;	FDX	FDX	FDX	HDX	HDX	HDX
   1739					;	P-P	MPM	MPS	P-P	MPM	MPS
   1740					;	-----	-----	-----	-----	-----	-----
   1741					;
   1742					; OFF	--	DVRSN	N/A	--	DVRSN	N/A
   1743					;  LINE		SELND			SELND
   1744					;
   1745					; START	RSTRT	RSTRT	N/A	RSTRT	RSTRT	N/A
   1746					;  UP	SELND	DVRSN		DVRSN	DVRSN
   1747					;		SELND		SELND	SELND
   1748					;
   1749					; MOP	SELND	DVRSN	N/A	DVRSN	DVRSN	N/A
   1750					;  MODE		SELND		SELND	SELND
   1751					;
   1752					; ON	RPTIM	DVRSN	N/A	DVRSN	DVRSN	N/A
   1753					;  LINE	SELND	SELND		SELND	SELND
   1754					;
   1755					;
   1756					; INPUTS:
   1757					;	R5 = LINE TABLE ADDRESS
   1758					;	R4 = REAL OR FAKE CCB
   1759					;	R3 = SUB-FUNCTION CODE
   1760					;
   1761					; OUTPUTS:
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 33-1
DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.

   1762					;	NONE
   1763					;
   1764					; REGISTERS MODIFIED:
   1765					;	ALL
   1766					;-
   1767
   1768	004030				DCPTIM:
   1770	004030	016500 	000020 			MOV	L.CRST(R5),R0	;GET CURRENT STATION TABLE ADDRESS
   1771	004034	000173 	004040'			JMP	@10$(R3)	;DISPATCH ON TYPE OF TIMEOUT
   1772	004040				10$:	DSPBEG	,</400>
   1773	004040					DSP	FS.STM,TIMSTM	; SHORT TIMER
   1774	004042					DSP	FS.LTM,TIMLTM	; LONG TIMER
   1775	004044					DSPEND
   1776					;
   1778	004044	001417 			TIMLTM:	BEQ	14$		;CRASH IF NO CURRENT STATION
   1779	004046	010001 				MOV	R0,R1		;COPY STATION TABLE
   1783	004050	005721 				TST	(R1)+		;POINT TO STATUS WORD
   1785	004052	105260 	000046 			INCB	S.NRSP(R0)	;INCLUDE THIS IN THE NO-RESPONSE COUNTER
   1786	004056	001002 				BNE	10$		;AND IF IT OVERFLOWS
   1787	004060	105360 	000046 			DECB	S.NRSP(R0)	;THEN BACK IT OFF.
   1789	004064	111103 			10$:	MOVB	(R1),R3		;GET STATION STATE
   1791	004066	000173 	004072'			JMP	@12$(R3)	;AND PROCESS ACCORDINGLY.
   1792	004072				12$:	DSPBEG
   1793	004072					DSP	SS.HLT,20$	; HALT (SHUTDOWN)
   1794	004074					DSP	SS.IST,16$	; INITIATE START
   1795	004076					DSP	SS.AST,16$	; ACKNOWLEDGE START
   1796	004100					DSP	SS.RUN,16$	; RUNNING
   1797	004102					DSP	SS.MNT,20$	; MAINTENANCE
   1798	004104					DSPEND
   1799	004104	000003 			14$:	BPT			;NO CURRENT STATION !!!!!
   1800
   1801	004106	126060 	000046 	000035 	16$:	CMPB	S.NRSP(R0),S.THP(R0) ;IF IT HAPPENS ENOUGH
   1802	004114	001002 				BNE	18$		;THEN
   1803	004116					CALL	SPPLP		;DROP TO POTENTIALLY DEAD.
   1804	004122	126060 	000046 	000036 	18$:	CMPB	S.NRSP(R0),S.THD(R0) ;IF IT HAPPENS TOO MUCH
   1805	004130	001002 				BNE	20$		;THEN
   1806	004132					CALL	SPPLD		;ASSUME HE IS DEAD.
   1808	004136	000173 	004142'		20$:	JMP	@22$(R3)	;GO TO STATE PROCESSOR.
   1809	004142				22$:	DSPBEG
   1810	004142					DSP	SS.HLT,90$	; HALT (SHUTDOWN)
   1811	004144					DSP	SS.IST,60$	; INITIATE START
   1812	004146					DSP	SS.AST,60$	; ACKNOWLEDGE START
   1813	004150					DSP	SS.RUN,50$	; RUNNING
   1814	004152					DSP	SS.MNT,70$	; MAINTENANCE
   1815	004154					DSPEND
   1816					;
   1817					; STATION IS ONLINE.  SEND REP MESSAGE AND CHECK THRESHOLD.
   1818					;
   1819	004154	105765 	000002 		50$:	TSTB	L.STS(R5)	;IF FULL DUPLEX POINT-POINT
   1820	004160	001501 				BEQ	SELND		;THEN END SELECTION INTERVAL IMMEDIATELY.
   1821					;
   1822					; TIMEOUT DURING START
   1823					;
   1824	004162	105765 	000002 		60$:	TSTB	L.STS(R5)	;FULL DUPLEX POINT-POINT?
   1825	004166	001404 				BEQ	80$		;YES-- DON'T NEED TO RESYNC RECEIVER
   1826	004170					CALL	TRPTH		;UPDATE SELECT LOST THRESHOLD
   1827					;
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 33-2
DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.

   1828					; REP STATE IS SET BY SELEND FOR HDX AND MPT LINES. IT WOULD BE CLEANER
   1829					; IF IT ALSO DID THE RECEIVE KILL. AS IT NOW EXISTS, TIMOUTS IN
   1830					; MOP MODE ON HDX OR MPT LINES ALSO CAUSES A RESYNC: IT MAY NOT BE
   1831					; SIMPLE TO ADD THAT LOGIC TO SELEND.
   1832					;
   1833	004174				70$:	CALL	DVRSN		;RESYNC DEVICE
   1834	004200	000471 			80$:	BR	SELND		;MARK END OF SELECT PERIOD
   1835					;
   1836					; TIMEOUT DURING HALT (SHUTDOWN)
   1837					;
   1838	004202				90$:
   1839	004202	032765 	000004 	000002 		BIT	#LS.MPM,L.STS(R5) ;IF A MASTER
   1840	004210	001371 				BNE	70$		;THEN RESYNC THE LINE AND END SELECTION.
   1843	004212					RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 34
DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.

   1845					;
   1846					; SHORT TIMER
   1847					;
   1848	004214	116402 	000002 		TIMSTM:	MOVB	C.RSV(R4),R2	;GET TIMER INDEX
   1849	004220	000172 	004224'			JMP	@10$(R2)	;AND DISPATCH.
   1850	004224				10$:	DSPBEG
   1851	004224					DSP	TM.PDL,20$	; POLLING DELAY TIMER
   1853	004226					DSP	TM.DED,30$	; DEAD STATION POLLING INTERVAL TIMER
   1857	004230					DSP	TM.BAB,40$	; BABBLING STATION TIMER
   1859	004232					DSP	TM.UPD,50$	; POLLING UPDATE TIMER
   1861	004234					DSPEND
   1862					;
   1863					; POLLING DELAY TIMER
   1864					;
   1865	004234	052760 	000400 	000002 	20$:	BIS	#SS.SEL,S.STS(R0) ;ALLOW STATION TO TRANSMIT
   1866	004242					CALLR	TXSND		;AND SEND THAT POLL NOW.
   1868					;
   1869					; TIME TO POLL NEXT DEAD STATION
   1870					;
   1871	004246	052765 	001000 	000002 	30$:	BIS	#LS.PDD,L.STS(R5) ;INDICATE THE TIME IS RIGHT
   1872	004254					CALLR	$SDLTM		;AND RESTART TIMER
   1874					;
   1875					; THIS STATION HAS BEEN TALKING TOO LONG...
   1876					;
   1878	004260	001406 			40$:	BEQ	42$		;CRASH IF NO CURRENT STATION.
   1879	004262					CALL	TRPTH		;UPDATE SELECT LOST THRESHOLD
   1883	004266					CALL	DVRSN		;RE-SYNCH THE DEVICE
   1884	004272					CALLR	SELND		;AND END THE SELECTION INTERVAL.
   1886	004276	000003 			42$:	BPT			;NO CURRENT STATION !!!!
   1887					;
   1888					; TIME TO ADJUST THE POLLING PRIORITIES
   1889					;
   1890	004300	005003 			50$:	CLR	R3		;POLLING RESTART INDICATOR
   1891	004302	012702 	000377 			MOV	#377,R2		;CONSTANT - MAXIMUM PRIORITY VALUE
   1892	004306	016501 	000014 			MOV	L.STAL(R5),R1	;FIRST STATION IN LIST
   1893	004312	066161 	000024 	000022 	60$:	ADD	S.I(R1),S.U(R1)	;UPDATE PRIORITY
   1894	004320	026102 	000022 			CMP	S.U(R1),R2	;AND IF OVERFLOWED
   1895	004324	101402 				BLOS	70$		;THEN
   1896	004326	010261 	000022 			MOV	R2,S.U(R1)	;SET TO MAXIMUM VALUE.
   1897	004332	056103 	000022 		70$:	BIS	S.U(R1),R3	;INDICATE IF POLLABLE.
   1898	004336	011101 				MOV	(R1),R1		;IF THERE IS ANOTHER STATION
   1899	004340	001364 				BNE	60$		;THEN PROCESS IT.
   1900	004342					CALL	$SDLTM		;RESTART TIMER
   1901	004346	005700 				TST	R0		;IF NO CURRENT STATION
   1902	004350	001004 				BNE	80$		;AND
   1903	004352	105703 				TSTB	R3		;A POLLABLE STATION WAS FOUND
   1904	004354	100002 				BPL	80$		;THEN
   1905	004356					CALLR	POLWK		;WAKE UP POLLING.
   1906	004362				80$:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 35
SELND	- SELECT END PROCESSOR WITH POLL WAKING AND SHORT TIMER

   1909						.SBTTL	SELND	- SELECT END PROCESSOR WITH POLL WAKING AND SHORT TIMER
   1910					;+
   1911					; A SELECTION INTERVAL STARTS WHEN A SELECT BIT IS TRANSMITTED IN
   1912					; THE HEADER OF A MESSAGE FOR A GIVEN STATION.  AT THIS TIME, A SELECT
   1913					; INTERVAL TIMER IS ALSO STARTED.  THE SELECTION INTERVAL ENDS WHEN
   1914					; EITHER THE SELECT INTERVAL TIMER EXPIRES OR WHEN A MESSAGE WHICH
   1915					; CONTAINS A SELECT BIT IN THE HEADER IS RECEIVED FROM THAT
   1916					; STATION.  THIS ENTRY POINT IS CALLED AT THE END OF A SELECTION
   1917					; INTERVAL TO DO SELECTION SPECIFIC PROCESSING.
   1918					;
   1919					; ACTION PERFORMED:
   1920					;
   1921					; 1) FULL DUPLEX POINT TO POINT LINES
   1922					;	NO SPECIFIC SELECTION PROCESSING OCCURS.  A CALL IS MADE TO
   1923					;	START UP THE TRANSMITTER.
   1924					;
   1925					; 2) HALF DUPLEX POINT TO POINT LINES
   1926					;	FIRST A CHECK IS MADE TO SEE IF ALL MESSAGES TRANSMITTED
   1927					;	DURING SELECTION HAVE BEEN ACKNOWLEDGED.  IF NOT, A REP IS
   1928					;	MARKED TO BE SENT.  A SHORT TIMER IS SIMULATED TO ALLOW PROCESSING
   1929					;	OF RECEIVED MESSAGES BY HIGHER LEVEL BEFORE A RESPONSE IS
   1930					;	RETURNED.  AT EXPIRATION OF TIMER, ANY QUEUED DATA MESSAGES
   1931					;	ARE TRANSMITTED.  IF THERE ARE NO QUEUED MESSAGES,  THEN AN
   1932					;	ACK OR CONTROL MESSAGE WILL BE SENT BY THE TRANSMIT CODE.
   1933					;
   1934					; 3) MULTIPOINT SLAVE STATION
   1935					;	A CHECK IS MADE TO SEE IF ALL TRANSMITTED MESSAGES HAVE BEEN
   1936					;	ACKNOWLEDGED.  IF NOT, A REP IS MARKED TO BE SENT.  NO TIMER
   1937					;	IS SET AND THE LINE IS TURNED AROUND IMMEDIATELY.  ANY DATA
   1938					;	MESSAGES CURRENTLY QUEUED WILL BE SENT.  IF THERE ARE NO
   1939					;	MESSAGES QUEUED, THEN AN ACK OR CONTROL MESSAGE WILL BE SENT.
   1940					;
   1941					; 4) MULTIPOINT MASTER
   1942					;	A CHECK IS MADE TO SEE IF ALL TRANSMIT MESSAGES HAVE BEEN
   1943					;	ACKED.  IF NOT, A REP IS MARKED TO BE SENT.  NO TURNAROUND
   1944					;	TIMER IS SET.  THE NEXT ELIGIBLE STATION IN THE POLLING LIST
   1945					;	IS SELECTED AND MARKED AS THE CURRENT STATION FOR THIS LINE.  IF
   1946					;	THERE	ARE NO ELIGIBLE STATIONS, THEN POLLING IS SUSPENDED UNTIL
   1947					;	A STATION BECOMES ELIGIBLE (E.Q. A TRANSMIT ENABLE FOR A MOP
   1948					;	MESSAGE OCCURS).  IF THE LINE IS FULL DUPLEX, THE STATION
   1949					;	IS MARKED TO BE SELECTED ON THE NEXT TRANSMITTED MESSAGE.  IF
   1950					;	THE LINE IS HALF DUPLEX, THE TRANSMIT DATA MESSAGE QUEUE IS
   1951					;	MARKED SO THAT THE STATION IS SELECTED BY A MESSAGE WHICH IS
   1952					;	TRANSMITTED AFTER THE LAST DATA MESSAGE IN QUEUE HAS BEEN
   1953					; 	TRANSMITTED.
   1954					;
   1955					; INPUTS:
   1956					;	R5 = ADDRESS OF LINE TABLE
   1957					;	R0 = STATION TABLE ADDRESS OF CURRENT STATION
   1958					;
   1959					; OUTPUTS:
   1960					;	NONE
   1961					;
   1962					; REGISTERS MODIFIED:
   1963					;	R4,R3,R2,R1,R0
   1964					;-
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 36
SELND	- SELECT END PROCESSOR WITH POLL WAKING AND SHORT TIMER

   1966						.ENABL	LSB
   1967	004364	010001 			SELND:	MOV	R0,R1		;COPY STATION TABLE ADDRESS
   1968	004366	005721 				TST	(R1)+		;AND POINT AT STATUS WORD.
   1969	004370	016504 	000052 			MOV	L.BABT(R5),R4	;IF THERE IS A BABBLING TIMER
   1970	004374	001402 				BEQ	10$		;THEN
   1971	004376					CALL	$CNDTM		;CANCEL IT.
   1972					;
   1973					; IF REP TIMER EXPIRED, THEN SEND SOMETHING APPROPRIATE.
   1974					;
   1975	004402	032711 	004000 		10$:	BIT	#SS.TIM,(R1)	;IF REP TIMER EXPIRED
   1976	004406	001425 				BEQ	20$		;THEN
   1977	004410	042711 	005000 			BIC	#SS.TIM!SS.REP,(R1) ;RESET THE REP TIMER FLAGS
   1978	004414	111102 				MOVB	(R1),R2		;GET STATION STATE
   1979	004416	000172 	004422'			JMP	@12$(R2)	;AND RESPOND APPROPRIATELY.
   1980	004422				12$:	DSPBEG
   1981	004422					DSP	SS.HLT,20$	; HALTED
   1982	004424					DSP	SS.IST,14$	; INITIATE START
   1983	004426					DSP	SS.AST,16$	; ACKNOWLEDGE START
   1984	004430					DSP	SS.RUN,18$	; RUNNING
   1985	004432					DSP	SS.MNT,20$	; MAINTENANCE
   1986	004434					DSPEND
   1987	004434	152760 	000042 	000020 	14$:	BISB	#SE.SST!SE.SSL,S.STE(R0) ;SEND START.
   1988	004442	000407 				BR	20$
   1989	004444	152760 	000041 	000020 	16$:	BISB	#SE.SSK!SE.SSL,S.STE(R0) ;SEND STACK.
   1990	004452	000403 				BR	20$
   1991	004454	152760 	000010 	000020 	18$:	BISB	#SE.SRP,S.STE(R0) ;SEND REP.
   1992					;
   1993					; PASS SELECTION BACK TO US
   1994					;
   1995	004462	052765 	000400 	000002 	20$:	BIS	#LS.LEN,L.STS(R5) ;ENABLE LINE (HDX MASTER)
   1996	004470	052711 	000400 			BIS	#SS.SEL,(R1)	;SELECT STA FOR TRANSMISSION (SLAVE)
   1997
   1999	004474	116503 	000002 			MOVB	L.STS(R5),R3	;GET LINE TYPE
   2001	004500	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MAINTENANCE MODE
   2003	004504	001002 				BNE	22$		;THEN
   2004	004506	052703 	000002 			BIS	#LS.HDX,R3	;IN HALF DUPLEX
   2005	004512	000173 	004516'		22$:	JMP	@24$(R3)	;AND PROCESS ACCORDINGLY.
   2006	004516				24$:	DSPBEG
   2007	004516					DSP	,TXSND		;FDX PT-PT
   2008	004520					DSP	,60$		;HDX PT-PT
   2009	004522					DSP	,POLWK		;FDX MASTER
   2010	004524					DSP	,POLWK		;HDX MASTER
   2011	004526					DSP	,80$		;FDX SLAVE
   2012	004530					DSP	,80$		;HDX SLAVE
   2013	004532					DSPEND
   2014
   2015	004532				POLWK:	CALL	GTNXT		;GET NEXT ELIGIBLE STATION
   2016	004536	010065 	000020 			MOV	R0,L.CRST(R5)	;AND MAKE CURRENT
   2017	004542	001413 				BEQ	90$		;IF A STATION WAS FOUND
   2018					;
   2024	004544	016504 	000050 		60$:	MOV	L.PDLT(R5),R4	;IF THERE IS A POLLING DELAY CCB
   2025	004550	001405 				BEQ	80$		;THEN
   2026	004552	042760 	000400 	000002 		BIC	#SS.SEL,S.STS(R0) ;DESELECT THE STATION
   2027	004560					CALL	$SDLTM		;AND START THE TIMER UP.
   2028
   2029	004564	152760 	000040 	000020 	80$:	BISB	#SE.SSL,S.STE(R0) ;MARK SELECTION FOR NEXT CONTROL MESSAGE.
   2030	004572				90$:	CALLR	TXSND		;RESTART TRANSMITTER.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 36-1
SELND	- SELECT END PROCESSOR WITH POLL WAKING AND SHORT TIMER

   2031						.DSABL	LSB
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 37
GTNXT	- GET NEXT STATION IN POLLING LIST

   2034						.SBTTL	GTNXT	- GET NEXT STATION IN POLLING LIST
   2035					;+
   2036					; THE NEW POLLING ALGORITM FOLLOWS THE SPECIFICATION FOR THE DMP11
   2037					;
   2038					; INPUTS:
   2039					;	R5 = ADDRESS OF LINE TABLE FOR THIS LINE
   2040					;
   2041					; OUTPUTS:
   2042					;	R0 = ADDRESS OF STATION TABLE IF ELIGIBLE STATION FOUND
   2043					;	     ELSE ZERO.
   2044					;
   2045					; REGISTERS MODIFIED:
   2046					;	R4,R3,R2,R1,R0
   2047					;-
   2048
   2049	004576	032765 	001000 	000002 	GTNXT:	BIT	#LS.PDD,L.STS(R5) ;POLL DEAD STATION ?
   2050	004604	001421 				BEQ	20$		;LOOK FOR ACTIVE STATION IF NOT.
   2051	004606	042765 	001000 	000002 		BIC	#LS.PDD,L.STS(R5) ;OKAY! OKAY! WE'LL LOOK FOR ONE.
   2052					;
   2053					; FIND A DEAD STATION TO POLL (THERE MUST BE ONE TO GET HERE)
   2054					;
   2055	004614	016500 	000024 			MOV	L.DDST(R5),R0	;LAST DEAD STATION POLLED.
   2056	004620	001413 				BEQ	20$		;IF THERE IS ONE
   2057	004622	011000 			10$:	MOV	(R0),R0		;GET NEXT STATION
   2058	004624	001002 				BNE	11$		;AND IF AT END OF LIST
   2059	004626	016500 	000014 			MOV	L.STAL(R5),R0	;THEN BACK TO THE BEGINNING.
   2060	004632	126027 	000021 	000002 	11$:	CMPB	S.PLS(R0),#SP.PLD ;IF NOT A DEAD STATION
   2061	004640	001370 				BNE	10$		;THEN CHECK SOME MORE.
   2062	004642	010065 	000024 			MOV	R0,L.DDST(R5)	;SET NEW DEAD STATION.
   2063	004646					RETURN
   2064					;
   2065					; FIND AN ACTIVE STATION TO POLL
   2066					;
   2067	004650	012704 	000377 		20$:	MOV	#377,R4		;CONSTANT - MAXIMUM POLLING PRIORITY
   2068	004654	012703 	000177 			MOV	#177,R3		;SET PRIORITY TO BEAT
   2069	004660	005002 				CLR	R2		;NEXT STATION TO POLL
   2070	004662	016500 	000022 			MOV	L.ACST(R5),R0	;LAST STATION POLLED
   2071	004666	011000 			21$:	MOV	(R0),R0		;GET NEXT STATION
   2072	004670	001002 				BNE	22$		;AND IF AT END OF LIST
   2073	004672	016500 	000014 			MOV	L.STAL(R5),R0	;THEN BACK TO THE BEGINNING.
   2074	004676	116001 	000021 		22$:	MOVB	S.PLS(R0),R1	;GET POLLING STATE
   2075	004702	000171 	004706'			JMP	@23$(R1)	;AND PROCESS ACORDING TO STATE.
   2076	004706				23$:	DSPBEG
   2077	004706					DSP	SP.PLO,70$	; OFF-LINE
   2078	004710					DSP	SP.PLD,70$	; DEAD
   2079	004712					DSP	SP.PLP,60$	; POTENTIALLY DEAD
   2080	004714					DSP	SP.PLI,60$	; INACTIVE
   2081	004716					DSP	SP.PLA,60$	; ACTIVE
   2082	004720					DSPEND
   2083
   2084	004720	026003 	000022 		60$:	CMP	S.U(R0),R3	;IF PRIORITY IS HIGHER THAN MAXIMUM
   2085	004724	101405 				BLOS	70$		;THEN
   2086	004726	010002 				MOV	R0,R2		;SAVE NEW STATION TO POLL
   2087	004730	016003 	000022 			MOV	S.U(R0),R3	;AND NEW PRIORITY TO BEAT.
   2088	004734	020403 				CMP	R4,R3		;IF AT MAXIMUM
   2089	004736	001405 				BEQ	80$		;THEN USE THIS IMMEDIATELY.
   2090	004740	026500 	000022 		70$:	CMP	L.ACST(R5),R0	;IF MORE TO CHECK
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 37-1
GTNXT	- GET NEXT STATION IN POLLING LIST

   2091	004744	001350 				BNE	21$		;THEN GO CHECK THEM.
   2092	004746	010200 				MOV	R2,R0		;IF STATION FOUND
   2093	004750	001402 				BEQ	90$		;THEN
   2094	004752	010065 	000022 		80$:	MOV	R0,L.ACST(R5)	;SET NEW ACTIVE STATION.
   2095	004756				90$:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 38
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2098						.SBTTL	DCPXCP	- TRANSMIT DONE ENTRY POINT
   2099					;+
   2100					; CCB'S REPRESENTING MESSAGE SEGMENTS ARE RETURNED HERE AFTER BEING
   2101					; TRANSMITTED BY THE DEVICE DRIVER FOR THIS LINE.  THE SEGMENTS ARE
   2102					; PLACED ON A DONE QUEUE UNTIL ALL SEGMENTS OF THE MESSAGE HAVE BEEN
   2103					; RETURNED.  WHEN A COMPLETE MESSAGE HAS BEEN RETURNED, IT IS ANALYZED
   2104					; BY TYPE FOR APPROPRIATE ACTION.
   2105					; NOTE THAT THOUGH SEVERAL CCB'S MAY BE QUEUED HERE AT ANY GIVEN
   2106					; TIME, THEY ARE ALL PART OF THE SAME MESSAGE, AS ONLY ONE MESSAGE
   2107					; MAY BE IN PROCESS FOR A GIVEN LINE AT ANY ONE TIME.
   2108					;   TIMERS ARE SET DEPENDING ON THE LINE TYPE AND MESSAGE
   2109					; SENT.  THERE IS ONLY ONE TIMER FOR EACH LINE.  HOWEVER, IT IS USED
   2110					; DIFFERENTLY DEPENDING ON LINE TYPE.
   2111					;
   2112					; 1) SELECT TIMER
   2113					;	WHENEVER A SELECT BIT WAS SENT IN THE HEADER OF A TRANSMITTED
   2114					;	MESSAGE, THIS TIMER IS SET.  THE SELECTED STATION HAS THIS TIMED
   2115					;	INTERVAL DURING WHICH TO RESPOND.  THE SELECT TIMER IS THE ONLY
   2116					;	TIMER USED BY MULTIPOINT MASTERS, HALF DUPLEX LINES, AND
   2117					;	STATIONS THAT ARE IN MOP MODE.  FULL DUPLEX POINT TO POINT
   2118					;	LINES USE THIS TIMER DURING STARTUP BECAUSE OF THE SELECT BIT
   2119					;	IN THE START AND STACK MESSAGES.
   2120					;
   2121					; 2) MESSAGE TIMER
   2122					;	FOR FULL DUPLEX POINT TO POINT STATIONS WHICH ARE IN NORMAL
   2123					;	RUNNING MODE, A MESSAGE TIMER IS USED FOR TIMING RESPONSE
   2124					;	INTERVALS.  THIS TIMER IS SET EVERY TIME A NUMBERED DATA
   2125					;	MESSAGE OR REP MESSAGE IS SENT.  IT ACTS LIKE A WATCHDOG
   2126					;	TIMER WHICH IS STROBED EVERY TIME ONE OF THESE MESSAGES
   2127					;	IS SENT.  IF A RESPONSE FOR THE LAST TRANSMITTED MESSAGE
   2128					;	IS NOT RECEIVED WITHIN THE TIMEOUT PERIOD, APPROPRIATE
   2129					;	TIMEOUT ACTION OCCURRS.
   2130					;
   2131					; 3) MULTIPOINT SLAVE STATIONS
   2132					;	MULTIPOINT SLAVE STATIONS DO NOT USE TIMERS. ALL TIMING
   2133					;	IS PROVIDED BY THE MASTER STATION IN THE FORM OF SELECT MESSAGES.
   2134					;	FOR SLAVES, A SELECT INTERVAL IS THE TIME BETWEEN RECEIVING
   2135					;	TWO MESSAGES WITH SELECT SET IN THE HEADER.
   2136					;
   2137					; INPUTS:
   2138					;	R5 = LINE TABLE ADDRESS
   2139					;	R4 = CCB ADDRESS OF COMPLETED TRANSMIT
   2140					;
   2141					; OUTPUTS:
   2142					;	NONE
   2143					;
   2144					; REGISTERS MODIFIED:
   2145					;	R4,R3,R2,R1,R0
   2146					;-
   2147
   2148	004760	010503 			DCPXCP:	MOV	R5,R3		;COPY LINE TABLE ADDRESS
   2149	004762	062703 	000004 			ADD	#L.TDNQ,R3	;POINT TO TX DONE QUEUE
   2150	004766	032764 	000020 	000022 		BIT	#CF.HDR,C.FLG(R4) ;IS THIS A HEADER CCB
   2151	004774	001406 				BEQ	14$		;NO, SO QUEUE THE CCB
   2152	004776	122764 	000005 	000024 		CMPB	#CM.ENQ,C.BUF2(R4) ;IS THIS A CONTROL MESSAGE
   2153	005004	001421 				BEQ	20$		;YES, SO PROCESS THE HEADER NOW.
   2154	005006				12$:	CALLR	$CMQIN		;OTHERWISE QUEUE UP.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 38-1
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2155
   2156	005012	032764 	000004 	000022 	14$:	BIT	#CF.EOM,C.FLG1(R4) ;IF EOM
   2157	005020	001007 				BNE	18$		;THEN GO GET HEADER.
   2158	005022	005764 	000022 			TST	C.FLG1(R4)	;IF OTHER DESCRIPTOR USED
   2159	005026	100767 				BMI	12$		;AND
   2160	005030	032764 	000004 	000032 		BIT	#CF.EOM,C.FLG2(R4) ;EOM SET
   2161	005036	001763 				BEQ	12$		;THEN
   2162
   2163	005040				18$:	CALL	$CMQIN		;QUEUE THE CCB
   2164	005044					CALL	$CMQRM		;REMOVE THE HEADER
   2165					;
   2166					; GET OUR OWN COPY OF THE HEADER AND RETURN IT TO THE POOL
   2167					;
   2168	005050	016402 	000016 		20$:	MOV	C.BUF+2(R4),R2	;GET ADDRESS OF BUFFER
   2169	005054	012267 	000074'			MOV	(R2)+,HDR+0	;AND COPY INTO LOCAL AREA.
   2170	005060	012267 	000076'			MOV	(R2)+,HDR+2
   2171	005064	011267 	000100'			MOV	(R2),HDR+4
   2172	005070	016400 	000004 			MOV	C.NSP(R4),R0	;GET ADDR OF STATION TABLE FOR MESSAGE
   2173	005074	010001 				MOV	R0,R1		;AND
   2174	005076	005721 				TST	(R1)+		;ADDRESS OF STATUS BYTE.
   2175	005100	116502 	000002 			MOVB	L.STS(R5),R2	;GET LINE TYPE
   2176	005104	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MAINTENANCE MODE
   2177	005110	001002 				BNE	22$		;THEN
   2178	005112	152702 	000002 			BISB	#LS.HDX,R2	;TREAT AS HALF-DUPLEX.
   2179	005116				22$:	CALL	$CCBRT		;RETURN THE HEADER CCB.
   2180	005122	105360 	000050 			DECB	S.MOTD(R0)	;COUNT OUT THIS MESSAGE FOR THE STATION.
   2181					;
   2182					; IF A REP MESSAGE, THEN SET TO START REP TIMER
   2183					;
   2184	005126	122767 	000005 	000074'	30$:	CMPB	#CM.ENQ,HDR+0	;IF A CONTROL MESSAGE
   2185	005134	001007 				BNE	32$		;THEN
   2186	005136	022767 	001405 	000074'		CMP	#MT.REP*400+CM.ENQ,HDR+0 ;CHECK IF A REP
   2187	005144	001076 				BNE	48$		;IF SO, THEN
   2188	005146	052711 	001000 			BIS	#SS.REP,(R1)	;SET TO START REP TIMER
   2189	005152	000473 				BR	48$
   2190					;
   2191					; PICK UP REASSEMBLED DATA OR MAINTENANCE MESSAGE
   2192					;
   2193	005154	105365 	000062 		32$:	DECB	L.MOTD(R5)	;COUNT OUT DATA MESSAGE FOR THIS LINE
   2194	005160	011304 				MOV	(R3),R4		;GET CCB CHAIN FROM QUEUE
   2195	005162	005013 				CLR	(R3)		;AND CLEAR UP
   2196	005164	010363 	000002 			MOV	R3,2(R3)	;THE QUEUE HEADER.
   2197					;
   2198					; RETURN MAINTENANCE MESSAGE IMMEDIATELY
   2199					;
   2200	005170	122767 	000220 	000074'		CMPB	#CM.DLE,HDR+0	;IF MAINTENANCE MESSAGE
   2201	005176	001012 				BNE	40$		;THEN
   2202	005200	005260 	000070 			INC	S.XMT(R0)	;ONE MORE MESSAGE SENT
   2203	005204	001002 				BNE	34$		;AND IF OVERFLOW
   2204	005206	005360 	000070 			DEC	S.XMT(R0)	;THEN BACK IT UP.
   2205	005212	012703 	000001 		34$:	MOV	#CS.SUC,R3	;SET SUCCESS RETURN STATUS
   2206	005216					CALL	$XMCMP		;AND RETURN THE SEGMENT.
   2207	005222	000447 				BR	48$
   2208					;
   2209					; PUT DATA MESSAGE IN WAITING-TO-BE-ACKED QUEUE AND RETURN IF ALREADY ACKED
   2210					;
   2211	005224	010003 			40$:	MOV	R0,R3		;GET ADDRESS OF
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 38-2
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2212	005226	062703 	000010 			ADD	#S.TAKQ,R3	;WAITING FOR ACK QUEUE
   2213	005232					CALL	$CMQIN		;QUEUE THE DATA SEGMENT
   2214	005236					CALL	RTACK		;AND RETURN IF ALREADY ACKED.
   2215					;
   2216					; CHECK IF REP INTERVAL SHOULD START NOW
   2217					;
   2218	005242	116703 	000100'			MOVB	HDR+4,R3	;GET MESSAGE NUMBER
   2219	005246	110360 	000042 			MOVB	R3,S.X(R0)	;AND SET AS LAST RETURNED FROM THE DRIVER.
   2220	005252	116004 	000043 			MOVB	S.N(R0),R4
   2221	005256	010446 				MOV	R4,-(SP)
   2222	005260	160304 				SUB	R3,R4		; N-X
   2223	005262	116003 	000044 			MOVB	S.A(R0),R3
   2224	005266	160316 				SUB	R3,(SP)		; N-A
   2225	005270	122604 				CMPB	(SP)+,R4	; N-A : N-X
   2226	005272	101416 				BLOS	44$		;IF N-A > N-X  (A < X)
   2227	005274	032711 	005000 			BIT	#SS.REP!SS.TIM,(R1) ;AND TIMER NOT RUNNING
   2229	005300	001002 				BNE	42$		;THEN
   2233	005302	052711 	001000 			BIS	#SS.REP,(R1)	;SET TO START REP TIMER.
   2235	005306	122760 	000006 	000021 	42$:	CMPB	#SP.PLI,S.PLS(R0) ;IF INACTIVE POLLING STATE
   2236	005314	001012 				BNE	48$		;THEN
   2237	005316	010246 				MOV	R2,-(SP)	;SAVE LINE TYPE ACROSS CALL
   2238	005320					CALL	SPPLA		;SET TO ACTIVE POLLING.
   2239	005324	012602 				MOV	(SP)+,R2	;RESTORE LINE TYPE (IN R2)
   2241	005326	000405 				BR	48$
   2242	005330	042711 	005000 		44$:	BIC	#SS.REP!SS.TIM,(R1) ;CANCEL TIMER.
   2243	005334	105702 				TSTB	R2		;IF FDX PT-PT
   2244	005336	001001 				BNE	48$		;THEN
   2245	005340	105015 				CLRB	(R5)		;CANCEL THE CLOCK ALSO.
   2246					;
   2247					; CHECK IF HE HAS TO RETRANSMIT.
   2248					;
   2249	005342	032711 	002000 		48$:	BIT	#SS.RTR,(R1)	;IF RETRANSMISSION REQUESTED
   2250	005346	001402 				BEQ	50$		;THEN
   2251	005350					CALL	TXRTX		;SEE IF IT CAN BE DONE NOW.
   2252					;
   2253					; IF REP TIMER IS REQUESTED, THEN START IT.
   2254					;
   2255	005354	032711 	001000 		50$:	BIT	#SS.REP,(R1)	;WANT A REP TIMER ?
   2256	005360	001410 				BEQ	60$		;IF SO,
   2257	005362	042711 	001000 			BIC	#SS.REP,(R1)	;CLEAR THE REQUEST
   2258	005366	052711 	004000 			BIS	#SS.TIM,(R1)	;SET THE TIMER FLAG
   2259	005372	105702 				TSTB	R2		;AND IF FDX PT-PT
   2260	005374	001002 				BNE	60$		;THEN
   2261	005376	116515 	000001 			MOVB	L.ITMO(R5),(R5)	;SET LINE TIMER.
   2262					;
   2263					; SET THE SELECTION TIMER IF APPROPRIATE
   2264					;
   2266	005402	000172 	005406'		60$:	JMP	@62$(R2)	;AND PROCESS ACCORDINGLY.
   2267	005406				62$:	DSPBEG
   2268	005406					DSP	,80$		;FDX PT-PT
   2269	005410					DSP	,64$		;HDX PT-PT
   2270	005412					DSP	,66$		;FDX MASTER
   2271	005414					DSP	,66$		;HDX MASTER
   2272	005416					DSP	,80$		;FDX SLAVE
   2273	005420					DSP	,80$		;HDX SLAVE
   2274	005422					DSPEND
   2279					;
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 38-3
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2280					; HDX PT-PT
   2281					;
   2282	005422	105767 	000076'		64$:	TSTB	HDR+2		;IF SELECT IS ON
   2283	005426	100035 				BPL	80$		;THEN
   2285	005430	000420 				BR	72$		;SET TIMERS.
   2286					;
   2287					; MULTIPOINT MASTER
   2288					;
   2289	005432	105767 	000076'		66$:	TSTB	HDR+2		;IF SELECT IS ON
   2290	005436	100031 				BPL	80$		;THEN
   2291	005440	116003 	000021 			MOVB	S.PLS(R0),R3	;GET POLLING STATE
   2292	005444	000173 	005450'			JMP	@68$(R3)	;AND DISPATCH TO APPROPRIATE PROCESSOR.
   2293	005450				68$:	DSPBEG
   2294	005450					DSP	SP.PLO,72$	; OFFLINE
   2295	005452					DSP	SP.PLD,72$	; DEAD
   2296	005454					DSP	SP.PLP,70$	; POTENTIALLY DEAD
   2297	005456					DSP	SP.PLI,70$	; INACTIVE
   2298	005460					DSP	SP.PLA,70$	; ACTIVE
   2299	005462					DSPEND
   2300					;
   2301					; RESET POLLING PRIORITY
   2302					;
   2303	005462	060002 			70$:	ADD	R0,R2		;INDEX INTO STATION TABLE
   2304	005464	116260 	000022 	000022 		MOVB	S.PQ-SP.PLP(R2),S.U(R0) ;AND RESET THE POLLING PRIORITY.
   2306					;
   2307					; SET SELECTION INTERVAL TIMER
   2308					;
   2309	005472	116515 	000001 		72$:	MOVB	L.ITMO(R5),(R5)	;RESET LINE TIMER
   2310					;
   2311					; SET THE BABBLING TIMER
   2312					;
   2313	005476	016504 	000052 			MOV	L.BABT(R5),R4	;IF THERE IS A TIMER
   2314	005502	001402 				BEQ	74$		;THEN
   2315	005504					CALL	$SDLTM		;START IT UP.
   2316					;
   2317					; COUNT THE SELECT
   2318					;
   2319	005510	005260 	000072 		74$:	INC	S.SEL(R0)	;BUMP SELECT SENT COUNTER
   2320	005514	001002 				BNE	80$		;AND IF OVERFLOW
   2321	005516	005360 	000072 			DEC	S.SEL(R0)	;THEN BACK IT UP.
   2322					;
   2323					; IF SHUTDOWN IN PROGRESS, SEE IF READY
   2324					;
   2325	005522	032711 	020000 		80$:	BIT	#SS.SHU,(R1)	;STATION MARKED FOR SHUTDOWN?
   2326	005526	001420 				BEQ	90$		;IF NOT, TRY TO SEND NEXT MESSAGE.
   2327	005530	105760 	000050 			TSTB	S.MOTD(R0)	;IF NO MESSAGES OUTSTANDING
   2328	005534	001005 				BNE	82$		;THEN
   2329	005536					CALL	HALTFN		;DO THE HALT.
   2330	005542	103402 				BCS	82$		;IF SYNCHRONOUS COMPLETION
   2331	005544					CALL	DDCFN2		;THEN COMPLETE THE CONTROL FUNCTION.
   2332
   2334	005550	032765 	000004 	000002 	82$:	BIT	#LS.MPM,L.STS(R5) ;IS THIS A MULTIPOINT MASTER
   2335	005556	001403 				BEQ	84$		;NO, SO JUST EXIT
   2336	005560	105765 	000064 			TSTB	L.NAST(R5)	;ANY ACTIVE STATIONS
   2337	005564	001001 				BNE	90$		;YES, SO TRY TO TRANSMIT SOME MORE
   2338	005566				84$:	RETURN
   2342
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 38-4
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2343	005570				90$:	CALLR	TXSND		;TRY TO SEND NEXT MESSAGE.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 39
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2345						.SBTTL	DCPRCP	- RECEIVE MESSAGE DONE PROCESS
   2346					;+
   2347					; CALLED BY COM-EXEC THROUGH FUNCTION DISPATCH TABLE WHEN DEVICE
   2348					; DRIVER HAS POSTED A RECEIVE COMPLETE FOR A LINE.  AT THIS POINT THE
   2349					; RECEIVED MESSAGE HAS HAD SOME FORMAT AND CRC CHECKING ALREADY
   2350					; PERFORMED BY THE DEVICE DRIVER AND ASSOCIATED COROUTINES.
   2351					;
   2352					; INPUTS:
   2353					;	R5 = ADDRESS OF LINE TABLE
   2354					;	R4 = CCB ADDRESS OF RECEIVED MESSAGE
   2355					;
   2356					; OUTPUTS:
   2357					;	NONE
   2358					;
   2359					; REGISTERS MODIFIED:
   2360					;	R4,R3,R2,R1,R0
   2361					;-
   2362
   2363	000074					.PSECT	DATA,D
   2364	000074				HDR:	.BLKW	3		;AREA TO RECEIVE COPY OF HEADER
   2365
   2366	005574					.PSECT	CODE,I
   2367	005574				DCPRCP:	SAVMAP			;SAVE CURRENT MAPPING
   2368	005600					MAP	C.BUF(R4)	;MAP TO THE RECEIVED DATA BUFFER
   2369	005606	016402 	000016 			MOV	C.BUF+2(R4),R2	;POINT TO RECEIVED MESSAGE
   2370	005612	012267 	000074'			MOV	(R2)+,HDR+0	;COPY
   2371	005616	012267 	000076'			MOV	(R2)+,HDR+2	;OVER
   2372	005622	011267 	000100'			MOV	(R2),HDR+4	;HEADER.
   2373	005626					RESMAP			;RESTORE CURRENT MAPPING
   2374
   2375	005632	005765 	000002 			TST	L.STS(R5)	;IS LINE MARKED FOR RESYNC?
   2376	005636	100007 				BPL	10$		;CONTINUE IF NOT
   2377	005640	032764 	010200 	000012 		BIT	#CS.RSN!CS.BUF,C.STS(R4) ;RESYNC SATISFIED?
   2378	005646	001425 				BEQ	TOSS		;TOSS IF NOT
   2379	005650	042765 	100000 	000002 		BIC	#LS.RSN,L.STS(R5) ;CLR WAITING FOR RESYNC
   2380	005656	016500 	000020 		10$:	MOV	L.CRST(R5),R0	;GET CURRENT STATION TABLE ADDRESS
   2381	005662	001417 				BEQ	TOSS		;IF THERE IS ONE
   2382	005664	010001 				MOV	R0,R1		;AND POINT TO
   2383	005666	062701 	000002 			ADD	#S.STS,R1	;STATION STATUS WORD.
   2384	005672	005764 	000012 			TST	C.STS(R4) 	;WAS THERE AN ERROR ON MESSAGE?
   2385	005676	100013 				BPL	MSGOK		;IF SO,
   2386	005700	032764 	077377 	000012 		BIT	#^C<CS.ERR!CS.DCR>,C.STS(R4) ;AND NOT DATA CRC ERROR
   2387	005706	001407 				BEQ	MSGOK		;THEN DON'T PROCESS FURTHER.
   2388	005710	122711 	000000 			CMPB	#SS.HLT,(R1)	;IF STATION NOT HALTED
   2389	005714	001402 				BEQ	TOSS		;THEN
   2390	005716					CALL	LGRER		;LOG RECEIVED ERROR.
   2391	005722				TOSS:	CALLR	$RDBRT		;RETURN RECEIVE DATA BUFFER
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 40
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2393					;
   2394					; ACCEPT THE MESSAGE FOR PROCESSING -
   2395					; ANALYZE STATE OF STATION AND MESSAGE TYPE RECEIVED TO DETERMINE
   2396					; APPROPRIATE ACTION.
   2397					;
   2399	005726	032765 	000014 	000002 	MSGOK:	BIT	#LS.MPT,L.STS(R5) ;IF MULTIPOINT MASTER OR SLAVE
   2400	005734	001431 				BEQ	18$		;THEN
   2401	005736					CALL	CKSTA		;CHECK THE STATION
   2402	005742	103767 				BCS	TOSS		;AND TOSS IF UNKNOWN.
   2403	005744	116003 	000021 			MOVB	S.PLS(R0),R3	;GET POLLING STATE
   2404	005750	000173 	005754'			JMP	@12$(R3)	;AND DO SOMETHING APPROPRIATE.
   2405	005754				12$:	DSPBEG
   2406	005754					DSP	SP.PLO,18$	; OFFLINE
   2407	005756					DSP	SP.PLD,14$	; DEAD
   2408	005760					DSP	SP.PLP,14$	; POTENTIALLY DEAD
   2409	005762					DSP	SP.PLI,18$	; INACTIVE
   2410	005764					DSP	SP.PLA,18$	; ACTIVE
   2411	005766					DSPEND
   2412
   2413	005766	126060 	000047 	000034 	14$:	CMPB	S.NDAT(R0),S.THI(R0) ;IF NO DATA MESSAGES RECENTLY
   2414	005774	103407 				BLO	16$		;AND
   2415	005776	126060 	000044 	000042 		CMPB	S.A(R0),S.X(R0)	;TRANSMITTED MESSAGES ACKED
   2416	006004	001003 				BNE	16$		;THEN
   2417	006006					CALL	SPPLI		;SET TO INACTIVE STATE
   2418	006012	000402 				BR	18$		;OTHERWISE
   2419	006014				16$:	CALL	SPPLA		;STATION IS ACTIVE.
   2420	006020	105060 	000046 		18$:	CLRB	S.NRSP(R0)	;RESET NO-RESPONSE COUNTER.
   2421	006024	016703 	000074'		20$:	MOV	HDR+0,R3	;PICK UP FUNCTION FOR EASY COMPARISON
   2425	006030	111102 				MOVB	(R1),R2		;GET STATION STATE
   2426	006032	001733 				BEQ	TOSS		;IF HALTED, DUMP THE MESSAGE.
   2427	006034	122703 	000005 			CMPB	#CM.ENQ,R3	;IF CONTROL MESSAGE
   2428	006040	001415 				BEQ	MSGCTL		;THEN PROCESS IT
   2429	006042	132764 	000002 	000011 		BITB	#FS.DVC/400,C.MOD(R4) ;IF DEVICE DOESN'T CHECK DATA CRC
   2430	006050	001002 				BNE	22$		;THEN
   2431	006052					CALL	CKCRC		;COMPUTE CRC NOW.
   2432	006056	122703 	000201 		22$:	CMPB	#CM.SOH,R3	;IF DATA,
   2433	006062	001002 				BNE	50$		;THEN
   2434	006064	000167 	000704 			JMP	MSGDAT		;PROCESS DATA MESSAGE
   2435	006070	000167 	001056 		50$:	JMP	MSGMOP		;OTHERWISE PROCESS MOP MESSAGE.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 41
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2437					;
   2438					; RECEIVED MESSAGE WAS UNNUMBERED CONTROL MESSAGE
   2439					; DISPATCH CONTROL MESSAGE BY TYPE
   2440					;
   2441
   2443	006074	105260 	000047 		MSGCTL:	INCB	S.NDAT(R0)	;INCLUDE IN NON-DATA MESSAGE COUNT
   2444	006100	001002 				BNE	10$		;AND IF OVERFLOW
   2445	006102	105360 	000047 			DECB	S.NDAT(R0)	;BACK THE COUNT OFF.
   2446	006106	126060 	000047 	000034 	10$:	CMPB	S.NDAT(R0),S.THI(R0) ;IF NO DATA MESSAGES RECEIVED
   2447	006114	001007 				BNE	20$		;FOR SOME TIME
   2448	006116	126060 	000044 	000042 		CMPB	S.A(R0),S.X(R0)	;AND ALL TRANSMITTED MESSAGES ACKED
   2449	006124	001003 				BNE	20$		;THEN
   2450	006126					CALL	SPPLI		;PUT THE STATION IN INACTIVE POLLING STATE
   2451	006132	111102 				MOVB	(R1),R2		;AND REGAIN STATION STATE.
   2452	006134	105003 			20$:	CLRB	R3		;GET CONTROL SUBTYPE
   2456	006136	000303 				SWAB	R3		;WITHOUT SIGN EXTENSION.
   2457	006140	022703 	000007 			CMP	#7,R3		;IF MESSAGE TYPE OUT OF RANGE
   2458	006144	103001 				BHIS	30$		;THEN
   2459	006146	005003 				CLR	R3		;SET AS INVALID.
   2460	006150	006303 			30$:	ASL	R3		;CONVERT TO WORD INDEX
   2461	006152					CALL	@40$(R2)	;DISPATCH TO STATE PROCESSOR
   2462	006156					CALL	$RDBRT		;BUFFER NO LONGER NEEDED
   2463	006162	000167 	001216 			JMP	ENDPRO
   2464	006166				40$:	DSPBEG
   2465	006166					DSP	SS.HLT		; HALTED (OR SHUTDOWN)
   2466	006170					DSP	SS.IST,MSGSTR	; INITIATE START
   2467	006172					DSP	SS.AST,MSGSTR	; ACKNOWLEDGE START
   2468	006174					DSP	SS.RUN,MSGRUN	; RUNNING
   2469	006176					DSP	SS.MNT,MSGNOP	; MAINTENANCE
   2470	006200					DSPEND
   2471
   2472	006200	152760 	000004 	000020 	MSGHFE:	BISB	#SE.SNK,S.STE(R0) ;SET TO SEND NAK
   2473	006206	112760 	000021 	000051 		MOVB	#RN.HFE,S.NKRE(R0) ;WITH HEADER FORMAT ERROR REASON
   2474	006214	142760 	000020 	000020 		BICB	#SE.SAK,S.STE(R0) ;CANCEL ANY PENDING ACKS
   2475	006222					CALL	TRETH		;AND ADJUST RECEIVE ERROR THRESHOLD.
   2476	006226	012716 	000000G		MSGBAD:	MOV	#$RDBRT,(SP)	;TOSS THE MESSAGE
   2477	006232				MSGNOP:	RETURN			;NOTHING TO DO.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 42
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2479					;
   2480					; STARTUP STATE
   2481					;
   2482	006234	000173 	006240'		MSGSTR:	JMP	@10$(R3)	;DISPATCH BY CONTROL SUB-TYPE
   2483	006240				10$:	DSPBEG	,<*2>
   2484	006240					DSP	,50$		;  (INVALID)
   2485	006242					DSP	MT.ACK,40$	; ACK
   2486	006244					DSP	MT.NAK,50$	; NAK
   2487	006246					DSP	MT.REP,50$	; REP
   2488	006250					DSP	,50$		;  (ARCHAIC)
   2489	006252					DSP	,50$		;  (ARCHAIC)
   2490	006254					DSP	MT.STR,20$	; START
   2491	006256					DSP	MT.STK,30$	; STACK
   2492	006260					DSPEND
   2493					;
   2494					; START RECEIVED
   2495					;
   2496	006260	105767 	000076'		20$:	TSTB	HDR+2		;IF SELECT NOT ON
   2497	006264	100026 				BPL	50$		;THEN BAD MESSAGE.
   2498	006266	116760 	000001'	000063 		MOVB	.ERRTH,S.NAKT(R0) ;RESET THE NAK THRESHOLD.
   2499	006274	112711 	000004 			MOVB	#SS.AST,(R1)	;MOVE TO START ACKNOWLEDGE STATE
   2500	006300	152760 	000041 	000020 		BISB	#SE.SSK!SE.SSL,S.STE(R0) ;AND SET TO SEND STACK.
   2501	006306					RETURN
   2502					;
   2503					; STACK RECEIVED
   2504					;
   2505	006310	105767 	000076'		30$:	TSTB	HDR+2		;IF SELECT NOT ON
   2506	006314	100012 				BPL	50$		;THEN BAD MESSAGE.
   2507	006316	152760 	000020 	000020 		BISB	#SE.SAK,S.STE(R0) ;SET TO SEND AN ACK
   2508	006324	000421 				BR	SETRUN		;AND GO TO RUN STATE.
   2509					;
   2510					; ACK RECEIVED
   2511					;
   2512	006326	122711 	000004 		40$:	CMPB	#SS.AST,(R1)	;IF IN ASTRT STATE
   2513	006332	001003 				BNE	50$		;AND
   2514	006334	105767 	000077'			TSTB	HDR+3		;ACK NUMBER ZERO
   2515	006340	001413 				BEQ	SETRUN		;THEN SET IN RUN STATE.
   2516	006342	122702 	000002 		50$:	CMPB	#SS.IST,R2	;OTHERWISE CHECK CURRENT STATE.
   2517	006346	001004 				BNE	60$		;IF IN START STATE
   2518	006350	152760 	000042 	000020 		BISB	#SE.SST!SE.SSL,S.STE(R0) ;THEN SEND ANOTHER START
   2519	006356	000723 				BR	MSGBAD		;ELSE
   2520	006360	152760 	000041 	000020 	60$:	BISB	#SE.SSK!SE.SSL,S.STE(R0) ;SEND A STACK
   2521	006366	000717 				BR	MSGBAD		;AND THROW THE MESSAGE AWAY.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 43
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2523					;
   2524					; SET THE STATION INTO RUN MODE
   2525					;
   2526	006370	042711 	005000 		SETRUN:	BIC	#SS.REP!SS.TIM,(R1) ;TURN OFF REP TIMER
   2527	006374	105765 	000002 			TSTB	L.STS(R5)	;AND IF FDX PT-PT
   2528	006400	001001 				BNE	10$		;THEN
   2529	006402	105015 				CLRB	(R5)		;TURN OFF THE CLOCK.
   2530	006404	116760 	000001'	000063 	10$:	MOVB	.ERRTH,S.NAKT(R0) ;RESET THE NAK THRESHOLD.
   2531	006412	112711 	000006 			MOVB	#SS.RUN,(R1)	;MOVE TO RUN STATE
   2532	006416	105260 	000057 			INCB	S.STRC(R0)	;AND BUMP THE START/RESTART COUNTER.
   2533	006422	001002 				BNE	20$		;IF OVERFLOW
   2534	006424	105360 	000057 			DECB	S.STRC(R0)	;THEN BACK OFF.
   2535	006430	010446 			20$:	MOV	R4,-(SP)	;SAVE MESSAGE BUFFER
   2536	006432	016004 	000014 			MOV	S.FCNL(R0),R4	;GET START CCB
   2537	006436	001411 				BEQ	90$		;(WHOOPS)
   2538	006440	005060 	000014 			CLR	S.FCNL(R0)	;AND INDICATE NO LONGER THERE.
   2539	006444	012764 	001006 	000010 		MOV	#<FC.CTL!FS.STR>,C.FNC(R4) ;SET FUNCTION
   2540	006452	012703 	000001 			MOV	#CS.SUC,R3	;SUCCESS CODE
   2541	006456					CALL	$CTCMP		;AND POST START COMPLETE.
   2542	006462	012604 			90$:	MOV	(SP)+,R4	;RESTORE MESSAGE BUFFER
   2543	006464					RETURN			;AND GO AWAY.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 44
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2545					;
   2546					; RUNNING STATE
   2547					;
   2548	006466	000173 	006472'		MSGRUN:	JMP	@10$(R3)	;DISPATCH BY TABLE OF CONTROL SUBTYPES
   2549	006472				10$:	DSPBEG	,<*2>
   2550	006472					DSP	,MSGHFE		;  (INVALID)
   2551	006474					DSP	MT.ACK,20$	; ACK
   2552	006476					DSP	MT.NAK,30$	; NAK
   2553	006500					DSP	MT.REP,50$	; REP
   2554	006502					DSP	,MSGHFE		;  (ARCHAIC)
   2555	006504					DSP	,MSGHFE		;  (ARCHAIC)
   2556	006506					DSP	MT.STR,80$	; START
   2557	006510					DSP	MT.STK,90$	; STACK
   2558	006512					DSPEND
   2559					;
   2560					; PROCESS RECIEVED ACKNOWLEDGED MESSAGE
   2561					;
   2562	006512				20$:	CALL	CKACK		;CHECK ON ACKNOWLEDGEMENT
   2563	006516	103643 				BCS	MSGBAD		;AND IGNORE IF OUT OF RANGE.
   2564	006520	001464 				BEQ	70$		;IF NEW ACK NUMBER
   2565	006522					CALLR	CKREP		;RESET REP TIMER IF NECESSARY.
   2566					;
   2567					; PROCESS RECEIVED NAK MESSAGE
   2568					; LOG NAK CODE RECEIVED. MARK STATION FOR RETRANSMISSION. IF NO
   2569					; MESSAGES ARE OUTSTANDING TO DEVICE DRIVER, THEN MESSAGES ARE
   2570					; REQUEUED FOR TRANSMISSION HERE.  ELSE REQUEUING OCCURS WHEN
   2571					; LAST TRANSMIT MESSAGE HAS BEEN RETURNED BY DEVICE DRIVER.
   2572					;
   2573	006526				30$:	CALL	CKACK		;CHECK ON ACKNOWLDEGEMENT RECEIVED
   2574	006532	103635 				BCS	MSGBAD		;AND IGNORE IF OUT OF RANGE.
   2575	006534	042711 	005000 			BIC	#SS.REP!SS.TIM,(R1) ;CLEAR REP TIMER
   2576	006540	105765 	000002 			TSTB	L.STS(R5)	;AND IF PT-PT
   2577	006544	001001 				BNE	32$		;THEN
   2578	006546	105015 				CLRB	(R5)		;CLEAR TIMER.
   2579	006550	116703 	000076'		32$:	MOVB	HDR+2,R3	;GET NAK CODE
   2580	006554	042703 	177700 			BIC	#^C77,R3	;ISOLATE AND
   2581	006560					CALL	LGNAK		;LOG IT.
   2582	006564					CALL	TNKTH		;UPDATE THE NAKS RECEIVED THRESHOLD
   2583	006570	126760 	000077'	000041 		CMPB	HDR+3,S.TM1(R0)	;NAKING OUTSTANDING MESSAGES?
   2584	006576	001435 				BEQ	70$		;BR IF NONE TO RETRANSMIT
   2585	006600	052711 	002000 			BIS	#SS.RTR,(R1)	;SIGNAL RETRANSMIT REQUESTED
   2586	006604					CALLR	TXRTX		;TRY A RETRANSMIT
   2587					;
   2588					; REP MESSAGE HAS BEEN RECEIVED.  CHECK TO SEE IF NAK OR ACK SHOULD
   2589					; BE RETURNED.
   2590					;
   2591	006610	126760 	000100'	000040 	50$:	CMPB	HDR+4,S.R(R0)	;HAVE RECEIVED ALL HIS MESSAGES?
   2592	006616	001417 				BEQ	60$		;SEND ACK AGAIN IF YES
   2593	006620	152760 	000004 	000020 		BISB	#SE.SNK,S.STE(R0) ;MARK TO SEND NAK
   2594	006626	112760 	000003 	000051 		MOVB	#RN.REP,S.NKRE(R0) ;WITH REP RESPONSE REASON
   2595	006634	142760 	000020 	000020 		BICB	#SE.SAK,S.STE(R0) ;CANCEL ANY PENDING ACKS
   2596	006642					CALL	TRETH		;AND ADJUST RECEIVE ERROR THRESHOLD.
   2597	006646	112703 	000052 			MOVB	#S.RCVE,R3	;CODE FOR RECEIVED REP
   2598	006652					CALLR	LGCTR		;LOG RECEIVED REP
   2599
   2600	006656	152760 	000020 	000020 	60$:	BISB	#SE.SAK,S.STE(R0) ;MARK TO SEND ACK
   2601	006664	142760 	000004 	000020 		BICB	#SE.SNK,S.STE(R0) ;AND CANCEL ANY NAKS.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 44-1
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2602	006672				70$:	RETURN			;FINISH UP RECEIVE
   2603					;
   2604					; START MESSAGE RECEIVED - NOTIFY HIGHER LEVEL THAT START HAS BEEN RECEIVED
   2605					; WHILE ONLINE AND HALT THE PROTOCOL.
   2606					;
   2607	006674	012703 	100364 		80$:	MOV	#CE.SRC,R3	;GET CODE FOR START RECEIVED
   2608	006700	005067 	000020'			CLR	PSTA		;NO THRESHOLD
   2609	006704					CALL	LOGGIT		;DO THE LOGGING
   2613	006710					CALL	NOTIF		;AND NOTIFY HLP
   2614	006714					CALL	$RDBRT		;NO LONGER NEED THIS
   2615	006720	005726 				TST	(SP)+		;AND NO END PROCESSING TO DO.
   2616	006722					CALL	$CCBGT		;AND TRY TO GET CCB.
   2617	006726	103415 				BCS	88$		;IF WE CAN,
   2618	006730	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE
   2619	006736	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;AND STATION
   2620	006744	012764 	002000 	000010 		MOV	#FS.STP,C.FNC(R4) ;FUNCTION = INTERNAL HALT OF PROTOCOL
   2621	006752	105064 	000002 			CLRB	C.RSV(R4)	;WITH NO NEW STATE
   2622	006756					CALLR	CTLDSP		;INITIATE SHUTDOWN OF STATION.
   2623	006762				88$:	RETURN
   2624					;
   2625					; STACK MESSAGE HAS BEEN RECEIVED.  ALWAYS RESPOND WITH ACK.
   2626					;
   2627	006764	152760 	000020 	000020 	90$:	BISB	#SE.SAK,S.STE(R0) ;MARK TO SEND ACK
   2628	006772					RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 45
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2630					;
   2631					; DATA MESSAGE HAS BEEN RECEIVED.
   2632					; IF NUMBER OF MESSAGE IS ONE GREATER (MODULO 256) THAN THE LAST
   2633					; ACCEPTED DATA MESSAGE, THEN MESSAGE IS ACCEPTED AND PASSED ON
   2634					; TO HIGHER LEVEL. OTHERWISE, MESSAGE IS IGNORED.
   2635					;
   2636	006774	000172 	007000'		MSGDAT:	JMP	@10$(R2)	;DISPATCH TO STATE PROCESSOR
   2637	007000				10$:	DSPBEG
   2638	007000					DSP	SS.HLT		; HALTED (OR SHUTDOWN)
   2639	007002					DSP	SS.IST,$RDBRT	; INITIATE START
   2640	007004					DSP	SS.AST,20$	; ACKNOWLEDGE START
   2641	007006					DSP	SS.RUN,30$	; RUNNING
   2642	007010					DSP	SS.MNT,$RDBRT	; MAINTENANCE
   2643	007012					DSPEND
   2644
   2645	007012	105767 	000077'		20$:	TSTB	HDR+3		;IF RESP<>0
   2646	007016	001052 				BNE	50$		;THEN DUMP THE MESSAGE
   2647	007020					CALL	SETRUN		;OTHERWISE SET TO RUN MODE.
   2648
   2650	007024	105060 	000047 		30$:	CLRB	S.NDAT(R0)	;RESET NON-DATA MESSAGE COUNT
   2651	007030					CALL	SPPLA		;AND MAKE SURE IN ACTIVE STATE.
   2652	007034	116003 	000040 		32$:	MOVB	S.R(R0),R3	;GET NUMBER OF LAST MESSAGE RECEIVED
   2656	007040	105203 				INCB	R3		;AND
   2657	007042	126703 	000100'			CMPB	HDR+4,R3	;THIS IS NOT THE NEXT ONE
   2658	007046	001036 				BNE	50$		;THEN IGNORE.
   2659	007050					CALL	CKACK		;CHECK ON RECEIVED ACK FIELD
   2660	007054	103433 				BCS	50$		;AND IGNORE IF OUT OF RANGE.
   2661	007056	001402 				BEQ	34$		;IF NEW ACK NUMBER
   2662	007060					CALL	CKREP		;RESET REP TIMER IF NECESSARY.
   2663	007064	005764 	000012 		34$:	TST	C.STS(R4)	;IF THERE IS A DATA CRC ERROR
   2664	007070	100423 				BMI	42$		;THEN DUMP THE MESSAGE.
   2665	007072	026767 	000000G	000000G		CMP	$RDBCT,$RDBTH	;IF NOT ENOUGH LDBS
   2666	007100	103414 				BLO	40$		;THEN GO NAK THIS ONE AND RETURN IT.
   2667	007102	105260 	000040 			INCB	S.R(R0)		;INC LAST MESSAGE NUM RECEIVED
   2668	007106	152760 	000020 	000020 		BISB	#SE.SAK,S.STE(R0) ;SCHEDULE TO SEND ACK
   2669	007114	142760 	000004 	000020 		BICB	#SE.SNK,S.STE(R0) ;AND CANCEL ANY PENDING NAKS.
   2670	007122	012764 	000001 	000012 		MOV	#CS.SUC,C.STS(R4) ;RETURN AS DATA MESSAGE
   2671	007130	000465 				BR	SNDMSG		;RETURN TO HLP
   2672	007132	052764 	100200 	000012 	40$:	BIS	#CS.ERR!CS.BUF,C.STS(R4) ;WE ARE CONGESTED
   2673	007140				42$:	CALL	LGRER		;LOG ERROR AND SCHEDULE NAK
   2674	007144				50$:	CALL	$RDBRT		;RETURN THE BUFFER
   2675	007150	000515 				BR	ENDPRO		;AND FINISH PROCESSING.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 46
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2677					;
   2678					; PROCESS MOP MESSAGE
   2679					; MESSAGE IS PASSED TO HIGHER LEVEL WITHOUT ANY FURTHER CHECKS.
   2680					;
   2681	007152	000172 	007156'		MSGMOP:	JMP	@10$(R2)	;DISPATCH TO STATE PROCESSOR
   2682	007156				10$:	DSPBEG
   2683	007156					DSP	SS.HLT		; HALTED (OR SHUTDOWN)
   2684	007160					DSP	SS.IST,20$	; INITIATE START
   2685	007162					DSP	SS.AST,20$	; ACKNOWLEDGE START
   2686	007164					DSP	SS.RUN,20$	; RUNNING
   2687	007166					DSP	SS.MNT,30$	; MAINTENANCE
   2688	007170					DSPEND
   2689
   2690	007170	012703 	100372 		20$:	MOV	#CE.MOP,R3	;GET MOP ERROR MESSAGE
   2691	007174	005067 	000020'			CLR	PSTA		;NO THRESHOLD
   2692	007200					CALL	LOGGIT		;DO THE LOGGING
   2693	007204					CALL	NOTIF		;POST AN ASYNC. ERROR
   2694	007210					CALL	$RDBRT		;DUMP THE BUFFER.
   2695	007214					CALL	$CCBGT		;TRY TO GET A CCB
   2696	007220	103415 				BCS	28$		;AND IF WE CAN,
   2697	007222	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE
   2698	007230	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;AND STATION
   2699	007236	012764 	002000 	000010 		MOV	#FS.STP,C.FNC(R4) ;FUNCTION = INTERNAL HALT OF PROTOCOL
   2700	007244	105064 	000002 			CLRB	C.RSV(R4)	;WITH NO NEW STATE
   2701	007250					CALLR	CTLDSP		;INITIATE SHUTDOWN OF STATION.
   2702	007254				28$:	RETURN
   2703					;
   2704					; *****
   2705					; AT PRESENT WE MUST INSURE THE SELECT AND QSYN FLAGS ARE ON, SINCE
   2706					; THE DMC11 VIOLATES THE SPEC BY LEAVING THEM OFF.
   2707					; *****
   2708					;
   2709	007256	152767 	000300 	000076'	30$:	BISB	#DD.SEL!DD.QSN,HDR+2 ;*** GUARANTY THAT WE ARE RE-SELECTED.
   2710	007264	005764 	000012 			TST	C.STS(R4)	;IF THERE IS A DATA CRC ERROR
   2711	007270	100005 				BPL	SNDMSG		;THEN
   2712	007272					CALL	LGRER		;LOG ERROR AND SCHEDULE NAK
   2713	007276					CALL	$RDBRT		;RETURN THE BUFFER
   2714	007302	000440 				BR	ENDPRO		;AND FINISH PROCESSING.
   2715					;
   2716					; PASS MESSAGE TO HIGHER LEVEL AND FINISH PROCESSING
   2717					;
   2718	007304	116760 	000001'	000061 	SNDMSG:	MOVB	.ERRTH,S.RETH(R0) ;RESET THE RECEIVE ERROR THRESHOLD
   2719	007312	132764 	000004 	000011 		BITB	#FS.CIB/400,C.MOD(R4) ;DID THE DEVICE REMOVE THE CRC ?
   2720	007320	001407 				BEQ	10$		;CRC IS NOT IN BUFFER
   2721	007322	062764 	000010 	000016 		ADD	#8.,C.BUF+2(R4)	;POINT TO DATA SECTION, PAST HDR AND CRC
   2722	007330	162764 	000012 	000020 		SUB	#10.,C.CNT(R4)	;SUB LENGTH OF HEADER AND BOTH CRC FROM COUNT
   2723	007336	000406 				BR	20$		;...
   2724	007340	062764 	000006 	000016 	10$:	ADD	#6,C.BUF+2(R4)	;POINT TO DATA SECTION, PAST HDR
   2725	007346	162764 	000006 	000020 		SUB	#6,C.CNT(R4)	;SUB LENGTH OF HEADER FROM COUNT
   2726	007354	116064 	000016 	000007 	20$:	MOVB	S.SLAN(R0),C.STA(R4) ;RETURN LOGICAL ADDRESS FOR STATION
   2727	007362	016403 	000012 			MOV	C.STS(R4),R3	;GET COMPLETION STATUS
   2728	007366	005260 	000066 			INC	S.RCV(R0)	;COUNT A MESSAGE RECEIVED
   2729	007372	001002 				BNE	30$		;DONT OVERFLOW COUNTER
   2730	007374	005360 	000066 			DEC	S.RCV(R0)	;GO BACK TO -1
   2731	007400				30$:	CALL	$RCCMP		;QUEUE RECEIVED MESSAGE
   2732	007404					FALLR	ENDPRO		;FINISH END PROCESSING
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 47
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2734					;
   2735					; END OF MESSAGE PROCESSING
   2736					;
   2737	007404	116502 	000002 		ENDPRO:	MOVB	L.STS(R5),R2	;GET LINE TYPE
   2738	007410	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MAINTENANCE MODE
   2739	007414	001002 				BNE	12$		;THEN
   2740	007416	152702 	000002 			BISB	#LS.HDX,R2	;TREAT AS HALF DUPLEX
   2741	007422	000172 	007426'		12$:	JMP	@14$(R2)	;AND PROCESS APPROPRIATELY.
   2742	007426				14$:	DSPBEG
   2743	007426					DSP	,TXSND		;FDX PT-PT
   2744	007430					DSP	,16$		;HDX PT-PT
   2745	007432					DSP	,16$		;FDX MASTER
   2746	007434					DSP	,16$		;HDX MASTER
   2747	007436					DSP	,20$		;FDX SLAVE
   2748	007440					DSP	,20$		;HDX SLAVE
   2749	007442					DSPEND
   2750	007442	116515 	000001 		16$:	MOVB	L.ITMO(R5),(R5)	;RESET LINE TIMER
   2751	007446	105767 	000076'		20$:	TSTB	HDR+2		;RECEIVED SELECT FROM OTHER STATION?
   2752	007452	100020 				BPL	24$		;NO, EXIT
   2753	007454	132702 	000010 			BITB	#LS.MPS,R2	;IF THIS IS A SLAVE
   2754	007460	001407 				BEQ	22$		;THEN
   2755	007462	016502 	000020 			MOV	L.CRST(R5),R2	;DESELECT PREVIOUS CURRENT STATION
   2756	007466	042762 	000400 	000002 		BIC	#SS.SEL,S.STS(R2) ;IF IT HASN'T ALREADY
   2757	007474	010065 	000020 			MOV	R0,L.CRST(R5)	;AND SET NEW CURRENT STATION.
   2758	007500	105015 			22$:	CLRB	(R5)		;RESET THE SELECT TIMER
   2759	007502	116760 	000001'	000062 		MOVB	.ERRTH,S.RPTH(R0) ;AND THE SELECT LOST THRESHOLD.
   2760	007510	000167 	174650 			JMP	SELND		;DO SELECTION END PROCESSING
   2761	007514	000167 	170402 		24$:	JMP	TXSND		;OR TRY TO TRANSMIT SOME MORE.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 48
CKCRC	- CRC COMPUTATION

   2763						.SBTTL	CKCRC	- CRC COMPUTATION
   2764					;+
   2765					; CKCRC CALCULATES THE CRC FOR THE DATA IF THE DEVICE IS UNABLE TO DO
   2766					; THIS CHECK. IF A CRC ERROR IS FOUND THE LINE IS RESYNCHRONIZED.
   2767					;
   2768					; INPUTS:
   2769					;	R4 = CCB ADDRESS
   2770					;
   2771					; OUTPUTS:
   2772					;	C.STS(R4) = UPDATED IF CRC ERROR
   2773					;
   2774					; REGISTERS MODIFIED:
   2775					;	NONE
   2776					;-
   2777
   2778	007520	005764 	000012 		CKCRC:	TST	C.STS(R4)	;DID DDM DETECT ANY ERRORS ?
   2779	007524	100445 				BMI	20$		;NO NEED TO CHECK CRC IF YES
   2780	007526					SAVMAP			;SAVE CURRENT MAPPING
   2781	007532	010246 				MOV	R2,-(SP)	;SOME REGISTERS
   2782	007534	010146 				MOV	R1,-(SP)	;
   2783	007536	010046 				MOV	R0,-(SP)	;
   2784	007540					MAP	C.BUF(R4)	;MAP TO BUFFER
   2785	007546	016402 	000016 			MOV	C.BUF+2(R4),R2	;GET BUFFER ADDRESS
   2786	007552	016400 	000020 			MOV	C.CNT(R4),R0	;AND LENGTH.
   2787	007556	062702 	000010 			ADD	#10,R2		;BYPASS HEADER
   2788	007562	162700 	000010 			SUB	#10,R0		;AND ADJUST COUNT
   2789	007566					$LIBCM	L.CRC,R5,$STCRC,SAVE ;CALL CRC LIBRARY ROUTINE,SAVE KISAR6
   2790	007610	012600 				MOV	(SP)+,R0	;GET STATION TABLE BACK
   2791	007612	005701 				TST	R1		;CHECK FOR GOOD CRC.
   2792	007614	001405 				BEQ	10$		;IF NOT GOOD,
   2793	007616	052764 	100400 	000012 		BIS	#CS.DCR!CS.ERR,C.STS(R4) ;MARK CRC ERROR
   2794	007624					CALL	DVRSN		;RESYNC DEVICE
   2795	007630	012601 			10$:	MOV	(SP)+,R1	;RESTORE REGISTERS
   2796	007632	012602 				MOV	(SP)+,R2	;AND
   2797	007634					RESMAP			;MAPPING.
   2798	007640				20$:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 49
CKSTA	- CHECK FOR LEGAL STATION IN RECEIVED MESSAGE

   2801						.SBTTL	CKSTA	- CHECK FOR LEGAL STATION IN RECEIVED MESSAGE
   2802					;+
   2803					;IF <YOU ARE IN MULTIPOINT>
   2804					;  THEN IF <STATION ADDRESS OK>
   2805					;    THEN PROCEDE AND ACCEPT MESSAGE
   2806					;    ELSE IF <YOU ARE A SLAVE>
   2807					;           THEN IF <THIS MESSAGE HAS SELECT SET>
   2808					;		    THEN CLEAR SELECT OF CURRENT STATION;
   2809					;		        SCAN LIST FOR NEW STATION
   2810					;		        IF <FOUND>
   2811					;			  THEN ACCEPT THE MESSAGE
   2812					;			  ELSE IGNORE THE MESSAGE
   2813					;		    ELSE;
   2814					;	    ELSE LOG SELECT RESPONSE ERROR AND IGNORE MESSAGE;
   2815					;  ELSE;
   2816					;CONTINUE PROCESSING (ACCEPT MESSAGE);
   2817					;
   2818					; INPUTS:
   2819					;	R5 = LINE TABLE ADDRESS
   2820					;	R1 = S.STS IN STATION TABLE
   2821					;	R0 = STATION TABLE ADDRESS OF CURRENT STATION
   2822					;
   2823					; OUTPUTS:
   2824					;   CARRY CLEAR
   2825					;	R1 = S.STS IN STATION TABLE
   2826					;	R0 = STATION TABLE OF STATION INDICATED IN MESSAGE
   2827					;   CARRY SET
   2828					;	STATION IS UNKNOWN
   2829					;
   2830					; REGISTERS MODIFIED:
   2831					;	R3,R1,R0
   2832					;-
   2833
   2834	007642	116703 	000101'		CKSTA:	MOVB	HDR+5,R3	;GET STATION NUMBER FROM MESSAGE.
   2835	007646	126003 	000017 			CMPB	S.SPAN(R0),R3	;IF SAME AS CURRENT STATION
   2836	007652	001412 				BEQ	50$		;THEN MESSAGE IS OKAY.
   2837
   2838	007654	032765 	000010 	000002 		BIT	#LS.MPS,L.STS(R5) ;IF THIS IS A SLAVE LINE
   2839	007662	001410 				BEQ	60$		;THEN
   2840	007664					CALL	100$		;SEARCH STATION LIST FOR NEW STATION
   2841	007670	103422 				BCS	90$		;IF IT EXISTS, THEN
   2842	007672	010001 				MOV	R0,R1		;POINT TO STATION STATUS WORD
   2843	007674	062701 	000002 			ADD	#S.STS,R1	;AND
   2844	007700	000241 			50$:	CLC			;SET SUCCESSFUL STATUS.
   2845	007702					RETURN
   2846
   2847	007704	012703 	000053 		60$:	MOV 	#S.TMOE,R3	;LOG "WRONG SELECT RESPONSE"
   2848	007710					CALL	100$		;FIND STATION TO LOG ERROR TO
   2849	007714	103410 				BCS	90$		;IF IT EXISTS
   2850	007716	005067 	000020'			CLR	PSTA		;NO THRESHOLD
   2851	007722					CALL	LOGGIT		;DO THE LOGGING
   2852	007726					CALL	LGCTR		;YES, GO LOG THE ERROR
   2853	007732					CALL	TRPTH		;UPDATE THE SELECT LOST THRESHOLD
   2854	007736	000261 			90$:	SEC			;UNSUCCESSFUL STATUS
   2855	007740					RETURN
   2856
   2857					;+
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 49-1
CKSTA	- CHECK FOR LEGAL STATION IN RECEIVED MESSAGE

   2858					; FIND STATION TABLE FOR GIVEN PHYSICAL TRIBUTARY
   2859					;-
   2860
   2861	007742	010500 			100$:	MOV	R5,R0		;POINT TO STATION LIST
   2862	007744	062700 	000014 			ADD	#L.STAL,R0	;
   2863	007750	011000 			110$:	MOV	(R0),R0		;FOLLOW STATION LINKS
   2864	007752	001771 				BEQ	90$		;IF ZERO, FAILED ALL MATCHES
   2865	007754	126003 	000017 			CMPB	S.SPAN(R0),R3	;STATION MATCH?
   2866	007760	001373 				BNE	110$		;NOT YET
   2867	007762					RETURN			;(CARRY IS CLEAR)
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 50
CKACK	- CHECK ON RECEIVED ACKNOWLEDGEMENT NUMBER

   2870						.SBTTL	CKACK	- CHECK ON RECEIVED ACKNOWLEDGEMENT NUMBER
   2871					;+
   2872					; THIS ROUTINE IS CALLED WHENEVER A MESSAGE IS RECEIVED WITH A
   2873					; HEADER THAT CONTAINS A RESPONSE FIELD.  THE RESPONSE IS CHECKED
   2874					; FOR VALIDITY AND IF VALID THEN ALL TRANSMITTED MESSAGES WHICH
   2875					; ARE ACKNOWLEDGED BY THE RESPONSE ARE RETURNED TO THE PROCESS
   2876					; CONTROLLING DDCMP FOR THIS STATION.  THE MESSAGES ARE RETURNED
   2877					; WITH A SUCCESSFUL COMPLETION CODE.
   2878					;
   2879					; INPUTS:
   2880					;	R5 = ADDRESS OF LINE TABLE
   2881					;	R4 = NON-ZERO VALUE
   2882					;	R0 = ADDRESS OF STATION TABLE
   2883					;
   2884					; OUTPUTS:
   2885					;   CARRY AND NON-ZERO CLEAR
   2886					;	NO CHANGE IN ACK MESSAGE NUMBER
   2887					;   CARRY CLEAR AND NON-ZERO SET
   2888					;	MESSAGES WERE ACKED
   2889					;   CARRY SET
   2890					;	ACK NUMBER OUT OF RANGE
   2891					;
   2892					; REGISTERS MODIFIED:
   2893					;	R3,R2
   2894					;-
   2895
   2896	007764	116003 	000044 		CKACK:	MOVB	S.A(R0),R3	;GET NUMBER OF LAST ACK
   2897	007770	116702 	000077'			MOVB	HDR+3,R2	;AND THE NEW RECEIVED ACK.
   2898	007774	120302 				CMPB	R3,R2		;IF THE SAME
   2899	007776	001430 				BEQ	90$		;THEN EXIT FAST
   2900	010000	010446 				MOV	R4,-(SP)	;SAVE A REGISTER
   2901	010002	160302 				SUB	R3,R2		;OTHERWISE GET GET DISTANCE BETWEEN.
   2902	010004	116004 	000043 			MOVB	S.N(R0),R4	;GET HIGHEST MSG # XMTD
   2903	010010	160304 				SUB	R3,R4		;AND THE DISTANCE TO IT.
   2904	010012	120402 				CMPB	R4,R2		;IS ACK WITHIN BOUNDS ?
   2905	010014	103420 				BLO	70$		;EXIT IF NOT IN RANGE
   2906	010016	116760 	000077'	000044 		MOVB	HDR+3,S.A(R0)	;SET NEW ACK NUMBER
   2907	010024					CALL	RTACK		;RETURN AS MANY MESSAGES AS CAN.
   2909	010030	126060 	000047 	000034 		CMPB	S.NDAT(R0),S.THI(R0) ;IF DATA NOT RECEIVED RECENTLY
   2910	010036	103406 				BLO	60$		;AND
   2911	010040	126060 	000044 	000042 		CMPB	S.A(R0),S.X(R0)	;ALL MESSAGES ACKED
   2912	010046	001002 				BNE	60$		;THEN
   2913	010050					CALL	SPPLI		;SET POLLING STATE TO INACTIVE.
   2915	010054	000241 			60$:	CLC			;CLEAR CARRY
   2916	010056	012604 			70$:	MOV	(SP)+,R4	;RESTORE REGISTER
   2917	010060				90$:	RETURN			;AND RETURN TO CALLER.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 51
CKACK	- CHECK ON RECEIVED ACKNOWLEDGEMENT NUMBER

   2919					;+
   2920					; ADJUST REP TIMER AFTER RECEIVING A VALID ACK.
   2921					;
   2922					; INPUTS:
   2923					;	R5 = ADDRESS OF LINE TABLE
   2924					;	R1 = POINTER TO S.STS IN STATION TABLE
   2925					;	R0 = ADDRESS OF STATION TABLE
   2926					;
   2927					; OUTPUTS:
   2928					;	NONE
   2929					;
   2930					; REGISTERS MODIFIED:
   2931					;	R3,R2
   2932					;-
   2933
   2934	010062	042711 	005000 		CKREP:	BIC	#SS.REP!SS.TIM,(R1) ;CLEAR TIMER
   2935	010066	105765 	000002 			TSTB	L.STS(R5)	;AND IF FDX PT-PT
   2936	010072	001001 				BNE	10$		;THEN
   2937	010074	105015 				CLRB	(R5)		;CANCEL CLOCK.
   2938	010076	116003 	000043 		10$:	MOVB	S.N(R0),R3
   2939	010102	010346 				MOV	R3,-(SP)
   2940	010104	116002 	000042 			MOVB	S.X(R0),R2
   2941	010110	160203 				SUB	R2,R3		; N-X
   2942	010112	116002 	000044 			MOVB	S.A(R0),R2
   2943	010116	160216 				SUB	R2,(SP)		; N-A
   2944	010120	122603 				CMPB	(SP)+,R3	; N-A : N-X
   2945	010122	101412 				BLOS	90$		;IF N-A > N-X  (A < X)
   2946	010124	105765 	000002 			TSTB	L.STS(R5)	;IF FDX PT-PT
   2947	010130	001005 				BNE	80$		;THEN
   2948	010132	052711 	004000 			BIS	#SS.TIM,(R1)	;SET REP TIMER AND
   2949	010136	116515 	000001 			MOVB	L.ITMO(R5),(R5)	;TURN ON THE CLOCK
   2950	010142	000402 				BR	90$		;OTHERWISE
   2951	010144	052711 	001000 		80$:	BIS	#SS.REP,(R1)	;JUST SET THE REP TIMER FLAG.
   2952	010150				90$:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 52
RTACK	- RETURN ACKED MESSAGES

   2954						.SBTTL	RTACK	- RETURN ACKED MESSAGES
   2955					;+
   2956					; REMOVE FIRST MESSAGE FROM ACKNOWLEDGEMENT QUEUE FOR THIS STATION
   2957					; AND RETURN THE MESSAGE TO THE HIGHER LEVEL PROCESS AS COMPLETE
   2958					;
   2959					; INPUTS:
   2960					;	R5 = LINE TABLE ADDRESS
   2961					;	R1 = I/O FINISH CODE
   2962					;	R0 = STATION TABLE ADDRESS
   2963					;
   2964					; OUTPUTS:
   2965					;	NONE
   2966					;
   2967					; REGISTERS MODIFIED:
   2968					;	R4,R3
   2969					;-
   2970
   2971						.ENABL	LSB
   2972	010152	105260 	000045 		10$:	INCB	S.AR(R0)	;THIS MESSAGE IS BEING RETURNED.
   2973	010156	005260 	000070 			INC	S.XMT(R0)	;BUMP THE TRANSMITTED BLOCK COUNTER
   2974	010162	001002 				BNE	20$		;BUT
   2975	010164	005360 	000070 			DEC	S.XMT(R0)	;NOT TOO FAR.
   2976	010170	012703 	000001 		20$:	MOV	#CS.SUC,R3	;SET THE STATUS
   2977	010174					CALL	$XMCMP		;AND RETURN THE BUFFER.
   2978	010200	116760 	000001'	000063 		MOVB	.ERRTH,S.NAKT(R0) ;AND RESET THE NAK THRESHOLD.
   2979
   2980	010206	126060 	000045 	000044 	RTACK:	CMPB	S.AR(R0),S.A(R0) ;IF NOT ALL MESSAGES RETURNED
   2981	010214	001406 				BEQ	30$		;THEN
   2982	010216	010003 				MOV	R0,R3		;GET THE
   2983	010220	062703 	000010 			ADD	#S.TAKQ,R3	;WAITING-FOR-ACK QUEUE
   2984	010224					CALL	$CMQRM		;AND TRY TO GET ONE FOR RETURNING.
   2985	010230	103350 				BCC	10$		;IF NONE AVAILABLE
   2986	010232				30$:	RETURN			;THEN QUIT.
   2987						.DSABL	LSB
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 53
TXRTX	- REQUEUE AND RETRANSMIT DATA MESSAGES FOR STATION

   2989						.SBTTL	TXRTX	- REQUEUE AND RETRANSMIT DATA MESSAGES FOR STATION
   2990					;+
   2991					; MESSAGES ARE TAKEN FROM THE ACKNOWLEDGEMENT QUEUE AND PLACED IN ORDER
   2992					; ON THE FRONT OF THE DATA PRETRANSMISSION QUEUE.  FOR MULTIPOINT,
   2993					; REQUEUING IS DONE FOR A SINGLE STATION DEFINED BY STATION TABLE.
   2994					;
   2995					; INPUTS:
   2996					;	R5 = ADDRESS OF LINE TABLE
   2997					;	R1 = ADDRESS OF S.STS IN STATION TABLE
   2998					;	R0 = ADDRESS OF STATION TABLE
   2999					;
   3000					; OUTPUTS:
   3001					;	NONE
   3002					;
   3003					; REGISTERS MODIFIED:
   3004					;	NONE
   3005					;-
   3006
   3007	010234	105760 	000050 		TXRTX:	TSTB	S.MOTD(R0)	;ANY MESSAGES OUT TO DRIVER
   3008	010240	001037 				BNE	30$		;YES, SO JUST EXIT FOR NOW
   3009	010242	042711 	002000 			BIC	#SS.RTR,(R1)	;CLEAR THE RETRANSMIT BIT
   3010	010246	005760 	000010 			TST	S.TAKQ(R0)	;ANY THING IN THE ACK QUEUE
   3011	010252	001427 				BEQ	20$		;NO, SO ALL DONE
   3012	010254	016070 	000004 	000012 		MOV	S.PTXQ(R0),@S.TAKQ+2(R0) ;PTX QUEUE TO END OF ACK QUEUE
   3013	010262	001003 				BNE 	10$		;THERE IS A PTX QUEUE
   3014	010264	016060 	000012 	000006 		MOV	S.TAKQ+2(R0),S.PTXQ+2(R0) ;END OF ACK QUEUE TO PTX QUEUE END
   3015	010272	016060 	000010 	000004 	10$:	MOV	S.TAKQ(R0),S.PTXQ(R0) ;UPDATE FRONT OF PTX QUEUE
   3016	010300	005060 	000010 			CLR	S.TAKQ(R0)	;CLEAR	THE HEAD POINTER
   3017	010304	010060 	000012 			MOV	R0,S.TAKQ+2(R0)	;AND RESET
   3018	010310	062760 	000010 	000012 		ADD	#S.TAKQ,S.TAKQ+2(R0) ;THE TAIL POINTER.
   3019	010316	005765 	000026 			TST	L.XMST(R5)	;IF THE TRANSMITTER WAS QUIESCENT
   3020	010322	001003 				BNE	20$		;THEN
   3021	010324	016565 	000014 	000026 		MOV	L.STAL(R5),L.XMST(R5) ;WAKE IT UP.
   3022	010332	116060 	000044 	000041 	20$:	MOVB	S.A(R0),S.TM1(R0) ;RESET MESSAGE NUMBER TO USE.
   3023	010340				30$:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 54
NOTIF	- NOTIFY LLC OF FUNCTION COMPLETE OR STATUS CONDITION.

   3025						.SBTTL	NOTIF	- NOTIFY LLC OF FUNCTION COMPLETE OR STATUS CONDITION.
   3026					;+
   3027					; ATTEMPT TO ALLOCATE A CCB FOR RETURN TO LLC AND FILL IN APPROPRIATE
   3028					; INFORMATION NEEDED.
   3029					;
   3030					; INPUTS:
   3031					;	R5 = LINE TABLE ADDRESS
   3032					;	R0 = STATION TABLE ADDRESS
   3033					;	R3 = RETURN STATUS
   3034					;
   3035					; OUTPUTS:
   3036					;   CARRY CLEAR
   3037					;	FUNCTION COMPLETED SUCCESSFULLY
   3038					;   CARRY SET
   3039					;	FAILED TO ALLOCATE CCB
   3040					;
   3041					; REGISTERS MODIFIED:
   3042					;	NONE
   3043					;-
   3044
   3045	010342	010446 			NOTIF:	MOV	R4,-(SP)	;SAVE R4
   3046	010344					CALL	$CCBGT		;ALLOCATE A CCB FOR RETURN
   3047	010350	103413 				BCS	10$		;RETURN C SET IF NONE AVAILABLE
   3048	010352	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE NUMBER
   3049	010360	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;SET LOGICAL STATION #
   3050	010366	105064 	000011 			CLRB	C.MOD(R4)	;SET ERROR RETURN AS SUBFUNCTION
   3051	010372					CALL	$CTCMP		;QUEUE CCB TO LLC FOR NOTIFICATION
   3052	010376	000241 				CLC			;RETURN SUCCESSFUL
   3053	010400	012604 			10$:	MOV	(SP)+,R4	;RESTORE R4
   3054	010402					RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 55
SAV31	- SAVE REGISTERS R3 THROUGH R1

   3056						.SBTTL	SAV31	- SAVE REGISTERS R3 THROUGH R1
   3057					;+
   3058					; COROUTINE USED TO SAVE R3, R2, R1.
   3059					;
   3060					; CALLING SEQUENCE:
   3061					;	JSR	R3,SAV31
   3062					;
   3063					; INPUTS:
   3064					;	R3 = RETURN ADDRESS OF CALLER
   3065					;	(SP) = SAVED R3 BY JSR R3,SAV31 CALL
   3066					;
   3067					; OUTPUTS:
   3068					;	NONE
   3069					;
   3070					; REGISTERS MODIFIED:
   3071					;	NONE
   3072					;-
   3073
   3074	010404	010246 			SAV31:	MOV	R2,-(SP)	;SAVE R1
   3075	010406	010146 				MOV	R1,-(SP)	;SAVE R2
   3076	010410	010346 				MOV	R3,-(SP)	;PUT CALLER'S ADDR ON STACK
   3077	010412	016603 	000006 			MOV	6(SP),R3	;RESTORE ORIGINAL R3
   3078	010416					CALL	@(SP)+		;CALL CALLER BACK
   3079	010420	012601 				MOV	(SP)+,R1	;RESTORE R2 - R3
   3080	010422	012602 				MOV	(SP)+,R2
   3081	010424	012603 				MOV	(SP)+,R3
   3082	010426					RETURN			;RETURN TO ORIGINAL CALLER
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 56
RECEIVER ERROR CODE PROCESSING TABLE

   3084						.SBTTL	RECEIVER ERROR CODE PROCESSING TABLE
   3085					;
   3086					; USED FOR DECODING ERROR BITS SET IN STATUS RETURN WORD OF
   3087					; CCB OF MESSAGE RECEIVED BY DEVICE.
   3088					;	FORMAT OF ENTRY IN TABLE IS
   3089					;	.BYTE	DDCMP NAK ERROR CODE, ERROR COUNTER OFFSET
   3090					;	.WORD	FLAG BIT MASK IN STATUS WORD IN CCB
   3091					;
   3092		006606 				VLCSER=CS.DCR!CS.BUF!CS.ROV!CS.MTL!CS.HFE!CS.DEV ;ALL VALID ERRORS
   3093
   3094	000102					.PSECT	DATA,D
   3095	000102	   002 	   052 		RERTBL:	.BYTE	RN.DBC,S.RCVE	;DATA CRC ERROR
   3096	000104	000400 				.WORD	CS.DCR
   3097	000106	   010 	   054 			.BYTE	RN.BUF,S.RSTE	;BUFFER ALLOCATION FAILURE
   3098	000110	000200 				.WORD	CS.BUF
   3099	000112	   011 	   052 			.BYTE	RN.ROV,S.RCVE	;RECEIVER OVERRUN
   3100	000114	000004 				.WORD	CS.ROV
   3101	000116	   020 	   052 			.BYTE	RN.MTL,S.RCVE	;RECEIVE MESSAGE TOO LONG
   3102	000120	004000 				.WORD	CS.MTL
   3103	000122	   021 	   052 			.BYTE	RN.HFE,S.RCVE	;RECEIVED HEADER FORMAT ERROR
   3104	000124	002000 				.WORD	CS.HFE
   3105	000126	   011 	   052 			.BYTE	RN.ROV,S.RCVE	;UNRECOVERABLE RECEIVE DEVICE HARD ERROR
   3106	000130	000002 				.WORD	CS.DEV
   3107	000132	000000 				.WORD	0		;LAST TABLE ENTRY
   3108					;
   3109					; RECEIVED NAK CODE AND OFFSET TABLE
   3110					;
   3111					; THIS TABLE MAPS THE VALUE OF A DDCMP ERROR CODE RECEIVED IN A
   3112					; NAK MESSAGE INTO THE OFFSET OF THE APPROPRIATE ERROR COUNTER.
   3113					;	ENTRY HAS FORMAT:
   3114					;	.BYTE	RECV NAK TYPE CNTR OFFSET, DDCMP NAK ERROR CODE
   3115					;
   3116	000134	   055 	   001 		NAKTBL:	.BYTE	S.XMTE,RN.HBC	;RECEIVED NAK WITH HEADER CRC REASON
   3117	000136	   055 	   002 			.BYTE	S.XMTE,RN.DBC	;RECEIVED NAK WITH DATA CRC REASON
   3118	000140	   055 	   003 			.BYTE	S.XMTE,RN.REP	;RECEIVED NAK WITH REP RESPONSE REASON
   3119	000142	   056 	   010 			.BYTE	S.DSTE,RN.BUF	;RECV NAK, BUFFER ALLOCATION REASON
   3120	000144	   056 	   011 			.BYTE	S.DSTE,RN.ROV	;RECV NAK WITH RECEVER OVERRUN REASON
   3121	000146	   056 	   020 			.BYTE	S.DSTE,RN.MTL	;RECV NAK WITH MESS TOO LONG REASON
   3122	000150	   055 	   021 			.BYTE	S.XMTE,RN.HFE	;RECV NAK, HEADR FORMAT ERROR AS REASON
   3123	000152	000000 				.WORD	0		;END OF TABLE
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 57
LGRER	- LOG RECEIVER ERRORS

   3125						.SBTTL	LGRER	- LOG RECEIVER ERRORS
   3126					;+
   3127					; THIS ROUTINE IS USED TO LOG ERRORS ON MESSAGES RECEIVED BY DDCMP.
   3128					; THE BITS IN THE STATUS WORD ARE MAPPED INTO OFFSETS OF APPRO-
   3129					; PRIATE ERROR COUNTERS.  THE COUNTER  IS INCREMENTED AND THE
   3130					; ERROR IS LOGGED IN THE ERROR TUMBLE TABLE.  ALL ERRORS
   3131					; CAUSE THE THRESHOLD COUNTER TO BE DECREMENTED.  IF THE
   3132					; THRESHOLD COUNTER DECREMENTS TO ZERO THEN THE THRESHOLD HAS
   3133					; BEEN EXCEEDED AND THE HIGHER LEVEL PROCESS IS NOTIFIED.
   3134					;
   3135					; INPUTS:
   3136					;	R5 = ADDRESS OF LINE TABLE
   3137					;	R4 = CCB OF RECEIVED MESSAGE
   3138					;	R0 = STATION TABLE ADDRESS
   3139					;
   3140					; OUTPUTS:
   3141					;	NONE
   3142					;
   3143					; REGISTERS MODIFIED:
   3144					;	NONE
   3145					;-
   3146
   3147	010430					.PSECT	CODE,I
   3148	010430	004367 	177750 		LGRER:	JSR	R3,SAV31	;SAVE R3,R2,R1
   3149	010434	016402 	000012 			MOV	C.STS(R4),R2	;GET RECEIVER STATUS WORD
   3150					;
   3151					; CLEAR ALL BUT BITS THAT CAN BE LOGGED
   3152					;
   3153	010440	012701 	000102'		10$:	MOV	#RERTBL,R1	;GET START OF ERROR CODE TABLE
   3154	010444	012103 			20$:	MOV	(R1)+,R3	;GET ERROR CODE AND OFFSET
   3155	010446	001416 				BEQ	40$		;RETURN IF END OF TABLE
   3156	010450	030221 				BIT	R2,(R1)+	;CHECK FOR THIS TYPE ERROR
   3157	010452	001774 				BEQ	20$		;CHECK NEXT EXTRY IF NO MATCH
   3158	010454	044102 				BIC	-(R1),R2	;CLEAR ERROR FLAG FOR THIS TYPE
   3159	010456	110360 	000051 			MOVB	R3,S.NKRE(R0)	;SET NAK ERROR CODE FOR TRANSMIT
   3160	010462	105003 				CLRB	R3		;CLR LOW BYTE
   3161	010464	000303 				SWAB	R3		;GET OFFSET INTO LOW BYTE
   3162	010466					CALL	LGCTR		;LOG ERROR AND BUMP COUNTER
   3163	010472	032702 	006606 			BIT	#VLCSER,R2	;ALL ERRORS LOGGED FOR THIS RECEIVE?
   3164	010476	001360 				BNE	10$		;CONTINUE LOGGING IF MORE
   3165	010500					CALL	TRETH		;UPDATE THE RECEIVE ERROR THRESHOLD
   3166	010504	122760 	000006 	000002 	40$:	CMPB	#SS.RUN,S.STS(R0) ;IS LINE UP
   3167	010512	001012 				BNE	100$		;NO, SO DON'T SEND NAK
   3168	010514	152760 	000004 	000020 		BISB	#SE.SNK,S.STE(R0) ;MARK TO SEND NAK
   3169	010522	142760 	000020 	000020 		BICB	#SE.SAK,S.STE(R0) ;CANCEL ANY PENDING ACKS
   3170	010530	010446 				MOV	R4,-(SP)	;SAVE OFFENDING CCB/BUFFER
   3171	010532					CALL	TXSND		;AND TRY TO SEND THE NAK
   3172	010536	012604 				MOV	(SP)+,R4
   3173	010540				100$:	RETURN			;RETURN TO CALLER
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 58
LGNAK	- LOG ERROR CODE IN RECEIVED NAK MESSAGES.

   3175						.SBTTL	LGNAK	- LOG ERROR CODE IN RECEIVED NAK MESSAGES.
   3176					;+
   3177					; THIS ENTRY IS USED TO LOG NAK MESSAGES RECEIVED FROM
   3178					; THE REMOTE STATION.  THE CODE CONTAINED IN THE NAK IS MAPPED
   3179					; INTO AN OFFSET OF A COUNTER WHICH IS THEN INCREMENTED.  THE
   3180					; RECEIVED NAK IS THEN LOGGED IN THE ERROR TUMBLE TABLE.
   3181					;
   3182					; INPUTS:
   3183					;	R5 = LINE TABLE ADDRESS
   3184					;	R3 = REASON CODE FROM RECEIVED NAK
   3185					;	R0 = STATION TABLE ADDRESS
   3186					;
   3187					; OUTPUTS:
   3188					;	NONE
   3189					;
   3190					; REGISTERS MODIFIED:
   3191					;	NONE
   3192					;-
   3193
   3194	010542	004367 	177636 		LGNAK:	JSR	R3,SAV31	;SAVE R3,R2,R1
   3195	010546	010302 				MOV	R3,R2		;COPY RECEIVED NAK CODE
   3196	010550	012701 	000134'			MOV	#NAKTBL,R1	;POINT TO NAK CODE TABLE
   3197	010554	112103 			10$:	MOVB	(R1)+,R3	;GET OFFSET FOR NEXT CODE
   3198	010556	001410 				BEQ	LGRET		;IGNORE CODE IF NOT IN TABLE
   3199	010560	122102 				CMPB	(R1)+,R2	;RECEIVED NAK OF THIS CODE?
   3200	010562	001374 				BNE	10$		;CHECK NEXT ENTRY IF NOT
   3201	010564					FALLR	LGCTR		;AND LOG THE ERROR
   3202
   3203						.SBTTL	LGCTR	- INCREMENT COUNTER AND LOG ERROR.
   3204					;+
   3205					; THIS ROUTINE IS USED TO INCREMENT A COUNTER IN A STATION
   3206					; TABLE.  TIS IS USED TO LOG ERRORS AND OTHER EVENTS.  FALLS
   3207					; THROUGH TO LGENT.
   3208					;
   3209					; INPUTS:
   3210					;	R3 = OFFSET OF COUNTER TO BE BUMPED AND LOGGED
   3211					;	R0 = STATION TABLE ADDRESS
   3212					;
   3213					; OUTPUTS:
   3214					;	NONE
   3215					;
   3216					; REGISTERS MODIFIED:
   3217					;	NONE
   3218					;-
   3219
   3220	010564	010346 			LGCTR:	MOV	R3,-(SP)	;SAVE CODE VALUE
   3221	010566	060003 				ADD	R0,R3		;POINT TO COUNTER FOR THIS CODE
   3222	010570	105213 				INCB	(R3)		;INC COUNTER
   3223	010572	001001 				BNE	20$		;BR IF NO OVERFLOW
   3224	010574	105313 				DECB	(R3)		;DON'T INC PAST 377
   3225	010576	012603 			20$:	MOV	(SP)+,R3	;RESTORE CODE VALUE
   3229	010600				LGRET:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 59
LGENT	- LOG ENTRY IN ERROR LOGGING CIRCULAR BUFFER.

   3232						.SBTTL	LGENT	- LOG ENTRY IN ERROR LOGGING CIRCULAR BUFFER.
   3233					;+
   3234					; THIS ROUTINE LOGS AN ENTRY IN THE ERROR LOGGING TUMBLE TABLE.
   3235					; THE VALUE INSERTED IN THE TABLE IS THE OFFSET OF A COUNTER
   3236					; IN THE STATION TABLE OR MAY BE ANY NONCONFLICTING VALUE.
   3237					;
   3238					; FORMAT OF ENTRY IN TUMBLE TABLE IS:
   3239					;	.BYTE	SOURCE OF ERROR (IN THIS CASE DDCMP)
   3240					;	.BYTE	EVENT CODE VALUE (USUALLY OFFSET OF COUNTER)
   3241					;	.BYTE	SYSTEM LINE NUMBER
   3242					;	.BYTE	STATION LOGICAL ADDRESS ON THIS LINE
   3243					;
   3244					; INPUTS:
   3245					;	R5 = LINE TABLE ADDRESS
   3246					;	R3 = CODE TO LOG
   3247					;	R0 = STATION TABLE ADDRESS
   3248					;
   3249					; OUTPUTS:
   3250					;	NONE
   3251					;
   3252					; REGISTERS MODIFIED:
   3253					;	NONE
   3254					;-
   3255
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 60
T**TH	- THRESHOLD COUNTERS

   3272						.SBTTL	T**TH	- THRESHOLD COUNTERS
   3273					;+
   3274					; BUMP A THRESHOLD COUNTER AND MAKE A REPORT IF NECESSARY.
   3275					;
   3276					; INPUTS:
   3277					;	R5 = ADDRESS OF LINE TABLE
   3278					;	R0 = ADDRESS OF STATION TABLE
   3279					;
   3280					; OUTPUTS:
   3281					;	NONE
   3282					;
   3283					; REGISTERS MODIFIED:
   3284					;	NONE
   3285					;-
   3286
   3287	010602	004367 	000034 		TSTTH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3288	010606	000063 				S.NAKT			;OFFSET INTO STATION TABLE
   3289	010610	100361 				CE.NTE			;AND REASON CODE.
   3290
   3291	010612	004367 	000024 		TNKTH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3292	010616	000063 				S.NAKT			;OFFSET INTO STATION TABLE
   3293	010620	100361 				CE.NTE			;AND REASON CODE.
   3294
   3295	010622	004367 	000014 		TRETH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3296	010626	000061 				S.RETH			;OFFSET INTO STATION TABLE
   3297	010630	100376 				CE.RTE			;AND REASON CODE.
   3298
   3299	010632	004367 	000004 		TRPTH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3300	010636	000062 				S.RPTH			;OFFSET INTO STATION TABLE
   3301	010640	100374 				CE.TMO			;AND REASON CODE.
   3302					;
   3303					; COMMON THRESHOLD HANDLER
   3304					;
   3305	010642	010246 			THRESH:	MOV	R2,-(SP)	;SAVE R2
   3306	010644	012302 				MOV	(R3)+,R2	;AND PICK UP
   3307	010646	060002 				ADD	R0,R2		;COUNTER ADDRESS.
   3308	010650	000241 				CLC			;(INSURE CARRY IS OFF)
   3309	010652	105312 				DECB	(R2)		;COUNT IT OUT
   3310	010654	003002 				BGT	40$		;AND RETURN IF STILL ROOM.
   3311	010656	001404 				BEQ	60$		;IF BEYOND THE PAIL THEN
   3312	010660	105212 			30$:	INCB	(R2)		;BACK THE COUNTER OFF.
   3313	010662	012602 			40$:	MOV	(SP)+,R2	;RECOVER REGISTERS
   3314	010664	012603 				MOV	(SP)+,R3
   3315	010666					RETURN
   3316					;
   3317					; REPORT THE ERROR. IF REPORT COULD NOT BE MADE, THEN RESET THE COUNTER
   3318					; TO FIRE AGAIN ON THE NEXT ERROR. IF NOT IN RUN STATE (ISTRT OR ASTRT),
   3319					; THEN DO NOT RESET THRESHOLD COUNTER. THIS AVOIDS EXTRANEOUS REPORTS.
   3320					;
   3321	010670	116767 	000001'	000020'	60$:	MOVB	.ERRTH,PSTA	;SET THE THRESHOLD
   3322	010676	011303 				MOV	(R3),R3		;AND GET THE ERROR CODE.
   3323	010700					CALL	LOGGIT		;DO THE LOGGING
   3324	010704					CALL	NOTIF		;AND NOTIFY THE HLP.
   3325	010710	103763 				BCS	30$		;SET TO TRY AGAIN IF COULDN'T DO.
   3326	010712	122760 	000006 	000002 		CMPB	#SS.RUN,S.STS(R0) ;IF IN RUN STATE
   3327	010720	000241 				CLC			;(INSURE CARRY IS OFF)
   3328	010722	001357 				BNE	40$		;THEN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 60-1
T**TH	- THRESHOLD COUNTERS

   3329	010724	116712 	000001'			MOVB	.ERRTH,(R2)	;RESET COUNTER FOR MORE
   3330	010730	000754 				BR	40$		;AND RETURN.
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 61
LOGGIT	- EVENT LOGGER

   3332						.SBTTL	LOGGIT	- EVENT LOGGER
   3333					;+
   3334					; ** - LOGGIT -- EVENT LOGGING ROUTINE
   3335					;
   3336					; INPUTS:
   3337					;	R0 = STATION TABLE ADDRESS
   3338					;	R3 = ERROR CODE
   3339					;	R5 = LINE TABLE ADDRESS
   3340					;	PSTA = THRESHOLD VALUE
   3341					;
   3342					; OUTPUTS:
   3343					;	MESSAGE IS SENT, CALLING CONTEXT PRESERVED.
   3344					;
   3345					; REGISTERS MODIFIED:
   3346					;	NONE
   3347					;-
   3348
   3349	010732	016567 	000042 	000000'	LOGGIT:	MOV	L.LOGG(R5),PDST	;SET THE LOGGING DESTINATION
   3350	010740	001430 				BEQ	10$		;WE AREN'T ENABLED
   3351	010742	010046 				MOV	R0,-(SP)	;SAVE A COUPLE OF REGS
   3352	010744	010146 				MOV	R1,-(SP)	; ...
   3353	010746	110367 	000002'			MOVB	R3,PRSN		;SET THE REASON CODE
   3354	010752	116567 	000060 	000004'		MOVB	L.LNUM(R5),PLIN	;    THE LINE #
   3355	010760	116067 	000016 	000005'		MOVB	S.SLAN(R0),PSTN	;        STATION #
   3356	010766	005001 				CLR	R1		;SET UP TO REMEMBER THE THRESHOLD
   3357	010770	156701 	000020'			BISB	PSTA,R1		;  AS A BYTE
   3358	010774	012700 	000000'			MOV	#PDST,R0	;POINT TO ARG BLOCK
   3359	011000					CALL	$CMLOG		;LOG IT >>>ENTER COROUTINE
   3360	011004	103404 				BCS	5$			;>>>$CMLOG POINTS R2 AT MESSAGE BUFFER
   3361	011006	012722 				MOV	(PC)+,(R2)+		;>>>SET THE DATA CODE AND
   3362	011010	   015 	   002 			 .BYTE	E$DTHR,2		;>>>  DATA LENGTH
   3363	011012	010122 				MOV	R1,(R2)+		;>>>SET THE THRESHOLD
   3364	011014					CALL	@(SP)+		;BACK TO $CMLOG TO FINISH >>>EXIT COROUTINE
   3365	011016	012601 			5$:	MOV	(SP)+,R1	;RESTORE THE REGS WE USED
   3366	011020	012600 				MOV	(SP)+,R0	; ...
   3367	011022				10$:	RETURN			;ALL DONE
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 62
SPPL*	- SET NEW POLLING STATE

   3370						.SBTTL	SPPL*	- SET NEW POLLING STATE
   3371					;+
   3372					; SET NEW POLLING STATE
   3373					;
   3374					; INPUTS:
   3375					;	R5 = ADDRESS OF LINE TABLE
   3376					;	R0 = ADDRESS OF STATION TABLE
   3377					;
   3378					; OUTPUTS:
   3379					;	NONE
   3380					;
   3381					; REGISTERS MODIFIED:
   3382					;	R2
   3383					;-
   3384
   3385	011024	004367 	000032 		SPPLO:	JSR	R3,SPPL		;SET TO OFFLINE
   3386	011030	000000 				.WORD	SP.PLO
   3387	011032	004367 	000024 		SPPLD:	JSR	R3,SPPL		;SET TO DEAD
   3388	011036	000002 				.WORD	SP.PLD
   3389	011040	004367 	000016 		SPPLP:	JSR	R3,SPPL		;SET TO POTENTIALLY DEAD
   3390	011044	000004 				.WORD	SP.PLP
   3391	011046	004367 	000010 		SPPLI:	JSR	R3,SPPL		;SET TO INACTIVE
   3392	011052	000006 				.WORD	SP.PLI
   3393	011054	004367 	000002 		SPPLA:	JSR	R3,SPPL		;SET TO ACTIVE
   3394	011060	000010 				.WORD	SP.PLA
   3395					;
   3396					; COMMON POLLING STATE RESET ROUTINE
   3397					;
   3398	011062	011302 			SPPL:	MOV	(R3),R2		;SAVE NEW POLLING STATE
   3399	011064	116003 	000021 			MOVB	S.PLS(R0),R3	;AND GET CURRENT
   3400	011070	020302 				CMP	R3,R2		;IF NO CHANGE
   3401	011072	001426 				BEQ	22$		;THEN EXIT
   3402	011074	000173 	011100'			JMP	@12$(R3)	;OTHERWISE RESET CURRENT STATE.
   3403	011100				12$:	DSPBEG
   3404	011100					DSP	SP.PLO,20$	; OFFLINE
   3405	011102					DSP	SP.PLD,14$	; DEAD
   3406	011104					DSP	SP.PLP,20$	; POTENTIALLY DEAD
   3407	011106					DSP	SP.PLI,20$	; INACTIVE
   3408	011110					DSP	SP.PLA,20$	; ACTIVE
   3409	011112					DSPEND
   3410	011112	105365 	000065 		14$:	DECB	L.NDED(R5)	;RESURRECT FROM THE DEAD
   3411	011116	001010 				BNE	20$		;AND IF THE LAST
   3412	011120	005065 	000024 			CLR	L.DDST(R5)	;THEN RESET THE DEAD LIST
   3413	011124	010446 				MOV	R4,-(SP)	;SAVE A REGISTER
   3414	011126	016504 	000046 			MOV	L.DEDT(R5),R4	;GET DEAD STATION POLLING INTERVAL TIMER
   3415	011132					CALL	$CNDTM		;AND CANCEL IT.
   3416	011136	012604 				MOV	(SP)+,R4
   3417
   3418	011140				20$:	CALL	@24$(R2)	;SET NEW POLLING CONTEXT
   3419	011144	110260 	000021 			MOVB	R2,S.PLS(R0)	;AND POLLING STATE.
   3420	011150	012603 			22$:	MOV	(SP)+,R3
   3421	011152					RETURN
   3422	011154				24$:	DSPBEG
   3423	011154					DSP	SP.PLO,34$	; OFFLINE
   3424	011156					DSP	SP.PLD,30$	; DEAD
   3425	011160					DSP	SP.PLP,44$	; POTENTIALLY DEAD
   3426	011162					DSP	SP.PLI,44$	; INACTIVE
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 62-1
SPPL*	- SET NEW POLLING STATE

   3427	011164					DSP	SP.PLA,44$	; ACTIVE
   3428	011166					DSPEND
   3429	011166	105765 	000065 		30$:	TSTB	L.NDED(R5)	;IF NO DEAD STATIONS
   3430	011172	001012 				BNE	32$		;THEN
   3431	011174	010446 				MOV	R4,-(SP)	;SAVE A REGISTER
   3432	011176	016504 	000046 			MOV	L.DEDT(R5),R4	;AND IF THERE IS A TIMER
   3433	011202	001415 				BEQ	36$		;THEN
   3434	011204					CALL	$SDLTM		;START IT
   3435	011210	012604 				MOV	(SP)+,R4	;AND
   3436	011212	016565 	000014 	000024 		MOV	L.STAL(R5),L.DDST(R5) ;RESET THE LIST.
   3437	011220	105265 	000065 		32$:	INCB	L.NDED(R5)	;ONE MORE MORTALITY.
   3438	011224	005060 	000022 		34$:	CLR	S.U(R0)		;RESET PRIORITY
   3439	011230	005060 	000024 			CLR	S.I(R0)		;AND INCREMENT.
   3440	011234					RETURN
   3441
   3442	011236	012604 			36$:	MOV	(SP)+,R4	;RESTORE R4
   3443	011240	010302 				MOV	R3,R2		;AND LEAVE IN PREVIOUS STATE.
   3444	011242					RETURN
   3445
   3446	011244	010203 			44$:	MOV	R2,R3		;GET ADDRESS
   3447	011246	060003 				ADD	R0,R3		;OFFSET TO POLLING PARAMETERS
   3448	011250	116360 	000023 	000024 		MOVB	S.PI-SP.PLP(R3),S.I(R0) ;RESET INCREMENT
   3449	011256	126360 	000022 	000022 		CMPB	S.PQ-SP.PLP(R3),S.U(R0) ;AND IF NEW PRIORITY HIGHER THAN CURRENT
   3450	011264	101403 				BLOS	46$		;THEN
   3451	011266	116360 	000022 	000022 		MOVB	S.PQ-SP.PLP(R3),S.U(R0) ;RESET PRIORITY.
   3452	011274				46$:	RETURN
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 63
FNSTA	- FIND ADDRESS OF STATION BY LOGICAL STATION NO.

   3454						.SBTTL	FNSTA	- FIND ADDRESS OF STATION BY LOGICAL STATION NO.
   3455					;+
   3456					; USED TO MAP FROM A GIVEN LOGICAL STATION NUMBER TO A STATION
   3457					; TABLE ADDRESS.  FOR POINT TO POINT LINES
   3458					; THERE IS ONLY ONE STATION TABLE POINTED TO BY L.STAL IN LINE TABLE.
   3459					;
   3460					; INPUT:
   3461					;	R5 = ADDRESS OF LINE TABLE
   3462					;	C.STA(R4) = STATION LOGICAL ADDRESS NUMBER
   3463					;
   3464					; OUTPUT:
   3465					;	R0 = ADDRESS OF STATION TABLE FOUND
   3466					;
   3467					; REGISTERS MODIFIED:
   3468					;	R1,R0
   3469					;-
   3470
   3471	011276				FNSTA:
   3479	011276	016500 	000014 			MOV	L.STAL(R5),R0	;POINT TO FIRST STATION TABLE.
   3480	011302	126460 	000007 	000016 	10$:	CMPB	C.STA(R4),S.SLAN(R0) ;CHECK ON LOGICAL ADDRESS
   3481	011310	001403 				BEQ	20$		;IF NOT THE ONE,
   3482	011312	011000 				MOV	(R0),R0		;GET NEXT ENTRY IN LIST
   3483	011314	001372 				BNE	10$		;IF THERE ISN'T ONE
   3484	011316	000003 				BPT			;THEN SOMETHING IS DESPERATELY WRONG.
   3485	011320				20$:
   3486					;
   3487	011320					RETURN			;RETURN
   3489
   3490		000001 				.END
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 63-1
SYMBOL TABLE

A$$CHK= 000000   	CS.ERR= 100000   	E$DDAT= 000003   	FE.EXP= 000200   	LGDAT = 000004
A$$CPS= 000000   	CS.HFE= 002000   	E$DDEV= 000005   	FE.EXT= 000001   	LGNAK   010542R     003
A$$PRI= 000000   	CS.LST= 040000   	E$DLPC= 000013   	FE.EXV= 000004   	LGRER   010430R     003
A$$TRP= 000000   	CS.MTL= 004000   	E$DMCD= 000012   	FE.LSI= 000400   	LGRET   010600R     003
BLACK   001110R     003	CS.RNG= 000010   	E$DNOD= 000011   	FE.MUP= 000002   	LI.BAB= 000000 G
BLCTL   000764R     003	CS.ROV= 000004   	E$DOSI= 000010   	FE.MXT= 040000   	LI.DED= 000012 G
BLDAT   001122R     003	CS.RSN= 010000   	E$DREC= 000007   	FE.NLG= 100000   	LI.MSG= 000000 G
BLLTH   001316R     003	CS.SUC= 000001   	E$DREG= 000001   	FE.PKT= 000100   	LI.PDL= 000000 G
BLMOP   001232R     003	CS.TMO= 020000   	E$DRSN= 000006   	FE.PLA= 000020   	LI.STS= 000000 G
BLNAK   001072R     003	CTLDIS  002060R     003	E$DTHR= 000015   	FNSTA   011276R     003	LI.UPD= 000006 G
BLREP   001042R     003	CTLDSP  001750R     003	E$DTIM= 000002   	FS.AST= 000000   	LOGGIT  010732R     003
BLSTK   001022R     003	CTLENB  002014R     003	E$DTPC= 000014   	FS.CIB= 002000   	LS.CTL= 020000 G
BLSTR   001022R     003	CTLMNT  002120R     003	E$DTXT= 000016   	FS.CRA= 001000   	LS.HDX= 000002 G
BLSYN   001272R     003	CTLSTP  003210R     003	E$DUPT= 000004   	FS.DIS= 013000   	LS.LEN= 000400 G
CALTH   001476R     003	CTLSTR  002154R     003	E$RABO= 000017   	FS.DVC= 001000   	LS.MPM= 000004 G
CB.CCB= 000002   	CTLTB   000050R     002	E$RCRC= 000023   	FS.ENB= 012000   	LS.MPS= 000010 G
CB.RDB= 000004   	C$$CKP= 000000   	E$RDSC= 000005   	FS.GET= 006000   	LS.MPT= 000014
CCBSET  001340R     003	C$$MPT= 000000   	E$RFRM= 000024   	FS.INI= 000000   	LS.PDD= 001000 G
CCMPTB  000072R  	C$$ORE= 000400   	E$RHFE= 000016   	FS.KIL= 000000   	LS.RSA= 040000 G
CCPAST  002002R     003	C$$RSH= 177564   	E$RLIN= 000003   	FS.LTM= 001000   	LS.RSN= 100000 G
CCPENB  002036R     003	C.BID   000003   	E$RMOP= 000014   	FS.MNT= 004000   	L$$ASG= 000000
CCPNOP  002000R     003	C.BUF   000014   	E$RMTL= 000013   	FS.MSN= 014000   	L$$DRV= 000000
CCPSTP  003376R     003	C.BUF1  000014   	E$RNAK= 000032   	FS.RNG= 011000   	L$$P11= 000001
CCPSTR  002250R     003	C.BUF2  000024   	E$RNXM= 000002   	FS.RTN= 001000   	L$$11R= 000000
CDISP   000042R  	C.CNT   000020   	E$ROVR= 000012   	FS.SET= 005000   	L.ACST  000022 G
CE.ABO= 100362   	C.CNT1  000020   	E$RPEC= 000022   	FS.STM= 000000   	L.BABI  000057 G
CE.DIS= 100366   	C.CNT2  000030   	E$RPEM= 000021   	FS.STP= 002000   	L.BABT  000052 G
CE.ERR= 100370   	C.FLG   000022   	E$RPET= 000020   	FS.STR= 001000   	L.CHAR  000036 G
CE.MOP= 100372   	C.FLG1  000022   	E$RPRC= 000025   	FS.TRM= 003000   	L.CRC   000032 G
CE.NTE= 100361   	C.FLG2  000032   	E$RPWF= 000007   	FS.XKL= 002000   	L.CRST  000020 G
CE.RTE= 100376   	C.FNC   000010   	E$RPWR= 000010   	FS.XOF= 010000   	L.CTMO  000000 G
CE.SRC= 100364   	C.LIN   000006   	E$RRET= 000031   	FS.XON= 007000   	L.DDST  000024 G
CE.TMO= 100374   	C.LNK   000000   	E$RRTE= 000011   	F$$LVL= 000001   	L.DEDI  000055 G
CF.EOM= 000004   	C.MOD   000011   	E$RRTO= 000006   	GTNXT   004576R     003	L.DEDT  000046 G
CF.HDR= 000020   	C.NSP   000004   	E$RSEL= 000030   	G$$TPP= 000000   	L.ENA   000063 G
CF.LB = 100000   	C.RSV   000002   	E$RSIN= 000004   	G$$TSS= 000000   	L.FCNL  000010 G
CF.SOM= 000010   	C.STA   000007   	E$RSRC= 000015   	G$$TTK= 000000   	L.HDR   000030 G
CF.SYN= 000040   	C.STS   000012   	E$RTRN= 000026   	G$$WRD= 000000   	L.ITMO  000001 G
CF.TRN= 000100   	DCPCCP  001674R     003	E$RUCL= 000001   	HALTFN  003344R     003	L.LNUM  000060 G
CKACK   007764R     003	DCPCTL  001546R     003	E$RXTO= 000027   	HDR     000074R     002	L.LOGG  000042 G
CKCRC   007520R     003	DCPKCP  004016R     003	E$TASC= 000001   	I$$RAR= 000000   	L.MOTD  000062 G
CKREP   010062R     003	DCPRCP  005574R     003	E$TASX= 000002   	I$$RDN= 000000   	L.NAST  000064 G
CKSTA   007642R     003	DCPTIM  004030R     003	E$THDW= 000003   	KDSAR0= 172360   	L.NDED  000065 G
CLNLIN  003516R     003	DCPXCP  004760R     003	E$TSFT= 000004   	KDSDR0= 172320   	L.NMSG  000061 G
CLNSTA  003654R     003	DCPXME  000000R     003	E$TTOP= 000005   	KISAR0= 172340   	L.PDLI  000056 G
CMODE = 140000   	DDCFN2  001712R     003	E$$XPR= 000000   	KISAR5= 172352   	L.PDLT  000050 G
CM.DLE= 000220   	DD.QSN= 000100   	FC.CCP= 000020   	KISAR6= 172354   	L.STAL  000014 G
CM.ENQ= 000005   	DD.SEL= 000200   	FC.CTL= 000006   	KISAR7= 172356   	L.STBL  000066 G
CM.SOH= 000201   	DVRSN   003736R     003	FC.KCP= 000016   	KISDR0= 172300   	L.STS   000002 G
CM.SYN= 000226   	D$$BUG= 177514   	FC.KIL= 000004   	KISDR6= 172314   	L.TDNQ  000004 G
CS.ABO= 000100   	D$$ISK= 000000   	FC.RCE= 000002   	KISDR7= 172316   	L.UPDI  000054 G
CS.BUF= 000200   	D$$L11= 000001   	FC.RCP= 000014   	K$$CNT= 177546   	L.UPDT  000044 G
CS.DCR= 000400   	D$$YNC= 000000   	FC.TIM= 000010   	K$$CSR= 177546   	L.XMST  000026 G
CS.DEV= 000002   	D$$YNM= 000000   	FC.XCP= 000012   	K$$LDC= 000000   	MPAR  = 172100
CS.DIS= 000040   	ENDPRO  007404R     003	FC.XME= 000000   	K$$TPS= 000074   	MPCSR = 177746
CS.ENB= 000020   	ERRTB   000022R     002	FE.CAL= 000040   	LD$LP = 000000   	MSGBAD  006226R     003
CS.EOF= 000001   	ERRTBL= 000006   	FE.DRV= 000010   	LGCTR   010564R     003	MSGCTL  006074R     003
DCP	MACRO M1110  04-FEB-80 13:06  PAGE 63-2
SYMBOL TABLE

MSGDAT  006774R     003	P$$WRD= 000000   	SP.PLO= 000000 G 	S.RCVE  000052 G 	UISAR0= 177640
MSGHFE  006200R     003	Q$$OPT= 000010   	SP.PLP= 000004 G 	S.REPS  000060 G 	UISAR4= 177650
MSGMOP  007152R     003	RERTBL  000102R     002	SR0   = 177572   	S.RETH  000061 G 	UISAR5= 177652
MSGNOP  006232R     003	RN.BUF= 000010   	SR3   = 172516   	S.RPTH  000062 G 	UISAR6= 177654
MSGOK   005726R     003	RN.DBC= 000002   	SS.ACT= 100000 G 	S.RSTE  000054 G 	UISAR7= 177656
MSGRUN  006466R     003	RN.HBC= 000001   	SS.AST= 000004 G 	S.SEL   000072 G 	UISDR0= 177600
MSGSTR  006234R     003	RN.HFE= 000021   	SS.ENA= 040000 G 	S.SLAN  000016 G 	UISDR4= 177610
MT.ACK= 000001   	RN.MTL= 000020   	SS.HLT= 000000 G 	S.SPAN  000017 G 	UISDR5= 177612
MT.NAK= 000002   	RN.REP= 000003   	SS.IST= 000002 G 	S.STE   000020 G 	UISDR6= 177614
MT.REP= 000003   	RN.ROV= 000011   	SS.MNT= 000010 G 	S.STLG  000074 G 	UISDR7= 177616
MT.RES= 000004   	RTACK   010206R     003	SS.PIG= 010000 G 	S.STRC  000057 G 	VLCSER= 006606
MT.RSK= 000005   	R$$DER= 000000   	SS.REP= 001000 G 	S.STS   000002 G 	V$$CTR= 001000
MT.STK= 000007   	R$$K11= 000001   	SS.RTR= 002000 G 	S.TAKQ  000010 G 	X$$DBT= 000000
MT.STR= 000006   	R$$SND= 000000   	SS.RUN= 000006 G 	S.THD   000036 G 	$CCBGT= ****** GX
M$$CRB= 000124   	R$$11M= 000000   	SS.SEL= 000400 G 	S.THI   000034 G 	$CCBRT= ****** GX
M$$CRX= 000000   	SAV31   010404R     003	SS.SHU= 020000 G 	S.THP   000035 G 	$CMLOG= ****** GX
M$$FCS= 000000   	SELND   004364R     003	SS.TIM= 004000 G 	S.TIM   000064 G 	$CMQIF= ****** GX
M$$MGE= 000000   	SETLIN  002402R     003	SWR   = 177570   	S.TMOE  000053 G 	$CMQIN= ****** GX
M$$OVR= 000000   	SETRUN  006370R     003	S$$WRG= 000000   	S.TM1   000041 G 	$CMQRM= ****** GX
NAKTBL  000134R     002	SETSTA  002772R     003	S$$YSZ= 007600   	S.U     000022 G 	$CNDTM= ****** GX
NOTIF   010342R     003	SE.SAK= 000020 G 	S.A     000044 G 	S.X     000042 G 	$CTCMP= ****** GX
N$$LDV= 000001   	SE.SNK= 000004 G 	S.AI    000033 G 	S.XMT   000070 G 	$DCPTB  000020RG
N$$MOV= 000010   	SE.SRP= 000010 G 	S.AQ    000032 G 	S.XMTE  000055 G 	$DDCRA= ****** GX
N$$SYS= 000001   	SE.SSK= 000001 G 	S.AR    000045 G 	THRESH  010642R     003	$DDDIS= ****** GX
N$$USR= 000001   	SE.SSL= 000040 G 	S.CTB   000052 G 	TIMLTM  004044R     003	$DDENB= ****** GX
PDST    000000R     002	SE.SST= 000002 G 	S.CTBE  000061 G 	TIMSTM  004214R     003	$DDRNG= ****** GX
PDT1    000004R     002	SISDR0= 172200   	S.CTW   000066 G 	TM.BAB= 000004   	$DDSTP= ****** GX
PDT2    000006R     002	SI.A  = 000000 G 	S.CTWE  000074 G 	TM.DED= 000002   	$DDSTR= ****** GX
PIRQ  = 177772   	SI.I  = 000000 G 	S.DSTE  000056 G 	TM.PDL= 000000   	$DDXME= ****** GX
PLIN  = 000004R     002	SI.MSG= 000000 G 	S.FCNL  000014 G 	TM.UPD= 000006   	$RCCMP= ****** GX
PLNG    000010R     002	SI.P  = 000000 G 	S.I     000024 G 	TNKTH   010612R     003	$RDBCT= ****** GX
PMODE = 030000   	SI.PLS= 000000 G 	S.II    000031 G 	TOSS    005722R     003	$RDBRT= ****** GX
PNAM    000012R     002	SI.STE= 000000 G 	S.IQ    000030 G 	TPS   = 177564   	$RDBTH= ****** GX
POLWK   004532R     003	SI.STS= 010000 G 	S.LNK   000000 G 	TRETH   010622R     003	$SDLTM= ****** GX
PRSN    000002R     002	SI.THD= 000000 G 	S.MOTD  000050 G 	TRPTH   010632R     003	$STCRC= ****** GX
PR0   = 000000   	SI.THI= 000000 G 	S.N     000043 G 	TSTTH   010602R     003	$XMCMP= ****** GX
PR1   = 000040   	SI.THP= 000000 G 	S.NAKT  000063 G 	TXCNT   000046R     002	$$TABG= 011154R     003
PR4   = 000200   	SNDMSG  007304R     003	S.NDAT  000047 G 	TXDAT   000710R     003	.ERRTH  000001RG
PR5   = 000240   	SPPL    011062R     003	S.NKRE  000051 G 	TXLST   000044R     002	.LIMSG  000002RG
PR6   = 000300   	SPPLA   011054R     003	S.NMSG  000037 G 	TXQUE   000040R     002	.MNMSG  000000RG
PR7   = 000340   	SPPLD   011032R     003	S.NRSP  000046 G 	TXRTX   010234R     003	.SIA    000006RG
PS    = 177776   	SPPLI   011046R     003	S.PI    000027 G 	TXSND   000122R     003	.SII    000010RG
PSTA    000020R     002	SPPLO   011024R     003	S.PLS   000021 G 	T$$KMG= 000000   	.SIMSG  000004RG
PSTN  = 000005R     002	SPPLP   011040R     003	S.PQ    000026 G 	T$$MIN= 000000   	.SIP    000012RG
PTAB    000016R     002	SP.PLA= 000010 G 	S.PTXQ  000004 G 	UBMPR = 170200   	.SITHD  000016RG
PTYP    000014R     002	SP.PLD= 000002 G 	S.R     000040 G 	UDSAR0= 177660   	.SITHI  000014RG
P$$P45= 000000   	SP.PLI= 000006 G 	S.RCV   000066 G 	UDSDR0= 177620   	.SITHP  000015RG

. ABS.	000074	   000
      	000124	   001
DATA  	000154	   002
CODE  	011322	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  13221 WORDS  ( 52 PAGES)
DYNAMIC MEMORY:  14284 WORDS  ( 54 PAGES)
ELAPSED TIME:  00:03:33
DCP,[131,34]DCP/CR/-SP=[130,10]NETLIB/ML,RSXMC4/PA:1,[131,10]M,DCP
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 1
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
BLACK 	  001110 R	 14-706    #15-745    
BLCTL 	  000764 R	 12-493     12-499     12-527    #14-680    
BLDAT 	  001122 R	 13-652    #16-769    
BLLTH 	  001316 R	 16-771     17-807    #18-849    
BLMOP 	  001232 R	 12-536    #17-805    
BLNAK 	  001072 R	 14-702    #15-738    
BLREP 	  001042 R	 14-704    #15-727    
BLSTK 	  001022 R	 14-698    #15-717    
BLSTR 	  001022 R	 14-700    #15-713    
BLSYN 	  001272 R	 12-623     15-730     15-741     16-783     17-811    #18-829    
CALTH 	  001476 R	 18-851    #20-937    
CCBSET	  001340 R	 14-681     16-769     17-805    #19-889    
CCMPTB	  000072 R	#10-346     21-1035   
CCPAST	  002002 R	 10-347    #22-1086   
CCPENB	  002036 R	 10-357    #23-1140   
CCPNOP	  002000 R	 10-358     21-1036    21-1048   #21-1063   
CCPSTP	  003376 R	 10-349    #29-1532   
CCPSTR	  002250 R	 10-348    #26-1257   
CDISP 	  000042 R	#10-329     21-1061   
CE.ABO	= 100362	 11-413     21-1002    24-1178    25-1211    26-1283    29-1504    31-1640    31-1648   
CE.MOP	= 100372	 9-301      46-2690   
CE.NTE	= 100361	 9-304      60-3289    60-3293   
CE.RTE	= 100376	 9-303      60-3297   
CE.SRC	= 100364	 9-302      44-2607   
CE.TMO	= 100374	 9-300      60-3301   
CF.EOM	= 000004	 19-903     20-943     20-948     38-2156    38-2160   
CF.HDR	= 000020	 19-903     38-2150   
CF.LB 	= 100000	 7-193      11-394     19-903    
CF.SOM	= 000010	 19-903    
CF.SYN	= 000040	 11-395     12-574     18-832    
CKACK 	  007764 R	 44-2562    44-2573    45-2659   #50-2896   
CKCRC 	  007520 R	 40-2431   #48-2778   
CKREP 	  010062 R	 44-2565    45-2662   #51-2934   
CKSTA 	  007642 R	 40-2401   #49-2834   
CLNLIN	  003516 R	 26-1281    29-1535   #30-1577   
CLNSTA	  003654 R	 29-1524   #31-1634   
CM.DLE	= 000220	#7-163      17-806     38-2200   
CM.ENQ	= 000005	#7-161      14-682     38-2152    38-2184    38-2186    40-2427   
CM.SOH	= 000201	#7-162      12-519     16-770     40-2432   
CM.SYN	= 000226	#7-164     
CONTIG	= ******	 63-3471   
CS.BUF	= 000200	 39-2377    45-2672    56-3092    56-3098   
CS.DCR	= 000400	 39-2386    48-2793    56-3092    56-3096   
CS.DEV	= 000002	 56-3092    56-3106   
CS.ERR	= 100000	 39-2386    45-2672    48-2793   
CS.HFE	= 002000	 56-3092    56-3104   
CS.MTL	= 004000	 56-3092    56-3102   
CS.ROV	= 000004	 56-3092    56-3100   
CS.RSN	= 010000	 39-2377   
CS.SUC	= 000001	 29-1553    38-2205    43-2540    45-2670    52-2976   
CTLDIS	  002060 R	 10-341    #24-1169   
CTLDSP	  001750 R	 21-1021   #21-1053    44-2622    46-2701   
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 2
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
CTLENB	  002014 R	 10-340    #23-1113   
CTLMNT	  002120 R	 10-334    #25-1205    29-1550   
CTLSTP	  003210 R	 10-332     25-1214   #29-1489   
CTLSTR	  002154 R	 10-331    #26-1239    29-1547   
CTLTB 	  000050 R	 14-683    #14-697    
C$$MPS	= ******	 33-1769   
C$$MPT	= 000000	#3-1        4-2        8-206      8-242      11-387     12-458     16-778     21-984     23-1115   
                         23-1143    24-1172    26-1267    27-1306    28-1415    29-1514    30-1579    33-1777    34-1852   
                         36-1998    38-2228    40-2398    41-2442    45-2649    48-2799    50-2908    61-3368   
C.BUF 	  000014	 38-2168    39-2368    39-2369   *46-2721   *46-2724    48-2784    48-2785   
C.BUF2	  000024	 12-519    *12-569    *12-573     16-781    *18-831     38-2152   
C.CNT 	  000020	 19-900    *46-2722   *46-2725    48-2786   
C.CNT1	  000020	 20-942    
C.CNT2	  000030	 20-947    
C.FLG 	  000022	*11-394    *11-395    *12-574    *18-832     38-2150   
C.FLG1	  000022	 20-943     20-945     38-2156    38-2158   
C.FLG2	  000032	 12-571    *19-908     20-948     38-2160   
C.FNC 	  000010	 29-1528   *29-1532    29-1539   *43-2539   *44-2620   *46-2699   
C.LIN 	  000006	*19-896     21-999     21-999    *27-1387   *32-1678   *44-2618   *46-2697   *54-3048   
C.MOD 	  000011	 21-1059   *29-1541    29-1543    40-2429    46-2719   *54-3050   
C.NSP 	  000004	*19-895    *27-1386    38-2172   
C.RSV 	  000002	*27-1385    29-1541   *29-1542    34-1848   *44-2621   *46-2700   
C.STA 	  000007	*19-897    *32-1679   *44-2619   *46-2698   *46-2726   *54-3049    63-3480   
C.STS 	  000012	*19-898    *21-975     21-1043    22-1088    23-1140   *24-1178   *25-1211    26-1257   *26-1283   
                        *27-1388   *29-1553    39-2377    39-2384    39-2386    45-2663   *45-2670   *45-2672    46-2710   
                         46-2727    48-2778   *48-2793    57-3149   
DCPCCP	  001674 R	 10-324    #21-1029   
DCPCTL	  001546 R	 10-319    #21-975    
DCPKCP	  004016 R	 10-323     32-1682   #32-1702   
DCPRCP	  005574 R	 10-322    #39-2367   
DCPTIM	  004030 R	 10-320    #33-1768   
DCPXCP	  004760 R	 10-321    #38-2148   
DCPXME	  000000 R	 10-316    #11-388    
DDCFN2	  001712 R	#21-1040    21-1062    38-2331   
DD.QSN	= 000100	#7-188      12-573     18-831     46-2709   
DD.SEL	= 000200	#7-189      7-199      12-569     46-2709   
DVRSN 	  003736 R	#32-1672    33-1833    34-1883    48-2794   
ENDPRO	  007404 R	 41-2463    45-2675    46-2714    46-2732   #47-2737   
ERRTB 	  000022 R	 9-292     #9-299      9-306     
ERRTBL	= 000006	 9-299     #9-306     
E$DTHR	= 000015	 61-3362   
E$RMOP	= 000014	 9-301     
E$RNAK	= 000032	 9-304     
E$RRET	= 000031	 9-303     
E$RRTE	= 000011	 9-300     
E$RSEL	= 000030	 9-305     
E$RSRC	= 000015	 9-302     
E$THDW	= 000003	 9-292     
FC.CCP	= 000020	 10-324    
FC.CTL	= 000006	 10-319     43-2539   
FC.KCP	= 000016	 10-323    
FC.KIL	= 000004	 10-318    
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 3
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
FC.RCE	= 000002	 10-317    
FC.RCP	= 000014	 10-322    
FC.TIM	= 000010	 10-320    
FC.XCP	= 000012	 10-321    
FC.XME	= 000000	 10-316    
FNSTA 	  011276 R	 11-388     21-1029    21-1053   #63-3471   
FS.AST	= 000000	 10-347     29-1546   
FS.CIB	= 002000	 46-2719   
FS.DIS	= 013000	 10-341     10-358    
FS.DVC	= 001000	 40-2429   
FS.ENB	= 012000	 10-340     10-357    
FS.GET	= 006000	 10-336     10-353    
FS.INI	= 000000	 10-330    
FS.LTM	= 001000	 33-1774   
FS.MNT	= 004000	 10-334     10-351     29-1550   
FS.MSN	= 014000	 10-359    
FS.RNG	= 011000	 10-339     10-356    
FS.SET	= 005000	 10-335     10-352    
FS.STM	= 000000	 33-1773   
FS.STP	= 002000	 10-332     10-349     21-976     29-1548    44-2620    46-2699   
FS.STR	= 001000	 10-331     10-348     29-1547    43-2539   
FS.TRM	= 003000	 10-333     10-350     29-1549   
FS.XOF	= 010000	 10-338     10-355    
FS.XON	= 007000	 10-337     10-354    
GTNXT 	  004576 R	 36-2015   #37-2049   
HALTFN	  003344 R	 29-1520   #29-1524    38-2329   
HDR   	  000074 R	*38-2169   *38-2170   *38-2171    38-2184    38-2186    38-2200    38-2218    38-2282    38-2289   
                        #39-2364   *39-2370   *39-2371   *39-2372    40-2421    42-2496    42-2505    42-2514    44-2579   
                         44-2583    44-2591    45-2645    45-2657   *46-2709    47-2751    49-2834    50-2897    50-2906   
I$$AS 	= ******	 5-122      9-258     
KISAR6	= 172354	 39-2367   *39-2368   *39-2373    48-2780   *48-2784    48-2789    48-2789    48-2789   *48-2797   
LGCTR 	  010564 R	 15-733     44-2598    49-2852    57-3162    58-3201   #58-3220   
LGDAT 	= 000004	#9-289      9-292     
LGNAK 	  010542 R	 44-2581   #58-3194   
LGRER 	  010430 R	 39-2390    45-2673    46-2712   #57-3148   
LGRET 	  010600 R	 58-3198   #58-3229   
LI.BAB	= 000000  G	#8-214     
LI.DED	= 000012  G	#8-208     
LI.MSG	= 000000  G	#8-215     
LI.PDL	= 000000  G	#8-213     
LI.STS	= 000000  G	#8-204     
LI.UPD	= 000006  G	#8-207     
LOGGIT	  010732 R	 44-2609    46-2692    49-2851    60-3323   #61-3349   
LS.CTL	= 020000  G	#6-143      21-1020    21-1040    21-1060    29-1498   
LS.HDX	= 000002  G	#6-143      7-195      12-578     27-1335    36-2004    38-2178    47-2740   
LS.LEN	= 000400  G	#6-143      12-448     12-584     12-592     27-1304    27-1326    36-1995   
LS.MPM	= 000004  G	#6-143      7-150      7-196      11-402     12-590     26-1268    27-1322    27-1353    33-1839   
                         38-2334   
LS.MPS	= 000010  G	#6-143      7-150      7-197      12-578     27-1325    27-1351    28-1437    47-2753    49-2838   
LS.MPT	= 000014	#7-150      40-2399   
LS.PDD	= 001000  G	#6-143      34-1871    37-2049    37-2051   
LS.RSA	= 040000  G	#6-143      32-1672    32-1677    32-1702   
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 4
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
LS.RSN	= 100000  G	#6-143      32-1677    39-2379   
L.ACST	  000022  G	#6-143     *27-1307    37-2070    37-2090   *37-2094   
L.BABI	  000057  G	#6-143      27-1374   
L.BABT	  000052  G	#6-143      27-1378    30-1608   *30-1612    36-1969    38-2313   
L.CHAR	  000036  G	#6-143      27-1313    27-1318    27-1320    27-1333   
L.CRC 	  000032  G	#6-143      48-2789   
L.CRST	  000020  G	#6-143      11-405     12-457     26-1271   *27-1305   *27-1323    29-1507    33-1770   *36-2016   
                         39-2380    47-2755   *47-2757   
L.CTMO	  000000  G	#6-143     
L.DDST	  000024  G	#6-143     *27-1308    37-2055   *37-2062   *62-3412   *62-3436   
L.DEDI	  000055  G	#6-143      27-1362   
L.DEDT	  000046  G	#6-143      27-1366    30-1595   *30-1599    62-3414    62-3432   
L.ENA 	  000063  G	#6-143      23-1116   *23-1144   *24-1173   
L.FCNL	  000010  G	#6-143      21-985     21-1023    21-1046    29-1494   
L.HDR 	  000030  G	#6-143     *27-1336    30-1578   *30-1584   
L.ITMO	  000001  G	#6-143     *27-1313    38-2261    38-2309    47-2750    51-2949   
L.LNUM	  000060  G	#6-143      19-896     27-1387    32-1678    44-2618    46-2697    54-3048    61-3354   
L.LOGG	  000042  G	#6-143      61-3349   
L.MOTD	  000062  G	#6-143      12-446     12-596     13-648    *16-787    *17-812    *27-1312   *38-2193   
L.NAST	  000064  G	#6-143      26-1250   *26-1261   *29-1525    38-2336   
L.NDED	  000065  G	#6-143     *27-1310   *62-3410    62-3429   *62-3437   
L.NMSG	  000061  G	#6-143      12-596     13-648     27-1337   *27-1349   
L.PDLI	  000056  G	#6-143      27-1369   
L.PDLT	  000050  G	#6-143      27-1372    29-1511    30-1602   *30-1606    36-2024   
L.STAL	  000014  G	#6-143      11-419     12-600     34-1892    37-2059    37-2073    49-2862    53-3021    62-3436   
                         63-3479   
L.STBL	  000066  G	#6-143     
L.STS 	  000002  G	#6-143      7-194      11-402     12-448     12-578    *12-584     12-590     12-592     21-1020   
                        *21-1040   *21-1060    26-1268   *27-1304   *27-1315   *27-1322   *27-1325   *27-1326   *27-1335   
                         27-1345    27-1351    27-1353    28-1429    28-1435   *29-1498    32-1672   *32-1677   *32-1702   
                         33-1819    33-1824    33-1839   *34-1871   *36-1995    36-1999    37-2049   *37-2051    38-2175   
                         38-2334    39-2375   *39-2379    40-2399    43-2527    44-2576    47-2737    49-2838    51-2935   
                         51-2946   
L.TDNQ	  000004  G	#6-143      38-2149   
L.UPDI	  000054  G	#6-143      27-1356   
L.UPDT	  000044  G	#6-143      27-1359    30-1589   *30-1593   
L.XMST	  000026  G	#6-143      11-417    *11-419     12-594    *12-609     12-614    *12-616    *27-1309    53-3019   
                        *53-3021   
MSGBAD	  006226 R	#41-2476    42-2519    42-2521    44-2563    44-2574   
MSGCTL	  006074 R	 40-2428   #41-2443   
MSGDAT	  006774 R	 40-2434   #45-2636   
MSGHFE	  006200 R	#41-2472    44-2550    44-2554    44-2555   
MSGMOP	  007152 R	 40-2435   #46-2681   
MSGNOP	  006232 R	 41-2469   #41-2477   
MSGOK 	  005726 R	 39-2385    39-2387   #40-2399   
MSGRUN	  006466 R	 41-2468   #44-2548   
MSGSTR	  006234 R	 41-2466    41-2467   #42-2482   
MT.ACK	= 000001	#7-168      14-705     42-2485    44-2551   
MT.NAK	= 000002	#7-169      14-701     42-2486    44-2552   
MT.REP	= 000003	#7-170      14-703     38-2186    42-2487    44-2553   
MT.RES	= 000004	#7-171     
MT.RSK	= 000005	#7-172     
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 5
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
MT.STK	= 000007	#7-174      14-697     42-2491    44-2557   
MT.STR	= 000006	#7-173      14-699     42-2490    44-2556   
M$$MGE	= 000000	 6-143      39-2367    39-2368    39-2373    48-2780    48-2784    48-2789    48-2797   
NAKTBL	  000134 R	#56-3116    58-3196   
NOTIF 	  010342 R	 44-2613    46-2693   #54-3045    60-3324   
PDST  	  000000 R	#9-292     *61-3349    61-3358   
PDT1  	  000004 R	#9-292      9-293      9-294     
PDT2  	  000006 R	#9-292     
PLIN  	= 000004 R	#9-293     *61-3354   
PLNG  	  000010 R	#9-292     
PNAM  	  000012 R	#9-292     
POLWK 	  004532 R	 11-407     26-1273    34-1905    36-2009    36-2010   #36-2015   
PRSN  	  000002 R	#9-292     *61-3353   
PSTA  	  000020 R	#9-292     *44-2608   *46-2691   *49-2850   *60-3321    61-3357   
PSTN  	= 000005 R	#9-294     *61-3355   
PTAB  	  000016 R	#9-292     
PTYP  	  000014 R	#9-292     
RERTBL	  000102 R	#56-3095    57-3153   
RN.BUF	= 000010	#7-181      56-3097    56-3119   
RN.DBC	= 000002	#7-179      56-3095    56-3117   
RN.HBC	= 000001	#7-178      56-3116   
RN.HFE	= 000021	#7-184      41-2473    56-3103    56-3122   
RN.MTL	= 000020	#7-183      56-3101    56-3121   
RN.REP	= 000003	#7-180      44-2594    56-3118   
RN.ROV	= 000011	#7-182      56-3099    56-3105    56-3120   
RTACK 	  010206 R	 38-2214    50-2907   #52-2980   
R$$11D	= ******	 5-122      9-258     
SAV31 	  010404 R	 12-450    #55-3074    57-3148    58-3194   
SELND 	  004364 R	 33-1820    33-1834    34-1884   #36-1967    47-2760   
SETLIN	  002402 R	 26-1252   #27-1303   
SETRUN	  006370 R	 42-2508    42-2515   #43-2526    45-2647   
SETSTA	  002772 R	 26-1259   #28-1412   
SE.SAK	= 000020  G	#6-143      12-521     12-525     14-705     16-786     41-2474    42-2507    44-2595    44-2600   
                         44-2627    45-2668    57-3169   
SE.SNK	= 000004  G	#6-143      12-501     14-701     41-2472    44-2593    44-2601    45-2669    57-3168   
SE.SRP	= 000010  G	#6-143      12-501     14-703     36-1991   
SE.SSK	= 000001  G	#6-143      12-487     14-697     36-1989    42-2500    42-2520   
SE.SSL	= 000040  G	#6-143      12-513     12-557     12-570     17-810     26-1266    36-1987    36-1989    36-2029   
                         42-2500    42-2518    42-2520   
SE.SST	= 000002  G	#6-143      12-487     14-699     26-1266    36-1987    42-2518   
SI.A  	= 000000  G	#8-221     
SI.I  	= 000000  G	#8-223     
SI.MSG	= 000000  G	#8-227     
SI.P  	= 000000  G	#8-225     
SI.PLS	= 000000  G	#8-218     
SI.STE	= 000000  G	#8-219     
SI.STS	= 010000  G	#8-217     
SI.THD	= 000000  G	#8-226     
SI.THI	= 000000  G	#8-222     
SI.THP	= 000000  G	#8-224     
SNDMSG	  007304 R	 45-2671    46-2711   #46-2718   
SPPL  	  011062 R	 62-3385    62-3387    62-3389    62-3391    62-3393   #62-3398   
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 6
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
SPPLA 	  011054 R	 11-404     26-1270    38-2238    40-2419    45-2651   #62-3393   
SPPLD 	  011032 R	 33-1806   #62-3387   
SPPLI 	  011046 R	 40-2417    41-2450    50-2913   #62-3391   
SPPLO 	  011024 R	 12-551     29-1515   #62-3385   
SPPLP 	  011040 R	 33-1803   #62-3389   
SP.PLA	= 000010  G	#6-143      37-2081    38-2298    40-2410    62-3394    62-3408    62-3427   
SP.PLD	= 000002  G	#6-143      37-2060    37-2078    38-2295    40-2407    62-3388    62-3405    62-3424   
SP.PLI	= 000006  G	#6-143      37-2080    38-2235    38-2297    40-2409    62-3392    62-3407    62-3426   
SP.PLO	= 000000  G	#6-143      8-218      37-2077    38-2294    40-2406    62-3386    62-3404    62-3423   
SP.PLP	= 000004  G	#6-143      37-2079    38-2296    38-2304    40-2408    62-3390    62-3406    62-3425    62-3448   
                         62-3449    62-3451   
SS.ACT	= 100000  G	#6-143      24-1169    25-1205    26-1239    26-1260    29-1536   
SS.AST	= 000004  G	#6-143      12-479     33-1795    33-1812    36-1983    41-2467    42-2499    42-2512    45-2640   
                         46-2685   
SS.ENA	= 040000  G	#6-143      23-1113    23-1142    24-1169    24-1171    25-1205    26-1239   
SS.HLT	= 000000  G	#6-143      8-217      12-474     26-1282    29-1500    33-1793    33-1810    36-1981    39-2388   
                         41-2465    45-2638    46-2683   
SS.IST	= 000002  G	#6-143      12-478     26-1265    33-1794    33-1811    36-1982    41-2466    42-2516    45-2639   
                         46-2684   
SS.MNT	= 000010  G	#6-143      11-400     12-481     12-575     25-1207    26-1262    33-1797    33-1814    36-1985   
                         36-2001    38-2176    41-2469    45-2642    46-2687    47-2738   
SS.PIG	= 010000  G	#6-143      8-217      12-517    
SS.REP	= 001000  G	#6-143      15-720     28-1412    29-1499    36-1977    38-2188    38-2227    38-2233    38-2242   
                         38-2255    38-2257    43-2526    44-2575    51-2934    51-2951   
SS.RTR	= 002000  G	#6-143      12-506     12-601     28-1412    29-1499    38-2249    44-2585    53-3009   
SS.RUN	= 000006  G	#6-143      12-480     12-607     33-1796    33-1813    36-1984    41-2468    43-2531    45-2641   
                         46-2686    57-3166    60-3326   
SS.SEL	= 000400  G	#6-143      12-464     12-585     28-1413    28-1439    29-1509    34-1865    36-1996    36-2026   
                         47-2756   
SS.SHU	= 020000  G	#6-143      12-506     12-601     28-1412    29-1491    29-1500    29-1536    38-2325   
SS.TIM	= 004000  G	#6-143      28-1412    29-1499    36-1975    36-1977    38-2227    38-2242    38-2258    43-2526   
                         44-2575    51-2934    51-2948   
S.A   	  000044  G	#6-143      38-2223    40-2415    41-2448    50-2896   *50-2906    50-2911    51-2942    52-2980   
                         53-3022   
S.AI  	  000033  G	#6-143     
S.AQ  	  000032  G	#6-143      28-1447   *28-1449   
S.AR  	  000045  G	#6-143     *52-2972    52-2980   
S.CTB 	  000052  G	#6-143     
S.CTBE	  000061  G	#6-143     
S.CTW 	  000066  G	#6-143     
S.CTWE	  000074  G	#6-143     
S.DSTE	  000056  G	#6-143      56-3119    56-3120    56-3121   
S.FCNL	  000014  G	#6-143     *26-1264    29-1502   *29-1506    29-1527   *29-1528    29-1532   *29-1533    29-1537   
                        *29-1538    43-2536   *43-2538   
S.I   	  000024  G	#6-143     *28-1417    34-1893   *62-3439   *62-3448   
S.II  	  000031  G	#6-143     
S.IQ  	  000030  G	#6-143      28-1444   *28-1446   
S.LNK 	  000000  G	#6-143     
S.MOTD	  000050  G	#6-143     *19-912     29-1516   *38-2180    38-2327    53-3007   
S.N   	  000043  G	#6-143      15-729     16-773    *16-775     38-2220    50-2902    51-2938   
S.NAKT	  000063  G	#6-143     *26-1248   *42-2498   *43-2530   *52-2978    60-3288    60-3292   
S.NDAT	  000047  G	#6-143     *28-1418    40-2413   *41-2443   *41-2445    41-2446   *45-2650    50-2909   
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 7
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
S.NKRE	  000051  G	#6-143      15-738     26-1242    26-1245   *41-2473   *44-2594   *57-3159   
S.NMSG	  000037  G	#6-143      12-461     16-785     28-1421   *28-1433   
S.NRSP	  000046  G	#6-143     *28-1419   *33-1785   *33-1787    33-1801    33-1804   *40-2420   
S.PI  	  000027  G	#6-143      62-3448   
S.PLS 	  000021  G	#6-143      37-2060    37-2074    38-2235    38-2291    40-2403    62-3399   *62-3419   
S.PQ  	  000026  G	#6-143      28-1441   *28-1443    38-2304    62-3449    62-3451   
S.PTXQ	  000004  G	#6-143      11-397     12-533     12-603     13-647     31-1645    53-3012   *53-3014   *53-3015   
S.R   	  000040  G	#6-143      15-739     15-746     16-772     26-1241    26-1242    44-2591    45-2652   *45-2667   
S.RCV 	  000066  G	#6-143     *46-2728   *46-2730   
S.RCVE	  000052  G	#6-143      44-2597    56-3095    56-3099    56-3101    56-3103    56-3105   
S.REPS	  000060  G	#6-143      15-732    
S.RETH	  000061  G	#6-143     *26-1246   *46-2718    60-3296   
S.RPTH	  000062  G	#6-143     *26-1247   *47-2759    60-3300   
S.RSTE	  000054  G	#6-143      56-3097   
S.SEL 	  000072  G	#6-143     *38-2319   *38-2321   
S.SLAN	  000016  G	#6-143      19-897     32-1679    44-2619    46-2698    46-2726    54-3049    61-3355    63-3480   
S.SPAN	  000017  G	#6-143      16-781     19-907     49-2835    49-2865   
S.STE 	  000020  G	#6-143      12-487     12-501     12-513    *12-521     12-525     12-557    *12-570     14-685    
                        *14-687    *16-786    *17-810    *26-1266   *28-1414   *36-1987   *36-1989   *36-1991   *36-2029   
                        *41-2472   *41-2474   *42-2500   *42-2507   *42-2518   *42-2520   *44-2593   *44-2595   *44-2600   
                        *44-2601   *44-2627   *45-2668   *45-2669   *57-3168   *57-3169   
S.STLG	  000074  G	#6-143     
S.STRC	  000057  G	#6-143     *43-2532   *43-2534   
S.STS 	  000002  G	#6-143      7-198      11-392     12-601    *15-720    *26-1282   *34-1865   *36-2026    39-2383   
                        *47-2756    49-2843    57-3166    60-3326   
S.TAKQ	  000010  G	#6-143      31-1637    38-2212    52-2983    53-3010    53-3012    53-3014    53-3015   *53-3016   
                        *53-3017    53-3018   *53-3018   
S.THD 	  000036  G	#6-143      28-1456   *28-1458    33-1804   
S.THI 	  000034  G	#6-143      28-1450   *28-1452    40-2413    41-2446    50-2909   
S.THP 	  000035  G	#6-143      28-1453   *28-1455    33-1801   
S.TIM 	  000064  G	#6-143     
S.TMOE	  000053  G	#6-143      9-305      49-2847   
S.TM1 	  000041  G	#6-143      16-773    *16-776     16-777     44-2583   *53-3022   
S.U   	  000022  G	#6-143     *28-1416   *34-1893    34-1894   *34-1896    34-1897    37-2084    37-2087   *38-2304   
                        *62-3438    62-3449   *62-3451   
S.X   	  000042  G	#6-143     *38-2219    40-2415    41-2448    50-2911    51-2940   
S.XMT 	  000070  G	#6-143     *38-2202   *38-2204   *52-2973   *52-2975   
S.XMTE	  000055  G	#6-143      56-3116    56-3117    56-3118    56-3122   
THRESH	  010642 R	 60-3287    60-3291    60-3295    60-3299   #60-3305   
TIMLTM	  004044 R	 33-1774   #33-1778   
TIMSTM	  004214 R	 33-1773   #34-1848   
TM.BAB	= 000004	#7-156      27-1378    34-1857   
TM.DED	= 000002	#7-155      27-1366    34-1853   
TM.PDL	= 000000	#7-154      27-1372    34-1851   
TM.UPD	= 000006	#7-157      27-1359    34-1859   
TNKTH 	  010612 R	 15-734     44-2582   #60-3291   
TOSS  	  005722 R	 39-2378    39-2381    39-2389   #39-2391    40-2402    40-2426   
TRETH 	  010622 R	 41-2475    44-2596    57-3165   #60-3295   
TRPTH 	  010632 R	 33-1826    34-1879    49-2853   #60-3299   
TSTTH 	  010602 R	 15-721    #60-3287   
TXCNT 	  000046 R	#12-440    *12-456    *12-461    *13-654    *16-785    
TXDAT 	  000710 R	 12-508     12-610    #13-646    
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 8
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
TXLST 	  000044 R	#12-439     12-515     12-563    *12-626     16-779     18-829     19-908    *19-909    
TXQUE 	  000040 R	#12-438     12-621    *12-624     12-625    *12-625     19-910    
TXRTX 	  010234 R	 38-2251    44-2586   #53-3007   
TXSND 	  000122 R	 11-403     11-418     11-420    #12-446     26-1277    34-1866    36-2007    36-2030    38-2343   
                         47-2743    47-2761    57-3171   
VLCSER	= 006606	#56-3092    57-3163   
X$$BUG	= ******	 9-266      44-2610    58-3226    59-3256   
$CCBGT	= ******  GX	 19-892     27-1383    32-1675    44-2616    46-2695    54-3046   
$CCBRT	= ******  GX	 29-1557    30-1585    30-1592    30-1598    30-1605    30-1611    32-1703    38-2179   
$CMLOG	= ******  GX	 61-3359   
$CMQIF	= ******  GX	 12-542     13-659     29-1495   
$CMQIN	= ******  GX	 11-398     19-911     21-1008    21-1024    38-2154    38-2163    38-2213   
$CMQRM	= ******  GX	 12-534     13-650     21-996     21-1047    31-1638    31-1646    38-2164    52-2984   
$CNDTM	= ******  GX	 29-1513    30-1591    30-1597    30-1604    30-1610    36-1971    62-3415   
$CTCMP	= ******  GX	 21-1003    21-1044    22-1089    29-1505    43-2541    54-3051   
$DCPTB	  000020 RG	#10-315    
$DDCRA	= ******  GX	 32-1680   
$DDDIS	= ******  GX	 24-1176   
$DDENB	= ******  GX	 23-1119   
$DDRNG	= ******  GX	 10-339    
$DDSTP	= ******  GX	 29-1529   
$DDSTR	= ******  GX	 26-1254   
$DDXME	= ******  GX	 12-627    
$RCCMP	= ******  GX	 46-2731   
$RDBCT	= ******  GX	 45-2665   
$RDBRT	= ******  GX	 10-317     39-2391    41-2462    41-2476    44-2614    45-2639    45-2642    45-2674    46-2694   
                         46-2713   
$RDBTH	= ******  GX	 45-2665   
$SDLTM	= ******  GX	 27-1360    34-1872    34-1900    36-2027    38-2315    62-3434   
$STCRC	= ******  GX	 48-2789   
$XMCMP	= ******  GX	 11-414     31-1641    31-1649    38-2206    52-2977   
$$TABG	= 011154 R	#10-315     10-316     10-317     10-318     10-319     10-320     10-321     10-322     10-323    
                         10-324    #10-329     10-330     10-331     10-332     10-333     10-334     10-335     10-336    
                         10-337     10-338     10-339     10-340     10-341    #10-346     10-347     10-348     10-349    
                         10-350     10-351     10-352     10-353     10-354     10-355     10-356     10-357     10-358    
                         10-359    #12-472     12-474     12-478     12-479     12-480     12-481    #29-1545    29-1546   
                         29-1547    29-1548    29-1549    29-1550   #33-1772    33-1773    33-1774   #33-1792    33-1793   
                         33-1794    33-1795    33-1796    33-1797   #33-1809    33-1810    33-1811    33-1812    33-1813   
                         33-1814   #34-1850    34-1851    34-1853    34-1857    34-1859   #36-1980    36-1981    36-1982   
                         36-1983    36-1984    36-1985   #36-2006   #37-2076    37-2077    37-2078    37-2079    37-2080   
                         37-2081   #38-2267   #38-2293    38-2294    38-2295    38-2296    38-2297    38-2298   #40-2405   
                         40-2406    40-2407    40-2408    40-2409    40-2410   #41-2464    41-2465    41-2466    41-2467   
                         41-2468    41-2469   #42-2483    42-2485    42-2486    42-2487    42-2490    42-2491   #44-2549   
                         44-2551    44-2552    44-2553    44-2556    44-2557   #45-2637    45-2638    45-2639    45-2640   
                         45-2641    45-2642   #46-2682    46-2683    46-2684    46-2685    46-2686    46-2687   #47-2742   
                        #62-3403    62-3404    62-3405    62-3406    62-3407    62-3408   #62-3422    62-3423    62-3424   
                         62-3425    62-3426    62-3427   
.ERRTH	  000001 RG	#8-234      26-1246    26-1247    26-1248    42-2498    43-2530    46-2718    47-2759    52-2978   
                         60-3321    60-3329   
.LIMSG	  000002 RG	#8-239      27-1343   
.MNMSG	  000000 RG	#8-232      12-446    
.SIA  	  000006 RG	#8-246      28-1449   
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 9
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
.SII  	  000010 RG	#8-247      28-1446   
.SIMSG	  000004 RG	#8-240      28-1427   
.SIP  	  000012 RG	#8-248      28-1443   
.SITHD	  000016 RG	#8-251      28-1458   
.SITHI	  000014 RG	#8-249      28-1452   
.SITHP	  000015 RG	#8-250      28-1455   
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 10
MACRO CROSS REFERENCE                                   CREF         
MACRO NAME	REFERENCES
CALL  		 11-388     11-398     11-404     12-493     12-499     12-508     12-527     12-534     12-536     12-542    
                 12-551     12-610     12-623     12-627     13-650     13-652     13-659     15-730     15-733     16-771    
                 16-783     17-807     17-811     18-851     19-892     19-906     19-911     21-996     21-1003    21-1008   
                 21-1029    21-1035    21-1044    21-1047    21-1053    21-1061    23-1119    26-1252    26-1254    26-1259   
                 26-1270    26-1273    26-1277    26-1281    27-1360    27-1383    29-1495    29-1505    29-1513    29-1515   
                 29-1524    29-1529    29-1535    29-1557    30-1585    30-1591    30-1592    30-1597    30-1598    30-1604   
                 30-1605    30-1610    30-1611    31-1638    31-1641    31-1646    31-1649    32-1675    32-1680    32-1682   
                 33-1803    33-1806    33-1826    33-1833    34-1879    34-1883    34-1900    36-1971    36-2015    36-2027   
                 38-2163    38-2164    38-2179    38-2206    38-2213    38-2214    38-2238    38-2251    38-2315    38-2329   
                 38-2331    39-2390    40-2401    40-2417    40-2419    40-2431    41-2450    41-2461    41-2462    41-2475   
                 43-2541    44-2562    44-2573    44-2581    44-2582    44-2596    44-2609    44-2613    44-2614    44-2616   
                 45-2647    45-2651    45-2659    45-2662    45-2673    45-2674    46-2692    46-2693    46-2694    46-2695   
                 46-2712    46-2713    46-2731    48-2789    48-2794    49-2840    49-2848    49-2851    49-2852    49-2853   
                 50-2907    50-2913    52-2977    52-2984    54-3046    54-3051    55-3078    57-3162    57-3165    57-3171   
                 60-3323    60-3324    61-3359    61-3364    62-3415    62-3418    62-3434   
CALLR 		#11-407    #11-414    #15-721    #15-734    #15-741    #21-1024   #22-1089   #24-1176   #25-1214   #32-1703   
                #34-1866   #34-1872   #34-1884   #34-1905   #36-2030   #38-2154   #38-2343   #39-2391   #44-2565   #44-2586   
                #44-2598   #44-2622   #46-2701   
CCBDF$		#6-140     #6-142     
CMLDF$		#6-141      9-292     
DDCDF$		#6-140     #6-143     
DSP   		#5-90       10-316     10-317     10-318     10-319     10-320     10-321     10-322     10-323     10-324    
                 10-330     10-331     10-332     10-333     10-334     10-335     10-336     10-337     10-338     10-339    
                 10-340     10-341     10-347     10-348     10-349     10-350     10-351     10-352     10-353     10-354    
                 10-355     10-356     10-357     10-358     10-359     12-474     12-478     12-479     12-480     12-481    
                 29-1546    29-1547    29-1548    29-1549    29-1550    33-1773    33-1774    33-1793    33-1794    33-1795   
                 33-1796    33-1797    33-1810    33-1811    33-1812    33-1813    33-1814    34-1851    34-1853    34-1857   
                 34-1859    36-1981    36-1982    36-1983    36-1984    36-1985    36-2007    36-2008    36-2009    36-2010   
                 36-2011    36-2012    37-2077    37-2078    37-2079    37-2080    37-2081    38-2268    38-2269    38-2270   
                 38-2271    38-2272    38-2273    38-2294    38-2295    38-2296    38-2297    38-2298    40-2406    40-2407   
                 40-2408    40-2409    40-2410    41-2465    41-2466    41-2467    41-2468    41-2469    42-2484    42-2485   
                 42-2486    42-2487    42-2488    42-2489    42-2490    42-2491    44-2550    44-2551    44-2552    44-2553   
                 44-2554    44-2555    44-2556    44-2557    45-2638    45-2639    45-2640    45-2641    45-2642    46-2683   
                 46-2684    46-2685    46-2686    46-2687    47-2743    47-2744    47-2745    47-2746    47-2747    47-2748   
                 62-3404    62-3405    62-3406    62-3407    62-3408    62-3423    62-3424    62-3425    62-3426    62-3427   
DSPADR		#5-98       10-316     10-317     10-318     10-319     10-320     10-321     10-322     10-323     10-324    
                 10-330     10-331     10-332     10-333     10-334     10-335     10-336     10-337     10-338     10-339    
                 10-340     10-341     10-347     10-348     10-349     10-350     10-351     10-352     10-353     10-354    
                 10-355     10-356     10-357     10-358     10-359     12-474     12-478     12-479     12-480     12-481    
                 29-1546    29-1547    29-1548    29-1549    29-1550    33-1773    33-1774    33-1793    33-1794    33-1795   
                 33-1796    33-1797    33-1810    33-1811    33-1812    33-1813    33-1814    34-1851    34-1853    34-1857   
                 34-1859    36-1981    36-1982    36-1983    36-1984    36-1985    36-2007    36-2008    36-2009    36-2010   
                 36-2011    36-2012    37-2077    37-2078    37-2079    37-2080    37-2081    38-2268    38-2269    38-2270   
                 38-2271    38-2272    38-2273    38-2294    38-2295    38-2296    38-2297    38-2298    40-2406    40-2407   
                 40-2408    40-2409    40-2410    41-2465    41-2466    41-2467    41-2468    41-2469    42-2484    42-2485   
                 42-2486    42-2487    42-2488    42-2489    42-2490    42-2491    44-2550    44-2551    44-2552    44-2553   
                 44-2554    44-2555    44-2556    44-2557    45-2638    45-2639    45-2640    45-2641    45-2642    46-2683   
                 46-2684    46-2685    46-2686    46-2687    47-2743    47-2744    47-2745    47-2746    47-2747    47-2748   
                 62-3404    62-3405    62-3406    62-3407    62-3408    62-3423    62-3424    62-3425    62-3426    62-3427   
DSPBEG		#5-106      10-315     10-329     10-346     12-472     29-1545    33-1772    33-1792    33-1809    34-1850   
                 36-1980    36-2006    37-2076    38-2267    38-2293    40-2405    41-2464    42-2483    44-2549    45-2637   
                 46-2682    47-2742    62-3403    62-3422   
DCP        CREATED BY  MACRO  ON 4-FEB-80 AT 13:08	PAGE 11
MACRO CROSS REFERENCE                                   CREF         
MACRO NAME	REFERENCES
DSPCHK		#10-315    #10-316    #10-317    #10-318    #10-319    #10-320    #10-321    #10-322    #10-323    #10-324    
                #10-329    #10-330    #10-331    #10-332    #10-333    #10-334    #10-335    #10-336    #10-337    #10-338    
                #10-339    #10-340    #10-341    #10-346    #10-347    #10-348    #10-349    #10-350    #10-351    #10-352    
                #10-353    #10-354    #10-355    #10-356    #10-357    #10-358    #10-359    #12-472    #12-474    #12-478    
                #12-479    #12-480    #12-481    #29-1545   #29-1546   #29-1547   #29-1548   #29-1549   #29-1550   #33-1772   
                #33-1773   #33-1774   #33-1792   #33-1793   #33-1794   #33-1795   #33-1796   #33-1797   #33-1809   #33-1810   
                #33-1811   #33-1812   #33-1813   #33-1814   #34-1850   #34-1851   #34-1853   #34-1857   #34-1859   #36-1980   
                #36-1981   #36-1982   #36-1983   #36-1984   #36-1985   #36-2006   #37-2076   #37-2077   #37-2078   #37-2079   
                #37-2080   #37-2081   #38-2267   #38-2293   #38-2294   #38-2295   #38-2296   #38-2297   #38-2298   #40-2405   
                #40-2406   #40-2407   #40-2408   #40-2409   #40-2410   #41-2464   #41-2465   #41-2466   #41-2467   #41-2468   
                #41-2469   #42-2483   #42-2485   #42-2486   #42-2487   #42-2490   #42-2491   #44-2549   #44-2551   #44-2552   
                #44-2553   #44-2556   #44-2557   #45-2637   #45-2638   #45-2639   #45-2640   #45-2641   #45-2642   #46-2682   
                #46-2683   #46-2684   #46-2685   #46-2686   #46-2687   #47-2742   #62-3403   #62-3404   #62-3405   #62-3406   
                #62-3407   #62-3408   #62-3422   #62-3423   #62-3424   #62-3425   #62-3426   #62-3427   
DSPEND		#5-120     #10-325    #10-342    #10-360    #12-482    #29-1551   #33-1775   #33-1798   #33-1815   #34-1861   
                #36-1986   #36-2013   #37-2082   #38-2274   #38-2299   #40-2411   #41-2470   #42-2492   #44-2558   #45-2643   
                #46-2688   #47-2749   #62-3409   #62-3428   
EVLDF$		#6-141      9-285     
FALLR 		#5-82      #11-420    #46-2732   #58-3201   
HWDDF$		#9-262     #9-263     #39-2367   #39-2367   #39-2368   #39-2368   #39-2373   #39-2373   #48-2780   #48-2780   
                #48-2784   #48-2784   #48-2797   #48-2797   
MAP   		#6-141     #39-2368   #48-2784   
RESMAP		#6-141     #39-2373   #48-2797   
RETURN		 11-408     12-483     12-629     13-657     13-661     15-748     16-788     17-813     18-833     18-856    
                 19-918     20-951     21-1063    23-1147    24-1180    25-1213    26-1279    26-1285    27-1381    28-1440   
                 28-1460    29-1522    29-1555    29-1559    30-1615    31-1653    32-1684    33-1843    34-1906    37-2063   
                 37-2095    38-2338    41-2477    42-2501    43-2543    44-2602    44-2623    44-2628    46-2702    48-2798   
                 49-2845    49-2855    49-2867    50-2917    51-2952    52-2986    53-3023    54-3054    55-3082    57-3173   
                 58-3229    60-3315    61-3367    62-3421    62-3440    62-3444    62-3452    63-3487   
SAVMAP		#6-141      39-2367    48-2780   
SOB   		#26-1244   
$LIBCM		#6-140     #48-2789   
$LIBCN		#6-140