XV-1

XV.

EDIT - An Editing Subroutine
E. Ricardo Quinones

1.

General Description
EDIT is an editing subroutine that operates under BATMAN,

using BATMAN's provisions for input/output and serialization.
written entirely in FAP and operates under FMS.

It is

Whereas BATMAN is

designed to deal with whole card images at once, EDIT is intended to
be used to handle single characters and words within card images.
EDIT and BATMAN have radically different control languages that are
mutually unintelligible; at the end of a BATMAN-EDIT run, the listingof control cards distinguishes between BATMAN control cards and EDIT
control cards by indenting the cards interpreted by EDIT,
EDIT contains provisions for maintaining whole-rcard integrity,
if desired, or for packing as many words of text as possible into as
small a space as possible.

This option is called "squeezing", because

when the Q switch (see below — section 3, part C) is 'ON', consecutive
blanks are squeezed together into a single blank.

Also, words that are

hyphenated in the input stream may be reintegrated in the process ofediting.

This reintegration only occurs when a word is hyphenatedacross a card boundary in the input stream, and it is regulated by theH switch (see section 3, part C) in conjunction with the aforementioned
Q switch.
Input to EDIT is in the form of 80-character card images.

The

first 72 characters of each card image are "input text", and the last

XV-2

8 characters are "serialization".

An implicit blank is assumed after the

input text of each card image, so that non-blank characters in column 72of the input text are not ordinarily concatenated with the contents ofcolumn 1 of the succeeding input text card.

Section 3, part C deals withexceptions to this as provided by the H switch.
Output is in 80-character card images, and again the format is 72
characters of processed text, followed by 8 characters of serialization.
Words are never broken across card boundaries.

Certain character strings

may be forced to the beginning of card images on output; provisions fordefining such character strings are explained further on, in section 3,
part C.

Generally speaking, "keywords" are forced to the beginning ofcard images when they are found at the beginning of card images on input,
while the special character defined by a minus-7-8 punch (octal 57
internally on the 7094) is used to force any set of characters to thebeginning of a card image, no matter where the characters occur in the input
stream.
Most of the limitations of EDIT regarding table sizes and othermachine-related specifications are shared with BATMAN

2.

Requirements and Specifications for BATMAN.
All of the input/output specifications for any EDIT run must be

made in BATMAN; all of BATMAN's default specifications save one areapplicable to EDIT.

That is, before any editing can be done, the following

must be specified in BATMAN:

input tape, output tape and output blocking

XV-3

procedure, serialization procedure, whether output is or is not tobe printed concurrently on the system output tape, and whether or
not "*STOP" and end-of-file (eof) markers are to be copied.

In caseany of these specifications is omitted, the following default specifications are adopted:

input tape — 10 (B5 under FMS); output tape —9 (A5), with blocking; serialization procedure — copy previous
serialization; concurrent printing of output — none; "*ST0P"s andeofs — copied.
The exception to this standard procedure in EDIT is in theserialization procedure.

If control is passed to EDIT while BATMAN

is reserializing the output, either by a standard increment or by*TEXT numbers, then EDIT allows this to continue.

If, on the other

hand, EDIT is presented with specifications for blank serializationor for copying the old serialization, EDIT overrides this byestablishing a specification which takes the serialization on thefirst card read in as a base, and an increment of 10, and reserializing
the output.
error.

No message is printed, and this is not counted as an

The rationale

here is that editing very often produces card

images that do not at all resemble the original input images, and tocopy old serialization would only be misleading.

Blank serialization

is not allowed because there would then be no way to perform further
eding on subsequent runs, as there would be no way to identify
specific cards for editing commands.

If blank serialization is desired

after an editing job is done, the output must first be written ontoa scratch tape and then copied onto the final output tape under a"DO NOT SERIALIZE" command for BATMAN.

XV-4

Control is passed from BATMAN to EDIT by using the single control
word "EDIT" on a BATMAN control card.

If any other of BATMAN'S control

