HOME

TheInfoList



OR:

TECO (), short for ''Text Editor & Corrector'',"A powerful and sophisticated text editor, TECO (Text Editor and Corrector) ... is both a character-oriented
text editor A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be ...
and a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
, that was developed in 1962 for use on
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president un ...
computers, and has since become available on
PCs A personal computer (PC) is a multi-purpose microcomputer whose size, capabilities, and price make it feasible for individual use. Personal computers are intended to be operated directly by an end user, rather than by a computer expert or techn ...
and
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
. Dan Murphy developed TECO while a student at the
Massachusetts Institute of Technology The Massachusetts Institute of Technology (MIT) is a private land-grant research university in Cambridge, Massachusetts. Established in 1861, MIT has played a key role in the development of modern technology and science, and is one of th ...
(MIT). According to Murphy, the initial acronym was ''Tape Editor and Corrector'' because "
punched paper tape Five- and eight-hole punched paper tape Paper tape reader on the Harwell computer with a small piece of five-hole tape connected in a circle – creating a physical program loop Punched tape or perforated paper tape is a form of data storage ...
was the only medium for the storage of program source on our PDP-1. There was no hard disk, floppy disk, magnetic tape (magtape), or network." By the time TECO was made available for general use, the name had become "Text Editor and Corrector", since even the PDP-1 version by then supported other media. It was subsequently modified by many other people and is a direct ancestor of
Emacs Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
, which was originally implemented in TECO macros.


Description

TECO is not only an editor but also an interpreted
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
for text manipulation. Arbitrary programs (called "macros") for searching and modifying text give it great power. Unlike
regular expressions A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" o ...
, however, the language was imperative, though some versions had an "or" operator in string search. TECO does not really have
syntax In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituenc ...
; each character in a program is an imperative command, dispatched to its corresponding routine. That routine may read further characters from the program stream (giving the effect of string arguments), change the position of the "program counter" (giving the effect of control structures), or push values onto a value stack (giving the effect of nested parentheses). But there is nothing to prevent operations like jumping into the middle of a comment, since there is no syntax and no parsing. TECO ignores
case Case or CASE may refer to: Containers * Case (goods), a package of related merchandise * Cartridge case or casing, a firearm cartridge component * Bookcase, a piece of furniture used to store books * Briefcase or attaché case, a narrow box to ca ...
and whitespace (except tab, which is an insertion command). A satirical essay on computer programming,
Real Programmers Don't Use Pascal "Real Programmers Don't Use Pascal" (a parody of the bestselling 1982 tongue-in-cheek book on stereotypes about masculinity '' Real Men Don't Eat Quiche'') is an essay about computer programming written by Ed Post of Tektronix, Inc., and published ...
, suggested that a common game for TECO fans was to enter their name as a command sequence, and then try to work out what would happen. The same essay in describing TECO coined the
acronym An acronym is a word or name formed from the initial components of a longer name or phrase. Acronyms are usually formed from the initial letters of words, as in ''NATO'' (''North Atlantic Treaty Organization''), but sometimes use syllables, as ...
''YAFIYGI'', meaning "You Asked For It You Got It" (in contrast to
WYSIWYG In computing, WYSIWYG ( ), an acronym for What You See Is What You Get, is a system in which editing software allows content to be edited in a form that resembles its appearance when printed or displayed as a finished product, such as a printed d ...
).


Impact

