Assemblers in MLRISC satisfy the signature
which is defined as:
signature INSTRUCTION_EMITTER =
structure I : INSTRUCTIONS
structure C : CELLS
structure S : INSTRUCTION_STREAM
structure P : PSEUDO_OPS
sharing I.C = C
sharing S.P = P
val makeStream : Annotations.annotations ->
((int -> int) -> I.instruction -> unit,
The function makeStream returns an instruction stream.
By default the output is bound to the stream AsmStream.asmOutStream
defined in the structure
AsmStream at creation time.
The structure AsmStream satisfy the following signature.
signature ASM_STREAM = sig
val asmOutStream : TextIO.outstream ref
val withStream : TextIO.outstream -> ('a -> 'b) -> 'a -> 'b
Redirecting the Output
It is possible to redirect the output of an instruction stream.
For example, the following statement
val asm = makeStream 
binds the output of asm to AsmStream.asmOutStream, which
by default is just TextIO.stdOut. On the other hand, the
val asm = AsmStream.withStream mystream makeStream 
binds the output of asm to mystream.
Assemblers are automatically generated by the
MDGen tool. Some specific generated
assemblers are listed below:
- Power PC
Last modified: Thu Jan 9 19:38:15 EST 2003 by leunga@slinky