Informal Introduction To The Cosmac Resident Editor - RCA 1800 Operator's Manual

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

Advertisement

)
CDS Resident Software Development
Aids _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 65
after the completion of an assembly, in order to load
the program just assembled). UT20 receives control
and prints an
"*"
prompt as usual. The user may
then re-initialize the object tape for loading and
running.
Informal Introduction to the
COSMAC Resident Editor
,After
the user has written his COSMAC assembly
language program and wants to assemble and run it,
;lhe
immediately faces the problem of converting the
·
~hand-written
source file into a machine-readable
form. This conversion involves a keyboard-to-tape
operation in which lines on the coding sheet are
transcribed to become lines on a source tape.
Although an "off-line" process can be executed, in
which the
110
terminal is operated in the LOCAL
mode, it is much more likely that the COSMAC
Resident Editor will be used at this point to create the
source tape. The reason is that use of the Editor
provides assurance that the created files are in proper
format for later reading by the Assembler and for
later modification, if necessary, by the Editor. Details
on formats are given in the description of the Editor
which follows in the next section of this Manual.
Once a source file has been created and a first
Assembly run made, it is very likely' that error
diagnostics will be returned by CRA asking for
corrections to the source file to conform to CRA's
rules. Typically, the changes required at this point
are "trivial" but necessary. For example, spaces may
have to be removed in one or more expressions. The
same symbol may have been erroneously used for two
purposes. An operation mnemonic may have been
misspelled or .a punctuation character such as a
comma, colon, or single quote omitted. The number
of possible trivial errors is clearly large.
To correct the errors and to alter the source file to
conform the program to the CRA rules, the Editor is
used. Typically, modifications at this point merely
involve insertion and deletion of single characters or
replacement of a small string of characters by a
substitute string. The erroneous source file is used as
an input to the Editor and the user generates a
corrected source file as an output. The new file is then
re-assembled. At this point other trivial errors may
appear which were not apparent to CRA on the first
run. For example, an erroneous instruction operand
may not have been flagged on the first assembly
because its associated statement label or operation
mnemonic may have also been in error. Thus, a new
Edit-Reassemble pass may be necessary. Finally, a
program is developed to which CRA does not object.
At this point, a first run can take place.
The probability of a logical error in the program
depends on its length and the previous experience of
the programmer. Assuming one or more logical errors
are found (via some "debugging" procedure), the
source file must again be modified. Often such
modifications are no longer trivial. For example, it
may be necessary to find all instructions which
branch to a given location and precede some of them
with one or more instructions currently not in the
program. Often, it may be necessary to delete some
code or insert some code or move some code to a
different point in the program. Several duplicated sets
of in-line instructions may have to be removed and
replaced with
calls
to one common subroutine which
is to be added. The user may decide to "clean up" the
program logically, in anyone of several ways, or to
improve its "readability" by modifying its comments
or statement formats
(by inserting TAB's or
SPACE's, for example).
Such modifications to the source file also involve
use of the Editor. After they are completed, a
reassembly may again turn up new errors of the
"trivial" variety. And so on. Thus the generation of a
bug-free program typically involves the chart shown
.
in Fig. 26.
It
is thus quite likely that the amount of
time spent "conversing" with the Editor will be much
larger than that
spent
with the Assembler.
I
~ "TRIVIAL" ERRORS
~
SOURCE FILE
USING EDITOR
l
i
!
(RE) ASSEMBLE
F IX LOGICAL ERRORS
USING
CYEs~ERROR
IAGNOSTICS?
USING EDITOR
1
RUN
"T~,~
~
PROGRAM WORKS
92CS
-
28198
Fig. 26 - Flow chart for "bug-free" program,

Advertisement

Table of Contents
loading

Table of Contents