	.even
search:
	cmp	bline,$"cr		/"create"?
	beq	1f
	cmp	bline,$"jo		/"job"?
	beq	2f
	cmp	bline,$"nu		/"number"?
	beq	3f
	cmp	bline,$"od		/"opening date"?
	beq	4f
	cmp	bline,$"st		/"status"?
	beq	5f
	cmp	bline,$"ti		/"title"?
	beq	6f
	cmp	bline,$"sa		/"save"?
	beq	7f
	cmp	bline,$"no		/"nosave"?
	beq	8f
	cmp	bline,$"lo		/"location"?
	beq	9f
	br	0f
1:
	jsr	r5,create
	rts	r5
2:
	cmp	$1,whatsin
	beq	1f
	mov	rj,r0
	sys	seek; 0; 0
	sys	read; b.overlay; 1100.
	mov	$1,whatsin
1:
	jsr	r5,job
	rts	r5
3:
	jsr	r5,number
	rts	r5
4:
	jsr	r5,odate
	rts	r5
5:
	jsr	r5,status
	rts	r5
6:
	jsr	r5,title
	rts	r5
7:
	cmp	$2,whatsin
	beq	1f
	mov	rs,r0
	sys	seek; 0; 0
	sys	read; b.overlay; 1100.
	mov	$2,whatsin
1:
	jsr	r5,save
	rts	r5
8:
	jsr	r5,nosave
	rts	r5
9:
	jsr	r5,loc
	rts	r5
0:
	cmp	bline,$"dd		/"deadline date"?
	beq	1f
	cmp	bline,$"dc		/"deadline code"?
	beq	2f
	cmp	bline,$"cd		/"closing date"?
	beq	3f
	cmp	bline,$"at		/"attorney"?
	beq	4f
	cmp	bline,$"su		/"supervisor"?
	beq	5f
	cmp	bline,$"di		/"director"?
	beq	6f
	br	0f
1:
	jsr	r5,ddate
	rts	r5
2:
	jsr	r5,dcode
	rts	r5
3:
	jsr	r5,cdate
	rts	r5
4:
	jsr	r5,attny
	rts	r5
5:
	jsr	r5,super
	rts	r5
6:
	jsr	r5,dir
	rts	r5
0:
	tst	token2
	beq	7f
	mov	token2,r0
	dec	r0
	br	8f
7:
	mov	token4,r0
	dec	r0
8:
	cmpb	bline,$'a
	bne	4f
	cmpb	(r0),$'1		/author1?
	beq	9f
	cmpb	(r0),$'2		/author2?
	beq	0f
	cmpb	(r0),$'3		/author3?
	beq	1f
	cmpb	(r0),$'4		/author4?
	beq	2f
	cmpb	(r0),$'s		/authors?
	beq	3f
	br	badsearch
9:
	jsr	r5,author
	j.auth1
	rts	r5
0:
	jsr	r5,author
	j.auth2
	rts	r5
1:
	jsr	r5,author
	j.auth3
	rts	r5
2:
	jsr	r5,author
	j.auth4
	rts	r5
3:
	jsr	r5,author
	0
	rts	r5
4:
	cmpb	bline,$'o
	bne	0f
	cmpb	(r0),$'1		/origin1?
	beq	5f
	cmpb	(r0),$'2		/origin2?
	beq	6f
	cmpb	(r0),$'3		/origin3?
	beq	7f
	cmpb	(r0),$'4		/origin4?
	beq	8f
	cmpb	(r0),$'s		/origins?
	beq	9f
	br	badsearch
5:
	jsr	r5,orig
	j.orig1
	rts	r5
6:
	jsr	r5,orig
	j.orig2
	rts	r5
7:
	jsr	r5,orig
	j.orig3
	rts	r5
8:
	jsr	r5,orig
	j.orig4
	rts	r5
9:
	jsr	r5,orig
	0
	rts	r5
0:
	cmpb	bline,$'c
	bne	4f
	cmpb	(r0),$'1		/case1?
	beq	1f
	cmpb	(r0),$'2		/case2?
	beq	2f
	cmpb	(r0),$'s		/cases?
	beq	3f
badsearch:
	jsr	r5,mesg
	<3ILLEGAL COMMAND4\n\0>
	.even
	rts	r5
1:
	jsr	r5,case
	j.case1
	rts	r5
2:
	jsr	r5,case
	j.case2
	rts	r5
3:
	jsr	r5,case
	0
	rts	r5
4:
	cmp	bline,$"pr
	bne	5f
	jsr	r5,print
	rts	r5
5:
	cmp	bline,$"qu
	bne	badsearch
	jmp	done
