README.TXT TECO Macro Documentation for RT-11 V03B Copyright (C) 1978 by Digital Equipment Corporation The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any error that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. Digital Equipment Corporation assumes no responsibility for the use or reliability of its software on equipment that is not supplied by DIGITAL. The software described in this manual is Category C software; DIGITAL assumes no responsibility to support the software nor to answer inquiries about it. If you have problems with this software, you may contact the RT-11 Special Interest Group of DECUS (Digital Equipment Corporation Users' Society) at the following address: RT-11 Special Interest Group c/o DECUS Digital Equipment Corporation 129 Parker Street PK3-1/E55 Maynard, Massachusetts 01754 RT-11 TECO Files PAGE 2 RT-11 TECO Files This file contains all the general information about TECO related files in this kit. This page contains a list of all these files and a brief description. The following page contains build instructions for TECO, the pages after that contain instructions for use of the TECO macros enclosed. File Explanation README.TXT This file. TECO.SAV A runnable copy of RT-11 TECO TECO.OBJ The central module of TECO for version 28 TIO.MAC The source of the RT-11 I/O interface for TECO LOCAL.TEC TECO macro to reorder local symbol blocks in MACRO SORT.TEC TECO macro for general purpose memory resident sorting INSERT.TEC TECO macro for immediate mode editing with VT11 EDIT.TEC TECO macro for convenient startup with VT11 VT52.TEC TECO macro for immediate mode editing with VT52 VEG.TEC TECO macro for convenient startup with VT52 TECO and USR Swapping RT-11 TECO keeps the USR resident as long as possible, but if more memory is required the USR is made non-resident (assuming SET USR NOSWAP is not in effect). The informational message [+2K Memory] is produced. This is normal. TECO and VT11 Graphics Processors When TIO is assembled for VT11 support, the vector must be set properly in the system fixed offset area even though GT ON is not in effect. The fixed offset is 354(8) from the base of RMON that is contained in location 54(8). This location must contain the address of the vector for the VT11 in order for TECO to operate. The normal address for the vector is 320. RT-11 TECO Files PAGE 3 TECO Build Instructions The build instructions for TECO are as follows: MACRO TIO LINK TIO,TECO/EXEC 1. This kit does not include the source of TECO; we are in the process of trying to standardize TECO and believe distributing the source would not be wise. 2. This version of TECO is intended for RT-11 V03 or later. 3. This version will run with RT-11 V02C, but without C intercept support and EGcommand$. RT-11 TECO Files PAGE 4 LOCAL.TEC This macro renumbers local symbol blocks in MACRO assembly language programs. The local symbols are changed to start at 1$ and increment by 1 (2$, 3$, ...). The macro checks for .ENABL LSB and .DSABL LSB as long as they are in the current text buffer, and it handles them correctly. To load LOCAL.TEC when TECO has just started, type ERLOCAL.TEC$YHXL$$ To execute LOCAL.TEC, place the text pointer within the local symbol block to be reordered and type ML$$ An informational message is produced when LOCAL.TEC is finished. All q-registers are preserved. RT-11 TECO Files PAGE 5 SORT.TEC This macro sorts variable length ASCII records in ascending order. It accepts two inputs plus the text buffer to be sorted. Q-register A is set to the column number of the field to sort on (0 origin), and Q-register B is set to the field length. To load SORT.TEC when TECO has just started, type ERSORT.TEC$YHXS$$ To execute it, load the text buffer with the text to be sorted, set q-registers A and B (nUAmUB$$) and type MS$$ In response to the "Print Warnings?" message type Y if you want to see records with duplicate key fields, otherwise N. If any records are too short (that is, the entire sort field doesn't exist) error messages are produced. Either remove these records, that are typically not of the desired type or pad out short fields with blanks. When sorting directories, the date, null directory segment delimeter records, or free blocks message in directories are frequently too short for sorting. Note that if warnings are not produced, the ordering of duplicate records is not changed from the way they orginally appeared, but if warnings are produced the final ordering of the duplicates is backwards from how the records originally appeared. This causes the warning to be printed only once for each duplicate record. It also allows the records to be put into descending order by first sorting them into ascending order and then sorting again with 0UB and Y to the warnings prompt. All q-registers except A and B are preserved. RT-11 TECO Files PAGE 6 INSERT.TEC This macro provides immediate mode support for the VT-11 graphics processor. Screen display update occurs as characters are entered. This macro makes editing with the VT-11 extremely easy and accurate, but initially takes some editing to get used to. This macro is very complete and allows for almost any editing situation. The EDIT.TEC macro is usually used to load this macro when TECO is started. INSERT.TEC resides in q-register I. If EDIT.TEC is not used, INSERT can be loaded by typing ERINSERT.TEC$YHXIHK$$. MI$$ is used to start the INSERT macro. Any characters typed to INSERT are immediately put into the text buffer at the current position of the text pointer, except for the single character commands described below. Because the typed text is immediately displayed in the text buffer, INSERT stops terminal echo. The commands for INSERT.TEC are: Teco Character equivalent Description CTRL/H C Move text pointer forward 1 character. CTRL/R R Move text pointer backward 1 character. CTRL/A L Move text pointer down a line. CTRL/G L Same as CTRL/A, but works with GT ON. CTRL/N 0J Move text pointer to begining of text. CTRL/Z ZJ Move text pointer to end of text. CTRL/P 0L Move text pointer to begining of current line. CTRL/^ -L Move text pointer up a line. CTRL/D D Delete the character following the text pointer. Delete -D Delete previous character. CTRL/U 0K Delete the text from the begining of the line to the text pointer. CTRL/K K Delete the text from the text pointer to the end of the line. CTRL/T Insert a blank line and position before it. Esthetically pleasing for inserting text lines. CTRL/W Move the text pointer up a line to the same column. CTRL/X Move the text pointer down a line to the same column. CTRL/E Read the next input character literally, not as a command. CTRL/_ Same as CTRL/E, but works with GT ON. Escape Enter extended command mode. RT-11 TECO Files PAGE 7 Extended command mode allows any TECO command to be executed directly while remaining in INSERT. The text buffer is not affected except as the possible result of the executed TECO command. The TECO command to be executed is displayed in on the screen and can be edited with the following commands: Escape If a second Escape immediately follows the Escape that put INSERT into extended command mode, INSERT exits normally to regular TECO command mode. CTRL/U Aborts extended command mode, returns to normal insert mode. Nothing is executed. Delete Deletes previous character entered. Escape Escape Executes the command just typed and then returns to normal insert mode. Commands are executed with the text pointer at its last position in normal insert mode. If the command causes an error, INSERT has to be continued by executing MI$$ . Executing another macro is possible if the macro doesn't destroy any of INSERT's q-registers (LOCAL.TEC for example preserves all of the q-registers and can therefore be executed directly from INSERT). RT-11 TECO Files PAGE 8 EDIT.TEC This macro provides a convenient start up capability for users with a VT11. The functions it performs are: 1. Get the LOCAL.TEC macro and put it into q-register L. 2. Get the INSERT.TEC macro and put it into q-register I. 3. Prompt with the last edited file name, allow it to change, save the new name, perform an EB or EW for the file, and bring the first page of text into memory. 4. Execute the INSERT macro. To load EDIT.TEC when TECO has just started, type EREDIT.TEC$YXZMZ$$ EDIT prompts with the file name that was entered last. The Delete and CTRL/U keys can be used to edit this name. When the name is correct, Return (carriage return) opens the file as appropriate (EW if new file, EB if old file, nothing if no file), loads LOCAL and INSERT into q-registers, and finally starts INSERT. The EDIT macro is removed from memory to save space and to prevent it from accidently being used again during a session. RT-11 TECO Files PAGE 9 VEG.TEC This macro provides a convenient start up capability for users with a VT52. The functions it performs are: 1. Get the LOCAL.TEC macro and put it into q-register L 2. Get the VT52.TEC macro and put it into q-register I 3. Prompt with the last edited file name, allow it to change, save the new name, perform an EB or EW for the file, and bring the first page of text into memory. 4. Perform a 2ET command for scope mode command editing. 5. Execute the VT52 macro. To load VEG.TEC with TECO: SET EDIT TECO EDIT/EXEC VEG or EDIT/TECO/EXE VEG or R TECO *ERVEG.TEC$YXZMZ$$ VEG prompts with the file name that was entered last. The Delete and CTRL/U keys can be used to edit this name. When the name is correct, Return (carriage return) opens the file as appropriate (EW if new file, EB if old file, nothing if no file), loads LOCAL and VT52 into q-registers, and finally starts VT52. The VEG macro is removed to save space. RT-11 TECO Files PAGE 10 VT52.TEC This macro provides immediate mode support for the VT52 video terminal. The screen is updated as characters are entered. This macro makes editing with the VT52 extremely easy and accurate, but initially takes some editing to get used to. This macro is very complete and allows for almost any editing situation. The VEG.TEC macro is usually used to load this macro when TECO is started. VT52.TEC resides in q-register I. If VEG.TEC is not used VT52 can be loaded by typing ERVT52.TEC$YHXIHK$$. MI$$ is used to start VT52. Any characters typed to VT52 are immediately put into the text buffer at the current position of the text pointer, except for the single character commands described below. Commands shown with an 'n' in front of them take a numeric argument specified by followed by the command. For example, ESC 20 -> moves the text pointer to the right 20 characters. The commands for VT52.TEC are: (named character commands are not on the keypad) Keypad Teco Character equivalent Description n -> C Move text pointer forward 1(n) character(s). n <- R Move text pointer backward 1(n) character(s). n 0 L Move text pointer down 1(n) line(s). 1 0J Move text pointer to begining of text. 2 ZJ Move text pointer to end of text. 3 0L Move text pointer to begining of current line. n 4 -L Move text pointer up 1(n) line(s). n 5 D Delete 1(n) character(s) following the text pointer. 6 FR Delete the string just searched for or saved by use of the blue key. n 7 Insert 1(n) blank line(s) and position before it. Esthetically pleasing for inserting text lines. n 8 P Perform 1(n) page command(s). 9 Read the next input character literally, not as a command. n Delete -D Delete 1(n) previous character(s). Backspace L2R Position the text pointer at the end of the line. CTRL/U 0K Delete the text from the begining of the line to the text pointer. n CTRL/K K Delete the text from the text pointer to the end of the line; n is the number of lines. n CTRL/D Removes the text from the text pointer to the end of the line; n is the number of lines. RT-11 TECO Files PAGE 11 CTRL/C Exit from this macro to normal TECO mode. The macro is started again by MI$$. CTRL/Z Same as CTRL/C. n ENTER Accept a new search argument to be used in conjunction with the keypad '.' key. This argument may be edited with DELETE and CTRL/U and is terminated with the keypad '.' key which performs the first search (or nth search). n . Search for next(nth) occurence of ENTERed argument. If search fails, text pointer is moved to top of page. n (uparrow) Move the text pointer up 1(n) line(s) to the same column. n v(downarrow) Move the text pointer down 1(n) line(s) to the same column. n blue key Save 1(n) line(s) of text for moving, each successive key strike adds another line to movable portion; the first line saved is from the cursor to the end of line. grey key Retrieve saved text (from blue key) at current text pointer position. red key Enter extended command mode. Extended command mode allows any TECO command to be executed directly while remaining in VT52. The text buffer is not affected except as the possible result of the executed TECO command. The TECO command to be executed is displayed at the top of the VT52 screen and can be edited with the following commands: CTRL/U Aborts extended command mode, returns to normal insert mode. Nothing is executed. Delete Deletes previous character entered. Escape Escape Executes the command just typed and then returns to normal insert mode. Commands are executed with the text pointer at its last position in normal insert mode. If the command causes an error, INSERT has to be continued by executing MI$$ . Executing another macro is possible if the macro does not destroy any of INSERT's q-registers (LOCAL.TEC for example preserves all of the q-registers and can therefore be executed directly from INSERT). Escape Escape Executes the last entered TECO command.