TECO Pocket Guide

Contents

digital TECO Pocket Guide cover

NOTATION

TECO-8 refers to OS-8 TECO V5
TECO-10 refers to TOPS-10 TECO V24
TECO-11 refers to TECO-11 V29
RSX-11 encompasses RSX-11/D, RSX-11/M, IAS and VAX
$ represents an ESCAPE (ASCII code 33, which is traditionally referred to as ALTMODE)
<^x> represents a single control character (CONTROL-x)
^x represents either <^x> or the two-character sequence CARET-x (^x)
n represents a numeric value specified by a digit string or TECO command that returns a value

Color Coding

black represents features of all DEC TECO's [exceptions noted in brackets]
red represents features of TECO-10 only
blue represents features of TECO-11 only

 

Order No. AV-D53OA-TK

 

Copyright © 1978 by Digital Equipment Corporation

INVOKING TECO

OS/8

Command Line Effective Initial Command
R TECO
RUN dev:TECO
MAKE filespec EWfilespec$
TECO filespec EBfilespec$Y
TECO filespec1 <filespec2ERfilespec2$EWfilespec1$Y
TECO [note 1]
MUNG filespec ERfilespec$YHXYHKMY
MUNG filespec,text ERfilespec$YHXYHKItext$MY

RT-11

Command Line Effective Initial Command
R TECO
RUN dev:TECO
EDIT/TECO filespecEBfilespec$Y [note 2]

Switches on EDIT Command:

Command Line Effective Initial Command
/CREATE EWfilespec$
/INSPECT ERfilespec$Y
/OUTPUT:filespec2ERfilespec$EWfilespec2$
/EXECUTE ERfilespec$YHXZHKMZ
/EXECUTE:text ERfilespec$YHXZHKItext$MZ

RSTS/E

Command Line Effective Initial Command
TECO [note 1]
RUN $TECO
RUN dev:TECO[p,pn]
TECO filespec EBfilespec$Y
TECO filespec1=filespec2ERfilespec2$EWfilespec1$Y
TECO/INSPECTfilespec ERfilespec$Y
MAKE filespec EWfilespec$
MUNG filespec EIfilespec$
MUNG filespec,text Itext$EIfilespec$

RSX-11

Command Line Effective Initial Command
TECO
TECO filespec EBfilespec$Y
TECO filespec1=filespec2ERfilespec2$EWfilespec1$Y
MAKE filespec EWfilespec$
MUNG filespec EIfilespec$
MUNG filespec,text Itext$EIfilespec$

TOPS-10

Command Line Effective Initial Command
R TECO
RUN dev:TECO [p,pn] [note 3]
MAKE filespec EWfilespec$
TECO filespec EBfilespec$Y
TECO filespec1=filespec2EBfilespec1$Y
MAKE filespec1=filespec2ERfilespec2$EWfilespec1$Y
TECO [note 1]
MAKE [note 4]

IMMEDIATE MODE EDITING COMMANDS

$$ Executes command string
<rubout> Deletes last character in command string
<^C> Exits from TECO [note 5]
<^U> Deletes current line in command string
<^G><^G> Deletes the entire command string
<^G><space>Types current line of command string
<^G>* Types entire command string [not in TECO-10]

IMMEDIATE MODE AIDS

You must type these immediate mode commands as the first command after TECO's prompt.

? Types command string up to command that caused an error [note 6]
/ Types detailed explanation of error
*qStores previous command string in Q-register q [note 7] [not in TECO-8]

EXECUTION-TIME COMMANDS

<^C>Stops command execution [note 8]
<^O>Turns off type out; nullified by a second <^O>
<^S>Freezes terminal output; nullified by a <^Q> [note 9]

FILE SPECIFICATION COMMANDS

