21-NOV-76				NEW TECO

THERE IS A NEW VERSION OF TECO ON THE SYSTEM. THE TECO KERNEL
IS VERSION 24. NEW FEATURES ARE AS FOLLOWS:

THE COMMAND "EIFILENAME$" CAUSES THE CONTENTS OF THE NAMED FILE TO
BECOME TECO'S CONSOLE INPUT. THE FILE WILL BE READ UNTIL EOF IS REACHED,
AN "EI$" COMMAND IS EXECUTED, OR AN "EIFILENAME$" COMMAND IS EXECUTED.
IN THE FIRST TWO CASES, INPUT REVERTS TO THE TERMINAL; IN THE LATTER,
INPUT IS READ FROM THE NEW FILE. THERE ARE SOME SUBTLE DETAILS IN THE
HANDLING OF INDIRECT FILES THAT ARE NOT IMMEDIATELY OBVIOUS:

	WHEN AN "EIFILENAME$" IS EXECUTED, THE FILE AT THAT INSTANT
	BECOMES THE INPUT STREAM. NO INPUT IS READ, HOWEVER, UNTIL
	EXECUTION OF THE CURRENT COMMAND STRING HAS COMPLETED.
	CLEARLY THE CONTENTS OF THE FILE DOES NOT REPLACE THE
	"EIFILENAME" COMMAND.

	THERE ARE NO ASSUMED DELIMITERS IN THE COMMAND FILE. IF THE FILE
	IS THE STANDARD IMPLIED CARRIAGE CONTROL, CRLF IS APPENDED TO
	EACH RECORD, JUST AS IT IS TO TEXT READ INTO THE BUFFER. IN
	PARTICULAR, IF THE FILE DOES NOT CONTAIN A DOUBLE ALTMODE,
	EXECUTION OF THE COMMAND IT CONTAINS WILL NOT PROCEED UNTIL A
	DOUBLE ALTMODE IS ENTERED FROM THE CONSOLE.

	A DOUBLE ALTMODE AT THE END OF THE FILE DOES NOT TERMINATE IT.
	TECO WILL EXECUTE THE COMMAND READ, AND THEN CONTINUE TO READ
	UNTIL EOF IF THE FILE HAS NOT BEEN TURNED OFF. IF A COMMAND
	READ FROM A FILE WANTS TO READ INPUT FROM THE CONSOLE WITH ^T,
	IT MUST EXECUTE AN "EI$" FIRST, TO AVOID READING THE UNREAD
	PORTION OF THE FILE (USUALLY THE CRLF FOLLOWING THE DOUBLE
	ALTMODE).

THE MCR COMMAND "TECO @FILENAME" IS EQUIVALENT TO STARTING TECO WITH
THE COMMAND "EIFILENAME$$". NOTE THAT TECO WILL PROMPT TO THE CONSOLE
FOR INPUT AT THE END OF THE FILE, UNLESS THE FILE CONTAINS AT LEAST
ONE COMPLETE COMMAND TERMINATED WITH "EX$$".

PROTECTION AGAINST SELF DESTRUCTION. THE MOST COMMON FORMS OF TECO
LOSSAGE ARE NOW PROTECTED AGAINST BY THE FOLLOWING RESTRICTIONS:

	THE "EX" AND "EC" COMMANDS ARE ILLEGAL IF THERE IS NO
	OUTPUT FILE OPEN AND THERE IS TEXT IN THE BUFFER.
	TO EXIT AFTER LOOKING AT A FILE (READ ONLY), DO "HK" FIRST.

	THE "Y" AND "_" COMMANDS ARE ILLEGAL IF THERE IS AN
	OUTPUT FILE OPEN AND THERE IS TEXT IN THE BUFFER.

DYNAMIC MEMORY EXPANSION. THOSE OF YOU WHO HAVE USED TECO ON OTHER
SYSTEMS WILL BE OVERJOYED TO SEE THE "[NK MEMORY]" MESSAGES INSTEAD
OF BUFFER TRUNCATION. (ONLY THE MESSAGE READS "NK BYTES" TO
CONFORM WITH THE UP AND COMING BYTE ORIENTATION.) TECO IS BUILT
WITH AN EXPANSION LIMIT (SETTABLE AS A TKB PARAMETER) WHICH IS SET
AT ABOUT 12K BYTES. I.E., THE NORMAL VERSION OF TECO WILL NOT EXPAND
ITS BUFFER ABOVE THAT. TO USE A MAXIMUM SIZE BUFFER, START UP TECO
WITH THE BUFFER ABOVE THE LIMIT (I.E., /INC=8000. WORKS HERE).

CONTROL C SUPPORT. TYPING CONTROL C WHILE TECO IS EXECUTING WILL
CAUSE AN "INSTANT STOP". USEFUL FOR KILLING FAULTY MACROS AND
MISTYPED N SEARCHES. CONTROL C TRAPPING MAY BE PASSED INTO A MACRO
BY SETTING THE SIGN BIT (32768) OF THE ET FLAG. IF THIS IS SET,
THEN CTRL C DOES NOT ABORT THE COMMAND BUT SIMPLY CLEARS THE FLAG
(THE MACRO MUST POLL IT). NOTE THAT AN ITERATION THAT REPEATEDLY
SETS THE FLAG IS ALMOST IMPOSSIBLE TO KILL.

