perm filename TVED.DCS[UP,DOC] blob
sn#173704 filedate 1975-08-11 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00031 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00005 00002
C00006 00003
C00007 00004
C00010 00005 2
C00013 00006 3
C00016 00007 MODES 4
C00019 00008 5
C00023 00009 BASICS 6
C00027 00010 BASICS 7
C00029 00011 8
C00033 00012 LINE COMMANDS 9
C00037 00013 LINE COMMANDS 10
C00042 00014 LINE COMMANDS 11
C00047 00015 LINE COMMANDS 12
C00051 00016 LINE COMMANDS 13
C00055 00017 LINE COMMANDS 14
C00056 00018 15
C00060 00019 INTRA MODE 16
C00065 00020 INTRA MODE 17
C00067 00021 18
C00070 00022 19
C00074 00023 ATTACH MODE 20
C00076 00024 21
C00080 00025 EXTEND MODE 22
C00084 00026 ? 23
C00087 00027 RUNNING TV 24
C00089 00028 25
C00093 00029 SOFTWARE MAINTAINENCE 26
C00097 00030 SOFTWARE MAINTAINENCE 27
C00099 00031
C00100 ENDMK
C⊗;
TV -- A DISPLAY TEXT EDITOR
TV is a display-oriented text editor for Data-Disk
terminals. It uses a command format vaguely modelled
after the TVEDIT program on the PDP-1. This manual
describes its use. The manual should be used in
conjunction with the instructional file, TEACH.
Dan Swinehart
10 December, 1971
SECTION I
INTRODUCTION
TV is a display-oriented text editor. It works on the Data-Disk and
III displays. TV is partially written in SAIL, and partially in
FAIL. It occupies 12K in the upper segment (sharable) and 8-9K in
the lower. It was written largely for experimental purposes,
although for some applications it surpasses SOS.
TV is an "edit-in-place" editor. When a page is written, it is
F
F
F
written into the original file, in "alter" mode. TV does not copy,
as does SOS. This makes it inherently more dangerous than SOS.
Whee.
I-A. Disclaimer
__________
The author (that's me) makes no reliability claims for TV. One must
be especially careful to avoid large pages, and to wait for the
editor to catch up during most LINE→INTRA and INTRA→LINE transitions
(see below). I can't boast about its speed, either. But I do think
it's fun.
I-B. The TEACH File
___ _____ ____
This manual is a reference document for the TV editor. If you are
unfamiliar with TV, you should stop reading this and do the
following:
1) Find a Data-Disk console, and log in on it.
2) Type the following command:
R TV;FOO/N←TEACH[UP,DOC]<cr>.
This command will copy my TEACH file to FOO, then start the
editor. You will be looking at page 1, which contains
instructions on how to proceed.
3) Follow the instructions, which will lead you through a series of
experiments with the editor. In the process you will modify the
file. If, by chance, you modify it such that the next
instruction goes away, start over with step 2, and hopefully
better luck.
4) Return to this manual for a more organized explanation.
2
SECTION II
NOTATION
This section describes the special characters and terms used as a
shorthand throughout the manual.
α Qualifies another character. That character is to be
struck with <control> key depressed.
β Qualifies another character. Strike it with <meta>
depressed.
αβ Qualifies another character. Strike it with both
<control> and <meta> depressed.
<esc> Qualifies another character. Strike first <esc>, then
the designated character.
⊗ Denotes either α or αβ (user has free choice, although
α<digit> isn't always reliable).
∞ Qualifies another character. Strike it with neither,
either or both control keys depressed.
<cr> Return Key.
<lf> Line Key.
<form> Form Key.
<vt> VT Key.
<alt> Alt Key.
<tab> Tab Key.
<space> Space Bar.
CURRENT The Current Line, designated by the <line-cursor> in
column 1 of that line.
<line-cursor> The arrow ("→" or "↔") designating CURRENT.
<char-cursor> The underline character used as a cursor in INTRA mode.
CURRENT PAGE The page being edited (see below).
3
SECTION III
MODES
The editor can be in one of several states, or Modes. Briefly, these
are:
III-A. LINE -- Inter-Line Mode.
____ __ __________ _____
This is the initial mode. Commands in this mode are single-
characters, requiring αβ or ⊗ qualification. Some LINE commands
cause CURRENT ("→" is the line cursor in this mode) to move from one
line to another, or even to another page. Others modify a range of
lines indicated by CURRENT (DELETE, etc.). The remaining commands
are used to enter other modes. In addition, characters recognized by
the system line editor cause entry into INTRA mode.
III-B. INTRA -- Intra-Line Mode.
_____ __ __________ _____
The time-sharing system provides powerful editing facilities for
modifiying lines you type, before they are sent to your program.
Lines can be provided by your program to the line editor to be edited
and read. TV uses this feature, so that when you edit lines in TV
you can use the standard system line editor. The line editor
commands are discussed below. Additional commands, available in the
line editor only when using TV, are also discussed.
III-C. INSERT -- Line Insert Mode.
______ __ ____ ______ _____
When you enter this mode, a blank line is created between CURRENT and
the line above it. This line becomes CURRENT. The line-cursor
becomes "↔", then INTRA mode is entered. Leaving INTRA mode normally
(with a <cr>) causes the next line to become CURRENT. The process is
then repeated. See INTRA commands for details on terminating INSERT
mode.
MODES 4
III-D. EXTEND -- Extended Command Mode.
______ __ ________ _______ _____
There is a limit to the number of single characters on the keyboard;
also to the expressive power of single-character commands. In
addition, some commands have too large an effect on the file, and are
therefore too dangerous, to allow a single keystroke to invoke them.
EXTEND mode is entered by the ⊗X LINE command. Commands are entered
as <verb> <params><cr>, where <verb> is a complete English word. The
form and function of these commands are described below.
III-E. ATTACH -- Attached Mode.
______ __ ________ _____
This is a special case of LINE mode, wherein a number of text lines,
selected from the file, are "attached" to the line-cursor (which
becomes a "|"), in that they are displayed on the screen, specially
designated, just above CURRENT. When you leave attach mode, these
lines are inserted at CURRENT, deleted, or put back where they came
from. Many LINE and EXTEND commands are illegal in ATTACH mode;
others have their meanings modified. Some illegal LINE commands have
meaning in ATTACH mode. INSERT mode is unreachable from ATTACH mode.
5
SECTION IV
BASICS
IV-A. File Format
____ ______
The text of a file is divided logically into "pages" by <ff> (form
feed) characters. When a file is first edited by TV, line numbers
are removed and the file is specially arranged (has no effect on
assemblers, compilers, listers, etc.). Unless you specifically
inhibit it, TV tacks an extra page on the front of your file,
containing directory information. This directory makes subsequent
edits much faster, since TV knows where each page starts.
Currently, pages should be limited in size to about 150 lines. TV
will insert page marks when it creates the initial directory, to keep
each page below 300 lines. Pages tend to get garbaged after they
exceed "reasonable" size. This restriction should soon be lifted.
IV-B. Screen Format
______ ______
If there are at least 30 lines in the page, 30 lines show on the
screen at all times. Any command which, if interpreted strictly,
would cause fewer lines to show, is modified to meet this criterion
(e.g., ⊗J or ⊗W, below). When TV is started, the first 30 lines of
some page (specified in the editing command) are displayed on the
screen. CURRENT PAGE as well as the file name are displayed at the
top. During editing, whenever the first line of CURRENT PAGE is
visible at the top of the screen, a row of asterisks (*****) appears
just above it. Otherwise a row of dashes (-----) appears there to
tell you there's something you can't see "above the top of the
screen". Similarly, asterisks below the bottom line of the screen
tell you that no more lines exist on the page; dashes indicate that
more lines exist "off the bottom".
Whenever a command is given which would move CURRENT off the visible
screen, the visible lines are adjusted so that CURRENT is several
lines above or below a screen boundary (if possible). See NXTLIN,
PRVLIN, TOP, BOTTOM, and similar commands, below.
BASICS 6
IV-C. Switching Pages.
_________ ______
Very few commands change CURRENT PAGE; notably, the PAGE command, and
some EXTEND commands: FIND (a search specification), MARK, and DELETE
(which change the page structure by adding or removing form feeds).
This approach differs from some display text editors. It represents
a personal preference, not a technical constraint. I will listen to
arguments that it should be changed.
Disk activity occurs only when one page is being written (if changes
were made) and another is being read. All of the current page can be
considered to be in core. The CANCEL EXTENDed command (see below)
can, in fact, be used to cancel any change made to CURRENT PAGE since
it was last read in. Therefore changes to a page are not permanent
until switching to another page (or finishing the edit). The write
operation changes the original file. No copies are made.
IV-D. Initial State
_______ _____
TV is started in LINE mode, with CURRENT at the top of the page (and
screen). All other modes may be reached from LINE mode. LINE
commands are described in the next section.
IV-E. The Directory
___ _________
The directory, when present, is the first page of the file. It
contains, in ASCII so that everybody can read it, information about
the number of pages in the file, and about where each page is located
within the file. The latter information is generally of use only to
T.
In addition, the directory contains, for each page, the first text
line for that page. The word COMMENT, if it starts in column 1, as
well as all `;' and `⊗' characters, are removed from each such line.
This feature provides a useful table of contents. It also allows the
associative page specification described with the ⊗F LINE command.
At certain times during an edit, the directory will not contain
correct data (while the page structure of the file is being changed,
BASICS 7
for instance). During these crucial moments, the directory is marked
INVALID (see line 1 of a typical directory for the VALID indication).
TV will re-create the directory of any file whose directory is
invalid. It will also consider the directory invalid if it discovers
the tracks of any other editor (SOS line numbers, for instance), or
if it doesn't find form feeds where it expects them. Seldom will an
invalid directory escape its attention.
All the information on the directory page is surrounded by COMMENT
specifications which will be treated as comments by SAIL, FAIL, and
MACRO. All other language users should beware.
8
SECTION V
LINE COMMANDS
V-A. Line Command Notation
____ _______ ________
Each command has been given a name, for ease in later narrative.
Column 3 below contains these names. Column 1 gives the command
characters which will cause the execution of the named command.
Column 2 describes the modes in which the commands are valid: π means
that the command will terminate INTRA mode and execute the
appropriate LINE mode command(this is detailed below); ∀ means that
the command is legal in ATTACH mode; and * means that it is legal in
ATTACH mode, but has a different meaning.
Column 2 also contains information about the repeat factors as
applied to the commands: `r' means a repeat factor is legal and has
meaning to the command -- the meaning is described in the text; `a'
means that an "associative repeat factor" (see below) is meaningful
to this command.
V-B. Command Descriptions
_______ ____________
CHAR MODES NAME DESCRIPTION
<cr> π∀ar NXTLIN (rept=1) Moves CURRENT down <rept> lines, or
until the bottom of the page is reached. If
CURRENT is on the bottom (page) line, NXTLIN
extends the page by one (blank) line, and lets
you edit that. If target line is below screen,
screen is adjusted (CURRENT will be about 4
lines from the bottom, if possible).
∞<vt> π∀ar PRVLIN (rept=1) Moves CURRENT up <rept> lines, or
until the top of the page is reached. Visible
screen adjusted, if necessary.
∞<bs> ∀ PRVLIN (rept=1) The system has a bad habit of eating
backspaces. Therefore the <vt> command was
made the archetypical PRVLIN character. But
<bs> is more convenient, so when it works, use
it.
⊗U π∀ar PRVLIN (rept=1) This was used before <vt> for a
reliable PRVLIN character. It has remained
for compatibility with some people's habits.
LINE COMMANDS 9
∞<alt> π∀ PANIC The universal "lemme out" command. Actually,
seldom used in pure LINE mode, is nevertheless
a comforting no-op there (It does clear the
default ⊗F string -- see below). See other
modes for specific uses of PANIC.
⊗< π∀r UPTAD (rept=1) Equivalent to typing ⊗4<vt> <rept>
times.
⊗> π∀r DOWNTAD (rept=1) ⊗4<cr> <rept> times.
⊗≤ π∀r UPHLF (rept=1) <vt> <half-a-screenful> times.
⊗≥ π∀r DOWNHLF (rept=1) <cr> <half-a-screenful> times.
⊗TV π∀ TOP Positions CURRENT at top visible line on the
screen. Adjusts screen, if possible, to show
a few more lines at the top.
⊗B π∀ BOTTOM positions CURRENT at bottom visible line on
the screen. Adjusts screen, if possible.
⊗J π∀ar JUMP Adjusts the screen so that CURRENT is now the
top line on it (if possible). It is always
the case after a jump that CURRENT refers to
the same line of text as it did before the
jump. It will simply occupy a different
position on the screen.
If a <rept> is present, <rept><cr> is
executed, then ⊗J. Thus, for example, ⊗4⊗J
displays the fourth line below CURRENT at the
top of the screen (subject to the usual
existence constraints).
⊗W π∀r WINDOW (rept=1)Equivalent to ⊗B⊗J, <rept> times.
This command is useful for rapidly scanning a
page, since each application of ⊗W displays an
entire new screenful.
<form> ∀ WINDOW Equivalent to ⊗W if already in LINE mode, but
watch the control bits! (It is suggested that
the use of <form>, with different control
bits, as alternate codes for the WINDOW, LAST,
and PAGE commands, be delayed until you are
familiar with the literal commands).
LINE COMMANDS 10
⊗W π∀r LAST (rept=1)Equivalent to ⊗T⊗<downjump>, <rept>
times.
β<form>∀ LAST Equivalent to ⊗L, illegal in INTRA mode.
⊗P ∀ar PAGE (rept=CURRENT PAGE+1)Writes CURRENT PAGE back
into the file, if any changes have been made.
Sets CURRENT PAGE to <rept> and reads that
page, then displays it. Changes made to the
previously open page are now permanent. The
new page is ready to edit.
The repeat argument in the PAGE command may be
preceded by a `+' or `-' character. This
causes <rept> to be added to (subtracted from)
CURRENT PAGE to obtain the next page number.
In other cases <rept> is used AS the next
page.
⊗<form>∀ PAGE Equivalent to ⊗P, illegal in INTRA mode?
αβD ar DELETE (rept=1) <rept> lines, starting at CURRENT,
are deleted from the page. No more lines are
deleted than the number which remain between
CURRENT and the bottom of the (visible)
screen. This is irritating when you want to
delete those lines, but....
⊗Z JOIN The line following CURRENT is concatenated to
the line at CURRENT. CURRENT is then set to
the first line following both of these.
⊗E * EDIT Finish the edit. The current page is written,
if necessary. The directory page is updated,
if there is one, and the editor EXITs.
⊗S πar SEARCH This command looks for the current associative
repeat specification (see ⊗F, below) in
CURRENT. If it finds it, it enters INTRA
mode, spacing the cursor out to a position
below the first character in that string. Its
extended use, in conjunction with ⊗F, is
described below.
The remaining commands interact to some extent with operations in
other modes. They are described here, but further explanations will
follow in the subsequent discussions. Any terms you don't understand
will probably be cleared up later.
LINE COMMANDS 11
αβ<cr> πr ENTINS This command, when used without a repeat
argument, enters INSERT mode. Insert mode is
described below.
When ENTINS is used with an explicit repeat
argument, <rept> blank lines are created above
CURRENT. CURRENT becomes the first of these
lines. In this case, even if <rept> is 1, TV
remains in LINE mode after the blank lines are
created.
⊗↑ πar UPNOUT (rept=1)A <rept><vt> is simulated. Then a
α<tab> is simulated to enter INTRA mode and
set the char-cursor to the end of the line.
This is made clearer by the INTRA mode
discussion.
⊗↓ πar DOWNOUT (rept=1)A <rept><cr> is simulated. Then
α<tab> is simulated.
⊗X π∀ EXTEND TV enters EXTEND mode and asks for an Extend-
mode command. It returns to LINE mode after
the command is completed.
⊗A ∀ar ATTACH (rept=1)Attaches <rept> lines, starting at
CURRENT, to the line-cursor and enters ATTACH
mode. See below.
⊗C ∀ar COPY (rept=1)Copies <rept> lines, starting at
CURRENT, to the area just following those
lines. Then moves CURRENT to the first of
those lines and simulates <rept>⊗A. See
below.
⊗Q COPY1 The line just above CURRENT is duplicated, and
the new copy is inserted between the original
and CURRENT. This duplicate becomes CURRENT,
and TV enters INTRA mode with the char-cursor
at the beginning of the line. The command is
similar to the familiar α<cr> command provided
by the system (the latter is disabled in TV,
for various questionable reasons).
⊗R * REPLACE If a ⊗K has been done in ATTACH mode, replace
those lines in their original positions. This
applies only to the last lines ATTACHed, of
course. See ATTACH mode for details.
LINE COMMANDS 12
⊗V ∀ DRAWIT TV performs an <esc>C, then re-displays the
entire screen.
⊗F ∀ FIND This is not strictly a LINE command. It is
described in the following paragraphs.
V-C. ⊗F -- FIND -- Associative Repeat Specification
__ __ ____ __ ___________ ______ _____________
FIND is a unary associative operator which takes a search string as
argument. Its result is a repeat factor. The FIND, with its argument,
is what I've called an "associative repeat specification".
⊗F's argument is a string of non-activation characters, terminated by
an activation character (see INTRA for these). This activation
character should be one of the LINE commands which accept associative
repeat specifications. Then, depending on the command (the
activation character), one of four searches is carried out. Each
search looks through its range of lines for a line which contains as
a substring the FIND string (the case of letters is ignored). The
result is an error indication (didn't find) or the number of lines
looked at before a match was found. The numeric result of a
successful search is assigned to <rept>. The searches are:
1) From CURRENT+1 to the end of the page, moving forward.
2) From CURRENT-1 to the top of the page, moving backward.
3) Among the directory lines, starting with that for page 1.
4) From CURRENT to the end of the page, moving forward.
Here is a list of the commands which accept associative repeat
specifications, and their behavior:
CHAR DESCRIPTION
<cr> ⊗Fabcde<cr> carries out search 1, then does <rept><cr>.
CURRENT therefore becomes the first line after CURRENT with
the string "abcde" in it.
<vt> ⊗Fabcde<vt> carries out search 2, then does <rept><vt>.
⊗↓ ⊗Fabcde⊗↓ carries out search 1, then does <rept>⊗↓.
⊗↑ Guess.
⊗D Carries out search 1, sets <rept> to <rept>-1, then does
<rept>⊗D. The line with the matching string in it is not
deleted. Probably commands should be included which allow
constant increments to the associative result.
⊗A Carries out search 1, sets <rept> to <rept>-1, then does
<rept>⊗A. Similarly for
LINE COMMANDS 13
⊗C
⊗P Carries out search 3, then does <rept>⊗P. This gives a rapid
method for going to a page based on the contents of its first
line.
⊗S Carries out search 4 (starting at CURRENT, instead of
CURRENT+1), then does <rept><cr>, followed by ⊗S as described
above. For example, if the third line below CURRENT contains
"This is a line", and if you type "⊗Fis⊗S", TV will move
CURRENT down three lines, enter INTRA mode, and send the
equivalent of α6α<space>, so that the cursor is positioned
under the "i" of "is". The search starts at CURRENT so that
you can space out to a string in CURRENT using this command.
⊗F The preview operator. It is explained just below.
V-D. Preview Operator
_______ ________
⊗Fabcde⊗F carries out search 1. If a match is found, the line
containing it is amended by the addition of the `↔' line-cursor (the
`→' cursor remains at CURRENT). If this line is in the page, but not
on the screen, the amended line is displayed at the bottom of the
page, below the dashes. If no match is found, TV returns to LINE
mode. Otherwise, the second ⊗F has had no effect. Any LINE command
character subsequently typed will behave as if the ⊗Fstring⊗F were
⊗Fstring . This gives you the chance to preview what will happen when
you give the command.
If, after you type ⊗Fstring⊗F and get a match, you immediately type
⊗F again, the original search will continue FROM THERE, finding you
the second match. This process can be repeated until you find the
line you want. For example, ⊗Fabcde⊗F⊗F⊗F finds the third line,
starting with CURRENT+1, which has the string "abcde" in it. Any
actual command which you subsequently give (if it performs search 1!)
will use this third match as its matched line. Commands which use
searches 2 and 3 can't make use of this feature.
The string used in a ⊗F search is retained until another ⊗F search
specifies a non-null string, or an <alt> is typed. If ⊗F is followed
immediately by an activation character, TV uses the saved string.
Use it until it wears out, and use it in good health.
LINE COMMANDS 14
V-E. Other Characters in LINE Mode
_____ __________ __ ____ ____
Any αβ character mentioned above, as well as any α character not
recognized as an INTRA or LINE command, will be ignored, after giving
an error message.
15
SECTION VI
INTRA MODE
When TV is in LINE mode, any character which is recognized by the
system line editor causes entry into INTRA mode. Unless the line to
be changed is empty (either a previous blank line or a new one at the
end of the page or in INSERT mode), you must wait, after typing the
entry character, for TV to prepare CURRENT for editing. The line is
removed from TV's display structure, and sent to the time sharing
system for editing. The line reappears (in the same place), with an
underline character, the char-cursor, under the first character in
the line. DO NOT PROCEED WITH THE EDIT UNTIL THIS CURSOR APPEARS.
This restriction is not too serious, since it is possible to type
ahead when inserting new lines. It is hoped that future system
modifications will remove the last of these restrictions.
VI-A. Intra-Mode Commands
__________ ________
The features available in INTRA mode are detailed in Chapter 1 of the
Stanford System Manual (SAILON 54, or S54.ON[S,DOC], by Andy Moorer).
See this document first, if you are not familiar with the features.
VI-B. Activation Characters.
__________ ___________
An activation character is any character which causes the system line
editor to release the line it is editing to the user program, and to
restart the program if it is waiting for activation. The line may
not be further edited after an activation character appears (unless
the user program resubmits it). The set of activation characters may
be modified somewhat by the program. The activation characters which
TV specifies are:
a) <cr>,<lf>,<alt> with any combination of control bits.
b) Any β character, if the char-cursor is at the end of the line.
Otherwise β characters are not activation characters (see their
insert functions in SAILON 54).
c) All α characters if the char-cursor is at the end of the line.
d) All α characters, except α<space>, α<tab>, αD, αS, αK, αI, and
α<digit>, if the char-cursor is not at the end of the line.
e) All αβ characters.
INTRA MODE 16
VI-C. Leaving INTRA Mode
_______ _____ ____
Any activation character terminates the edit of the line, and leaves
INTRA mode. Subsequent actions depend on the activation character.
There are a lot of cases, but hopefully, each makes sense. Here is
the list:
<cr> NORMAL The line is accepted as edited, and replaces the
original text for CURRENT. TV simulates a LINE or
INSERT <cr> to advance to the next line (or create one
if at the bottom). INSERT mode is retained if it was
in effect when INTRA mode was entered.
If the line editor is in INTRA's insert mode (see the
SAILON) when the <cr> is typed, the line up to the
<cr> is accepted as edited, and replaces the original
CURRENT. The remainder of the line is inserted
between CURRENT and CURRENT+1. It becomes CURRENT.
TV then simulates a αI to return to INTRA mode, and to
INTRA's insert mode. It is as if you never left INTRA
mode, except that you must wait for all this to
happen, and for the char-cursor to reappear, before
proceeding. This feature is unpredictable when the
line you were editing is a new (previously blank) one.
<alt> PANIC The original text for CURRENT is left unchanged.
INSERT mode is left if it was in effect when INTRA was
entered (see below for more details).
α<cr> RESET The line is accepted as edited, as with NORMAL.
CURRENT remains set to this line. INSERT mode is
terminated if it was in effect. This command accepts
the line, then resets to the initial edit state, in
LINE mode. DO NOT TYPE α<cr> WHEN IN LINE MODE. It
will not have the desired (give me that line again)
effect. Hopefully, someday it will.
β<cr> INSCR The effect is the same as typing <cr> in INTRA's
insert mode, except that after breaking up the line
and adjusting CURRENT, TV returns to LINE or INSERT
mode.
αD DELCR This is an activation character only at the end of a
line. In this case, leading spaces are removed from
the line (L1) at CURRENT+1. Then L1 is appended to the
line (L) being edited, and L1 is deleted from the
file. Then TV re-enters INTRA mode, with the char-
INTRA MODE 17
cursor positioned at the end of L's contribution.
This command appears to delete the carriage return
between L and L1 (and performs some useful cosmetics).
αV DRAWIT TV performs an <esc>C, re-displays the entire screen,
then re-enters INTRA mode as if nothing had happened.
VI-D. Other Activation Characters
_____ __________ __________
Any α activation character not included in the above list will cause
an error message to be printed. Then TV will re-enter INTRA mode as
if nothing happened. YOU MUST WAIT for the char-cursor to reappear.
Any αβ activation character will terminate the INTRA edit. Then, for
some commands, the same action will be performed as would be
performed in LINE mode. These commands are denoted by π in the LINE
descriptions above. Those which do not have the π designation were
considered too dangerous to risk accidental invocation (αβD, or αβP,
or αβE, for instance). The dangerous or meaningless αβ commands
behave the same way PANIC does, except that an error indication is
given.
18
SECTION VII
INSERT mode.
This mode has been discussed enough above that very little remains to
be said about it. Here is a summary:
VII-A. Entering Insert Mode.
________ ______ _____
INSERT mode is entered by the αβ<cr> command, if no repeat argument
is present. If it is entered from INTRA mode, CURRENT is advanced
before the mode is entered. In INSERT mode, a blank line is inserted
just before CURRENT, and that line is edited in INTRA mode. When
INTRA mode terminates with αβ<cr> or <cr>, CURRENT is advanced, and
the INSERT-mode action is repeated.
VII-B. Leaving Insert Mode.
_______ ______ _____
If INTRA mode is terminated with a α<cr>, the current line is
accepted, but CURRENT does not advance, and TV returns to LINE mode.
If INTRA mode is terminated with a PANIC (<alt>) or illegal αβ
command, INSERT mode is also left. In addition, the line at CURRENT
(L) reverts to its original state. Then, if L has no characters in
it, the entire line is deleted. It is convenient to leave INSERT
mode by PANICing on a newly-blank line which you didn't want anyway.
One need never wait for the arrows to be set up, or for the cursor to
appear, when typing in INSERT mode. TV will catch up with what you
type as quickly as it can. Some of the INTRA commands (αD, β<cr>,
<cr> in insert mode) will not quite work right in this mode, though.
19
SECTION VIII
ATTACH MODE
VIII-A. Entering Attach Mode
________ ______ ____
ATTACH mode is entered by <rept>⊗A or <rept>⊗C. <rept> lines (up to
50) are copied, starting at CURRENT, into a safe place. Then, if ⊗A,
the lines are deleted from the file. The first 5 and last 3 lines of
the removed group are displayed just above the (possibly new)
CURRENT, with "|" characters in the line-cursor column. If there are
more than 9 lines in the group, an ellipsis appears between lines 5
and 6 of the displayed group, to indicate the lines not shown. The
line-cursor does not appear. This display operation is repeated
after every operation which modifies CURRENT.
VIII-B. Attach Mode Commands
______ ____ ________
Only a small subset of the LINE commands are legal in ATTACH mode.
These are indicated by ∀ designations in the LINE descriptions.
Since they do not include INTINS or INTRA-entering commands, INSERT
and INTRA mode are unreachable from ATTACH mode. A few EXTENDed
commands are also legal from ATTACH mode.
ATTACH and COPY commands are legal in ATTACH mode. The currently
ATTACHed lines are DETACHed (see below), and the new ATTACH or COPY
command obeyed.
Some LINE commands exist in ATTACH mode, but are different. These
are indicated, above and below, by "*" characters in the command
descriptions. Others are legal only in ATTACH mode. ATTACH commands
are:
⊗E * DETACH The lines are copied from their safe place into
the file, just above CURRENT. TV returns to
LINE mode, and the displayed lines no longer
appear.
⊗K KILL TV returns to LINE mode, and the displayed lines
no longer appear.
⊗R * REPLACE The lines are copied from their safe place back
into the file at the page and line number where
they came from. TV returns to line mode, etc.
ATTACH MODE 20
This is used when you get real real real
confused.
β<space> *r INSPACE (rept=1)Shifts the entire ATTACHed group to the
right by <rept> columns (inserts <rept> spaces).
Tabs are used when possible to minimize the
number of characters used.
αD *r DELSPAC(rept=1)Examines the entire ATTACHed group.
Remembers the number of non-printing columns
(caused by blanks and tabs) from the line with
the fewest of them. Sets <rept> to the smaller
of <rept> and that number. Deletes that many
spaces from each line in the ATTACHed group.
21
SECTION IX
EXTEND MODE
Extend Mode is entered from LINE or ATTACH modes (or from INTRA mode
via LINE mode), using the ⊗X command. TV will prompt "COMMAND?", then
wait for a response.
IX-A. Extend-Mode Command Format
___________ _______ ______
An Extend-Mode Command is a verb, followed in some cases by one or
more spaces, then one or more parameters. The command verb may be
abbreviated to any unambiguous leading substring. The form of the
parameters depends on which command verb is given, except that the
parameters may not contain activation characters, and must therefore
be contained on the same line with the verb. The system line editor
may be used during creation of the command line. The command line is
terminated, and the command executed, when a <cr> is typed. After
execution of the command, TV returns to LINE or ATTACH mode.
IX-B. Extend-Mode Commands
___________ ________
DRAW Redisplays entire screen (usually only the lines that
change are redrawn). This command is largely obsoleted by
⊗V and αV.
DDT If RAID is loaded, this command jumps to it. Return is via
the INTERNAL label BACK.
FIND The parameter to FIND is the remainder of the command line,
after the delimiting space. If the parameter is null, the
previous FIND parameter is used. The search performed is
similar to "search 1" for the ⊗F LINE command. The
difference is that if the string is not found on CURRENT
PAGE, a ⊗P operation is simulated, and the next page
searched. The search is unsuccessfully terminated only
after the string has not been located in the last page of
the file. If the string is found, CURRENT is set to point
to the line containing it. If it is not there, CURRENT is
set to the first line on the last page, and an error
indication is given.
A FIND search may be terminated early by typing the
sequence <esc>I (the system's special keyboard interrupt
EXTEND MODE 22
character. The search will be terminated as soon as
possible, and you will be editing some page down the line.
Anything you typed before the <esc>I sequence will remain
in the input buffer, to be used as command characters after
the search is truncated. Type <call>, then CONTINUE<cr>
before the <esc> I sequence if you want to flush the input
before before terminating the search.
CANCEL All changes made to this page since it was last read are
cancelled. This is done by replacing the core-resident
text for the page by the disk-resident text, which, you
will remember, is only changed when another page is read,
or when the edit is terminated.
READONLY This command has no effect if TV is already in Read Only
Mode (no changes may occur in the file). Otherwise, the
current page is written to the file if any changes have
been made to it. Then TV enters Read Only Mode. In this
mode, changes may apparently be made to a page, but they
will never be recorded in the file.
READWRITE TV leaves Read Only Mode. Changes made to the current page
while TV was in Read Only Mode are CANCELled.
MARK All lines preceding CURRENT are written back to the file as
CURRENT PAGE. The lines from CURRENT to the end of the
page are then written into the file as CURRENT PAGE+1>. In
other words, a page mark has been inserted. All page
numbers beyond this increase by 1, and the directory is
revised appropriately.
DELETE Changes to this page are recorded. Then this page and the
next are merged. All page numbers beyond this are
decreased by 1, and the directory is revised appropriately.
GO Finishes the edit, just as EDIT does, but then repeats the
last RPG command instead of exiting.
SWITCH <filename> Edit another file. Useful for moving text from one
file to another by means of attach mode.
? 23
SECTION X
RUNNING TV
To start the editor, type:
R TV;<file spec>.
or in some cases,
TV <filename> or TV <filename>/R or CVT <filename>/R
The <file specs> are numerous, and will be described in terms of
examples:
R TV;TVED.SAI<cr> or TV TVED.SAI<cr>
TVED.SAI is both the source and destination file for the edit. If
TVED.SAI has a valid directory, it is used, and the edit gets
underway rapidly. Otherwise, TV reads through the file and creates a
new one of that name, with a directory and in proper format.
R TV;TVED/N←TVED<cr>
TVED is both the source and destination file. Setup is as above.
After the directory is in core, it is removed from the file (it is
never put there if none was present on input). The directory remains
in core to aid in the edit process, however.
R TV;TVED←TVED/N<cr>
A directory page will be present in the output file. However, the
input directory should under no circumstances be considered valid,
even if it looks good.
R TV;TVED/50S<cr>
This switch should be used if the source file has no directory, and
if the number of pages exceeds 40. The number (here, 50) should be a
fairly accurate indication of the size of the file. This
specification is not needed if the file has a valid directory.
R TV;TVE1←TVED<cr>
The source file is TVED. It is copied to TVE1 (slowly if TVED has no
directory, rapidly if it does). Then TVE1 is edited (in place) as
usual.
RUNNING TV 24
R TV;TVE1/N←TVED/N/50S<cr>
You can see that as may switches may be included as are needed. Some
combinations are illegal, but they are obvious.
R TV;TVED/R<cr> or TV TVED/R
The edit is begun in Read Only Mode. The file must have a directory,
and be in TV's format. The READWRITE EXTEND command can be used
during the edit, if you subsequently want to change something.
R TV;TVED/20P/10L<cr>
After the file is set up for editing, the first thing you will see is
a display which includes line 10 of page 20. If either does not
exist, TV will display the last thing (page or line) which does
exist. Either switch may be used without the other.
R TV;TVED/C<cr> or CTV TVED
The file TVED will be created (even if one existed!). It will
consist of a directory page (unless /N) and a page 2 with one line in
it.
25
SECTION XXI
SOFTWARE MAINTAINENCE
TV contains some features which support the the maintainence of
modification records, and version numbers, for production software.
This is done by maintaining a history page as page 2. The first line
of the directory contains a VERSION number reference, if this history
page exists. TV uses this VERSION designation as a signal to read
and maintain the history page.
XXI-A. History Page
_______ ____
Line 1 of the History page is the string "COMMENT ⊗HISTORY". Line 2
contains parameters, like AUTHOR, REASON, SAIL, or FAIL (see below).
Line 3 is a couple of numbers, in octal, used only by TV, terminated
with "⊗;", to end the comment for SAIL, FAIL, or MACRO. Line 4
contains, if anything, SAIL or FAIL-dependent VERSION specifications.
If FAIL, it defines the macro .VERSION, which can be used by the
program (put into location 137 (JOBVER), for instance). If SAIL, it
defines the macro VERSION_NUMBER, which can be used in a REQUIRE ...
VERSION specification. Following this are several lines, surrounded
by COMMENT specs, detailing past VERSIONS, and the reasons for their
creation. These lines may be deleted or modified at will, but leave
the surrounding comments. Thus one need not suffer an ever-
increasing number of lines. It should be noted that the
VERSION_NUMBER definition for a SAIL file will be placed after the
first line on page 3 containing "BEGIN" in the first 5 columns. If
no such line is found, no definition is issued.
XXI-B. Version Numbers
_______ _______
TV follows the most recent DEC conventions for version numbers. The
external representation of a Version number is a string of the form
52A-2(2034), or "version 52, minor version A, edit-code 2, edit
number 2034". The edit code is 0 or 1 if the program was last edited
by somebody at DEC, 2-4 if it was last edited by one of DEC's
customers, and 5-7 if it was last edited by a user of that customer's
services (service bureau stuff). The edit number starts out at 1,
and is increased by one for every edit, no matter what else happens
to the version number.
An encoded form of these four fields can be packed into a single
word. It is this value which is the result of expanding the .VERSION
or VERSION_NUMBER macros.
SOFTWARE MAINTAINENCE 26
XXI-C. EXTEND Commands for Version Feature
______ ________ ___ _______ _______
VERSION 52A-2(3) specifies all four fields of the desired version
number. If minor version (an upper case letter!) or edit code (and
the dash) are omitted, defaults (null in external representation) are
assigned. The edit number is not effected, and continues to
increase, if it is not specified. You should usually not specify
this number. VERSION 0 turns off the entire VERSION feature, at the
termination of this edit. The VERSION spec will be gone from the
directory, although the HISTORY page will remain as a normal text
page until you delete. A /V (below) switch, or a non-zero VERSION
spec will put the feature back in, inventing a new page if necessary.
DEMAND AUTHOR REASON FAIL tells TV that it should include the
.VERSION macro on line 4 (because of the FAIL spec), and that the
edit will not be allowed to finish until the editor identifies
himself (AUTHOR), and the REASON for the edit. Any or all of the
above parameters, separated by blanks, may be present in a DEMAND
command. SAIL may be used, as described above, in place of FAIL.
From one to three of these DEMANDS may be presented (and ALL will be
honored, how about that!) in one command.
UNDEMAND FAIL tells TV to omit the .VERSION definition from the
HISTORY page.
IAM DCS identifies me as the AUTHOR of this edit. Any three-
character code will work here.
REASON UPDATE MUDDLE COUNT will fill in the REASON field of the
HISTORY line for this edit with the string "UPDA ... UNT". This
satisfies the REASON demand.
BUG FO inserts the string " FO " before any REASON string. BUG also
satisfies the REASON demand, although both REASON and BUG may be
specified in the same edit. This is a very SAIL-maintainence-
specific thing, but you may be able to use it.
XXI-D. Switch for Version Feature
______ ___ _______ _______
/V should be added as a parameter to the input (or only)
specification in the command line, if the file has no directory, but
it does have a valid VERSION page as page 1. TV will set up a
directory with the VERSION trigger in it.
SOFTWARE MAINTAINENCE 27
XXI-E. Terminating the Edit
___________ ___ ____
If, when you type ⊗E, some of the demanded parameters have not been
specified, TV aborts the ⊗E command, but remembers that it was given.
It then enters EXTEND mode for one command, automatically. You are
expected to give a BUG, REASON, DEMAND, UNDEMAND, or IAM command. If
you do, the ⊗E sequence is re-entered automatically (only to return
if things are still left unsaid). The READONLY command (which
effectively inhibits any VERSION changes this time around) will also
restart the ⊗E sequence. Any other valid or invalid EXTEND command
will execute normally, then return to LINE mode. You must then re-
initiate the ⊗E sequence.
The last act of the ⊗E sequence, if VERSION is enabled, is to write
the updated HISTORY page, then to write the new Version Number into
the directory.
This feature, when used regularly, is good for you.