Appendix D: The TECO Command Set

This appendix presents a summary of the MIT TECO editor's command set. Should you actually find an ITS or TOPS-20 system and wish to run TECO on it, this appendix will be useful but not completely replace the full manual.

TECO implements the "one-dimensional array of bytes" editing model. Line breaks are stored as single newline characters. Large files are divided into pages. Pages within a file must be edited in order (i.e., all editing on the first page is done, then the second page is read in and edited, etc.). The only way to go backwards is to finish editing the file and to start over. On the other hand, on most systems, only very large files (over 64 Kilobytes) are split into pages.

Commands are single or double characters. Upper/lower case is ignored. The basic forms of commands are "C", "nC" and "n,mC". The first form executes command "C" with the default arguments, the second supplies one argument of "n", and the third supplies two arguments of "n" and "m".

Some commands take string arguments. The string consists of all characters after the command up to the terminator character. This character, called altmode, is the Escape character, and is written as "$" (for historical reasons, of course).

Commands are accumulated into a command string, until a double altmode terminator is entered, at which time the commands are executed. One of the altmodes may serve to delimit a string. For example:

	5C$$

moves forward five characters, and the command string:

	Ithen$$

inserts the string "then", and the string:

	5CIthen$8R$$

moves forward five characters, then inserts the string "then", then moves backward eight characters.

TECO also supports the concept of Q-registers. These are variables that can either hold arbitrarily large strings of text or numbers. Each Q-register can either hold a string or a number and may change back and forth as desired. However, it may only hold one or the other at any given time. Q-registers are named by single characters. When holding strings, Q-registers act just like buffers: you can switch to, insert into, delete from, move around in, display, and search in them. Q-register names are either

TECO was first written for PDP-10s running ITS (the Incompatible Timesharing System) and its command set incorporates some knowledge of that system's file name syntax. Briefly, an ITS file name has these four parts:

	DEV;DIR:PRTONE PRTTWO

Each part can be up to 6 characters long and is stored in one 36-bit word. Within that word, each character is squeezed into a 6-bit character set, so lower-case characters are folded into their upper-case equivalents. The operating system and applications programs maintain a default value for each of the four parts. For example, if a user specifies a name of "foo", the default device, directory, and second part of the file name are automatically filled in. Multiple versions of a file are kept by setting the second part of the file name to a number. Successive versions are maintained by incrementing the number. A second part of "<" refers to the earliest version around. A second part of ">" refers to the latest version around (for reading) or one past the latest version around (for writing).

General notation:

^X
Denotes the specified control character (see Appendix E for a listing of all ASCII characters).
$
Denotes the altmode character unless otherwise specified.
|
Denotes a choice (either the form on the left or the form on the right are acceptable).
m | n | arg
Denote integer arguments.
cmd
An arbitrary command string.
dir
Denotes a directory.
file
Denotes a file name.
k
Denotes either "m,n" or "n": either a text range of characters m through n or n successive lines.
string
Denotes a string argument.
: | @
Modify the operation of certain commands.

Commands

n^@
Argument: if n > 0, same as ".,.+n". If n <= 0, the same as ".+n,."
m,n^@
Returns the value n - m.
m,n:^@
Returns the value n,m.


^A
Logical xor operator.


^B
Used for cleaning up after failed searches.


^C
When typed from the console, it terminates the command string and starts execution.


^Fstring$
Inserts its string argument, after deleting the last string found or inserted. Same as "FKDIstring$".


^G
Executes immediately. Erase's the command string as typed so far. Also aborts current command if one is executing.


^H
Inserts a Back Space character.


^I
Inserts a Tab character.


^J
Flushes any pending values.


^Kstring$
Executes string as a system command.


^M
Flushes any pending values.


n^N
Sets FS LINES$ to n.
:^N
Toggle the FS TTMODE$ flag.
:n^N
Does n^N:^N.


^Ofilename$
Bigprints filename on the device open for output.


^Pcmd0$cmd1$cmd2$
ASCII sort command. Assuming the point is at the start of a record, cmd0 should move the point to the start of the key, cmd1 should move the point to the end of the key, and cmd2 should move the point to the end of the record (= start of the next record). If FS ^P CASE $ is non-zero, then this command ignores case.


^Q
Quotes the next character.


^R
Invokes Real time (Emacs-like) mode.


n^S
If n > 0, sleeps for n 30ths of a second. Otherwise, sleeps until system uptime is >= -n.
n:^S
Sleeps for at most n 30ths of a second, returning immediately when input becomes available.


^U
Displays the current directory in a user supplied manner. Executes immediately if it is the first character in a command string.


^V
Pops the next position off of the ring buffer of positions. Successive ^Vs move through the 8-item ring.
:^V
Returns the value on the top of the ring.
n^V
Pushes n onto the ring buffer unless n is the same as the value on the top of the ring.
n:^V
Pushes n onto the ring buffer.


^W
Returns to the top level.


^X
Its value is m, the first argument to m,nMq. It is only valid inside macros.


^Y
Its value is n, the second argument to m,nMq. It is only valid inside macros.


^Z
Suspends the editing process.


$ (^[)
Terminates text argument; two successive altmodes terminates a command string.


^\
Exits from the innermost macro invocation.


^]x
Specially processes character x.
^]^X
Reads and returns the string argument which follows kMq. It is only valid inside macros.


^^x
Returns the ASCII value of "x".


SP
Same as "+", except that just a space is not an argument.


!label!
Defines a label or a comment. It is a comment if no command attempts to go there.


