Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/mcb/dcpptp.list
There are no other files named dcpptp.list in the archive.
DCPPTP	MACRO M1110  04-FEB-80 14:21
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
    38- 2098	DCPXCP	- TRANSMIT DONE ENTRY POINT
    39- 2345	DCPRCP	- RECEIVE MESSAGE DONE PROCESS
    48- 2763	CKCRC	- CRC COMPUTATION
    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
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 4


      1						.NLIST	CND
      6						.TITLE	DCPPTP
      7						.IDENT	/P02080/
      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.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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					; *****
DCPPTP	MACRO M1110  04-FEB-80 14:21  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
DCPPTP	MACRO M1110  04-FEB-80 14:21  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
DCPPTP	MACRO M1110  04-FEB-80 14:21  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
DCPPTP	MACRO M1110  04-FEB-80 14:21  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
DCPPTP	MACRO M1110  04-FEB-80 14:21  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					;
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 8


    201					;
    202					; INITIALIZATION VARIABLES - FOR BUILDING LINE AND STATION TABLES
    203					;
    204		000000 				LI.STS==0		; LINE STATUS.
    205
    210		000000 				LI.UPD==0.		; NO POLLING PRIORITY UPDATE INTERVAL
    211		000000 				LI.DED==0.		; NO DEAD STATION POLLING INTERVAL
    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)
    253						.EVEN
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 9


    255					;
    256					;%%%D/IAS%%%;
    257					;
    262						.MCALL	HWDDF$
    263	000006					HWDDF$
    265
    283
    284					; DEFINE EVENT LOGGING SYMBOLS
    285	000006					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
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	000006					.PSECT
    315	000006				$DCPTB::DSPBEG
    316	000006					DSP	FC.XME,DCPXME	;TRANSMIT ENABLE (SEND MESSAGE)
    317	000010					DSP	FC.RCE,$RDBRT	;RECEIVE ENABLE (RETURN RECEIVE MESSAGE)
    318	000012					DSP	FC.KIL		;KILL I/O (UNSUPPORTED)
    319	000014					DSP	FC.CTL,DCPCTL	;EXECUTE CONTROL FUNCTION
    320	000016					DSP	FC.TIM,DCPTIM	;TIMEOUT ENTRY POINT
    321	000020					DSP	FC.XCP,DCPXCP	;TRANSMIT DONE (TX MESS RETRN BY DRIVER)
    322	000022					DSP	FC.RCP,DCPRCP	;RECEIVE DONE (MESS RECEIVED BY DRIVER)
    323	000024					DSP	FC.KCP,DCPKCP	;KILL COMPLETE
    324	000026					DSP	FC.CCP,DCPCCP	;CONTROL COMPLETE
    325	000030					DSPEND
    326					;
    327					; DISPATCH TABLE FOR CONTROL SUBFUNCTIONS
    328					;
    329	000030				CDISP:	DSPBEG	,</400>
    330	000030					DSP	FS.INI		;INITIALIZE
    331	000032					DSP	FS.STR,CTLSTR	;START
    332	000034					DSP	FS.STP,CTLSTP	;STOP
    333	000036					DSP	FS.TRM		;TERMINATE
    334	000040					DSP	FS.MNT,CTLMNT	;MAINTENANCE
    335	000042					DSP	FS.SET		;SET
    336	000044					DSP	FS.GET		;GET
    337	000046					DSP	FS.XON		;XON
    338	000050					DSP	FS.XOF		;XOFF
    339	000052					DSP	FS.RNG,$DDRNG	;LOOK FOR RING
    340	000054					DSP	FS.ENB,CTLENB	;ENABLE A LINE
    341	000056					DSP	FS.DIS,CTLDIS	;DISABLE A LINE
    342	000060					DSPEND
    343					;
    344					; DISPATCH TABLE FOR CONTROL COMPLETIONS
    345					;
    346	000060				CCMPTB:	DSPBEG	,</400>
    347	000060					DSP	FS.AST,CCPAST	;ASYNCH. ERROR
    348	000062					DSP	FS.STR,CCPSTR	;START
    349	000064					DSP	FS.STP,CCPSTP	;STOP
    350	000066					DSP	FS.TRM		;TERMINATE
    351	000070					DSP	FS.MNT		;MAINTENANCE
    352	000072					DSP	FS.SET		;SET CHARACTERISTICS
    353	000074					DSP	FS.GET		;GET CHARACTERISTICS
    354	000076					DSP	FS.XON		;XON
    355	000100					DSP	FS.XOF		;XOFF
    356	000102					DSP	FS.RNG		;LOOK FOR RING
    357	000104					DSP	FS.ENB,CCPENB	;ENABLE
    358	000106					DSP	FS.DIS,CCPNOP	;DISABLE
    359	000110					DSP	FS.MSN		;MODEM SENSE
    360	000112					DSPEND
