Output Commands; Summary Of Cre Commands And Control Characters; Composite Commands And Nesting - RCA 1800 Operator's Manual

Cosmac development system ii
Hide thumbs Also See for 1800:
Table of Contents

Advertisement

72 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Operator Manual for the RCA CDS II CDP18S005
FIND
Fonnat: Ftext$
Execution: A search for the specified character
sequence 'text' occurs from the current pointer
position toward the end of the buffer. It stops either
when a match is first encountered or when the end of
the buffer is reached. In the first case, the pointer
:ends positioned immediately after the matching
string. In the latter case, a "CAN'T FIND" message
is printed, and the pointer position is unchanged.
71
SUBSTITUTE
.
-
Fonnat: S search text $ substitute text $
Execution: Operates as FIND does above (using
search text as the search argument). However, on a
match, the substitute text replaces the matching
sequence - with the pointer positioned after the in-
serted text. The substitute text must not be omitted
from the oommand.
Output Commands
TYPE
F.onnat: nT
Execution: Type the n lines adjacent to the current
pointer. The pointer position remains unchanged.
PUNCH
Fonnat: nP
Execution: The n lines adjacent to the current pointer
are written to the output tape and printed on the
printer. The pointer position remains unchanged.
The lines are not deleted from the buffer.
WRITE and DELETE
Fonnat: nW
Execution: n is treated as positive. The n lines at the
beginning of the buffer are written to the output tape,
printed on the printer, and also deleted from the
buffer. The pointer ends up positioned at the
beginning of the remaining buffer.
END
Fonnat: E
Execution: The entire buffer is written to the output
tape and also printed on the printer. Any lines
remaining on the input tape are then copied to the
output tape and printed on the printer. Finally, if a
teletypewriter is used, the 60 null trailer is punched
out. CRE then reinitializes for a new editing session
with buffer cleared and with the pointer positioned at
the beginning of the work space.
NULLS
Fonnat: N
Execution: If a teletypewriter is used, 60 nulls are
punched. Otherwise, this command is ignored. The
pointer is not changed.
Summary of CRE Commands
and Control Characters
A summary listing of the foregoing commands
together with the meaning of each one is given in
Table
X.
A summary of the special CRE control
characters is given in Table
XI.
The CRE error
messages are summarized in Table
XII.
Composite Commands and Nesting
CRE also pennits the user to specify composite
commands. A composite command is a command
string (one or more commands) enclosed within angle
brackets
«
...
> ). A command string may be
preceded by a decimal number indicating the number
of times that the string within the brackets should be
executed.
One composite command may include another.
Thus, CRE permits the "nesting" of commands. For
example,
B5<3C4<DI
$> L>$$
causes replacement of the 4th through the 7th
characters in the first 5 lines in the buffer by spaces.
The pointer ends positioned at the beginning of the
sixth line.
With nested commands, the user must be aware
of the order in which commands will be executed and
the number of times individual operations will occur.
The following example should indicate the general
algorithm. Other examples will be given later.
Consider the command string
where the lower case letters represent numbers and
where each CSi' represents an elementary command
string. Fig. 29 indicates CRE's flow chart for the
execution of this command string. It is derived by
I.i.
.
~
properly pairing the angle brackets in the string.
V
Notice, for example, that CS2 is executed a number
of times equal to the product of a, c, d, and e.

Advertisement

Table of Contents
loading

Table of Contents