words (such as INPUT, OUTPUT, TAPE, FILE, CARD, PRINT, BLOCKED, and soon) appears on the same control card as "EDIT", the control card will beconsidered illegitimate and control will not be passed to EDIT.
Control can be passed from EDIT to BATMAN in two ways.

First, if

an EDIT control card containing the character R in column 1 is found, EDIT
will unburrer its work spaces and pass control immediately to BATMAN.

Second,unbuffering and the relinquishing of control is automatic upon the occurrenceof an end-of-file mark in the input stream.

This serves as a safeguard against

the involuntary merger of distinct files of data.

The eof return to BATMAN

can be deliberately invoked by an EDIT control card with the character F^
in column 1; editing, using all current P, X, and K cards (see below),merely continues until an eof is found.
When control is returned to BATMAN, EDIT's various counters andregisters are not zeroed; the only change in EDIT's internal condition isthe emptying of its buffer space.

However, if EDIT has overridden a

BATMAN serialization specification, EDIT f s new specification remains ineffect when control is returned to BATMAN.
EDITfs error messages are included in BATMAN'S count of errors
committed in any given run.

"BAD INPUT" flags are attached to all cards

which are inputted to EDIT as part of a redundant record, and these arealso included in BATMAN's error count, with each card counted as an error,
rather than each record.

Note that these flags are carried with eachcharacter of each redundant record, so that if any editing increases orXV-5

decreases the amount of space occupied by redundant text, "BAD INPUT"
flags may be eliminated or dispersed.

All this is essentially similar

to the convention followed by BATMAN.
Whereas BATMAN operates one card image ahead of where theuser thinks it is, EDIT operates exactly where the user supposes it
to be, although output lags by roughly one card image, because EDIT must
keep enough "stock on hand" to match the longest possible strings acrosscard boundaries,

3.

EDIT Control Card Format

A)

Serialization

EDIT control cards are interpreted and their commands executed
when a text card is found with serialization in columns 73-8Q thatmatches the serialization in columns 73-80 of the control card.

Blanksare converted to zeroes, so "bbbl0050" matches "00010050", which inturn matches "0001bb50", and so on.

With this exception, the control

card serialization must match exactly the input serialization.

A

control card numbered "00010025" will never be executed if theserialization runs"..., 00010010, 00010020, 00010030, 00010040,...".
Since searching is only carried out in a forward direction (in termsof tape motion), in the previous example, the editing process would
continue while EDIT searches for a card numbered "00010025", until theeof marker is encountered.
to BATMAN.

At that time, control would be returned

EDIT does not consider the numerical value of theserialization number; that is, no judgment is ever passed on theXV-6

prospective location of a card with a given serialization number.

The

tape is merely moved forward until a card with a matching serialization
is found; or an eof encountered.

This is unlike BATMAN's technique,which will backspace along an input tape to find a text card with alower serialization number than the text card presently under consideration.
If the control card has a blank serialization field, the commandis carried out on the card image most recently read in.

Therefore, manydifferent actions may be performed on a single card of text by locating
the text card with the serialization number on the first control card,and by leaving columns 73-80 blank on succeeding control cards.

The

same effect can be obtained by repeating the same serialization number
on consecutive control cards.

Text cards are usually read in for editing

after the serialization number on the control card has been read; if,
however, the serialization number on the control card is found to matchthe serialization number of the most recently acquired text card, no
additional text is read in.
The order of treatment of the various parts of the control cardand text cards is as follows:1)

A control card is read in; the control card serializationis converted and matched against blanks and against thepresent text card.

If either of these matches succeeds,

control goes to "3)" below.
2)

If the matches do not succeed, the permanent editing commands
are performed (see below) and another text card is read in.
Control reverts to "1)" above.

XV-7

3)

If the control card and the text card have matchingserialization numbers, or if the control card
serialization is blank, the body of the control cardis interpreted and the command executed.

Control reverts

to "1)" above.

B)

Editing Commands

The most basic command used in editing text requires thereplacement of a character string with another character string.
Under EDIT, this is accomplished by a command which resembles a
FORTRAN assignment statement.

Beginning in column 1 of the control

