com.cmpware.fastmodel
Class AsmTool

java.lang.Object
  extended by com.cmpware.fastmodel.AsmTool

public class AsmTool
extends java.lang.Object

This class provides support for quickly and easily building a simple assembler. This is done by taking an Instruction[] instruction set description array and using it to drive the assembly. Features: Supports variable length instructions. Arbitrary length instructions. Assumptions: Big Endian Instructions are byte aligned. No verification of fields is done (overlaps, etc). Note that this tool is only useful when there is a close correspondence between the fields in the binary instruction word and the fields in the assembly language. This is true for most modern microprocessors, but complex decode, fields made of non-adjacent bits, field overloading or other similar complications will require significant 'fixup'.

Copyright (c) 2006 Cmpware, Inc. All Rights Reserved.

Author:
SAG

Field Summary
static java.lang.String copyright
          Copyright string
 
Constructor Summary
AsmTool()
          The default constructor
 
Method Summary
static int run(FastModel fm, java.lang.String infile, java.lang.String outfile)
          To be run from the main() routine in the class that inherits AsmTool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
Copyright string

See Also:
Constant Field Values
Constructor Detail

AsmTool

public AsmTool()
The default constructor

Method Detail

run

public static int run(FastModel fm,
                      java.lang.String infile,
                      java.lang.String outfile)
To be run from the main() routine in the class that inherits AsmTool. This is where everything happens.

Parameters:
fm - The assembler FastModel model.
infile - the input filename
outfile - the output filename.