The DECUS TECO Manual

Converted to HTML by Yezerski Roper's AscToHTM (available for free under VMS)
Also available: a HTML FRAMES version, an RTF version (152k) and a WinHelp file (209k). All converted from the same text file (478k)
(You can download a .ZIP file containing all of these files (950k))


    Next page

  Standard TECO


  TEXT EDITOR AND CORRECTOR FOR THE
VAX-11, PDP-11, PDP-10, and PDP-8


USER'S GUIDE AND LANGUAGE REFERENCE MANUAL


  May 1985 Edition


  TECO-11 VERSION 40
TECO-10 VERSION 3
TECO-8 VERSION 7



May, 1985

The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation or by DECUS.

Neither Digital Equipment Corporation, DECUS, nor the authors assume any responsibility for the use or reliability of this document or the described software.


  Copyright (C) 1979, 1985 TECO SIG

General permission to copy or modify, but not for profit, is hereby granted, provided that the above copyright notice is included and reference made to the fact that reproduction privileges were granted by the TECO SIG.

CONTENTS


  CHAPTER 1 BASICS OF TECO
1.1 USING TECO
1.2 DATA STRUCTURE FUNDAMENTALS
1.3 FILE SELECTION COMMANDS
1.3.1 Simplified File Selection
1.3.2 Input File Specification (ER command)
1.3.3 Output File Specification (EW command)
1.3.4 Closing Files (EX command)
1.4 INPUT AND OUTPUT COMMANDS
1.5 POINTER POSITIONING COMMANDS
1.6 TYPE OUT COMMANDS
1.6.1 Immediate Inspection Commands [not in TECO-10]
1.7 TEXT MODIFICATION COMMANDS
1.8 SEARCH COMMANDS
1.9 SAMPLE EDITING JOB
  CHAPTER 2 INVOKING TECO
2.1 RUNNING TECO
2.2 CREATING A NEW FILE
2.3 EDITING AN EXISTING FILE
2.4 SWITCHES ON TECO and MAKE COMMANDS
2.5 INVOKING A TECO PROGRAM
2.6 USER INITIALIZATION
  CHAPTER 3 CONVENTIONS AND STRUCTURES
3.1 TECO CHARACTER SET
3.2 TECO COMMAND FORMAT
3.2.1 Numeric Arguments
3.2.2 Text Arguments
3.2.3 Colon Modifiers
3.3 DATA STRUCTURES
3.3.1 Text Buffer
3.3.2 Q-registers
3.3.3 Q-register Push-down List [not in TECO-8]
3.3.4 Numeric Values and Flags
  CHAPTER 4 COMMAND STRING EDITING
4.1 Immediate Action Editing Characters
4.2 Immediate Action Commands
4.3 Introduction to Macros
4.4 Immediate ESCAPE-Sequence Commands [TECO-11 only]
4.5 Operating System Character Filters
  CHAPTER 5 COMMAND DESCRIPTIONS
5.1 FILE SPECIFICATION COMMANDS
5.1.1 File Opening Commands
5.1.2 File Specification Switches
5.1.3 File Close and Exit Commands
5.1.4 Secondary Stream Commands
5.1.5 Wildcard Commands
5.1.6 Direct I/O to Q-Registers
5.2 PAGE MANIPULATION COMMANDS
5.3 BUFFER POINTER MANIPULATION COMMANDS
5.4 TEXT TYPE OUT COMMANDS
5.5 DELETION COMMANDS
5.6 INSERTION COMMANDS
5.7 SEARCH COMMANDS
5.8 SEARCH ARGUMENTS
5.9 Q-REGISTER MANIPULATION
5.10 ARITHMETIC AND EXPRESSIONS
5.11 SPECIAL NUMERIC VALUES
5.12 COMMAND LOOPS
5.13 BRANCHING COMMANDS
5.14 CONDITIONAL EXECUTION COMMANDS
5.15 RETRIEVING ENVIRONMENT CHARACTERISTICS
5.16 MODE CONTROL FLAGS
5.17 SCOPE COMMANDS
5.17.1 Video Terminal Scope Commands
5.17.2 Refresh Scope Commands
5.18 PROGRAMMING AIDS
5.18.1 Text Formatting
5.18.2 Comments
5.18.3 Messages
5.18.4 Tracing
5.18.5 Convenience Characters
5.18.6 Memory Expansion
5.18.7 Case Control
5.19 MANIPULATING LARGE PAGES
5.20 TECHNIQUES AND EXAMPLES
  CHAPTER 6 OCTAL & DECIMAL ASCII CHARACTER SET
  CHAPTER 7 ERROR MESSAGES
  CHAPTER 8 INCOMPATIBLE, OBSOLETE, AND SYSTEM-SPECIFIC COMMANDS
