Alto Hardware Manual Section
9:
Nuts and Bolts for the Microcoder
62
9.0
NUTS
AND BOLTS FOR THE MICROCODER
9.1
Standllrd Microcode Conventions
The microassembler which assembles microcode for the Alto
is
called Mu.
By
convention, microcode
source
files
have the extension
.MU,
and binary
files
have the extension
.MB.
Standard Alto I
ROM
microcode versions
will
be called AltoCodex.MU; those for Alto II will
be
called AltoIICodex.Mu. A
microcode source
file
can be divided into three largely separable pieces: the language definitions, which
tell
Mu
what names will be used for what octal values
of
what microcode fields;
the
constant definitions,
which declare all constants that may later be referenced,
and
which cause the constant memory to
be
laid
out; and the register declarations,
microinstruction" label declarations, and microinstructions.
In order for microprograms written to execute in the
RAM
to be compatible with those in the
ROM,
at
a
minimum the constants assumed by the
RAM
microcode must be a subset
of
those declared by the
ROM
microcode, and the subset must reside in the same addresses.
As
a practical matter, one should preface
one's
RAM
microcode by the same constant definitions which were used
in
the assembly
of
one's
ROM
microcode. In order to facilitate and encourage this compatibility, the file AltoConstsx.MU will
be
maintained (the x corresponding
to
the latest AltoCodex) containing definitions
and
constants for
both
Alto I and Alto II. These can be logically incorporated into other microcode assemblies via
the
"include" feature
of
Mu
(#
AltoConstsx.Mu;).
If
one
or
more microcode tasks pass control back and forth between
ROM
and
RAM,
it
becomes necessary
to
associate addresses with microinstruction labels. It
is
possible to do this completely generally, based
on the microcode version number. A more limited solution
is
simply to
fix
the
addresses
of
certain
useful labels. The following addresses are guaranteed in all standard Alto I microcode versions after
20,
and all standard Alto
II
microcode versions (and are included illĀ· AltoConstsx.Mu): .
ADDRESS
20B
37B
22B
l05B
l06B
120B
121B
124B
160B
777B
LABEL
START
TRAP!
RAMCYCX
BLT
BLKS
MUL
DIY
BITBLT
LO
SWRET
SEMANTICS
Beginning
of
emulator's
main
loop; starts a new emulated
instruction.
RAM location to which unfamiliar traps are sent;
ROM
location
which implements trap sequence.
Fast cyclic shift subroutine.
Block
transfer subroutine.
Block
store subroutine.
Multiply subroutine.
Divide subroutine.
BITBLT
subroutine.
Cyclic shift dispatch table.
In
ROM!
only
--
see below
A standard convention requires that location
SWRET
in
ROM!
have the following microcode:
SWRET:
SWMODE;
:
START;
This sequence enables a program to discover whether
ROM!
exists, i.e., whether the Alto has the
2K
PROM
option (see section 9.2.4).