DCPPTP	MACRO M1110  04-FEB-80 14:21  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
    390	000000	016500 	000014 		DCPXME:	MOV	L.STAL(R5),R0	;GET STATION TABLE ADDRESS
    392	000004	016002 	000002 			MOV	S.STS(R0),R2	;IF STATION NOT ACTIVE
    393	000010	100014 				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.
    410	000040	000404 				BR	TXSND		;TRY TO SEND MESSAGE.
    412
    413	000042	012703 	100362 		70$:	MOV	#CE.ABO,R3	;COULD NOT DO
    414	000046					CALLR	$XMCMP		;RETURN IT TO THE SUCKER.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	000052					.PSECT	CODE,I
    443					;
    444					; THE LINE MUST BE ENABLED TO TRANSMIT ANYTHING
    445					;
    446	000052	126567 	000062 	000000'	TXSND:	CMPB	L.MOTD(R5),.MNMSG ;IF ENOUGH MESSAGES TO THE DRIVER
    447	000060	101033 				BHI	14$		;OR
    448	000062	032765 	000400 	000002 		BIT	#LS.LEN,L.STS(R5) ;THIS LINE IS DISABLED
    449	000070	001427 				BEQ	14$		;THEN NOTHING CAN BE DONE.
    450	000072	004367 	006300 			JSR	R3,SAV31	;SAVE R3 THROUGH R1
    451	000076	010046 				MOV	R0,-(SP)
    452					;
    453					; IF THERE IS A CURRENT STATION, WE MUST HAVE PERMISSION
    454					; TO SEND TO IT.
    455					;
    456	000100	105067 	000046'			CLRB	TXCNT		;RESET BABBLING COUNT.
    457	000104	016500 	000020 			MOV	L.CRST(R5),R0	;GET CURRENT STATION
    461	000110	116067 	000037 	000046'		MOVB	S.NMSG(R0),TXCNT ;SET BABBLING COUNT
    462	000116	010001 				MOV	R0,R1		;AND POINT
    463	000120	005721 				TST	(R1)+		;TO STATUS WORD.
    464	000122	032711 	000400 			BIT	#SS.SEL,(R1)	;STATION IS NOT SELECTED
    468	000126	001545 				BEQ	80$		;THEN DO NOT TRANSMIT FOR THIS STATION.
    470	000130	111102 				MOVB	(R1),R2		;GET STATION STATE
    471	000132	000172 	000136'			JMP	@12$(R2)	;AND PROCESS ACCORDINGLY.
    472	000136				12$:	DSPBEG
    476	000136					DSP	SS.HLT,80$	; HALTED
    478	000140					DSP	SS.IST,20$	; INITIATE START
    479	000142					DSP	SS.AST,20$	; ACKNOWLEDGE START
    480	000144					DSP	SS.RUN,32$	; RUNNING
    481	000146					DSP	SS.MNT,40$	; MAINTENANCE
    482	000150					DSPEND
    483	000150				14$:	RETURN
    484					;
    485					; STATION STARTING UP - SEND SCHEDULED CONTROL MESSAGE
    486					;
    487	000152	032760 	000003 	000020 	20$:	BIT	#SE.SST!SE.SSK,S.STE(R0) ;IF START OR STACK SCHEDULED
    491	000160	001530 				BEQ	80$		;THEN
    493	000162					CALL	BLCTL		;BUILD AND QUEUE IT
    494	000166	103063 				BCC	50$		;AND SET THE SELECT.
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 12-1
TXSND	- TRANSMIT A MESSAGE

    495	000170	000167 	000246 			JMP	80$		;WHOOPS ! COULDN'T GET HEADER.
    496					;
    497					; SEND NON-ACK CONTROL MESSAGES FIRST
    498					;
    499	000174				30$:	CALL	BLCTL		;BUILD AND QUEUE MESSAGE
    500	000200	103456 				BCS	50$		;IF WE CAN.
    501	000202	032760 	000014 	000020 	32$:	BIT	#SE.SRP!SE.SNK,S.STE(R0) ;IF ANOTHER CONTROL MESSAGE TO SEND
    502	000210	001371 				BNE	30$		;THEN GO SEND IT.
    503					;
    504					; SEND AS MANY DATA MESSAGES AS ALLOWED
    505					;
    506	000212	032711 	022000 			BIT	#SS.RTR!SS.SHU,(R1) ;IF NOT RETRANSMITTING OR SHUTTING DOWN
    507	000216	001003 				BNE	34$		;THEN
    508	000220					CALL	TXDAT		;SEND AS MUCH DATA AS WE CAN
    509	000224	103444 				BCS	50$		;QUIT IF RESOURCE PROBLEMS.
    510					;
    511					; SCHEDULE AN ACK TO BE BUILT IF NECESSARY
    512					;
    513	000226	132760 	000040 	000020 	34$:	BITB	#SE.SSL,S.STE(R0) ;IF SELECT TO BE SENT
    514	000234	001415 				BEQ	38$		;AND
    515	000236	016704 	000044'			MOV	TXLST,R4	;NO LAST HEADER CCB
    516	000242	001407 				BEQ	36$		;THEN SCHEDULE AN ACK.
    517	000244	032711 	010000 			BIT	#SS.PIG,(R1)	;IF NOT PIGGYBACKING
    518	000250	001007 				BNE	38$		;AND
    519	000252	122764 	000201 	000024 		CMPB	#CM.SOH,C.BUF2(R4) ;LAST MESSAGE WAS A DATA MESSAGE
    520	000260	001003 				BNE	38$		;THEN
    521	000262	152760 	000020 	000020 	36$:	BISB	#SE.SAK,S.STE(R0) ;SCHEDULE AN ACK.
    522					;
    523					; SEND AN ACK IF ASKED NICELY
    524					;
    525	000270	132760 	000020 	000020 	38$:	BITB	#SE.SAK,S.STE(R0) ;IF ACK TO SEND
    526	000276	001417 				BEQ	50$		;THEN
    527	000300					CALL	BLCTL		;AND CREATE AN ACK.
    528	000304	000414 				BR	50$		;SET SELECT IF NECESSARY
    529					;
    530					; STATION IN MOP MODE - SEND MOP DATA MESSAGE
    531					;
    532	000306	010003 			40$:	MOV	R0,R3		;GET ADDRESS
    533	000310	062703 	000004 			ADD	#S.PTXQ,R3	;OF PRE-TRANSMIT QUEUE
    534	000314					CALL	$CMQRM		;AND PICK UP NEXT VICTIM.
    535	000320	103450 				BCS	80$		;IF NONE, DON'T SEND ANYTHING YET.
    536	000322					CALL	BLMOP		;BUILD AND QUEUE MAINTENANCE MESSAGE.
    540	000326	103003 				BCC	50$		;IF WE CAN'T
    542	000330					CALL	$CMQIF		;THEN RE-QUEUE DATA MESSAGE
    546	000334	000442 				BR	80$		;AND PASS THIS CHANCE BY.
    553					;
    554					; IF SELECT IS REQUESTED, THEN TURN THE SELECT ON THE LAST MESSAGE
    555					; IN THE CONSTRUCTED MESSAGE QUEUE.
    556					;
    557	000336	132760 	000040 	000020 	50$:	BITB	#SE.SSL,S.STE(R0) ;IF SELECTION REQUESTED
    561	000344	001436 				BEQ	80$		;THEN
    563	000346	016704 	000044'			MOV	TXLST,R4	;GET LAST HEADER CCB
    567	000352	001433 				BEQ	80$		;IF THERE IS ONE
    569	000354	152764 	000200 	000026 		BISB	#DD.SEL,C.BUF2+2(R4) ;SET SELECT BIT
    570	000362	142760 	000040 	000020 		BICB	#SE.SSL,S.STE(R0) ;AND RESET SELECT REQUEST.
    571	000370	016402 	000032 			MOV	C.FLG2(R4),R2	;IF THERE IS A PREVIOUS HEADER
    572	000374	001403 				BEQ	52$		;THEN
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 12-2
TXSND	- TRANSMIT A MESSAGE

    573	000376	152762 	000100 	000026 		BISB	#DD.QSN,C.BUF2+2(R2) ;TERMINATE IT
    574	000404	052764 	000040 	000022 	52$:	BIS	#CF.SYN,C.FLG(R4) ;AND RESYNCH ON THIS MESSAGE.
    575	000412	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MOP MODE
    576	000416	001404 				BEQ	54$		;OR
    581	000420	032765 	000002 	000002 		BIT	#LS.HDX,L.STS(R5) ;HALF DUPLEX
    582	000426	001405 				BEQ	80$		;THEN
    584	000430	042765 	000400 	000002 	54$:	BIC	#LS.LEN,L.STS(R5) ;DESELECT THE LINE
    585	000436	042711 	000400 			BIC	#SS.SEL,(R1)	;AND THE STATION.
    618					;
    619					; ENOUGH MESSAGES HAVE BEEN CONSTRUCTED; GIVE THEM TO THE DRIVER.
    620					;
    621	000442	016704 	000040'		80$:	MOV	TXQUE,R4	;IF NOTHING ON THE QUEUE
    622	000446	001413 				BEQ	82$		;THEN GO AWAY.
    623	000450					CALL	BLSYN		;OTHERWISE TERMINATE THE LAST HEADER
    624	000454	005067 	000040'			CLR	TXQUE		;RESET
    625	000460	012767 	000040'	000042'		MOV	#TXQUE,TXQUE+2	;THE MESSAGE QUEUE
    626	000466	005067 	000044'			CLR	TXLST		;THE LAST HEADER
    627	000472					CALL	$DDXME		;AND TRANSMIT THE MESSAGES.
    628	000476	012600 			82$:	MOV	(SP)+,R0	;RESTORE REGISTER
    629	000500					RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	000502	010003 			TXDAT:	MOV	R0,R3		;GET ADDRESS
    647	000504	062703 	000004 			ADD	#S.PTXQ,R3	;OF PRE-TRANSMIT QUEUE.
    648	000510	126565 	000062 	000061 	12$:	CMPB	L.MOTD(R5),L.NMSG(R5) ;IF WE HAVE ROOM FOR ANOTHER DATA MSG
    649	000516	103011 				BHIS	14$		;THEN
    650	000520					CALL	$CMQRM		;PICK UP NEXT VICTIM.
    651	000524	103406 				BCS	14$		;
    652	000526					CALL	BLDAT		;BUILD AND QUEUE DATA MESSAGE.
    653	000532	103405 				BCS	16$		;IF SUCCESSFUL
    654	000534	105367 	000046'			DECB	TXCNT		;COUNT THIS MESSAGE OUT
    655	000540	001363 				BNE	12$		;AND DO MORE IF WE CAN.
    656	000542	000241 			14$:	CLC
    657	000544					RETURN
    658
    659	000546				16$:	CALL	$CMQIF		;RE-QUEUE MESSAGE
    660	000552	000261 				SEC
    661	000554					RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	000556	005004 			BLCTL:	CLR	R4		;NO DATA CCB
    681	000560	004167 	000324 			JSR	R1,CCBSET	;SAVE REGS AND SET UP CCB
    682	000564	112722 	000005 			MOVB	#CM.ENQ,(R2)+	;SET CONTROL FUNCTION
    683	000570	012701 	000044'			MOV	#CTLTB-4,R1	;AND GET FUNCTION TABLE
    684	000574	022121 			10$:	CMP	(R1)+,(R1)+	;BYPASS ENTRY
    685	000576	131160 	000020 			BITB	(R1),S.STE(R0)	;IS THIS THE ONE ?
    686	000602	001774 				BEQ	10$		;IF SO,
    687	000604	142160 	000020 			BICB	(R1)+,S.STE(R0)	;TURN IT OFF
    688	000610	112122 				MOVB	(R1)+,(R2)+	;COPY FUNCTION CODE
    689	000612	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	000614'				.WORD	BLSTK
    699	000054	   002 	   006 			.BYTE	SE.SST,MT.STR	;START MESSAGE
    700	000056	000614'				.WORD	BLSTR
    701	000060	   004 	   002 			.BYTE	SE.SNK,MT.NAK	;NAK MESSAGE
    702	000062	000664'				.WORD	BLNAK
    703	000064	   010 	   003 			.BYTE	SE.SRP,MT.REP	;REP MESSAGE
    704	000066	000634'				.WORD	BLREP
    705	000070	   020 	   001 			.BYTE	SE.SAK,MT.ACK	;ACK MESSAGE
    706	000072	000702'				.WORD	BLACK
    707									;**WATCH OUT** CAN'T GET THIS FAR !
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 15
BLCTL	- BUILD HEADERS FOR UNNUMBERED CONTROL MESSAGES.

    709	000614					.PSECT	CODE,I
    710					;
    711					; BUILD DDCMP START MESSAGE
    712					;
    713	000614				BLSTR:
    714					;
    715					; BUILD DDCMP STACK MESSAGE
    716					;
    717	000614	105022 			BLSTK:	CLRB	(R2)+		;SUB-TYPE IS ZERO
    718	000616	105022 				CLRB	(R2)+		;FILLER
    719	000620	105022 				CLRB	(R2)+		;FILLER
    720	000622	052760 	001000 	000002 		BIS	#SS.REP,S.STS(R0) ;START REP TIMER
    721	000630					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	000634	105022 			BLREP:	CLRB	(R2)+		;REP SUB-TYPE IS ZERO
    728	000636	105022 				CLRB	(R2)+		;FILLER
    729	000640	116022 	000043 			MOVB	S.N(R0),(R2)+	;LAST TX MESS NO. IS 5TH BYTE
    730	000644					CALL	BLSYN		;PRECEED WITH SYNS
    731
    732	000650	012703 	000060 			MOV	#S.REPS,R3	;OFFSET FOR REP COUNTER
    733	000654					CALL	LGCTR		;LOG AND BUMP COUNTER
    734	000660					CALLR	TNKTH		;UPDATE THRESHOLD COUNTER
    735					;
    736					; BUILD NAK MESSAGE
    737					;
    738	000664	116022 	000051 		BLNAK:	MOVB	S.NKRE(R0),(R2)+ ;WAS NAK, INSERT NAK REASON
    739	000670	116022 	000040 			MOVB	S.R(R0),(R2)+	;ACKNOWLEDGE LAST RECEIVED MESSAGE
    740	000674	105022 				CLRB	(R2)+		;FILLER
    741	000676					CALLR	BLSYN		;PRECEED WITH SYNS AND INSERT STATION.
    742					;
    743					; BUILD ACK MESSAGE
    744					;
    745	000702	105022 			BLACK:	CLRB	(R2)+		;ACK SUB-TYPE OF ZERO
    746	000704	116022 	000040 			MOVB	S.R(R0),(R2)+	;ACKNOWLEDGE LAST RECEIVED MESSAGE
    747	000710	105022 				CLRB	(R2)+		;FILLER
    748	000712					RETURN			;INSERT STATION AND RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	000714					.PSECT	CODE,I
    769	000714	004167 	000170 		BLDAT:	JSR	R1,CCBSET	;SAVE REG AND DET UP CCB
    770	000720	112722 	000201 			MOVB	#CM.SOH,(R2)+	;FIRST CHAR IS SOH
    771	000724					CALL	BLLTH		;SET LENGTH OF MESSAGE
    772	000730	116022 	000040 			MOVB	S.R(R0),(R2)+	;ACKNOWLEDGE LAST MSG RCVD
    773	000734	126060 	000043 	000041 		CMPB	S.N(R0),S.TM1(R0) ;IF THIS MESSAGE
    774	000742	001002 				BNE	10$		;HAS NOT BEEN SENT BEFORE
    775	000744	105260 	000043 			INCB	S.N(R0)		;THEN UPDATE THE HIGH WATER MARK.
    776	000750	105260 	000041 		10$:	INCB	S.TM1(R0)	;GET NUMBER OF NEXT TRANSMIT MESSAGE
    777	000754	116022 	000041 			MOVB	S.TM1(R0),(R2)+	;MESSAGE NUMBER IS 5TH BYTE
    785	000760	116067 	000037 	000046'	20$:	MOVB	S.NMSG(R0),TXCNT ;SET BABBLING COUNT.
    786	000766	142760 	000020 	000020 	30$:	BICB	#SE.SAK,S.STE(R0) ;(ACK NO LONGER NECESSARY)
    787	000774	105265 	000062 			INCB	L.MOTD(R5)	;ONE MORE DATA MESSAGE TO THE DRIVER.
    788	001000					RETURN			;SET STATION AND RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001002					.PSECT	CODE,I
    805	001002	004167 	000102 		BLMOP:	JSR	R1,CCBSET	;SAVE REGS AND SETUP CCB
    806	001006	112722 	000220 			MOVB	#CM.DLE,(R2)+	;FIRST CHAR IS DLE
    807	001012					CALL	BLLTH		;SET LENGTH OF MESSAGE INTO HDR
    808	001016	105022 				CLRB	(R2)+		;INSERT FILL
    809	001020	105022 				CLRB	(R2)+		;AND ANOTHER
    810	001022	152760 	000040 	000020 		BISB	#SE.SSL,S.STE(R0) ;SELECT MUST ACCOMPANY
    811	001030					CALL	BLSYN		;PRECEED WITH SYNS.
    812	001034	105265 	000062 			INCB	L.MOTD(R5)	;ONE MORE DATA MESSAGE TO THE DRIVER.
    813	001040					RETURN			;SET STATION AND RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001042					.PSECT	CODE,I
    829	001042	016703 	000044'		BLSYN:	MOV	TXLST,R3	;IF THERE IS A LAST HEADER CCB
    830	001046	001403 				BEQ	10$		;THEN
    831	001050	152763 	000100 	000026 		BISB	#DD.QSN,C.BUF2+2(R3) ;SET THE QSYN BIT
    832	001056	052764 	000040 	000022 	10$:	BIS	#CF.SYN,C.FLG(R4) ;AND PRECEED THIS HEADER WITH SYNS.
    833	001064					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	001066	010446 			BLLTH:	MOV	R4,-(SP)	;SAVE CCB
    850	001070	011404 				MOV	(R4),R4		;AND GET START OF MESSAGE.
    851	001072					CALL	CALTH		;CALCULATE LENGTH OF MESSAGE
    852	001076	110122 				MOVB	R1,(R2)+	;INSERT LOW BYTE
    853	001100	000301 				SWAB	R1		;AND
    854	001102	110122 				MOVB	R1,(R2)+	;HIGH BYTE.
    855	001104	012604 				MOV	(SP)+,R4	;RESTORE HEADER
    856	001106					RETURN			;AND GO AWAY.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001110	010246 			CCBSET:	MOV	R2,-(SP)	;SAVE R2
    890	001112	010346 				MOV	R3,-(SP)	;SAVE R3
    891	001114	010403 				MOV	R4,R3		;SAVE HIS DATA CCB
    892	001116					CALL	$CCBGT		;GET A CCB FOR A HEADER
    893	001122	103444 				BCS	80$		;AND IF SUCCESSFUL
    894	001124	010314 				MOV	R3,(R4)		;LINK TO REST OF IT.
    895	001126	010064 	000004 			MOV	R0,C.NSP(R4)	;SET STATION TABLE ADDRESS FOR LATER
    896	001132	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET DEVICE LINE NUMBER
    897	001140	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;SET STATION NUMBER
    898	001146	005064 	000012 			CLR	C.STS(R4)	;INITIAL STATUS
    899	001152	010402 				MOV	R4,R2		;COPY CCB ADDRESS
    900	001154	062702 	000020 			ADD	#C.CNT,R2	;POINT TO COUNT WORD
    901	001160	010203 				MOV	R2,R3		;AND KEEP COPY.
    902	001162	012722 	000006 			MOV	#6,(R2)+	;COUNT IS 6 BYTES (NO CRC)
    903	001166	012722 	100034 			MOV	#CF.SOM!CF.EOM!CF.HDR!CF.LB,(R2)+ ;SET FLAGS FOR HEADER
    904	001172	010243 				MOV	R2,-(R3)	;BUFFER ADDRESS
    905	001174	005043 				CLR	-(R3)		;AND MAPPING BIAS.
    906	001176					CALL	(R1)		;RETURN TO CALLER
    907	001200	116012 	000017 			MOVB	S.SPAN(R0),(R2)	;INSERT STATION ADDRESS.
    908	001204	016764 	000044'	000032 		MOV	TXLST,C.FLG2(R4) ;LINK PREVIOUS HEADER TO THIS ONE
    909	001212	010467 	000044'			MOV	R4,TXLST	;SET NEW LAST HEADER
    910	001216	012703 	000040'			MOV	#TXQUE,R3	;GET CONSTRUCTED MESSAGE QUEUE
    911	001222					CALL	$CMQIN		;AND INSERT IN QUEUE.
    912	001226	105260 	000050 			INCB	S.MOTD(R0)	;BUMP STATION MESSAGE COUNTER
    913	001232	005727 				TST	(PC)+		;CLEAR CARRY FOR SUCCESSFUL BUILD
    914	001234	010304 			80$:	MOV	R3,R4		;RECOVER HIS DATA CCB FOR UNSUCCESSFUL BUILD
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 19-1
CCBSET	- SAVE REGISTERS AND SET UP CCB FOR A DDCMP HEADER

    915	001236	012603 				MOV	(SP)+,R3	;RESTORE R3 THROUGH R1
    916	001240	012602 				MOV	(SP)+,R2
    917	001242	012601 				MOV	(SP)+,R1
    918	001244					RETURN			;RETURN TO CALLER
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001246	010403 			CALTH:	MOV	R4,R3		;COPY CCB ADDR OF START OF MESSAGE
    938	001250	005001 				CLR	R1		;INIT COUNTER
    939	001252	000401 				BR	20$		;START ON THIS CCB
    940
    941	001254	011303 			10$:	MOV	(R3),R3		;GET NEXT CCB IN CHAIN
    942	001256	066301 	000020 		20$:	ADD	C.CNT1(R3),R1	;ADD IN LENGTH OF SEGMENT
    943	001262	032763 	000004 	000022 		BIT	#CF.EOM,C.FLG1(R3) ;IF NOT END OF MESSAGE
    944	001270	001011 				BNE	90$		;AND
    945	001272	005763 	000022 			TST	C.FLG1(R3)	;OTHER DESCRIPTOR IN USE
    946	001276	100766 				BMI	10$		;THEN
    947	001300	066301 	000030 			ADD	C.CNT2(R3),R1	;ADD IN OTHER SEGMENT.
    948	001304	032763 	000004 	000032 		BIT	#CF.EOM,C.FLG2(R3) ;IF NOT END OF MESSAGE
    949	001312	001760 				BEQ	10$		;THEN GO FOR MORE.
    950
    951	001314				90$:	RETURN			;RETURN TO CALLER
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001316	005064 	000012 		DCPCTL:	CLR	C.STS(R4)	;INITIALIZE RETURN STATUS
    976	001322	022703 	000004 			CMP	#FS.STP/400,R3	;IS IT A HALT
    977	001326	001016 				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	001330	010401 				MOV	R4,R1		;SAVE THE CCB POINTER
    983	001332	010502 				MOV	R5,R2		;AND GET ADDRESS
    993	001334	062702 	000010 			ADD	#L.FCNL,R2	;OF CONTROL FUNCTION LIST.
    994	001340	010203 			10$:	MOV	R2,R3		;GET THE NEXT CONTROL CCB
    996	001342					CALL	$CMQRM		;AND
    997	001346	103405 				BCS	30$		;IF THERE IS ONE
   1002	001350	012703 	100362 			MOV	#CE.ABO,R3	;SET ABORT STATUS
   1003	001354					CALL	$CTCMP		;AND RETURN A COMPLETION
   1004	001360	000767 				BR	10$		;NOW BACK FOR THE NEXT
   1014	001362	010104 			30$:	MOV	R1,R4		;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	001364	032765 	020000 	000002 	40$:	BIT	#LS.CTL,L.STS(R5) ;CONTROL MESSAGE OUTSTANDING
   1021	001372	001433 				BEQ	CTLDSP		;NO, SO EXECUTE THIS ONE
   1022	001374	010503 				MOV	R5,R3		;GET LINE TABLE ADDRESS
   1023	001376	062703 	000010 			ADD	#L.FCNL,R3	;AND POINT TO CONTROL QUEUE
   1024	001402					CALLR	$CMQIN		;QUEUE THE CONTROL FUNCTION
   1025					;
   1026					; CONTROL FUNCTION COMPLETED TO THE DRIVER - DO END PROCESSING
   1027					;
   1031	001406	016500 	000014 		DCPCCP:	MOV	L.STAL(R5),R0	;GET THE PROPER STATION TABLE
   1033	001412	010001 				MOV	R0,R1		;COPY THE STATION TABLE ADDRESS
   1034	001414	005721 				TST	(R1)+		;POINT TO THE STATION STATUS WORD
   1035	001416					CALL	@CCMPTB(R3)	;DISPATCH TO PROPER ROUTINE
   1036	001422	103433 				BCS	CCPNOP		;IF NOT FINISHED, GO AWAY.
   1037					;
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 21-1
DCPCTL	- DDCMP CONTROL FUNCTION ENTRY POINT

   1038					; CONTROL FUNCTION FINISHED - RETURN CCB AND TRY TO START NEW FUNCTION
   1039					;
   1040	001424	042765 	020000 	000002 	DDCFN2:	BIC	#LS.CTL,L.STS(R5) ;CONTROL MESSAGE COMPLETE
   1041	001432	005704 				TST	R4		;WAS A CCB RETURNED
   1042	001434	001404 				BEQ	30$		;NO, BUT TRY THE NEXT FUNCTION
   1043	001436	016403 	000012 			MOV	C.STS(R4),R3	;GET STATUS RETURNED BY LOWER LEVEL
   1044	001442					CALL	$CTCMP		;AND RETURN TO THE HLP
   1045	001446	010503 			30$:	MOV	R5,R3		;GET LINE TABLE ADDRESS
   1046	001450	062703 	000010 			ADD	#L.FCNL,R3	;POINT TO CONTROL QUEUE
   1047	001454					CALL	$CMQRM		;GET THE CONTROL CCB
   1048	001460	103414 				BCS	CCPNOP		;NONE SO EXIT
   1049					;
   1050					; INITIATE NEW FUNCTION
   1051					;
   1055	001462	016500 	000014 		CTLDSP:	MOV	L.STAL(R5),R0	;GET THE PROPER STATION TABLE
   1057	001466	010001 				MOV	R0,R1		;COPY THE STATION TABLE ADDRESS
   1058	001470	005721 				TST	(R1)+		;POINT TO THE STATION STATUS WORD
   1059	001472	116403 	000011 			MOVB	C.MOD(R4),R3	;COPY THE FUNCTION CODE
   1060	001476	052765 	020000 	000002 		BIS	#LS.CTL,L.STS(R5) ;INDICATE CONTROL MESSAGE IN PROGRESS
   1061	001504					CALL	@CDISP(R3)	;AND DISPATCH TO IT
   1062	001510	103345 				BCC	DDCFN2		;IF SYNCHRONOUS, THEN COMPLETE IMMEDIATELY
   1063	001512				CCPNOP:	RETURN			;OTHERWISE WAIT FOR COMPLETION.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001514	005726 			CCPAST:	TST	(SP)+		;REMOVE THE RETURN- AVOID CONFLICT WITH
   1087									;  NORMAL CONTROL FUNCTION.
   1088	001516	016403 	000012 			MOV	C.STS(R4),R3	;GET THE ERROR
   1089	001522					CALLR	$CTCMP		;POST THE ERROR AND EXIT DDCMP
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001526	032711 	040000 		CTLENB:	BIT	#SS.ENA,(R1)	;IF ALREADY ENABLED
   1114	001532	001010 				BNE	20$		;THEN RETURN IMMEDIATELY.
   1119	001534					CALL	$DDENB		;TELL THE DRIVER.
   1120	001540	103406 				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	001542	005764 	000012 		CCPENB:	TST	C.STS(R4)	;IF SUCCESSFUL
   1141	001546	100403 				BMI	30$		;THEN
   1142	001550	052711 	040000 		10$:	BIS	#SS.ENA,(R1)	;MARK AS ENABLED
   1146	001554	000241 			20$:	CLC			;SYNCHRONOUS RETURN
   1147	001556				30$:	RETURN
   1148						.DSABL	LSB
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001560	032711 	140000 		CTLDIS:	BIT	#SS.ACT!SS.ENA,(R1) ;IF ACTIVE OR ALREADY DISABLED
   1170	001564	003404 				BLE	10$		;THEN DISABLE INAPROPRIATE.
   1171	001566	042711 	040000 			BIC	#SS.ENA,(R1)	;MARK STATION AS DISABLED
   1176	001572					CALLR	$DDDIS		;DISABLE LINE.
   1177	001576	001403 			10$:	BEQ	20$		;EITHER ALREADY DISABLED
   1178	001600	012764 	100362 	000012 		MOV	#CE.ABO,C.STS(R4) ;OR STILL ACTIVE.
   1179	001606	000241 			20$:	CLC			;SYNCHRONOUS COMPLETION
   1180	001610					RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001612	032711 	140000 		CTLMNT:	BIT	#SS.ACT!SS.ENA,(R1) ;IF ALREADY ACTIVE OR NOT ENABLED
   1206	001616	003403 				BLE	10$		;THEN CHECK ON WHAT WE MUST DO.
   1207	001620	112711 	000010 			MOVB	#SS.MNT,(R1)	;SET IN MOP MODE
   1208	001624	000435 				BR	30$		;DO COMMON STARTUP PROCESSING
   1209
   1210	001626	002405 			10$:	BLT	12$		;IF NOT ENABLED
   1211	001630	012764 	100362 	000012 		MOV	#CE.ABO,C.STS(R4) ;THEN JUST ABORT IT.
   1212	001636	000241 				CLC			;SET SYNCHRONOUS RETURN
   1213	001640					RETURN			;AND GO AWAY.
   1214	001642				12$:	CALLR	CTLSTP		;OTHERWISE STOP THE LINE FIRST.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	001646	032711 	140000 		CTLSTR:	BIT	#SS.ACT!SS.ENA,(R1) ;IF ALREADY ACTIVE OR NOT ENABLED
   1240	001652	003765 				BLE	10$		;THEN CHECK ON WHAT WE MUST DO.
   1241	001654	062700 	000040 			ADD	#S.R,R0		;POINT TO MESSAGE COUNTERS
   1242	001660	012703 	000011 			MOV	#<S.NKRE-S.R>,R3 ;AND NUMBER OF COUNTERS
   1243	001664	105020 			20$:	CLRB	(R0)+		;CLEAR COUNTER
   1244	001666					SOB	R3,20$		;UNTIL ALL DONE
   1245	001672	162700 	000051 			SUB	#S.NKRE,R0	;AND RESTORE STATION TABLE ADDRESS.
   1246	001676	116760 	000001'	000061 		MOVB	.ERRTH,S.RETH(R0) ;RESET RECEIVE ERROR THRESHOLD.
   1247	001704	116760 	000001'	000062 		MOVB	.ERRTH,S.RPTH(R0) ;RESET SELECT LOST THRESHOLD.
   1248	001712	116760 	000001'	000063 		MOVB	.ERRTH,S.NAKT(R0) ;RESET MESSAGE LOST THRESHOLD.
   1249
   1250	001720	105765 	000064 		30$:	TSTB	L.NAST(R5)	;IF NOT THE FIRST ACTIVE STATION
   1251	001724	001011 				BNE	50$		;THEN BYPASS THE LINE INITIALIZATION.
   1252	001726					CALL	SETLIN		;SET UP THE LINE TABLE
   1253	001732	103432 				BCS	90$		;IF WE CAN
   1254	001734					CALL	$DDSTR		;AND START THE DEVICE
   1255	001740	103426 				BCS	82$		;DID NOT FINISH SO JUST EXIT
   1256
   1257	001742	005764 	000012 		CCPSTR:	TST	C.STS(R4)	;WERE WE SUCCESSFUL
   1258	001746	100424 				BMI	90$		;IF NOT,
   1259	001750				50$:	CALL	SETSTA		;SET UP THE STATION TABLE.
   1260	001754	052711 	100000 			BIS	#SS.ACT,(R1)	;MARK AS ACTIVE
   1261	001760	105265 	000064 			INCB	L.NAST(R5)	;AND BUMP NUMBER OF ACTIVE STATIONS.
   1262	001764	122711 	000010 			CMPB	#SS.MNT,(R1)	;MOP MODE ?
   1263	001770	001412 				BEQ	82$		;YES
   1264	001772	010460 	000014 			MOV	R4,S.FCNL(R0)	;SAVE START CCB UNTIL STACK
   1265	001776	112711 	000002 			MOVB	#SS.IST,(R1)	;SET INITIATE START STATE
   1266	002002	152760 	000042 	000020 		BISB	#SE.SST!SE.SSL,S.STE(R0) ;AND SET TO SEND START.
   1277	002010				70$:	CALL	TXSND		;TRY TO SEND SOMETHING.
   1278	002014	005004 			80$:	CLR	R4		;RETURN WITH R4 ZERO AND CARRY CLEAR
   1279	002016				82$:	RETURN			;RETURN, START COMPLETED LATER
   1280
   1281	002020				90$:	CALL	CLNLIN		;CLEAN OUT CCB ALLOCATIONS FOR LINE
   1282	002024	112760 	000000 	000002 		MOVB	#SS.HLT,S.STS(R0) ;STATION IN HALT STATE AGAIN
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 26-1
CTLSTR	- ENTER START MODE

   1283	002032	012764 	100362 	000012 		MOV	#CE.ABO,C.STS(R4) ;SET STATUS AS ABORT
   1284	002040	000241 				CLC			;FAKE SYNCH. COMPLETION
   1285	002042					RETURN			;AND EXIT
   1286						.DSABL	LSB
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	002044	010446 			SETLIN:	MOV	R4,-(SP)	;...
   1304	002046	052765 	000400 	000002 		BIS	#LS.LEN,L.STS(R5) ;ENABLE THE LINE
   1305	002054	010065 	000020 			MOV	R0,L.CRST(R5)	;SET AS CURRENT STATION
   1312	002060	105065 	000062 			CLRB	L.MOTD(R5)	;NO MESSAGES AT THE DRIVER.
   1313	002064	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	002072	105065 	000002 			CLRB	L.STS(R5)	;RESET MULTIPOINT AND HALF DUPLEX SIGNALS
   1316
   1328	002076	032765 	000050 	000040 		BIT	#50,L.CHAR+2(R5) ;MAKE SURE NOT MULTIPOINT
   1329	002104	001401 				BEQ	22$		;AND IF SO,
   1330	002106	000003 				BPT			;CRASH.
   1332
   1333	002110	032765 	000001 	000036 	22$:	BIT	#1,L.CHAR(R5)	;IF HALF DUPLEX
   1334	002116	001403 				BEQ	30$		;THEN
   1335	002120	052765 	000002 	000002 		BIS	#LS.HDX,L.STS(R5) ;SET THE SIGNAL.
   1336	002126	005065 	000030 		30$:	CLR	L.HDR(R5)	;NO PRE-ALLOCATED HEADER CCBS.
   1337	002132	105765 	000061 			TSTB	L.NMSG(R5)	;IF MESSAGE LIMIT NOT SET
   1341	002136	001004 				BNE	46$		;THEN
   1343	002140	016703 	000002'			MOV	.LIMSG,R3	;GET DEFAULTS
   1349	002144	110365 	000061 		32$:	MOVB	R3,L.NMSG(R5)	;SET THE DEFAULT VALUE.
   1368	002150	005003 			46$:	CLR	R3		;GET
   1369	002152	156503 	000056 			BISB	L.PDLI(R5),R3	;POLLING DELAY INTERVAL
   1370	002156	001403 				BEQ	48$		;IF THERE IS ONE
   1371	002160	004267 	000032 			JSR	R2,80$		;ALLOCATE TIMER AND SAVE.
   1372	002164	   000 	   050 			.BYTE	TM.PDL,L.PDLT
   1373	002166	005003 			48$:	CLR	R3		;GET
   1374	002170	156503 	000057 			BISB	L.BABI(R5),R3	;BABBLING STATION TIMEOUT
   1375	002174	001406 				BEQ	50$		;IF THERE IS ONE
   1376	002176	070327 	000074 			MUL	#60.,R3		;CONVERT INTERVAL TO TICKS
   1377	002202	004267 	000010 			JSR	R2,80$		;ALLOCATE TIMER AND SAVE.
   1378	002206	   004 	   052 			.BYTE	TM.BAB,L.BABT
   1379	002210	000241 				CLC			;ALL DONE.
   1380	002212	012604 			50$:	MOV	(SP)+,R4	;RESTORE THE REGISTER
   1381	002214					RETURN
   1382
   1383	002216				80$:	CALL	$CCBGT		;IF CAN'T GET A CCB
   1384	002222	103415 				BCS	82$		;THEN GIVE UP.
   1385	002224	112264 	000002 			MOVB	(R2)+,C.RSV(R4)	;SET TIMER TYPE
   1386	002230	010464 	000004 			MOV	R4,C.NSP(R4)	;AND IDENTIFICATION.
   1387	002234	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE NUMBER
   1388	002242	010364 	000012 			MOV	R3,C.STS(R4)	;AND TIME INTERVAL IN TICKS.
   1389	002246	112203 				MOVB	(R2)+,R3	;GET DISPLACEMENT
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 27-1
SETLIN	- INITIALIZE LINE TABLE

   1390	002250	060503 				ADD	R5,R3		;INTO LINE TABEL
   1391	002252	010413 				MOV	R4,(R3)		;AND SAVE THE CCB.
   1392	002254	000202 				RTS	R2		;RETURN HAPPY.
   1393	002256	012602 			82$:	MOV	(SP)+,R2	;RESTORE REGISTER
   1394	002260	000754 				BR	50$		;AND ABORT THE START.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	002262	042711 	027000 		SETSTA:	BIC	#SS.REP!SS.TIM!SS.RTR!SS.SHU,(R1) ;INITIALIZE BITS
   1413	002266	052711 	000400 			BIS	#SS.SEL,(R1)	;ASSUME WE ARE TO BE SELECTED
   1414	002272	105060 	000020 			CLRB	S.STE(R0)	;NO SCHEDULED CONTROL MESSAGES
   1421	002276	105760 	000037 			TSTB	S.NMSG(R0)	;IF MESSAGE LIMIT IS NOT SET
   1425	002302	001004 				BNE	90$		;THEN
   1427	002304	016703 	000004'			MOV	.SIMSG,R3	;GET DEFAULTS
   1433	002310	110360 	000037 		12$:	MOVB	R3,S.NMSG(R0)	;SET THE DEFAULT VALUE.
   1460	002314				90$:	RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	002316	005711 			CTLSTP:	TST	(R1)		;IF STATION NOT ACTIVE
   1490	002320	100105 				BPL	70$		;THEN RETURN IMMEDIATELY.
   1491	002322	032711 	020000 			BIT	#SS.SHU,(R1)	;IF SHUTDOWN ALREADY IN PROGRESS
   1492	002326	001406 				BEQ	20$		;THEN
   1493	002330	010503 				MOV	R5,R3		;GET ADDRESS
   1494	002332	062703 	000010 			ADD	#L.FCNL,R3	;OF CONTROL FUNCTION QUEUE
   1495	002336					CALL	$CMQIF		;AND APPEND TO FRONT.
   1496	002342	000437 				BR	30$		;RETURN ASYNCHRONOUSLY.
   1497
   1498	002344	052765 	020000 	000002 	20$:	BIS	#LS.CTL,L.STS(R5) ;SET CONTROL FUNCTION IN PROGRESS
   1499	002352	042711 	007377 			BIC	#SS.REP!SS.TIM!SS.RTR!377,(R1) ;RESET STATION STATUS
   1500	002356	052711 	020000 			BIS	#SS.SHU!SS.HLT,(R1) ;MARK LINE IN SHUTDOWN MODE AND HALTED.
   1501	002362	010402 				MOV	R4,R2		;SAVE THE CURRENT CCB
   1502	002364	016004 	000014 			MOV	S.FCNL(R0),R4	;AND IF THERE IS A CONTROL CCB
   1503	002370	001404 				BEQ	22$		;THEN
   1504	002372	012703 	100362 			MOV	#CE.ABO,R3	;RETURN WITH ABORT.
   1505	002376					CALL	$CTCMP
   1506	002402	010260 	000014 		22$:	MOV	R2,S.FCNL(R0)	;SAVE THE HALT CCB FOR LATER.
   1507	002406	026500 	000020 			CMP	L.CRST(R5),R0	;IF CURRENT STATION
   1508	002412	001010 				BNE	24$		;AND
   1509	002414	032711 	000400 			BIT	#SS.SEL,(R1)	;NOT SELECTED
   1510	002420	001005 				BNE	24$		;THEN
   1511	002422	016504 	000050 			MOV	L.PDLT(R5),R4	;DELAY TIMER MAY BE ACTIVE.
   1512	002426	001402 				BEQ	24$		;IF THERE IS A TIMER
   1513	002430					CALL	$CNDTM		;THEN CANCEL IT.
   1518	002434	105760 	000050 		24$:	TSTB	S.MOTD(R0)	;ANY OUTSTANDING MESSAGES?
   1520	002440	001402 				BEQ	HALTFN		;CONTINUE IF NOT
   1521	002442	000261 			30$:	SEC			;SET THE CARRY FOR AN ASYNCH COMPLETION
   1522	002444					RETURN
   1523
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 29-1
CTLSTP	- SHUTDOWN A LINE

   1524	002446				HALTFN:	CALL	CLNSTA		;RETURN ALL OUTSTANDING TX MESSAGES
   1525	002452	105365 	000064 			DECB	L.NAST(R5)	;DEC ACTIVE STATION COUNTER
   1526	002456	003020 				BGT	60$		;BR IF NOT LAST STATION HALTED
   1527	002460	016004 	000014 			MOV	S.FCNL(R0),R4	;GET HALT CCB
   1528	002464	016460 	000010 	000014 		MOV	C.FNC(R4),S.FCNL(R0) ;SAVE FUNCTION CODE
   1529	002472					CALL	$DDSTP		;STOP THE DEVICE NOW.
   1530	002476	103761 				BCS	30$		;IF SYNCHRONOUS COMPLETION,
   1531
   1532	002500	016064 	000014 	000010 	CCPSTP:	MOV	S.FCNL(R0),C.FNC(R4) ;RESTORE FUNCTION CODE
   1533	002506	010460 	000014 			MOV	R4,S.FCNL(R0)	;AND CONTROL CCB POINTER
   1534	002512	105015 				CLRB	(R5)		;CANCEL ANY TIMEOUTS
   1535	002514					CALL	CLNLIN		;AND CLEAN UP THE LINE TABLE.
   1536	002520	042711 	120000 		60$:	BIC	#SS.SHU!SS.ACT,(R1) ;SHUTDOWN COMPLETE, NO LONGER ACTIVE.
   1537	002524	016004 	000014 			MOV	S.FCNL(R0),R4	;GET HALT CCB
   1538	002530	005060 	000014 			CLR	S.FCNL(R0)	;AND RESET FUNCTION POINTER.
   1539	002534	105764 	000010 		70$:	TSTB	C.FNC(R4)	;IF AN INTERNAL REQUEST
   1540	002540	001005 				BNE	72$		;THEN
   1541	002542	116464 	000002 	000011 		MOVB	C.RSV(R4),C.MOD(R4) ;SET NEW REQUESTED STATE
   1542	002550	105064 	000002 			CLRB	C.RSV(R4)	;CANCEL IT
   1543	002554	116403 	000011 		72$:	MOVB	C.MOD(R4),R3	;GET FUNCTION MODIFIER
   1544	002560	000173 	002564'			JMP	@74$(R3)	;AND CONTINUE THE FUNCTION.
   1545	002564				74$:	DSPBEG	,</400>
   1546	002564					DSP	FS.AST,92$	; (INTERNAL REQUEST COMPLETE)
   1547	002566					DSP	FS.STR,CTLSTR	; START
   1548	002570					DSP	FS.STP,90$	; STOP
   1549	002572					DSP	FS.TRM		; (NOT USED)
   1550	002574					DSP	FS.MNT,CTLMNT	; MAINTENANCE
   1551	002576					DSPEND
   1552
   1553	002576	012764 	000001 	000012 	90$:	MOV	#CS.SUC,C.STS(R4) ;INDICATE SUCCESS
   1554	002604	000241 				CLC			;HALT COMPLETED
   1555	002606					RETURN			;AND EXIT.
   1556
   1557	002610				92$:	CALL	$CCBRT		;RETURN THE REQUEST CCB
   1558	002614	005004 				CLR	R4		;NO CCB FOR CONTROL PROCESSING
   1559	002616					RETURN			;AND GO AWAY.
   1560						.DSABL	LSB
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	002620	010446 			CLNLIN:	MOV	R4,-(SP)
   1578	002622	016504 	000030 		10$:	MOV	L.HDR(R5),R4	;GET TOP HEADER CCB
   1582	002626	001405 				BEQ	40$		;IF NONE, ALL RETURNED
   1584	002630	011465 	000030 			MOV	(R4),L.HDR(R5)	;CLOSE TOP OF HEADER STACK
   1585	002634					CALL	$CCBRT		;RETURN CCB TO POOL
   1586	002640	000770 				BR	10$		;CONTINUE
   1587
   1602	002642	016504 	000050 		40$:	MOV	L.PDLT(R5),R4	;IF POLLING DELAY TIMER EXISTS
   1603	002646	001406 				BEQ	50$		;THEN
   1604	002650					CALL	$CNDTM		;CANCEL IT
   1605	002654					CALL	$CCBRT		;RETURN IT
   1606	002660	005065 	000050 			CLR	L.PDLT(R5)	;AND INDICATE IT IS GONE.
   1607
   1608	002664	016504 	000052 		50$:	MOV	L.BABT(R5),R4	;IF BABBLING STATION TIMER EXISTS
   1609	002670	001406 				BEQ	60$		;THEN
   1610	002672					CALL	$CNDTM		;CANCEL IT
   1611	002676					CALL	$CCBRT		;RETURN IT
   1612	002702	005065 	000052 			CLR	L.BABT(R5)	;AND INDICATE IT IS GONE.
   1613
   1614	002706	012604 			60$:	MOV	(SP)+,R4
   1615	002710					RETURN			;RETURN TO CALLER
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	002712	010446 			CLNSTA:	MOV	R4,-(SP)	;SAVE R4
   1635
   1636	002714	010003 			10$:	MOV	R0,R3		;GET ADDRESS
   1637	002716	062703 	000010 			ADD	#S.TAKQ,R3	;OF WAITING-FOR-ACK QUEUE
   1638	002722					CALL	$CMQRM		;AND LOOK FOR A CANIDATE.
   1639	002726	103405 				BCS	20$		;IF THERE IS ONE
   1640	002730	012703 	100362 			MOV	#CE.ABO,R3	;THEN SEND IT BACK
   1641	002734					CALL	$XMCMP		;WITH ABORT AS STATUS.
   1642	002740	000765 				BR	10$		;GO FOR MORE.
   1643
   1644	002742	010003 			20$:	MOV	R0,R3		;GET ADDRESS
   1645	002744	062703 	000004 			ADD	#S.PTXQ,R3	;OF PRE-TRANSMIT QUEUE
   1646	002750					CALL	$CMQRM		;AND LOOK FOR A CANIDATE.
   1647	002754	103405 				BCS	30$		;IF THERE IS ONE
   1648	002756	012703 	100362 			MOV	#CE.ABO,R3	;THEN SEND IT BACK
   1649	002762					CALL	$XMCMP		;WITH ABORT AS STATUS.
   1650	002766	000765 				BR	20$		;GO FOR MORE.
   1651
   1652	002770	012604 			30$:	MOV	(SP)+,R4	;RESTORE R4
   1653	002772					RETURN			;RETURN TO CALLER
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	002774	032765 	040000 	000002 	DVRSN:	BIT	#LS.RSA,L.STS(R5) ;IS LINE IN RESYNC MODE
   1673	003002	001023 				BNE	20$		;YES, SO JUST EXIT
   1674	003004	010446 				MOV	R4,-(SP)	;SAVE R4
   1675	003006					CALL	$CCBGT		;GET A CONTROL CCB
   1676	003012	103416 				BCS	10$		;IF ONE IS AVAILABLE
   1677	003014	052765 	140000 	000002 		BIS	#LS.RSN!LS.RSA,L.STS(R5) ;INDICATE IN RESYNC MODE
   1678	003022	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET THE LINE NUMBER
   1679	003030	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;AND CURRENT STATION
   1680	003036					CALL	$DDCRA		;AND CALL THE FUNCTION
   1681	003042	103402 				BCS	10$		;ASYNCH SO JUST EXIT
   1682	003044					CALL	DCPKCP		;OTHERWISE PERFORM COMPLETION RITUAL.
   1683	003050	012604 			10$:	MOV	(SP)+,R4	;RESTORE R4
   1684	003052				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	003054	042765 	040000 	000002 	DCPKCP:	BIC	#LS.RSA,L.STS(R5) ;INDICATE THE RESYNC CCB IS BACK
   1703	003062					CALLR	$CCBRT		;RETURN CCB TO LIST