8.1 SPECIFIC FEATURES OF TECO-11
8.1.1 TECO Commands
8.1.2 String Build Constructs
8.2 SPECIFIC FEATURES OF RT-11
8.3 SPECIFIC FEATURES OF RSTS/E
8.4 SPECIFIC FEATURES OF RSX-11/M, RSX-11/D, and IAS
8.5 SPECIFIC FEATURES OF VAX/VMS
8.6 SPECIFIC FEATURES OF OS/8
8.7 SPECIFIC FEATURES OF TOPS-10
  CHAPTER 9 RT-11 OPERATING CHARACERISTICS
9.1 STARTUP
9.2 FILE SPECIFICATION
9.3 BACKUP FILES
9.4 EXIT AND GO
9.5 REENTER AND CLOSE
9.6 FILE RECOVERY
9.7 SYSTEM CRASH RECOVERY
9.8 VT11 GRAPHICS SUPPORT
  CHAPTER 10 RSTS/E OPERATING CHARACERISTICS
10.1 STARTUP
10.2 FILE SPECIFICATION
10.3 BACKUP FILES
10.4 EXIT AND GO
10.5 ET FLAG HANDLING
  CHAPTER 11 RSX-11 OPERATING CHARACERISTICS
11.1 STARTUP
11.2 INITIALIZATION
11.3 FILE SPECIFICATION
11.4 WILD CARD LOOKUP
11.5 EXITING FROM TECO
11.6 <CTRL/C>
11.7 EXIT AND GO
11.8 ET FLAG HANDLING
11.9 FILE RECORD FORMAT
11.10 COMMAND LINE PROCESSING
  CHAPTER 12 VAX/VMS OPERATING CHARACERISTICS
12.1 STARTUP
12.2 INITIALIZATION
12.3 FILE SPECIFICATION
12.4 WILD CARD LOOKUP
12.5 SYMBOL CONSTITUENTS
12.6 EXITING FROM TECO
12.7 <CTRL/C>
12.8 <CTRL/Y>
12.9 EXIT AND GO
12.10 ET FLAG HANDLING
12.11 FILE RECORD FORMAT
12.12 COMMAND LINE PROCESSING
12.13 HELP
12.14 INSTALLING TECO
  CHAPTER 13 OS/8 OPERATING CHARACTERISTICS
13.1 STARTUP
13.2 STARTUP CONDITIONS
13.3 FILE SPECIFICATION
13.5 BACKUP FILES
13.6 EXIT AND GO
13.7 <CTRL/C>
13.8 FILE RECOVERY
13.9 VR12 GRAPHICS SUPPORT
13.10 EXCEPTIONS
13.11 CHAINING TO TECO
13.12 USER INITIALIZATION
13.13 RETURNED VALUES FROM TECO.INI
13.14 TECO.TEC SUPPORT
13.15 OVERLAYS
13.16 INSTALLATION INSTRUCTIONS
13.17 ARITHMETIC PRECISION
13.18 ALTERNATE STARTING ADDRESS
13.19 VT05 SUPPORT
  CHAPTER 14 TOPS-10 OPERATING CHARACTERISTICS