The
EMACS Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
editor originally started by
David A. Moon David A. Moon is a programmer and computer scientist, known for his work on the Lisp programming language, as co-author of the Emacs text editor, as the inventor of ephemeral garbage collection, and as one of the designers of the Dylan progra ...
and Guy L. Steele Jr. was implemented in TECO as a set of Editor MACroS. TECO became more widely used following a
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president un ...
(DEC)
PDP-6 The PDP-6, short for Programmed Data Processor model 6, is a computer developed by Digital Equipment Corporation (DEC) during 1963 and first delivered in the summer of 1964. It was an expansion of DEC's existing 18-bit systems to use a 36-bit d ...
implementation developed at MIT's
Project MAC Computer Science and Artificial Intelligence Laboratory (CSAIL) is a research institute at the Massachusetts Institute of Technology (MIT) formed by the 2003 merger of the Laboratory for Computer Science (LCS) and the Artificial Intelligence Lab ...
in 1964. This implementation continuously displayed the edited text visually on a CRT screen, and was used as an interactive online editor. Later versions of TECO were capable of driving full-screen mode on various DEC
RS-232 In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' ('' data terminal equipment'') suc ...
video terminals such as the VT52 or
VT100 The VT100 is a video terminal, introduced in August 1978 by Digital Equipment Corporation (DEC). It was one of the first terminals to support ANSI escape codes for cursor control and other tasks, and added a number of extended codes for special ...
. TECO was available for several operating systems and computers, including the
PDP-1 The PDP-1 (''Programmed Data Processor-1'') is the first computer in Digital Equipment Corporation's PDP series and was first produced in 1959. It is famous for being the computer most important in the creation of hacker culture at Massachusett ...
computer, the
PDP-8 The PDP-8 is a 12-bit minicomputer that was produced by Digital Equipment Corporation (DEC). It was the first commercially successful minicomputer, with over 50,000 units being sold over the model's lifetime. Its basic design follows the pioneer ...
(under OS/8), the
Incompatible Timesharing System Incompatible Timesharing System (ITS) is a time-sharing operating system developed principally by the MIT Artificial Intelligence Laboratory, with help from Project MAC. The name is the jocular complement of the MIT Compatible Time-Sharing Sy ...
(ITS) on the PDP-6 and
PDP-10 Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, espec ...
, and
TOPS-10 TOPS-10 System (''Timesharing / Total Operating System-10'') is a discontinued operating system from Digital Equipment Corporation (DEC) for the PDP-10 (or DECsystem-10) mainframe computer family. Launched in 1967, TOPS-10 evolved from the earlie ...
and
TOPS-20 The TOPS-20 operating system by Digital Equipment Corporation (DEC) is a proprietary OS used on some of DEC's 36-bit mainframe computers. The Hardware Reference Manual was described as for "DECsystem-10/DECSYSTEM-20 Processor" (meaning the DEC PDP- ...
on the
PDP-10 Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, espec ...
. A version of TECO was provided with all DEC operating systems; the version available for RT11 was able to drive the GT40 graphics display while the version available for
RSTS/E RSTS () is a multi-user time-sharing operating system developed by Digital Equipment Corporation (DEC, now part of Hewlett-Packard) for the PDP-11 series of 16-bit minicomputers. The first version of RSTS (RSTS-11, Version 1) was implemented in 1 ...
was implemented as a multi-user
run-time system In computer programming, a runtime system or runtime environment is a sub-system that exists both in the computer where a program is created, as well as in the computers where the program is intended to be run. The name comes from the compile t ...
and could be used as the user's complete operating environment; the user never actually had to exit TECO. The VTEDIT (Video Terminal Editor) TECO macro was commonly used on
RSTS/E RSTS () is a multi-user time-sharing operating system developed by Digital Equipment Corporation (DEC, now part of Hewlett-Packard) for the PDP-11 series of 16-bit minicomputers. The first version of RSTS (RSTS-11, Version 1) was implemented in 1 ...
and VAX systems with terminals capable of direct-cursor control (e.g. VT52 and
VT100 The VT100 is a video terminal, introduced in August 1978 by Digital Equipment Corporation (DEC). It was one of the first terminals to support ANSI escape codes for cursor control and other tasks, and added a number of extended codes for special ...
) to provide a full-screen visual editor similar in function to the contemporaneously developed
Emacs Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
. TECO continues to be included in
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
by VSI, and is invoked with the EDIT/TECO command. A descendant of the version DEC distributed for the PDP-10 is still available on the Internet, along with several partial implementations for the
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few o ...
/
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
environment.


History

