You must type these immediate mode commands as the first command after TECO's prompt.
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: |
|
EM | Rewinds |
1EM | Rewinds |
3EM | Writes EOF |
6EM | Skips one record |
7EM | Backspaces one record |
8EM | Skips to EOT |
9EM | Rewinds and unloads |
11EM | Writes 3 inches blank tape |
14EM | Advances one file |
15EM | Backspaces 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 |
The pointer is positioned after the inserted text.
Operators are evaluated from left to right.
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$ |
0A | ASCII code for character following pointer |
nA | ASCII 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. |
^B | Operating-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 |
|
^F | Value of console switch register |
^H | Operating 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 |
|
:Qq | Number of characters stored in Q-register q |
n^Q | Number of characters between the buffer pointer and the nth line separator from the current pointer position |
^Q | Same as 1^Q |
^S | Negative of length of last insert, string found, or string inserted with G command, whichever occurred last |
^T | ASCII code for the next character typed at the terminal |
^^x | ASCII code for the character (x) specified |
@ 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:
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] |
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) | |
Qq | Returns the numeric value stored in Q-register q |
Gq | Places the text in Q-register q into the text buffer before the current pointer position |
:Gq | Types the contents of the text stored in Q-register q on the terminal | [not in TECO-10] |
Mq | Executes the text in Q-register q as a command string |
nMq | Executes the text in Q-register q as a command string and uses n as a numeric argument for the first command executed |
m,nMq | Executes 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 |
[q | Pushes 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 |
Flag | Name | Initial Value | Condition |
^E | Form feed flag | 0 |
^N | End-of-file flag | 0 |
^X | Search Mode Flag | 0 |
ED | Edit level flag | 0 [RT-11] |
| | 0 [RSTS/E] |
| | 1 [RSX-11] |
EH | Help level flag | 2 [TECO-10] |
| | 0 [other systems] |
EO | Version number flag | 2 [TECO-10] |
| | 5 [TECO-8] |
| | 29 [TECO-11] |
ES | Search verification flag | 0 |
ET | Terminal mode flag |
| TECO-10: | 0 |
| TECO-8: | 0 | if SET TTY NOSCOPE |
| | 2 | if SET TTY SCOPE |
| TECO-11: |
| Bit Value | Initial Value |
| 1 | 0 |
| 2 | 1 | if terminal is a scope |
| | 0 | if terminal is not a scope |
| 4 | 1 | if terminal has lower case input |
| | 0 | if terminal does not have lower case input |
| 8 | 0 |
| 16 | 0 |
| 32 | 0 |
| 64 | 0 |
| 128 | 1 | before TECO's prompt |
| | 0 | after TECO's prompt |
| 256 | 0 |
| 512 | 1 | if terminal is VT52 and VT52 support is available |
| | 0 | if VT52 support is not available |
| 1024 | 1 | if VT11 is present and VT11 support is available |
| | 0 | if VT11 support is not available |
EU | Upper/lower case flag |
| | -1 | if terminal supports lower case |
| | 0 | if terminal does not support lower case [note 22] |
EV | Edit verify flag | 0 |
Command | Bit | Value | Meaning |
nED | 1 | 0 | ^ in search arguments means next character is CTRL |
| | 1 | ^ in search arguments means ^ |
| 2 | 0 | disables Y or _ if data would be lost |
| | 1 | no Yank protection |
nEH | 1,2 | 0 | same as 2 |
| | 1 | types 3-letter error code only |
| | 2 | types error code and short message |
| | 3 | types error code and long message |
| | 4 | Simulates ? after error |
nEO | | m*256+nES | Allows 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 <= 126 | ASCII code for character to represent the pointer |
| | m <= 0 | m is treated as 1 | [TECO-10 ignores m] |
nET | | | Sets terminal characteristics [note 23] |
| | Bit Value | Meaning if 1 |
| | 1 | type-out is in image mode |
| | 2 | terminal is a scope |
| | 4 | reads lower case |
| | 8 | ^T reads with no echo |
| | 16 | cancels <^O> on type-out |
| | 32 | ^T reads with no wait (^T returns -1 if no input) |
| | 64 | detached flag |
| | 128 | aborts on error |
| | 256 | truncates output to terminal width |
| | 512 | terminal is VT52 and VT52 support is available |
| | 1024 | VT11 is present and VT11 support is available |
| | 32768 | Traps <^C>'s (Reset if <^C> typed) |
nEU | | 0 | flags lower case characters |
| | >0 | flags upper case characters |
| | <0 | no case flagging on output [note 22] |
nEV | | | Same as nES but lines to be viewed appear before TECO's prompt |
n^X | | 0 | either case matches in searches |
| | 1 | exact case matches required | [not in TECO-8] |
<^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 |
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 |
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.
Code | Explanation |
?ARG | Improper arguments |
?BAK | Cannot delete old backup file |
?BNI | > not in an iteration |
?COR | Same as ?MEM |
?CCL | CCL not found or EG argument too big |
?COS | Contradictory output switches |
?CPO | Cannot pop Q-register |
?DEV | Invalid device |
?DIO | Directory I/O error |
?DTB | Delete too big |
?EBD | Bad EB device |
?EBF | Bad EB filename |
?EBO | Same as ?OFO |
?EBP | EB illegal because of protection |
?EEE | Unable to read error message file |
?EMA | EM with illegal argument |
?EMD | EM with no input device open |
?ENT | Enter error |
?EOA | Bad argument to ED |
?ERR | RSTS/E monitor call failed |
?FER | File error |
?FNF | File not found |
?FUL | Output command would have overflowed device (In TECO-10, same as ?NRO) |
?IAB | Invalid nesting of <...> or (...) |
?ICE | Illegal CTRL/E command in search argument |
?ICT | Illegal control character in text argument |
?IDV | Bad input device |
?IEC | Illegal character after E |
?IEM | Re-init failure after EM |
?IFC | Illegal character after F |
?IFN | Bad filename |
?IIA | Illegal insert argument |
?ILL | IIlegal command |
?ILN | Same as ?OCT |
?ILR | Cannot lookup input file to rename it |
?INP | Input error |
?IOS | Illegal character in I/O switch |
?IQC | Illegal character after " |
?IQN | Illegal Q-register name |
?IRB | Cannot rename input filename |
?IRN | Failure in rename process |
?ISA | IIlegal search argument |
?ISS | Illegal search string |
?MAP | Missing ' |
?MEE | Macro ending with E |
?MEF | Macro ending with F |
?MEM | Storage capacity exceeded |
?MEO | Macro ending with O |
?MEQ | Macro ending with " |
?MEU | Macro ending with U |
?MFN | Missing filename |
?MIQ | Missing Q-register name |
?MLA | Same as ?BNI |
?MLP | Missing ( |
?MRA | Missing > |
?MRP | Missing ) |
?MUU | Macro ending with ^^ |
?NAB | No argument before ^_ |
?NAC | TECO-11: No argument before , |
| TECO-8: Negative argument to , |
?NAE | No argument before = |
?NAI | No altmode after nI |
?NAP | TECO-11: Same as ?MLP |
| TECO-8: Negative or 0 argument to P |
?NAQ | No argument before " |
?NAG | TECO-11: No argument before ; |
| TECO-8: Negative or 0 argument to search |
?NAU | No argument before U |
?NAY | Numeric argument with Y |
?NCS | No command string seen prior to *q |
?NFI | No file for input |
?NFO | No file for output |
?NNQ | No number in Q-register |
?NRO | No room for output |
?NTQ | No text in Q-register |
?NYI | Command not yet implemented |
?OCT | 8 or 9 in octal digit string |
?ODV | Output device not available |
?OFO | Output file already open |
?OLR | Cannot lookup output file to rename it |
?OUT | Output error |
?PAR | Confused use of parentheses |
?PDO | Push-down list overflow |
?POP | Attempt to move pointer off page |
?PPN | Illegal PPN |
?QMO | Q-register memory overflow |
?RNQ | Cannot rename output file |
?SAL | Second argument less than first |
?SNA | Initial search with no argument |
?SNI | ; not in an iteration |
?SRH | Search failure |
?STC | Search string has too many characters |
?STL | Search string too long |
?TAG | Missing tag |
?TAL | Two arguments with L |
?TTL | Tag too long |
?TTY | Illegal TTY device |
?UCA | Unterminated ^A command |
?UEA | Unimplemented EA |
?UEI | Unimplemented EI |
?UEN | Unimplemented EN |
?UEP | Unimplemented EP |
?UFS | Macro ending with unterminated file select |
?UIN | Unterminated insert command |
?UIG | Undefined I/O switch |
?USR | Unterminated search command |
?UTC | Unterminated command |
?UTG | Unterminated tag |
?UTM | Unterminated macro |
?UUO | Illegal UUO |
?WLO | System device is write looked |
?XAB | Execution aborted by ^C |
?YCA | Y command aborted |
?nnn | RSX-11 monitor call failed |
chr | OCT | DEC |
nul | 000 | 000 |
^A | 001 | 001 |
^B | 002 | 002 |
^C | 003 | 003 |
^D | 004 | 004 |
^E | 005 | 005 |
^F | 006 | 006 |
^G | 007 | 007 |
^H | 010 | 008 |
tab | 011 | 009 |
lf | 012 | 010 |
vt | 013 | Oil |
ff | 014 | 012 |
cr | 015 | 013 |
^N | 016 | 014 |
^O | 017 | 015 |
^P | 020 | 016 |
^O | 021 | 017 |
^R | 022 | 018 |
^S | 023 | 019 |
^T | 024 | 020 |
^U | 025 | 021 |
^V | 026 | 022 |
^W | 027 | 023 |
^X | 030 | 024 |
^Y | 031 | 025 |
^Z | 032 | 026 |
esc | 033 | 027 |
fs | 034 | 028 |
gs | 035 | 029 |
rs | 036 | 030 |
us | 037 | 031 |
|
chr | OCT | DEC |
sp | 040 | 032 |
! | 041 | 033 |
" | 042 | 034 |
# | 043 | 035 |
$ | 044 | 036 |
% | 045 | 037 |
& | 046 | 038 |
' | 047 | 039 |
( | 050 | 040 |
) | 051 | 041 |
* | 052 | 042 |
+ | 053 | 043 |
, | 054 | 044 |
- | 055 | 045 |
. | 056 | 046 |
/ | 057 | 047 |
0 | 060 | 048 |
1 | 061 | 049 |
2 | 062 | 050 |
3 | 063 | 051 |
4 | 064 | 052 |
5 | 065 | 053 |
6 | 066 | 054 |
7 | 067 | 055 |
8 | 070 | 056 |
9 | 071 | 057 |
: | 072 | 058 |
; | 073 | 059 |
< | 074 | 060 |
= | 075 | 061 |
> | 076 | 062 |
? | 077 | 063 |
|
chr | OCT | DEC |
@ | 100 | 064 |
A | 101 | 065 |
B | 102 | 066 |
C | 103 | 067 |
D | 104 | 068 |
E | 105 | 069 |
F | 106 | 070 |
G | 107 | 071 |
H | 110 | 072 |
I | 111 | 073 |
I | 112 | 074 |
K | 113 | 075 |
L | 114 | 076 |
M | 115 | 077 |
N | 116 | 078 |
0 | 117 | 079 |
P | 120 | 080 |
Q | 121 | 081 |
R | 122 | 082 |
S | 123 | 083 |
T | 124 | 084 |
U | 125 | 085 |
V | 126 | 086 |
W | 127 | 087 |
X | 130 | 088 |
Y | 131 | 089 |
Z | 132 | 090 |
[ | 133 | 091 |
\ | 134 | 092 |
] | 135 | 093 |
^ | 136 | 094 |
_ | 137 | 095 |
|
chr | OCT | DEC |
` | 140 | 096 |
a | 141 | 097 |
b | 142 | 098 |
c | 143 | 099 |
d | 144 | 100 |
e | 145 | 101 |
f | 146 | 102 |
g | 147 | 103 |
h | 150 | 104 |
i | 151 | 105 |
j | 152 | 106 |
k | 153 | 107 |
l | 154 | 108 |
m | 155 | 109 |
n | 156 | 110 |
o | 157 | 111 |
p | 160 | 112 |
q | 161 | 113 |
r | 162 | 114 |
s | 163 | 115 |
t | 164 | 116 |
u | 165 | 117 |
v | 166 | 118 |
w | 167 | 119 |
x | 170 | 120 |
y | 171 | 121 |
z | 172 | 122 |
{ | 173 | 123 |
| | 174 | 124 |
} | 175 | 125 |
~ | 176 | 126 |
del | 177 | 127 |
|
[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 |
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 |