For Xerox Internal Use Only -- September 14, 1979

MicroD                      August 1, 1978                            1




                 MicroD - Dorado/D0 instruction placer



MicroD takes microprograms  for the Dorado  or D0, assembled  by Micro,
and completes the assembly  process by assigning absolute  locations to
the  microinstructions.  The  resulting file  can be  loaded into  a D-
machine by  Midas and run.   MicroD's job  is to find  a way  to assign
locations  to  microinstructions  in  a  way  that  satisfies  both the
semantics   of  the   source  program   and  the   peculiar  addressing
restrictions of the hardware.

This document is deliberately  somewhat sketchy, since it  assumes that
its readers have  already absorbed the necessary  "culture" surrounding
D-machine microprogramming and just  want to know how to  convert Micro
output into Midas input.  At some future date it may be expanded  to be
more helpful to people just getting started.

The simplest way to use MicroD is to assemble your  entire microprogram
at once with Micro, producing  a single file xxx.DIB.  (DIB  stands for
"D-machine Intermediate Binary".)  Then you invoke MicroD as follows:
      MicroD xxx
to produce a listing file xxx.DLS and a final binary file  xxx.MB which
can be fed to Midas.

MicroD normally produces a listing with the following parts:
      The name and initial contents of each defined R memory location.
      The initial contents of each IFU and ALUF memory location.
      The label and octal representation of each microinstruction.
      A summary of how much of each page of I (microinstruction) memory
was used.
MicroD accepts the following global flags which affect the listing:
      /N (No listing) - only produce the summary
      /C (Concise)  - produce  everything but the  octal contents  of I
memory
The following global  flags produce additional information,  not useful
to the ordinary user:
      /D (Debug) - print a large amount of debugging information
      /T (Trace) - print a trace of the calls on the storage allocator

Normally MicroD produces its output on xxx.DLS and xxx.MB, where xxx is
the name of the last (or only) input file.  You can specify a different
name with the local /O switch, e.g.
      MicroD xxx yyy/o
to process xxx.DIB but produce yyy.DLS and yyy.MB.

If  you wish,  you can  assemble your  microprogram in  pieces  and let
MicroD link  the pieces  together.  (This  can save  a large  amount of
assembly time  for large programs.)   Suppose your program  consists of
the following parts: some definitions defs1.MC and defs2.MC;  one large
piece  of  code this1.MC  and  this2.MC; another  large  piece  of code
that.MC.  Then you can proceed as follows:
      Micro saveit/s defs/b defs1 defs2
This assembles the definitions,  saves Micro's state on  saveit.ST, and
produces a file defs.DIB.
      Micro saveit/r this/b this1 this2
This resumes assembly with  the definitions saved in  saveit, producing
this.DIB.  Micro will give you a list of "undefined symbols", which are
references to symbols not defined in this1 or this2 (presumably defined
in that).
           For Xerox Internal Use Only -- September 14, 1979

MicroD                      August 1, 1978                            2




      Micro saveit/r that
This  again  resumes  assembly with  the  saved  definitions, producing
that.DIB.   Again, Micro  will  list the  symbols not  defined  in that
(presumably defined in this1 or this2).
      MicroD myprog/o defs this that
MicroD will  link together any  references from this  to that  (or vice
versa) and produce the output files myprog.DLS and myprog.MB.

Note that you do not need  to do anything special in your  source files
to declare labels which are exported (defined here, used  elsewhere) or
imported  (used  here,  defined  elsewhere):  Micro  assumes  that  any
undefined symbol is meant to  be imported (but gives you the  list just
so you  can check), and  MicroD assumes that  all labels  are exported.
MicroD also discards  all but the last  definition of a name  (e.g. the
name  ILC  is  defined  in  every  file  as  the  address  of  the last
microinstruction).

If  you have  multiple .DIB  files, you  can control  the  listing mode
(normal, No listing, or Concise) for each file individually by using /L
(List), /N,  or /C  as a  local switch  on the  file name.   The global
switch, if any,  applies to any input  file that lacks a  local switch.
For example, to get only a  concise listing for the second part  of the
program in the above example, you can use
      MicroD/n myprog/o defs this that/c