    CREATION AND HANDLING OF MULTI-VOLUME DIRECTORIES UNDER RT-11 WITH TECO
		TECO TRICKS FOR SMALL MASS STORAGE VOLUMES
	M. van Swaay, Kansas State University, Dept. of Computer Science
	Manhattan, KS 66506			    Phone (913) 532-6350

    ACCESS VOLUME ID:
	2#EDED		remove Yank protect
	ERDK:$		open disk as non-file
	_DECRT11A$32R	place pointer in front of volume ID (24 chars)
	2^_&EDED	re-enable Yank protect

    READ VOLUME DIRECTORY:
	ENDK:*.*$		wildcard file spec
	<:EN$;G*13I$10I$>	read all file names into workspace
	J <			loop through all names
	S:$0KS.$		remove device name, pointer to end of name
	RI      $0^Q+6DL.-Z;	insert blanks to align file extensions
	>

    ENABLE SCREEN CONTROL FOR PROMPTS:
	2#ETET		enable image typeout mode
	^A$H$K^G^A	cursor home, clear top line and ring bell
	^Ayourtext^A	print your text on top line
	2^_&ETET	turn off image typeout mode

    ACCEPT APPROVAL KEYSTROKE AFTER PROMPT:
	32#ETET		set ^T (get next keystroke) to no-wait
	<^T "L0;'>	discard any old unread input
	32^_&ETET ^T	disable no-wait, proceed on next keystroke

    UPDATE DIRECTORY PAGE BY MERGE/DELETE:
	HKA		old page on top, with volume ID, from input file
	ZJ .UA GN QAJ K	new page below, without volume ID, numA at boundary
	JXBL		volume ID to B
	<.,.+10XA L	file name to A for use as search for duplicate
	.UB		remember its location
	:S^EQA$"S	test presence of duplicate
	   0L K		    if found, delete duplicate
	   QBJ -L :XB L'    and add original entry to B
	QB-QA;		exit if all old entries looked over
	QBJ >		else do it again
	QAJ .,Z:XB	finally append new entries to B

    FORCE NEW DIRECTORY READ AFTER VOLUME SWAP ON NONSYS DEVICE:
	:ERSY:QQQ.QQQ$	look for dummy on SY:, discard error message
	EBDK:file.ext$	then look up what you really want

    EDIT A FILE IN-PLACE (-AT YOUR OWN RISK-):
	ERDK:oldie.txt	open read channel
	EWDK:oldie.txt	open write on same file, gives replace warning
	EF		close it to zero length!
	EWDK:newie.txt	open new file in vacated space, gives replace warning
	1^_&EDED	set search mode to accept ^ as CTL flag
	Y ZJ 12I$ A	read a big chunk, keep page mark
			do (minor) editing on top page
	JS^L$B,.PB,.K	pass top page to output
	ZJ 12I$ A	read ahead another page
			etc.
                                                                                                                                                                                                                                                                                 