DCPPTP	MACRO M1110  04-FEB-80 14:21  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:
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 33-1
DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.

   1762					;	NONE
   1763					;
   1764					; REGISTERS MODIFIED:
   1765					;	ALL
   1766					;-
   1767
   1768	003066				DCPTIM:
   1770	003066	016500 	000020 			MOV	L.CRST(R5),R0	;GET CURRENT STATION TABLE ADDRESS
   1771	003072	000173 	003076'			JMP	@10$(R3)	;DISPATCH ON TYPE OF TIMEOUT
   1772	003076				10$:	DSPBEG	,</400>
   1773	003076					DSP	FS.STM,TIMSTM	; SHORT TIMER
   1774	003100					DSP	FS.LTM,TIMLTM	; LONG TIMER
   1775	003102					DSPEND
   1776					;
   1781	003102	010001 			TIMLTM:	MOV	R0,R1		;COPY STATION TABLE
   1783	003104	005721 				TST	(R1)+		;POINT TO STATUS WORD
   1789	003106	111103 			10$:	MOVB	(R1),R3		;GET STATION STATE
   1808	003110	000173 	003114'		20$:	JMP	@22$(R3)	;GO TO STATE PROCESSOR.
   1809	003114				22$:	DSPBEG
   1810	003114					DSP	SS.HLT,90$	; HALT (SHUTDOWN)
   1811	003116					DSP	SS.IST,60$	; INITIATE START
   1812	003120					DSP	SS.AST,60$	; ACKNOWLEDGE START
   1813	003122					DSP	SS.RUN,50$	; RUNNING
   1814	003124					DSP	SS.MNT,70$	; MAINTENANCE
   1815	003126					DSPEND
   1816					;
   1817					; STATION IS ONLINE.  SEND REP MESSAGE AND CHECK THRESHOLD.
   1818					;
   1819	003126	105765 	000002 		50$:	TSTB	L.STS(R5)	;IF FULL DUPLEX POINT-POINT
   1820	003132	001433 				BEQ	SELND		;THEN END SELECTION INTERVAL IMMEDIATELY.
   1821					;
   1822					; TIMEOUT DURING START
   1823					;
   1824	003134	105765 	000002 		60$:	TSTB	L.STS(R5)	;FULL DUPLEX POINT-POINT?
   1825	003140	001404 				BEQ	80$		;YES-- DON'T NEED TO RESYNC RECEIVER
   1826	003142					CALL	TRPTH		;UPDATE SELECT LOST THRESHOLD
   1827					;
   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	003146				70$:	CALL	DVRSN		;RESYNC DEVICE
   1834	003152	000423 			80$:	BR	SELND		;MARK END OF SELECT PERIOD
   1835					;
   1836					; TIMEOUT DURING HALT (SHUTDOWN)
   1837					;
   1838	003154				90$:
   1843	003154					RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 34
