 
;
; A SYSTEM MESSAGE WAS RECEIVED INSTEAD OF A COMMAND
;
 
MSG:	CMPB	#CM.LKT,G.CCUN(R0) ;IS IT A NEW TERMINAL LINKED TO US?
	BEQ	10$		;IF EQ YES
	CMPB	#CM.RMT,G.CCUN(R0) ;IS IT A TERMINAL BEING REMOVED
	BEQ	20$		;IF EQ YES
	CMPB	#CM.EXT,G.CCUN(R0) ;IS IT A ELIMINATE ALL PACKET
	BEQ	50$		;IF EQ YES
	CMPB	#CM.ELM,G.CCUN(R0) ;IS IT A CLI ELIMINATION MESSAGE
	BEQ	50$		;IF EQ YES
	BR	START		;IGNORE ALL OTHER MESSAGES
;
; ISSUE WELCOME MESSAGE
;
10$:	MOV	#LKT,R1		;POINT TO MESSAGE TEXT
	MOV	#LKTLEN,R2	;GET LENGTH
	ADD	#G.CCBF,R0	;POINT TO TERMINAL THAT WAS SET
	BR	30$		;
 
;
; ISSUE GOOD BYE MESSAGE
;
20$:	MOV	#RMT,R1		;POINT TO MESSAGE TEXT
	MOV	#RMTLEN,R2	;GET LENGTH
	ADD	#G.CCBF,R0	;POINT TO TERMINAL NAME
30$:	CALL	ISSMSG		;ISSUE MESSAGE
	JMP	START		;GET NEXT COMMAND
;
; WHEN AN ELIMINATE ALL MESSAGE IS RECEIVED, EXIT IMMEDIATELY
;
50$:	EXIT$S
 
;