card, the string to be, searched for is specified by enclosure
within single quote marks.
definition, see below).

(For a more complex discussion of string

Immediately following this, one and only

one == (equals sign) must appear to separate this "search string"from its "replace string".

No blanks or any other characters

are allowed between strings.

The sequence of characters that will

replace the search string then follows immediately, between single
quote marks.

The pattern, then, for a simple replacement commandis as follows:

Column 1' (the search string) ' = ' (the replace string) 'Serialization goes in columns 73-80 of the control card, if it appears
at all; editing commands never go into columns 73-80.

XV-8

The maximum length of the search string, excluding the boundary
quote marks, is 72 characters.

The maximum length of the replace string,

also excluding the boundary quote marks, is 144 characters.
length zero are not allowed.

Strings of

A discussion of the legitimate contents ofcharacter strings in EDIT can be found below.
Editing commands often must be extended from one control card to
the next, when the search and replace strings are of greater than moderate
length.

This extension is accomplished by continuing the command fromcolumn 72 of one control card to column 1 of the next control card, withno intervening characters other than serialization, if present, on thefirst control card of a command.

The serialization columns are ignoredon cards used for extending commands.

If a command must be spread overmore than two control cards, only columns 1-72 of succeeding cards areused; the serialization columns are always ignored.

When EDIT control

cards are listed at the end of the run, all cards of extended commands
will be preceded by a + (plus sign), except for the last card of an
extended command, which will appear with no marking character.
Because no identifying marks are used to signify control card
extensions, and because the convention for expressing quote marks withina character string is "doubling", (see below), if a terminal quote markfor an editing command appears in column 72 of a control card, the next
card must be blank.

The reason for this is that EDIT will scan the firstcolumn of the next control card if column 72 contains a quote mark,because EDIT cannot know beforehand if the quote mark is the terminal
symbol for a character string of the first of a pair of doubled quote marks.

XV-9

Certain character strings may occur very frequently in agiven body of text, and it may be desired to alter such strings every
time they occur.

In order to do this without repeating the replacement

command many times, a replacement command may be entered in a tableof commands to be executed wherever possible in the body of text.
These "permanent replacement commands" are performed on every cardthat is read into EDIT, but card boundaries are ignored in scanningfor their search strings.
The format for a permanent replacement card (or "P" card) is,
beginning in column 1, as follows:
P' (search string) ' = ' (replace string)1
Once again, serialization goes in columns 73-80.

Just as for a

temporary replacement card, the maximum lengths for search andreplace strings are 72 and 144 characters, respectively, and stringsof length zero are not allowed.

Again, if additional cards are neededto accomodate a replacement command, the strings and terminal symbols
are merely extended from column 72 of one control card to column 1 of
the next. And here, as before, if a terminal quote mark appears incolumn 72 of a control card, the following card must be blank tosignify the end of the command.
P cards are executed from the time of their first definition
until they are erased from the table of permanent editing commands.
(See below for "E" cards, which erase P cards, as well as permanentdeletion cards and keyword cards. These are "X" and "K" cards.)

XV-10

P cards may be serialized, therefore, and the particular replacement will
not be initiated until the text card with matching serialization is
encountered.
Care should be exercised in defining permanent replacement commands,
as a card of text may be subjected to two or three scans using the same
set of P (and X) cards. That is, if for example, it is desired to double
all periods that are standing alone, the following command ought not to be
used:

p»
XT

«

i—i
—*

i
« «

On a piece of text such as the following, the results would presumably
not be the desired ones:'A . B . C . ARE THE CALL LETTERS OF A TV NETWORK . 'The results could conceivably be:»A . . . . B .... C .... ARE THE CALL LETTERS OF A TV NETWORK'This would result from two passes over the text, caused by the need toaccumulate several lines of text for scanning to allow for the occurrenceof search strings across card boundaries.

The proper definition of a P

card for doubling of the standing-alone periods would be:
pi

I^I

i

Blanks are, of course, significant within quote marks.
As EDIT is presently assembled, up to 20 P cards may be definedat once.

However, the total number of characters in all the search

XV-11strings of all the replacement commands may not exceed 200.

Also,

the total number of characters in all the replace strings of all thereplacement commands may not exceed 300.

All permanent editing

commands (P and X cards) are performed at the same time, in the orderof their definition.

This allows intermingling of P and X cards.

In order to delete characters from input text, a card is usedwith the following format, beginning in column 1:

D" (delete string) f
Again, serialization is in columns 73-80, if it appears at all.

The

maximum length of the delete string is 72 characters, excluding
boundary quote marks, just as is the search string for temporary andpermanent replacement cards.

(This is assembled into EDIT, and thesame assembly language specification is used to define the maximum
length for search and delete strings.)
zero are not allowed.

Delete strings of length

The convention for extending temporary deletion

cards, or "D" cards, is the same as that for extending temporary
replacement cards, and as before, if the terminal quote mark for adelete string appears in column 72, the succeeding control card must be
blank to signify the end of the command.
If an entire card (or group of cards) is to be removed atonce, the chore of writing it entirely out within quotes can be avoided
by using a D card of the following format, starting in column 1:

D*k

Note that k is the number of entire cards to be deleted, and is written,
with no intervening or embedded blanks, as an integer.

There is noXV-12

limit to the size of this number; but if any character other than o, 1,...,
9 appears before the terminal blank for the command, only 1 card will bedeleted.

The command D*0 will produce irrational results and should be

avoided.
This command (D*k) is unique in that a text card is read in
immediately after the command is carried out, and before the next control
card is read in. This contradicts the normal sequence of input for control
and text cards as outlined in section 3 A).

