Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/user/ncref/ncref.fai
There are no other files named ncref.fai in the archive.
	TITLE	ncref
	EXTERN	$$ONE
	OPDEF	ADJBP	[IBP]	
DEFINE %CHRBP(TOAC,FRMBP)	
<	SETO	TOAC,		
	ADJBP	TOAC,FRMBP	
>




	IFNDEF	ERJMP,< OPDEF ERJMP [JUMP 16,] >
	OPDEF	ERJMPA	[ERJMP]
	OPDEF	XMOVEI	[SETMI]
	DEFINE	IFIW	<SETZ >



	.REQUEST C:CLIB


	TWOSEG	400000	    	
	RELOC	0
	RELOC	400000		

	DEFINE	$$CODE	<RELOC>
	DEFINE	$$DATA	<RELOC>


IFNDEF $START,<		
	EXTERN	$START
	EXTERN	$RET,$RETZ,$RETN,$RETP,$RETF,$RETT
	EXTERN	$ZERO
>


	PURGE	IFE,IFN,IFG,IFGE,IFL,IFLE,IFDEF,IFNDEF,IFIDN,IFDIF



	$$DATA
crproc:$1::
	BLOCK	1

	$$CODE
$2::
	BLOCK	1
	XMOVEI 3,$3
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$1
	SKIPE 16,$2
	JRST 1(16)
	POPJ 17,
$3::
	BYTE	(7) 0,0

	.LINK	1,$2

	$$DATA
filenu:	BLOCK	1
tree:	BLOCK	4540
list:	BLOCK	12430
f.free:	BLOCK	1
p:	BLOCK	1
top:	BLOCK	1
r.free:	BLOCK	1
q:	BLOCK	1
pass:	BLOCK	7
arg:	BLOCK	1
statke:$4::
	BLOCK	1

	$$CODE
$5::
	BLOCK	1
	XMOVEI 3,$6
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$4
	SKIPE 16,$5
	JRST 1(16)
	POPJ 17,
$6::
	BYTE	(7) 151,146,0

	.LINK	1,$5

	$$DATA
$7::
	BLOCK	1

	$$CODE
$8::
	BLOCK	1
	XMOVEI 3,$9
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$7
	SKIPE 16,$8
	JRST 1(16)
	POPJ 17,
$9::
	BYTE	(7) 145,154,163,145,0

	.LINK	1,$8

	$$DATA
$10::
	BLOCK	1

	$$CODE
$11::
	BLOCK	1
	XMOVEI 3,$12
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$10
	SKIPE 16,$11
	JRST 1(16)
	POPJ 17,
$12::
	BYTE	(7) 146,157,162,0

	.LINK	1,$11

	$$DATA
$13::
	BLOCK	1

	$$CODE
$14::
	BLOCK	1
	XMOVEI 3,$15
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$13
	SKIPE 16,$14
	JRST 1(16)
	POPJ 17,
$15::
	BYTE	(7) 162,145,164,165,162
	BYTE	(7) 156,0

	.LINK	1,$14

	$$DATA
$16::
	BLOCK	1

	$$CODE
$17::
	BLOCK	1
	XMOVEI 3,$18
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$16
	SKIPE 16,$17
	JRST 1(16)
	POPJ 17,
$18::
	BYTE	(7) 163,167,151,164,143
	BYTE	(7) 150,0

	.LINK	1,$17

	$$DATA
$19::
	BLOCK	1

	$$CODE
$20::
	BLOCK	1
	XMOVEI 3,$21
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$19
	SKIPE 16,$20
	JRST 1(16)
	POPJ 17,
$21::
	BYTE	(7) 167,150,151,154,145
	BYTE	(7) 0

	.LINK	1,$20

	$$DATA
	0
declke:$22::
	BLOCK	1

	$$CODE
$23::
	BLOCK	1
	XMOVEI 3,$24
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$22
	SKIPE 16,$23
	JRST 1(16)
	POPJ 17,
