Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_3_19910112 - utilities/tvfix.fai
There are no other files named tvfix.fai in the archive.
title tvfix
search monsym
asuppr
xall
define ... <>

a=1	b=a+1	c=b+1	d=c+1
t=5

.err:	movem a,errpc#
	movei a,.priou
	hrloi b,400000
	setz c,
	erstr ... jfcl ... jfcl
quit:	haltf ... jrst quit

start:	reset
	hrroi a,[asciz/
This program attempts to fix a file that TVEDIT has
pronounced uneditable.  For your own safety, please COPY
YOUR FILE WITH THE EXEC COPY COMMAND before you run this
program. 

After this program has run, you should run EDIT (not TVEDIT)
on the file and just give the "E" command.  This will remove
some garbage from your file. 

Finally, please note that due to the way TVEDIT works, the
first 2560 characters of your file may have been moved to
its end so you'll have to move them back.

File to fix?/]
	psout
	movsi a,(gj%sht+gj%old+gj%fns)
	move b,[.priin,,.priou]
	gtjfn ... jsp a,.err
	movem a,jfn#
	move b,[440000,,of%rd]
	openf ... jsp a,.err
	ffffp
	hrrzs a
	lsh a,9
	sos c,a			;# words in old file
	movsi a,.fbsiz
	hrr a,jfn
	seto b,
	chfdb ... erjmp .err	;update # bytes in file
	hrli a,.fbbyv
	movsi b,7700
	movsi c,4400
	chfdb ... erjmp .err	;change byte size to 36.
	closf ... jsp a,.err
	hrroi a,[asciz/
Now run SOS or EDIT on the file to flush wasted pages at the end.
/]
	psout
	jrst quit

end start