The result can be an eof returnto BATMAN if the last card in a file is removed by a D*k command.

(See

section 3, Part C).
As with replacement commands, there may be sequences of charactersthat must be deleted from many different places in a body of text. D cards
may be made applicable to all text cards by writing them as permanentdeletion cards, or "X" cards. The format of X cards is identical to thatof D cards, except, of course, that X replaces D in column 1:
X1 (.delete string) 'X cards, mingled with P cards, are executed from the time of their first
definition until they are erased from the table of permanent editing
commands.

They may also be serialized, and will not be enacted until theproper text card is reached.
their definition.

P and X cards are performed in the order ofA maximum of 20 X cards may be defined at once, and thetotal number of characters in all delete strings may not exceed 200. The
command X*k, which is analogous to D*k, is not allowed.

XV-13C)

Special Commands

As mentioned before, the input stream of characters may contain,at the beginning of card images, certain strings which should begin card
images on output.

As EDIT is assembled, two of these "keywords" are in

the table of keywords already.

"*" and "$", if found at the beginningof a card on input to EDIT, will cause EDIT to unbuffer itself and placethat card at the beginning of the next segment of output.

Up to 18

additional keywords may be defined, by using "K" cards of either ofthe following formats:K' (keyword string) 'K' (keyword string) '*The effect of this card is to cause any input card beginning with, thecharacter string bounded by quote marks to be forced to the beginningof a card image on output.

If the keyword has been specified withouta star after the terminal quote mark for the keyword string, theentire text card that begins with the keyword will be treated as though
the Q switch (see below) were temporarily OFF; that is, any blanks on it
will not be squeezed together.

This preserves the integrity of title

and author cards under the SMART system.

If, however, the keyword

has been defined with a star following the terminal quote mark of the
keyword string, only the keyword itself is protected against squeezing.
This allows paragraphs, beginning with, let us say, two blanks, to bepreserved as paragraphs while allowing text squeezing to go on as usual.

XV-14

The two leading blanks would not be squeezed out of existence in this case,but all other blanks on text cards would be treated in accordance with thesetting of the Q switch.

The current maximum length for keywords is 6

characters.
The Q switch has been mentioned several times.

Its setting

determines whether or not consecutive blanks are to be squeezed to single
blanks.

The switch can be turned on with a control card with the following

in columns 1-6:
Q'ON'bColumns 7-72 are ignored when a Q is encountered in column 1 of an EDIT
control card; as usual, columns 73-80 may contain serialization.