$24::
	BYTE	(7) 143,150,141,162,0

	.LINK	1,$23

	$$DATA
$25::
	BLOCK	1

	$$CODE
$26::
	BLOCK	1
	XMOVEI 3,$27
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$25
	SKIPE 16,$26
	JRST 1(16)
	POPJ 17,
$27::
	BYTE	(7) 144,157,165,142,154
	BYTE	(7) 145,0

	.LINK	1,$26

	$$DATA
$28::
	BLOCK	1

	$$CODE
$29::
	BLOCK	1
	XMOVEI 3,$30
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$28
	SKIPE 16,$29
	JRST 1(16)
	POPJ 17,
$30::
	BYTE	(7) 146,154,157,141,164
	BYTE	(7) 0

	.LINK	1,$29

	$$DATA
$31::
	BLOCK	1

	$$CODE
$32::
	BLOCK	1
	XMOVEI 3,$33
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$31
	SKIPE 16,$32
	JRST 1(16)
	POPJ 17,
$33::
	BYTE	(7) 151,156,164,0

	.LINK	1,$32

	$$DATA
$34::
	BLOCK	1

	$$CODE
$35::
	BLOCK	1
	XMOVEI 3,$36
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$34
	SKIPE 16,$35
	JRST 1(16)
	POPJ 17,
$36::
	BYTE	(7) 163,164,162,165,143
	BYTE	(7) 164,0

	.LINK	1,$35

	$$DATA
$37::
	BLOCK	1

	$$CODE
$38::
	BLOCK	1
	XMOVEI 3,$39
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$37
	SKIPE 16,$38
	JRST 1(16)
	POPJ 17,
$39::
	BYTE	(7) 165,156,163,151,147
	BYTE	(7) 156,145,144,0

	.LINK	1,$38

	$$DATA
$40::
	BLOCK	1

	$$CODE
$41::
	BLOCK	1
	XMOVEI 3,$42
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$40
	SKIPE 16,$41
	JRST 1(16)
	POPJ 17,
$42::
	BYTE	(7) 154,157,156,147,0

	.LINK	1,$41

	$$DATA
	0
iop:	BLOCK	1
title:$43::
	BLOCK	1

	$$CODE
$44::
	BLOCK	1
	XMOVEI 3,$45
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$43
	SKIPE 16,$44
	JRST 1(16)
	POPJ 17,
$45::
	BYTE	(7) 40,40,106,165,156
	BYTE	(7) 143,164,151,157,156
	BYTE	(7) 40,103,162,157,163
	BYTE	(7) 163,40,122,145,146
	BYTE	(7) 145,162,145,156,143
	BYTE	(7) 145,40,123,165,155
	BYTE	(7) 155,141,162,171,40
	BYTE	(7) 40,40,0,0

	.LINK	1,$44

	$$DATA
head1:$46::
	BLOCK	1

	$$CODE
$47::
	BLOCK	1
	XMOVEI 3,$48
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$46
	SKIPE 16,$47
	JRST 1(16)
	POPJ 17,
$48::
	BYTE	(7) 120,162,157,143,145
	BYTE	(7) 144,165,162,145,11
	BYTE	(7) 106,151,154,145,11
	BYTE	(7) 11,103,141,154,154
	BYTE	(7) 151,156,147,11,11
	BYTE	(7) 120,141,147,145,55
	BYTE	(7) 114,151,156,145,40
	BYTE	(7) 0,0

	.LINK	1,$47

	$$DATA
head2:$49::
	BLOCK	1

	$$CODE
$50::
	BLOCK	1
	XMOVEI 3,$51
	IOR 3,$BYTE*$$ONE+4
	MOVEM 3,$49
	SKIPE 16,$50
	JRST 1(16)
	POPJ 17,
$51::
	BYTE	(7) 116,141,155,145,11
	BYTE	(7) 11,116,141,155,145
	BYTE	(7) 11,11,120,162,157
	BYTE	(7) 143,145,144,165,162
	BYTE	(7) 145,40,0,0

	.LINK	1,$50

	$$DATA
