if $n -lt 1 then
	echo 'Usage: mod file.mod [l] [j] [n]'
	exit
endif
if -r $1 then
	expr substr $1 1 "(" length $1 - 4 ")" ^ = a
	= b $1
else
	if -r $1.mod then
		= a $1
		= b $1.mod
	else
		echo "Cannot open $1"
		exit
	endif
endif
if -r a.out rm a.out
/usr/lib/modula /usr/lib/modovly g $$2 $b
if ! -r a.out then
	if -r a.lst mv a.lst $a.lst
	echo Errors in $b
	echo York MODULA 01.00 Compilation complete
	exit
endif
ed - a.out
1a
        mtps = 106400^tst
.
g/\*\$177776/s/,\*\$177776//\
s/mov/mtps/
w
q
mv a.out a.in
as a.in /usr/lib/a.lsi.s /usr/lib/modnucl.s
if -r a.out mv a.out $a
if -r a.lst mv a.lst $a.lst
echo York MODULA 01.00 Compilation complete