To turn

the Q switch off, a Q card should contain the following in columns 1-6:
Q'OFF'

If the contents of columns 2-6 are not either of the above strings, the Q
switch is inverted.

That is, if it is off, then it is turned on, and if

it is on, then it is turned off.
The setting of the Q switch overrides the partial blank-squeezing
Specifiable with K cards.

If a K card with a star is defined, and the Q

switch is off, no blanks will be squeezed from any input card beginningwith the specified keyword.
Regardless of the setting of the Q switch, words are never broken
by EDIT across card boundaries on output.

XV-15

The relationship between the Q switch setting and P and X
cards merits some discussion.

If the Q switch is 'ON1, squeezing ofblanks takes place just before each permanent editing command is
carried out.

This means that search strings which contain any

occurrences of multiple blanks will never be found while Q is f0N' ,except in two circumstances:a)when a search string occurs on a text card that is
protected from squeezing by a keyword, andb)when a search string is found that is the resultof a successful permanent replacement earlier in thelist of permanent editing commands.

The H switch determines whether or not EDIT will scan input
cards for words hyphenated across card boundaries.

The H switch- canbe turned on or off with control cards of the following type:

H'ON'bH'OFF'

Columns 7-72 are ignored when an H is found in column 1 of a control
card; columns 73-80 may contain serialization numbers.

As with the

Q switch, if the contents of columns 1-6 are not either of the above
patterns, the H switch is inverted.

The H switch is overridden by

the Q switch, and thus, words may not be reintegrated if the Q switch
is not 'ON' .

XV-16

If the H switch and the Q switch are both 'ON1, EDIT first scans
the last non-blank character of each input card, while the next card of
input text is being read in. Hyphen-checking therefore lags the rest of
the editing process by one card image.

If the last non-blank characterof the last card read in is not a hyphen (11-punch or minus sign, notthe 4-8 punch as in some character sets) the checking stops.

If thislast character is hyphen, the first character on the next card ischecked.

If the first character is any of the digits 0-9, reintegration

does not take place (the hyphen is not deleted\.

If the first characteris anything but a digit, the hyphen from the preceding card and allintervening blanks are deleted.

Because of this treatment while rein-

tegrating hyphenated words, words that are broken at an embedded hyphen
must be broken with two consecutive hyphens. One of these is deleted if
the word is ever reintegrated, and the other remains as the original
hyphen and part of the word.
EDIT may be made to run without interruption until the eofmarker for the input text is reached, by including a control card witH
the letter "F" in column 1.

P, X, and K cards are checked, if any aredefined, and squeezing and word reintegration are performed according to
the Q and H switch settings. All this is automatic, and no control cards
are read again until after control has reverted to BATMAN after the eofmarker has been encountered.

For that reason, the next control card after

any F card should be a BATMAN control card; an "R" card, which returns
control to BATMAN in other situations, is redundant and in error.

CSee belowl.

XV-17EDIT may also be made to produce a log of its activities whenthe eof marker has been reached.

The following control card does theautomatic work until the eof marker is reached, and then a log is printed
before control is returned to BATMAN:

F'LOG'

If columns 2-6 of an F card contain anything but 'LOG', the log is
not produced before the eof return to BATMAN is taken.

Columns 7-72

are ignored; columns 73-80 may contain serialization.
The log mentioned above may be produced at any time while EDIT
has control, by using a control card with the letter "L" in column 1.
Columns 2-72 are ignored, and the control card may be serialized incolumns 73-80.

EDIT does not unbuffer itself when a log is calledfor.
The log contains the following information:a)

A 12-digit octal integer representing the contents of
the 7094fs sense indicators.

(A directory to the SI

is appended .)b)

The current settings of the Q and H switches.

c)

The number of currently active P, X, and K cards.

d)A listing of all currently active P and X cards, in orderof their definition, which is also the order of their
execution.

The number of times each has occurred since thelast log was written is listed.
e)

A listing of all currently active K cards, in order of
their definition and execution, with a listing of thenumber of times each has occurred since the last log
was written.