UPPER/LOWER CASE MATCHING IN SEARCHES. UPPER CASE SEARCH STRINGS
WILL NOW MATCH LOWER CASE TEXT. ALSO, LOWER CASE TYPE-OUT IS FLAGGED
UNDER CONTROL OF THE "EU" FLAG:

	0 - FLAG LOWER CASE
	+ - FLAG UPPER CASE
	- - FLAG NOTHING

"TECO MODE" TYPE IN. BY SPECIAL ARRANGEMENT WITH THE TERMINAL
DRIVER, ALMOST ALL INPUT IS NOW READ WITH MULTI-CHARACTER READS,
BREAKING ONLY FOR CONTROL CHARACTERS AND RUBOUT. THIS SUBSTANTIALLY
REDUCES THE SYSTEM OVERHEAD, AND COUPLED WITH A LIMITED TYPE
AHEAD FACILITY, VIRTUALLY ELIMINATES THE PROBLEM OF DROPPED CHARACTERS.

WILD CARD FILE NAMES (GOD HELP US). SUPPORTED BY THE FOLLOWING
COMMANDS:

	"ENFILESTRING$" EFFECTIVELY PERFORMS A PARSE; I.E., INITIALIZES
	CONTEXT AND SETS UP "FILESTRING" AS THE CONTROLLING STRING.
	"FILESTRING" MAY CONTAIN WILD CARD NAME, DEFAULT VERSION AND
	WILD CARD DIRECTORIES.

	"EN$" DOES A FIND NEXT. THE FILE IS NOT OPENED, BUT THE NAME
	IS AVAILABLE IN THE FILENAME BUFFER (SEE NEXT COMMAND).

	"G*" INSERTS THE CONTENTS OF THE FILENAME BUFFER INTO THE TEXT
	BUFFER AT THE CURRENT CURSOR POSITION. THE FILENAME BUFFER
	CONTAINS THE FULLY EXPANDED FILENAME OF THE LAST FILE TO BE
	PROCESSED WITH A FILE SELECTION COMMAND (NOT INCLUDING
	"EP", "EA", "ER$", AND "EW$"). THIS IS THE ONLY COMMAND THAT
	MAY REFERENCE THE FILENAME BUFFER.

	"^YXQ" IMMEDIATELY FOLLOWING A "G*" WILL PUT THE FILENAME INTO
	Q-REGISTER Q.

	"EB^EQQ$" WILL OPEN THE FILE NAMED BY Q-REGISTER Q. (THIS
	WORKS FOR ALL COMMANDS THAT TAKE FILE STRINGS.)

	ALL FILE SELECTION COMMANDS NOW TAKE A COLON MODIFIER TO
	RETURN -1 FOR SUCCESS AND 0 FOR FILE NOT FOUND. NOTE THAT
	OTHER FILE SYSTEM ERRORS (E.G., PROTECTION VIOLATION) WILL
	STILL CAUSE AN ERROR EXIT.

	FOR EXAMPLE, THE FOLLOWING COMMAND PRODUCES A DIRECTORY
	LISTING:

		EN*.*;*$<:EN$;HKG*I
		$HT>$$

STARTUP COMMAND FILE. AS PART OF ITS INITIALIZATION, TECO PERFORMS
A ":EITECO.TEC$$" COMMAND. THUS YOU MAY LOAD Q REGISTERS WITH YOUR
FAVORITE MACROS BY PLACING APPROPRIATE COMMANDS IN A FILE OF THAT
NAME. THIS IS DONE BEFORE THE CCL COMMAND LINE IS PROCESSED, SO THERE
ARE NO OPEN FILES IN YOUR WAY. YOU MAY EVEN READ THE COMMAND LINE
(TRANSLATED INTO THE APPROPRIATE TECO COMMAND) WITH "^T" FOR
MAXIMUM PERVERSENESS.

NEW "ET" VALUES FOR OBSCURE MACROS:

	8 - SUPPRESS ECHO ON ALL TYPE-IN FOR THE "^T" COMMAND.

	16 - CANCEL CONTROL O BEFORE ALL TYPE-OUT COMMANDS.

	32 - "^T" RETURNS -1 IF THERE ARE NO CHARACTERS IN THE
	TYPE-AHEAD OR RECORD INPUT BUFFER (I.E., IF IT WOULD
	HAVE TO WAIT FOR TYPE-IN).

"[Q" - PUSH Q-REGISTER Q.

"]Q" - POP Q REGISTER Q.

"^Y" IS EQUIVALENT TO ".+^S,."; I.E., IT BRACKETS THE STRING LAST
INSERTED INTO THE BUFFER.


USE IT IN GOOD HEALTH!			 - ANDY GOLDSTEIN
