	.ENABLE GLOBAL
	.ENABLE SUBSTITUTION
	;
	;	Building TCF -- Terminal Control Function
	;
	.SETF SRCDEV
	.IFNDF $TKB .SETS $TKB "TKB"
	.IFDF $SRC .GOTO SRCOK
	.SETS $SRC COMMAN
	.PARSE $SRC " " $SRC DUMMY
	.PARSE $SRC "/" $SRC DUMMY
	.PARSE $SRC "." $SRC EXT
	.IF EXT EQ "" .SETS EXT "CMD"
	.TESTFILE '$SRC'.'EXT'
	.PARSE <FILSPC> ":" $SRC TEMP
	.TESTFILE SY:
	.PARSE <FILSPC> ":" SYDEV TEMP
	.IF $SRC EQ SYDEV .SETT SRCDEV
	.SETS $SRC $SRC+":"
.SRCOK:	.SETF Q
	.SETT SGLBLD
	.IFDF $LST .AND .IFDF $MP .SETF SGLBLD
	.IFF SGLBLD .GOTO CHKMP
	.ASK Q Generate listings
	.IFT Q .SETS $LST ""
	.IFF Q .SETS $LST "NL:"
	.SETF Q
	.ASK Q Generate maps
	.IFT Q .SETS $MP ""
	.IFF Q .SETS $MP "NL:"
.CHKMP:
.TCF1:	MAC TCF,'$LST'TCF/-SP='$SRC''<UIC>'TCF
	.OPEN TCFTKB.CMD
	.DATA TCF/CP,'$MP'TCF/-SP=TCF
	.DATA /
	.DATA ASG=TI:1:2
	.DATA PRI=100
	.DATA STACK=30
	.DATA TASK=...TCF
	.DATA UNITS=2
	.DATA //
	.CLOSE
	'$TKB' @TCFTKB
	PIP TCF.OBJ;*/DE
	PIP TCFTKB.CMD;*/DE
.TCFEX: ;
