	.title	k11lcl	do things for site specific stuff

	.include	/IN:K11MAC.MAC/

	.psect	$code


;	18-Jan-84  11:27:39  Brian Nelson




	.sbttl	okuser


;	input:	2(sp)	address of an  .asciz string  containing  the first
;			three (3) characters of the current command name.
;	output:	nothing
;
;	You have the option (see K11CMD.MAC for the $NAME macro) of  either
;	doing a  MOV (SP)+,@SP   and a RETURN (accepting the command) or of
;	doing a  CMP (SP)+,(SP)+ and a RETURN (rejecting the command).
;

	.iif ndf,toledo, toledo = 0



	.if eq	,toledo
	.ift				; not for university of toledo

okuser::mov	(sp)+	,@sp		; allow the command
	return

	.iff				; for our system

okuser::mov	2(sp)	,r0
	calls	instr	,<#120$,#12.,r0,#3>
	dec	r0			; convert to 0..pos-1
	bmi	100$			; not found in list
	mov	r0	,r1		; insure position is mod 3
	clr	r0			; thus, (position-1) mod 3 = 0
	div	#3	,r0		; do it
	tst	r1			; if any remainder, then we did
	bne	100$			; not really find it.
	call	getuic			; get the ppn
	cmpb	r0	,#200		; so-called 'student account' ?
	blo	100$			; no
	print	#130$			; a match, disallow the command
	cmp	(sp)+	,(sp)+
	return
100$:	mov	(sp)+	,@sp
	return

120$:	.asciz	/DIRRENERADEL/		; further checking for DIR,DEL,ERA,REN
130$:	.asciz	/Access not allowed to this command/<cr><lf>
	.even

	global	<getuic>

	.endc


	.end
