![RCA CDPl8S693 Скачать руководство пользователя страница 29](http://html.mh-extra.com/html/rca/cdpl8s693/cdpl8s693_user-manual_334504029.webp)
5. Running the MCDS COSMAC
Resident Assembler (CRA)
28
The MCDS Level I Assembler (CRA) supplied
with the CDP 18S694 and available as an option for
use with the CDP18S693 allows the user to convert a
Level I source file on tape (source code) into an
executable machine language program on another
tape (object code). The object tape can then be loaded
into memory by the UT62 monitor program (TAPE
READ) for CPU execution, or it can be placed in an
EPROM by the PROM programmer supplied with the
CDP18S694 but also available as an option for the
CDP18S693.
The use of the Assembler permits the programmer to
write program s using convenient symbols and
expressions. The input or source file consists of a
sequence of statements. The Assembler converts these
statements into hexadecimal instructions and data and
writes them to an object file tape. Some statements are
special commands to the assembler only. They
produce no output code and are called directives.
An assembly language program (Level I) is by far
easier to create and modify than a machine language
program. Labels and comments in the source code help
to produce more readable programs and aid in
documentation. The Assembler also flags certain
programming errors and thus creates machine code
that is simpler to debug.
The following material describes how to use the
Assembler and explains in detail the Assembler’s
treatment of a source file and the form of the Level I
assembly language.
Using the Assembler
The Assembler is called from the UT62 monitor
program by the user typing an A. The system searches
memory for the top of free RAM, types the Assembler
title, and then requests source (READ) and object
(WRITE) tapes.
The Assembler requires two active tape drives to
perform a successful assembly. While the UT62 is
running, it is desirable, although not essential, for the
user to rewind both tapes, source and object, before
entry into the Assembler.
A sample assembly session is illustrated in Fig. 8 and
should be referred to during the following discussion.
At line 1 the user types an A to evoke the Assembler.
The system responds at line 2 by typing the Assembler
1 * A
2 MCDS ASSEMBLER VER 0.0
3 READ? 0(CR) [1(CR)]
4 WRITE? 1(CR) [0(CR)]
5 PRESS PLAY ON READ TAPE
6 TYPE ANY KEY K [ANY KEY]
7
H, L, U, J? H
[L]
8 REWIND, THEN TYPE ANY KEY K [ANY KEY].
9 PRESS PLAY ON READ TAPE . .PRESS PLAY BUTTON ON TAPE 0
10 RECORD ON WRITE TAPE ..PRESS RECORD BUTTON ON TAPE 1
11 TYPE ANY KEY TO START PASS2 K [ANYKEY].
12
DONE
13 H, L, U, J? J
14 REWIND, THEN TYPE ANY KEY K fANY KEY].
15 H, L, U, J? U
16 JL
Fig. 8—Sample assem bly session. S ystem res p o ns e is u n de rline d .S a m p le us e rres p o ns e is
not underlined; alternate user response is in square brackets [ ].