SCROLL: A Scrolling Editor for OS/8 Darrell J. Duffy Computer Lab Department of Physiology and Biophysics West Virginia University Medical Center Morgantown, West Virginia January 1973 Edited by: Thomas W. McIntyre Current Version SCROLL V11 SCROLL Table of Contents Preface .................................... 1 Using SCROLL ............................... 2 General Structure .......................... 3 File Edit class commands ................... 4 Creating, Editing, and Deleting ....... 5 Edit Output ........................... 6 Edit Input ............................ 7 Command Line Commands Text Position commands ............... 10 Text Deletion commands ............... 11 Text String commands ................. 12 X Buffer commands .................... 14 Repeat command ....................... 15 Text Mode Commands Formating Characters ................. 16 Text Deletion ........................ 16 Cursor Position ...................... 16 Search and Macro ..................... 17 I/O Switches ......................... 18 The Display of SCROLL ..................... 19 Using SCROLL Without Display ......... 20 KBSCRL Display ....................... 21 Auto Tab Insertion ................... 23 Auto Tab for Assembler Users ......... 23 Auto Tab for FORTRAN or BASIC Users .. 24 Switching from DIAL to SCROLL ............. 25 Protecting Files .......................... 28 Advanced Uses of SCROLL Recovering Overfull Files ............ 29 Extending Files ...................... 29 Recovering Smashed Devices ........... 30 PIP and SCROLL files ...................... 31 Chaining to SCROLL ........................ 33 Patches to SCROLL ......................... 34 Error Messages ............................ 35 Summary of Commands ....................... 37 Preface SCROLL is a bidirectional editor. This means that SCROLL edits a single file instead of inputting from a file and outputting edited text to another file. SCROLL allows moving through the edit file in either direction with no restrictions. Formfeed characters within the file provide convenient markers but do not restrict movement. The file currently being edited is termed the main file. In addition there are two files known as auxiliary files which may be opened. One of these files is for input and one is for output. These auxiliary files allow merging or splitting of edit files easily. A page in either the auxiliary files or the main file is the text delimited by form feeds. Pages provide the basis for control of some of the editing commands to SCROLL. There are two types of commands to SCROLL: Text Mode commands and Command Line commands. Text Mode commands are CTRL keys typed in Text Mode and are executed immediately. CTRL keys are keys typed while the CTRL key on the teletype is held down. Command Line commands are typed into a special Command Line buffer which is displayed at the bottom of the scope. SCROLL maintains the file as a continuous packed string of characters. Part of the file is maintained in memory to be displayed and changed. When too much is added for the memory to accomodate, the remainder of the file is moved down to allow room. This is why the block limits of the file must be greater than the actual size of the text edited. When an EXIT or QUIT command is done, SCROLL writes out all of the file from memory so that it is a continuous packed string on the editing device. Using SCROLL SCROLL is distributed as a save file. To run the program, enter the following line to the OS/8 Keyboard Monitor's dot. .R SCROLL The current version number will be printed out. One of two commands must be given to SCROLL before it may do anything else. If you are just starting to create a new file, you should enter the command: $EMSYS:FILE.EX$$ _ __ Where $ stands for Altmode. This command will make a 10 _ block file called FILE.EX on the system device. You may now type in your program text or data or whatever. After completing this initial editing session, you will want to return to the OS/8 Keyboard Monitor. The command to return to the OS/8 Keyboard Monitor from SCROLL is: $QUIT$$ _ __ The next time you wish to edit the file called FILE.EX you must use the command: $EDSYS:FILE.EX$$ _ __ This gets you to the first line of the file. Again, to return to the OS/8 Keyboard Monitor, enter the command $QUIT$$ _ __ SCROLL-2 Command Line Commands General Structure When Altmode (Escape or Prefix on some terminals) is typed in Text Mode, Command Mode is entered and any characters typed are then entered into a Command Line buffer to be executed as a command. During entry of a Command Line, RUBOUT and CTRL/U may be used to edit it. RUBOUT removes the last character entered from the Command Line and CTRL/U ignores the Command Line and returns to Text Mode. A carriage return typed into the Command Line is entered as a CR/LF combination and a linefeed is entered as a linefeed. When an Altmode is typed, it is stored in the Command Line unless the previous character was an Altmode. In this case the command is executed. Before the command is executed it will be echoed if Command Line echo or full echo is enabled. Multiple commands may be entered on a Command Line. The commands are executed in order and any error will cause termination of the command string at the point of the error. The commands may, but need not, be separated by single Altmodes. An Altmode signals three things in the command line: the end of a string argument to a string command, the end of the device-filename specification of an Edit class command, and the relative locate command if it is immediately preceded by a non zero number. If you find it convenient you may also separate the commands with a space. Spaces between commands are ignored. This practice could lead to some confusion since -3$ moves the cursor back three lines while _ -3 $ does nothing. _ The Command Line commands provide two functions: Complex editing functions which may be combined for powerful text manipulation; and control of the I/O facilities of the editor such as opening and closing of main and auxiliary files and transfer of text between the main file and the auxiliary files. All of the commands may be preceded by a decimal number in the range -2048 to +2047. This number is an argument to many of the commands and will be ignored if the command does not use it. All the commands which require a numeric argument make some useful assumption if the argument is missing. In the following discussion n denotes a numeric argument preceding the command. SCROLL-3 File Edit Class Commands Edit class commands connect SCROLL with the main and auxiliary files and control input and output between the main file and the auxiliary files. EM, ED, EO and EI commands are followed by an OS/8 standard device-filename specification of the form dev:filnam.ex. No switches or other options are recognized except the length of the output file enclosed in square brackets [ ]. The length if present, must be a decimal integer with no embedded spaces. The device-filename specification must be terminated by an Altmode. Embedded spaces are ignored but must not appear within the square brackets. If a filename is entered without an extension, the following default extensions are used: .PA .RO .12 .DA .FT .BI .BA .FA .RA Each of these extensions is used sequentially. If no file exists with the given extension, the next extension is tried. An error results if none of the default extensions work. Also, auto tab insertion is used for each file depending on the extension. A 'tri-flop' is used to determine the auto-tab condition. The three tab stop conditions are assembler source files, FORTRAN or BASIC source files, and no tab stops. The CTRL/T command will change the tri-flop value from its assumed condition. This feature eliminates the need for a separate FSCROL program for FORTRAN source files. Also there are no default extensions for output files. DSK: is assumed if no device is specified. Note that EM and ED require a directory device. A filename is also required for ED and EM. Devices for the EO and EI commands may be either directory or non-directory and the name may be omitted for non-directory devices. If the command EO is given with no filename to a file-structured device, an error will result. However, an EI command may be given to a file-structured device and no errors will result. But "garbage" characters will be input starting at block 0 of the device. There are several things to note about the edit files created and maintained by SCROLL. When a file is to be edited by SCROLL there should be some extra room at the end of the file to allow for additions. SCROLL will not allow the file to overflow its area and destroy other files and it will not allow you to EXIT the file if there is more text SCROLL-4 than can be held in the file. Since SCROLL does not prescan the file to find out how much room is left, SCROLL does not find out there is not enough room in the file until it tries to EXIT or must shift the file down to make more room. By this time SCROLL has perhaps as much as three blocks more text than can be written in the file. The recovery procedure is fairly easy but it is troublesome to have to recover. It is much easier to plan the length of the file properly. SCROLL-5 EMdev:filnam.ex[n] Edit Make. Creates a new file of length n for editing. The length of the file may be specified in square brackets within the device-filename specification. If no length is specified, 10 is assumed. Any file of the same name and extension will be deleted from the specified device first. This command allows for creation of large areas on the device for scrolling. The file is connected with the editor as the main file so that entry of text can begin immediately. EDdev:filnam.ex Edit. Connects a previously created file with the editor as the main file. The file should have been created with EM to allow extra space to make additions. EXIT This command disconnects the main file from the SCROLL program gracefully. The main file is written out. Auxiliary files are still active if they exist. If the main file is too long to EXIT, SCROLL will type EX and return at the end of the file. EXIT must be spelled out correctly. QUIT This command does an EXIT if there is a main file and returns to the OS/8 Keyboard Monitor. The auxiliary output file is closed if there is one. If there is no main file, QUIT simply returns to the OS/8 Keyboard Monitor. QUIT must be spelled out. KILL Completely forgets the contents of the current main file. The file is not deleted from the directory or released from SCROLL. It is simply cleared to prepare it for new input. The tentative output file, if there is one, is still active. KILL must be spelled out. ABORT This command immediately disconnects the main file from SCROLL and releases its handler. An EXIT is not done and the contents of the main file may not be correct on the device unless the file was LOCKed. This command is provided to get you out of bad situations. It may be used in place of EXIT, if the file is LOCKed. ABORT must be spelled out. SCROLL-6 Auxiliary files are available to the user. These files may be used to split a large file into smaller ones or to create a large file from smaller ones. One may also extract subroutines or other portions of coding from assembly language files. Output to the auxiliary file is via the EW and EWP commands. 100EW$ writes 100 lines of text from the current _ line to the output file. It is usually much easier to insert a form feed in the main file and execute an EWP command than to count the lines to be output. The command 2EWP$ will _ output two pages starting with the current line. To output the current line use the command EW$. _ The EC command closes the auxiliary output file to make it permanent in the device directory (if file structured). It may be done at any time and must be done before a second EO command or the first auxiliary output file will be discarded. The output file remains active following an EXIT. This allows merging small pieces of large files into a single output file. This can be quite useful in editing data sets into new configurations. EOdev:filnam.ex Edit Output. Connects a standard OS/8 tentative output file with SCROLL as an auxiliary file. Output to the file is via EW and EWP. The file may be closed via an EC. The length option enclosed in square brackets [ ] may be used to specify a maximum length for the file. The file may be a non-directory device. In this case the filename and extension need not be specified. All tentative output files not yet closed are deleted by an EO and the output handler is released. nEW Edit Write. Write a number of lines of text to the auxiliary output file starting with the current line. A file must have been opened by the EO command. A positive number n may precede the command to control how many lines are transferred. One is assumed. As the command proceeds, the cursor moves through the main file. The cursor is positioned after the last character transferred by the command. EW may be stopped by striking a key. The key is SCROLL-7 ignored as is the rest of the command line. In the case of stopping the command, the process may stop in the middle of the line. The keyboard command CTRL/V should be used to put that line back together again before any thing else is done. nEWP Edit Write Pages. Same as Edit Write except only form feeds are counted. One page is assumed. As before, the output begins following the current line. If repeated pages are to be output, use of EWP1$ to move past the form feed at the _ end of the page will allow the CTRL/K to be used. EC Edit Close. The tentative output file is closed with the required length and the output handler is released. Note that the number of blocks specified by the EO command is checked by EW and if too many blocks are output, the file is closed with an EOF at the end. The cursor position will show one more than the last character successfully output to the file. The EI command allows merging of files into a main file. Input can be from any OS/8 device or file. The command EIDTA1:SUBR.PA$ sets up a file on DTA1: for input. _ The ER and ERP commands transfer from the input file. 10ER$ reads 10 lines into the main file. 1PERP$ reads one _ _ page into the file following the current page. ER and ERP read without auto tab insertion. ES and ESP behave like the ER and ERP commands except no text is inserted into the main file. The input is ignored. These commands are used to position the input file. $EIFILE$ 2ESPERP$$ reads the third _ _ __ page of FILE on device DSK:. The input file need not be closed. An error occurs if an attempt is made to read beyond the EOF of the input file. The error will also occur if the last page is read with an ERP and it is not ended by a form feed. If you do not read all of an input file and wish to start reading another, simply open the new file. The old file will be dropped. EIdev:filnam.ex Edit Input. Connects a standard OS/8 input file to SCROLL as an auxiliary file. Input control is via ER, ERP, ES, and ESP. Non-directory devices may be used. PTR: may be used to input paper SCROLL-8 tapes to SCROLL. RUBOUTs and null characters are not ignored, so if these occur on the tape it is better to use PIP to copy the tapes to a directory device first. (Paper tapes may also be input by just reading as normal input with the TTY reader since linefeeds are ignored). Another EI command supercedes the last one. No input close command is needed. The input file is automatically released if an EOF is encountered on input. Of course, a SCROLL file may be used as input with no problems. nER Edit Read. Lines of text are transferred from the auxiliary input file to the main edit file. n specifies the number of linefeeds to be transferred. Input is inserted following the current line. nERP Edit Read Pages. Pages of text are transferred. This command may also be stopped by striking a key as above. nES Edit Skip. Behaves exactly the same as ER except that the input is ignored. This command is used for positioning the auxiliary input file. nESP Edit Skip Pages. Analogous to ERP. With the use of auxiliary input and output files, one may begin to accumulate a lot of temporary auxiliary files. The following command allows one to delete unwanted files. EKdev:filnam.ex Edit Kill. Deletes the file specified from the directory on the device. The command may be done at any time. One may wish to list a line or several lines or pages on the console teleprinter either for hard copy or verification. SCROLL allows this via the Type commands. nT Type. Type text beginning at the current line onto the teletype. n specifies how many lines. The text is typed out with tabs expanded and form feeds typed as nine line feeds. Long lines are broken automatically. nTP Type Page. n specifies how many pages of text will be typed. SCROLL-9 Text Positioning Commands For all the positioning commands, a minus number implies motion towards the beginning of the file. Should a typing error cause a positioning command to run away, it may be stopped by typing any key. Page commands stop at pages, and line commands stop at lines. The key struck is ignored. n$ $ indicates the Altmode key. If preceded by a _ _ decimal number the current line is located to the relative line. If no number is present the command is ignored. On an unended line (no CR/LF) 1$ is _ equivalent to CTRL/V in Text Mode and will concatenate the line with the following line. nP Locate to the relative page. Move forward or backward over n form feeds. The cursor will be located after the form feed. Minus one is assumed for n. / Locate to the end of the main file. This command is equivalent to 2047P$. _ B Locate to the beginning of the main file. This command is equivalent to -2048P$. _ ! Locate to the first line of the main file after moving to the end first and writing out all of the file. This comand has the same effect as EXIT followed by an ED command reopening the file for editing. It is much faster than B if you are past the middle of the file. nJ Jump the cursor n places forward or backward. J has the same effect as n CTRL/A's or CTRL/Q's typed in text mode. Note the anomaly when moving across line feeds and form feeds still applies. 1 Is assumed for n. F Place the cursor at the front of the current line. If the cursor is at the start of the current line, the cursor will be placed at the start of the previous line. The command is exactly the same as the CTRL/F keyboard command. H Home the cursor. Move the cursor to the home position. The home position of the current line is the end of it. Similiar to CTRL/H. V KBSCRL only- Verify the current line. Echo the current line and mark the cursor position with an uparrow (^). SCROLL-10 Text Deletion Commands The text deletion commands are summarized below. These commands permit deletion of single characters, groups of adjacent characters, single lines, groups of lines, pages, or groups of pages. nD Delete n lines forward or backward. The cursor is homed first so that forward deletion will not delete the current line and backward will. Minus one is assumed so that D alone will delete the current line. nDP Delete from the current line forward or backward until the nth formfeed is encountered. Be careful to insert an Altmode between the D and P if you intend to delete n lines and move backward one page. Carelessness may result in disaster. Minus one is assumed for n so that DP alone will delete back to the previous form feed (or the beginning if no form feed is found). U Acts exactly as CTRL/U typed from the keyboard. Deletes all characters to the left of the cursor up to but not including a line feed or form feed. This is not the same as a D command since D homes the cursor first. nW Withdraw. Deletes n characters to the left of the cursor. n must be positive. In addition, the file command KILL deletes the entire main edit file. SCROLL-11 Text String Commands SCROLL has a wide set of string commands. Commands are available to search for text strings, replace the targets of search commands, and insert text into the main file. String search commands search for an arbitrary text string in the main file. The cursor is placed at the end of the string on successful completion of the command. The target string must exist on a single line to be found. It may not be split between lines. Carriage return, line feed and form feed may be used in the search string but the string will not be found unless the carriage return, CR/LF combination, or form feed are the last characters of the string. The search string is entered immediately after the search command character and is ended by an Altmode. If the Altmode immediately follows the search command character, the previous search string is used. The numeric argument is used to specify the occurrence count for the search. It specifies which occurrence of the target string will stop the search. One is assumed so that the search will stop at the first occurrence. If the search string specified is too long, an SS error message is printed and the command line is terminated. The maximum length for the search string is 16 characters. Before backward searches are begun the cursor is backed up the number of characters plus one more than the length of the search string. Before forward searches, the cursor is moved forward one character. This is done so that each search command will find the next occurrence of the string in the specified direction. Runaway searches may be stopped by typing any character. The character is ignored and the search stops at the end of a line. S and _ (backarrow, SHIFT/O) searches stop at form feed characters encountered in the main file. This allows the user to break a very large file into smaller pieces for more convenient editing. In this way searches that fail because of typing errors or because the target string does not exist in the file, may be stopped within a short distance of where they were started. The Insert and Replace commands allow the insertion of characters into the main file which cannot be typed directly into the file via Text Mode. For instance, CTRL/Z can not be typed in Text Mode since it is intercepted as a keyboard command to continue a search. CTRL/Z in the file marks the end of the file. It is displayed as a block of dots as are many of the other CTRL characters. If it is entered into the text and subsequently moved backwards off of the scope, the remainder of the file becomes forever inaccessable to SCROLL. This is a clean way to cut a file short. SCROLL-12 nSstring$ Search forward from the current cursor _ position for the search string. Stop if a form feed is encountered. n_string$ (Backarrow - SHIFT/O) Search backward from the _ current cursor position for the search string. Stop if a form feed is encountered. nZstring$ Search forward from the current cursor _ position for the search string. Stop only at the end of the file. n^string$ (Uparrow - SHIFT/N) Search backwards from the _ current cursor postion for the search string. Stop only at the beginning of the file. Istring$ Insert the text ended by an Altmode into the _ main file. Auto tab insertion is used if it is enabled. If the Altmode immediately follows the I, no text is inserted. Gterminator$ Special text insertion mode for all normal or _ control characters. The character immediately following the G is interpreted as the terminator. After the text has been entered, type the terminator to end special insertion mode. nRstring$ Replace the argument of the last search by the _ following string. n may be specified. If n is a positive non-zero number, then n characters are deleted to the left of the cursor position. If n is zero or not specified, the number of characters in the last search argument are deleted. R is followed by a text string just as is I and behaves as does I. SCROLL-13 X Buffer Commands The X Buffer is an area of storage which is used as a temporary text buffer. Lines or pages of text may be transferred to the X Buffer and the contents of the X Buffer may be transferred back to the main file at any point. There is a provision for transferring the X Buffer many times in sequence into the main file. The X Buffer will hold approximately 900 characters or roughly 30 average lines of code. To yank a long string into the middle of a line use the command Y2W$. This will delete the CR/LF at the end of _ the X Buffer and the cursor will be in the middle of the new line. nX Xfer. Transfer n lines of text into the X Buffer. The numeric argument specifies the number of lines beginning with the current line which are to be transferred. One is assumed. n must be positive. If the line is not ended it will be concatenated with the following line. nXP Xfer Pages. Transfer pages of text into the X Buffer. Lines are transferred from the current line to a form feed. The number of pages is specified by n. One is assumed for n. nY Yank. Transfer the X Buffer into the main file at the cursor position. The numeric argument specifies how many times to transfer the text. One is assumed. CTRL/X Transfers one line of text into the X Buffer while in text mode. CTRL/Y Transfers the contents of the X Buffer into the main file at the cursor position while in text mode. SCROLL-14 Repeat Command Any portion of a command string may be executed repeatedly by specifying an appropriate numeric parameter and enclosing the portion with '<' and '>'. The construction is only legal for a single level but may be repeated on the command line. n< Begin an iterative command string. Any positive number may be used as the argument in the range 1-4095. > Terminate the iterative command string. '<' And '>' must be paired and may not be nested. SCROLL-15 Text Mode Commands The following characters have the indicated function when they are typed in Text Mode, that is, when they are not typed into the Command Line. The KBSCRL version performs the same functions in addition to the echo of the line or character being modified. Formatting Characters CR Enters a carriage return and line feed into the main file. LF Always ignored in Text Mode. Altmode Enter Command Mode. Text Deletion RUBOUT Delete one character except that carriage return is deleted with a line feed when the line feed is deleted at the end of a line. KBSCRL echoes the character deleted. CTRL/U Delete text to the left of the cursor up to but not including the CR/LF combination. KBSCRL echoes the new current line. CTRL/R Delete text to the right of the cursor on the current line including the CR/LF combination. KBSCRL echoes the new current line. CTRL/O Delete the tab at the beginning of the current line if there is one and home the cursor. CTRL/O will delete the tab inserted by the auto tabbing feature of SCROLL. KBSCRL echoes the new current line. Cursor Positioning CTRL/F Move the cursor to the front of the current line. The cursor will be just after the line feed or form feed of the previous line. If the cursor is at the beginning of the current line when the command is given, it will be placed at the beginning of the previous line. KBSCRL echoes the new current line and marks the cursor position with an uparrow. CTRL/H Move the cursor to the home position, that is, to the end of the current line. If the line is ended, the cursor will be displayed on the next line. If the current line is not ended, the cursor will be SCROLL-16 displayed at the end of it. KBSCRL echoes the new current line and marks the cursor position with an uparrow. CTRL/A Move the cursor forward one character. If the cursor is in the home position of the line, the next line is brought onto the scope but the cursor position is not changed. The cursor is still positioned after the line feed or form feed of the previous line. CTRL/A and CTRL/Q will not move off an unended line. The line must be ended by a line feed or form feed. KBSCRL echoes the character the cursor passed over. CTRL/Q Move the cursor backward one character. If the cursor is at the beginning of the current line, that is, immediately after the line feed or form feed ending the previous line, then the current line is removed from the scope and the cursor is at the home position of the previous line. Note that the cursor has not moved with repect to that line. KBSCRL echoes the character the cursor passed over. CTRL/W Move back one line. (Prohibited on an unended line). KBSCRL echoes the new current line. CTRL/S Move forward one line. (Prohibited on an unended line). KBSCRL echoes the new current line. CTRL/V Move forward one line whether the current line is ended or not. This command allows concatenation of the current line and the next line. KBSCRL echoes the new current line. CTRL/G Move forward one page only if the current line is ended. A page delimiter is defined as a form feed. CTRL/P Move backward a page only if the current line is ended. A page delimiter is defined as a form feed. Search and Macro CTRL/Z Continue the last text string search in the forward direction. If unsuccessful, the search will stop at a form feed. CTRL/N Continue the last text string search in the backward direction. Continued searches always stop at form feed characters in the main file. Underline is backarrow on most TTYs. SCROLL-17 CTRL/C Execute the last command line again. I/O Switches CTRL/T Change the state of the auto tab insertion triflop. The auto tab mode initially assumed depends on the main file extension. The three auto tab modes available are for assembler files, FORTRAN or BASIC files, and files with no tabs. CTRL/E Advance the state of the echo tri-flop. (No echo - Command Line echo - Full echo). In no echo mode, no characters are echoed on the teletype. In Command Line echo mode, the Command Line is typed on the teletype just before it is executed. This allows the user to check the arguments of text string searches and the names of files opened. Dollar signs ($) are printed for Altmodes. In full echo mode, all characters typed into the text are echoed. Command echo is also in effect. In KBSCRL, this command is not available. CTRL/D Controls the display of certain characters. Normally tabs are displayed by positioning the characters following them at the next 8-column tab stop. CTRL/D causes them to be displayed as a distinctive underline character as they are displayed in the Command Line. Carriage returns are display as a left pointing down arrow as they are in the Command Line. CTRL/D is a complementing switch. In KBSCRL, all control codes are displayed as "^alpha" construction. Example: CR ^M, LF ^J, FF ^L, TAB ^I CTRL/B Display the most recent command executed in command mode on the command line. CTRL/K Shift case of input characters. SCROLL-18 The Display of SCROLL SCROLL displays a number of lines on the scope ending with the current line. Each line is begun with a marker (a solid triangle) to mark it as the beginning of a line. If a line is too long for the scope, it will automatically be continued on the next line. No characters are inserted to break long lines. If the current line is ended, a triangle is displayed on the following line to signify this fact. n# The number of lines displayed on the scope is changed to n. Five lines is the default value for the number of lines displayed for assembler files (.PA and .12). For all other files, three lines is the default value for the number of lines displayed. The cursor, which is the character pointer of SCROLL, is displayed as a vertical line between two characters. This convention indicates the function of the cursor since insertions are always made at the cursor point between two characters and deletions are made to the left of the cursor. The cursor is displayed somewhere on the current line at all times. The cursor is implemented as a minus number or zero indicating the number of characters back from the end of the current line on which the cursor rests. This character is termed the cursor character. The cursor is displayed immediately following the cursor character. The home position for the cursor is at the end of the current line whether it is ended or not. The front line position of the cursor is at the end of the previous line. The cursor character is the line feed or form feed of the previous line. The value of the cursor is minus the number of characters on the current line. This convention is the source of a small anomaly with regards to the moving of the cursor forward or backward across lines. There are two positions of the cursor for which the cursor character are exactly the same. Consider that the cursor is in the front line position. The cursor is on the line feed or form feed of the previous line. If we move the cursor back one position, the current line is moved off the scope and the previous line becomes the current line. The cursor is placed at the home position of this line and is still on the line feed or form feed of this line. To the eye watching the scope, this is perfectly natural. However, a problem develops when we begin to count characters to use the J comand to move the cursor. The same convention holds for the J command, so we must take this into account when devising counts for the J command. Note that there are better ways to SCROLL-19 get where you are going than using a J command. Use a search or an F or H or locate command. It will save a lot of trouble. Some special characters are displayed so that the user can more easily interpret his file. Line feeds and form feeds are displayed as a marker on the next line. The cursor is displayed after this marker if it is on the line feed or formfeed. In addition, form feeds display as a curved down arrow, the opposite direction of the carriage return, when it is displayed. The arrow for form feed curves to the right. Carriage return is not displayed normally in the text. In the Command Line, it is displayed as a curved arrow to the left. The CTRL/D switch causes carriage return to be displayed as the curved arrow in text also. Although SCROLL tries to assure that a carriage return is always followed by a line feed, by inserting line feed after carriage return and deleting carriage return after any line feed, it is possible by trickery with cursor commands to separate them. This will cause no end of grief since a non-displayed carriage return in the middle of a line will cause line termination to PIP and PAL. CTRL/D shrinks tabs to underlines and causes the phantom carriage returns to appear. Strike CTRL/D again and all is normal. Lower case characters display as such. It's a strain to fit them in a 4x6 display matrix but with practice you will see them. They affect the output of no standard program there may be a problem with some editors which put rubouts after all tabs and form feeds. If you look at a file with SCROLL and it looks very "blocky", just copy it somewhere with PIP and look at it. PIP should clear it up nicely. Using SCROLL Without Display While SCROLL is a display oriented editor it is quite usable on machines without display. The only possible difficulty is that the display IOT codes might be used for other functions on the computer. To use SCROLL without display you need only disable the display routines (using ODT) and be sure that full echo is on. A non-displaying SCROLL will run on any OS/8 machine. SCROLL-20 KBSCRL Display KBSCRL is the hard copy oriented version of the editor. The constraints of hard copy output require modification of the 'display' and some of the command structure of SCROLL. One clearly cannot maintain a full display that exactly reflects the current state of the main edit file. The changes primarily affect the positioning commands. The commands to move the cursor forward and backward cause an echo of the line or character scanned rather than just moving the cursor. Also RUBOUT, CTRL/U, and CTRL/R cause an echo. The letter 'V' appearing on a command line functions as a Verify and echoes the current line marking the cursor position. At any time the current status of the file may be examined by the Type command which echoes on the editing terminal. For example: $-10$11T$$ Moves the cursor back 10 lines and then echoes those 10 lines on the terminal. Example 2: ^Q^Q^Q^Q^Q$V$$ Moves the cursor back 5 characters in the current line echoing each and then echoes the line with an uparrow marking the cursor position. Moving backward into the line is usually better accomplished with a search command. For example: $^TAB$V$$ Searches forward for the string TAB and echoes the line on which it is found, marking the position of the cursor with an uparrow. In general, text mode commands which alter the cursor position echo text and command line commands do not echo any text unless explicitly with Type or Verify. An attempt is made to display all characters with control characters displayed as ^ (uparrow). If the display tabs switch is set (^D) then tabs, carriage return and line feed characters are displayed as their ^ construction with CR and LF having their formatting function as well. Turning the switch off causes these characters to be displayed as formatting functions only. The Type command does not follow the CTRL/D switch and always outputs formatted text. The SCROLL-21 echo triflop is inactive, full echo is always on. There is a minor problem with rubouts on a new line. It is necessary to delete both the carriage return and the line feed character even though only the CR was typed. This will likely be corrected in the next release but the code on that page is core tight now. There are some minor echo problems with tab characters on input. SCROLL automatically inserts tabs for Assembler or Fortran code if the autotab switch (^T) is set. These tabs do not echo however because they are deleted and replaced by a tab following the comma to designate a label. In addition, explicit tabs echo as ^I rather than their formatting function because frequently the formatting effect is more confusing than helpful. The command CTRL/H can always be used to display the current condition of the line on input and the tabs will be presented properly. SCROLL-22 Auto Tab Insertion Auto tab insertion automatically formats files during both initial entry and subsequent editing. The mode of insertion depends upon the state of the auto tab triflop. The three states of this triflop are assembler file auto tabs, FORTRAN or BASIC file auto tabs, and no auto tabs for all other files. Initially, the auto tab triflop is set to a mode corresponding to the type of extension in the main filename. If the extension of the main file is .PA, .12, or .RA, the assembler mode of the triflop is assumed. If the extension is .FT or .BA, the compiler mode of the auto tab triflop is assumed. For all other extensions the no auto tab mode of the triflop is assumed. The CTRL/T command changes the value of the triflop by sequentially stepping through the three modes. Auto Tab Insertion for Assembler Users The assembler auto tab mode is assumed by SCROLL if the main file has an extension of .PA, .12, or .RA. It saves the programmer many key strokes per line, perhaps as many as three or four since it inserts all tabs necessary to align the instructions and comments of the program. We will describe the algorithm of auto tab insertion but it is much easier to understand its operation by watching its effects on the scope. The prime function of auto tabbing is to insert a tab before every line of text as it is entered to align the instructions of the program. If the cursor is in the home position at the start of a new line, then a tab is inserted before any but the following characters: CR, LF, FF, *, /, TAB. If the cursor is at the home position and not at the start of the line and a comma is typed, the tab at the beginning of the line is deleted if there is one, and a comma followed by a tab is inserted. If there is a slash or comma on the line somewhere before the cursor position or the character immediately before the cursor is a double quote, the leading tab is not deleted when a comma is typed. Also, if two or more tabs or spaces are in the current line, SCROLL will not delete the leading tab if a comma is typed. This allows special characters to be entered and allows RALF files to formatted properly. Double quote is checked to avoid tab deletion after using an ASCII constant comma (i.e. ",). If a slash is typed and it is not the first character of the line then enough tabs are inserted to bring the slash to column 25. No tabs are inserted if the slash would go at column 25. If it is entered beyond column 24, a space is inserted before the slash. Also, no tabs are inserted if the character before the cursor is a double quote. Note that SCROLL-23 this presents a slight problem when using an ASCII constant double quote followed by a comment. To avoid this problem, enter a space after the second double quote. CTRL/P may be used to remove the tab at the beginning of a given line. This is generally used to place Pseudo Ops at the left margin. Auto tab insertion is active for text mode and for the I and R commands. It is not active for the ER command. Auto Tab Insertion for FORTRAN and BASIC Users If the main file extension is .FT or .BA, the compiler mode of the auto tab trifop is set to format FORTRAN or BASIC files. The auto tab insertion saves the programmer many key strokes per program. The algorithm for FORTRAN and BASIC auto tab insertion is described below, but again, it is much easier to understand the operation by watching its effects on the scope. The major function of SCROLL's compiler auto tab insertion is to align all FORTRAN or BASIC statements after column 7. SCROLL aligns all statements in column 8 because of the tab which is automatically inserted. If the cursor is in the home position at the start of a new line, then a tab is inserted before any character except the following: the numeric digits 0 through 9, carriage return, line feed, form feed, and tab. A tab or a number of spaces must be inserted after the FORTRAN or BASIC statement number is typed, in order to get to column 7 or 8. To enter FORTRAN continuation lines, type a space as the first character on the line. SCROLL will tab to column 6 automatically. For FORTRAN users, comments begin with a 'C' and have a tab inserted in front of them. The CTRL/P function will delete the tab which is inserted in front of the 'C', so that comments will behave normally. SCROLL-24 Switching from DIAL to SCROLL A user familiar with DIAL can use SCROLL with a minimum of effort. SCROLL is called from the OS/8 Keyboard Monitor with ".R SCROLL". Once he is in SCROLL he should create a file called WA.WA on the disk or system device. SCROLL will respond initially to nothing but an Altmode because there is no file in which to type. The command string: $EMSYS:WA.WA$$ _ __ creates a 100 block Working Area. ($ Indicates Altmode key). _ He can now use this space in the same way as DIAL's Working Area. Files can be brought in with the EI command which is analagous to ->AP in DIAL: $EIFILNAM.EX$ 100ERP$$ _ _ __ will read in a file containing no more than 100 form feed characters. There will be an error message which should be ignored in this case. It means the input file did not have 100 edit pages, but the file was all read. Files may be saved with the EO command which is analogous to DIALs ->SP command. If the file does not contain form feeds it is convenient to place one at the end, by executing the command: $/$$ _ __ and inserting the form feed. Now go to the beginning of the file the fast way: $!$$ _ __ Now save the file: $EOFILNAM.EX$EWPEC$$ _ _ __ Will write a file with one form feed at the end onto the device DSK:. If there is an error message, the EC command was not performed (probably because you forgot the form feed) and it should be done immediately: $EC$$ _ __ If the file contains form feeds you can use a numeric argument to ensure that it is all written: $EOFILNAM.EX$1000EWP$$ _ _ __ In this case you are almost certain to get an error message because there are not 1000 form feeds in the file. Ignore it SCROLL-25 and use the EC command to close the file. To clear the working area, use the command KILL. This has the same function as ->CL in DIAL: $KILL$$ _ __ The working area is now cleared for new input. SCROLL does not use the knobs to control the display. The keys CTRL/S and CTRL/W move the cursor forward and backward one line respectively. The keys CTRL/A and CTRL/Q move the cursor forward and backward one character, respectively. These keys may be struck with the REPEAT key held down to move the cursor faster. The command: $n#$$ _ __ Sets the number of lines to display on the scope to n. The command: $/$$ _ __ Moves to the end of the file. The command: $B$$ _ __ Moves to the beginning of the file. RUBOUT deletes one character to the left of the cursor. CTRL/U deletes everything to the left of the cursor on the current line. CTRL/R deletes everything to the right of the cursor. To return to the Keyboard Monitor to run another program, i.e., the assembler or another program, type: $QUIT$$ _ __ This returns to the OS/8 Keyboard Monitor. After your first editing session you can re-enter the working area with: $EDSYS:WA.WA$$ _ __ Programs left in the Working Area (file WA.WA) will be intact. The above commands represent a very small subset of SCROLL's capabilities, but they serve to get you almost all the power of DIAL. Once you are comfortable with these you should read the full documentation again. SCROLL-26 Helpful Hints in Using SCROLL To position yourself in the main file, you may use the 'nP$' command to move forward n edit pages (over n form _ feeds). Another way to position yourself is to use the 'Z' search command. The command '$Zstring$$' will position the _ __ file after the first occurrence of 'string'. The CTRL/C and CTRL/Z commands are useful when using the Search and Replace commands. After the first search is made for a symbol you wish to change, enter a Replace command followed by a Search command with no argument. As SCROLL stops at each occurrence of the symbol, you may visually inspect the text. If you wish to replace the string, strike CTRL/C; Otherwise, type CTRL/Z to continue the search from the current cursor position. SCROLL-27 Protecting Files At times it may be desired to protect the main file from modification. LOCK provides the ability to completely inhibit insertion of text into the main file by any means. Also all write operations on the main file are inhibited. This saves time when examing a file. LOCK inhibits the deletion commands also so that it is not possible to modify the file in any way. The LOCK command must be done when no main file is connected with the editor. The LK error message indicates the inability to LOCK a file once it is opened. This restriction is enforced since when modifications are made they must be written out to be preserved. Since LOCK inhibits write operations, if a file were LOCKed after it were opened the changes might not be written out. The CLOCK command clears the LOCK condition. CLOCK may be done when a main file is connected with SCROLL. The file then becomes available for modification. ABORT or EXIT disconnects a main file from SCROLL. When using the LOCK feature, ABORT is sufficient since EXIT will cause a move to the end of the file. Since nothing is written out this is wasted I/O time. Note that ABORT is not sufficient after a CLOCK has been performed. KILL does not release the main file from SCROLL and a LOCK cannot be done after a KILL. Note that LOCK and CLOCK must be spelled out correctly to have effect. An error message will be printed if a mistake is made. LOCK Lock the main file and inhibit all write operations. Must be executed before an ED command. (It is legal but nonsense before an EM command.) CLOCK Clear the LOCK condition. Allows the current main file to be modified after a LOCK. SCROLL-28 Advanced Uses of SCROLL The following notes may help you recover from bad situations or at least save some time. They are rather dangerous unless followed carefully. Novice programmers should read them very carefully before attempting them. Recovering Overfull Files When you have added so much to a file that SCROLL is unable to EXIT or finds no space at the end when it attempts to shift the end of the file down, SCROLL's main file has become full. No further insertions are allowed. Characters typed from the keyboard are ignored in text mode and EDIT Input prints an error message. The deletion commands are still active so that you can delete enough to allow SCROLL to EXIT. The EO command may be used to create a file to hold the overflow text and a couple of pages may be written to the file to allow room for SCROLL to EXIT. There are a couple of ways to know when you have deleted enough text. If you are in the middle of the file somewhere and the FL error occurs during a shift operation, SCROLL will allow you to insert text again when you have deleted an entire block. When you are at the end, you must try to either initialize your program with a ! or EXIT command. If you get an EX message, you need to delete some more text. When you have EXITed the file, you have two courses of action. You can rebuild a single file or maintain the file as two separate parts. The file of overflowed text may serve as a start for a second file. Use the EI command to setup the file to add to a new file built with EM. Extending Files If you are running out of room in a file and would like to make it longer, there is a trick you may be able to play with SCROLL to save a lot of time. If you are sure that there is nothing beyond the file you are editing and there are no empty files before the file which would contain the desired file length, you may EXIT the file, and EM the same file longer on the same device. You must immediately ABORT this new file and reopen it with and ED command. If we are editing a file called WORKA and would like more space, the command: EXIT EMWORKA$ ABORT EDWORKA$$ _ __ SCROLL-29 Would lengthen the file to 100 blocks. Care must be used with this trick or the file may be lost. If you are already out of room, sometimes the X Buffer will hold enough text to allow you to EXIT and remake the file longer. Put the text in the X Buffer, then delete it from the main file. Next extend the main file as above, then move back to where your text belongs and Yank it back in. If the trick cannot be used because there is a file after it in the directory, you must create a new file with EM. The name must be different if the device is the same. Also if DECTAPE or LINCTAPE is used, the file should be on a different tape. The old file should be opened for input with an EI command. For example, the command: EDDTA1:WORKA$ 1000ERP$$ _ __ Will read the entire file into the newly created file. Recovering Smashed Devices If the directory of a device gets smashed, SCROLL may be able to help you recover ASCII files on the device. After zeroing the directory with PIP, if it has been completely destroyed, use SCROLL to create a file which completely fills the device. Now immediately ABORT this file; this will allow you to open it again for editing. Now LOCK SCROLL's edit file and ED the file. The LOCK will assure that nothing is written out so that it can't be changed and it will save I/O time also. SCROLL cannot be destroyed by what it reads from the file; the display may look very bad but that won't matter. Begin moving forward through the file with CTRL/S commands and watch for your lost file. If SCROLL stops it is because it has encountered an EOF. If you remove the EOF from SCROLL's memory, SCROLL will continue down the file as if nothing had happened. The EOF character is 232(8) and should be in location 13007. Use the console switches to verify the EOF and zero that location. This is one reason for locking the edit file. The zero you inserted will not be written out on tape. Locations 20 and 21 contain the block numbers that SCROLL is looking at on the device. Locations 22 and 23 contain the block number limits of the file on the device. You may skip around on the tape by setting locations 20 and 21 to the block numbers you would like to examine. Location 21 must be always two more than location 20 and they must SCROLL-30 both be within the bounds of locations 22 and 23. After changing the block numbers, moving forward or backward will move to the new location on the tape the next time a tape operation is done. This switching of block numbers should only be done if the tape is LOCKed since blocks will otherwise be written out in the wrong place. SCROLL will not stop on EOF's in the backward direction. A tricky thing to do to scan a whole device for lost programs would be to open the whole device and begin scanning at the end by setting the block numbers to the end of the file and moving backward. Backward searches may be used to good advantage for this. To save a program when you have found it, open an auxiliary file on another device using the EO command. Write the program onto the file using the EW or EWP commands and use the EC command to close the file. SCROLL can write out from a locked file without problems. As many files as desired can be written from the smashed device by repeating the above process. PIP and SCROLL Files PIP may be used to help maintain SCROLL files. When copying a file which will later be edited with SCROLL, use the /I option of PIP to preserve the extra space at the end of the file. The assumed /A option of PIP will allow the user to determine the exact length of the file. PIP will copy only the used portion of the file. The directory may then be examined to find the exact length of the file. There are a few problems encountered when using PIP however. SCROLL has no restrictions on line length, so it is possible to enter very long lines to SCROLL. PIP, however, does not copy lines longer than 150 characters. The EO and EW commands may be used to copy files using SCROLL. Note the LOCK command will save I/O time during copying by eliminating writes to the main file. Another problem is that PIP cannot copy files larger than 255 blocks in /I mode. They must be copied in /A mode. SCROLL edit files of this length are of questionable use anyway. It takes over two minutes to move from the beginning to the end of a 200 block file on LINCtape. Even with a disk, it would take about 40 seconds. Since SCROLL allows easy transition from one edit file to another, it is probably better to maintain the 200 blocks in four shorter files each of about 50 blocks. SCROLL-31 How Do You Like Those Apples? Well, that does it for the commands of SCROLL. Quite impressive, isn't it? You'll probably never use EDIT-8 again, right? We've tried to incorporate the power of the commands of TECO into a scope oriented scrolling editor. Also we have tried to design the commands so that the user guides the editing process interactively without requiring that the user repeat the commands needlessly. The CTRL/K command to execute the Command Line again grew out of this design effort. The auto tabbing feature is a significant advance. The idea first appeared in LAP6/DIAL. We have made some improvements in the algorithm and added an indispensible feature: the ability to turn it off!! The CTRL/P feature to delete the tab at the beginning of the line is used primarily to temporarily combat the efforts of the auto tab insertion feature. We hope that all of you enjoy using SCROLL as much as we who developed it. Acknowledgements I would like to thank Clyde G. Roby, Jr., Harold L. Pearson, Jr., Dr. Thomas W. McIntyre, and James H. Donnelly, Jr. for their help and suggestions in the design of the command structure for SCROLL. Clyde Roby helped with the display routines and is responsible for the valiant work in designing lower case pattern words in the 4x6 matrix imposed by the PDP-12 hardware. He has also modified SCROLL to display on a PDP-8/I with scope interface. Darrel G. Hess wrote the original version of the summary for our local users. Last but foremost I would like to thank Mary A. Wilkes (Clark) and the others at Washington University, St. Louis, for LAP6. Although the implementation of SCROLL is entirely new, the idea is based upon earlier work we did with LAP6. The algorithm is described in an article by Mary A. Wilkes: 'Scroll Editing: An On-Line Algorithm for Manipulating Long Character Strings', IEEE Transactions on Computers, Vol C-19, pp 1009-1015, November 1970. SCROLL-32 Chaining to SCROLL Version 10 and later of SCROLL has the capability of being chained to. This means that CCL can be modified to chain to SCROLL on various recognized CCL commands, or another program may chain to SCROLL. In order to chain to SCROLL, the OS/8 Command Decoder area in field 1 must be set up with legal SCROLL commands. Multiple commands may be in this area as long as they follow the rules of SCROLL's Command Line decoding. The Altmode character, if present, must be 233(8). At the end of the SCROLL Command Line in the OS/8 Command Decoder area must be a 0000. The OS/8 Command Decoder area resides in 17600-17646. When SCROLL is chained to, it moves the OS/8 Command Decoder area to its internal Command Line buffer and then executes the commands from there. SCROLL does not type out its version number when it is chained to. SCROLL-33 Patches to SCROLL The six characters which are checked for in assembler auto-tab mode and do not cause a tab to be inserted are TAB, LINE FEED, FORM FEED, CARRIAGE RETURN, /, and *. If you wish to have a tab inserted before the *, change location 15661 from 0252 to 0000. Currently SCROLL puts the comment character at the third tab stop. To change this to any other tab stop change location 05035 to the negative of the tab stop. It is currently 7746 which is equivalent to -32. For example, to change this value to the fourth tab stop (42), change location 05035 to 7736. SCROLL is currently set up to do auto-tab insertion on the PAL8 or PAL12 assembler syntax. This is with '/' as the comment character and ',' as the end of tag character. To change SCROLL to recognize other characters as comment and end of tag syntax characters, the following locations should be changed. This example assumes that ';' is the comment character and ':' is the end of tag character. .GET SYS SCROLL .ODT 15663/0257 0273 (+) value for semicolon 15664/0254 0272 (+) value for colon 15671/0257 0273 (+) value for semicolon ^C .SAVE SYS SCRL11 In addition, the above two patches may be separately implemented. SCROLL-34 Error Messages When an error condition occurs, SCROLL types a two-character error message and proceeds from there. If the error occurs in a Command Line, the rest of the commands on the line are not executed. The error messages are identified by mnemonics which indicate the nature of the error. In addition to the error messages which are non-fatal, SCROLL contains many internal consistancy checks. If something is amiss, SCROLL will halt. These errors are all fatal and indicate either a hardware malfunction of the computer or (less likely) a program bug in SCROLL. If the diagnostic programs run on the computer, please convey the halt address and conditions of failure to the author for clarification. If such a condition occurs, it is likely that your file is not completely bombed out. All of the file will be in good condition except the portion that SCROLL was working over at the time. If you examine the file after a crash you will find about three or four blocks are a little scrambled or do not contain the latest changes. These blocks will be the only ones not updated. Error Reasons for Error Code ED Edit error. No such file on device or a main file is still active. EE No such Edit command. EI Edit Input error. No such file or no main file. EM Edit Make error. No room on device or main file still active. EO Unable to enter output file or no main file. ER Attempt to read when no input file available. Attempt to read more lines or pages than are in the auxiliary input file. EW No output file, or attempt was made to write from past the end of main file. EX The file is too long to EXIT. Encountered after EXIT, QUIT, or !. SCROLL-35 FL The last shift down found the file was full. HA Handler allocation error. Only 3 pages are allotted for all handlers. IC Illegal Command Line command. A command has been misspelled. IE Unable to initialize (! command) when there is no main file. IF EOF encountered in input file or no input file. Attempt was made to read past end of auxiliary input file. KI Unable to KILL. No main file. LH Load Handler error. No such device. LK Unable to LOCK a file once it is entered. NE No EOF before last block encountered during shift. NF No EOF before last block of file. Encountered during a move. OC Error during close of auxiliary output file. OE No auxiliary output file. RE Repeat error. Attempt was made to nest iteration commands or iteration was not terminated. SS Search string too long. 16 Characters maximum allowed. XC Too many characters transferred to X Buffer or EOF in main file. YC Unable to insert in main file by Yank command. The file is full. SCROLL-36 Summary of SCROLL Commands by Function Command Lines are initialized with an Altmode and terminated with two Altmodes. Items enclosed in square brackets [ ] apply to the hard copy version of SCROLL (KBSCRL) MACRO COMMAND ****Text Mode**** CTRL/C Repeats execution of the last Command Line. ****Command Line**** n< Initiate a repeat section of commands. n can be any positive number in the range 0 to 4095. 1 Is assumed. > Terminate repetitive command set. There must be a > with every < and they may not be nested. FILE COMMANDS ****Command Line**** LOCK Inhibits writing to the main file. Must be done before the Edit command. CLOCK Clears the LOCK and enables writing. EMdev:filnam.ex[n] Creates a file of n blocks (if n is omitted, 10 is assumed) in length on device DEV: with an alphanumeric name of up to six characters and an extension of two characters. A pre-existing file of the same name and extension on DEV: will be deleted. EDdev:filnam.ex Connects the file on the given device as SCROLL's main file. EIdev:filnam.ex Allows reading an auxiliary input file with ER and ERP commands. EOdev:filnam.ex[n] Opens a tentative file which can be written into from the file being edited. Output is by EW and EWP. Length specification is optional. The file must SCROLL-37 Summary of SCROLL Commands by Function be closed with an EC command to be made permanent. Only one output file is possible at a time. EC The tentative output file is closed and made permanent. EKdev:filnam.ex Deletes the specified file from the directory of device DEV:. MAIN FILE TERMINATORS ****Command Line**** EXIT After the main file is written out on the device, it is closed and released from SCROLL. SCROLL awaits a new ED or EM command. QUIT Does an EXIT, closes any output file, and returns to the OS/8 Keyboard Monitor. ABORT Disconnects the main file from SCROLL without further writing on the device. POSITION COMMANDS ****Text Mode**** CTRL/F Move the cursor to the front of the line [and echo the new line]. CTRL/H Move the cursor to the end of the line [and echo the new current line]. CTRL/A Move the cursor forward one character [and echo the character the cursor passed over]. CTRL/Q Move the cursor backward one character [and echo the character the cursor passed over]. CTRL/S Move the cursor forward one line if the current line is ended [and echo the new current line]. CTRL/W Move the cursor back one line if the current line is ended [and echo the new SCROLL-38 Summary of SCROLL Commands by Function current line]. CTRL/V Move the cursor forward one line whether the current line is ended or not [and echo the new current line]. CTRL/G Move forward one page in the file. A form feed is the page delimiter. CTRL/P Move back one page in the file. A form feed is the page delimiter. ****Command Line**** n$ Move n lines after homing the cursor, n _ may be positive or negative. The current line need not be ended. nP Move over n form feeds (pages). n can be + or -. -1 Is assumed. / Move to the end of the file being edited. B Move to the beginning of the file being edited. ! Move to the first line of the file after doing an EXIT. nJ Jump the cursor n characters forward (+n) or backward (-n). 1 Is assumed. F Same as CTRL/F in Text Mode. H Same as CTRL/H in Text Mode. nES Positions the auxiliary input file to the beginning of the n+1st line. nESP Positions the auxiliary input file to the beginning of the n+1st page (skipping over n form feeds). V KBSCRL only- [Verify the current line and mark the cursor position with an uparrow (^).] SEARCH COMMANDS ****Command Line**** SCROLL-39 Summary of SCROLL Commands by Function nSstring$ Search forward up to a form feed (end of _ page) for the nth occurrence of the character string. nZstring$ Search forward to the end of file for the _ nth occurrence of the character string. n_string$ Search backward up to a form feed _ (beginning of the page) for the nth occurrence of the character string. (_ is Backarrow, SHIFT/O). n^string$ Search backward to the beginning of the _ file for the nth occurrence of the character string. (^ is Uparrow, SHIFT/N). Rstring$ Replace the character string found by the _ last search with the character string. nRstring$ Delete n characters to the left of the _ cursor and insert the character string. ($Sabcde$3Rx$$ gives 'abx'). _ _ __ Istring$ Insert the character string after the _ cursor. Gterminator$ Special text insertion mode for all _ normal or control characters. The character immediately following the G is interpreted as the terminator. After the text has been entered, type the terminator to end special insertion mode. ****Text Mode**** CTRL/Z Search forward for the last search string used. (Equivalent to $S$$). _ __ CTRL/N Search backward for the last search string. (Equivalent to $^$$). _ __ DELETION COMMANDS ****Text Mode**** SCROLL-40 Summary of SCROLL Commands by Function RUBOUT Delete one character to the left of the cursor [and echo the character deleted]. CTRL/U Delete the entire line to the left of the cursor [and echo the new current line]. CTRL/R Delete the entire line to the right of the cursor [and echo the new current line]. CTRL/O Delete the tab at the beginning of the current line if there is one [and echo the new current line]. ****Command Line**** nD After homing the cursor delete n lines forward (+n) or backward (-n). -1 Is assumed. nDP After homing the cursor delete backward (-n) or forward (+n) until the nth form feed is encountered. -1 Is assumed. nW Delete (Withdraw) n characters to the left of the cursor. n must be positive. U Same as CTRL/U in Text Mode. KILL Erases entire contents of the main file. TEXT TRANSFER COMMANDS ****Command Line**** nEW Starting from the beginning of the current line, write n lines of text into the auxiliary output file. 1 Is assumed. nEWP Starting from the beginning of the current line, write n pages (delimited by form feeds) to the auxiliary output file. 1 Is assumed for n. nER After homing the cursor, read n lines into the main file from the auxiliary input file. 1 Is assumed for n. nERP After homing the cursor, read n pages (delimited by form feeds) into the main file form the auxiliary input file. 1 Is SCROLL-41 Summary of SCROLL Commands by Function assumed for n. nES Positions to the beginning of the n+1st line of the auxiliary input file. 1 Is assumed for n. nESP Positions to the beginning of the n+1st page of the auxiliary input file. 1 Is assumed for n. nT Type n lines on the teletype from the beginning of the current line. 1 Is assumed so that $T$$ prints the current _ __ line on the teletype. nTP Type n pages (to the nth form feed) from the beginning of the current line. 1 Is assumed for n. X BUFFER COMMANDS ****Command Line**** nX Transfer n lines into the X Buffer beginning with the start of the current line. 1 Is assumed for n. nXP Transfer n pages into the X Buffer starting with the beginning of the current line. 1 Is assumed for n. nY Transfer (Yank) the contents of the X Buffer into the main file n times. 1 Is assumed for n. CTRL/X Transfer one line of text into the X Buffer while in text mode. CTRL/Y Transfer the contents of the X Buffer into the main file at the cursor position while in text mode. DISPLAY AND SWITCH COMMANDS ****Text Mode**** CTRL/T Controls auto tab insertion. SCROLL-42 Summary of SCROLL Commands by Function CTRL/D Controls display of tabs and carriage returns on the scope. CTRL/E Controls the teletype echo. [Not active in KBSCRL version.] CTRL/K Shift case of input characters. CTRL/B Display the previous command executed in the command line. ****Command Line**** N# Controls the number of lines of text to be displayed. n specifies this number. SCROLL-43
Feel free to contact me, David Gesswein firstname.lastname@example.org with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with. I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation.
PDP-8 Home Page  PDP-8 Site Map  PDP-8 Site Search