XV-18f)

The number of temporary replacement cards that havebeen attempted since the last log, with the number
and percent that have failed.

(A failure is defined

as no occurrences of the search string in the scannedline).
g)

The number of D cards since the last log, with thenumber and percent that have failed.

(Similarly,

a failure here is defined as no occurrences of thedelete string in the scanned line.!

Note that the counters involved in the production of a log are
zeroed only after a log is produced.

The counters are not zeroed whencontrol is passed back and forth between BATMAN and EDIT.
All of EDIT's currently active P, X, and K cards are kept intables.

These tables are preserved, intact, whether or not EDIT retains

control, unless they are deliberately erased tor some catastrophe befalls
the job). This task of erasing the tables is accomplished by a control
card with the format shown below, beginning in column 1:

E' (erase string). 'The "erase string" is made up of any combination of the following characters:

P, X, K, *, or $.

illegal for an erase string.

Any other character, including blank, is
Each character in the erase string specified

a portion of a table to be erased; repetition of a character has no effect.
Any character other than these will cause erasing to cease and an error
message to be printed.
quote mark.

Erasure of the tables is normally ended by a single

Columns 73-80 may be used for serialization, as usual, andall unused columns are ignored.

XV

P and X cards are kept intermingled within EDIT, but a P in
the erasing specifications will erase all of the P cards and leave the
X cards intact; similarly, an X will erase only the X cards.

A"garbage-collecting" segment of code eliminates the holes in the tableof P and X cards after either P or X

cards are erased.

After each

set of erasures, any P or X card that is 'subsequently defined will beplaced at the end of the list of P and X cards to be checked.

If apermanent editing command has previously been defined and erased, a new
definition of the same editing command is treated as though it has
never been seen before.
The character K within the erase string causes the erasureof all user-defined K cards.

The assembled-in keywords "*" and "$",

which appear in that order at the head of the keyword table, are notaffected by such an erasure.

"*" and "$" can be erased, however, if

these same characters appear in an erasing command.

If they areerased, they lose their position of priority at the beginning of thelist of keywords, even if they are redefined at a later time.
Control may be returned to BATMAN at any time with a control
card containing the character "R" in column 1.

Columns 2-6 may

contain the characters 'LOG1, in which case a log from EDIT is
produced before control reverts to BATMAN.

No log is produced ifcolumns 2-6 contain other characters; in this case, the contents of thesecolumns are ignored.

Columns 7-72 are always ignored, and columns

73-80 may, of course, contain serialization.

EDIT unbuffers itself

when control is passed to BATMAN, but none of its counters are zeroed
and all switch settings remain intact.
are saved and restored by EDIT itself).

(That is, the sense indicators

XV-20

4.

Editing Principles
A)

Temporary Cards (",Mand D Cards)

Temporary replacement and deletion cards specify commands thatare effective for only one card of input text.

Input text card boundaries

are not crossed.
Nothing whatsoever is done to the card before the temporary scans
are carried out.

This means that consecutive blanks have not yet beensqueezed, nor has any word reintegration taken place, regardless of thesettings of the Q and H switches.
Each occurrence of a search or delete string is replaced ordeleted, no matter how many replacements or deletions this may imply.
Thus, if the following control command is performed on the text card which
succeeds it...
D'A1 (performed on) 'ENGLAND IS A FARAWAY COUNTRY.1... the result is:f

ENGLND IS

FRWY COUNTRY.1

Note that all occurrences of 'A1 have been deleted, and that nosqueezing of blanks has occurred.
The card of text is scanned only once under a temporary editing
command.
Blanks inserted in text as part of replace strings are tagged
within EDIT and are never squeezed into each other or blanks which are
original input text.

XV-21B)

Permanent Commands (P and X Cards)

Permanent replacement and deletion cards are effective forall cards of input text, including keyword-headed cards; card
boundaries are ignored.
All temporary scans and the blank-squeezing and wordreintegration processes take place before any P or X cards are
executed, for each card of input text.

In fact, the P and X

