\chapter{Incompatible, Obsolete, and System-Specific Commands}
\label{Incompatible, Obsolete, and System-Specific Commands}

     This appendix describes commands that are  peculiar  to  specific
     operating  systems.   These  commands  fall into many categories.
     Some are obsolete, and are kept around only as a  convenience  to
     the  user.   Others  are so system specific or so obscure that it
     was felt best not to include them in the main body of the manual.
     Some  are  incompatible  across  operating systems.  Some are new
     commands that have not become firmly established and  may  change
     in  the  future.  In general, use these commands at your own risk
     and with the understanding that in future releases of TECO, these
     commands  may change or go away completely.  Implementors of TECO
     on other operating systems should contact  the  TECO  SIG  before
     implementing any of these features.


\section{Specific Features Of TECO-11}
\label{Specific Features Of TECO-11}

\subsection{TECO Commands}
\label{TECO Commands}

\begin{list}{}{\labelsep 20pt}
     \item[{\em Command}]        Description

     \item [{\tt m,nStext}\escape]      Performs the same function as the 
		{\tt nS} command,  but
                    {\tt m}  serves  a  bound  limit for the search.  If the
                    search string can  be  found  without  moving  the
                    pointer  more  than  ABS({\tt m})-1  places,  the search
                    succeeds  and  the  pointer  is  repositioned   to
                    immediately   after  the  last  character  of  the
                    string.  Otherwise, the pointer is left unchanged.
                    The  \caret{\tt Q}  operator,  described  below, is 
		useful in
                    conjunction with this command.

                    Note that {\tt m,Stext}\escape is identical to  
		{\tt m,1Stext}\escape  and
                    {\tt m,-Stext}\escape is identical to 
		{\tt m,-1Stext}\escape.

     \item[{\tt m,-nStext}\escape]     Performs the same function as  the  
		{\tt m,nS}  command,
                    but searches in the reverse direction.

     \item[{\tt 0,nStext}\escape]      Performs the same  function  as  the  
		{\tt nS}  command,
                    except  that  the  pointer  position  will  remain
                    unchanged on search string failure.   (Essentially
                    an  unbounded  search  with no pointer movement on
                    failure.)

     \item[{\tt G*}]             Get most recent  filespec  string.   The  
		asterisk
                    represents  TECO's  filespec  string  area,  which
                    contains the fully expanded filespec of the last {\tt E}
                    command  (see  appendices).   Copy the contents of
                    the filespec string area into the  buffer  at  the
                    current  position  of  the buffer pointer, leaving
                    the pointer positioned after  the  last  character
                    copied.

     \item[{\tt :G*}]         Print the contents of the filespec buffer  
		on  the
                    terminal.

     \item[{\tt G\_}]             Get most recent  search  string.   The  
		underscore
                    (backarrow)  represents TECO's search string area.
                    Copy the contents of the search string  area  into
                    the  buffer  at the current position of the buffer
                    pointer, leaving the pointer positioned after  the
                    last character copied.

     \item[{\tt :G\_}]            Print the contents of the search string 
	buffer  on
                    the terminal.

     \item [{\tt n} \caret {\tt Q}]            {\tt n}\caret{\tt QC} is 
		identical to {\tt nL}.  The {\tt n}\caret{\tt Q} command  
		returns
                    the   number  of  characters  between  the  buffer
                    pointer and the {\tt n}th line separator (both  positive
                    and   negative).    This   command  converts  line
                    oriented command argument  values  into  character
                    oriented   argument   values.    Used   after   an
                    expression.

     \item [{\tt m,-256+n:W}]     Inserts characters at {\em dot}  until...   
		Characters
                    are read (echo off) from the terminal and inserted
                    at {\em dot} until and  according  to  the  microcoded
                    bits  in  {\tt n}.   The  terminating  character  is not
                    inserted.
	\begin{list}{}{\labelsep 10pt}
                      \item[128] Return immediately if no typed characters
                       \item[64] Terminate on any character
                       \item[32] Don't keep screen updated (i.e., no 
				{\tt -1W})
                        \item[8] Treat m as terminating character(s)
                        \item[4] Convert any alphabetic inserts  to  upper
                             case
                        \item [2] $\Rightarrow$ Terminate on {\tt <TAB>}
                        \item [1] $\Rightarrow$ Screen is initially O.K.
	\end{list}
                    Control characters (octal 0  through  37  and  177
                    except  {\tt <TAB>})  are always terminating characters.
                    The returned value has the  terminating  character
                    code  in  low byte (octal 0 through 177 or 377 for
                    returned immediately).  The sign bit is set if one
                    or  more  inserts were done.  The return value may
                    be a character code that normally would have  been
                    inserted,  but could not be for some reason (e.g.,
                    convert   alphabetic   inserts   to   upper   case
                    requested,    but    not    supported    in   this
                    implementation).

                    The {\tt m} of {\tt m,-256+n:W} is always  optional.   
			If  bit
                    value  8  of  {\tt n}  is  set,  {\tt m}  contains  up  
			to two
                    additional termination character codes, one in the
                    low  8  bits  (low byte) and another in the high 8
                    bits (high byte).  If only one  extra  termination
                    character  is  desired, it is placed simply placed
                    in {\tt m} thus setting the high 8 bits to  zero  (which
                    is already a termination character).  If bit value
                    8 of {\tt n} is not  set,  passing  the  {\tt m}  argument  is
                    undefined...