TECO was originally developed at MIT in around 1963 by Daniel L. Murphy for use on two
PDP-1 The PDP-1 (''Programmed Data Processor-1'') is the first computer in Digital Equipment Corporation's PDP series and was first produced in 1959. It is famous for being the computer most important in the creation of hacker culture at Massachusett ...
computers, belonging to different departments, both housed in MIT's Building 26. On these machines, the normal development process involved the use of a
Friden Flexowriter The Friden Flexowriter produced by the Friden Calculating Machine Company, was a teleprinter, a heavy-duty electric typewriter capable of being driven not only by a human typing, but also automatically by several methods, including direct atta ...
to prepare source code offline on a continuous strip of punched paper tape. Programmers of the big
IBM mainframe IBM mainframes are large computer systems produced by IBM since 1952. During the 1960s and 1970s, IBM dominated the large computer market. Current mainframe computers in IBM's line of business computers are developments of the basic design of th ...
s customarily punched their
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
on cards, using
key punch A keypunch is a device for precisely punching holes into stiff paper cards at specific locations as determined by keys struck by a human operator. Other devices included here for that same function include the gang punch, the pantograph punch, ...
es which printed human-readable
dot-matrix A dot matrix is a 2-dimensional patterned array, used to represent characters, symbols and images. Most types of modern technology use dot matrices for display of information, including mobile phones, televisions, and printers. The system is al ...
characters along the top of every card at the same time as they punched each machine-readable character. Thus IBM programmers could read, insert, delete, and move lines of code by physically manipulating the cards in the deck. Punched paper tape offered no such amenities, leading to the development of online editing. An early editor for the PDP-1 was named " Expensive Typewriter". Written by Stephen D. Piner, it was the most rudimentary imaginable line-oriented editor, lacking even search-and-replace capabilities. Its name was chosen as a wry poke at an earlier, rather bloated, editor called "
Colossal Typewriter Colossal Typewriter by John McCarthy and Roland Silver was one of the earliest computer text editors. The program ran on the PDP-1 at Bolt, Beranek and Newman (BBN) by December 1960.Eric Fischer (17 May 1999)CYHIST Community Memory: Discussion ...
". Even in those days, online editing could save time in the debugging cycle. Another program written by the PDP-1 hackers was
Expensive Desk Calculator Expensive Desk Calculator by Robert A. Wagner is thought to be computing's first interactive calculation program.Alan Kotok (15 May 2006)The Mouse That Roared: PDP-1 Celebration Event Lecture Computer History Museum (Google Video link). Retrieved ...
, in a similar vein. The original stated purpose of TECO was to make more efficient use of the PDP-1. As envisioned in the manual, rather than performing editing "expensively" by sitting at a
console Console may refer to: Computing and video games * System console, a physical device to operate a computer ** Virtual console, a user interface for multiple computer consoles on one device ** Command-line interface, a method of interacting with ...
, one would simply examine the faulty text and prepare a "correction tape" describing the editing operations to be performed on the text. One would efficiently feed the source tape and the correction tape into the PDP-1 via its high-speed (200 characters per second) reader. Running TECO, it immediately would punch an edited tape with its high-speed (60 characters per second) punch. One could then immediately proceed to load and run the assembler, with no time wasted in online editing. TECO's sophisticated searching operations were motivated by the fact that the offline Flexowriter printouts were not line-numbered. Editing locations therefore needed to be specified by context rather than by line number. The various looping and conditional constructs (which made TECO
Turing-complete In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any ...
) were included in order to provide sufficient descriptive power for the correction tape. The terse syntax minimized the number of keystrokes needed to prepare the correction tape. The correction tape was a program, and required debugging just like any other program. The pitfalls of even the simplest global search-and-replace soon became evident. In practice, TECO editing was performed online just as it had been with Expensive Typewriter (although TECO was certainly a more feature-complete editor than Expensive Typewriter, so editing was much more efficient with TECO). The original PDP-1 version had no screen display. The only way to observe the state of the text during the editing process was to type in commands that would cause the text (or portions thereof) to be typed out on the console typewriter. By 1964, a special Version of TECO (''TECO-6'') had been implemented on the
PDP-6 The PDP-6, short for Programmed Data Processor model 6, is a computer developed by Digital Equipment Corporation (DEC) during 1963 and first delivered in the summer of 1964. It was an expansion of DEC's existing 18-bit systems to use a 36-bit d ...
at MIT. That version supported visual editing, using a screen display that showed the contents of the editing buffer in real time, updating as it changed. Amongst the creators of TECO-6 were Richard Greenblatt and Stewart Nelson. At MIT, TECO development continued in the fall of 1971. Carl Mikkelsen had implemented a real-time edit mode loosely based on the TECO-6 graphic console commands, but working with the newly installed Datapoint-3300 CRT text displays. The TECO buffer implementation, however, was terribly inefficient for processing single character insert or delete functions—editing consumed 100% of the PDP-10. With Richard Greenblatt's support, in summer of 1972 Carl reimplemented the TECO buffer storage and reformed the macros as native PDP-10 code. As entering the real-time mode was by typing , this was known as control-R mode. At the same time, Rici Liknaitski added input-time macros (), which operated as the command string was read rather than when executed. Read-time macros made the TECO auxiliary text buffers, called Q-registers, more useful. Carl expanded the Q-register name space. With read-time macros, a large Q-register name space, and efficient buffer operations, the stage was set for binding each key to a macro. These edit macros evolved into
Emacs Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
. The VMS implementation has a long history - it began as TECO-8, implemented in PDP-8 assembly. This code was translated into PDP-11 assembly to produce TECO-11. TECO-11 was used in early versions of VAX/VMS in PDP-11 compatibility mode. It was later translated from PDP-11 assembly into VAX assembly to produce TECO32. TECO32 was then converted with the VEST and AEST binary translation utilities to make it compatible with OpenVMS on the
Alpha Alpha (uppercase , lowercase ; grc, ἄλφα, ''álpha'', or ell, άλφα, álfa) is the first letter of the Greek alphabet. In the system of Greek numerals, it has a value of one. Alpha is derived from the Phoenician letter aleph , whi ...
and
Itanium Itanium ( ) is a discontinued family of 64-bit Intel microprocessors that implement the Intel Itanium architecture (formerly called IA-64). Launched in June 2001, Intel marketed the processors for enterprise servers and high-performance comput ...
respectively.