14.1 STARTUP
14.2 STARTUP CONDITIONS
14.3 FILE SPECIFICATION
14.4 BACKUP FILES
14.5 EXIT AND GO
14.6 <CTRL/C>
14.7 EXCEPTIONS
14.8 USER INITIALIZATION
14.9 INSTALLATION INSTRUCTIONS
14.10 TMPCOR SUPPORT
14.11 Q-REGISTER NAMES
14.12 REFERENCING THE TEXT BUFFER AS A Q-REGISTER
14.13 SHARING OF Q-REGISTER POINTERS
14.14 EDITING LINE SEQUENCE NUMBERED FILES
14.15 COMPILER RESTRICTIONS
  CHAPTER 15 BASIC-PLUS/BASIC-PLUS-2 HANDLING
15.1 PURPOSE
15.2 METHOD
15.3 INPUT PROCESSING
15.4 OUTPUT PROCESSING
15.5 FORM FEED INTERACTION
  CHAPTER 16 GLOSSARY OF OBSCURE TECO TERMS
  INTRODUCTION


TECO is a powerful text editing language available under most DIGITAL operating systems. TECO may be used to edit any form of ASCII text: program sources, command procedures, or manuscripts, for example. TECO is a character-oriented editor, and also offers a number of facilities for dealing with lines of text.

You can use TECO interactively, issuing commands which are to be executed as soon as they are typed in. (TECO is an interpreter.) In this mode, TECO can be used for tasks ranging from very simple to quite complex.

You can write sequences of commands called macros, which can be stored and then invoked by short commands or even single keystrokes. You can write sequences of commands to be run as TECO programs, and store them on disk for execution at convenience.

TECO can be used as an implementation language, as it provides powerful primitive functions for text processing, screen handling, and keyboard management. (The VTEDIT program included with some TECO distributions is an example of a full keypad editor developed in the TECO language.)

TECO correctly handles most sequential ASCII formats supported by the operating systems upon which it runs. It provides flexible pattern-matching constructs for text searching, file wildcarding, and special support for editing BASIC-PLUS/BASIC-PLUS-2 source programs. A split screen scrolling feature allows command dialogue to share the screen with an automatically-updated window into the editing buffer.

TECO's syntax is terse; commands are designed to minimize keystrokes. Also, the versatility of TECO "in all its glory" makes it complex. However, just a few commands suffice to get real work done, and a novice TECO user can begin creating and editing text files after only a few hours of instruction. More powerful features can be learned one at a time, and at leisure.

This manual presents TECO in two stages. The first part (Chapter 1) contains basic information and introduces that set of "just a few" commands.

Subsequent chapters describe the full TECO command set, including a review of the those commands presented in Chapter 1. These chapters also introduce the concept of TECO as a programming language and explain how basic editing commands may be combined into "programs" sophisticated enough to handle the most complicated editing tasks.

The early sections of this manual include few specific examples of commands, since all TECO commands have a consistent, logical format which will quickly become apparent to the beginning user. There is, however, an extensive example at the end of Chapter 1 which employs most of the commands introduced up to that point. Students of TECO should experiment with each command as it is introduced, and then duplicate the examples on their computer.

(If a video terminal which supports split-screen scrolling such as a member of the VT100 or VT200 families is available and the TECO being used supports it, seeing both your commands and their effects in the text buffer simultaneously can make learning easier. A command such as "5,7:W" allows 5 lines for command dialogue, while "watching" the text buffer on the remainder of the screen. The 7:W command is described in Table 5-17B.)

This manual is intended to be a reference manual, and except for Chapter 1 is not a tutorial. After Chapter 1, it is assumed that the reader has a general familiarity with TECO and is referring to this manual to find detailed information.


Notation


The following notation is used in this manual to represent special characters:


Notation ASCII code (octal) Name
<NULL> 0 Null
<BS> 10 Backspace
<TAB> 11 Tab
<LF> 12 Line Feed
<VT> 13 Vertical Tab
<FF> 14 Form Feed
<CR> 15 Carriage Return
<ESCAPE> or $ 33 ESCape or Altmode
<CTRL/x> - Control-x
<space> 40 Space
<DELETE> 177 Delete or Rubout
<DELIM> or ` - See below


<DELIM> is a character used to signify the end of text strings and TECO commands typed at the console. (TECO presumes that you may need to deal with carriage return and line feed as ordinary characters in ASCII text, so another character must be used as TECO's text-string and command-string delimiter.)

When a command string is being executed, TECO looks for the ESCape character (octal 033) as its delimiter. Some newer terminals, however, no longer possess an ESCape key. Late-model TECO's are capable of recognizing a surrogate (some other, user-specified) character as signifying an ESCape when typed at the console. Such a character echos as accent grave -- you see an ` character, and TECO receives an ESCape character. (Note that TECO programs, command files, and macros cannot use the surrogate, since it is translated to ESCape only when you type it at the console.) For details on choosing a surrogate for ESCape, see the EE flag or the 8192 ET bit (section 5.16).