scans are the last things that text cards are subjected to before
being outputted.
Obviously, all occurrences of search strings are replaced ordeleted as the command specifies.
Because of the need to keep some text in EDIT to match strings
across card boundaries, multiple scanning may occur as a result, andany single card may be scanned two or more times under the same P or
X command.

(See section 3, Part B)

Since P and X commands are the last things performed on aline of output text before the line is outputted, even when an eof
marker is encountered, they cannot ordinarily be skipped.

However,

if control is returned to BATMAN by means of an R card, control isimmediately transferred, without any checking of P and X commands.
EDIT unbuffers itself when returning control to BATMAN, so thefollowing sequence of control cards would cause text card number
00230040 to be copied without any P or X commands performed on it:

XV-22

Column 1

Column 73

RETURN TO BATMAN
ENTER EDIT AGAIN
command in EDIT...

00230040

As before, blanks which appear in replace strings are neversqueezed, either with each other or with blanks that have never been
touched by EDIT.

C)

String Contents

Search, replace, delete, and keyword strings, as well as all input
text, may contain any of the 64 characters capable of being represented
internally on the 7094, with two exceptions and one caution.
codes 0-6-8 and 0-7-8

Card punch(internally, octal 76 and 77 respectively) may not

be used, as EDIT uses them for internal markers.

Card punch code 11-7-8(octal 57) forces the character immediately following it to appear incolumn 1 of the next output card image; any unfilled spaces in the preceding
card image are filled with blanks.

5.

The 11-7-8 character disappears.

Miscellany and Tables
EDIT is initially set up so that all tables are empty and allinternal switches (bits 0-22 and 32-35 of the sense indicators) are off,with the following exceptions:a)

The Q switch, which is internally bit 2 of the SI, isinitially on (or 'ON');b)

The keyword table has the entries for '*' and f $ ' in
the first and second available spaces, respectively.

XV

As EDIT is presently assembled, it occupies 13166 (octal)
locations in the 7094.

When BATMAN-EDIT is run, complete with its

own small package of I/O routines, the needed library routines fromthe FMS library, and a clock-reading subroutine, it occupies low
core up to location 51201 and high core from location 77507 on.

Thespace between these locations is used by BATMAN to accumulate control
cards for the final control card listing; if the available space isused up, accumultation of control cards ends and a message is written
at the end of the run.

All the control cards that were accumulated

are, of course, listed.
Timing properties for EDIT are difficult to estimate.
a rough rule of thumb is as follows:

However,

if the number of keywords issmall (under 5 ) , if Q is 'ON1 and H is 'OFF', if the density of
temporary editing commands is high (around 1 correction per card of
input text), and if output is to be simultaneously printed on thesystem output tape, then about .01 minutes are required per 100 cards
of input text, per permanent editing specification.
That is, for most of the Project SMART editing done withBATMAN-EDIT, the following timing formulay has been derived empirically:.01 min/100 cards/P or X command.

Of course, the fact that the "real"

output is blocked and the copy of the output on the system print tapeis unblocked lends further mystery to the problem of exactly timing
BATMAN-EDIT runs, but the above is the best available estimate.
When the listing of control cards is produced at the end of
a BATMAN-EDIT run, EDIT control cards may be preceded by any or none

XV-2 4of three characters.

They are:*, + , and the letter 0.

The star,*, signifies that for some reason the specified command was not carriedout properly; usually an error message can be found somewhere in the run
to explain why the command was starred.

The plus sign, + , signifies acommand that has been extended from one control card to another (seesection 3, Part 2).

It does not appear as a prefix to the last control

card of the command; the last card of a command may, however, be preceded by a star or an £.

EDIT does not allow a card image on input tobe expanded to more than about 5-1/2 times its size; when a control
card specifies a replacement that will overflow the available work
space, EDIT makes room for the replacement by getting rid of one card
image from the head of the work space. An error message is printed,
and the character <D will appear before the relevant control card in
the control card listing.

XV-2 5

Column1
173(search string) '=P'(search string) f =f

00000000(replace string) '11111111(replace string)1

D (delete string) 'bbbl5670