DCPTIM	- DDCMP TIMEOUT SERVICE ROUTINE.

   1845					;
   1846					; SHORT TIMER
   1847					;
   1848	003156	116402 	000002 		TIMSTM:	MOVB	C.RSV(R4),R2	;GET TIMER INDEX
   1849	003162	000172 	003166'			JMP	@10$(R2)	;AND DISPATCH.
   1850	003166				10$:	DSPBEG
   1851	003166					DSP	TM.PDL,20$	; POLLING DELAY TIMER
   1855	003170					DSP	TM.DED		; NO DEAD STATION POLLING
   1857	003172					DSP	TM.BAB,40$	; BABBLING STATION TIMER
   1861	003174					DSPEND
   1862					;
   1863					; POLLING DELAY TIMER
   1864					;
   1865	003174	052760 	000400 	000002 	20$:	BIS	#SS.SEL,S.STS(R0) ;ALLOW STATION TO TRANSMIT
   1866	003202					CALLR	TXSND		;AND SEND THAT POLL NOW.
   1874					;
   1875					; THIS STATION HAS BEEN TALKING TOO LONG...
   1876					;
   1881	003206				40$:	CALL	TRPTH		;UPDATE SELECT LOST THRESHOLD
   1883	003212					CALL	DVRSN		;RE-SYNCH THE DEVICE
   1884	003216					CALLR	SELND		;AND END THE SELECTION INTERVAL.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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					;-
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 36
SELND	- SELECT END PROCESSOR WITH POLL WAKING AND SHORT TIMER

   1966						.ENABL	LSB
   1967	003222	010001 			SELND:	MOV	R0,R1		;COPY STATION TABLE ADDRESS
   1968	003224	005721 				TST	(R1)+		;AND POINT AT STATUS WORD.
   1969	003226	016504 	000052 			MOV	L.BABT(R5),R4	;IF THERE IS A BABBLING TIMER
   1970	003232	001402 				BEQ	10$		;THEN
   1971	003234					CALL	$CNDTM		;CANCEL IT.
   1972					;
   1973					; IF REP TIMER EXPIRED, THEN SEND SOMETHING APPROPRIATE.
   1974					;
   1975	003240	032711 	004000 		10$:	BIT	#SS.TIM,(R1)	;IF REP TIMER EXPIRED
   1976	003244	001425 				BEQ	20$		;THEN
   1977	003246	042711 	005000 			BIC	#SS.TIM!SS.REP,(R1) ;RESET THE REP TIMER FLAGS
   1978	003252	111102 				MOVB	(R1),R2		;GET STATION STATE
   1979	003254	000172 	003260'			JMP	@12$(R2)	;AND RESPOND APPROPRIATELY.
   1980	003260				12$:	DSPBEG
   1981	003260					DSP	SS.HLT,20$	; HALTED
   1982	003262					DSP	SS.IST,14$	; INITIATE START
   1983	003264					DSP	SS.AST,16$	; ACKNOWLEDGE START
   1984	003266					DSP	SS.RUN,18$	; RUNNING
   1985	003270					DSP	SS.MNT,20$	; MAINTENANCE
   1986	003272					DSPEND
   1987	003272	152760 	000042 	000020 	14$:	BISB	#SE.SST!SE.SSL,S.STE(R0) ;SEND START.
   1988	003300	000407 				BR	20$
   1989	003302	152760 	000041 	000020 	16$:	BISB	#SE.SSK!SE.SSL,S.STE(R0) ;SEND STACK.
   1990	003310	000403 				BR	20$
   1991	003312	152760 	000010 	000020 	18$:	BISB	#SE.SRP,S.STE(R0) ;SEND REP.
   1992					;
   1993					; PASS SELECTION BACK TO US
   1994					;
   1995	003320	052765 	000400 	000002 	20$:	BIS	#LS.LEN,L.STS(R5) ;ENABLE LINE (HDX MASTER)
   1996	003326	052711 	000400 			BIS	#SS.SEL,(R1)	;SELECT STA FOR TRANSMISSION (SLAVE)
   1997
   2001	003332	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MAINTENANCE MODE
   2020	003336	001404 				BEQ	60$		;OR
   2021	003340	032765 	000002 	000002 		BIT	#LS.HDX,L.STS(R5) ;HALF DUPLEX
   2022	003346	001413 				BEQ	90$		;THEN
   2024	003350	016504 	000050 		60$:	MOV	L.PDLT(R5),R4	;IF THERE IS A POLLING DELAY CCB
   2025	003354	001405 				BEQ	80$		;THEN
   2026	003356	042760 	000400 	000002 		BIC	#SS.SEL,S.STS(R0) ;DESELECT THE STATION
   2027	003364					CALL	$SDLTM		;AND START THE TIMER UP.
   2028
   2029	003370	152760 	000040 	000020 	80$:	BISB	#SE.SSL,S.STE(R0) ;MARK SELECTION FOR NEXT CONTROL MESSAGE.
   2030	003376				90$:	CALLR	TXSND		;RESTART TRANSMITTER.
   2031						.DSABL	LSB
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	003402	010503 			DCPXCP:	MOV	R5,R3		;COPY LINE TABLE ADDRESS
   2149	003404	062703 	000004 			ADD	#L.TDNQ,R3	;POINT TO TX DONE QUEUE
   2150	003410	032764 	000020 	000022 		BIT	#CF.HDR,C.FLG(R4) ;IS THIS A HEADER CCB
   2151	003416	001406 				BEQ	14$		;NO, SO QUEUE THE CCB
   2152	003420	122764 	000005 	000024 		CMPB	#CM.ENQ,C.BUF2(R4) ;IS THIS A CONTROL MESSAGE
   2153	003426	001421 				BEQ	20$		;YES, SO PROCESS THE HEADER NOW.
   2154	003430				12$:	CALLR	$CMQIN		;OTHERWISE QUEUE UP.
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 38-1
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2155
   2156	003434	032764 	000004 	000022 	14$:	BIT	#CF.EOM,C.FLG1(R4) ;IF EOM
   2157	003442	001007 				BNE	18$		;THEN GO GET HEADER.
   2158	003444	005764 	000022 			TST	C.FLG1(R4)	;IF OTHER DESCRIPTOR USED
   2159	003450	100767 				BMI	12$		;AND
   2160	003452	032764 	000004 	000032 		BIT	#CF.EOM,C.FLG2(R4) ;EOM SET
   2161	003460	001763 				BEQ	12$		;THEN
   2162
   2163	003462				18$:	CALL	$CMQIN		;QUEUE THE CCB
   2164	003466					CALL	$CMQRM		;REMOVE THE HEADER
   2165					;
   2166					; GET OUR OWN COPY OF THE HEADER AND RETURN IT TO THE POOL
   2167					;
   2168	003472	016402 	000016 		20$:	MOV	C.BUF+2(R4),R2	;GET ADDRESS OF BUFFER
   2169	003476	012267 	000074'			MOV	(R2)+,HDR+0	;AND COPY INTO LOCAL AREA.
   2170	003502	012267 	000076'			MOV	(R2)+,HDR+2
   2171	003506	011267 	000100'			MOV	(R2),HDR+4
   2172	003512	016400 	000004 			MOV	C.NSP(R4),R0	;GET ADDR OF STATION TABLE FOR MESSAGE
   2173	003516	010001 				MOV	R0,R1		;AND
   2174	003520	005721 				TST	(R1)+		;ADDRESS OF STATUS BYTE.
   2175	003522	116502 	000002 			MOVB	L.STS(R5),R2	;GET LINE TYPE
   2176	003526	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MAINTENANCE MODE
   2177	003532	001002 				BNE	22$		;THEN
   2178	003534	152702 	000002 			BISB	#LS.HDX,R2	;TREAT AS HALF-DUPLEX.
   2179	003540				22$:	CALL	$CCBRT		;RETURN THE HEADER CCB.
   2180	003544	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	003550	122767 	000005 	000074'	30$:	CMPB	#CM.ENQ,HDR+0	;IF A CONTROL MESSAGE
   2185	003556	001007 				BNE	32$		;THEN
   2186	003560	022767 	001405 	000074'		CMP	#MT.REP*400+CM.ENQ,HDR+0 ;CHECK IF A REP
   2187	003566	001066 				BNE	48$		;IF SO, THEN
   2188	003570	052711 	001000 			BIS	#SS.REP,(R1)	;SET TO START REP TIMER
   2189	003574	000463 				BR	48$
   2190					;
   2191					; PICK UP REASSEMBLED DATA OR MAINTENANCE MESSAGE
   2192					;
   2193	003576	105365 	000062 		32$:	DECB	L.MOTD(R5)	;COUNT OUT DATA MESSAGE FOR THIS LINE
   2194	003602	011304 				MOV	(R3),R4		;GET CCB CHAIN FROM QUEUE
   2195	003604	005013 				CLR	(R3)		;AND CLEAR UP
   2196	003606	010363 	000002 			MOV	R3,2(R3)	;THE QUEUE HEADER.
   2197					;
   2198					; RETURN MAINTENANCE MESSAGE IMMEDIATELY
   2199					;
   2200	003612	122767 	000220 	000074'		CMPB	#CM.DLE,HDR+0	;IF MAINTENANCE MESSAGE
   2201	003620	001012 				BNE	40$		;THEN
   2202	003622	005260 	000070 			INC	S.XMT(R0)	;ONE MORE MESSAGE SENT
   2203	003626	001002 				BNE	34$		;AND IF OVERFLOW
   2204	003630	005360 	000070 			DEC	S.XMT(R0)	;THEN BACK IT UP.
   2205	003634	012703 	000001 		34$:	MOV	#CS.SUC,R3	;SET SUCCESS RETURN STATUS
   2206	003640					CALL	$XMCMP		;AND RETURN THE SEGMENT.
   2207	003644	000437 				BR	48$
   2208					;
   2209					; PUT DATA MESSAGE IN WAITING-TO-BE-ACKED QUEUE AND RETURN IF ALREADY ACKED
   2210					;
   2211	003646	010003 			40$:	MOV	R0,R3		;GET ADDRESS OF
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 38-2
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2212	003650	062703 	000010 			ADD	#S.TAKQ,R3	;WAITING FOR ACK QUEUE
   2213	003654					CALL	$CMQIN		;QUEUE THE DATA SEGMENT
   2214	003660					CALL	RTACK		;AND RETURN IF ALREADY ACKED.
   2215					;
   2216					; CHECK IF REP INTERVAL SHOULD START NOW
   2217					;
   2218	003664	116703 	000100'			MOVB	HDR+4,R3	;GET MESSAGE NUMBER
   2219	003670	110360 	000042 			MOVB	R3,S.X(R0)	;AND SET AS LAST RETURNED FROM THE DRIVER.
   2220	003674	116004 	000043 			MOVB	S.N(R0),R4
   2221	003700	010446 				MOV	R4,-(SP)
   2222	003702	160304 				SUB	R3,R4		; N-X
   2223	003704	116003 	000044 			MOVB	S.A(R0),R3
   2224	003710	160316 				SUB	R3,(SP)		; N-A
   2225	003712	122604 				CMPB	(SP)+,R4	; N-A : N-X
   2226	003714	101406 				BLOS	44$		;IF N-A > N-X  (A < X)
   2227	003716	032711 	005000 			BIT	#SS.REP!SS.TIM,(R1) ;AND TIMER NOT RUNNING
   2231	003722	001010 				BNE	48$		;THEN
   2233	003724	052711 	001000 			BIS	#SS.REP,(R1)	;SET TO START REP TIMER.
   2241	003730	000405 				BR	48$
   2242	003732	042711 	005000 		44$:	BIC	#SS.REP!SS.TIM,(R1) ;CANCEL TIMER.
   2243	003736	105702 				TSTB	R2		;IF FDX PT-PT
   2244	003740	001001 				BNE	48$		;THEN
   2245	003742	105015 				CLRB	(R5)		;CANCEL THE CLOCK ALSO.
   2246					;
   2247					; CHECK IF HE HAS TO RETRANSMIT.
   2248					;
   2249	003744	032711 	002000 		48$:	BIT	#SS.RTR,(R1)	;IF RETRANSMISSION REQUESTED
   2250	003750	001402 				BEQ	50$		;THEN
   2251	003752					CALL	TXRTX		;SEE IF IT CAN BE DONE NOW.
   2252					;
   2253					; IF REP TIMER IS REQUESTED, THEN START IT.
   2254					;
   2255	003756	032711 	001000 		50$:	BIT	#SS.REP,(R1)	;WANT A REP TIMER ?
   2256	003762	001410 				BEQ	60$		;IF SO,
   2257	003764	042711 	001000 			BIC	#SS.REP,(R1)	;CLEAR THE REQUEST
   2258	003770	052711 	004000 			BIS	#SS.TIM,(R1)	;SET THE TIMER FLAG
   2259	003774	105702 				TSTB	R2		;AND IF FDX PT-PT
   2260	003776	001002 				BNE	60$		;THEN
   2261	004000	116515 	000001 			MOVB	L.ITMO(R5),(R5)	;SET LINE TIMER.
   2262					;
   2263					; SET THE SELECTION TIMER IF APPROPRIATE
   2264					;
   2276	004004	105702 			60$:	TSTB	R2		;IF NOT FULL DUPLEX
   2277	004006	001417 				BEQ	80$		;THEN
   2279					;
   2280					; HDX PT-PT
   2281					;
   2282	004010	105767 	000076'		64$:	TSTB	HDR+2		;IF SELECT IS ON
   2283	004014	100014 				BPL	80$		;THEN
   2306					;
   2307					; SET SELECTION INTERVAL TIMER
   2308					;
   2309	004016	116515 	000001 		72$:	MOVB	L.ITMO(R5),(R5)	;RESET LINE TIMER
   2310					;
   2311					; SET THE BABBLING TIMER
   2312					;
   2313	004022	016504 	000052 			MOV	L.BABT(R5),R4	;IF THERE IS A TIMER
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 38-3
DCPXCP	- TRANSMIT DONE ENTRY POINT

   2314	004026	001402 				BEQ	74$		;THEN
   2315	004030					CALL	$SDLTM		;START IT UP.
   2316					;
   2317					; COUNT THE SELECT
   2318					;
   2319	004034	005260 	000072 		74$:	INC	S.SEL(R0)	;BUMP SELECT SENT COUNTER
   2320	004040	001002 				BNE	80$		;AND IF OVERFLOW
   2321	004042	005360 	000072 			DEC	S.SEL(R0)	;THEN BACK IT UP.
   2322					;
   2323					; IF SHUTDOWN IN PROGRESS, SEE IF READY
   2324					;
   2325	004046	032711 	020000 		80$:	BIT	#SS.SHU,(R1)	;STATION MARKED FOR SHUTDOWN?
   2326	004052	001411 				BEQ	90$		;IF NOT, TRY TO SEND NEXT MESSAGE.
   2327	004054	105760 	000050 			TSTB	S.MOTD(R0)	;IF NO MESSAGES OUTSTANDING
   2328	004060	001005 				BNE	82$		;THEN
   2329	004062					CALL	HALTFN		;DO THE HALT.
   2330	004066	103402 				BCS	82$		;IF SYNCHRONOUS COMPLETION
   2331	004070					CALL	DDCFN2		;THEN COMPLETE THE CONTROL FUNCTION.
   2332
   2340	004074				82$:	RETURN
   2342
   2343	004076				90$:	CALLR	TXSND		;TRY TO SEND NEXT MESSAGE.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	004102					.PSECT	CODE,I
   2367	004102				DCPRCP:	SAVMAP			;SAVE CURRENT MAPPING
   2368	004106					MAP	C.BUF(R4)	;MAP TO THE RECEIVED DATA BUFFER
   2369	004114	016402 	000016 			MOV	C.BUF+2(R4),R2	;POINT TO RECEIVED MESSAGE
   2370	004120	012267 	000074'			MOV	(R2)+,HDR+0	;COPY
   2371	004124	012267 	000076'			MOV	(R2)+,HDR+2	;OVER
   2372	004130	011267 	000100'			MOV	(R2),HDR+4	;HEADER.
   2373	004134					RESMAP			;RESTORE CURRENT MAPPING
   2374
   2375	004140	005765 	000002 			TST	L.STS(R5)	;IS LINE MARKED FOR RESYNC?
   2376	004144	100007 				BPL	10$		;CONTINUE IF NOT
   2377	004146	032764 	010200 	000012 		BIT	#CS.RSN!CS.BUF,C.STS(R4) ;RESYNC SATISFIED?
   2378	004154	001425 				BEQ	TOSS		;TOSS IF NOT
   2379	004156	042765 	100000 	000002 		BIC	#LS.RSN,L.STS(R5) ;CLR WAITING FOR RESYNC
   2380	004164	016500 	000020 		10$:	MOV	L.CRST(R5),R0	;GET CURRENT STATION TABLE ADDRESS
   2381	004170	001417 				BEQ	TOSS		;IF THERE IS ONE
   2382	004172	010001 				MOV	R0,R1		;AND POINT TO
   2383	004174	062701 	000002 			ADD	#S.STS,R1	;STATION STATUS WORD.
   2384	004200	005764 	000012 			TST	C.STS(R4) 	;WAS THERE AN ERROR ON MESSAGE?
   2385	004204	100013 				BPL	MSGOK		;IF SO,
   2386	004206	032764 	077377 	000012 		BIT	#^C<CS.ERR!CS.DCR>,C.STS(R4) ;AND NOT DATA CRC ERROR
   2387	004214	001407 				BEQ	MSGOK		;THEN DON'T PROCESS FURTHER.
   2388	004216	122711 	000000 			CMPB	#SS.HLT,(R1)	;IF STATION NOT HALTED
   2389	004222	001402 				BEQ	TOSS		;THEN
   2390	004224					CALL	LGRER		;LOG RECEIVED ERROR.
   2391	004230				TOSS:	CALLR	$RDBRT		;RETURN RECEIVE DATA BUFFER