ERfilespec$Opens file for input
EWfilespec$Opens file for output [note 10]
EBfilespec$Opens file for input and output with backup protection
EZfilespec$Zeros (non-disk) directory and opens file for output
nEM Positions Magtape:
EMRewinds
1EMRewinds
3EMWrites EOF
6EMSkips one record
7EMBackspaces one record
8EMSkips to EOT
9EMRewinds and unloads
11EMWrites 3 inches blank tape
14EMAdvances one file
15EMBackspaces one file
ENfilespec$ Sets up wildcard file specification [not in RT-11]
EN$ Gets next wildcard match into filespec buffer [not in RT-11]
:ERfilespec$Same as Erfilespec$ but returns value: -1 if file found, 0 if file not found
:EBfilespec$Same as Ebfilespec$ but returns value: -1 if file found, 0 if file not found
:EN$ Same as EN$ but returns value: -1 if next file found, 0 if no more files match

FILE TERMINATION COMMANDS AND EXIT

EF Closes the output file
EC Moves the remainder of the input file to the output file, then closes the output file[not in TECO-10]
EX Same as EC but exits from TECO
EK Kills the output file [not in TECO-10]
EG$ Same as EX but re-executes the last compile-class command [note 11]
EGcommand$Same as EX but executes the operating system command specified [not in TECO-10]
^C Exits from TECO [note 12] [not in TECO-10]
^ZCloses output file and exits from TECO

AUXILIARY FILE SUPPORT [not in RT-11]

(See illustration below)

EP Switches to secondary input stream
ER$ Switches to primary input stream
EA Switches to secondary output stream
EW$ Switches to primary output stream
EIfilespec$Opens file for command input; effective at end of current command string
EI$ Switches command input to terminal and discards remainder of command file after current command string

FILE SPECIFICATIONS [note 3]

System Input Output
OS-8 dev:name.ex dev:name.ex
TOPS-10dev:name.ext[p,pn] dev:name.ext[p,pn]<prot>
RT-11 dev:name.ext dev:name.ext[len]
RSTS/E dev:[p,pn]name.ext dev:[p,pn]name.ext<prot>
RSX-11 dev:[p,pn]name.ext;verdev:[p,pn]name.ext;ver

FILE SPECIFICATION SWITCHES

TOPS-10/GENLSN Generates line sequence numbers
/SUPLSN Suppresses line sequence numbers
RSTS/E /MODE:n Uses nonstandard open mode
/CLUSTERSIZE:nSpecifies output file cluster size
/B+ Edits a BASIC-PLUS file
/B2 Edits a BASIC-PLUS-2 file (same as /72)
/n Handles BASIC-PLUS continuation character (&) in column n
RSX-11 /RW Rewinds before opening file (magtape only)
/CR Implied carriage control
/-CR No (internal) carriage control
/FT FORTRAN carriage control

INVOCATION SWITCHES

RSTS/E /SIZE:n starts with nK word editing area
/SIZE:+nstarts with extra nK words of editing area
RSX-11 /INC=n starts with extra nK words of editing area

PAGE MANIPULATION COMMANDS

A Appends next page of input file to text buffer
:A Appends next line of input file to text buffer
Y Same as HKA
PWOutputs current page and appends a form feed
nPWSame as n<PW>
m,nPWOutputs the characters between text buffer pointer positions m and n (without a form feed)
P Outputs the text buffer, clears the buffer, and reads the next page of the input file into the buffer; a form feed is appended to the output file if the last read was terminated with a form feed
nP Same as n<P>
m,nP Same as m,nPW

BUFFER POINTER POSITIONING COMMANDS

nJMoves pointer to immediately following the nth character in the text buffer
0JMoves pointer to beginning of buffer
JSame as 0J
nCAdvances pointer n positions
CSame as 1C
-CSame as -1C
nRBacks up pointer n positions (same as -nC)
RSame as 1R
-RSame as -1R
nLMoves pointer to beginning of nth line from current pointer position
LSame as 1L
-LSame as -1L

INSERTION COMMANDS

The pointer is positioned after the inserted text.

Itext$ Inserts the text specified
nI$ Inserts character whose ASCII code is n
<tab>text$ Inserts specified text preceded by a tab
^Itext$ Inserts specified text preceded by a tab
n\ Inserts current radix representation of n in text buffer (signed if current radix is decimal, unsigned if octal) [note 13]
FRtext$ Same as ^SDItext$

