"Buck
Savage" <hhacker(a)home.com> wrote:
Actually, microcode is not compiled.
All the microcode I've ever written was compiled. Of course, it was
compiled from special source languages defined for that explicit purpose.
No one with any sense would write a non-trivial amount of microcode any
other way.
All the microcode I've ever written (or seen) was written in a special
_assembly_ language. Or at least I'd class it as that as (a) one 'line'
of microcode corresponded to one microinstruction and (b) the language
statements were pretty close to the hardware definition.
Here's a PERQ microinstruction :
R0:=R0+R1, if neq goto(loop);
The first 'phrase' defines the contents of
X and Y fields (select particular registers)
AMUX, BMUX fields (gate registers to ALU inputs, rather than, say gating
a constant there)
ALU field (do an addition operation)
W field (we want to write it back to a register and not just set the flags)
The second phrase sets the
Condition field (to select the 'not equal' condition)
Jump field (to do a got and not just a next instruction, say)
SF and Z fields (to define the jump address).
So the actual machine instruction is pretty close to the higher level
version. OK, some fields (Z in particular) can be set by several
different types of phrase, as the Z field is used for jump addresses and
IO addresses and shifter control and constants and... Yes the assembler
moans if you try to set it in 2 different ways in the same instruction.
-tony
This is my experience as well. HP 21MX microcode is very similar. I will
dig up some examples and post it at a later time.
Thanks, Tony, for the examples and the clarification.
William R. Buckley