DCPPTP	MACRO M1110  04-FEB-80 14:21  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					;
   2423	004234	016703 	000074'		MSGOK:	MOV	HDR+0,R3	;PICK UP FUNCTION FOR EASY COMPARISON
   2425	004240	111102 				MOVB	(R1),R2		;GET STATION STATE
   2426	004242	001772 				BEQ	TOSS		;IF HALTED, DUMP THE MESSAGE.
   2427	004244	122703 	000005 			CMPB	#CM.ENQ,R3	;IF CONTROL MESSAGE
   2428	004250	001415 				BEQ	MSGCTL		;THEN PROCESS IT
   2429	004252	132764 	000002 	000011 		BITB	#FS.DVC/400,C.MOD(R4) ;IF DEVICE DOESN'T CHECK DATA CRC
   2430	004260	001002 				BNE	22$		;THEN
   2431	004262					CALL	CKCRC		;COMPUTE CRC NOW.
   2432	004266	122703 	000201 		22$:	CMPB	#CM.SOH,R3	;IF DATA,
   2433	004272	001002 				BNE	50$		;THEN
   2434	004274	000167 	000644 			JMP	MSGDAT		;PROCESS DATA MESSAGE
   2435	004300	000167 	001006 		50$:	JMP	MSGMOP		;OTHERWISE PROCESS MOP MESSAGE.
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 41
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2437					;
   2438					; RECEIVED MESSAGE WAS UNNUMBERED CONTROL MESSAGE
   2439					; DISPATCH CONTROL MESSAGE BY TYPE
   2440					;
   2441
   2454	004304	105003 			MSGCTL:	CLRB	R3		;GET CONTROL SUBTYPE
   2456	004306	000303 				SWAB	R3		;WITHOUT SIGN EXTENSION.
   2457	004310	022703 	000007 			CMP	#7,R3		;IF MESSAGE TYPE OUT OF RANGE
   2458	004314	103001 				BHIS	30$		;THEN
   2459	004316	005003 				CLR	R3		;SET AS INVALID.
   2460	004320	006303 			30$:	ASL	R3		;CONVERT TO WORD INDEX
   2461	004322					CALL	@40$(R2)	;DISPATCH TO STATE PROCESSOR
   2462	004326					CALL	$RDBRT		;BUFFER NO LONGER NEEDED
   2463	004332	000167 	001206 			JMP	ENDPRO
   2464	004336				40$:	DSPBEG
   2465	004336					DSP	SS.HLT		; HALTED (OR SHUTDOWN)
   2466	004340					DSP	SS.IST,MSGSTR	; INITIATE START
   2467	004342					DSP	SS.AST,MSGSTR	; ACKNOWLEDGE START
   2468	004344					DSP	SS.RUN,MSGRUN	; RUNNING
   2469	004346					DSP	SS.MNT,MSGNOP	; MAINTENANCE
   2470	004350					DSPEND
   2471
   2472	004350	152760 	000004 	000020 	MSGHFE:	BISB	#SE.SNK,S.STE(R0) ;SET TO SEND NAK
   2473	004356	112760 	000021 	000051 		MOVB	#RN.HFE,S.NKRE(R0) ;WITH HEADER FORMAT ERROR REASON
   2474	004364	142760 	000020 	000020 		BICB	#SE.SAK,S.STE(R0) ;CANCEL ANY PENDING ACKS
   2475	004372					CALL	TRETH		;AND ADJUST RECEIVE ERROR THRESHOLD.
   2476	004376	012716 	000000G		MSGBAD:	MOV	#$RDBRT,(SP)	;TOSS THE MESSAGE
   2477	004402				MSGNOP:	RETURN			;NOTHING TO DO.
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 42
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2479					;
   2480					; STARTUP STATE
   2481					;
   2482	004404	000173 	004410'		MSGSTR:	JMP	@10$(R3)	;DISPATCH BY CONTROL SUB-TYPE
   2483	004410				10$:	DSPBEG	,<*2>
   2484	004410					DSP	,50$		;  (INVALID)
   2485	004412					DSP	MT.ACK,40$	; ACK
   2486	004414					DSP	MT.NAK,50$	; NAK
   2487	004416					DSP	MT.REP,50$	; REP
   2488	004420					DSP	,50$		;  (ARCHAIC)
   2489	004422					DSP	,50$		;  (ARCHAIC)
   2490	004424					DSP	MT.STR,20$	; START
   2491	004426					DSP	MT.STK,30$	; STACK
   2492	004430					DSPEND
   2493					;
   2494					; START RECEIVED
   2495					;
   2496	004430	105767 	000076'		20$:	TSTB	HDR+2		;IF SELECT NOT ON
   2497	004434	100026 				BPL	50$		;THEN BAD MESSAGE.
   2498	004436	116760 	000001'	000063 		MOVB	.ERRTH,S.NAKT(R0) ;RESET THE NAK THRESHOLD.
   2499	004444	112711 	000004 			MOVB	#SS.AST,(R1)	;MOVE TO START ACKNOWLEDGE STATE
   2500	004450	152760 	000041 	000020 		BISB	#SE.SSK!SE.SSL,S.STE(R0) ;AND SET TO SEND STACK.
   2501	004456					RETURN
   2502					;
   2503					; STACK RECEIVED
   2504					;
   2505	004460	105767 	000076'		30$:	TSTB	HDR+2		;IF SELECT NOT ON
   2506	004464	100012 				BPL	50$		;THEN BAD MESSAGE.
   2507	004466	152760 	000020 	000020 		BISB	#SE.SAK,S.STE(R0) ;SET TO SEND AN ACK
   2508	004474	000421 				BR	SETRUN		;AND GO TO RUN STATE.
   2509					;
   2510					; ACK RECEIVED
   2511					;
   2512	004476	122711 	000004 		40$:	CMPB	#SS.AST,(R1)	;IF IN ASTRT STATE
   2513	004502	001003 				BNE	50$		;AND
   2514	004504	105767 	000077'			TSTB	HDR+3		;ACK NUMBER ZERO
   2515	004510	001413 				BEQ	SETRUN		;THEN SET IN RUN STATE.
   2516	004512	122702 	000002 		50$:	CMPB	#SS.IST,R2	;OTHERWISE CHECK CURRENT STATE.
   2517	004516	001004 				BNE	60$		;IF IN START STATE
   2518	004520	152760 	000042 	000020 		BISB	#SE.SST!SE.SSL,S.STE(R0) ;THEN SEND ANOTHER START
   2519	004526	000723 				BR	MSGBAD		;ELSE
   2520	004530	152760 	000041 	000020 	60$:	BISB	#SE.SSK!SE.SSL,S.STE(R0) ;SEND A STACK
   2521	004536	000717 				BR	MSGBAD		;AND THROW THE MESSAGE AWAY.
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 43
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2523					;
   2524					; SET THE STATION INTO RUN MODE
   2525					;
   2526	004540	042711 	005000 		SETRUN:	BIC	#SS.REP!SS.TIM,(R1) ;TURN OFF REP TIMER
   2527	004544	105765 	000002 			TSTB	L.STS(R5)	;AND IF FDX PT-PT
   2528	004550	001001 				BNE	10$		;THEN
   2529	004552	105015 				CLRB	(R5)		;TURN OFF THE CLOCK.
   2530	004554	116760 	000001'	000063 	10$:	MOVB	.ERRTH,S.NAKT(R0) ;RESET THE NAK THRESHOLD.
   2531	004562	112711 	000006 			MOVB	#SS.RUN,(R1)	;MOVE TO RUN STATE
   2532	004566	105260 	000057 			INCB	S.STRC(R0)	;AND BUMP THE START/RESTART COUNTER.
   2533	004572	001002 				BNE	20$		;IF OVERFLOW
   2534	004574	105360 	000057 			DECB	S.STRC(R0)	;THEN BACK OFF.
   2535	004600	010446 			20$:	MOV	R4,-(SP)	;SAVE MESSAGE BUFFER
   2536	004602	016004 	000014 			MOV	S.FCNL(R0),R4	;GET START CCB
   2537	004606	001411 				BEQ	90$		;(WHOOPS)
   2538	004610	005060 	000014 			CLR	S.FCNL(R0)	;AND INDICATE NO LONGER THERE.
   2539	004614	012764 	001006 	000010 		MOV	#<FC.CTL!FS.STR>,C.FNC(R4) ;SET FUNCTION
   2540	004622	012703 	000001 			MOV	#CS.SUC,R3	;SUCCESS CODE
   2541	004626					CALL	$CTCMP		;AND POST START COMPLETE.
   2542	004632	012604 			90$:	MOV	(SP)+,R4	;RESTORE MESSAGE BUFFER
   2543	004634					RETURN			;AND GO AWAY.
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 44
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2545					;
   2546					; RUNNING STATE
   2547					;
   2548	004636	000173 	004642'		MSGRUN:	JMP	@10$(R3)	;DISPATCH BY TABLE OF CONTROL SUBTYPES
   2549	004642				10$:	DSPBEG	,<*2>
   2550	004642					DSP	,MSGHFE		;  (INVALID)
   2551	004644					DSP	MT.ACK,20$	; ACK
   2552	004646					DSP	MT.NAK,30$	; NAK
   2553	004650					DSP	MT.REP,50$	; REP
   2554	004652					DSP	,MSGHFE		;  (ARCHAIC)
   2555	004654					DSP	,MSGHFE		;  (ARCHAIC)
   2556	004656					DSP	MT.STR,80$	; START
   2557	004660					DSP	MT.STK,90$	; STACK
   2558	004662					DSPEND
   2559					;
   2560					; PROCESS RECIEVED ACKNOWLEDGED MESSAGE
   2561					;
   2562	004662				20$:	CALL	CKACK		;CHECK ON ACKNOWLEDGEMENT
   2563	004666	103643 				BCS	MSGBAD		;AND IGNORE IF OUT OF RANGE.
   2564	004670	001464 				BEQ	70$		;IF NEW ACK NUMBER
   2565	004672					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	004676				30$:	CALL	CKACK		;CHECK ON ACKNOWLDEGEMENT RECEIVED
   2574	004702	103635 				BCS	MSGBAD		;AND IGNORE IF OUT OF RANGE.
   2575	004704	042711 	005000 			BIC	#SS.REP!SS.TIM,(R1) ;CLEAR REP TIMER
   2576	004710	105765 	000002 			TSTB	L.STS(R5)	;AND IF PT-PT
   2577	004714	001001 				BNE	32$		;THEN
   2578	004716	105015 				CLRB	(R5)		;CLEAR TIMER.
   2579	004720	116703 	000076'		32$:	MOVB	HDR+2,R3	;GET NAK CODE
   2580	004724	042703 	177700 			BIC	#^C77,R3	;ISOLATE AND
   2581	004730					CALL	LGNAK		;LOG IT.
   2582	004734					CALL	TNKTH		;UPDATE THE NAKS RECEIVED THRESHOLD
   2583	004740	126760 	000077'	000041 		CMPB	HDR+3,S.TM1(R0)	;NAKING OUTSTANDING MESSAGES?
   2584	004746	001435 				BEQ	70$		;BR IF NONE TO RETRANSMIT
   2585	004750	052711 	002000 			BIS	#SS.RTR,(R1)	;SIGNAL RETRANSMIT REQUESTED
   2586	004754					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	004760	126760 	000100'	000040 	50$:	CMPB	HDR+4,S.R(R0)	;HAVE RECEIVED ALL HIS MESSAGES?
   2592	004766	001417 				BEQ	60$		;SEND ACK AGAIN IF YES
   2593	004770	152760 	000004 	000020 		BISB	#SE.SNK,S.STE(R0) ;MARK TO SEND NAK
   2594	004776	112760 	000003 	000051 		MOVB	#RN.REP,S.NKRE(R0) ;WITH REP RESPONSE REASON
   2595	005004	142760 	000020 	000020 		BICB	#SE.SAK,S.STE(R0) ;CANCEL ANY PENDING ACKS
   2596	005012					CALL	TRETH		;AND ADJUST RECEIVE ERROR THRESHOLD.
   2597	005016	112703 	000052 			MOVB	#S.RCVE,R3	;CODE FOR RECEIVED REP
   2598	005022					CALLR	LGCTR		;LOG RECEIVED REP
   2599
   2600	005026	152760 	000020 	000020 	60$:	BISB	#SE.SAK,S.STE(R0) ;MARK TO SEND ACK
   2601	005034	142760 	000004 	000020 		BICB	#SE.SNK,S.STE(R0) ;AND CANCEL ANY NAKS.
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 44-1
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2602	005042				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	005044	012703 	100364 		80$:	MOV	#CE.SRC,R3	;GET CODE FOR START RECEIVED
   2608	005050	005067 	000020'			CLR	PSTA		;NO THRESHOLD
   2609	005054					CALL	LOGGIT		;DO THE LOGGING
   2613	005060					CALL	NOTIF		;AND NOTIFY HLP
   2614	005064					CALL	$RDBRT		;NO LONGER NEED THIS
   2615	005070	005726 				TST	(SP)+		;AND NO END PROCESSING TO DO.
   2616	005072					CALL	$CCBGT		;AND TRY TO GET CCB.
   2617	005076	103415 				BCS	88$		;IF WE CAN,
   2618	005100	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE
   2619	005106	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;AND STATION
   2620	005114	012764 	002000 	000010 		MOV	#FS.STP,C.FNC(R4) ;FUNCTION = INTERNAL HALT OF PROTOCOL
   2621	005122	105064 	000002 			CLRB	C.RSV(R4)	;WITH NO NEW STATE
   2622	005126					CALLR	CTLDSP		;INITIATE SHUTDOWN OF STATION.
   2623	005132				88$:	RETURN
   2624					;
   2625					; STACK MESSAGE HAS BEEN RECEIVED.  ALWAYS RESPOND WITH ACK.
   2626					;
   2627	005134	152760 	000020 	000020 	90$:	BISB	#SE.SAK,S.STE(R0) ;MARK TO SEND ACK
   2628	005142					RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	005144	000172 	005150'		MSGDAT:	JMP	@10$(R2)	;DISPATCH TO STATE PROCESSOR
   2637	005150				10$:	DSPBEG
   2638	005150					DSP	SS.HLT		; HALTED (OR SHUTDOWN)
   2639	005152					DSP	SS.IST,$RDBRT	; INITIATE START
   2640	005154					DSP	SS.AST,20$	; ACKNOWLEDGE START
   2641	005156					DSP	SS.RUN,30$	; RUNNING
   2642	005160					DSP	SS.MNT,$RDBRT	; MAINTENANCE
   2643	005162					DSPEND
   2644
   2645	005162	105767 	000077'		20$:	TSTB	HDR+3		;IF RESP<>0
   2646	005166	001046 				BNE	50$		;THEN DUMP THE MESSAGE
   2647	005170					CALL	SETRUN		;OTHERWISE SET TO RUN MODE.
   2648
   2654	005174	116003 	000040 		30$:	MOVB	S.R(R0),R3	;GET NUMBER OF LAST MESSAGE RECEIVED
   2656	005200	105203 				INCB	R3		;AND
   2657	005202	126703 	000100'			CMPB	HDR+4,R3	;THIS IS NOT THE NEXT ONE
   2658	005206	001036 				BNE	50$		;THEN IGNORE.
   2659	005210					CALL	CKACK		;CHECK ON RECEIVED ACK FIELD
   2660	005214	103433 				BCS	50$		;AND IGNORE IF OUT OF RANGE.
   2661	005216	001402 				BEQ	34$		;IF NEW ACK NUMBER
   2662	005220					CALL	CKREP		;RESET REP TIMER IF NECESSARY.
   2663	005224	005764 	000012 		34$:	TST	C.STS(R4)	;IF THERE IS A DATA CRC ERROR
   2664	005230	100423 				BMI	42$		;THEN DUMP THE MESSAGE.
   2665	005232	026767 	000000G	000000G		CMP	$RDBCT,$RDBTH	;IF NOT ENOUGH LDBS
   2666	005240	103414 				BLO	40$		;THEN GO NAK THIS ONE AND RETURN IT.
   2667	005242	105260 	000040 			INCB	S.R(R0)		;INC LAST MESSAGE NUM RECEIVED
   2668	005246	152760 	000020 	000020 		BISB	#SE.SAK,S.STE(R0) ;SCHEDULE TO SEND ACK
   2669	005254	142760 	000004 	000020 		BICB	#SE.SNK,S.STE(R0) ;AND CANCEL ANY PENDING NAKS.
   2670	005262	012764 	000001 	000012 		MOV	#CS.SUC,C.STS(R4) ;RETURN AS DATA MESSAGE
   2671	005270	000465 				BR	SNDMSG		;RETURN TO HLP
   2672	005272	052764 	100200 	000012 	40$:	BIS	#CS.ERR!CS.BUF,C.STS(R4) ;WE ARE CONGESTED
   2673	005300				42$:	CALL	LGRER		;LOG ERROR AND SCHEDULE NAK
   2674	005304				50$:	CALL	$RDBRT		;RETURN THE BUFFER
   2675	005310	000515 				BR	ENDPRO		;AND FINISH PROCESSING.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	005312	000172 	005316'		MSGMOP:	JMP	@10$(R2)	;DISPATCH TO STATE PROCESSOR
   2682	005316				10$:	DSPBEG
   2683	005316					DSP	SS.HLT		; HALTED (OR SHUTDOWN)
   2684	005320					DSP	SS.IST,20$	; INITIATE START
   2685	005322					DSP	SS.AST,20$	; ACKNOWLEDGE START
   2686	005324					DSP	SS.RUN,20$	; RUNNING
   2687	005326					DSP	SS.MNT,30$	; MAINTENANCE
   2688	005330					DSPEND
   2689
   2690	005330	012703 	100372 		20$:	MOV	#CE.MOP,R3	;GET MOP ERROR MESSAGE
   2691	005334	005067 	000020'			CLR	PSTA		;NO THRESHOLD
   2692	005340					CALL	LOGGIT		;DO THE LOGGING
   2693	005344					CALL	NOTIF		;POST AN ASYNC. ERROR
   2694	005350					CALL	$RDBRT		;DUMP THE BUFFER.
   2695	005354					CALL	$CCBGT		;TRY TO GET A CCB
   2696	005360	103415 				BCS	28$		;AND IF WE CAN,
   2697	005362	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE
   2698	005370	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;AND STATION
   2699	005376	012764 	002000 	000010 		MOV	#FS.STP,C.FNC(R4) ;FUNCTION = INTERNAL HALT OF PROTOCOL
   2700	005404	105064 	000002 			CLRB	C.RSV(R4)	;WITH NO NEW STATE
   2701	005410					CALLR	CTLDSP		;INITIATE SHUTDOWN OF STATION.
   2702	005414				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	005416	152767 	000300 	000076'	30$:	BISB	#DD.SEL!DD.QSN,HDR+2 ;*** GUARANTY THAT WE ARE RE-SELECTED.
   2710	005424	005764 	000012 			TST	C.STS(R4)	;IF THERE IS A DATA CRC ERROR
   2711	005430	100005 				BPL	SNDMSG		;THEN
   2712	005432					CALL	LGRER		;LOG ERROR AND SCHEDULE NAK
   2713	005436					CALL	$RDBRT		;RETURN THE BUFFER
   2714	005442	000440 				BR	ENDPRO		;AND FINISH PROCESSING.
   2715					;
   2716					; PASS MESSAGE TO HIGHER LEVEL AND FINISH PROCESSING
   2717					;
   2718	005444	116760 	000001'	000061 	SNDMSG:	MOVB	.ERRTH,S.RETH(R0) ;RESET THE RECEIVE ERROR THRESHOLD
   2719	005452	132764 	000004 	000011 		BITB	#FS.CIB/400,C.MOD(R4) ;DID THE DEVICE REMOVE THE CRC ?
   2720	005460	001407 				BEQ	10$		;CRC IS NOT IN BUFFER
   2721	005462	062764 	000010 	000016 		ADD	#8.,C.BUF+2(R4)	;POINT TO DATA SECTION, PAST HDR AND CRC
   2722	005470	162764 	000012 	000020 		SUB	#10.,C.CNT(R4)	;SUB LENGTH OF HEADER AND BOTH CRC FROM COUNT
   2723	005476	000406 				BR	20$		;...
   2724	005500	062764 	000006 	000016 	10$:	ADD	#6,C.BUF+2(R4)	;POINT TO DATA SECTION, PAST HDR
   2725	005506	162764 	000006 	000020 		SUB	#6,C.CNT(R4)	;SUB LENGTH OF HEADER FROM COUNT
   2726	005514	116064 	000016 	000007 	20$:	MOVB	S.SLAN(R0),C.STA(R4) ;RETURN LOGICAL ADDRESS FOR STATION
   2727	005522	016403 	000012 			MOV	C.STS(R4),R3	;GET COMPLETION STATUS
   2728	005526	005260 	000066 			INC	S.RCV(R0)	;COUNT A MESSAGE RECEIVED
   2729	005532	001002 				BNE	30$		;DONT OVERFLOW COUNTER
   2730	005534	005360 	000066 			DEC	S.RCV(R0)	;GO BACK TO -1
   2731	005540				30$:	CALL	$RCCMP		;QUEUE RECEIVED MESSAGE
   2732	005544					FALLR	ENDPRO		;FINISH END PROCESSING
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 47
DCPRCP	- RECEIVE MESSAGE DONE PROCESS

   2734					;
   2735					; END OF MESSAGE PROCESSING
   2736					;
   2737	005544	116502 	000002 		ENDPRO:	MOVB	L.STS(R5),R2	;GET LINE TYPE
   2738	005550	122711 	000010 			CMPB	#SS.MNT,(R1)	;IF IN MAINTENANCE MODE
   2739	005554	001002 				BNE	12$		;THEN
   2740	005556	152702 	000002 			BISB	#LS.HDX,R2	;TREAT AS HALF DUPLEX
   2741	005562	000172 	005566'		12$:	JMP	@14$(R2)	;AND PROCESS APPROPRIATELY.
   2742	005566				14$:	DSPBEG
   2743	005566					DSP	,TXSND		;FDX PT-PT
   2744	005570					DSP	,16$		;HDX PT-PT
   2745	005572					DSP	,16$		;FDX MASTER
   2746	005574					DSP	,16$		;HDX MASTER
   2747	005576					DSP	,20$		;FDX SLAVE
   2748	005600					DSP	,20$		;HDX SLAVE
   2749	005602					DSPEND
   2750	005602	116515 	000001 		16$:	MOVB	L.ITMO(R5),(R5)	;RESET LINE TIMER
   2751	005606	105767 	000076'		20$:	TSTB	HDR+2		;RECEIVED SELECT FROM OTHER STATION?
   2752	005612	100020 				BPL	24$		;NO, EXIT
   2753	005614	132702 	000010 			BITB	#LS.MPS,R2	;IF THIS IS A SLAVE
   2754	005620	001407 				BEQ	22$		;THEN
   2755	005622	016502 	000020 			MOV	L.CRST(R5),R2	;DESELECT PREVIOUS CURRENT STATION
   2756	005626	042762 	000400 	000002 		BIC	#SS.SEL,S.STS(R2) ;IF IT HASN'T ALREADY
   2757	005634	010065 	000020 			MOV	R0,L.CRST(R5)	;AND SET NEW CURRENT STATION.
   2758	005640	105015 			22$:	CLRB	(R5)		;RESET THE SELECT TIMER
   2759	005642	116760 	000001'	000062 		MOVB	.ERRTH,S.RPTH(R0) ;AND THE SELECT LOST THRESHOLD.
   2760	005650	000167 	175346 			JMP	SELND		;DO SELECTION END PROCESSING
   2761	005654	000167 	172172 		24$:	JMP	TXSND		;OR TRY TO TRANSMIT SOME MORE.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	005660	005764 	000012 		CKCRC:	TST	C.STS(R4)	;DID DDM DETECT ANY ERRORS ?
   2779	005664	100445 				BMI	20$		;NO NEED TO CHECK CRC IF YES
   2780	005666					SAVMAP			;SAVE CURRENT MAPPING
   2781	005672	010246 				MOV	R2,-(SP)	;SOME REGISTERS
   2782	005674	010146 				MOV	R1,-(SP)	;
   2783	005676	010046 				MOV	R0,-(SP)	;
   2784	005700					MAP	C.BUF(R4)	;MAP TO BUFFER
   2785	005706	016402 	000016 			MOV	C.BUF+2(R4),R2	;GET BUFFER ADDRESS
   2786	005712	016400 	000020 			MOV	C.CNT(R4),R0	;AND LENGTH.
   2787	005716	062702 	000010 			ADD	#10,R2		;BYPASS HEADER
   2788	005722	162700 	000010 			SUB	#10,R0		;AND ADJUST COUNT
   2789	005726					$LIBCM	L.CRC,R5,$STCRC,SAVE ;CALL CRC LIBRARY ROUTINE,SAVE KISAR6
   2790	005750	012600 				MOV	(SP)+,R0	;GET STATION TABLE BACK
   2791	005752	005701 				TST	R1		;CHECK FOR GOOD CRC.
   2792	005754	001405 				BEQ	10$		;IF NOT GOOD,
   2793	005756	052764 	100400 	000012 		BIS	#CS.DCR!CS.ERR,C.STS(R4) ;MARK CRC ERROR
   2794	005764					CALL	DVRSN		;RESYNC DEVICE
   2795	005770	012601 			10$:	MOV	(SP)+,R1	;RESTORE REGISTERS
   2796	005772	012602 				MOV	(SP)+,R2	;AND
   2797	005774					RESMAP			;MAPPING.
   2798	006000				20$:	RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006002	116003 	000044 		CKACK:	MOVB	S.A(R0),R3	;GET NUMBER OF LAST ACK
   2897	006006	116702 	000077'			MOVB	HDR+3,R2	;AND THE NEW RECEIVED ACK.
   2898	006012	120302 				CMPB	R3,R2		;IF THE SAME
   2899	006014	001416 				BEQ	90$		;THEN EXIT FAST
   2900	006016	010446 				MOV	R4,-(SP)	;SAVE A REGISTER
   2901	006020	160302 				SUB	R3,R2		;OTHERWISE GET GET DISTANCE BETWEEN.
   2902	006022	116004 	000043 			MOVB	S.N(R0),R4	;GET HIGHEST MSG # XMTD
   2903	006026	160304 				SUB	R3,R4		;AND THE DISTANCE TO IT.
   2904	006030	120402 				CMPB	R4,R2		;IS ACK WITHIN BOUNDS ?
   2905	006032	103406 				BLO	70$		;EXIT IF NOT IN RANGE
   2906	006034	116760 	000077'	000044 		MOVB	HDR+3,S.A(R0)	;SET NEW ACK NUMBER
   2907	006042					CALL	RTACK		;RETURN AS MANY MESSAGES AS CAN.
   2915	006046	000241 			60$:	CLC			;CLEAR CARRY
   2916	006050	012604 			70$:	MOV	(SP)+,R4	;RESTORE REGISTER
   2917	006052				90$:	RETURN			;AND RETURN TO CALLER.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006054	042711 	005000 		CKREP:	BIC	#SS.REP!SS.TIM,(R1) ;CLEAR TIMER
   2935	006060	105765 	000002 			TSTB	L.STS(R5)	;AND IF FDX PT-PT
   2936	006064	001001 				BNE	10$		;THEN
   2937	006066	105015 				CLRB	(R5)		;CANCEL CLOCK.
   2938	006070	116003 	000043 		10$:	MOVB	S.N(R0),R3
   2939	006074	010346 				MOV	R3,-(SP)
   2940	006076	116002 	000042 			MOVB	S.X(R0),R2
   2941	006102	160203 				SUB	R2,R3		; N-X
   2942	006104	116002 	000044 			MOVB	S.A(R0),R2
   2943	006110	160216 				SUB	R2,(SP)		; N-A
   2944	006112	122603 				CMPB	(SP)+,R3	; N-A : N-X
   2945	006114	101412 				BLOS	90$		;IF N-A > N-X  (A < X)
   2946	006116	105765 	000002 			TSTB	L.STS(R5)	;IF FDX PT-PT
   2947	006122	001005 				BNE	80$		;THEN
   2948	006124	052711 	004000 			BIS	#SS.TIM,(R1)	;SET REP TIMER AND
   2949	006130	116515 	000001 			MOVB	L.ITMO(R5),(R5)	;TURN ON THE CLOCK
   2950	006134	000402 				BR	90$		;OTHERWISE
   2951	006136	052711 	001000 		80$:	BIS	#SS.REP,(R1)	;JUST SET THE REP TIMER FLAG.
   2952	006142				90$:	RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006144	105260 	000045 		10$:	INCB	S.AR(R0)	;THIS MESSAGE IS BEING RETURNED.
   2973	006150	005260 	000070 			INC	S.XMT(R0)	;BUMP THE TRANSMITTED BLOCK COUNTER
   2974	006154	001002 				BNE	20$		;BUT
   2975	006156	005360 	000070 			DEC	S.XMT(R0)	;NOT TOO FAR.
   2976	006162	012703 	000001 		20$:	MOV	#CS.SUC,R3	;SET THE STATUS
   2977	006166					CALL	$XMCMP		;AND RETURN THE BUFFER.
   2978	006172	116760 	000001'	000063 		MOVB	.ERRTH,S.NAKT(R0) ;AND RESET THE NAK THRESHOLD.
   2979
   2980	006200	126060 	000045 	000044 	RTACK:	CMPB	S.AR(R0),S.A(R0) ;IF NOT ALL MESSAGES RETURNED
   2981	006206	001406 				BEQ	30$		;THEN
   2982	006210	010003 				MOV	R0,R3		;GET THE
   2983	006212	062703 	000010 			ADD	#S.TAKQ,R3	;WAITING-FOR-ACK QUEUE
   2984	006216					CALL	$CMQRM		;AND TRY TO GET ONE FOR RETURNING.
   2985	006222	103350 				BCC	10$		;IF NONE AVAILABLE
   2986	006224				30$:	RETURN			;THEN QUIT.
   2987						.DSABL	LSB
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006226	105760 	000050 		TXRTX:	TSTB	S.MOTD(R0)	;ANY MESSAGES OUT TO DRIVER
   3008	006232	001037 				BNE	30$		;YES, SO JUST EXIT FOR NOW
   3009	006234	042711 	002000 			BIC	#SS.RTR,(R1)	;CLEAR THE RETRANSMIT BIT
   3010	006240	005760 	000010 			TST	S.TAKQ(R0)	;ANY THING IN THE ACK QUEUE
   3011	006244	001427 				BEQ	20$		;NO, SO ALL DONE
   3012	006246	016070 	000004 	000012 		MOV	S.PTXQ(R0),@S.TAKQ+2(R0) ;PTX QUEUE TO END OF ACK QUEUE
   3013	006254	001003 				BNE 	10$		;THERE IS A PTX QUEUE
   3014	006256	016060 	000012 	000006 		MOV	S.TAKQ+2(R0),S.PTXQ+2(R0) ;END OF ACK QUEUE TO PTX QUEUE END
   3015	006264	016060 	000010 	000004 	10$:	MOV	S.TAKQ(R0),S.PTXQ(R0) ;UPDATE FRONT OF PTX QUEUE
   3016	006272	005060 	000010 			CLR	S.TAKQ(R0)	;CLEAR	THE HEAD POINTER
   3017	006276	010060 	000012 			MOV	R0,S.TAKQ+2(R0)	;AND RESET
   3018	006302	062760 	000010 	000012 		ADD	#S.TAKQ,S.TAKQ+2(R0) ;THE TAIL POINTER.
   3019	006310	005765 	000026 			TST	L.XMST(R5)	;IF THE TRANSMITTER WAS QUIESCENT
   3020	006314	001003 				BNE	20$		;THEN
   3021	006316	016565 	000014 	000026 		MOV	L.STAL(R5),L.XMST(R5) ;WAKE IT UP.
   3022	006324	116060 	000044 	000041 	20$:	MOVB	S.A(R0),S.TM1(R0) ;RESET MESSAGE NUMBER TO USE.
   3023	006332				30$:	RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006334	010446 			NOTIF:	MOV	R4,-(SP)	;SAVE R4
   3046	006336					CALL	$CCBGT		;ALLOCATE A CCB FOR RETURN
   3047	006342	103413 				BCS	10$		;RETURN C SET IF NONE AVAILABLE
   3048	006344	116564 	000060 	000006 		MOVB	L.LNUM(R5),C.LIN(R4) ;SET LINE NUMBER
   3049	006352	116064 	000016 	000007 		MOVB	S.SLAN(R0),C.STA(R4) ;SET LOGICAL STATION #
   3050	006360	105064 	000011 			CLRB	C.MOD(R4)	;SET ERROR RETURN AS SUBFUNCTION
   3051	006364					CALL	$CTCMP		;QUEUE CCB TO LLC FOR NOTIFICATION
   3052	006370	000241 				CLC			;RETURN SUCCESSFUL
   3053	006372	012604 			10$:	MOV	(SP)+,R4	;RESTORE R4
   3054	006374					RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006376	010246 			SAV31:	MOV	R2,-(SP)	;SAVE R1
   3075	006400	010146 				MOV	R1,-(SP)	;SAVE R2
   3076	006402	010346 				MOV	R3,-(SP)	;PUT CALLER'S ADDR ON STACK
   3077	006404	016603 	000006 			MOV	6(SP),R3	;RESTORE ORIGINAL R3
   3078	006410					CALL	@(SP)+		;CALL CALLER BACK
   3079	006412	012601 				MOV	(SP)+,R1	;RESTORE R2 - R3
   3080	006414	012602 				MOV	(SP)+,R2
   3081	006416	012603 				MOV	(SP)+,R3
   3082	006420					RETURN			;RETURN TO ORIGINAL CALLER