ARITHMETIC OPERATORS

Operators are evaluated from left to right.

+nSame as n
-nNegative of n
m+nAddition [note 14]
m-nSubtraction
m*nMultiplication
m/nDivision, remainder discarded
m&nBitwise logical AND
m#nBitwise logical OR
(m)Performs enclosed operations first
n^_One's complement of n

ARITHMETIC PRECISION

TECO-8 1-2^12 <= n <= 2^12-1
TECO-11 -2^15 <= n <= 2^15-1
TECO-10 -2^35 <= n <= 2^35-1

TYPE-OUT COMMANDS

nT Types out all the text from the current pointer position to the beginning of the nth line from the current pointer position
T Same as 1T
-T Same as -1T
m,nT Types the characters between pointer positions m and n
nV Same as (1-n)TnT
V Same as 0TT
^Atext<^A>Types the text specified
n= Types value of n in decimal (signed) followed by <CR><LF>
n== Types value of n in octal [note 15] followed by <CR><LF>
n:= Types value of n in decimal (signed) [not in TECO-10]
n:== Types value of n in octal (unsigned) [not in TECO-10]
n^T Types out the character whose ASCII code is n [not in TECO-10]
^L Types a form feed [not in TECO-8]

DELETION COMMANDS

nDDeletes n characters following the current pointer position
-nDDeletes n characters preceding the current pointer position
DSame as 1D
-DSame as -D
m,nDSame as m,nK
nKDeletes all characters in the text buffer from the current pointer position to the beginning of the nth line from the current pointer position
KSame as 1K
-KSame as -1K
m,nKDeletes all characters in the text buffer between pointer positions m and n; the pointer moves to position m

BUFFER POSITIONS

B First pointer position; same as 0
Z Last pointer position; equal to number of characters in text buffer
. Current pointer position; equal to number of characters to the left of the pointer
m,n(m+1)st through nth characters in the text buffer
H Same as B,Z
^Y Same as .+^S,.

SEARCH COMMANDS

Searches that fail leave the pointer at position 0
Successful searches leave pointer after text found

nStext$ Searches for the nth occurrence of the specified text (following the pointer), but does not go beyond the end of the current text buffer
Stext$ Same as 1Stext$
-nStext$ Same as nStext$ but the search proceeds backwards
nNtext$ Same as nStext$, except that if the text is not found on the current page, pages are input and output until it is found
Ntext$ Same as 1Ntext$
n_text$ Same as nNtext$, except that it does input only, no output
_text$ Same as 1_text$
nFStext1$text2$ Executes the nStext1$ command, then deletes text1 and replaces it with text2
FStext1$text2$ Same as 1FStext1$text2$
nFNtext1$text2$ Executes the nNtext1$ command, then deletes text1 and replaces it with text2
FNtext1$text2$ Same as 1FNtext1$text2$
nF_text1$text2$Executes the n_text1$ command, then deletes text1 and replaces it with text2
F_text1$text2$Same as 1F_text1$text2$

BOUNDED SEARCH

Bounded searches that fail leave the pointer unchanged

m,nStext$Same as nStext$, but the search does not continue across more than |m|-1 characters
0,nStext$Same as nStext$, but the pointer position remains unchanged on search string failure
m,Stext$Same as m,1Stext$
m,-Stext$Same as m,-1Stext$
::Stext$Same as 1,1:Stext$ (anchored search)

COLON MODIFIED SEARCHES

Any search command preceded by a colon (:) modifier returns a value as follows:

-1If the search succeeds
0If the search fails

NUMERIC QUANTITIES