arg"x then-cmd '
Conditional. It checks the arg according to condition x. Executes the command string then-cmd if the condition is true. Arg is discarded. Conditionals are:
B
is arg the ASCII value of a delimiter (..D)?
C
is arg the ASCII value of a non-delimiter?
D
is arg the ASCII value of a digit?
E
is arg == 0?
G
is arg > 0?
L
is arg < 0?
N
is arg != 0?
U
is arg the ASCII value of an upper-case character?
:x
Reverses the meaning of condition x
arg"x then-cmd '"# else-cmd'
Conditional with else.


#
Logical or operator.


%q
Increments the numeric contents of q and returns the result.


&
Logical and operator.


'
Terminates a conditional.


( | )
Specify precedence for argument operators.


*
Multiplication operator (no precedence).


+
Addition operator.


,
Separates numeric arguments.


-
Subtraction operator.


.
(by itself) Specifies the position (number) of the point. See also the special .. Q-register names listed below.


/
Division operator (no precedence).


0-9, .
Digits. XXX is interpreted in base FS IBASE$ (usually 10); XXX. is interpreted in base FS I.BASE$ (usually 8).


:
Modifies the action of certain commands.


n;
Does nothing if n < 0. Otherwise, it passes control to the character after the next >. In other words, it is used to terminate iteration. If n is null, it uses the value of the last search.
:;
Like ;, but reverses the condition.
@@;
Like ;, but exit if arg == 0.
:@@;
Like ;, but exit if arg != 0.


n<cmd>
Does command cmd n times, or indefinitely if n is null.
:<cmd>
Begins errset. If an error occurs inside <>, execution will resume after the >.


k=
Types k.
k:=
Types k, omits CR/LF.
k@=
Types k in the echo area.
k@:=
Types k in the echo area, omitting CR/LF.


?
If first character after an error message, displays the last several command characters. Otherwise, enters trace mode.
:?
Leaves trace mode.


@
Modifies the action of certain commands.


A
Appends the next page of the input file to the buffer.
n:A
Appends the next n lines (up to a page marker) from the input file to the buffer.
@A
Appends all of the input file to the buffer and closes the input file.
mA
Returns the ASCII value of the character m characters to the right of the point.
0A
Returns the ASCII value of the character at the point.


B
Argument; equivalent to 0 (i.e., the beginning of the buffer). However, its value is modified by the virtual buffer boundaries.


nC
Moves forwards n characters.
n:C
Same as moving, but returns -1 if the move succeeds or 0 if the move would fail.


mD
Deletes forward m characters.
-mD
Deletes backward m characters (there is no equivalent to R).


E...
See E-Commands listed below.


F...
See F-Commands listed below.


Gq
Inserts the contents of Q-register q into the buffer. If q has a number, its string representation is inserted. FS INSLEN$ is set to the length of the inserted text.
m,nGq
Inserts the range m to n from Q-register q.
:Gq
Returns a copy of the string in Q-register q.
n:Gq
Returns the value of the character at position n in Q-register q.


H
Argument: wHole buffer: equivalent to "B,Z".


Istring$
Inserts the string at the point.
@Ixstringx
Inserts the string delimited by the "x" characters at the point (lets you insert a string that contains an altmode).
nI
Inserts the character with ASCII value n.
m,nI
Inserts m copies of character n.
:Iq
Inserts the Q-register q into the buffer.
n:Iq
Inserts the character with ASCII value n into Q-register q.
m,n:Iq
Inserts m copies of character n into Q-register q.
:Iqstring$
Inserts the string into Q-register q, replacing any prior contents.
@n:Iq
Inserts the character whose ASCII value is n into Q-register q, replacing any prior contents.
@m,n:Iq
Same as n:Iq, but inserts m copies.
@:Iqxstringx
Same as :Iqstring$, except that string is delimited by the characters x.


nJ
Sets the point to the specified position (BJ or just J is move to start; ZJ is move to end).
n:J
Does the set and returns -1 if successful and 0 if not.


m,nK
Kills (deletes and saves the deleted text) the characters in the range; moves the point there.
nK
Kills what L would move over.
n:K
Kills what :L would move over.
@K
Like K, but only LFs preceded by CRs are recognized.


mL
Moves to start of mth line after the point.
0L
Moves to the start of the current line.
m,nL
Same as m+n-.J, used by some other commands.
m:L
Moves to the end of the m-1th line.
0:L
Moves to the end of the previous line.
@L
Like L, but only LFs preceded by CRs are recognized.


m,nMqstring$
Executes the contents of Q-register q as TECO commands. If the Q-register contains a number, it executes the corresponding ^R mode command.
:M
Tail-recursive form of M. Like M then ^\, but the current function is removed from the stack before the new one is called.
@M
Fools the called macro into thinking it was called from ^R mode.


nNstring$
Same as nSstring$, but it does P and continues the search if the end of the buffer is reached.


Olabel$
Goes to the specified label. Generates an error if the label is not found.
:Olabel$
Returns if the label is not found.
@Olabel$
Allows the label to be abbreviated.


nP
Writes out the buffer and a ^L (page mark), kills the buffer, and reads one page from the input file. All of this is repeated n times.
m,nP
Writes out the specified range of the buffer, but does not kill it or append input.
nPW
Writes out the buffer and a ^L (page mark), no killing or reading. All of this is repeated n times.
@P
As P, except that the low-order bit of each word written should be preserved and not cleared. Used for writing binary files.


Qq
Returns the value in Q-register q as a number. If the Q-register holds text, this returns the pointer to that text.