DCPPTP	MACRO M1110  04-FEB-80 14:21  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
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006422					.PSECT	CODE,I
   3148	006422	004367 	177750 		LGRER:	JSR	R3,SAV31	;SAVE R3,R2,R1
   3149	006426	016402 	000012 			MOV	C.STS(R4),R2	;GET RECEIVER STATUS WORD
   3150					;
   3151					; CLEAR ALL BUT BITS THAT CAN BE LOGGED
   3152					;
   3153	006432	012701 	000102'		10$:	MOV	#RERTBL,R1	;GET START OF ERROR CODE TABLE
   3154	006436	012103 			20$:	MOV	(R1)+,R3	;GET ERROR CODE AND OFFSET
   3155	006440	001416 				BEQ	40$		;RETURN IF END OF TABLE
   3156	006442	030221 				BIT	R2,(R1)+	;CHECK FOR THIS TYPE ERROR
   3157	006444	001774 				BEQ	20$		;CHECK NEXT EXTRY IF NO MATCH
   3158	006446	044102 				BIC	-(R1),R2	;CLEAR ERROR FLAG FOR THIS TYPE
   3159	006450	110360 	000051 			MOVB	R3,S.NKRE(R0)	;SET NAK ERROR CODE FOR TRANSMIT
   3160	006454	105003 				CLRB	R3		;CLR LOW BYTE
   3161	006456	000303 				SWAB	R3		;GET OFFSET INTO LOW BYTE
   3162	006460					CALL	LGCTR		;LOG ERROR AND BUMP COUNTER
   3163	006464	032702 	006606 			BIT	#VLCSER,R2	;ALL ERRORS LOGGED FOR THIS RECEIVE?
   3164	006470	001360 				BNE	10$		;CONTINUE LOGGING IF MORE
   3165	006472					CALL	TRETH		;UPDATE THE RECEIVE ERROR THRESHOLD
   3166	006476	122760 	000006 	000002 	40$:	CMPB	#SS.RUN,S.STS(R0) ;IS LINE UP
   3167	006504	001012 				BNE	100$		;NO, SO DON'T SEND NAK
   3168	006506	152760 	000004 	000020 		BISB	#SE.SNK,S.STE(R0) ;MARK TO SEND NAK
   3169	006514	142760 	000020 	000020 		BICB	#SE.SAK,S.STE(R0) ;CANCEL ANY PENDING ACKS
   3170	006522	010446 				MOV	R4,-(SP)	;SAVE OFFENDING CCB/BUFFER
   3171	006524					CALL	TXSND		;AND TRY TO SEND THE NAK
   3172	006530	012604 				MOV	(SP)+,R4
   3173	006532				100$:	RETURN			;RETURN TO CALLER
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006534	004367 	177636 		LGNAK:	JSR	R3,SAV31	;SAVE R3,R2,R1
   3195	006540	010302 				MOV	R3,R2		;COPY RECEIVED NAK CODE
   3196	006542	012701 	000134'			MOV	#NAKTBL,R1	;POINT TO NAK CODE TABLE
   3197	006546	112103 			10$:	MOVB	(R1)+,R3	;GET OFFSET FOR NEXT CODE
   3198	006550	001410 				BEQ	LGRET		;IGNORE CODE IF NOT IN TABLE
   3199	006552	122102 				CMPB	(R1)+,R2	;RECEIVED NAK OF THIS CODE?
   3200	006554	001374 				BNE	10$		;CHECK NEXT ENTRY IF NOT
   3201	006556					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	006556	010346 			LGCTR:	MOV	R3,-(SP)	;SAVE CODE VALUE
   3221	006560	060003 				ADD	R0,R3		;POINT TO COUNTER FOR THIS CODE
   3222	006562	105213 				INCB	(R3)		;INC COUNTER
   3223	006564	001001 				BNE	20$		;BR IF NO OVERFLOW
   3224	006566	105313 				DECB	(R3)		;DON'T INC PAST 377
   3225	006570	012603 			20$:	MOV	(SP)+,R3	;RESTORE CODE VALUE
   3229	006572				LGRET:	RETURN
