TECO Reference Manual Digital Equipment Corporation • Maynard
Total Page:16
File Type:pdf, Size:1020Kb
08/8 TECO Reference Manual Order No. AA-H608A-TA ABSTRACT This document describes the Text Editing and Correcting Program for OS/8 users. SUPERSESSION/UPDATE INFORMATION: This manual supersedes the TECO chapter of the OS/8 Handbook (DEC-S&OSHBA-A-D). OPERATING SYSTEM AND VERSION: OS/8V3D To order additional copies of thisdocument, contact the Software Distribution Center, Digital Equipment Corporation, Maynard, Massachusetts 01754 digital equipment corporation • maynard. massachusetts First Printing, March 1979 The info~ation in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Bquipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may only be used or copied in accordance with the te~s of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by DIGITAL or its affiliated companies. Copyright (S) 1979 by Digital Equipment Corporation The postage-prepaid READER'S COMMENTS form on the last page of this document requests the user's critical evaluation to assist us in pre paring future documentation. The following are trademarks of Digital Equipment Corporation: DIGITAL DECsystem-10 MASSBUS DEC DEC tape OMNIBUS PDP DIBOL OS/8 DECUS EDUSYSTEM PHA UNIBUS FLIP CHIP RSTS COMPUTER LABS FOCAL RSX COMTEX INDAC TYPESET-8 DDT LAB-8 TYPESET-ll DECCOMM DECSYSTEM-20 TMS-ll ASSIST-ll RTS-8 ITPS-10 VAX VMS SBI DECnet lAS PDT DATATRIEVE TRAX ""1 CONTENTS Page PREFACE vii CHAPTER 1 INTRODUCTORY COMMANDS 1-1 1.1 FUNDAMENTALS 1-1 1.2 FILE SELECTION COMMANDS 1-2 1.3 INPUT AND OUTPUT COMMANDS 1-4 1.4 POINTER POSITIONING COMMANDS 1-5 1.5 TYPE OUT COMMANDS 1-6 1.6 TEXT MODIFICATION COMMANDS 1-6 1.7 SEARCH COMMANDS 1-7 1.S SUMMARY l-S 1.9 SAMPLE EDITING JOB l-S CHAPTER 2 CONCEPTS 2-1 2.1 INTRODUCTION 2-1 2.2 MEMORY USE 2-1 2.3 DATA FILES 2-2 2.4 CHARACTER SET 2-3 2.4.1 Special Characters 2-3 2.4.2 Control Characters 2-4 2.4.3 Carriage Control Functions and Responses 2-5 2.5 DATA FORMAT -- LINES AND PAGES 2-5 2.6 EDITING BUFFER 2-6 2.7 BUFFER POINTER 2-6 2.S GENERAL COMMAND STRING SYNTAX 2-7 2.9 ARGUMENTS 2-S 2.9.1 Text Arguments 2-S 2.9.2 Numeric Arguments 2-S 2.9.3 Commands That Return a Value 2-10 2.10 SUPER TECO 2-10 CHAPTER 3 USING TECO 3-1 3.1 INTRODUCTION 3-1 3.2 CALLING TECO 3-1 3.2.1 R TECO Command 3-1 3.2.2 General Purpose Initialization Commands 3-1 3.2.2.1 MAKE Command 3-2 3.2.2.2 TECO Command 3-3 3.2.3 MUNG Command 3-4 3.3 FILE SELECTION COMMANDS 3-5 3.4 INPUT COMMANDS 3-5 3.5 BUFFER POSITION NUMERIC ARGUMENTS 3-6 3.6 BUFFER POINTER POSITIONING COMMANDS 3-6 3.7 TEXT TYPE-OUT COMMANDS 3-6 3.S DELETION COMMANDS 3-7 3.9 INSERTION COMMru~DS 3-7 iii CONTENTS (Cont.) Page 3.10 OUTPUT AND EXIT COMMANDS 3-7 3.11 SEARCH COMMANDS 3-7 3.12 ITERATION COMMANDS 3-8 3.13 FLOW CONTROL COMMANDS 3-9 3.14 Q-REGISTERS 3-9 3.15 ERASING COM}1ANDS 3-10 3.16 ERROR MESSAGES 3-10 3.17 TECHNIQUES AND EXAMPLES 3-11 CHAPTER 4 TECO COMMANDS 4-1 4.1 INTRODUCTION 4-1 4.2 A APPEND COMMAND 4-2 4.3 nA COMMAND 4-3 4.4 AAtext<AA> TYPE-OUT COMMAND 4-4 4.5 B POSITION INDICATOR 4-5 4.6 C BUFFER POINTER COMMAND 4-6 4.7 "c COMMAND 4-7 4.8 D DELETE COMMAND 4-8 4.9 "D DECIMAL RADIX COMMAND 4-9 4.10 <DELETE> 4-10 4.11 AE END-OF-PAGE FORM FEED FLAG SIGNAL 4-11 4.12 EB EDIT BACKUP COMMAND 4-12 4.13 EC EXIT CLOSE COMMAND 4-14 4.14 EF END FILE COMMAND 4-15 4.15 EG EXIT AND GO COMMAND 4-16 4.16 EH EDIT HELP COMMAND 4-18 A ,., 't • .!. I EK EXIT KILL CO~mAND 4-19 4.18 EO VERSION COMMAND 4-20 4.19 ER EDIT READ cor4MAND 4-21 4.20 <ESCAPE> COMMAND 4-22 4.21 ET EDIT TERMINAL COMMAND 4-23 4.22 EU EDIT UPPER/LOWER COMMAND 4-24 4.23 EW EDIT WRITE COMMAND 4-25 4.24 EX EXIT COMMAND 4-26 4.25 AF COMMAND 4-27 4.26 FN FAST NONSTOP SEARCH/REPLACE COMMAND 4-28 4.27 FS FAST SEARCH/REPLACE CO~mAND 4-30 4.28 G GET COMMAND 4-32 4.29 <"G> COMMAND 4-33 4.29.1 <AG><Sp> Command Line Echo Command 4-33 4.29.2 <AG>* Command String Echo Command 4-34 4.29.3 <AG><AG> Command String Erasure Command 4-34 4.30 H WHOLE POSITION INDICATOR 4-35 4.31 I INSERT COMMAND 4-36 4.32 nI$ INSERT COMMAND 4-38 4.33 J JUMP COMMAND 4-39 4.34 K KILL COMMAND 4-40 4.35 L LINE COMMAND 4-42 4.36 M MACRO COMMAND 4-43 4.37 N NONSTOP SEARCH COMMAND 4-45 4.38 AN 4-47 4.38.1 <AN> Match Control Character 4-47 4.38.2 An End-of-File Indicator Command 4-47 4.39 o GOTO COMMAND 4-48 4.40 < ..... 0> COMMAND 4-49 iv CONTENTS (Cont .. ) Page 4.40.1 <~O> Type Out Command 4-49 4.40.2 <AO> Octal Radix Command 4-49 4.41 P PAGE COMMAND 4-50 4.42 PW PAGE WRITE COMMAND 4-52 A A .... <t.<t') Q Q-REGISTER COMMAND 4-54 4.44 <"'Q> 4-55 4.44.1 <"Q> Type-Out Control Command 4-55 4.44.2 <"Q> Match Control Character 4-55 4.45 R REv~RSE COt~·UU~D 4-56 4.46 S SEARCH CO~~ND .. .. ... 4-57 <t.<tl "s 4-58 4.47.1 <"'S> Store Command String Command 4-58 4.47.2 <"'S> Freeze Output Command 4-58 4.47.3 <"S> Match Control Character 4-58 4.48 T TYPE COMMAND 4-59 4.49 "T TYPE-IN COMMAND 4-61 4.49.1 "T Input Command 4-61 4.49.2 "T Typeout Command 4-61 4.50 <TAB> INSERT COR~D 4-62 4.51 U COMMAND 4-63 4.52 <"U> COMMAND 4-64 4.53 "Uqtext$ COMMAND 4-65 4.54 W WINDOW CO~~~D 4-66 4.54.1 W Command 4-66 4.54.2 nW Command 4-66 4.55 X EXTRACT COMMAND 4-67 4.56 <"'X> 4-69 4.57 Y YANK COMMAND 4-70 4.58 Z POSITION INDICATOR 4-71 4.59 !tag! 4-72 4.60 " BRANCHING COMMANDS 4-73 4.61 % COMMAND 4-77 4.62 • POSITION INDICATOR 4-78 4.63 MODIFIER 4-79 4.63.1 S Modifier 4-79 4.63.2 : Numerical Type-out Modifier 4-80 4.63.3 : Q-register Type-out Command 4-80 4.64 COMMAND 4-81 4.65 < •.. > COMMAND 4-82 4.66 = NUMERICAL TYPE-OUT COMMAND 4-84 4.67 ? COMMAND 4-85 4.67.1 ? Trace Command 4-85 4.67.2 ? Error Command 4-86 4.68 @ TEXT DELIMITER MODIFIER 4-87 4.69 \ COMMAND 4-88 4.69.1 \ Command 4-88 4.69.2 n \ Insertion Corranand 4-88 4.70 ""x COMMAND 4-89 4.71 COMMAND 4-90 APPENDIX A OCTAL & DECIMAL ASCII CHARACTER SET A-I APPENDIX B TECO ERROR MESSAGES B-1 APPENDIX C TECO COMMAND SUMMARY C-1 INDEX Index-1 v CONTENTS (Con t. ) Page FIGURES FIGURE 3-1 Command String for Example 2 3-14 3-2 An Elementary TECO Macro for Example 3 3-15 3-3 A Second Macro for Example 3 3-15 3-4 File-Packing Macro 3-15 3-5 Loading and Running the File-Packing Macro 3-16 3-6 Unpacking Macro 3-16 3-7 Loading and Running the Unpacking Macro 3-16 TABLES TABLE 2-1 Special Characters 2-4 2-2 Arithmetic/Logical Operators 2-9 4-1 C Commands 4-6 4-2 D Commands 4-8 4-3 EH Commands 4-18 4-4 ET Commands 4-23 4-5 EU Commands 4-24 4-6 J Commands 4-39 4-7 K Commands 4-40 4-8 L Commands 4-42 4-9 P Commands 4-50 4-10 PW Commands 4-52 4-11 R Commands 4-56 4-12 T Commands 4-59 4-13 X Commands 4-67 4-14 Conditional Execution Commands 4-74 4-15 Commands 4-84 4-16 @ Commands 4-87 vi PREFACE TECO is a text editing program that runs under the POP8 operating system. TECO may be used to edit any form of ASCII text such as program listings, manuscripts, correspondence and the like. Since TECO IS a character-oriented editor rather than a line editor, text edited with TECO does not have line numbers associated with it, nor is it necessary to replace an entire line of text in order to change one character.