\end{list}

\subsection{String Build Constructs}
\label{String Build Constructs}

\begin{list}{}{\labelsep 20pt}
     \item[{\em Construct}]      Description

     \item [{\tt <CTRL/E>Q*}]     {\tt <CTRL/E>Q*} indicates that the string 
		stored in the
                    filespec  buffer  is  to  be  used in the position
                    occupied by the \caret{\tt EQ*} in the search string.

     \item [{\tt <CTRL/E>Q\_}]     {\tt <CTRL/E>Q\_} indicates that the 
		string stored in the
                    search string buffer is to be used in the position
                    occupied by the \caret{\tt EQ\_} in the search string.
\end{list}

\section{Specific Features Of RT-11}
\label{Specific Features Of RT-11}

\centerline{\em [For RT-11 Operating Characteristics, refer to Appendix 
	\ref{RT-11 Operating Characteristics}.]}


\section{Specific Features Of RSTS/E}
\label{Specific Features Of RSTS/E}

\centerline{\em [For RSTS/E Operating Characteristics, refer to Appendix 
	\ref{RSTS/E Operating Characteristics}.]}

\centerline{\large TECO COMMANDS}

\begin{list}{}{\labelsep 20pt}
	     \item[{\em Command}]        {\em Description}

     \item[{\tt :EGRTS}\escape]        Switch to private default run-time-system.

     \item [{\tt :EGRTS foo}\escape]    Switch to RTS {\tt foo}.

     \item [{\tt :EGFSS string}\escape] File string scan {\tt string}.

     \item [{\tt :EGCCL cmd}\escape]    Try {\tt cmd} as a CCL command.

     \item [{\tt :EGRUN file}\escape]   Try to run {\tt file}.

     \item [{\tt :EGRUN file=xx}\escape]
                    Try to run {\tt file} with {\tt xx} placed in core common.

     \item [{\tt :EGEMT}\escape]        Issue a monitor directive.  The  
			{\tt FIRQB}  is  loaded
                    from Q-registers A through P and the {\tt XRB} is loaded
                    from Q-registers Q through W.  The low byte of the
                    value  in  Q-register A is the monitor {\tt EMT} code to
                    issue.   If  the  high  byte  of  the   value   in
                    Q-register   A   is  $>$0  then  the  text  part  of
                    Q-register A is put into the  {\tt XRB}  for  a  
			{\em write}
                    ({\tt XRLEN}=  size of A, {\tt XRBC}=size of A, 
			{\tt XRLOC}-$>$A);  if
                    Q-register A high byte is $<$0 then the text part of
                    Q-register  A  is  put  into  the {\tt XRB} for a 
			{\em read}
                    ({\tt XRLEN}=size of A, {\tt XRBC}=0, {\tt XRLOC}-$>$A).
                    Returned  value  is  -1   for   success,   0   for
                    unrecognized  command,  or $>$0 for the RSTS/E error
                    code.  The {\tt FIRQB} is placed in the numeric part  of
                    Q-regs  A,  B, C, D, E, F, G, H, I, J, K, L, M, N,
                    O, P.  The XRB is placed in the  numeric  part  of
                    Q-regs Q, R, S, T, U, V, W.

     {\em See also section \ref{File Specification Switches}.}