DCPPTP	MACRO M1110  04-FEB-80 14:21  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
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006574	004367 	000034 		TSTTH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3288	006600	000063 				S.NAKT			;OFFSET INTO STATION TABLE
   3289	006602	100361 				CE.NTE			;AND REASON CODE.
   3290
   3291	006604	004367 	000024 		TNKTH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3292	006610	000063 				S.NAKT			;OFFSET INTO STATION TABLE
   3293	006612	100361 				CE.NTE			;AND REASON CODE.
   3294
   3295	006614	004367 	000014 		TRETH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3296	006620	000061 				S.RETH			;OFFSET INTO STATION TABLE
   3297	006622	100376 				CE.RTE			;AND REASON CODE.
   3298
   3299	006624	004367 	000004 		TRPTH:	JSR	R3,THRESH	;CALL COMMON ROUTINE
   3300	006630	000062 				S.RPTH			;OFFSET INTO STATION TABLE
   3301	006632	100374 				CE.TMO			;AND REASON CODE.
   3302					;
   3303					; COMMON THRESHOLD HANDLER
   3304					;
   3305	006634	010246 			THRESH:	MOV	R2,-(SP)	;SAVE R2
   3306	006636	012302 				MOV	(R3)+,R2	;AND PICK UP
   3307	006640	060002 				ADD	R0,R2		;COUNTER ADDRESS.
   3308	006642	000241 				CLC			;(INSURE CARRY IS OFF)
   3309	006644	105312 				DECB	(R2)		;COUNT IT OUT
   3310	006646	003002 				BGT	40$		;AND RETURN IF STILL ROOM.
   3311	006650	001404 				BEQ	60$		;IF BEYOND THE PAIL THEN
   3312	006652	105212 			30$:	INCB	(R2)		;BACK THE COUNTER OFF.
   3313	006654	012602 			40$:	MOV	(SP)+,R2	;RECOVER REGISTERS
   3314	006656	012603 				MOV	(SP)+,R3
   3315	006660					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	006662	116767 	000001'	000020'	60$:	MOVB	.ERRTH,PSTA	;SET THE THRESHOLD
   3322	006670	011303 				MOV	(R3),R3		;AND GET THE ERROR CODE.
   3323	006672					CALL	LOGGIT		;DO THE LOGGING
   3324	006676					CALL	NOTIF		;AND NOTIFY THE HLP.
   3325	006702	103763 				BCS	30$		;SET TO TRY AGAIN IF COULDN'T DO.
   3326	006704	122760 	000006 	000002 		CMPB	#SS.RUN,S.STS(R0) ;IF IN RUN STATE
   3327	006712	000241 				CLC			;(INSURE CARRY IS OFF)
   3328	006714	001357 				BNE	40$		;THEN
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 60-1
T**TH	- THRESHOLD COUNTERS

   3329	006716	116712 	000001'			MOVB	.ERRTH,(R2)	;RESET COUNTER FOR MORE
   3330	006722	000754 				BR	40$		;AND RETURN.
DCPPTP	MACRO M1110  04-FEB-80 14:21  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	006724	016567 	000042 	000000'	LOGGIT:	MOV	L.LOGG(R5),PDST	;SET THE LOGGING DESTINATION
   3350	006732	001430 				BEQ	10$		;WE AREN'T ENABLED
   3351	006734	010046 				MOV	R0,-(SP)	;SAVE A COUPLE OF REGS
   3352	006736	010146 				MOV	R1,-(SP)	; ...
   3353	006740	110367 	000002'			MOVB	R3,PRSN		;SET THE REASON CODE
   3354	006744	116567 	000060 	000004'		MOVB	L.LNUM(R5),PLIN	;    THE LINE #
   3355	006752	116067 	000016 	000005'		MOVB	S.SLAN(R0),PSTN	;        STATION #
   3356	006760	005001 				CLR	R1		;SET UP TO REMEMBER THE THRESHOLD
   3357	006762	156701 	000020'			BISB	PSTA,R1		;  AS A BYTE
   3358	006766	012700 	000000'			MOV	#PDST,R0	;POINT TO ARG BLOCK
   3359	006772					CALL	$CMLOG		;LOG IT >>>ENTER COROUTINE
   3360	006776	103404 				BCS	5$			;>>>$CMLOG POINTS R2 AT MESSAGE BUFFER
   3361	007000	012722 				MOV	(PC)+,(R2)+		;>>>SET THE DATA CODE AND
   3362	007002	   015 	   002 			 .BYTE	E$DTHR,2		;>>>  DATA LENGTH
   3363	007004	010122 				MOV	R1,(R2)+		;>>>SET THE THRESHOLD
   3364	007006					CALL	@(SP)+		;BACK TO $CMLOG TO FINISH >>>EXIT COROUTINE
   3365	007010	012601 			5$:	MOV	(SP)+,R1	;RESTORE THE REGS WE USED
   3366	007012	012600 				MOV	(SP)+,R0	; ...
   3367	007014				10$:	RETURN			;ALL DONE
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 63
LOGGIT	- EVENT LOGGER

   3489
   3490		000001 				.END
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 63-1
SYMBOL TABLE

A$$CHK= 000000   	CS.HFE= 002000   	E$DLPC= 000013   	FE.EXV= 000004   	LI.BAB= 000000 G
A$$CPS= 000000   	CS.LST= 040000   	E$DMCD= 000012   	FE.LSI= 000400   	LI.DED= 000000 G
A$$PRI= 000000   	CS.MTL= 004000   	E$DNOD= 000011   	FE.MUP= 000002   	LI.MSG= 000000 G
A$$TRP= 000000   	CS.RNG= 000010   	E$DOSI= 000010   	FE.MXT= 040000   	LI.PDL= 000000 G
BLACK   000702R     003	CS.ROV= 000004   	E$DREC= 000007   	FE.NLG= 100000   	LI.STS= 000000 G
BLCTL   000556R     003	CS.RSN= 010000   	E$DREG= 000001   	FE.PKT= 000100   	LI.UPD= 000000 G
BLDAT   000714R     003	CS.SUC= 000001   	E$DRSN= 000006   	FE.PLA= 000020   	LOGGIT  006724R     003
BLLTH   001066R     003	CS.TMO= 020000   	E$DTHR= 000015   	FS.AST= 000000   	LS.CTL= 020000 G
BLMOP   001002R     003	CTLDIS  001560R     003	E$DTIM= 000002   	FS.CIB= 002000   	LS.HDX= 000002 G
BLNAK   000664R     003	CTLDSP  001462R     003	E$DTPC= 000014   	FS.CRA= 001000   	LS.LEN= 000400 G
BLREP   000634R     003	CTLENB  001526R     003	E$DTXT= 000016   	FS.DIS= 013000   	LS.MPM= 000004 G
BLSTK   000614R     003	CTLMNT  001612R     003	E$DUPT= 000004   	FS.DVC= 001000   	LS.MPS= 000010 G
BLSTR   000614R     003	CTLSTP  002316R     003	E$RABO= 000017   	FS.ENB= 012000   	LS.MPT= 000014
BLSYN   001042R     003	CTLSTR  001646R     003	E$RCRC= 000023   	FS.GET= 006000   	LS.PDD= 001000 G
CALTH   001246R     003	CTLTB   000050R     002	E$RDSC= 000005   	FS.INI= 000000   	LS.RSA= 040000 G
CB.CCB= 000002   	C$$CKP= 000000   	E$RFRM= 000024   	FS.KIL= 000000   	LS.RSN= 100000 G
CB.RDB= 000004   	C$$ORE= 000400   	E$RHFE= 000016   	FS.LTM= 001000   	L$$ASG= 000000
CCBSET  001110R     003	C$$RSH= 177564   	E$RLIN= 000003   	FS.MNT= 004000   	L$$DRV= 000000
CCMPTB  000060R  	C.BID   000003   	E$RMOP= 000014   	FS.MSN= 014000   	L$$P11= 000001
CCPAST  001514R     003	C.BUF   000014   	E$RMTL= 000013   	FS.RNG= 011000   	L$$11R= 000000
CCPENB  001542R     003	C.BUF1  000014   	E$RNAK= 000032   	FS.RTN= 001000   	L.ACST  000022 G
CCPNOP  001512R     003	C.BUF2  000024   	E$RNXM= 000002   	FS.SET= 005000   	L.BABI  000057 G
CCPSTP  002500R     003	C.CNT   000020   	E$ROVR= 000012   	FS.STM= 000000   	L.BABT  000052 G
CCPSTR  001742R     003	C.CNT1  000020   	E$RPEC= 000022   	FS.STP= 002000   	L.CHAR  000036 G
CDISP   000030R  	C.CNT2  000030   	E$RPEM= 000021   	FS.STR= 001000   	L.CRC   000032 G
CE.ABO= 100362   	C.FLG   000022   	E$RPET= 000020   	FS.TRM= 003000   	L.CRST  000020 G
CE.DIS= 100366   	C.FLG1  000022   	E$RPRC= 000025   	FS.XKL= 002000   	L.CTMO  000000 G
CE.ERR= 100370   	C.FLG2  000032   	E$RPWF= 000007   	FS.XOF= 010000   	L.DDST  000024 G
CE.MOP= 100372   	C.FNC   000010   	E$RPWR= 000010   	FS.XON= 007000   	L.DEDI  000055 G
CE.NTE= 100361   	C.LIN   000006   	E$RRET= 000031   	F$$LVL= 000001   	L.DEDT  000046 G
CE.RTE= 100376   	C.LNK   000000   	E$RRTE= 000011   	G$$TPP= 000000   	L.ENA   000063 G
CE.SRC= 100364   	C.MOD   000011   	E$RRTO= 000006   	G$$TSS= 000000   	L.FCNL  000010 G
CE.TMO= 100374   	C.NSP   000004   	E$RSEL= 000030   	G$$TTK= 000000   	L.HDR   000030 G
CF.EOM= 000004   	C.RSV   000002   	E$RSIN= 000004   	G$$WRD= 000000   	L.ITMO  000001 G
CF.HDR= 000020   	C.STA   000007   	E$RSRC= 000015   	HALTFN  002446R     003	L.LNUM  000060 G
CF.LB = 100000   	C.STS   000012   	E$RTRN= 000026   	HDR     000074R     002	L.LOGG  000042 G
CF.SOM= 000010   	DCPCCP  001406R     003	E$RUCL= 000001   	I$$RAR= 000000   	L.MOTD  000062 G
CF.SYN= 000040   	DCPCTL  001316R     003	E$RXTO= 000027   	I$$RDN= 000000   	L.NAST  000064 G
CF.TRN= 000100   	DCPKCP  003054R     003	E$TASC= 000001   	KDSAR0= 172360   	L.NDED  000065 G
CKACK   006002R     003	DCPRCP  004102R     003	E$TASX= 000002   	KDSDR0= 172320   	L.NMSG  000061 G
CKCRC   005660R     003	DCPTIM  003066R     003	E$THDW= 000003   	KISAR0= 172340   	L.PDLI  000056 G
CKREP   006054R     003	DCPXCP  003402R     003	E$TSFT= 000004   	KISAR5= 172352   	L.PDLT  000050 G
CLNLIN  002620R     003	DCPXME  000000R     003	E$TTOP= 000005   	KISAR6= 172354   	L.STAL  000014 G
CLNSTA  002712R     003	DDCFN2  001424R     003	E$$XPR= 000000   	KISAR7= 172356   	L.STBL  000066 G
CMODE = 140000   	DD.QSN= 000100   	FC.CCP= 000020   	KISDR0= 172300   	L.STS   000002 G
CM.DLE= 000220   	DD.SEL= 000200   	FC.CTL= 000006   	KISDR6= 172314   	L.TDNQ  000004 G
CM.ENQ= 000005   	DVRSN   002774R     003	FC.KCP= 000016   	KISDR7= 172316   	L.UPDI  000054 G
CM.SOH= 000201   	D$$BUG= 177514   	FC.KIL= 000004   	K$$CNT= 177546   	L.UPDT  000044 G
CM.SYN= 000226   	D$$ISK= 000000   	FC.RCE= 000002   	K$$CSR= 177546   	L.XMST  000026 G
CS.ABO= 000100   	D$$L11= 000001   	FC.RCP= 000014   	K$$LDC= 000000   	MPAR  = 172100
CS.BUF= 000200   	D$$YNC= 000000   	FC.TIM= 000010   	K$$TPS= 000074   	MPCSR = 177746
CS.DCR= 000400   	D$$YNM= 000000   	FC.XCP= 000012   	LD$LP = 000000   	MSGBAD  004376R     003
CS.DEV= 000002   	ENDPRO  005544R     003	FC.XME= 000000   	LGCTR   006556R     003	MSGCTL  004304R     003
CS.DIS= 000040   	ERRTB   000022R     002	FE.CAL= 000040   	LGDAT = 000004   	MSGDAT  005144R     003
CS.ENB= 000020   	ERRTBL= 000006   	FE.DRV= 000010   	LGNAK   006534R     003	MSGHFE  004350R     003
CS.EOF= 000001   	E$DDAT= 000003   	FE.EXP= 000200   	LGRER   006422R     003	MSGMOP  005312R     003
CS.ERR= 100000   	E$DDEV= 000005   	FE.EXT= 000001   	LGRET   006572R     003	MSGNOP  004402R     003
DCPPTP	MACRO M1110  04-FEB-80 14:21  PAGE 63-2
SYMBOL TABLE

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