nR
Moves backwards n characters (same as -nC).
n:R
Same as moving, but returns -1 if the move succeeds or 0 if the move would fail.


nSstring$
Searches forward for the nth occurrence of the string and places the point after the string. If the argument is null, the last non-null argument is used. Special characters in search strings:
^B
Matches any delimiter (see ..D).
^O
Divides string into alternate patterns. Thus, Sfoo^Obar$ will find the first of "foo" or "bar".
^Qx
Quotes x.
^X
Matches any character.
^Nx
Matches any character except for x, where x is any character.
^N^B
Matches any non-delimiter.
^N^X
Matches nothing.

Note that Sfoo^O$ will always succeed and will move the point over the next three characters if and only if they are "foo". -2-(:Sfoo^O$) will do that and return non-zero if they were "foo".

-nSstring$
Same as nSstring$, but searches backwards and leaves the point before the string.
n@Sxstringx
Same as nSstring$, but the string is delimited by the character specified by the "x"s. If the argument is null, searches for the null string.
n:Sstring$
Same as nSstring$, but returns the value -1 if successful or 0 if not. If a ^O is used within -n is returned if the nth subpart is found.


kT
Types out the text in the range (n lines or m,n characters).
@T
Types out in the echo area.


nUq
Inserts number n into Q-register q, returns no value.
m,nUq
Inserts number n into Q-register q, returns m.


kV
Displays what T would type. Puts "/\" where point is and does "--MORE--" processing.
@V
Does standard buffer redisplay.
kVW
Does V, then waits for one character and returns its ASCII code as a value.


W
Flushes current value except when part of PW or VW.


kXq
Inserts text range k into Q-register q, replacing any prior contents.
k@Xq
Same as kXq, but appends to q.


Y
Kills the buffer and reads one page from the input file into the buffer.
@Y
Kills the buffer and reads the rest of the input file into the buffer.


Z
Argument: specifies the length of the buffer in characters.


[q
Push the text or number from Q-register q onto the Q-register push down list.


\
Moves past number, returns its value.
n\
Inserts a printed representation of character n (in base ..E).
m,n\
Is like n\, but pads with spaces to m columns.
:\
Returns the representation of n as a string instead of inserting it.


]q
Pop the text or number from the Q-register push down list into Q-register q.


^
Replaced by @.


n_string$
Same as nSstring$, but it does Y if the end of the buffer is reached.


^?
Erases the last character of command string.

E-Commands (most file commands are here)

E^Udir$
Displays the specified directory in a user-defined manner.


E?file$
Tries to open file. Returns 0 if successful or an error code if not.


EC
Closes the input file.


EDfile$
Deletes the specified file.
:ED
Deletes the currently open file.


EEfile$
Same as the sequence infinityPEFfile$EC.


EFfile$
Closes the output file and changes its name to file.


EG
Inserts various information into the buffer on successive lines: the date as YYMMDD, the time as HHMMSS, the current username, the default file names, the real names of the files open for input and output, the date in text form, a 3-digit value (day of week, day of week of 1st of this year, leap year status), and the phase of the moon. There are better ways of getting most of this information.


EI
Opens a file "_TECO_ OUTPUT" for writing on the default device.
:EI
Same as EI, but uses the current default file name.
@EI
Same as EI, but sets the default device to DSK:


EJfile$
Restores the complete state from the file, which must have been saved with @EJ.
@EJfile$
Saves TECO's complete state to the file.


EL
Types out a listing of the default directory.


EM
Inserts a listing of the default directory into the buffer.


ENold$new$
Renames file old to file new.


EPfile$
Does ERfile$, then bigprints the file name twice on the device open for writing.


EQfrom$to$
Creates a link from the file "from" to the file "to".


ERfile$
Opens a file for input.


ETfile$
Sets the default file name to the specified file name.


EWdir$
Same as EI, but with the specified directory.
:EWdir file$
Same as EW, but with the specified file name.


EYdir$
Types out a listing of the specified directory.


EZdir$
Inserts a listing of the specified directory into the buffer.


E[
Push the input channel.


E\
Push the output channel.


E]
Pop the input channel.


E^
Pop the output channel.


E_old$new$
Copies file old to file new.
:E_old$new$
Copies file old to file new, preserving the old file's date.

F-Commands

m,nF^@
Returns m and n in numerical order, such that the new m will be > n.
nF^@
Returns 2 arguments that specify the range from the point to the location n lines away.


F^A
Runs every character in the buffer through a dispatch table.


nF^Bstring$
Searches in string for the character whose ASCII value is N.
@F^Bstring$
Searches the buffer forward for a character not in string.
-@F^Bstring$
Searches the buffer backward for a character not in string.
m,n@F^Bstring$
Searches the buffer in the range for a character not in string.


F^Estring$
Overwrites the next length-of-string characters with string. Same as deleting and inserting, but the gap does not need to move.


F^K
Reads a string argument from within a macro.


m,nF^Sq
Searches Q-register q for a word that contains n, starting at m.


F^X
Its value is k, all arguments to m,nMq. It is only valid inside macros.


F^Y
Its value is the number of arguments to m,nMq. It is only valid inside macros.


string:F^^
Determines whether string is a short Q-register name.


argF"x
Same as regular conditional, but passes the arg to the then or else command string.


F$ (dollar)
Returns FS CASE$ and inserts in the buffer the case shift and lock characters, if any. If FS CASE$ is non-zero, all characters are converted to uppercase (if > 0) or lower case (if < 0) on input. The case-shift character causes the next character to be read in the other case. The case-lock character temporarily complements the preferred case. On output, if FS CASE$ is odd, characters in the non-standard case will be preceded by case-shifts. If even, no translation is done.
nF$string$
Sets FS CASE$ to n and sets the case shift and lock characters to the first two characters in string.