\section{Specific Features of RSX-11/M, RSX-11/D, and IAS}
\label{Specific Features of RSX-11/M, RSX-11/D, and IAS}

\centerline{\em [For RSX-11 Operating Characteristics, refer to 
	Appendix \ref{RSX-11 Operating Characteristics}.]}
\begin{list}{}{\labelsep 20pt}

     \item[{\em Command}]        {\em Description}

     \item [{\tt <CTRL/Z><CTRL/Z><CTRL/Z>}]
                    Returns   control   to   the   operating    system
                    immediately.        Equivalent      to      typing
                    {\tt <CTRL/C><CTRL/C>}.
\end{list}

     {\em See also section \ref{File Specification Switches}.}


\section{Specific Features Of VAX/VMS}
\label{Specific Features Of VAX/VMS}

     {\em [For VAX/VMS Operating Characteristics, refer to Appendix 
	\ref{VAX/VMS Operating Characteristics}.]}

     \item[{\em Command}]        {\em Description}

     \item [{\tt <CTRL/Z><CTRL/Z><CTRL/Z>}]
                    Returns   control    to    VAX/VMS    immediately.
                    Equivalent to typing {\tt <CTRL/C><CTRL/C>}.

     \item [{\tt EG}\escape]            Exit with special status
                    TECO's normal exit status code  (as  reflected  by
                    the  DCL  symbols  {\tt \$STATUS}  and  {\tt \$SEVERITY})  
			is  1
                    (success).  If the exit was due to an {\tt EG}\escape command,
                    the exit status code is 9 (also success).

     \item[{\tt :EGSYM symbol\_name symbol\_value}\escape]
                    Defines the DCL local symbol {\tt symbol\_name} with  a
                    value   string   of  {\tt symbol\_value}.   Useful  for
                    creating symbols that will be used  by  a  command
                    procedure upon TECO's exit.

\end{list}
     {\em See also section \ref{File Specification Switches}.}

\section{Specific Features Of OS/8}
\label{Specific Features Of OS/8}

\centerline{\em [For "OS/8 Operating Characteristics", refer to Appendix 
	\ref{OS/8 Operating Characteristics}.]}

\begin{list}{}{\labelsep 20pt}

     \item[{\em Command}]        {\em Description}

     \item [{\tt <CTRL/S>}]       If  used  as  the  first  keystroke  
		after  TECO's
                    prompt,  this  command is the same as {\tt *Z}, that is,
                    it saves the last command string in Q-register  Z.
                    This  command echoes as {\tt *Z} and does not have to be
                    followed by a {\tt <DELIM>}.
\end{list}
     {\em See also section \ref{File Specification Switches}.}

\section{Specific Features Of TOPS-10}
\label{Specific Features Of TOPS-10}

\centerline{\em [For TOPS-10 Operating Characteristics, refer to Appendix \ref{TOPS-10 Operation Characteristics}.]}
\begin{list}{}{\labelsep 20pt}
     \item[{\em Command}]        {\em Description}


\iftecotenonly
     \item [{\tt nEM}]            Positions a magtape.  You must  open  the  magtape
                    for input with an appropriate ER command before it
                    can be positioned.  Exact positioning  depends  on
                    the  value  of  n,  as  described below.  You must
                    reopen the  magtape  for  output  before  you  can
                    output to it.
                    {\em [TECO-10 only]}
