Google
 

Trailing-Edge - PDP-10 Archives - steco_19840320_1er_E35 - 10,5676/teco/macros/techlp.txt
There is 1 other file named techlp.txt in the archive. Click here to see a list.
HELP  Welcome to the TECO On-Line HELP System.

 - To get back to TECO, type an altmode or a carriage return.
 - To get help on a command, type it followed by an altmode.
   ^H, DEL, ^U and ^R can be used during type-in, but note
   that other control characters are converted to <up-arrow><char>.
 - To get help on one of the following categories, type the
   category number followed by an altmode.  The categories are:
    1. Symbols and Definitions      15. Advanced Insertion
    2. Creating and Editing a File  16. Deletion
    3. Exiting from TECO            17. Immediate Type-Out Commands
    4. Buffer Positions             18. Type-Out
    5. Pointer Positioning          19. Advanced Terminal I/O
    6. Arithmetic Operators         20. Searching
    7. File Selection               21. Advanced Searching
    8. Advanced File Selection      22. Q-Registers
    9. File Selection Switches      23. Iteration Commands
   10. Log Files                    24. Flow Control
   11. Terminal Initialization      25. Conditional Execution Commands
   12. Input                        26. Special Numeric Values
   13. Output                       27. Aids
   14. Insertion
 - To do a general search for any string in the entire help file,
   type it followed by a carriage return.
 - To see the entire help text, type "ALL" followed by an altmode.
   (If you'd like a printed copy, print DOC:TECO.DOC.)
 - To see this text again, type "HELP" followed by an altmode.
 - For more detailed information, see the TECO Reference Manual
   and the file DOC:TEC124.DOC.  Other useful material can be found
   on the TED: area.
ALL




1
                              SYMBOLS AND DEFINITIONS

^             Designates the following letter or character as a
              control character.  In general, TECO will allow you to
              type a control character in the "<up-arrow><character>"
              form, unless it is part of a text string within a search
              or insert command.

$             Altmode or escape key (^[).

<CR>          Carriage return key (^M).

<LF>          Line feed key (^J).

<TAB>         Tab key (^I).

<FF>          Form feed key (^L).

m or n        Represents any number.  Many TECO commands accept a
              numeric argument, which, if missing, generally defaults
              to 1.

i             Represents one of A-Z, 0-9, or * for Q-register
              commands.

Buffer        A block of core memory within TECO into which text is
              read or inserted, edited, and output.

Page          The amount of text read into the buffer by an input
              command or output by an output command.  Editing is
              performed in the buffer on a page by page basis.

Buffer Pointer
              Represents the current position within the buffer where
              editing is taking place; always positioned between two
              characters.

Q-registers   Auxiliary data storage locations available for storing
              numbers, character strings, and TECO commands.

Filespec

     dev:filnam.ext<prot>[proj,prog,sfd1,sfd2,..]/switch1/switch2..



2
                            CREATING AND EDITING A FILE

              The following monitor commands automatically run the
              TECO editor and perform standard file initialization.

MAKE filespec<CR>
              Create a new file with TECO.  Performs an automatic
              EWfilespec$.

TECO filespec<CR>
              Edit an existing file with TECO.  Performs an automatic
              EBfilespec$EY$ sequence.

TECO<CR>      Enter TECO using the file named in the previous edit.

MAKE filespec1=filespec2<CR>
              Same as "TECO filespec2", but direct the output to
              filespec1, and don't create a .BAK file.  (Performs an
              automatic EWfilespec1$ ERfilespec2$ EY$ sequence.) A
              "TECO" command will always ignore the second filespec if
              given, causing filespec1 to be editted normally.  This
              allows "TECO <CR>" commands following a MAKE command to
              continue to edit the newly created file rather than read
              from the original one again.

TECO filespec$command$...$command<CR>
              Execute the specified commands following the filespec
              automatically after entering TECO (works with MAKE too).
              The command string will be remembered as part of the
              filespec on subsequent "TECO<CR>" commands.  Note that
              the "$" characters shown are dollar-signs, not escapes.
              Since real escapes on the command line would cause the
              command to terminate prematurely, we make use of a
              "pseudo-escape" character, the dollar sign.  TECO will
              substitute real escapes as it executes the command(s).

R TECO<CR>    Run the TECO editor without selecting any files for
              editing.  File selection must be made with the TECO
              commands described under "File Selection".



3
                                 EXITING FROM TECO

EX            Output the remainder of the input file, close the output
              file, and then exit to the monitor.  If an ED command is
              in effect, run the specified program.

EG            Output the remainder of the file, close and then
              re-execute the last compile class command that was
              typed.

^C            Exit immediately to the monitor.  May also be used to
              abort an editing session (leaves original file intact).
              Typing CONTINUE (perhaps after performing some monitor
              commands) will allow you to resume your editing session
              where you left off.  Typing REENTER will cause TECO to
              abort any command string it may have been executing and
              ask for the next command.  (This is good for stopping
              infinite search loops, etc.) ^C can be entered in the
              command string by typing it as up-arrow C.

^Z            Close the output file and exit to the monitor.  (Simple
              close; no files are renamed).



4
                                  BUFFER POSITIONS

B             Beginning of the buffer; 0.

.             Current pointer position; number of characters to the
              left of the pointer.

Z             End of the buffer; number of characters in the buffer.

m,n           m+1st through nth characters in the buffer.  Used with
              the K, P, S, T, and X commands.

H             Entire buffer; B,Z.



5
                                POINTER POSITIONING

nJ            Move pointer to position between nth and n+1st
              characters.

nC            Advance pointer n positions.

nR            Move pointer back n positions.  Equivalent to -nC.

nL            Move pointer to beginning of nth line from current
              pointer position.

0L            Move pointer to beginning of current line.



6
                                ARITHMETIC OPERATORS

m+n           Add.

m n           Add.

m-n           Subtract.

m*n           Multiply.

m/n           Divide and truncate.

m&n           Bitwise logical AND.

m#n           Bitwise inclusive OR.

()            Perform enclosed operations first.

^On           Accept following number in octal radix.  Must be typed
              as up-arrow O.



7
                                   FILE SELECTION

              The following commands may be used to control file
              selection.

ERfilespec$   Select file for input.

EWfilespec$   Select file for output.

EBfilespec$   Select file for input and output, with backup
              protection.

EAfilespec$   Select file for output--append rather than supersede.



8
                              ADVANCED FILE SELECTION

EPfilespec$   Read a file and put it into Q-register *.

EIfilespec$   Read a file, put it into Q-reg *, and execute it as a
              TECO macro.

ENfilespec$   Rename the current input file to filespec.

EN$           Delete the current input file.

EEfilespec$   Save the current state of TECO in filespec.
              DSK:TECO.SAV is the default.

nEDfilespec$  Run filespec upon exit.  (SYS: is the default device.
              The optional argument n is the starting address offset).

ED$           Cancel pending ED (do not run anything on exit from
              TECO).

EK            Cancel existing EW or EA.

nEM           Position magnetic tape.

EZfilespec$   Zero directory (DECtape) and select file for output.



9
                              FILE SELECTION SWITCHES

              These switches may also be used with the MAKE and TECO
              monitor commands.

/READONLY     Used with TECO command to cause ER instead of EB.

/INPLACE      Used with EB to cause file to be overwritten with no
              .BAK file.

/APPEND       Used with MAKE command to cause EA instead of EW.

/DEFAULT      Used with ER, EW, EA, EB, EI and EP to cancel any
              filespec defaults previously in effect.

/GENLSN       Used with EW or EB to cause line sequence numbers to be
              generated.

/SUPLSN       Used with ER, EB, or EW to suppress line sequence
              numbers.

/NOLSN        Used with ER, EB to assume no sequence numbers.



10
                                     LOG FILES

ELfilespec$   Open a log file.  Default is DSK:TECO.LOG.

nEL$          Further control of log file:  0=nothing in log, 1=/NOIN,
              2=/NOOUT, 3=everything in log, -1=close the log file.

/NOIN         Used with EL to keep terminal input out of the log file.

/NOOUT        Used with EL to keep terminal output out of the log
              file.

/APPEND       Used with EL to append to rather than supersede the log
              file.



11
                              TERMINAL INITIALIZATION

EVterminal$   Specifies terminal type.  (ACT4, ACT5, ADD580, ADM2,
              ADM3, ADM3A, BEE, CDC, CRT, DPT, H1200, H1500, H2000,
              HP2640, VT05, VT50, VT52, and TTY).  TECO is initialized
              to CRT.

nEV$          Returns value of terminal parameter n.

m,nEV$        Set terminal parameter m to a value of n.



12
                                       INPUT

EY            Clear buffer and input one page.  (Y may be used at
              macro level).

A             Input one page and append to current buffer contents.

:nA           Input n lines of text and append to current buffer
              contents.  (Won't read past a form feed.)

n^Y           Input until page n is in the buffer.

n^U           Perform a USETI.  Positions input file to block n for
              next input command.  (ER'd files only; illegal with EB).
              Must be typed as up-arrow U.



13
                                       OUTPUT

nPW           Output n copies of the current page and append a form
              feed character to each.  Does not change the buffer.

nP            Output the current page, clear the buffer, and read in
              the next page.  Continue this process until the nth page
              from the current page has been input.

m,nP          Output the m+1st through the nth characters.  Do not
              append a form feed character, and do not change the
              buffer.

n^P           Same as nP, but end up at the nth absolute page of the
              file, rather than the nth page past the current page.

EF            Close the output file.



14
                                     INSERTION

Itext$        Insert the text delimited by I and altmode.

^Itext$       Insert a tab followed by all the text up to the altmode.



15
                                 ADVANCED INSERTION

@I/text/      Insert the text delimited by the arbitrary character
              following I.

nI$           Insert the character with ASCII value n (decimal).

n\            Insert the ASCII representation of the decimal integer
              n.

n\\           Insert the ASCII representation of the octal integer n.

^V            In an insert string, translate next character (if
              alphabetic) to lower case.

^V^V          In an insert string, translate remaining alphabetic
              characters to lower case.

^W            In an insert string, translate next character (if
              alphabetic) to upper case.

^W^W          In an insert string, translate remaining alphabetic
              characters to upper case.

^^            In a insert string, translate next character (if @, [,
              \, ], ^, or _) to "lower case" range.

^R            In an insert string, accept next character as text.

^Gi           Used inside an insert string to cause the contents of
              Q-register i to be inserted into the string at that
              point.

^T            Used inside insert strings to cause all control
              characters except ^R, ^T, and altmode to be taken as
              text.  Nullified by a second ^T.  (Note:  does not work
              unless the monitor command "TTY RTCOMPATIBILITY" has
              been given).



16
                                      DELETION

nD            Delete the n characters following the pointer position.

-nD           Delete the n characters preceding the pointer position.

nK            Delete all characters in the buffer from the current
              pointer position to the beginning of the nth line from
              the pointer position.

m,nK          Delete the m+1st through the nth characters.



17
                            IMMEDIATE TYPE-OUT COMMANDS

              The following commands execute immediately when typed as
              the first character following the prompting "*".

^J <LF>       When typed immediately after the prompt, moves the
              pointer to the beginning of the next line and types the
              line.  (Same as 1LT).

^H            When typed immediately after the prompt, moves the
              pointer to the beginning of the preceding line and types
              the line.  (Same as -1LT).

;             When typed immediately after the prompt, moves the
              pointer to the beginning of the current line and types
              the line.  (Same as 0LT).



18
                                      TYPE-OUT

nT            Type all text in the buffer from the current pointer
              position to the beginning of the nth line from the
              pointer position.

m,nT          Type the m+1st through the nth characters.

nV            Type all text within n lines from the current line.
              Equivalent to (1-n)T nT.

Qi=           Type the contents of Q-register i.  (Numeric or text).

n=            Type the decimal integer n.

n==           Type the octal integer n.



19
                               ADVANCED TERMINAL I/O

m,n=          If m<0, same as n=; if m=0, don't output a CRLF after
              the number; if m>0, output the ASCII character whose
              value is m after the number.

1ET           Set to literal typeout mode.

2ET           Set to image typeout mode.

0ET           Restore typeout mode to normal.  (Type control
              characters in up-arrow form, altmodes as dollar signs,
              etc.).

0EU           Flag lower case characters on typeout by preceding them
              with a ' (standard unless "TTY LC" is in effect).

1EU           Flag upper case characters on typeout.

-1EU          No case flagging on typeout.

-1ES          Set automatic typeout after searches.

nES (n>0)     Set automatic typeout and use the character with ASCII
              value n (decimal) to show the position of the pointer.

0ES           Set to no automatic typeout after searches.

^Amessage^A   Type the message enclosed.

^L <FF>       Type a form feed.

^T            Stop command execution, wait for the user to type a
              character, and then take on the ASCII value (in decimal)
              of the character typed.

:m,n^T        Extended ^T operations:  TTCALLS and echo control.
              :0^T    INCHRW          :1,8^T  CCL flag
              :n,1^T  OUTCHR n        :9^T    CLRBFI
              :2^T    INCHRS          :10^T   CLRBFO
              :4^T    INCHWL          :11^T   SKPINC
              :5^T    INCHSL          :12^T   SKPINL
              :6^T    GETLCH          :n,13^T IONEOU n
              :n,7^T  SETLCH n        :-1^T   ECHO OFF
              :8^T    RESCAN 1        :-2^T   ECHO ON





20
                                     SEARCHING

              (Note:  the buffer pointer is left unchanged when a
              search fails unless the search caused a new page to be
              read into the buffer).

nStext$       Search for the nth occurrence (following the pointer) of
              the text delimited by S and altmode, but do not go
              beyond the end of the current page.  If n<0, search
              backwards.

m,nStext$     Same as S, but search only between pointer positions m
              and n.  If m>n, search backwards.

nFSoldtext$newtext$
              Search for the nth occurrence (following the pointer) of
              the first text string and replace it with the second
              text string.  Do not go beyond the end of the current
              page.

nNtext$       Equivalent to nStext$ except that if the text is not
              found on the current page, pages are input and output
              until it is found.

nFNoldtext$newtext$
              Equivalent to FS except that if the text is not found on
              the current page, pages are input and output until it is
              found.

nFDtext$      Search for nth occurrence of text and delete everything
              from the current pointer position to the end of text.



21
                                 ADVANCED SEARCHING

n_text$       Equivalent to nNtext$ except that it does input only, no
              output.

:nStext$      Equivalent to nStext$ except that it returns a value of
              -1 if the search succeeds or 0 if it fails instead of an
              error message.  The : command can also be used with FS,
              N, FN, FD, and _.

@nS/text/     Equivalent to nStext$ except that the text is delimited
              by the arbitrary character following the S.  The @
              command may also be used with FS, N, FN, FD, and _.

0^X           Reset search mode to accept either case.

n^X (n#0)     Set search mode to "exact" mode.

^V            In a search string, translate next character (if
              alphabetic) to lower case.

^V^V          In a search string, translate remaining alphabetic
              characters to lower case.

^W            In a search string, translate next character (if
              alphabetic) to upper case.

^W^W          In a search string, translate remaining alphabetic
              characters to upper case.

^^            In a search string, translate next character (if @, [,
              \, ], ^, or _) to "lower case" range.

^R            In a search string, accept next character as text.

^T            Used inside text arguments to cause all control
              characters except ^R, ^T, and altmode to be taken as
              text.  Nullified by a second ^T.  (Requires "TTY
              RTCOMPATIBILITY" monitor command).

^\            Used inside search arguments to indicate accept either
              case for following characters.  Nullified by a second
              ^\.

^X            When used inside a text argument, accept any character
              at this position in the search string.

^S            Accept any separator character at this position.  A
              separator is any character except a letter, digit,
              period, dollar sign, or percent sign.  (Note:  does not
              work unless the monitor command "TTY NO PAGE" has been
              given).

^Na           Accept any character except the arbitrary character a
              following ^N.

^Q            Take the next character in the search string literally,
              even if it is a control character.  (Note:  does not
              work unless the monitor command "TTY NO PAGE" has been
              given).

^Gi           Substitute the contents of Q-reg i into the text string
              at this point.

^EA           Accept any alphabetic character as a match.

^EV           Accept any lower case alphabetic character as a match.

^EW           Accept any upper case alphabetic character as a match.

^ED           Accept any digit as a match.

^EL           Accept any end-of-line character as a match.

^ES           Accept any string of spaces and/or tabs as a match.

^E<nnn>       Accept the ASCII character whose octal value is nnn as a
              match.

^E[a,b,c...]  Accept any one of the characters in the brackets as a
              match.



22
                                    Q-REGISTERS

nUi           Store the integer n in Q-register i.

m,nUi         Store the integer n in Q-register i and return the value
              of m.  (For example, the command m,nUiUj is equivalent
              to nUi mUj).

Qi            Return the value stored in Q-register i (for use as a
              numeric argument to another command).

%i            Increment the value in Q-register i by 1 and return this
              value.

nXi           Store, in Q-register i, all characters from the current
              pointer position to the beginning of the nth line from
              the pointer.

m,nXi         Store the m+1st through nth characters in Q-register i.

Gi            Insert a copy of the text in Q-register i at the current
              pointer position.

m,nMi         Execute the text in Q-register i as a command string.
              The arguments are optional, and are passed to the first
              command of the string.

m,nWi         Execute the text in Q-register i as a command string by
              a "jump" rather than a "call".

[i            Push the current contents of Q-register i onto the
              Q-register pushdown list.

n[i           Equivalent to [i nUi.

m,n[i         Equivlent to [i m,nUi.

]i            Pop the last stored entry from the Q-register pushdown
              list into Q-register i.

*i            If typed immediately after the prompt, save the
              preceding command string in Q-register i.

EPfilespec$   Read a file and put it into Q-register *.

EIfilespec$   Read a file, put it into Q-reg *, and execute it as an
              TECO macro.



23
                                 ITERATION COMMANDS

n<commands>   Perform the enclosed command string n times.

;             Jump out of the current iteration field, if the last
              search executed failed.

n;            If n>=0, jump out of the current iteration field.



24
                                    FLOW CONTROL

!tag!         Define a position in the command string with the name
              "tag".

Otag$         Jump to the position defined by !tag!.  WARNING:  Don't
              use O to jump into or out of iteration brackets <..>.



25
                           CONDITIONAL EXECUTION COMMANDS

              These commands are of the form

                                    n"x.......'

              If the numeric value of n satisfies condition x, all the
              commands between "x and ' are executed; execution falls
              through the apostrophe unless the command string
              contains a jump.  If n does not satisfy x, execution
              resumes with the command following the '.

n"Ecommands'  If n=0, execute the commands specified between "E and ';
              otherwise, skip to the '.

n"Ncommands'  If n#0, execute the enclosed commands.

n"Lcommands'  If n<0, execute the enclosed commands.

n"Gcommands'  If n>0, execute the enclosed commands.

n"Ccommands'  If n is the ASCII value (decimal) of a symbol
              constituent character (a letter, digit, period, percent
              sign, or dollar sign), execute the enclosed commands.

n"Dcommands'  If n is a digit execute the enclosed commands.

n"Acommands'  If n is alphabetic, execute the enclosed commands.

n"Vcommands'  If n is lower case alphabetic, execute the enclosed
              commands.

n"Wcommands'  If n is upper case alphabetic, execute the enclosed
              commands.

n"Tcommands'  If n is true, execute the enclosed commands.

n"Fcommands'  If n is false, execute the enclosed commands.

n"Scommands'  If n is "successful", execute the enclosed commands.

n"Ucommands'  If n is "unsuccessful", execute the enclosed commands.



26
                               SPECIAL NUMERIC VALUES

nA            The ASCII value (decimal) of the character n positions
              to the right of the pointer.  0A gives the character to
              the left of the pointer, -nA gives the character n+1
              positions to the left of the pointer.  If the position
              lies outside the buffer boundaries, return 0.

m,nA          Same as nA, but returns m if the position is outside the
              buffer boundaries.

^E            The form feed flag.  Equals 0 if no form feed character
              was read on the last input, -1 otherwise.

^N            The end-of-file flag; equals -1 if end of input file
              seen on last input.  Otherwise equals 0.

^F            Decimal value of the console data switches.

-1^F          TTY number (+ 200000 octal) of this job.

n^F           TTY number (+ 200000 octal) of job n.

^H            The time of day in 60th's of a second.  Must be typed as
              up-arrow H.

ET            The value of the type-out mode switch.  (0=normal,
              1=literal, 2=image).

ES            The value of the autotype after successful searches
              switch.  -1 = auto typeout, 0 = no typeout, n>0 =
              autotype using ASCII character n to show position of
              pointer.

^X            Value of the search mode flag.  (0=either case mode,
              -1=exact mode).

EU            The value of the EU flag.  +1 = flag upper case
              characters.  0 = flag lower case characters.  -1 = no
              case flagging on typeout.

EO            The value of the EO flag.  1 = version 21A; 2 = versions
              22, 23; 3 = TECO 123 and 124.

EH            The value of the EH flag.  1 = code only, 2 = code plus
              one line, 3 = all of error message.

^^x           The ASCII value (decimal) of the arbitrary character x
              following ^^.

\             The decimal value of the digit string following the
              pointer.  Leaves pointer at right end of the digit
              string.

\\            The octal value of the digit string following the
              pointer.  Leaves pointer at right end of the digit
              string.

^G            Returns job number.

n^G           Monitor PEEK UUO, using n as an argument.

m,n^G         Monitor GETTAB call, using m,n as arguments.



27
                                        AIDS

:             Enables error control.  Many commands (especially search
              and file commands), if preceded by a :, will not cause
              an error message if they fail.  The : modifier will
              cause the command to return a value of 0 if it fails, -1
              if it is successful.  Exception:  :nA command uses : to
              distinguish it from nA.

EC            Perform a garbage collection and reduce the amount of
              core as much as possible.

/             When used after an error message, this causes a more
              detailed explanation of the error to be typed.

*i            When used at the beginning of a command string, this
              causes the entire previous command string (minus one of
              the two concluding altmodes) to be moved into Q-register
              i.

?             When used after an error message, this causes the
              offending command to be typed out (with a few of the
              commands preceding it).

?             Enter trace mode.  A second ? command takes TECO out of
              trace mode.

<DEL>         Rubout last character typed in the command string.

^H            If a CRT has been specified, erases and backs over
              previously typed character.  (Must be typed as a control
              character.)

^G^G          Erase the entire command string.

^G <space>    Retype current line of command string.

^G.           Retype entire command.

^U            Erase everything typed in back to the last CRLF.  (Must
              be typed as a control character.)

0EO           Restore the EO value to standard (3).

nEO (n not 0) Set the EO value to n.

1EH           Type only code part of error messages.

2EH           Type error code plus one line.

3EH           Type all three parts of error.

0EH           Equivalent to 2EH.

^V            Set prevailing mode for insertions and searches to lower
              case.

^W            Set prevailing mode for insertions and searches to upper
              case.