From:	CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  3-DEC-1988 18:06
To:	MRGATE::"ARISIA::EVERHART"
Subj:	RE: setting BROADCAST classes from within a program


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Wed, 30 NOV 88 17:33:11 PDT
Received: from mis.arizona.edu ([128.196.3.12]) by KL.SRI.COM with TCP; Wed, 30 Nov 88 17:09:10 PST
Received: by mis.arizona.edu id <214000C63B1@mis.arizona.edu> ;
       Wed, 30 Nov 88 18:08:12 MST
Date: Wed, 30 Nov 88 18:03:48 MST
From: Unix System V : Usability was not a goal. <JMS@mis.arizona.edu>
Subject: RE: setting BROADCAST classes from within a program
To: info-vax@kl.sri.com
X-VMS-Mail-To: EXOS%"info-vax@kl.sri.com"
Message-ID: <881130180348.214000C63B1@mis.arizona.edu>

Ted Nieland - SRL <@WPAFB-AAMRL.ARPA:TNIELAND@FALCON>" writes:

>Does anyone know how to set BROADCAST classes from within a program?
>I know how to turn off ALL broadcast messages using QIO and the terminal 
>driver, but I just want to turn off selected classes (most PHONE).  

Joel Snyder writes:

	.title ted

	$SSDEF
	$BRKDEF	
	$QIODEF

	.macro	errorck,?l1
	blbs	r0,l1
	$exit_s	code = r0
l1:
	.endm	errorck

	.PSECT RWDATA,WRT,NOEXE,NOSHR,LONG

brdbit:	.blkb	8			; 8 bytes, 4 for DEC, 4 for us

inpchn:	.blkw	1			; input channel
inpdev:	.long	63			; input translated device
	.address inpnam			;  and location
inpnam:	.blkb	63			; name of input device
inpdes:		.ascid	/SYS$INPUT/	; input logical name descriptor

	.PSECT	CODE,EXE,RD,NOWRT
					
	.entry  ted,^m<>
	$trnlog_s	lognam=inpdes,-	;translate for tty.
			rsllen=inpdev,-
			rslbuf=inpdev
	errorck
	cmpb	inpnam,#^x1b		; if has an escape, then
	bneq	10$			; is a terminal. Translate
	subw	#4,inpdev		;reduce size
	addw	#4,inpdev+4		;increment descriptor pointer

10$:	$assign_s	devnam=inpdev,-	; assign the device
			chan=inpchn
	errorck

	insv	#1,#BRK$C_MAIL,#1,brdbit

	$qiow_s	chan=inpchn,-		;read current value
		func=#io$_setmode!io$m_brdcst,-
		p1=brdbit,-
		p2=#8
	errorck
	$dassgn_s	-			; deassign the pty
		chan=inpchn
	errorck
	ret

	.end	ted


jms

	TTCALL	3,[ASCIZ /
Joel M Snyder, Univ of Arizona Dep't of MIS, Tucson, AZ, 85721  
BITNET: jms@arizmis  Internet: jms@mis.arizona.edu Phone: 602.621.2748 /]