\fi

	\begin{list}{}{\labelsep 10pt}

                      \item[{\em Value}]   {\em Action}

                      \item [{\tt 1EM}]     Rewind  the   currently-selected   
			input
                              magtape  to load point.  {\tt EM} is identical
                              to {\tt 1EM}.

                      \item [{\tt 3EM}]     Write an end-of-file record.

                      \item [{\tt 6EM}]     Skip ahead one record.

                      \item [{\tt 7EM}]     Back up one record.

                      \item [{\tt 8EM}]     Skip  ahead  to  logical  end  of   
				tape
                              (defined  by  two successive end-of-file
                              marks).  Leave  the  magtape  positioned
                              between  the  two  end-of-file  marks so
                              that   successive    output    correctly
                              overwrites the second {\tt EOF}.

                      \item [{\tt 9EM}]     Rewind and unload.

                      \item [{\tt 11EM}]    Write 3 inches of blank tape.

                      \item [{\tt 14EM}]    Advance tape one file.  This leaves  the
                              tape  positioned  so  that the next item
                              read will be the  first  record  of  the
                              next  file  (or  the  second end-of-file
                              mark at the logical end-of-tape).

                      \item [{\tt 15EM}]    Backspace tape one  file.   This  leaves
                              the  tape  positioned  so  that the next
                              item read will be the  end-of-file  mark
                              preceding   the   file  backspaced  over
                              (unless the file is the  first  file  on
                              the tape).

	\end{list}

     \item [{\tt n\caret Q}]            {\tt n}\caret{\tt QC} is identical 
		to {\tt nL}.  This command returns the
                    number  of  characters  between the buffer pointer
                    and the {\tt n}th  line  separator  (both  positive  and
                    negative).   This  command  converts line oriented
                    command argument values  into  character  oriented
                    argument values.  Used after an expression.

     \item [{\tt F0}]             Pointer position of start of window.  
				Same as {\tt 6:W}.

     \item [{\tt FZ}]             Pointer position of end of window.

     \item [{\tt FH}]             Same as {\tt F0}, {\tt FZ}.

     \item [{\tt FX}]             Software  maintained  horizontal   
			coordinate   of
                    location  of cursor on screen (0-origin).  Updated
                    by  TECO  on  terminal  output.   If  TECO  cannot
                    determine the updated location of the cursor, this
                    value is set to -1.

     \item [{\tt nFX}]            Set value of FX register to n.

     \item [{\tt FY}]             Software   maintained   vertical   coordinate   of
                    location  of cursor on screen (0-origin).  Updated
                    by  TECO  on  terminal  output.   If  TECO  cannot
                    determine the updated location of the cursor, this
                    value is set to -1.

     \item [{\tt nFY}]            Set value of FY register to {\tt n}.

     \item [{\tt FP}]             Equivalent to {\tt FY}, {\tt FX}.

     \item [{\tt m,nFP}]          Equivalent to {\tt mFYnFX}.

     \item [{\tt m,nFF}]          Updates FY and FX registers as if the 
				{\tt m,nT} command
                    were executed.

     \item [{\tt nFF}]            Assumes that the scope cursor is pointing  at  the
                    character  that  is  just to the right of the text
                    buffer pointer (the current character).  Then this
                    command  advances  {\tt n}  screen lines and goes to the
                    end  of  that  line  and  returns   that   pointer
                    position.

     \item [{\tt nFQq}]           Compares  characters   beginning   at   dot   with
                    characters  beginning  at  the  nth  character  in
                    Q-register q (0-origin).  When a  match  fails  or
                    the  match ends, this command moves the pointer to
                    after the last character that matched and  returns
                    the index into the Q-register.

     \item [{\tt E=filespec}\escape]    Renames the input file.

     \item [{\tt E\&filespec}\escape]    Run the specified program when  TECO  exits.   Can
                    take  a  numeric argument which is the run-offset.
                    0 is the default.

     \item [{\tt m,nE*}]          Does an arbitrary {\tt TRMOP} to your terminal.
                    {\em [Not available on TOPS-20.]}

     \item [{\tt ::Gq}]           Same as {\tt :Gq} but types literally.

     \item [{\tt ::ER}]           Same as {\tt ER} but no defaults are used.

     \item [\caret {\tt Z}]             Closes output file and exits from TECO.

     \item [\caret {\tt P}]             Returns current page number.

     \item [{\tt n}\caret {\tt P}]            Executes {\tt P} commands until 
					page {\tt n} has been reached.

     \item [{\tt n} \caret {\tt Y}]            Executes {\tt Y} commands until 
				page {\tt n} has been reached.

     \item [{\tt n,m=}]           Same as {\tt m=n}\caret{\tt T}.

     \item [{\tt m,n:}\caret {\tt T}]         Does an arbitrary {\tt TTCALL}.

\end{list}

{\em See also section \ref{File Specification Switches}}.

