	.even
/"loc" subroutine handles printing and substituting of
/   job folder location field
/
loc:
	mov	r1,-(sp)		/save regs
	mov	r2,-(sp)
	tst	token2			/"/" present?
	bne	0f
	mov	$1,r0
	sys	write; j.loc; 2		/write location
	br	9f
0:
	tst	token3			/"*" present?
	beq	1f			/branch if no
	clr	j.loc			/null-out location field
	movb	$1,cflag		/set core changed
	br	9f
1:
	mov	token2,r0
	add	$3,r0
	cmp	r0,lastchar
	bne	8f			/branch if supplied loc field
					/not exactly 2 chars long
	movb	-(r0),r1
	movb	-(r0),r2
	swab	r1
	bis	r1,r2
1:
	cmp	r2,$"MH			/Murray Hill?
	beq	2f
	cmp	r2,$"HO			/Holmdel?
	beq	2f
	cmp	r2,$"IH			/Indian Hill?
	beq	2f
	cmp	r2,$"DR			/Denver?
	beq	2f
	cmp	r2,$"DS			/destroyed?
	beq	2f
8:
	jsr	r5,mesg
	<3ILL LOC4\n\0>
	.even
	movb	$1,eflag		/set error flag
	br	9f
2:
	mov	r2,j.loc		/change loc field
	movb	$1,cflag		/set core changed
9:
	mov	(sp)+,r2		/restore regs
	mov	(sp)+,r1
	rts	r5			/return