0AASCII code for character following pointer
nAASCII code for the (.+n+l)th character in the buffer [note 16][not in TECO-10]
\Equal to the value of the digit string (if any) that follows the pointer in the text buffer (interpreted in the current radix [note 13], and optionally signed); pointer is positioned after the digit string. Equal to 0 if no digit string is present.
^BOperating-system dependent encoding of current date
RT-11: (((month*32)+day)*32)+year-1972
RSTS/E:((year-1970)*1000)+day within year
RSX-11:((year-1900)*16+month)*32+day
^FValue of console switch register
^HOperating system dependent encoding of time of day
OS-8: 0
RT-11: 0
RSTS/E: minutes until midnight
RSX-11: (seconds since midnight)/2
TOPS-10:60ths of a second since midnight
:QqNumber of characters stored in Q-register q
n^QNumber of characters between the buffer pointer and the nth line separator from the current pointer position
^QSame as 1^Q
^SNegative of length of last insert, string found, or string inserted with G command, whichever occurred last
^TASCII code for the next character typed at the terminal
^^xASCII code for the character (x) specified

ITERATION AND FLOW CONTROL

n<commands>Performs the enclosed command string n times; skips the commands if n <= 0
<commands> Performs the enclosed command string an indefinite number of times
n; If n >= 0, jumps out of the current iteration field
; Jumps out of the current iteration field if the last search executed failed [note 17]
!tag! Defines a position in the command string with the name, tag
Otag$ Jumps to the position defined by !tag!; must be in same macro level [note 18]

@ MODIFIER

@ Modifies the next command that takes a text argument to use the delimiter form; text is surrounded by a delimiter (shown here as "/") that cannot appear inside the text. The format of the commands becomes:

@nS/text/
@nN/text/
@n_/text/
@nFS/textl/text2/
@nFN/textl/text2/
@I/text/
@nI//
@ER/filespec/ [not in TECO-10]
@EW/filespec/ [not in TECO-10]
@EB/filespee/ [not in TECO-10]
@^Uq/text/ [not in TECO-10]
@EG/text/ [not in TECO-10]
@EG// [not in TECO-10]
@EN/filespec/
@EI/filespec/
@FR/text/
@^A/text/
@!/tag/
@O/tag/
@n^Uq//

CONDITIONAL COMMANDS

n"Acommands'Executes the commands if n is the ASCII code for an alphabetic character (A-Z or a-z)[not in TECO-8]
n"Ccommands'Executes the commands if n is the ASCII code for a symbol constituent
TECO-8: A-Z,a-z,0-9
TECO-11:A-Z,a-z,0-9,.,$
TECO-10:A-Z,a-z,0-9,.,$,%
n"Dcommands'Executes the commands if n is the ASCII code for a digit (0-9) [not in TECO-8]
n"Ecommands'Executes the commands if n=0
n"Fcommands'Executes the commands if n represents FALSE; same as n"Ecommands'
n"Gcommands'Executes the commands if n>0
n"Lcommands'Executes the commands if n<0
n"Ncommands'Executes the commands if n*0
n"Rcommands'Executes the commands if n is the ASCII code for an alphanumeric (A-Z,a-z,0-9) [not in TECO-10]
n"Scommands'Executes the commands if n represents SUCCESS; same as n"Lcommands'
n"Tcommands'Executes the commands if n represents TRUE; same as n"Lcommands'
n"Ucommands'Executes the commands if n represents UNSUCCESSFUL; same as n"Ecommands'
n"Vcommands'Executes the commands if n is the ASCII code for a lower case alphabetic (a-z) [not in TECO-8]
n"Wcommands'Executes the commands if n is the ASCII code for an upper case alphabetic (A-Z)[not in TECO-8]
n"<commands'Same as n"Lcommands'[not in TECO-10]
n">commands'Same as n"Gcommands'[not in TECO-10]

Q-REGISTER LOADING [note 19]