. ABS.	000074	   000
      	000112	   001
DATA  	000154	   002
CODE  	007016	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  12759 WORDS  ( 50 PAGES)
DYNAMIC MEMORY:  14284 WORDS  ( 54 PAGES)
ELAPSED TIME:  00:03:06
DCPPTP,[131,34]DCPPTP/CR/-SP=[130,10]NETLIB/ML,RSXMC4/PA:1,[131,10]P,DCP
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 1
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
BLACK 	  000702 R	 14-706    #15-745    
BLCTL 	  000556 R	 12-493     12-499     12-527    #14-680    
BLDAT 	  000714 R	 13-652    #16-769    
BLLTH 	  001066 R	 16-771     17-807    #18-849    
BLMOP 	  001002 R	 12-536    #17-805    
BLNAK 	  000664 R	 14-702    #15-738    
BLREP 	  000634 R	 14-704    #15-727    
BLSTK 	  000614 R	 14-698    #15-717    
BLSTR 	  000614 R	 14-700    #15-713    
BLSYN 	  001042 R	 12-623     15-730     15-741     17-811    #18-829    
CALTH 	  001246 R	 18-851    #20-937    
CCBSET	  001110 R	 14-681     16-769     17-805    #19-889    
CCMPTB	  000060 R	#10-346     21-1035   
CCPAST	  001514 R	 10-347    #22-1086   
CCPENB	  001542 R	 10-357    #23-1140   
CCPNOP	  001512 R	 10-358     21-1036    21-1048   #21-1063   
CCPSTP	  002500 R	 10-349    #29-1532   
CCPSTR	  001742 R	 10-348    #26-1257   
CDISP 	  000030 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 	  006002 R	 44-2562    44-2573    45-2659   #50-2896   
CKCRC 	  005660 R	 40-2431   #48-2778   
CKREP 	  006054 R	 44-2565    45-2662   #51-2934   
CLNLIN	  002620 R	 26-1281    29-1535   #30-1577   
CLNSTA	  002712 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     
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	  001560 R	 10-341    #24-1169   
CTLDSP	  001462 R	 21-1021   #21-1055    44-2622    46-2701   
CTLENB	  001526 R	 10-340    #23-1113   
CTLMNT	  001612 R	 10-334    #25-1205    29-1550   
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 2
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
CTLSTP	  002316 R	 10-332     25-1214   #29-1489   
CTLSTR	  001646 R	 10-331    #26-1239    29-1547   
CTLTB 	  000050 R	 14-683    #14-697    
C$$MPS	= ******	 33-1769   
C$$MPT	= ******	 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    *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    *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   
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	  001406 R	 10-324    #21-1031   
DCPCTL	  001316 R	 10-319    #21-975    
DCPKCP	  003054 R	 10-323     32-1682   #32-1702   
DCPRCP	  004102 R	 10-322    #39-2367   
DCPTIM	  003066 R	 10-320    #33-1768   
DCPXCP	  003402 R	 10-321    #38-2148   
DCPXME	  000000 R	 10-316    #11-390    
DDCFN2	  001424 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 	  002774 R	#32-1672    33-1833    34-1883    48-2794   
ENDPRO	  005544 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    
FC.RCE	= 000002	 10-317    
FC.RCP	= 000014	 10-322    
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 3
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
FC.TIM	= 000010	 10-320    
FC.XCP	= 000012	 10-321    
FC.XME	= 000000	 10-316    
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    
HALTFN	  002446 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   #39-2364   
                        *39-2370   *39-2371   *39-2372    40-2423    42-2496    42-2505    42-2514    44-2579    44-2583   
                         44-2591    45-2645    45-2657   *46-2709    47-2751    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 	  006556 R	 15-733     44-2598    57-3162    58-3201   #58-3220   
LGDAT 	= 000004	#9-289      9-292     
LGNAK 	  006534 R	 44-2581   #58-3194   
LGRER 	  006422 R	 39-2390    45-2673    46-2712   #57-3148   
LGRET 	  006572 R	 58-3198   #58-3229   
LI.BAB	= 000000  G	#8-214     
LI.DED	= 000000  G	#8-211     
LI.MSG	= 000000  G	#8-215     
LI.PDL	= 000000  G	#8-213     
LI.STS	= 000000  G	#8-204     
LI.UPD	= 000000  G	#8-210     
LOGGIT	  006724 R	 44-2609    46-2692    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-581     27-1335    36-2021    38-2178    47-2740   
LS.LEN	= 000400  G	#6-143      12-448     12-584     27-1304    36-1995   
LS.MPM	= 000004  G	#6-143      7-150      7-196     
LS.MPS	= 000010  G	#6-143      7-150      7-197      47-2753   
LS.MPT	= 000014	#7-150     
LS.PDD	= 001000  G	#6-143     
LS.RSA	= 040000  G	#6-143      32-1672    32-1677    32-1702   
LS.RSN	= 100000  G	#6-143      32-1677    39-2379   
L.ACST	  000022  G	#6-143     
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-1328    27-1333   
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 4
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
L.CRC 	  000032  G	#6-143      48-2789   
L.CRST	  000020  G	#6-143      12-457    *27-1305    29-1507    33-1770    39-2380    47-2755   *47-2757   
L.CTMO	  000000  G	#6-143     
L.DDST	  000024  G	#6-143     
L.DEDI	  000055  G	#6-143     
L.DEDT	  000046  G	#6-143     
L.ENA 	  000063  G	#6-143     
L.FCNL	  000010  G	#6-143      21-993     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     13-648    *16-787    *17-812    *27-1312   *38-2193   
L.NAST	  000064  G	#6-143      26-1250   *26-1261   *29-1525   
L.NDED	  000065  G	#6-143     
L.NMSG	  000061  G	#6-143      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-390     21-1031    21-1055    53-3021   
L.STBL	  000066  G	#6-143     
L.STS 	  000002  G	#6-143      7-194      12-448     12-581    *12-584     21-1020   *21-1040   *21-1060   *27-1304   
                        *27-1315   *27-1335   *29-1498    32-1672   *32-1677   *32-1702    33-1819    33-1824   *36-1995   
                         36-2021    38-2175    39-2375   *39-2379    43-2527    44-2576    47-2737    51-2935    51-2946   
L.TDNQ	  000004  G	#6-143      38-2149   
L.UPDI	  000054  G	#6-143     
L.UPDT	  000044  G	#6-143     
L.XMST	  000026  G	#6-143      53-3019   *53-3021   
MSGBAD	  004376 R	#41-2476    42-2519    42-2521    44-2563    44-2574   
MSGCTL	  004304 R	 40-2428   #41-2454   
MSGDAT	  005144 R	 40-2434   #45-2636   
MSGHFE	  004350 R	#41-2472    44-2550    44-2554    44-2555   
MSGMOP	  005312 R	 40-2435   #46-2681   
MSGNOP	  004402 R	 41-2469   #41-2477   
MSGOK 	  004234 R	 39-2385    39-2387   #40-2423   
MSGRUN	  004636 R	 41-2468   #44-2548   
MSGSTR	  004404 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     
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 	  006334 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     
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 5
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
PRSN  	  000002 R	#9-292     *61-3353   
PSTA  	  000020 R	#9-292     *44-2608   *46-2691   *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 	  006200 R	 38-2214    50-2907   #52-2980   
R$$11D	= ******	 5-122      9-258     
SAV31 	  006376 R	 12-450    #55-3074    57-3148    58-3194   
SELND 	  003222 R	 33-1820    33-1834    34-1884   #36-1967    47-2760   
SETLIN	  002044 R	 26-1252   #27-1303   
SETRUN	  004540 R	 42-2508    42-2515   #43-2526    45-2647   
SETSTA	  002262 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	  005444 R	 45-2671    46-2711   #46-2718   
SP.PLA	= 000010  G	#6-143     
SP.PLD	= 000002  G	#6-143     
SP.PLI	= 000006  G	#6-143     
SP.PLO	= 000000  G	#6-143      8-218     
SP.PLP	= 000004  G	#6-143     
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-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-476     26-1282    29-1500    33-1810    36-1981    39-2388    41-2465   
                         45-2638    46-2683   
SS.IST	= 000002  G	#6-143      12-478     26-1265    33-1811    36-1982    41-2466    42-2516    45-2639    46-2684   
SS.MNT	= 000010  G	#6-143      12-481     12-575     25-1207    26-1262    33-1814    36-1985    36-2001    38-2176   
                         41-2469    45-2642    46-2687    47-2738   
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 6
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
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     28-1412    29-1499    38-2249    44-2585    53-3009   
SS.RUN	= 000006  G	#6-143      12-480     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    29-1509    34-1865    36-1996    36-2026    47-2756   
SS.SHU	= 020000  G	#6-143      12-506     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    50-2896   *50-2906    51-2942    52-2980    53-3022   
S.AI  	  000033  G	#6-143     
S.AQ  	  000032  G	#6-143     
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     
S.II  	  000031  G	#6-143     
S.IQ  	  000030  G	#6-143     
S.LNK 	  000000  G	#6-143     
S.MOTD	  000050  G	#6-143     *19-912     29-1518   *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     
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     
S.PI  	  000027  G	#6-143     
S.PLS 	  000021  G	#6-143     
S.PQ  	  000026  G	#6-143     
S.PTXQ	  000004  G	#6-143      11-397     12-533     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-2654   *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   
S.SPAN	  000017  G	#6-143      19-907    
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   
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 7
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
S.STS 	  000002  G	#6-143      7-198      11-392    *15-720    *26-1282   *34-1865   *36-2026    39-2383   *47-2756   
                         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     
S.THI 	  000034  G	#6-143     
S.THP 	  000035  G	#6-143     
S.TIM 	  000064  G	#6-143     
S.TMOE	  000053  G	#6-143      9-305     
S.TM1 	  000041  G	#6-143      16-773    *16-776     16-777     44-2583   *53-3022   
S.U   	  000022  G	#6-143     
S.X   	  000042  G	#6-143     *38-2219    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	  006634 R	 60-3287    60-3291    60-3295    60-3299   #60-3305   
TIMLTM	  003102 R	 33-1774   #33-1781   
TIMSTM	  003156 R	 33-1773   #34-1848   
TM.BAB	= 000004	#7-156      27-1378    34-1857   
TM.DED	= 000002	#7-155      34-1855   
TM.PDL	= 000000	#7-154      27-1372    34-1851   
TM.UPD	= 000006	#7-157     
TNKTH 	  006604 R	 15-734     44-2582   #60-3291   
TOSS  	  004230 R	 39-2378    39-2381    39-2389   #39-2391    40-2426   
TRETH 	  006614 R	 41-2475    44-2596    57-3165   #60-3295   
TRPTH 	  006624 R	 33-1826    34-1881   #60-3299   
TSTTH 	  006574 R	 15-721    #60-3287   
TXCNT 	  000046 R	#12-440    *12-456    *12-461    *13-654    *16-785    
TXDAT 	  000502 R	 12-508    #13-646    
TXLST 	  000044 R	#12-439     12-515     12-563    *12-626     18-829     19-908    *19-909    
TXQUE 	  000040 R	#12-438     12-621    *12-624     12-625    *12-625     19-910    
TXRTX 	  006226 R	 38-2251    44-2586   #53-3007   
TXSND 	  000052 R	 11-410    #12-446     26-1277    34-1866    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-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-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-1604    30-1610    36-1971   
$CTCMP	= ******  GX	 21-1003    21-1044    22-1089    29-1505    43-2541    54-3051   
$DCPTB	  000006 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   
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 8
SYMBOL CROSS REFERENCE                                  CREF         
SYMBOL	VALUE		REFERENCES
$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	 36-2027    38-2315   
$STCRC	= ******  GX	 48-2789   
$XMCMP	= ******  GX	 11-414     31-1641    31-1649    38-2206    52-2977   
$$TABG	= 005566 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-476     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-1809    33-1810   
                         33-1811    33-1812    33-1813    33-1814   #34-1850    34-1851    34-1855    34-1857   #36-1980   
                         36-1981    36-1982    36-1983    36-1984    36-1985   #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   
.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    
.SIMSG	  000004 RG	#8-240      28-1427   
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 9
MACRO CROSS REFERENCE                                   CREF         
MACRO NAME	REFERENCES
CALL  		 11-398     12-493     12-499     12-508     12-527     12-534     12-536     12-542     12-623     12-627    
                 13-650     13-652     13-659     15-730     15-733     16-771     17-807     17-811     18-851     19-892    
                 19-906     19-911     21-996     21-1003    21-1035    21-1044    21-1047    21-1061    23-1119    26-1252   
                 26-1254    26-1259    26-1277    26-1281    27-1383    29-1495    29-1505    29-1513    29-1524    29-1529   
                 29-1535    29-1557    30-1585    30-1604    30-1605    30-1610    30-1611    31-1638    31-1641    31-1646   
                 31-1649    32-1675    32-1680    32-1682    33-1826    33-1833    34-1881    34-1883    36-1971    36-2027   
                 38-2163    38-2164    38-2179    38-2206    38-2213    38-2214    38-2251    38-2315    38-2329    38-2331   
                 39-2390    40-2431    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-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    50-2907   
                 52-2977    52-2984    54-3046    54-3051    55-3078    57-3162    57-3165    57-3171    60-3323    60-3324   
                 61-3359    61-3364   
CALLR 		#11-414    #15-721    #15-734    #15-741    #21-1024   #22-1089   #24-1176   #25-1214   #32-1703   #34-1866   
                #34-1884   #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-476    #12-478    #12-479    #12-480    #12-481    
                #29-1546   #29-1547   #29-1548   #29-1549   #29-1550   #33-1773   #33-1774   #33-1810   #33-1811   #33-1812   
                #33-1813   #33-1814   #34-1851   #34-1855   #34-1857   #36-1981   #36-1982   #36-1983   #36-1984   #36-1985   
                #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   
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-476     12-478     12-479     12-480     12-481    
                 29-1546    29-1547    29-1548    29-1549    29-1550    33-1773    33-1774    33-1810    33-1811    33-1812   
                 33-1813    33-1814    34-1851    34-1855    34-1857    36-1981    36-1982    36-1983    36-1984    36-1985   
                 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   
DSPBEG		#5-106      10-315     10-329     10-346     12-472     29-1545    33-1772    33-1809    34-1850    36-1980   
                 41-2464    42-2483    44-2549    45-2637    46-2682    47-2742   
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-476    #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-1809   #33-1810   #33-1811   #33-1812   #33-1813   #33-1814   #34-1850   #34-1851   
                #34-1855   #34-1857   #36-1980   #36-1981   #36-1982   #36-1983   #36-1984   #36-1985   #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   
DSPEND		#5-120     #10-325    #10-342    #10-360    #12-482    #29-1551   #33-1775   #33-1815   #34-1861   #36-1986   
                #41-2470   #42-2492   #44-2558   #45-2643   #46-2688   #47-2749   
EVLDF$		#6-141      9-285     
DCPPTP     CREATED BY  MACRO  ON 4-FEB-80 AT 14:22	PAGE 10
MACRO CROSS REFERENCE                                   CREF         
MACRO NAME	REFERENCES
FALLR 		#5-82      #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		 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-1460    29-1522   
                 29-1555    29-1559    30-1615    31-1653    32-1684    33-1843    38-2340    41-2477    42-2501    43-2543   
                 44-2602    44-2623    44-2628    46-2702    48-2798    50-2917    51-2952    52-2986    53-3023    54-3054   
                 55-3082    57-3173    58-3229    60-3315    61-3367   
SAVMAP		#6-141     #39-2367   #48-2780   
SOB   		#26-1244   
$LIBCM		#6-140     #48-2789   
$LIBCN		#6-140