OS/8 MUNG command

The OS/8 CCL MUNG command invoked TECO to read and execute the specified .TE TECO macro. Optional command line parameters gave added adaptability.


As a programmer's tool

During and shortly following the years of the punched card era, there were source programs that had begun as
punched card A punched card (also punch card or punched-card) is a piece of stiff paper that holds digital data represented by the presence or absence of holes in predefined positions. Punched cards were once common in data processing applications or to di ...
-based. Comments were often a series of lines that included single marginal asterisks and top/bottom full lines of asterisks. Once the cards were transferred online, it was a chore to realign the marginal stars. TECO to the rescue...


As a programming language

The obscurity of the TECO programming language is described in the following quote from "
Real Programmers Don't Use Pascal "Real Programmers Don't Use Pascal" (a parody of the bestselling 1982 tongue-in-cheek book on stereotypes about masculinity '' Real Men Don't Eat Quiche'') is an essay about computer programming written by Ed Post of Tektronix, Inc., and published ...
", a letter from Ed Post to Datamation, July 1983: According to Craig Finseth, author of ''The Craft of Text Editing'', TECO has been described as a " write-only" language, implying that once a program is written in TECO, it is extremely difficult to comprehend what it did without appropriate documentation. Despite its syntax, the TECO command language was tremendously powerful, and clones are still available for
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few o ...
and for
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
. TECO commands are characters (including control-characters), and the prompt is a single asterisk: * The escape key displays as a dollar sign, pressed once it delineates the end of a command requiring an argument and pressed twice initiates the execution of the entered commands: *$$


Example code

Given a file named hello.c with the following contents: int main(int argc, char **argv) one could use the following TECO session (noting that the prompt is "*" and "$" is how ESC is echoed) to change "Hello" into "Goodbye": *EBhello.c$$ Open file for read/write with backup *P$$ Read in the first page *SHello$0TT$$ Search for "Hello" and print the line (pointer placed after searched string) printf("Hello world!\n"); The line *-5DIGoodbye$0TT$$ Delete five characters before pointer (ie "Hello"), insert "Goodbye", and print the line printf("Goodbye world!\n"); The updated line *EX$$ Copy the remainder of the file and exit These two example programs are a simple interchange sort of the current text buffer, based on the 1st character of each line, taken from the PDP-11 TECO User's Guide. A "
goto GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function c ...
" and "
structured Structuring, also known as smurfing in banking jargon, is the practice of executing financial transactions such as making bank deposits in a specific pattern, calculated to avoid triggering financial institutions to file reports required by law ...
" version are shown.


Example 1

!START! j 0aua ! jump to beginning, load 1st char in register A ! !CONT! l 0aub ! load first char of next line in register B ! qa-qb"g xa k -l ga 1uz ' ! if A>B, switch lines and set flag in register Z ! qbua ! load B into A ! l z-."g -l @o/CONT/ ' ! loop back if another line in buffer ! qz"g 0uz @o/START/ ' ! repeat if a switch was made on last pass !


Example 2

0uz ! clear repeat flag ! B, switch lines and set flag ! qbua ! load B into A ! l .-z;> ! loop back if another line in buffer ! qz;> ! repeat if a switch was made last pass !


Notes


References

* * *


External links


Dan Murphy's personal sitePete Siemsen's TECO collection
Includes a TECO based on Pete Siemsen's TECOC and DECUS documentation. There are MS-DOS, Windows (console), Linux, Mac OS X, and OS/2 versions.
Introduction to the TECO syntaxTECO Information

TECO Manual (OS/8)
{{DEFAULTSORT:Text Editor And Corrector History of software Massachusetts Institute of Technology software OpenVMS text editors Line editor Text-oriented programming languages