Informal Introduction To The Cosmac Resident Assembler; Flow Chart To Operation Mnemonics - RCA 1800 Operator's Manual

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

Advertisement

.;
·71
.
52 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Operator Manual for the RCA CDS II CDP18S005
The program itself resides on some input file (paper
tape or magnetic tape cassette), and is loaded into
RAM by use of standard UT20 loading techniques
previously described (the "!M" command). Once the
program is loaded, control is transferred to it, again
by the standard UT20 command $U(CR)
.
Once it is
in cortrol (running), it proceeds to communicate with
the user via the I/O terminal, outputting its own
prQmpt messages on the printer, reading user
commands from the keyboard, and appropriately
processing the input file to generate an output file .
In subsequent operating instructions for the
Assembler
I'
the Editor program pa
e
requirements
and
the
minimllm amount of ",'ork
space
required
(~AM)
ar defin ed.
II
more
RAM
pace
i available
til
program i d igned to
take advantage
of
it
by
PI'
iding some
form of "better"
ervice (as
explained
fmlh
I'
lated. Both pro'ram load
tarting
at
address
0000 and thus cannot be resident simultaneously in
the CDS.
Informal Introduction
to the COSMAC
Resident Assembler
Early in this Manual under the head "Machine
Language Programming," a simple time-out test
program was discussed. This program in UT20-
compatible hexadecimal load form is given by:
!MO F8FFBl219191913A030Q (CR)
This program was generated using the following flow
chart:
ENTRY
INITIALIZE A DOWN COUNTER
WITH A VALUE
n
DECREMENT THE DOWN COUNTER
DUMMY NOP INSTRUCTIONS
(IF DESIRED) TO PROVIDE
SOME TIME DELAY
' "
HAS COUNTER REACHED ZERO YET?
~
"
'--- - - NO YES
it
EXIT
This flow chart, of course, is a much more un-
derstandable version of the program. The time from
ENTRY to EXIT is approximately n16 times the
time for one pass through the loop.
An assembly language is designed to permit a
machine-readable form of a program whose content is
intermediate between that of an English language
flow chart, which is easily understood, and that of a
machine language hexadecimal string, which is
essentially impossible to "read". A proper assembly
language program, containing mostly English-like
text, can be directly "read" and understood. An
assembler is a program which converts the assembly
language version into its equivalent machine language
form.
Flow Chart to Operation
Mnemonics
The time-out text program given above can be used
to
illustrate orne
of
the
essential properties of the
COSMAC Re idenl A embler starting from the flow
chart and pr ceeding toward lhe hex form "by
hand. "
A next version of the program, expressed in terms
of specific COSMAC instructions, is shown below:
ENTRY
~
LOAD D WITH AN IMMEDIATE ARGUMENT
n16
PUT D INTO THE UPPER HALF OF SOME
COUNTER GENERAL REGISTER.
~
.-----~
DECREMENT THE COUNTER
~
ANY DUMMY TIME DELAY INSTRUCTION
(IF DESIRED)
~
ANY DUMMY TIME DELAY INSTRUCTION
(IF DESIRED)
J
PUT UPPER HALF OF THE COUNTER INTO D
J
BRANCH BACK TOl
IF
D IS NOT YET ZERO
L---_
_ _ _ _ _
HERE
1
THIS IS THE
EXIT.
(TH
E
NEXT INSTRUCTION
EXECUTED WHEN THE COUNTER HAS
REACHED ZERO)
"
i

Advertisement

Table of Contents
loading

Table of Contents