Dec 062017
Port of TECO editor fr VAX -C source.
File TECO.ZIP from The Programmer’s Corner in
Category C Source Code
Port of TECO editor fr VAX -C source.
File Name File Size Zip Size Zip Type
ABORT.C 252 144 deflated
APPEND.C 604 310 deflated
COMAND.C 1446 499 deflated
ECHO.C 980 408 deflated
KILL.C 909 396 deflated
LINE.C 649 282 deflated
NEXT.C 303 181 deflated
PAGE.C 641 358 deflated
SEARCH.C 655 335 deflated
TECO.C 4417 1823 deflated
TECO.COM 14848 8702 deflated
TECO.DOC 4322 1723 deflated
TECO.H 444 152 deflated
TYPE.C 1070 378 deflated
VERIFY.C 938 390 deflated
WORK.C 11526 2905 deflated

Download File TECO.ZIP Here

Contents of the TECO.DOC file

Introduction to TECO Context Editor

The TECO (TExt COntext) editor is a non-visual, character oriented
editor which was developed at the Massachussets Institute of Technology in
the late 1960s as part of a project in artificial intelligence. When fully
implemented, TECO supports conditionals, branching, and forms its own unique
programming language, in fact EMACs was originally written in TECO !!! My
version is considerably simplified from full-blown TECO, but it still is
very powerful, allowing the user to edit BINARY (ie .EXE) as well as simple
ASCII files, changing the value of arbitrary bytes anywhere in the file.

To start editing in my version of TECO, you must give a file
specification on the command line. Do this by typing either

TECO myfile.ext

if you want to edit "myfile.ext", or you can type

TECO outfile.ext=infile.ext

where "outfile.ext" is the output file, and "infile.ext" is the source
file. To create a file from scratch, enter the command

TECO newfile.ext=NUL

where "newfile.ext" is the new file, and "NUL" is the null device.
Congratulations!! You are now in TECO mode, and can start using
the TECO command set. TECO commands are character sequences of the form

number letter string ESC

where "number" is signed number which defaults to 1 if not specified,
"letter" is a valid TECO command, "string" is the object for the command,
and "ESC" is the escape key (which echoes as $ on the console display).
Commands sequences are not executed immediately, but are stacked in a buffer
for later execution. All the TECO commands stored in the buffer are then
executed at once when the user types two ESC characters. The TECO commands
implemented are:

num A- Appends "number" pages of text to work area
from the input file, where a "page" is
defined as an arbitrary number of bytes,
ending in "Form Feed"

num C- Advance "number" characters in the page.

num D- Delete "number" characters.

EF- Exit TECO without writing this page to
the output file

EX- Exit TECO, writing this page out and
then copying the remainder of the input
file to the output file. Normal TECO exit

num FS old ESC new ESC- Replace string "old" with string "new"
a total of "num" times. Replace fails if
string "old" not on current page.

num FN old ESC new ESC- Replace string "old" with string "new"
a total of "num" times, Paging in text
as necessary...

HK- Delete everything in the current page.

HT- Type everything in the current page.

num I- Insert a single ascii character whose value
is "number" into the page.

I text ESC- Insert "text" from buffer.

num J- Jump to position "number" in page. If
"num" is omitted, go to start of page

num K- Kill "number" lines from the page.

num L- Advance "num" lines in page.

num N string ESC- Search for "string" a total of "num" times
Go to end of file if needed to find "string"

num P- Write page to the output file, and read in
a new page from the input file. Do this
a total of "num" times.
num R- Go backward "num" characters in the page

num S string ESC- Search for "string" a total of "num" times,
with error if not found on current page.

num T- Type out next "num" lines in page

num V- Type out "num" lines preceding and "num"
lines following current location in page.

num < string ESC > ESC- Iterate the "string" TECO command(s) within
angle brackets a total of "num" times.
If "num" not specified, iterate forever.
This is a *VERY POWERFUL* command.

^C- Exit TECO and delete output file. The
input file will be left untouched...

There are also some characters which assume numeric values. These are:

B- This is a synonym for 0 (zero)

Z- This is the number of characters in
the current page

.- This is where you are in the page.

(this version of TECO does not support arithmetic with numeric values.)

To cancel TECO typeout, hit CTRL-O, and all output will be suppressed
until the next TECO command string is requested from the console.

 December 6, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>