F(
Is like (, except that F( returns its arguments, making it easy to use a value twice without using a Q-register.


F)
Is like ), except that F) returns its arguments exactly, discarding the data saved by (.


F*string$
Reads and discards a string argument.


F+
Clears the screen.


F6string$
Returns string with the first six characters packed into a word (this TECO is running on a 36 bit machine).
nF6
Expands n into an ASCII string and inserts it into the buffer.
n:F6
Expands n into a string.


F;tag$
Throws to the tag. This is a "long jump."


F<!tag!cmds>
Catches a throw and executes the commands.
:F<!tag!cmds>
Is an errset and a catch at the same time.


F=qstring$
Compares the Q-register q to string. Returns 0 if ==, positive if q is > string, or negative if q is < string. If value is not zero, the value's absolute value is 1 + location of the difference.
@F=qxstringx
Compares the Q-register q to string delimited by x.
m,nF=string$
Compares the buffer in the range m to n to string.
m,n@Fxstringx
Compares the buffer in the range m to n to string delimited by x.


F?
Same as 30F?
0F?
Same as 30F?
nF?
Mbox control. Argument is a bit string, bits:
bit 2^0
close the gap
bit 2^1
run garbage collect
bit 2^2
clear the jump cache
bit 2^3
flush unused core
bit 2^4
close the gap if it is >5000


m,nFA
Justifies text within the range.
nFA
Justifies n lines of text.
@FA
Fills without justification.


kFBstring$
Same as Sstring$ in the domain defined by k. If k is of the form m,n and m > n, search backwards. ":" and "@" modifiers work.


kFC
Converts text range k to lower case.
k@FC
Converts text range k to upper case.
n:FC
Returns the upper-case version of the character whose ASCII value is n.


nFD
Returns the range ".,x", where "x" is the position just after the nth level down in parenthesis after the point.
-nFD
Goes backward.


FE
Inserts a list of all TECO error messages into the buffer.
nFE
Inserts only the message whose error code is n.
@FEstring$
Returns the code of the error whose message is string.


FG
Process an error.
@FG
Process an error and throw away type ahead.


FI
Reads one character and returns its ASCII value.
:FI
As FI, but don't flush the character (it will be re-used).
@FI
As FI, but returns the value in the 9-bit TV character set.
@:FI
As @FI, but don't flush the character (it will be re-used).


FJ
Insert the command line used to invoke TECO into the buffer.


FK
Returns the value - FS INSLEN$, i.e., length of the last string inserted or found by a search or FW. FK is always < 0 except for a backwards search or FW.


nFL
Returns the range ".,x", where "x" is the position just after the nth list after the point.
-nFL
Goes backward.
n@FL
As nFW, but does S-expressions.
nFLD
Same as nFLK.
nFLK
Kills what nFL implies.
nFLL
Does the move implied by the nFL.
nFLR
Same as nFLL.
nFLXq
Combines nFL with Xq.


m,nFM
Attempts to move the point so that the cursor will appear at column n, m lines below where you started.


FN
Is the same as "[..n:I..N". It is needed to eliminate the possibility of a ^G within the string.


FOqname$
Performs a binary search of a table of fixed-length entries. It is intended for symbol tables. Q-register q contains the table and "name" is what should be searched for. The first word of the table contains the number of words for each entry in the table.


objectFP
Returns a number describing object. Values:
-4
A number, none of the below.
-3
A number that could be in pure string space.
-2
A number that could be in impure string space.
-1
A dead buffer.
0
A living buffer.
1
A Q-vector.
100
A pure string.
101
An impure string.


FQq
Its value is the number of characters in Q-register q or -1 if the Q-register holds a number.


FR
Updates the display.


FSname$
Returns the value of the specified variable (listed below).


FTstring$
Types its string argument.
:FTstring$
Types its string argument at the top of the screen.
@FTstring$
Types its string argument in the echo area.
@:FTstring$
Types its string argument in the echo area but only if no input is available.


nFU
Returns the range ".,x", where "x" is the position just after the nth level up in parenthesis after the point.
-nFU
Goes backward.


FVstring$
Displays its string argument.
:FVstring$
Displays its string argument, then clears the rest of the screen.


nFW
Returns the range ".,x", where "x" is the position just after the nth word after the point.
-nFW
Goes backward.
n:FW
As nFW, but only does n-1 words.
n@FW
As nFW, but does Lisp atoms and not words.
nFWD
Same as nFWK.
nFWK
Kills what nFW implies.
nFWL
Does the move implied by the nFW.
nFWR
Same as nFWL.
nFWXq
Combines nFW with Xq.


kFXq
Same as X and K combined: kXqkK.


FY
Inserts all that remains of the input file before the point.
nFY
Inserts at most n characters.


FZfile string$
Creates and starts a non-exec fork.
FZ$
Resumes the inferior fork.


F[flag$
Pushes the value of FS flag on the Q-register PDL.
nF[flag$
Pushes and sets the flag to the new value.
nF[^R CMACRO$
Pushes the definition of the character whose number is n.
m,nF[^R CMACRO$
Pushes and sets.


F_
Mostly the same as _, but keeps working regardless of the setting of FS _DISABLE$.


F]flag$
Pops the value of FS flag from the Q-register PDL.
nF]^R CMACRO$
Pops the definition of the character whose number is n.


F~
Like F=, but both strings are compared as if converted to upper case.

Special Q-registers, names are of the form "..x"

..0
^P puts its three arguments into these.
..1
..2
..A
Holds the string to represent the cursor (default is "/\").
..B
Holds the macro to display the user buffer.
..D
Holds the delimiter dispatch table, which tells several commands (FW, FL, "B, "C and search ^B) how to treat ASCII characters.
..E
Holds the output radix for = and \.
..F
Holds the ^R secretary macro. Can be used for auto save.
..G
Holds the user-specified directory display macro.
..H
Is the "suppress-display" flag.
..I
Holds the value of . at the start of the command.
..J
Holds user-specified label for --MORE-- processing.
..K
Holds deleted text.
..L
Executes when TECO first starts.
..N
Macro that to be executed when another macro exits.
..O
The current buffer.
..P
Holds the user-defined error-handler macro.
..Q
Holds the symbol table used to define TECO variables.
..Z
Safety backup copy of ..O.

FS Variables

Names can be up to six characters long. Spaces in names are ignored. Only as much of a name as is required to make it unique is required, although programs should include the entire name. Saying FSname$ returns the value of the flag. Saying nFSname$ or m,nFSname$ sets the value. If a flag can be set and you want to use the flag as the second operand of an arithmetic operator (e.g., .+FSname$C), enclose the FS in parentheses (.+(FSname$)C).

These names can never include control characters. The "^" in some of the names is a leading caret. However, the combination usually relates to the implied control character.

% BOTTOM
Size of the bottom margin as a percentage of the number of lines being displayed.
% CENTER
Where TECO should prefer to put the cursor.
% END
Size of the area at the bottom of the screen, such that TECO should never choose to put the cursor there.
% OPLSP
(Read only) Non-zero if the input is coming from a Lisp job
% TOP
Size of the top margin (analogous to %BOTTOM).
% TOCID
(Read only) Non-zero if the terminal can insert and delete characters.
% TOFCI
(Read only) Non-zero if the terminal can generate 9-bit characters.
% TOHDX
(Read only) Non-zero if the terminal is half-duplex.
% TOLID
(Read only) Non-zero if the terminal can insert and delete lines.
% TOLWR
(Read only) Non-zero if the terminal can generate lower case characters.
% TOMOR
(Read only) Non-zero if the use wants --MORE-- processing.
% TOOVR
(Read only) Non-zero if the terminal can overprint.
% TOROL
(Read only) Non-zero if the user has selected scroll mode.
% TOSAI
(Read only) Non-zero if the terminal can print the SAIL character set.
*RSET
Initially 0. If set to non-zero, trace information is not cleared automatically.
.CLRMOD
Normally -1. If negative, screen is normally cleared automatically. If 0, automatic screen clears are not done (used for debugging). If positive, the screen is never cleared.
.KILMOD
Normally -1. If 0, FS BKILL$ doesn't actually do the kill.
.TYI BACK
Backs up the point FS .TYI PT$ by one step. After backing up n steps, you can use FS .TYI NXT$ to re-get those n input characters.
.TYI NXT
Extracts one character from the ring buffer of past input characters.
.TYI PT
Pointer into the ring buffer that contains the last 60 input characters.
:EJ PAGE
Is the number of the lowest page used by :EJ'd shared pure files.
ADLINE
Is the line size used by the FA command.
ALTCOUNT
Is the number of $$s that TECO has seen at interrupt level.
BACK ARGS
(Read only) Returns the arguments to a macro in a different stack frame (i.e., one of the macros that was called that eventually called you). Returns 0, 1, or 2 values in the same ways that F^X does. If the argument to this is 0 or positive, it returns the arguments for the specified frame number (0 is outermost). If negative, returns the arguments for the relative frame number (-1 is your caller).
BACK DEPTH
(Read only) Returns the number of stack frames, not counting you.
BACK PC
Returns the PC of the stack frame that is specified in the same way as FS BACK ARGS$. m,nFS BACK PC$ sets the PC to m.
BACK QP PTR
(Read only) Specifies where a ^\ will return to. Arguments are as for FS BACK ARGS$.
BACK RETURN
(Write only) Returns from the specified stack frame.
Arguments are as for FS BACK ARGS$. -1 FS BACK RETURN$ is equivalent to ^\. BACK STRING
(Read only) Returns a pointer to the string or buffer being executed. Arguments are as for FS BACK ARGS$.
BACKTRACE
Returns a copy of the program being run by the stack frame. Arguments are as for FS BACK ARGS$.
BBIND
is useless, but F[B BIND$ and F]B BIND$ are useful for pushing to and popping from a temporary buffer.
BCONS
(as in n FS BCONS$) returns a new buffer n characters long. It is initially filled with 0's (NULs).
BCREATE
is like FS BCONS$ U..0. In other words, the buffer is selected instead of returned.
BKILL
Kills the specified buffer.
BOTHCASE
Initially 0. If == 0, case is significant during searches. If > 0, case is ignored. If < 0, case of special characters (@[\]^_ and `{|}~^?) is also ignored.
BOUNDARIES
Reads or sets the virtual buffer boundaries.
BS NO LF
If non-zero, suppresses the LF that follows any backward motion or rubbing out in ^R mode on printing terminals.
CASE
Like F$, but neither gets nor sets the case-shift or case-lock characters.
CLK INTERVAL
Is the interval between real time clock ticks in 1/60 seconds. Only active during user input.
CLK MACRO
Is the real-time interrupt handler macro. If the macro types anything out, it must not leave ..H set.
CTL MTA
If negative, it suppresses the ^R mode definitions for all control-meta characters. This makes it easy to edit TECO commands.
DATA SWITCHES
(Read only) The contents of the PDP-10 console switches.
DATE
(Read only) The current date and time as a number in file-date format. It can be fed to FS FD CONVERT$ or FS IF CDATE$.
D DEVICE
Is the default device name.
DD FAST
(Read only) Is non-zero if the current device is fast (i.e., local disk).
D FILE
Is the default file name.
D FN1
Is the default file name first part.
D FN2
Is the default file name second part.
D FORCE
Setting this to non-zero forces a complete redisplay of everything except the mode line. It is used for putting up temporary displays.
D SNAME
Is the default sname.
D VERSION
Is the default versions number, a reflection of FD D FN2$. If the latter is numeric, reading this value returns the corresponding number. If it is ">" or "<", this value is 0 or -2, respectively. If it is not numeric, this returns -1. if FD D FN2$ is numeric, setting this value sets the file name. Otherwise, the setting is ignored.
D WAIT
When set to non-zero, causes the display to pause slightly between lines of output.
ECHO ACTIVE
When set to non-zero, indicates that output has been written to the echo area, so the echo area needs to be cleaned up.
ECHO CHAR
When a ^R mode character is being executed, this value holds the character that caused the invocation.
ECHO DISPLAY
(Write only) As for FS ECHO OUT$, but outputs in display mode.
ECHO ERRORS
When set to non-zero, error messages are printed in the echo area.
ECHO FLUSH
When set to non-zero, automatic clearing of the echo area in ^R mode is enabled.
ECHO LINES
Then number of lines at the screen bottom that can be used for command echoing.
ECHO OUT
(Write only) Used for outputs to the echo area. If it has a numeric argument, the argument is the ASCII code of a character to echo. With a string argument, the string is echoed.
ERR
Same as FS ERROR$ if read. If written to, creates an error with the specified error code.
ERRFLAG
When negative, signals to redisplay that the first -n lines of the display contain an error message and should not be overwritten.
ERROR
The error code of the most recent error.
ERR THROW
(Write only) Return to the innermost error catcher.
EXIT
(Write only) Does a .break 16.
FDCONVERT
With a numeric argument, converts it from an ITS file date to a string of the form "dd/mm/yy hh:mm:ss" and inserts the string into the buffer. The form n:FS FDCONVERT$ returns the string. With no argument, reads the string from the buffer and converts it to numeric form.
FILE PAD
Is the character used to pad the last word of files. Usually 3 (^C).
FLUSHED
Is set to non-zero if a --MORE-- has been flushed, and thus output is being discarded.
FNAM SYNTAX
Controls what happens when only one file name is present. If this is 0, the file name is used as part two. If > 0, the file name is used as part one. If < 0, the file name is used as part one and ">" is used for part two.
GAP LENGTH
(Read only) The length of the gap.
GAP LOCATION
(Read only) The buffer position of the gap.
HEIGHT
(Read only) The number of lines on the screen.
HELP CHAR
Contains the character used for the help character. Normally, ^_. If set to -1, help is not recognized (e.g., useful for ^Q).
HELP MAC
Is the macro to execute when the help character is typed.
H POSITION
(Read only) Returns the column that the point is in.
HSNAME
The user's home directory.
I&D CHR
When set to non-zero, TECO tries to use the terminal's insert and delete character functions.
I&D LINE
When set to non-zero, TECO tries to use the terminal's insert and delete line functions.
IBASE
The input radix for numbers not ended by ".". Initially 8 + 2.
I.BASE
The input radix for numbers ended by ".". Initially 8.
IF ACCESS
(Write only) Sets the access pointer for the input file.
IF CDATE
The creation data for the input file.
IF DEVICE
(Read only). The device for the input file.
IF DUMP
The dumped bit for the input file.
I FILE
(Read only) The name of the input file.
IF FN1
(Read only) The first name of the input file.
IF FN2
(Read only) The second name of the input file.
IF LENGTH
(Read only) The length of the input file.
IF REAP
The reap bit for the input file.
IF SNAME
(Read only) The sname of the input file.
IF VERSION
(Read only) The version number of the input file or FS IF FN2$.
IMAGE OUT
Outputs its argument in super-image mode (no translations at all).
IN COUNT
Is an old name for FS TYI COUNT$
INSLEN
Is the length of the last string inserted with "I", "G", or "\", or found with "S" or "FW". It will be negative after a backward search.
JNAME
(Read only) Returns the jobname.
JRN EXECUTE
(Write only) Opens a journal file for playing back. The form :FS JRN EXECUTE$ closes the file. The default file names are used.
JRN IN
(Read only) Is non-zero when a journal file is being replayed.
JRN INHIBIT
When set to non-zero, input is taken from the terminal even though a journal file is being replayed. This is how FS JRN MACRO$ can work.
JRN INTERVAL
Specifies how often a journal file being recorded is updated on disk. The interval is in units of commands.
JRN MACRO
This macro is called when a journal file is being replayed and TECO encounters a colon or ^G in the file. The character is passed as an argument. In the case of a ^G, the macro should execute a ^R and then quit by doing -1 FS QUIT$. In the case of a colon, this macro should read more characters from the file by doing FS JRN READ$ and acting upon them.
JRN OPEN
(Write only) Opens a journal file for writing (recording). The default file names are used. The form :FS JRN OPEN$ closes the file.
JRN OUT
(Read only) Is non-zero when a journal file is being recorded.
JRN READ
(Read only) Reads a character from the journal file being replayed. If there is no such file, it returns a random value.
JRN WRITE
(Write only) Outputs its argument, either a character or a string, to the journal file being written. If there is no such file, it does nothing.
LAST PAGE
(Read only) Set to -1 when a file is opened and set to 0 when the last character has been read.
LINES
Is the number of lines used by a standard buffer redisplay. 0 means to use the whole screen.
LISPT
When set to non-zero, it means that text is supposed to be passed between TECO and its superior.
LISTEN
Returns non-zero if input is available to be read by FI. If it is given an argument and no input is available, the argument is typed out.
MACHINE
(Read only) Returns the name of the machine that TECO is running on.
MODE CHANGE
When set to non-zero, the FS MODE MACRO$ needs to be run eventually.
MODE MACRO
The macro to update Q-register ..J and the mode line.
MODIFIED
When set to non-zero, the buffer has been changed since last read or written.
MP DISPLAY
(Write only) Outputs text to the main program display.
MSNAME
The name of the working directory.
NOOP ALTMODE
When set to a negative number, an altmode is considered a no-op. When set to 0, an altmode is considered an error. When set to a positive number, altmode ends execution as ^_ does.
NOQUIT
Gives the user control over ^G.
OF ACCESS
(Write only) Sets the access pointer for the output file.
OF CDATE
The creation data for the output file.
O FILE
(Read only) The name of the output file.
OF LENGTH
(Read only) The length of the output file.
OF VERSION
(Read only) The version number of the output file or FS OF FN2$.
OLD FLUSHED
Saves the value of FS FLUSHED$ when that is set to zero upon returning to ^R.
OLD MODE
Is the last Q-register ..J actually displayed.
OSPEED
The terminal's output speed in baud or 0 if the speed is not known.
OUTPUT
When set to non-zero, suppresses output to the EW'd file.
PAGENUM
The number of form feeds read from the input file.
PJATTY
Set to a negative value whenever TECO detects that the terminal has been taken away. This negative value means that a complete redisplay must be done.
PROMPT
The ASCII value of the prompt character.
PUSHPT
(Write only) Same as n^V.
QP HOME
Returns a string that says where the Q-register PDL (Push Down List == stack) slot n was pushed from. The form :FS QP HOME$ returns a pointer to the Q-register. The form n@FS QP HOME$ converts the pointer returned by :FS QP HOME$ into the string form.
QP PTR
The Q-register PDL pointer.
QP SLOT
Read the specified PDL slot.
QP UNWIND
(Write only) Like FS QP PTR$ but pops slots back into the Q-registers they came from.
QUIT
When set to a negative value, execution will quit at the next opportunity.
Q VECTOR
Returns an n character long newly-consed up Q-register vector.
RANDOM
Reads or sets the random number generator seed.
READ ONLY
When set to non-zero. Attempt to modify the buffer become an error.
REAL ADDRESS
Returns the value of the machine address of the start of the buffer.
REFRESH
When set to non-zero, this macro is executed whenever TECO really clears the whole screen. It is executed after the screen has been cleared.
REREAD
When set to non-negative, the 9-bit TV code will be read by the next invocation of FI.
RGETTY
0 if printing terminal, or contains the tctyp word of a display terminal.
RUB CRLF
When set to non-zero, both characters of a CR/LF pair are erased together.
RUB MACRO
The macro called by ^R mode when it wants to do a ^? or ^D.
RUNTIME
(Read only) TECO's runtime in milliseconds.
SAIL
When set to non-zero, the terminal is assumed to support the SAIL character set.
S ERROR
When set to non-zero, a failing search within an iteration or a ^P sort will generate an error.
SHOW MODE
When set to non-zero, FR will type on the mode line on a printing terminal. Has no effect on displays.
S HPOS
Is the horizontal position of the point when everything is taken into account, but assuming an infinitely wide line.
S STRING
Is the default search string.
STEP MACRO
When set to non-zero and numeric, TECO displays the buffer and waits at the start of every line in a program. When set to non-zero and a string, TECO executes this macro at the beginning of every line in a program. Macros that start with W are never stepped.
STEP DEPTH
When set to -1, stepping occurs always. Otherwise, it is the number of the stack level at which to cut off stepping.
SUPERIOR
Is the macro invoked when superiors want to put text into TECO.
S VALUE
Is the value returned by last search command.
TOP LINE
The number of the first line of the screen that TECO should use.
TRACE
When set to non-zero, TECO is in trace mode. See ?.
TRUNCATE
If negative, long lines should be truncated. If 0 or positive, long lines are wrapped to the next line.
TTMODE
When set to non-zero, tells TECO that normal buffer display should display on printing terminals.
TTY INIT
(Re)initializes TECO's TTY information.
TTY MACRO
Performs user-specified TTY initialization.
TTYOPT
(Read only) The TTYOPT word for the terminal. Use the %TOxxx values instead.
TTYSMT
(Read only) The TTYSMT word for the terminal.
TYI BEG
The value of FS TYI COUNT$ the last time through the main ^R command loop.
TYI COUNT
The number of characters read so far.
TYI SINK
When set to non-zero, is a macro that is executed every time a character is actually read from the terminal.
TYI SOURCE
When set to non-zero, it a macro that is called to obtain "terminal input."
TYO HASH
Returns the hash code of screen line n. Doing -1,n FS TYO HASH$ forces line n to be redisplayed.
TYO HPOS
(Read only) Holds the horizontal position at which type out will next appear.
TYO VPOS
(Read only) Holds the vertical position at which type out will next appear.
TYPEOUT
Tells where type out will next appear. If -1, the next type out will appear at the top of the screen. Otherwise, type out will appear just after the last type out.
U HSNAME
Determines a user's hsname.
UINDEX
(Read only) The user index of the TECO job.
U MAIL FILE
The complete file name of the user's mail file.
UNAME
(Read only) The user name of the TECO job.
UPTIME
(Read only) Returns the time that the system has been up in units of 1/30 second.
UREAD
(Read only) Is -1 if an input file is open, otherwise it is zero.
UWRITE
(Read only) Is -1 if an output file is open, otherwise it is zero.
VAR MACRO
When set to non-zero, a macro can be run whenever a variable is set.
V B
Is the distance between the real beginning of the buffer and the virtual beginning.
VERBOSE
When set to non-zero, TECO prints long error messages. Otherwise, TECO prints only short messages and ^X must be typed to see the long version.
VERSION
(Read only) The TECO version number.
V Z
Is the distance between the real end of the buffer and the virtual end.
WIDTH
Width of the terminal in characters.
WINDOW
The position of the first character in the display window, relative to the virtual beginning of the buffer.
WORD
Gets or sets words in the current buffer.
XJNAME
(Read only) Returns the xjname of the TECO job.
X MODIFIED
Just like FS MODIFIED$, only it doesn't affect the display of the modified flag in the mode line. Thus, the user can track whether changes were made by intervening commands.
X PROMPT
Printed and zeroed with each printing terminal prompt.
XUNAME
(Read only) Returns the xjname of the TECO job.
Y DISABLE
When set to 0, the Y command is legal. When set to 1, the Y command is always illegal. When set to -1, the Y command is treated as @Y.
Z
(Read only) The number of characters in the buffer.
^H PRINT
When set to negative, a ^H on output will backspace and overprint. Otherwise, ^H will type as a ^ and H.
^I DISABLE
When set to 0, ^I is an insert command. When set to 1, ^I is illegal. When set to -1, ^I is a no-op.
^L INSERT
When set to non-zero, form feeds read from files always go into the buffer and P and PW never output anything except what is in the buffer.
^M PRINT
When set to negative, a ^M on output will output as a CR/LF. Otherwise, ^M will type as a ^ and M.
^P CASE
When set to non-zero, ^P ignores case.
^R ARG
Is the explicit numeric argument and is 0 (not 1!) if no argument was entered
^R ARGP
Describes the ^R command's argument.
bit 2^0
set if any argument was specified
bit 2^1
set if a number was typed
bit 2^2
set if the argument is negative
^R CCOL
The comment column.
^R CMACRO
Converts the ASCII value n to a form required for ^R command dispatch.
^R DISPLAY
When set to non-zero, this macro is executed whenever ^R is about to do a non-trivial redisplay.
^R EXIT
(Write only) Exits from the innermost ^R invocation.
^R ECHO
When set to 1, the characters read in by ^R should not be echoed. When set to 0, they should be echoed only on printing terminals. When set to -1, they should be echoed on all terminals.
^R EC SD
When set to non-zero, this macro is executed whenever a space command is typed. Used for auto-filling and such.
^R ENTERED
When set to non-zero, this macro is executed whenever ^R is invoked.
^R EXPT
Is the ^U count for the next ^R mode command.
^R H MIN
(Read only) Is the leftmost horizontal position requiring redisplay.
^R HPOS
The current horizontal position of the cursor.
^R INDIRECT
Given a 9-bit character, follows the alias definitions to find what it is equivalent to.
^R INHIBIT
When set to non-zero, ^R will not update the display.
When set back to zero, ^R will catch up. ^R INIT
Returns the initial definition of the character whose ASCII value is n.
^R INSERT
Inserts its argument.
^R LAST
Holds the most recent character read by any ^R.
^R LEAVE
When set to non-zero, this macro is executed whenever ^R returns.
^R MARK
Records the position of the mark.
^R MAX
The maximum number of characters of insertions or deletions printed out by ^R on a printing terminal before it switches to printing a description of the change. Default is 50.
^R MCNT
The secretary mode counter.
^R MDLY
The secretary mode limit value.
^R MODE
(Read only) Non-zero while in ^R mode.
^R MORE
When positive, --MORE-- is used for the ^R mode line instead of --TOP--, --BOT--, and --nn%--. This is used when in an environment where Space means "show me the next screenful." When negative, no --XXX-- is displayed.
^R NORMAL
When set to non-zero, this macro is executed for all normally self-insert characters.
^R PAREN
When set to non-zero, this macro is executed for every ")" character.
^R PREVIOUS
Holds the previous (second most recent) command.
^R REPLACE
When set to non-zero, ^R runs in "replace" mode instead of "insert" mode.
^R RUBOUT
The internal ^R rubout routine.
^R SCAN
When set to non-zero and a printing terminal is in use, displays characters that are being moved past.
^R STAR
When set to non-zero, a star appears in the mode line if the buffer has been modified.
^R SUPPRESS
When set to 0 or positive, built-in ^R mode commands are suppressed and characters insert.
^R THROW
Returns control to the innermost invocation of ^R.
^R UNSUPP
When set to -1, one character will be unsuppressed.
^R V MIN
(Read only) Is the topmost line requiring redisplay.
^R VPOS
The current vertical position of the cursor.
_ DISABLE
When 0, _ is "search and yank." When 1, _ is illegal. When -1, _ is treated like -.



Copyright 1999 by Craig A. Finseth.

Back to Top.

Back to Contents.

Back to Home.