Throughout this manual, the term <DELIM> is used to mean whatever character you type as a text-string or command-string delimiter. The ` character is used throughout to mean whichever character is echoed for a keystroke which passes an ESCape to TECO; if no ESCape surrogate is active, you will see a $ instead.

Control characters, <CTRL/x>, are produced by striking the CONTROL key and a character key simultaneously.

Throughout this manual, upper case characters will be used to represent TECO commands.

  PREFACE TO THE MAY 1985 EDITION


Trading in the ESCape key

In the beginning, terminals had ESCape keys. (Go back far enough and the device TT: stands for might actually have existed on the system, too.) Programs wanting to treat <CR> & Co. as data needed another character to serve as command delimiter, and ESCape looked available.

Times change. Welcome to ESCape sequences,
cursor-control and function keys. Farewell to $$.
to

See the Introduction for the notation used in this manual. Hello ``.


Changes to the manual

This edition of the manual incorporates new material pertinent to the enhancements to TECO-11 between Version 36 and Version 40 (see below).

Although this manual is still not intended to be a tutorial, some "how to learn" suggestions (such as use of split-screen scrolling) were added, as were indications of how TECO can be used to build custom-designed editors.

Numerous smaller changes were also made: clarifications, new index and glossary entries, additional explanatory material and cross referrals, correction of old typographic errors, and (no doubt) addition of new ones.

From Version 36 to Version 40 - affected section numbers

Manual organization/additions --

Introduction to Macros (new section), 4.3

Split-screen scrolling, 5.17

"Immediate action commands" renamed to "immediate inspection commands", 1,6.1

"Immediate action editing characters" (new name), 4.1

VAX/VMS filespec qualifiers, format/attribute table, G.11

Eight-bit ASCII character set table, Appendix A

Handling for BASIC-PLUS-x source files, Appendix J

"Significant" software changes --

ESCape surrogate - EE flag, 8192 ET bit, 5.16

Reverse paging (-P, et al, VAX/VMS only), 5.2

Reverse searching (-N, et al, VAX/VMS only), 5.7

Local Q-registers, 3.3.2

Local Q-register manipulation, 5.9

Immediate ESCape-sequence commands, 4.4

:^T, read/decode a keystroke, 5.11

32 ED bit controls immediate ESC-seq commands, 5.16

Acceptance and handling of 8-bit characters, [throughout]

Typeout of 8-bit data, and the 4096 ET bit, 5.16

n:^T, one-shot binary-mode character typeout, 5.4

TECO HELP facilities on VAX/VMS, G.13

"Minor" software changes --

^W as immediate mode command (screen re-paint), 4.2

<DELIM> character as immediate inspection command, 1.6.1, 4.2

Null tag allowed in computed GOTO, 5.13

nFRtext` command (replace n characters), 5.6

m,nFRtext` command (replace from m to n), 5.6

^E (form feed flag) can now be user-set, 5.11

Setting 1:W changes width and O/S characteristic, 5.17

WRAP/NOWRAP set by 256 ET bit on VAX/VMS, 5.16

128 ED bit inhibits auto-refresh in split scrolling, 5.16

Search matching with diacritical marks, 5.16

New 0:W codes for VT102 and GIGI scope types, 5.17

VAX/VMS handling of ^T (disabled when), 4.5


    Next page

Converted from a single text file by Yezerski Roper's VMS text-to-HTML converter AscToHTM
(© 1997-2002) John A. Fotheringham
Converted by AscToHTM