UP
This module requires SIK3, SOK3, and CCK3 and provides
SIK5, SOK5, and CCK5 with modified function.
{arcane}{nonref}Design note: It is intended that the TLEM
provide useful function to a program which is designed to
use merely byte streams and therefore uses only SIK5 and
SOK5, not CCK5.
If EOF is signalled from SIK3 or SOK3, the TLEM destroys
itself.
SIK5
The number of bytes in a transmission is limited to an
implementation-defined maximum of 256. It is as if the
256th character were always an activation character. But,
if a transmission is ended by reaching the limit, and the
echoing status is then changed, some characters may be echoed
in error.
If the consumer can accept it, the transmission is always
delivered in one packet. (This is another violation of
the byte stream protocol.)
A (_line) is the largest string of data which is contained
in a transmission and does not contain a line ending character.
Carriage return is a line ending character. Line feed is
a line ending character if and only if, if it were echoed,
it would be echoed as LF CR.
Except as described below under "set old line" and "pseudoactivate",
when a transmission begins, the last line of the previous
transmission is copied to the (_old line) and the (_old
line cursor) is set to the beginning of the old line. If
the last character of the previous transmission was an orange
ball, it is not copied to the old line.
The (_prompt string) is typed at the beginning of each line.
For the purpose of computing tab stops when expanding tab
to spaces and for control-U, a transmission is considered
to begin at the left margin, regardless of the actual position
of the carriage. The prompt is disregarded. Carriage position
is computed as if all characters were being echoed. Output
from SOK5 is not considered.
EOF on SIK5 is ignored.
The following characters in the
input stream cause editing functions. (This section is
not tutorial.) Note: All the following operations ring
Bel if the request cannot be fulfilled. Any operation which
would exceed the implementation-defined limit on the size
of a transmission rings Bel. If the response to a request
is Bel, nothing has been done.
Control-A
Backs up one character in the new line, and backs up
in the old line as appropriate. Rings Bel if there are
no characters left to delete in the new line or the current
insertion. Deleted characters are "erased" by sending a
backspace-space-backspace on the SOK4 key.
Control-C
Copies and types the next character from the old line
to the new line. If there are no more characters to copy,
rings Bel.
Control-D
Equivalent to control-N followed by control-M.
Control-E
Begins an insertion. All data typed after the control-E
is entered into the new line without changing the old line
cursor. The insertion is terminated by another control-E
or by any operation which forces the forward movement of
the old line cursor or terminates the line.
Control-F
Same as control-D except does not print the characters
copied from the old line.
Control-H
Control-I (tab)
If tabs are being expanded to spaces then this character
is equivalent to typing enough spaces to go to the next
tab stop. The echoing of the spaces is controlled by bit
0 of the echo mask. If tabs are not being expanded to spaces
then tab is a data character.
Control-J (linefeed)
Is a line ending character if linefeed is being echoed
as LF CR as opposed to LF alone.
Control-K
Skips over and types the next character in the old line.
Rings Bel if there is no character in the old line to skip
over.
Control-L
Copies but does not type the rest of the characters from
the old line to the new line and then types a plus sign.
Rings Bel if there are no more characters to copy.
Control-M (carriage return)
Is a line ending character.
Control-N
Copies and types the rest of the characters from the
old line to the new line. Rings Bel if there are no more
characters in the old line.
Control-O
The control-O is followed by a character called the search
character; it is not treated as a data or editing character.
The old line is searched, starting from one character beyond
the current old line position, for a character matching
the search character. The characters in the old line up
to but not including the character that matched are copied
to the new line and typed out. Rings Bel if not found.
Control-P
Is followed by a search character. Searches the old
line, starting from one character beyond the current old
line position, for a character matching the search character.
Deletes and types "%" for each character in the old line
up to but not including the character that matched. Rings
Bel if not found.
Control-Q
If not in insert mode, deletes everything back to the
beginning of the new line, backs up the old line position
to the beginning, and "erases" them by sending sufficient
backspace-space-backspace sequences on the SOK4 key. If
in insert mode, deletes back to the beginning of the insertion
(backing up in the old line as appropriate). Rings Bel
if there are no characters to delete.
Control-R
Types the rest of the old line and, on the next line,
the prompt and the new line, lining up the beginning of
the rest of the old line with the end of the new line.
Control-S
Skips over the next character in the old line and types
"%". Rings Bel if there is no character to skip over.
Control-U
Copies characters from the old line, or, if none left,
spaces, until a tab stop is reached or the implementation-defined
limit on the size of a transmission is reached.
Control-V
Treats the next character typed in as a data character,
even if it would otherwise be an editing character. Nul
and Del are not filtered. Tab is not expanded to spaces.
Carriage return and linefeed are not considered line ending
characters. If an alphabetic character is typed, its opposite
case is used.
Control-W
Backs up past spaces and tabs, then past all characters
up to a space or tab. Stops earlier if the beginning of
the line or current insertion is encountered. Backs up
in the old line as appropriate. Deleted characters are
"erased" by sending sufficient backspace-space-backspace
sequences on the SOK4 key. Rings Bel if there are no characters
left to backspace over.
Control-X
Is followed by a search character. Searches the old
line, starting from the current old line position, for a
character matching the search character. Deletes and types
"%" for each character in the old line up to and including
the character that matched. Rings Bel if not found.
Control-Y
Replaces the old line by the new line, deletes the new
line, and types a carriage return, a linefeed, and a prompt.
Control-Z
Is followed by a search character. Searches the old
line, starting from the current old line position, for a
character matching the search character. The characters
in the old line up to and including the character that matched
are copied to the new line and typed out. Rings Bel if
not found.
Differences from the TYMCOM-370 QED line editor
specifications:
Requesting activation on characters which are editing
characters does not override the editing function of the
characters. Activation occurs when an activation character
enters the input data stream.
Control-B, control-G, control-H, and control-T are data characters.
Control-U copies up to the next tab stop or until the implementation-defined
maximum transmission size is reached, whichever comes first.
Known deficiencies:
If you back up (e.g. control-A) over tab or carriage
return {entered with control-V}, it loses track of the carriage
position, so a subsequent control-U or tab being expanded
to spaces won't work right.
The alignment of the old line by control-R isn't right if
the new line contains a tab or carriage return {entered
with control-V}.
SOK5
SOK5 obeys the SOK3 protocol except it does not obey
order code 1 and therefore does not support screen mode.
SIK5 may be producing (reading) at the same time that SOK5
is consuming (printing). In this case, any output generated
as a result of editing may be interspersed with the output
sent to SOK5.
EOF on SOK5 is ignored.
CCK5
This key has the functions of CCK3 {(cck3)}
except "Define character set", "Query characteristics",
Set status message", and "activate now", plus the following.
CCK5(4;==>0;SIK3,SOK3,CCK3) "Destroy TLEM"
Destroys the TLEM and signals EOF on SIK5 and SOK5.
If SIK5 and SOK5 are both available, i.e. SIK5 is in the
consuming state and SOK5 is in the producing state, then
SIK3 and SOK3 are available and will be returned by this
operation. If a key is not available, DK(0) is returned
in that position.
Since no limit for SOK3 is returned, the user will have
to assume a limit of zero initially.
CCK5(12;==>c;) "Expand tab to spaces"
If there is a transmission in progress, c is 1. Otherwise
c is zero and tab on input is treated as an abbreviation
for enough spaces to go to the next tab stop.
CCK5(13;==>c;) "Don't expand tab to spaces"
If there is a transmission in progress, c is 1. Otherwise
c is zero and tab is treated as any other character.
CCK5(16+4n+2d+b;==>c;) "Filter characters"
CCK5(24,ps;==>c;) "Set prompt string"
See CCK6. The string is taken to be ASCII.
CCK5(25,ol;==>c;) "Set old line"
See CCK6. The string is taken to be ASCII.
CCK5(26;==>c;) "Pseudoactivate"
CCK5(27;==>c;) "Delete last input character"
CCK5(28,ol;==>c;) "Type for user"
See CCK6. The string is taken to be ASCII.
CCK5(29;==>c;) "Re-display input"
CCK5(kt;==>X'70E';)
Initial conditions (when TLEM is created)
A tab stop is set every 8 columns
CR is echoed as CRLF
LF is echoed as LF
Tab is not expanded to spaces
Neither NUL, DEL, nor orange ball is filtered.
There is no transmission in progress.
The prompt string is null
The old line has been set to null
The activation set mask is X'01' {activate on CR, LF}
The echo mask is X'F7' {echo everything except non-printing
control characters}