Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/flokup.mac
There is 1 other file named flokup.mac in the archive. Click here to see a list.
00100	COMMENT * SIMULA specification;
00200	OPTIONS(/E:QUICK,flokup);
00300	INTEGER PROCEDURE flokup(f); INTEGER f;
00400	COMMENT f contains the absolute address of a FILOP. UUO argument block.
00500	Result = f unchanged on success, zero on error.
00600	The file info is available in the lookup block (pointed to by .FOLEB
00700	field).  See Monitor Calls manual.
00800	;
00900	
01000	!*;! MACRO-10 code !*;!
01100	
01200		TITLE	flokup
01300		ENTRY	flokup
01400		SUBTTL	SIMULA utility, Lars Enderin Nov 1977
01500	
01600	;!*** Copyright 1977 by the Swedish Defence Research Institute. ***
01700	;!*** Copying is allowed.					***
01800	
01900	
02000		sall
02100		search	simmac,simmcr,simrpa
02200		macinit
02300	
02400		;! Local definitions ;!
02500	
02600		f==XWAC1
02700	
02800	flokup:	PROC
02900		EXCH	f,(XTAC)
03000		HLLZ	.FOFNC(f)	;! Channel
03100		LSH	5		;! to ac position
03200		TLO	(OPEN)
03300		HRRI	.FOIOS(f)
03400		XCT			;! OPEN channel,
03500		 GOTO	L8		;!  error
03600		TLZ	(OPEN)		;! Clear opcode, leave channel,
03700		TLO	(LOOKUP)
03800		HRR	.FOLEB(f)	;! Adr of lookup block from FILOP. blk
03900		XCT			;! LOOKUP channel,adr
04000		 GOTO	L7		;!  failure, go release channel
04100		L	X1,.FOPAT(f)
04200		HLRZ	.FOFNC(f)
04300		ST	(X1)
04400		PATH.	X1,		;! Get file path into path block
04500		 GOTO	L7
04600		GOTO	L9		;! Ok now
04700	
04800	L7():!	HLLZ	.FOFNC(f)	;! Error, release channel
04900		LSH	5
05000		TLO	(RELEASE)
05100		XCT			;! RELEASE channel,
05200	
05300	L8():!	SETZ	f,		;! Error, return zero
05400	L9():!	EXCH	f,(XTAC)	;! Return f or zero
05500		RET
05600		EPROC
05700		LIT
05800		END;