nUq Stores integer n in Q register q
%q Adds 1 to the number in Q-register q and returns this value
n%q Adds n to the number in Q-register q and returns this value [note 20] [not in TECO-10]
nXq Stores, in Q-register q, all characters from the current pointer position to the beginning of the nth line from the current pointer position
m,nXq Stores, in Q-register q, all characters between text buffer pointer positions m and n
Xq Same as 1Xq
-Xq Same as -1Xq
n:Xq Same as nXq, but appends to Q-register
m,n:Xq Same as m,nXq, but appends to Q-register
:Xq Same as 1:Xq
-:Xq Same as -1:Xq
^Uqtext$Stores the specified text in Q-register q [not in TECO-10]
:^Uqtext$ Same as ^Uqtext$, but appends to Q-register q
n^Uq$ Stores character whose ASCII code is n in Q-register q
n:^Uq$ Appends character whose ASCII code is n to contents of Q-register q
]q Pops from the Q-register push-down list into Q-register q [note 21] [not in TECO-8]
:]q Same as ]q, but returns value (-1 if successful, 0 if push down stack was empty) 

Q-REGISTER RETRIEVAL [note 19]

QqReturns the numeric value stored in Q-register q
GqPlaces the text in Q-register q into the text buffer before the current pointer position
:GqTypes the contents of the text stored in Q-register q on the terminal [not in TECO-10]
MqExecutes the text in Q-register q as a command string
nMqExecutes the text in Q-register q as a command string and uses n as a numeric argument for the first command executed
m,nMqExecutes the text in Q-register q as a command string and uses m,n as a pair of numeric arguments for the first command executed
[qPushes the contents of Q-register q onto the Q-register push-down list [note 21]
G*Places the text from the filespec buffer into the text buffer before the current pointer position
:G*Types the contents of the filespec buffer on the terminal
G_Places the text from the search string buffer into the text buffer before the current pointer position
:G_Types the contents of the search string buffer on the terminal

RETRIEVING MODE CONTROL FLAGS

Flag Name Initial ValueCondition
^EForm feed flag 0
^NEnd-of-file flag 0
^XSearch Mode Flag 0
EDEdit level flag 0 [RT-11]
0 [RSTS/E]
1 [RSX-11]
EHHelp level flag 2 [TECO-10]
0 [other systems]
EOVersion number flag 2 [TECO-10]
5 [TECO-8]
29 [TECO-11]
ESSearch verification flag 0
ETTerminal mode flag
TECO-10: 0
TECO-8: 0 if SET TTY NOSCOPE
2 if SET TTY SCOPE
TECO-11:
Bit ValueInitial Value
10
21if terminal is a scope
0if terminal is not a scope
41if terminal has lower case input
0if terminal does not have lower case input
80
160
320
640
1281before TECO's prompt
0after TECO's prompt
2560
5121if terminal is VT52 and VT52 support is available
0if VT52 support is not available
10241if VT11 is present and VT11 support is available
0if VT11 support is not available
EUUpper/lower case flag
-1if terminal supports lower case
0if terminal does not support lower case [note 22]
EVEdit verify flag 0

SETTING MODE CONTROL FLAGS

CommandBitValueMeaning
nED10^ in search arguments means next character is CTRL
1^ in search arguments means ^
20disables Y or _ if data would be lost
1no Yank protection
nEH1,2 0same as 2
1types 3-letter error code only
2types error code and short message
3types error code and long message
4Simulates ? after error
nEOm*256+nESAllows EO version n features to work
n = 0 nothing is typed out after searches
n = -1 an effective mV command is executed when a search is completed
1 <= n <= 31<LF> represents the pointer
32 <= n <= 126ASCII code for character to represent the pointer
m <= 0m is treated as 1 [TECO-10 ignores m]
nETSets terminal characteristics [note 23]
Bit ValueMeaning if 1
1type-out is in image mode
2terminal is a scope
4reads lower case
8^T reads with no echo
16cancels <^O> on type-out
32^T reads with no wait (^T returns -1 if no input)
64detached flag
128aborts on error
256truncates output to terminal width
512terminal is VT52 and VT52 support is available
1024VT11 is present and VT11 support is available
32768Traps <^C>'s (Reset if <^C> typed)
nEU 0flags lower case characters
>0flags upper case characters
<0no case flagging on output [note 22]
nEVSame as nES but lines to be viewed appear before TECO's prompt
n^X0either case matches in searches
1exact case matches required [not in TECO-8]

RADIX CONTROL [note 13]

^OSwitches to octal radix [note 24]
^DSwitches to decimal radix[not in TECO-10]

TRACE CONTROL

?Enters trace mode; nullified by a 2nd ?

VT52 SCOPE CONTROL

-1WUpdates window into text buffer
0WResets cursor line to default position
nWIf n>0, sets cursor to line n
If n<-1, "forgets" top |n|-1 lines of screen

VR12, VT11, or VS60 SCOPE CONTROL [not in TECO-10]

WUpdates window into text buffer
nWSets window display to n lines on either side of pointer

CASE CONTROL

^VEnters translate to lower case mode
^WEnters translate to upper case mode

MATCH CONTROL CONSTRUCTS

(Match control constructs are valid inside search strings)

<^X> Accepts any character
<^S> Accepts any non-alphanumeric separator [note 25]
<^N> Accepts any character except a character matched by the following character (or match control construct)
<^E>A Accepts any alphabetic character (A-Z or a-z)
<^E>C Accepts any symbol constituent
TECO-11: A-Z,a-z,0-9,.,$
<^E>D Accepts any digit (0-9) [not in TECO-8]
<^E>Gq Accepts any character in Q-register q
<^E>L Accepts any line terminator (<LF>,<VT>,<FF>) [not in TECO-8]
<^E>R Accepts any alphanumeric (A-Z,0-9)
<^E>S Accepts any non-null string of spaces and/or tabs [not in TECO-8]
<^E>V Accepts any lower case alphabetic (a-z) [not in TECO-8]
<^E>W Accepts any upper case alphabetic (A-Z) [not in TECO-8]
<^E>X Same as <^X>
<^E><nnn>Accepts the character whose ASCII code (in octal) is nnn
<^E>[a,b,c,...]Accepts exclusive OR of the character or match control constructs specified

SEARCH STRING BUILDING CHARACTERS

The following characters have special meaning when used inside a search string.

<^Q> Uses the next character literally [note 26]
<^V> Converts next character, if alphabetic, to lower case [not in TECO-8]
<^W> Converts next character, if alphabetic, to upper case [not in TECO-8]
<^^> Converts next character (if it is @,[,\,],^, or _) to lower case
<^R> Uses the next character literally
<^V><^V> Converts all following alphabetic characters to lower case
<^W><^W> Converts all following alphabetic characters to upper case
<^T> Treats all succeeding control characters except <^R> and <^T> as text; nullified by a second <^T>
<^\> Accepts either case for all succeeding alphabetic characters; nullified by a second <^\>
^ If ED&1=0, converts the following alphabetic character to the corresponding control character
<^E>Qq Uses the string stored in Q-register q at this position
<^E>Q* Uses the string stored in the filespec buffer at this position
<^E>Q_ Uses the string stored in the search string buffer at this position

INSERT STRING BUILDING CHARACTERS

The following characters have special meaning when used inside insert strings on TECO-10. They have the same meaning that they have when used inside search strings.

<^V><^V> <^V>
<^W><^W> <^W>
<^R> <^^>
<^T>

ERROR MESSAGES

Code Explanation
?ARGImproper arguments
?BAKCannot delete old backup file
?BNI> not in an iteration
?CORSame as ?MEM
?CCLCCL not found or EG argument too big
?COSContradictory output switches
?CPOCannot pop Q-register
?DEVInvalid device
?DIODirectory I/O error
?DTBDelete too big
?EBDBad EB device
?EBFBad EB filename
?EBOSame as ?OFO
?EBPEB illegal because of protection
?EEEUnable to read error message file
?EMAEM with illegal argument
?EMDEM with no input device open
?ENTEnter error
?EOABad argument to ED
?ERRRSTS/E monitor call failed
?FERFile error
?FNFFile not found
?FULOutput command would have overflowed device (In TECO-10, same as ?NRO)
?IABInvalid nesting of <...> or (...)
?ICEIllegal CTRL/E command in search argument
?ICTIllegal control character in text argument
?IDVBad input device
?IECIllegal character after E
?IEMRe-init failure after EM
?IFCIllegal character after F
?IFNBad filename
?IIAIllegal insert argument
?ILLIIlegal command
?ILNSame as ?OCT
?ILRCannot lookup input file to rename it
?INPInput error
?IOSIllegal character in I/O switch
?IQCIllegal character after "
?IQNIllegal Q-register name
?IRBCannot rename input filename
?IRNFailure in rename process
?ISAIIlegal search argument
?ISSIllegal search string
?MAPMissing '
?MEEMacro ending with E
?MEFMacro ending with F
?MEMStorage capacity exceeded
?MEOMacro ending with O
?MEQMacro ending with "
?MEUMacro ending with U
?MFNMissing filename
?MIQMissing Q-register name
?MLASame as ?BNI
?MLPMissing (
?MRAMissing >
?MRPMissing )
?MUUMacro ending with ^^
?NABNo argument before ^_
?NACTECO-11: No argument before ,
TECO-8: Negative argument to ,
?NAENo argument before =
?NAINo altmode after nI
?NAPTECO-11: Same as ?MLP
TECO-8: Negative or 0 argument to P
?NAQNo argument before "
?NAGTECO-11: No argument before ;
TECO-8: Negative or 0 argument to search
?NAUNo argument before U
?NAYNumeric argument with Y
?NCSNo command string seen prior to *q
?NFINo file for input
?NFONo file for output
?NNQNo number in Q-register
?NRONo room for output
?NTQNo text in Q-register
?NYICommand not yet implemented
?OCT8 or 9 in octal digit string
?ODVOutput device not available
?OFOOutput file already open
?OLRCannot lookup output file to rename it
?OUTOutput error
?PARConfused use of parentheses
?PDOPush-down list overflow
?POPAttempt to move pointer off page
?PPNIllegal PPN
?QMOQ-register memory overflow
?RNQCannot rename output file
?SALSecond argument less than first
?SNAInitial search with no argument
?SNI; not in an iteration
?SRHSearch failure
?STCSearch string has too many characters
?STLSearch string too long
?TAGMissing tag
?TALTwo arguments with L
?TTLTag too long
?TTYIllegal TTY device
?UCAUnterminated ^A command
?UEAUnimplemented EA
?UEIUnimplemented EI
?UENUnimplemented EN
?UEPUnimplemented EP
?UFSMacro ending with unterminated file select
?UINUnterminated insert command
?UIGUndefined I/O switch
?USRUnterminated search command
?UTCUnterminated command
?UTGUnterminated tag
?UTMUnterminated macro
?UUOIllegal UUO
?WLOSystem device is write looked
?XABExecution aborted by ^C
?YCAY command aborted
?nnnRSX-11 monitor call failed

OCTAL AND DECIMAL ASCII CODES

chr OCTDEC
nul 000000
^A 001001
^B 002002
^C 003003
^D 004004
^E 005005
^F 006006
^G 007007
^H 010008
tab 011009
lf 012010
vt 013Oil
ff 014012
cr 015013
^N 016014
^O 017015
^P 020016
^O 021017
^R 022018
^S 023019
^T 024020
^U 025021
^V 026022
^W 027023
^X 030024
^Y 031025
^Z 032026
esc 033027
fs 034028
gs 035029
rs 036030
us 037031
chr OCTDEC
sp 040032
! 041033
" 042034
# 043035
$ 044036
% 045037
&046038
' 047039
( 050040
) 051041
* 052042
+ 053043
, 054044
- 055045
. 056046
/ 057047
0 060048
1 061049
2 062050
3 063051
4 064052
5 065053
6 066054
7 067055
8 070056
9 071057
: 072058
; 073059
< 074060
= 075061
> 076062
? 077063
chr OCTDEC
@ 100064
A 101065
B 102066
C 103067
D 104068
E 105069
F 106070
G 107071
H 110072
I 111073
I 112074
K 113075
L 114076
M 115077
N 116078
0 117079
P 120080
Q 121081
R 122082
S 123083
T 124084
U 125085
V 126086
W 127087
X 130088
Y 131089
Z 132090
[ 133091
\ 134092
] 135093
^ 136094
_ 137095
chr OCTDEC
` 140096
a 141097
b 142098
c 143099
d 144100
e 145101
f 146102
g 147103
h 150104
i 151105
j 152106
k 153107
l 154108
m 155109
n 156110
o 157111
p 160112
q 161113
r 162114
s 163115
t 164116
u 165117
v 166118
w 167119
x 170120
y 171121
z 172122
{ 173123
| 174124
} 175125
~ 176126
del 177127

NOTES

[1]Re-executes last TECO command. Ignores filespec2, if present on previous command
[2]/TECO switch not necessary if SET EDITOR TECO command has been previously specified
[3]SFD's allowed in TOPS-10
[4]Re-executes last MAKE command
[5]TECO under RSTS/E and OS/8 requires two <^C>s. <^C> is not an immediate mode command in RT-11 and RSX-11
[6]TECO-10 types the last 10 characters of the command string before the error occurred
[7]Not an immediate mode command in TECO-10 (execution is deferred until next wake-up character). In TECO-8, the immediate mode command <^Z> is the same as *Z
[8]Two <^C>s may be necessary on systems that support type-ahead
[9]Only if feature is enabled in the operating system
[10]TECO-10 closes any previous file.
[11]Not in RSTS. TECO-10 does not require $
[12]On TECO-11, ^C in a macro returns control to TECO's prompt
[13]TECO-10 has no general octal radix mode
[14]In TECO-10, a space between two numbers also acts as an addition
[15]TECO-10 prints signed result; TECO-8 and TECO-11 print unsigned result
[16]On TECO-10, nA is the same as 0A
[17]Must immediately follow search in TECO-11
[18]Cannot jump to before start of current iteration in TECO-8 or TECO-11
[19]TECO-10 stores either text or numeric data (but not both simultaneously) in a single area within the Q-register
[20]Same as 1%q in TECO-10
[21]Arguments "pass through" this command in TECO-11
[22]On TECO-10, no case flagging occurs if the terminal supports lower case, regardless of state of EU flag
[23]TECO-10 uses only bit value 1, TECO-8 uses only bit values 1, 2, and 8
[24]In TECO-10, ^O must be followed by a digit string and the octal radix mode applies only to this string
[25]TECO-10 allows begin of buffer,.,$, and % to match
[26]Cannot quote $ on TECO-10

NOVICE SUBSET OF TECO

These commands allow you to do most common editing jobs on all versions of TECO.

MAKE file Creates a new file (under RT-11, use CREATE command)
TECO file Edits an existing file (under RT-11, use EDIT command)
J Moves pointer to beginning of buffer
ZJ Moves pointer to end of buffer
L Advances pointer to beginning of next line
nL Advances pointer n lines
-nL Moves pointer back n lines
0L Moves pointer to beginning of current line
C Advances pointer across one character
nC Advances pointer across n characters
-nC Moves pointer backwards across n characters
T Types text from current pointer position to end of current line
nT Types n lines on terminal
HT Types entire content of text buffer
0TT Types current line
Itext$ Inserts text before current pointer position
K Deletes text from current pointer position to end of line
nK Deletes n lines of text
HK Deletes entire content of text buffer
D Deletes the character following the pointer
nD Deletes n characters after the pointer
-nD Deletes n characters before the pointer
P Outputs the current page and reads in the next page
nP Executes the P command n times
A Append the next input page to the end of the buffer
EX Moves the remainder of the input file to the output file, closes the output file, and exits from TECO
Stext$ Beginning at the current pointer position, searches for the specified text on the current page. The buffer pointer is positioned after the specified text if it is found. If the text is not found, an error message is given and the buffer pointer is left at the beginning of the page
Ntext$ Same as Stext$ except that the search continues across page boundaries, if necessary, until the string or the end of the input file is encountered
FStext1$text2$Searches for text1 and, if found, replaces it with text2