20
User Manual for Microboard Computer Development System CDP18S693 & CDP18S694
CRE maintains a virtual pointer which identifies
some point between two characters in the buffer. This
pointer has the same function as what is commonly
called a “cursor”. Most CRE operations are executed
relative to this pointer. F u rth er, several CRE
operations exist specifically to alter the location of the
pointer. It is essential, therefore, that the user be aware
at all times of the current location of the pointer.
Because the pointer is not visible, it is the user’s
responsibility to keep track of where the pointer is.
Often, its location is verified by asking CRE to type
information in the buffer at the current pointer
position. Alternatively, the user may first initialize the
pointer to a known reference point (e.g., the beginning
or end of a line, or the beginning or end of the buffer)
and then move it relative to this known origin.
In illustrative examples, the location of the pointer is
indicated with an arrow below and between the two
buffer characters. For example, in
ABCDE
t
the character before the pointer is B and that after the
pointer is C.
Unless otherwise noted, whenever text is deleted
from the buffer, the character sequence to be deleted
exists either immediately to the right or immediately to
the left of the pointer. After the deletion, the buffer has
contracted by the number of characters deleted. If the
field deleted is to the right of the pointer, the character
immediately to the left of the pointer remains the same.
The character to the right of the pointer then becomes
the character that was immediately to the right of the
deleted field. A corresponding statement can be made
for deletion to the left of the pointer.
When text is inserted, the buffer expands. Unless
otherwise noted, text is inserted between the two
characters at the position of the pointer. After the
insertion, the pointer is positioned immediately after
the inserted text. Thus, the character to the right of the
pointer remains the same.
The execution of many CRE operations starts at the
present pointer position and proceeds either towards
the end or towards the beginning of the buffer. CRE
insures that the pointer cannot be moved past the
present limits of the buffer. If the pointer reaches the
beginning or the end of the buffer, the operation stops -
leaving the pointer at that point. For example, if the
pointer is positioned n characters from the end of the
buffer and the user asks to move the pointer m
characters to the right, with m>n, then the operation
will stop after the buffer pointer has been incremented
by only n.
CRE Command Operation
Command Strings
On entry, CRE types the following message:
MCDS TAPE EDITOR VERSION X.X
and then follows with its user prompt —>. The —>
prompt always indicates that CRE is ready to receive a
new user command from the keyboard and has
executed the previous one.
After receiving the —> , the user types a sequence of
one or more commands which CRE will execute in
order. Most commands may be optionally delimited
(ended) by a special termination control character.
Commands which include text arguments of variable
length must include this character to define the end of a
text field. A CRE com m and string is always
terminated by the occurrence of two successive
ESCape characters or its equivalent (the control
character whose ASCII code is a hex IB.
The I/ 0 terminals discussed here, operate in the full
duplex mode, in which the data path from the
keyboard to the MCDS is distinct from that between
the MCDS and the printer. Normally, a program
merely “echoes” back to the printer what it has just
received from the keyboard. However, whenever CRE *
receives an ESC character, it is echoed back to the
printer followed by a $ - giving a visual indication of
the ESC key depression. Thus, a typical command
string normally appears on the printer as
COMMANDl$COMMAND2$ . . . COMMANDn$$
where in most cases the separating ESC’s are optional
but the final pair is mandatory. (If ESC is not hit, the $
will not appear, of course.) A command string must be
terminated by two depressions of the ESC key.
Command Formats
The heart of the command is a single letter
mnemonic (such as “T” for TYPE, “I” for INSERT,
etc.). In many cases, this letter may be optionally
preceded by a decimal number (later denoted by n)
indicating the number of characters or lines involved.
Further, in some cases this number may be preceded by
a minus sign (-) indicating a direction (from the
present pointer position) toward the beginning of the
buffer rather than toward the end (as is normally
assumed). If no number is present, CRE assumes the
value 1.
Given an arbitrary pointer location, the possible
CRE interpretations for n are normally as follows:
(1) Character Operations:
Positive n identifies
the n characters to the right of the pointer
(including control characters). Negative n
identified the n characters to its left. Unless
otherwise noted, n=0 results in no operation.
(2)
Line Operations:
Positive n identifies all
characters to the right of the pointer up to and
including the nth CR encountered. If the
pointer is in the middle of a line, the first line
will constitute only the remainder of that line.
Negative n identifies all characters to the left