D*k00230086

X' (delete string).

fbbbbbbbb

K* (keyword string) '1

K

BACDEHGJ(keyword string) ' *12345678

Q'ON'bbbbbbbbb

Q'OFF'

98765432

H' ON' b

24682468

H'OFF'

AAAABBBBFQUINONESf

F ' LOG00310056

L

00000000E' (erase string). '06661234

R

80808080

R'LOG')))$$$$$

Note:

Anything between quotes is allowed.

Anything isallowed in the serialization columns, as long as a match
can be found in the input text.

Columns not explicitly

required to be blanks (b) are ignored.

EDIT Control Card Formats

Table 1

XV-2 6

Search string -72 characters

Replace string -144 characters

Delete string -72 characters

Keyword string -6 characters

Erase string -any number of characters, but none besides:
P, X, K, *, $.

a) Maximum String Lengths

cards -

20 separate commands (total of search strings
may not exceed 200 characters, total of replacestrings may not exceed 300 characters)

X cards -20 separate commands (total of delete strings
may not exceed 200 characters)

K cards -20 separate commands, including the assembled-in
1*• and f $' (total of keyword strings may notexceed 120 characters)pb) Table Sizes

Maximum String Lengths and Table Sizes
Table 2

XV-2 7

The following is a directory to the use of the left half of thesense indicators as used in EDIT
4000001Q-

the .Last replacement card was a 'P' card.
the .Last replacement card was a string card.

200000

1Q-

the Last deletion card was a 'X1 card.
the .Last deletion card was a 'D' card.

10000010-

cards will be squeezed of blanks.
cards will not be squeezed.

040000

10-

last control card had non-blank serialization
last control card had blank serialization.

020000

10-

last temporary scan was a replacement.
last temporary scan was a deletion.

010000

10-

text card serialization matches control card serial.
text card serial does not match control card serial.

004000

10-

last card written had 'bad input1 flag.
Last card written had no flag.

002000

10-

last card written had 'bad input' flag.
last card read had no flag.

00100010-

not used,
not used.

00040010-

there are permanent insertions or deletions or both,there are no permanent insertions or deletions.
unbuffering before a 'D*k' card where Q is off, has
not yet occurred.
unbuffering in the above case has taken place*

0002000001Q010-

no squeezing of blanks on the present card,
if Q is on, squeezing will occur.

00004010-

a previously defined BATMAN serialization (textsr
or incser) will be used on output,
an EDIT-defined incser replaces a BATMAN noser orcopser. EDIT uses the number on the first text
card read as a base, and increments by 10.

0000201
0

the last card put out used all 72 columns,
the last card put out did not use 72 columns.

0000101
0

the last 'K' card was of the form (K'XXX'*).
the last 'K' card was of the form (K'XXX' ) .

0000041

the current card has a key word. Do not squeeze it,but squeeze the rest of the card if Q is on.
the current card has no key word. Q determinessqueezing of blanks on the card.

0000002

1
0

undo hyphenations,retain hypenations.

000001

1
0

final 'F' card requested a permanent command log.
final 'F' card merely ended the file.

Directory to the Sense Indicators
Table 3

XV-2 8This is a directory to the use of the right half of the sense
indicators in EDIT.
10-

last temporary card succeeded.
last temporary card failed.

10-

not used.
not used.

100000

10-

last P or X card in last log was X.
last P or X card in last log was P.

040000i- used for 'ho. of occurrences1 in logs.

4000002000000-•.

020000l0-EDIT is inputting text cards.
EDIT has not required text cards yet.

010000l0-

1 004000

10-00200010-00100010-00040010-00020010-00010010-00004010-00002010-

The rightmost four bits of the SI contain a code number for the lastcontrol card read in. The directory follows.
000001
regular replacement card (quote card]
000002
P card000003
D card (also D*K cards)
000004
X cardK card000005000006
E card000007
Q card000010H card000011
F card (also f 'LOG1 cards)
000012
not used.
000013
not used.
000014
R card000015- D00017 are not yet used.

Table 3
(continued)