Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - lnkfio.c07
There is 1 other file named lnkfio.c07 in the archive. Click here to see a list.
 REP 2/1	;07C1
	SUBTTL	D.M.NIXON/DMN/JLd/JBC/JNG/PAH/DZN/PY		6-Jan-83
 WIT
	SUBTTL	D.M.NIXON/DMN/JLd/JBC/JNG/PAH/DZN/PY		14-Mar-83
 REP 37/1	;07C2
	DECEVR==2026		;DEC EDIT VERSION
 WIT
	DECEVR==2034		;DEC EDIT VERSION
 INS 69/2	;07C3
	;1547	Fix all cases where .REL bytesize not 36 bits.
 INS 72/2	;07C4
	;2034	Use .IODPR instead of .IODMP in DVOPN. on TOPS-20
 REP 15/4	;07C5
		CAIN	T2,.IODMP	
 WIT
	;**;[2034] Replace 1 Line at DVOPN.+6 Lines	PY	17-Feb-83
		CAIN	T2,.IODPR	;[2034]
 REP 64/8	;07C6
		MOVE	T2,[6,,.FBCRE]		;[1500] LOOK AT WRDS 5-12 OF FDB
		MOVEI	T3,(P)			;[1500] PTR TO VERY TEMPORARY STORAGE
		ADJSP	P,6			;[1500] RESERVE SIX WORDS FOR FDB DATA
		GTFDB				;[1500] GET FILE DATA BLOCK
		  ERJMP	[ ADJSP P,-6		;[1500] OOPS, RESTORE STACK
			  POP	P,T3		;[1500] AND T3
			  POPJ	P, ]		;[1500] NONSKIP ERROR RETURN
		LDB	T2,[POINT 6,.FBBYV-5(T3),11]
						;[1500] GET BYTESIZE DATA
		MOVEI	T1,^D36			;[1500] DIVIDE 36
		IDIV	T1,T2			;[1500] BY THE BYTESIZE
		MOVE	T2,.FBSIZ-5(T3)		;[1500] FETCH FILE SIZE IN BYTES	
		CAIN	T1,1			;[1500] NORMAL BINARY DATA?
		JRST	DVLKP1			;[1500] YES, DON'T BOTHER CALCULATING
		EXCH	T1,T2			;[1500] T1:BYTECOUNT,T2:BYTES/WORD	
		IDIV	T1,T2			;[1500] FINAL WORD COUNT FOR FILE
		EXCH	T1,T2			;[1500] GET IT TO T2
	DVLKP1:	MOVEM	T2,RFLEN		;[1500] STORE WORD COUNT
		MOVE	T2,.FBCRE-5(T3)		;[1500] ALSO PICK UP CREATION DATE
		ADJSP	P,-6			;[2014] RESTORE STACK
	DVLKP2:	MOVE	T3,IO.CHN		;[2014] AND PUT IT IN THE IO BLOCK
		MOVE	T3,IO.PTR(T3)		;[1500] FOR MAP FILE
		MOVEM	T2,I.PRV(T3)		;[1500]	...
		POP	P,T3			; PUT REGISTER CONTENTS BACK
 WIT
	;**;[1547] Replace at NFSLKP+19 Lines	PAH	14-Mar-83
		MOVE	T2,[6,,.FBCRE]		;[1547] LOOK AT WRDS 5-12 OF FDB
		MOVEI	T3,.FBCRE(P)		;[1547] PTR TO VERY TEMPORARY STORAGE
		ADJSP	P,6			;[1547] SET IT ASIDE
		GTFDB				;[1547] GET FILE DATA BLOCK
		  ERJMP	[ ADJSP P,-6		;[1547] RELEASE TEMP STORAGE
			  POP	P,T3		;[1547] AND T3
			  POPJ	P, ]		;[1547] NONSKIP ERROR RETURN
		MOVE	T2,<.FBCRE-.FBCRE>(T3)	;[1547] PICK UP CREATION DATE
		MOVE	T1,IO.CHN		;[1547]
		MOVE	T1,IO.PTR(T1)		;[1547] SAVE THIS INFO
		MOVEM	T2,I.PRV(T1)		;[1547] FOR THE MAP FILE

	;[1547] Now compute RFLEN, length of .REL file

		MOVE	T1,<.FBSIZ-.FBCRE>(T3)	;[1547]
		LDB	T3,[POINT 6,<.FBBYV-.FBCRE>(T3),11]
						;[1547] GET BYTESIZE DATA
		JUMPE	T3,DVLKP2		;[1547] BYTESIZE=WORD SIZE
		CAILE	T3,^D18			;[1547] IF GREATER THAN 18
		JRST	DVLKP2			;[1547] BYTESIZE=WORD SIZE
		MOVEI	T2,^D36			;[1547] DIVIDE 36
		IDIV	T2,T3			;[1547] BY THE BYTESIZE
		IDIV	T1,T2			;[1547] FILE SIZE IN WORDS
		SKIPE	T2			;[1547] EXTRA BYTES?
		AOS	T1			;[1547] YES, ONE MORE WORD
	DVLKP2:	MOVEM	T1,RFLEN		;[1547] STORE WORD COUNT
		ADJSP	P,-6			;[1547] RELEASE TEMP STORAGE
		POP	P,T3			;[1547] AND AC
 REP 8/22	;07C7
	;	MOVE	IO.CHN	CHAN #
 WIT
	;	MOVEM	AC,IO.CHN	STORE CHANNEL # AWAY
 SUM 197194