string:	BLOCK	4704
key:	BLOCK	4
srfile:	BLOCK	4
pg:	BLOCK	1
ln:	BLOCK	1
rpg:	BLOCK	1
rln:	BLOCK	1

	$$CODE
main:
	PUSHJ 17,init
$52::
	SOSN 3,-1(17)
	 JRST $53
	AOS 7,filenu
	XMOVEI 5,$55
	IOR 5,$BYTE*$$ONE+4
	PUSH 17,5
	ADD 7,-3(17)
	PUSH 17,0(7)
	PUSHJ 17,fopen
	ADJSP 17,-2
	MOVEM 1,iop
	JUMPN 1,$54
	XMOVEI 3,$56
	IOR 3,$BYTE*$$ONE+4
	PUSH 17,3
	PUSHJ 17,perror
	ADJSP 17,-1
	PUSHJ 17,exit
$54::
	SETZB 3,rln
	MOVEM 3,rpg
	MOVEM 3,pg
	MOVEM 3,ln
	PUSHJ 17,parse
	PUSH 17,iop
	PUSHJ 17,fclose
	ADJSP 17,-1
	JRST $52
$53::
	PUSH 17,-2(17)
	PUSHJ 17,result
	ADJSP 17,-1
	POPJ 17,
$56::
	BYTE	(7) 163,157,165,162,143
	BYTE	(7) 145,40,146,151,154
	BYTE	(7) 145,40,157,160,145
	BYTE	(7) 156,40,145,162,162
	BYTE	(7) 157,162,0

$55::
	BYTE	(7) 162,0

init:
	ADJSP 17,1
	PUSH 17,[454]
	PUSHJ 17,init.f
	ADJSP 17,-1
	PUSH 17,[1604]
	PUSHJ 17,init.r
	XMOVEI 3,pass
	MOVEM 3,arg
	SETZB 5,top
	DPB 5,[111100,,key*$$ONE+3]
	ADJSP 17,-2
	POPJ 17,
result:
	PUSH 17,iop
	PUSHJ 17,fclose
	ADJSP 17,-1
	XMOVEI 3,.iob*$$ONE+5
	MOVEM 3,iop
	PUSH 17,-1(17)
	PUSHJ 17,headin
	ADJSP 17,-1
	PUSH 17,-1(17)
	PUSH 17,top
	PUSHJ 17,outree
	ADJSP 17,-2
	PUSH 17,iop
	PUSH 17,[12]
	PUSHJ 17,putc
	ADJSP 17,-2
	PUSH 17,iop
	PUSH 17,[14]
	PUSHJ 17,putc
	ADJSP 17,-2
	PUSH 17,iop
	PUSHJ 17,fflush
	ADJSP 17,-1
	POPJ 17,

	$$ONE==1
	EXTERN	$BYTE
	EXTERN	.iob
	EXTERN	fgets
	EXTERN	fopen
	INTERN	crproc
	INTERN	filenu
	INTERN	tree
	INTERN	list
	INTERN	f.free
	INTERN	p
	INTERN	top
	INTERN	r.free
	INTERN	q
	INTERN	pass
	INTERN	arg
	INTERN	statke
	INTERN	declke
	INTERN	iop
	INTERN	title
	INTERN	head1
	INTERN	head2
	INTERN	string
	INTERN	key
	INTERN	srfile
	INTERN	pg
	INTERN	ln
	INTERN	rpg
	INTERN	rln
	INTERN	main
	INTERN	init
	EXTERN	perror
	EXTERN	exit
	EXTERN	parse
	EXTERN	fclose
	INTERN	result
	EXTERN	init.f
	EXTERN	init.r
	EXTERN	headin
	EXTERN	outree
	EXTERN	putc
	EXTERN	fflush

	LIT
$$STRT:	JRST	$START
	JRST	$START
	END	<2,,$$STRT>